/**
 * VALOOBUY STOCK CARD DIGITAL v4 - CSS
 */

:root {
    --primary: #1e3a5f;
    --primary-dark: #152a47;
    --secondary: #0d9488;
    --secondary-dark: #0a7c72;
    --accent: #f97316;
    --accent-dark: #ea580c;
    --gold: #d4a827;
    --gold-dark: #b8922a;
    --success: #10b981;
    --danger: #ef4444;
    --purple: #8b5cf6;
    --purple-dark: #6d28d9;
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --font-main: 'Plus Jakarta Sans', -apple-system, sans-serif;
    --font-mono: 'Kanit', sans-serif;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.12);
    --radius: 10px;
    --radius-lg: 14px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body {
    font-family: var(--font-main);
    background: var(--gray-100);
    color: var(--gray-800);
    line-height: 1.5;
    min-height: 100vh;
    min-height: 100dvh;
}

.app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.main { flex: 1; padding: 16px; padding-bottom: 80px; max-width: 480px; margin: 0 auto; width: 100%; }

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    padding: 14px 16px;
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner { display: flex; align-items: center; gap: 12px; max-width: 480px; margin: 0 auto; }
.header-title { flex: 1; }
.header-title h1 { font-size: 1.1rem; font-weight: 700; }
.header-title small { font-size: 0.7rem; opacity: 0.8; }
.header-version { font-size: 0.6rem; background: rgba(255,255,255,0.2); padding: 2px 6px; border-radius: 4px; margin-left: 6px; }
.back-btn {
    width: 36px; height: 36px;
    background: rgba(255,255,255,0.15);
    border: none; border-radius: var(--radius);
    color: var(--white);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    text-decoration: none;
}
.user-badge {
    width: 36px; height: 36px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.85rem;
}
.user-pill {
    background: rgba(255,255,255,0.2);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Bottom Nav */
.bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    display: flex;
    padding: 8px 12px;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    z-index: 100;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}
.nav-item {
    flex: 1;
    display: flex; flex-direction: column;
    align-items: center; gap: 3px;
    padding: 8px 6px;
    color: var(--primary-dark);
    text-decoration: none;
    font-size: 0.65rem;
    font-weight: 600;
    border-radius: var(--radius);
    transition: all 0.2s;
}
.nav-item svg { width: 22px; height: 22px; stroke-width: 2; }
.nav-item.active {
    background: rgba(255,255,255,0.95);
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Cards */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 16px;
    overflow: hidden;
}
.card-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-100);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--gray-700);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.card-body { padding: 16px; }

/* Form Elements */
.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 0.75rem; font-weight: 600; color: var(--gray-600); margin-bottom: 6px; }
.form-input, .form-select {
    width: 100%;
    padding: 12px 14px;
    font-size: 0.9rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    background: var(--white);
    transition: all 0.2s;
}
.form-input:focus, .form-select:focus { outline: none; border-color: var(--primary); }
.form-input::placeholder { color: var(--gray-400); }
.form-input.valid { border-color: var(--success); background: #f0fdf4; }
.form-input.invalid { border-color: var(--danger); background: #fef2f2; }

/* Input group with validation icon INSIDE */
.input-group { position: relative; display: flex; gap: 8px; align-items: center; }
.input-group .form-input { flex: 1; padding-right: 44px; }
.input-search-btn {
    width: 44px; height: 44px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}
.input-search-btn:hover { background: var(--primary-dark); }
.input-search-btn:disabled { background: var(--gray-300); cursor: not-allowed; }
.input-search-btn svg { width: 20px; height: 20px; }
.input-search-btn .spinner { display: none; }
.input-search-btn.loading .spinner { display: block; animation: spin 1s linear infinite; }
.input-search-btn.loading svg:not(.spinner) { display: none; }

/* Validation icon INSIDE input */
.input-wrapper { position: relative; flex: 1; }
.input-wrapper .form-input { width: 100%; padding-right: 44px; }
.validation-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px; height: 24px;
    border-radius: 50%;
    display: none;
    align-items: center; justify-content: center;
}
.validation-icon.valid { display: flex; background: var(--success); color: white; }
.validation-icon.invalid { display: flex; background: var(--danger); color: white; }
.validation-icon svg { width: 14px; height: 14px; }

/* Choose SKU button */
.choose-btn {
    padding: 10px 14px;
    background: var(--gray-100);
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius);
    color: var(--gray-600);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex; align-items: center; gap: 6px;
    transition: all 0.2s;
    margin-top: 8px;
}
.choose-btn:hover { border-color: var(--primary); color: var(--primary); }
.choose-btn svg { width: 16px; height: 16px; }

