/* Stock Transfer Page Styles */
.page-layout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    padding: 1rem;
    max-width: 1400px;
    margin: 0 auto;
}

.page-panel-left {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.page-panel-right {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Search Results */
.search-results {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: white;
}

.search-result-item {
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-result-item:hover {
    background: #f8fafc;
    border-left: 3px solid #3b82f6;
}

.search-result-item:last-child {
    border-bottom: none;
}

/* Transfer Lines */
.transfer-lines {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.transfer-lines-scrollable {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.transfer-lines-scrollable::-webkit-scrollbar {
    width: 6px;
}

.transfer-lines-scrollable::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.transfer-lines-scrollable::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.transfer-lines-scrollable::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.transfer-line-item {
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.transfer-line-item:hover {
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

/* Custom Tab Styling */
.custom-tab-headers {
    display: flex;
    border-bottom: 1px solid #e2e8f0;
    background-color: #f8fafc;
    border-radius: 8px 8px 0 0;
}

.tab-header {
    flex: 1;
    padding: 1rem 1.5rem;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    color: #64748b;
    background-color: transparent;
}

.tab-header:hover {
    background-color: #f1f5f9;
    color: #475569;
}

.tab-header.active {
    border-bottom-color: #3b82f6;
    color: #3b82f6;
    font-weight: 600;
    background-color: #ffffff;
}

.tab-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.tab-panel {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    height: 100%;
}

.tab-panel::-webkit-scrollbar {
    width: 6px;
}

.tab-panel::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.tab-panel::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.tab-panel::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-layout-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Page Header */
.page-header {
    margin-bottom: 30px;
    text-align: center;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.page-title i {
    color: #3498db;
}

.page-subtitle {
    font-size: 1.1rem;
    color: #7f8c8d;
    margin: 0;
}

/* Loading */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 20px;
}

.loading-container p {
    font-size: 1.1rem;
    color: #7f8c8d;
    margin: 0;
}

/* Cards */
.transfer-form-card,
.stock-selection-card,
.transfer-lines-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
    border: 1px solid #e9ecef;
}

.card-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px 12px 0 0;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: #3498db;
}

/* Form Content */
.form-content {
    padding: 24px;
}

/* Stock Grid */
.stock-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.stock-item {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.stock-item:hover {
    border-color: #3498db;
    background: #e3f2fd;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.15);
}

.stock-info {
    flex: 1;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 8px 0;
}

.variant-name {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin: 0 0 4px 0;
}

.barcode {
    font-size: 0.85rem;
    color: #95a5a6;
    margin: 0 0 4px 0;
}

.price {
    font-size: 0.9rem;
    font-weight: 600;
    color: #27ae60;
    margin: 0;
}

.stock-quantity {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.available {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2c3e50;
}

.expiry {
    font-size: 0.8rem;
    color: #e74c3c;
    font-weight: 500;
}

/* Empty State */
.empty-stock {
    text-align: center;
    padding: 40px 20px;
    color: #7f8c8d;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.empty-stock p {
    font-size: 1.1rem;
    margin: 0;
}

/* Transfer Lines */
.transfer-lines {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.transfer-line {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.line-info {
    flex: 1;
}

.line-info .product-name {
    font-size: 1rem;
    margin-bottom: 4px;
}

.line-info .variant-name {
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.available-stock {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin: 0;
}

.line-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Transfer Actions */
.transfer-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

/* Buttons */
.btn-refresh {
    background: #17a2b8;
    border-color: #17a2b8;
    color: white;
}

.btn-refresh:hover {
    background: #138496;
    border-color: #138496;
}

/* Validation */
.validation-error {
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 4px;
    font-weight: 500;
}

.rz-invalid {
    border-color: #e74c3c !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .stock-transfer-container {
        padding: 12px;
    }
    
    .page-title {
        font-size: 2rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .stock-grid {
        grid-template-columns: 1fr;
    }
    
    .transfer-line {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .line-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .transfer-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .form-content {
        padding: 16px;
    }
    
    .card-header {
        padding: 16px;
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .stock-item {
        flex-direction: column;
        gap: 12px;
    }
    
    .stock-quantity {
        text-align: left;
    }
}