/* Location picker */
.location-picker { display: flex; gap: 8px; align-items: center; }
.location-picker .loc-field { flex: 1; }
.location-picker .loc-sep { color: var(--gray-400); font-weight: 600; }
.location-picker select {
    width: 100%;
    padding: 12px 10px;
    font-size: 0.85rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    background: var(--white);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center; justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); }
.btn-secondary { background: var(--secondary); color: var(--white); }
.btn-secondary:hover:not(:disabled) { background: var(--secondary-dark); }
.btn-accent { background: var(--accent); color: var(--white); }
.btn-accent:hover:not(:disabled) { background: var(--accent-dark); }
.btn-outline { background: transparent; border: 2px solid var(--gray-300); color: var(--gray-700); }
.btn-outline:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.btn-ghost { background: transparent; color: var(--gray-600); }
.btn-ghost:hover:not(:disabled) { background: var(--gray-100); }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 24px; font-size: 0.95rem; }
.btn-sm { padding: 8px 12px; font-size: 0.8rem; }
.btn .spinner { display: none; width: 18px; height: 18px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; }
.btn.loading .spinner { display: block; animation: spin 1s linear infinite; }

@keyframes spin { to { transform: rotate(360deg); } }

/* Stock Info Card - NEW LAYOUT */
.stock-info-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius-lg);
    color: var(--white);
    overflow: hidden;
    margin-bottom: 16px;
}
.stock-info-top {
    display: flex; align-items: center; gap: 14px;
    padding: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.stock-info-img {
    width: 60px; height: 60px;
    border-radius: var(--radius);
    background: rgba(255,255,255,0.15);
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
}
.stock-info-img img { width: 100%; height: 100%; object-fit: cover; }
.stock-info-details { flex: 1; min-width: 0; }
.stock-info-sku { font-family: var(--font-mono); font-weight: 700; font-size: 1.1rem; }
.stock-info-name { font-size: 0.8rem; opacity: 0.85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Stock info bottom - NEW LAYOUT with buttons on right */
.stock-info-bottom {
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.stock-info-left { flex: 1; }
.stock-info-label { font-size: 0.75rem; opacity: 0.8; }
.stock-info-balance { font-size: 2.2rem; font-weight: 700; line-height: 1; }
.stock-info-divider {
    width: 1px;
    height: 60px;
    background: rgba(255,255,255,0.2);
}
.stock-info-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.stock-info-actions .action-row {
    display: flex;
    gap: 6px;
}
.stock-info-actions .btn-action {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: all 0.2s;
}
.stock-info-actions .btn-action svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.5;
}
.stock-info-actions .btn-in { background: var(--secondary); }
.stock-info-actions .btn-in:hover { background: var(--secondary-dark); }
.stock-info-actions .btn-out { background: var(--accent); }
.stock-info-actions .btn-out:hover { background: var(--accent-dark); }
.stock-info-actions .btn-move { background: rgba(255,255,255,0.2); }
.stock-info-actions .btn-move:hover { background: rgba(255,255,255,0.3); }

/* Radio Buttons */
.radio-group { display: flex; flex-direction: column; gap: 10px; }
.radio-item { position: relative; }
.radio-input { position: absolute; opacity: 0; }
.radio-label {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}
.radio-input:checked + .radio-label { border-color: var(--primary); background: rgba(30,58,95,0.03); }
.radio-dot {
    width: 20px; height: 20px;
    border: 2px solid var(--gray-300);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.radio-input:checked + .radio-label .radio-dot { border-color: var(--primary); background: var(--primary); }
.radio-dot::after { content: ''; width: 8px; height: 8px; background: var(--white); border-radius: 50%; opacity: 0; }
.radio-input:checked + .radio-label .radio-dot::after { opacity: 1; }
.radio-text { font-weight: 600; font-size: 0.9rem; }
.radio-desc { font-size: 0.75rem; color: var(--gray-500); }

.radio-item.type-in .radio-input:checked + .radio-label { border-color: var(--secondary); }
.radio-item.type-in .radio-input:checked + .radio-label .radio-dot { border-color: var(--secondary); background: var(--secondary); }
.radio-item.type-out .radio-input:checked + .radio-label { border-color: var(--accent); }
.radio-item.type-out .radio-input:checked + .radio-label .radio-dot { border-color: var(--accent); background: var(--accent); }

/* Type Color Indicators (left border accent) */
.tc-sla .radio-label     { border-left: 4px solid #3b82f6; }
.tc-ifs .radio-label     { border-left: 4px solid #8b5cf6; }
.tc-pur .radio-label     { border-left: 4px solid #22c55e; }
.tc-fnd .radio-label     { border-left: 4px solid #f59e0b; }
.tc-dor .radio-label     { border-left: 4px solid #ec4899; }
.tc-adj .radio-label     { border-left: 4px solid #14b8a6; }
.tc-cashier .radio-label { border-left: 4px solid #f43f5e; }
.tc-ecom .radio-label    { border-left: 4px solid #a855f7; }
.tc-sts .radio-label     { border-left: 4px solid #06b6d4; }

/* Type Badge */
.type-badge {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius);
    color: var(--white);
    font-weight: 600;
    margin-bottom: 16px;
}
.type-badge.stock-in { background: linear-gradient(135deg, var(--secondary), var(--secondary-dark)); }
.type-badge.stock-out { background: linear-gradient(135deg, var(--accent), var(--accent-dark)); }
.type-badge.relocation { background: linear-gradient(135deg, var(--purple), var(--purple-dark)); }
.type-badge svg { width: 20px; height: 20px; }

/* Data Table */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.data-table th, .data-table td { padding: 12px 10px; text-align: left; border-bottom: 1px solid var(--gray-100); }
.data-table th { background: var(--secondary-dark); font-weight: 600; color: var(--white); font-size: 0.7rem; text-transform: uppercase; position: sticky; top: 0; }
.data-table td { color: var(--gray-700); vertical-align: top; }
.data-table tbody tr:nth-child(even) { background: var(--gray-50); }
.data-table tbody tr:hover { background: rgba(30,58,95,0.03); }
.data-table .text-right { text-align: right; }
.data-table .text-center { text-align: center; }
.data-table .text-in { color: var(--secondary); font-weight: 600; }
.data-table .text-out { color: var(--accent); font-weight: 600; }
.data-table .text-mono { font-family: var(--font-mono); font-size: 0.75rem; }

/* Date cell - stacked */
.date-cell { line-height: 1.3; }
.date-cell .date-day { font-weight: 600; color: var(--gray-800); }
.date-cell .date-time { font-size: 0.7rem; color: var(--gray-500); }

/* Transaction cell */
.txn-cell { line-height: 1.4; }
.txn-type { font-weight: 600; color: var(--gray-800); }
.txn-ref { font-size: 0.7rem; color: var(--gray-500); font-family: var(--font-mono); }
.txn-remark { font-size: 0.7rem; color: var(--gray-400); font-style: italic; }

.table-wrapper { overflow-x: auto; margin: 0 -16px; padding: 0 16px; }

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    border-top: 1px solid var(--gray-100);
}
.pagination-btn {
    width: 36px; height: 36px;
    border: 1px solid var(--gray-200);
    background: var(--white);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    color: var(--gray-600);
    transition: all 0.2s;
}
.pagination-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.pagination-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.pagination-btn svg { width: 18px; height: 18px; }
.pagination-info { font-size: 0.8rem; color: var(--gray-500); padding: 0 12px; }

/* Date filter inline */
.date-filter {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
}
.date-filter input[type="date"] {
    padding: 6px 8px;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    font-size: 0.75rem;
    width: 115px;
}
.date-filter .date-sep { color: var(--gray-400); }

/* Action Cards */
.action-grid { display: flex; flex-direction: column; gap: 10px; }
.action-card {
    display: flex; align-items: center; gap: 14px;
    padding: 16px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}
.action-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.action-card.disabled { opacity: 0.5; pointer-events: none; }
.action-icon {
    width: 48px; height: 48px;
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    color: var(--white);
    flex-shrink: 0;
}
.action-icon svg { width: 24px; height: 24px; }
.action-icon.blue { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.action-icon.green { background: linear-gradient(135deg, var(--secondary), var(--secondary-dark)); }
.action-icon.orange { background: linear-gradient(135deg, var(--accent), var(--accent-dark)); }
.action-icon.purple { background: linear-gradient(135deg, var(--purple), var(--purple-dark)); }
.action-icon.cyan { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.action-icon.gray { background: var(--gray-400); }
.action-content { flex: 1; }
.action-title { font-weight: 600; font-size: 1rem; }
.action-desc { font-size: 0.75rem; color: var(--gray-500); }
.action-arrow { color: var(--gray-400); }
.action-arrow svg { width: 18px; height: 18px; }

/* Modal */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000;
    opacity: 0; visibility: hidden;
    transition: all 0.3s;
    padding: 20px;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal {
    background: var(--white);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 380px;
    max-height: 85vh;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s;
}
.modal-overlay.active .modal { transform: scale(1); }
.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-100);
    display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-weight: 700; font-size: 1.1rem; }
.modal-close {
    width: 32px; height: 32px;
    background: var(--gray-100);
    border: none; border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
    color: var(--gray-500);
}
.modal-body { padding: 20px; max-height: 50vh; overflow-y: auto; }
.modal-footer { padding: 16px 20px; border-top: 1px solid var(--gray-100); display: flex; flex-direction: column; gap: 10px; }

/* SKU Modal - Category filters */
.sku-modal-body { padding: 0; max-height: 70vh; }
.sku-filters { padding: 16px; border-bottom: 1px solid var(--gray-100); background: var(--gray-50); }
.sku-filters .form-group { margin-bottom: 12px; }
.sku-filters .form-group:last-child { margin-bottom: 0; }
.sku-filters .form-select {
    padding: 10px 12px;
    font-size: 0.85rem;
}
.sku-list { padding: 16px; display: flex; flex-direction: column; gap: 8px; max-height: 350px; overflow-y: auto; }
.sku-list-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px;
    border: 2px solid var(--gray-100);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}
.sku-list-item:hover { border-color: var(--primary); background: var(--gray-50); }
.sku-list-img {
    width: 50px; height: 50px;
    border-radius: 8px;
    background: var(--gray-100);
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}
.sku-list-img img { width: 100%; height: 100%; object-fit: cover; }
.sku-list-info { flex: 1; min-width: 0; }
.sku-list-code { font-family: var(--font-mono); font-weight: 700; font-size: 0.9rem; }
.sku-list-name { font-size: 0.75rem; color: var(--gray-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sku-list-empty { text-align: center; padding: 30px; color: var(--gray-500); }

/* Success Icon */
.success-icon {
    width: 70px; height: 70px;
    background: linear-gradient(135deg, var(--success), #059669);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
    color: var(--white);
}
.success-icon svg { width: 36px; height: 36px; }
.success-title { text-align: center; font-size: 1.2rem; font-weight: 700; margin-bottom: 6px; }
.success-msg { text-align: center; color: var(--gray-500); font-size: 0.9rem; }

/* Loading Overlay */
.loading-overlay {
    position: fixed; inset: 0;
    background: rgba(255,255,255,0.95);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    z-index: 2000;
    opacity: 0; visibility: hidden;
    transition: all 0.2s;
}
.loading-overlay.active { opacity: 1; visibility: visible; }
.loading-spinner {
    width: 44px; height: 44px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
.loading-text { margin-top: 14px; color: var(--gray-600); font-size: 0.9rem; font-weight: 500; }

/* Welcome Card with Clock */
.welcome-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 16px;
    overflow: hidden;
}
.welcome-card-body {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.welcome-left { flex: 1; }
.welcome-greeting { font-size: 0.85rem; color: var(--gray-500); margin-bottom: 2px; }
.welcome-name { font-size: 1.3rem; font-weight: 700; color: var(--gray-800); }
.welcome-date { font-size: 0.8rem; color: var(--gray-500); margin-top: 4px; }
.welcome-divider {
    width: 1px;
    height: 70px;
    background: var(--gray-200);
}
.welcome-clock {
    text-align: center;
    min-width: 90px;
}
.clock-time-wrap {
    display: flex;
    align-items: baseline;
    justify-content: center;
}
.clock-time {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}
.clock-seconds {
    font-size: 0.85rem;
    color: var(--gray-400);
    font-family: var(--font-mono);
    font-weight: 500;
}
.clock-ampm {
    font-size: 0.7rem;
    color: var(--gray-500);
    margin-top: 2px;
}

/* Login Page */
.login-page { min-height: 100vh; min-height: 100dvh; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); display: flex; flex-direction: column; }
.login-header { padding: 50px 20px 30px; text-align: center; color: var(--white); }
.login-logo {
    width: 70px; height: 70px;
    background: rgba(255,255,255,0.15);
    border-radius: var(--radius-lg);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px;
}
.login-logo svg { width: 40px; height: 40px; }
.login-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 4px; }
.login-subtitle { font-size: 0.85rem; opacity: 0.8; }
.login-version { 
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    margin-top: 12px;
}
.login-form-wrap {
    flex: 1;
    background: var(--gray-50);
    border-radius: 24px 24px 0 0;
    padding: 30px 20px;
}
.login-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-lg);
    max-width: 380px;
    margin: 0 auto;
}
.login-card-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 20px; text-align: center; }
.login-footer { text-align: center; margin-top: 24px; font-size: 0.75rem; color: var(--gray-500); }

/* Alert */
.alert {
    padding: 12px 14px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    margin-bottom: 14px;
    display: flex; align-items: center; gap: 10px;
}
.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.alert svg { width: 18px; height: 18px; flex-shrink: 0; }

/* Empty State */
.empty-state { text-align: center; padding: 40px 20px; color: var(--gray-500); }
.empty-icon { width: 60px; height: 60px; background: var(--gray-100); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; }
.empty-icon svg { width: 28px; height: 28px; color: var(--gray-400); }
.empty-title { font-weight: 600; color: var(--gray-700); margin-bottom: 6px; font-size: 1rem; }
.empty-desc { font-size: 0.85rem; }

/* Date Range */
.date-range { display: flex; align-items: center; gap: 10px; }
.date-range .form-input { flex: 1; padding: 10px 12px; font-size: 0.85rem; }
.date-sep { color: var(--gray-400); font-size: 0.85rem; }

/* Utilities */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-muted { color: var(--gray-500); }
.font-mono { font-family: var(--font-mono); }
.mt-sm { margin-top: 10px; }
.mt-md { margin-top: 16px; }
.mb-sm { margin-bottom: 10px; }
.mb-md { margin-bottom: 16px; }
.flex { display: flex; }
.gap-sm { gap: 10px; }

/* Relocation sections */
.loc-section {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 10px;
}
.loc-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--gray-500);
    margin-bottom: 10px;
    display: flex; align-items: center; gap: 8px;
}
.loc-available {
    background: rgba(139,92,246,0.1);
    padding: 10px 14px;
    border-radius: var(--radius);
    margin-top: 10px;
    display: none;
}
.loc-available.active { display: block; }
.loc-available-label { font-size: 0.75rem; color: var(--gray-500); }
.loc-available-value { font-size: 1.5rem; font-weight: 700; color: var(--purple); }

.arrow-down {
    display: flex; justify-content: center;
    padding: 6px 0;
    color: var(--gray-400);
}

.modal-search { margin-bottom: 16px; }
.modal-search .form-input { padding: 10px 14px; }

/* Location Radio List for Relocation */
.loc-radio-list { display: flex; flex-direction: column; gap: 8px; }
.loc-radio-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}
.loc-radio-item:hover { border-color: var(--primary); }
.loc-radio-item.selected { border-color: var(--purple); background: rgba(139,92,246,0.05); }
.loc-radio-item .loc-dot {
    width: 20px; height: 20px;
    border: 2px solid var(--gray-300);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.loc-radio-item.selected .loc-dot { border-color: var(--purple); background: var(--purple); }
.loc-radio-item .loc-dot::after { content: ''; width: 8px; height: 8px; background: var(--white); border-radius: 50%; opacity: 0; }
.loc-radio-item.selected .loc-dot::after { opacity: 1; }
.loc-radio-item .loc-info { flex: 1; }
.loc-radio-item .loc-name { font-weight: 600; font-family: var(--font-mono); }
.loc-radio-item .loc-qty { font-size: 0.8rem; color: var(--purple); font-weight: 600; }

/* SOH Item Card */
.soh-item {
    display: flex; align-items: center; gap: 12px;
    padding: 14px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 10px;
}
.soh-item-img {
    width: 50px; height: 50px;
    border-radius: 8px;
    background: var(--gray-100);
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}
.soh-item-img img { width: 100%; height: 100%; object-fit: cover; }
.soh-item-info { flex: 1; min-width: 0; }
.soh-item-sku { font-family: var(--font-mono); font-weight: 700; font-size: 0.9rem; }
.soh-item-name { font-size: 0.75rem; color: var(--gray-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.soh-item-loc { font-size: 0.7rem; color: var(--gray-400); font-family: var(--font-mono); }
.soh-item-qty { font-size: 1.2rem; font-weight: 700; color: var(--primary); text-align: right; min-width: 50px; }

/* Cascading Location Picker */
.loc-cascade { display: flex; flex-direction: column; gap: 12px; }
.loc-cascade .form-group { margin-bottom: 0; }
.loc-cascade .form-select:disabled { background: var(--gray-100); cursor: not-allowed; }

/* Progressive Location Picker */
.loc-progressive { display: flex; flex-direction: column; gap: 12px; }
.loc-progressive .form-group { margin-bottom: 0; }
.loc-progressive .form-group.hidden { display: none; }

/* Weather Widget - COMPACT DARK PILL */
.weather-widget {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 6px; 
    margin-left: auto;
    margin-right: auto;
    background: var(--primary);
    padding: 3px 10px;
    border-radius: 20px;
    border: none;
    box-shadow: 0 2px 4px rgba(30, 58, 95, 0.2);
}

.weather-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.weather-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 5px;
}

.weather-temp {
    font-size: 11px;
    font-weight: 700;
    color: #ffffff !important;
}

.weather-desc {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.8) !important;
    text-transform: capitalize;
    margin-top: 1px;
    font-weight: 500;
}

/* Sunny Animation */
.weather-sun {
    position: relative;
    width: 36px;
    height: 36px;
}

.sun-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.6);
    animation: sunPulse 2s ease-in-out infinite;
}

.sun-ray {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    border: 2px dashed rgba(251, 191, 36, 0.5);
    border-radius: 50%;
    animation: sunSpin 10s linear infinite;
}

@keyframes sunPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); box-shadow: 0 0 15px rgba(251, 191, 36, 0.6); }
    50% { transform: translate(-50%, -50%) scale(1.1); box-shadow: 0 0 25px rgba(251, 191, 36, 0.8); }
}

@keyframes sunSpin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Moon & Stars Animation */
.weather-moon {
    position: relative;
    width: 36px;
    height: 36px;
}

.moon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    border-radius: 50%;
    box-shadow: inset -3px -2px 0 #94a3b8, 0 0 10px rgba(226, 232, 240, 0.4);
}

.star {
    position: absolute;
    font-size: 8px;
    color: #fbbf24;
    animation: starTwinkle 1.5s ease-in-out infinite;
}

.star1 { top: 2px; right: 5px; animation-delay: 0s; }
.star2 { top: 12px; right: 0; animation-delay: 0.5s; }
.star3 { bottom: 5px; right: 8px; animation-delay: 1s; }

@keyframes starTwinkle {
    0%, 100% { opacity: 0.4; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* Cloud Animation */
.weather-cloud {
    position: relative;
    width: 36px;
    height: 36px;
}

.cloud {
    position: absolute;
    font-size: 20px;
    color: #e2e8f0;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.1));
}

.cloud.c1 {
    top: 5px;
    left: 3px;
    animation: cloudFloat 3s ease-in-out infinite;
}

.cloud.c2 {
    top: 12px;
    left: 12px;
    font-size: 16px;
    opacity: 0.7;
    animation: cloudFloat 3s ease-in-out infinite 0.5s;
}

@keyframes cloudFloat {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(3px); }
}

/* Cloud Night */
.weather-cloud-night {
    position: relative;
    width: 36px;
    height: 36px;
}

.cloud-icon {
    position: absolute;
    top: 8px;
    left: 5px;
    font-size: 18px;
    color: #cbd5e1;
    animation: cloudFloat 3s ease-in-out infinite;
}

.moon-small {
    position: absolute;
    top: 3px;
    right: 5px;
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, #fef3c7, #fcd34d);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(252, 211, 77, 0.5);
}

/* Rain Animation */
.weather-rain {
    position: relative;
    width: 36px;
    height: 36px;
}

.rain-cloud {
    position: absolute;
    top: 2px;
    left: 8px;
    font-size: 18px;
    color: #94a3b8;
}

.rain-drops {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    overflow: hidden;
}

.drop {
    position: absolute;
    font-size: 8px;
    animation: rainFall 0.8s linear infinite;
}

.drop.d1 { left: 10px; animation-delay: 0s; }
.drop.d2 { left: 18px; animation-delay: 0.3s; }
.drop.d3 { left: 26px; animation-delay: 0.6s; }

@keyframes rainFall {
    0% { transform: translateY(-10px); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(20px); opacity: 0; }
}

/* Thunderstorm Animation */
.weather-storm {
    position: relative;
    width: 36px;
    height: 36px;
}

.storm-cloud {
    position: absolute;
    top: 2px;
    left: 8px;
    font-size: 18px;
    color: #64748b;
}

.lightning {
    position: absolute;
    bottom: 5px;
    left: 14px;
    font-size: 14px;
    animation: lightningFlash 2s ease-in-out infinite;
}

@keyframes lightningFlash {
    0%, 89%, 91%, 93%, 100% { opacity: 0; }
    90%, 92% { opacity: 1; }
}

/* Fog Animation */
.weather-fog {
    position: relative;
    width: 36px;
    height: 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.fog-line {
    height: 3px;
    background: linear-gradient(90deg, transparent, #cbd5e1, transparent);
    border-radius: 2px;
    animation: fogMove 3s ease-in-out infinite;
}

.fog-line.f1 { width: 80%; animation-delay: 0s; }
.fog-line.f2 { width: 100%; animation-delay: 0.5s; }
.fog-line.f3 { width: 70%; animation-delay: 1s; }

@keyframes fogMove {
    0%, 100% { transform: translateX(-3px); opacity: 0.5; }
    50% { transform: translateX(3px); opacity: 1; }
}

/* Animasi dikecilkan */
.weather-sun, .weather-moon, .weather-cloud, .weather-rain, .weather-storm, .weather-fog, .weather-cloud-night {
    transform: scale(0.5);
}

/* Loading Text Hint */
.loading-text-hint {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-top: 6px;
    padding-left: 2px;
}

/* Location qty styles in radio list */
.loc-radio-item .loc-qty.text-out {
    color: var(--accent) !important;
}