@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --sidebar-w: 272px;
    --topbar-h: 64px;
    --primary: #0f172a;
    --primary-soft: #1e293b;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-soft: #dbeafe;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --surface-3: #f1f5f9;
    --border: #e2e8f0;
    --border-strong: #cbd5e1;
    --text: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --success: #059669;
    --success-bg: #ecfdf5;
    --danger: #dc2626;
    --danger-bg: #fef2f2;
    --warning: #d97706;
    --warning-bg: #fffbeb;
    --info: #0284c7;
    --info-bg: #f0f9ff;
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.12);
    --transition: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    height: 100%;
    min-height: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--surface-2);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* ===== LOGIN ===== */
.auth-view {
    display: block;
    min-height: 100vh;
}

.auth-view .auth-layout {
    min-height: 100vh;
}

.auth-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.auth-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px;
    background: linear-gradient(145deg, #0f172a 0%, #1e3a8a 55%, #2563eb 100%);
    color: white;
    overflow: hidden;
}

.auth-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(255,255,255,0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.06) 0%, transparent 40%);
    pointer-events: none;
}

.auth-brand-inner { position: relative; z-index: 1; }

.auth-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 64px;
}

.auth-logo-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.auth-logo-text h1 { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; }
.auth-logo-text span { font-size: 0.8rem; opacity: 0.75; }

.auth-hero h2 {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
    max-width: 420px;
}

.auth-hero p {
    font-size: 1.05rem;
    opacity: 0.85;
    max-width: 400px;
    line-height: 1.7;
}

.auth-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 48px;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    opacity: 0.9;
}

.auth-feature-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #60a5fa;
    flex-shrink: 0;
}

.auth-brand-footer {
    position: relative;
    z-index: 1;
    font-size: 0.8rem;
    opacity: 0.6;
}

.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 32px;
    background: var(--surface-2);
}

.login-card {
    width: 100%;
    max-width: 420px;
}

.login-card-header { margin-bottom: 32px; }
.login-card-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 8px;
}
.login-card-header p { color: var(--text-secondary); font-size: 0.95rem; }

.input-group { margin-bottom: 20px; }
.input-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 8px;
}

.input-wrap { position: relative; }
.input-wrap .form-control { padding-left: 44px; }
.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    font-size: 1rem;
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    font-family: inherit;
    background: var(--surface);
    color: var(--text);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:hover { border-color: var(--border-strong); }
.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { resize: vertical; min-height: 88px; }
select.form-control { cursor: pointer; }

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-secondary);
    user-select: none;
}
.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    cursor: pointer;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 500;
    font-family: inherit;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 14px; font-size: 0.8125rem; }
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35); }
.btn-success { background: var(--success); color: white; }
.btn-success:hover:not(:disabled) { filter: brightness(1.05); }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover:not(:disabled) { filter: brightness(1.05); }
.btn-accent { background: var(--warning); color: white; }
.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }
.btn-ghost-light {
    background: rgba(255,255,255,0.08);
    color: white;
    border: 1px solid rgba(255,255,255,0.15);
}
.btn-ghost-light:hover { background: rgba(255,255,255,0.14); }

.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}
.btn-loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ===== ADMIN SHELL ===== */
.admin-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-w);
    background: var(--primary);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    border-right: 1px solid rgba(255,255,255,0.06);
}

.sidebar-brand {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.sidebar-brand-text h1 { font-size: 1rem; font-weight: 700; letter-spacing: -0.01em; }
.sidebar-brand-text span { font-size: 0.7rem; opacity: 0.55; text-transform: uppercase; letter-spacing: 0.06em; }

.sidebar-section {
    padding: 20px 16px 8px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.35);
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 8px;
}

.sidebar-group { margin-bottom: 4px; }

.sidebar-section--toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 16px 16px 8px;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.45);
    cursor: pointer;
    transition: color var(--transition);
}
.sidebar-section--toggle:hover { color: rgba(255,255,255,0.75); }

.sidebar-section__chevron {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid rgba(255,255,255,0.4);
    transition: transform var(--transition);
    flex-shrink: 0;
}
.sidebar-group:not(.collapsed) .sidebar-section__chevron {
    transform: rotate(180deg);
}

.sidebar-nav { padding: 0 12px 8px; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    margin-bottom: 2px;
    border-radius: var(--radius-sm);
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition);
}
.nav-item:hover {
    background: rgba(255,255,255,0.06);
    color: white;
}
.nav-item.active {
    background: rgba(37, 99, 235, 0.25);
    color: white;
    box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.25);
}
.nav-icon {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    opacity: 0.85;
}

.sidebar-user {
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #334155, #475569);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    flex-shrink: 0;
}

.user-info { flex: 1; min-width: 0; }
.user-info .name {
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-info .role { font-size: 0.75rem; opacity: 0.5; }

.main-wrapper {
    margin-left: var(--sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.topbar {
    height: var(--topbar-h);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--text-muted);
}
.topbar-breadcrumb strong { color: var(--text); font-weight: 600; }

.page-content {
    flex: 1;
    padding: 28px 32px 40px;
}

/* ===== PAGE ===== */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}
.page-eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent);
    margin-bottom: 6px;
}
.page-title {
    font-size: 1.625rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 4px;
}
.page-desc { color: var(--text-secondary); font-size: 0.9375rem; }

/* ===== CARDS ===== */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    overflow: hidden;
}
.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}
.card-header p {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 2px;
}
.card-body { padding: 24px; }
.card-body-flush { padding: 0; }

/* ===== STATS ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 24px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition), transform var(--transition);
}
.stat-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}
.stat-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}
.stat-icon.blue { background: var(--accent-soft); }
.stat-icon.green { background: var(--success-bg); }
.stat-icon.amber { background: var(--warning-bg); }
.stat-icon.red { background: var(--danger-bg); }
.stat-value {
    font-size: 1.875rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
    line-height: 1;
}
.stat-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 6px;
    font-weight: 500;
}

/* ===== TABLE ===== */
.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    border-bottom: 2px solid var(--border);
}
.tab {
    padding: 10px 16px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-muted);
    border: none;
    background: transparent;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-size: 0.8125rem;
    font-family: inherit;
}
.tab.active {
    color: var(--primary);
    border-bottom-color: var(--accent);
}
.tab--sm { padding: 8px 12px; font-size: 0.75rem; }
.tabs--sub { margin-top: -8px; }
.payout-settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.payout-setting-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
}
.payout-setting-card--active {
    border-color: var(--accent);
    background: rgba(124, 181, 24, 0.06);
}
.payout-setting-card p {
    margin: 4px 0 0;
    font-size: 0.8125rem;
    color: var(--text-muted);
}
.shipping-settings-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 20px;
    align-items: start;
}
.shipping-settings-intro {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 16px;
}
.shipping-settings-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
}
.form-hint {
    margin-top: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
}
.shipping-settings-preview__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}
.shipping-settings-preview__desc {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}
.shipping-settings-preview-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.shipping-settings-preview-item {
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
}
.shipping-settings-preview-item strong {
    display: block;
    color: var(--primary);
    margin-bottom: 4px;
}
.shipping-settings-preview-item p {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.5;
}
@media (max-width: 900px) {
    .shipping-settings-layout { grid-template-columns: 1fr; }
}

.table-wrap { overflow-x: auto; }
.data-table {
    width: 100%;
    border-collapse: collapse;
}
.data-table th {
    padding: 12px 20px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.data-table td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
    color: var(--text);
    vertical-align: middle;
}
.data-table tbody tr { transition: background var(--transition); }
.data-table tbody tr:hover { background: var(--surface-2); }
.data-table tbody tr:last-child td { border-bottom: none; }

/* ===== BADGES ===== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.4;
}
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-neutral { background: var(--surface-3); color: var(--text-secondary); }

/* ===== ALERTS ===== */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 0.875rem;
    line-height: 1.5;
    border: 1px solid transparent;
}
.alert-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.alert-danger {
    background: var(--danger-bg);
    color: #991b1b;
    border-color: #fecaca;
}
.alert-success {
    background: var(--success-bg);
    color: #065f46;
    border-color: #a7f3d0;
}
.alert-warning {
    background: var(--warning-bg);
    color: #92400e;
    border-color: #fde68a;
}
.alert-info {
    background: var(--info-bg);
    color: #075985;
    border-color: #bae6fd;
}

/* ===== TOOLBAR ===== */
.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.search-box { max-width: 280px; flex: 1; min-width: 200px; }
.toolbar-actions { display: flex; gap: 10px; margin-left: auto; flex-wrap: wrap; }

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 24px;
    animation: fadeIn 0.2s ease;
}
.modal {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.25s ease;
}
.modal-lg { max-width: 720px; }
.modal-xl {
    max-width: 1120px;
    width: calc(100vw - 48px);
}
.modal-header {
    padding: 24px 24px 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}
.modal-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.modal-close {
    background: var(--surface-3);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-close:hover { background: var(--border); }
.modal-body { padding: 24px; }
.modal-footer {
    padding: 16px 24px 24px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    border-top: 1px solid var(--border);
    margin-top: 8px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}
.row-unread td {
    background: rgba(245, 158, 11, 0.06);
}
.detail-item label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.detail-item span { font-size: 0.9375rem; color: var(--text); }

.actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ===== EMPTY / LOADING ===== */
.empty-state {
    text-align: center;
    padding: 56px 24px;
    color: var(--text-muted);
}
.empty-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    opacity: 0.4;
}
.empty-state h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.empty-state p { font-size: 0.875rem; }

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 64px 24px;
    gap: 16px;
    color: var(--text-muted);
}
.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}
.skeleton-card {
    height: 120px;
    border-radius: var(--radius);
    background: linear-gradient(90deg, var(--surface-3) 25%, var(--border) 50%, var(--surface-3) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* ===== TOAST ===== */
.toast-stack {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    pointer-events: none;
}
.toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    pointer-events: auto;
    animation: slideInRight 0.3s ease;
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(24px); }
    to { opacity: 1; transform: translateX(0); }
}
.toast-success { border-left: 4px solid var(--success); }
.toast-error { border-left: 4px solid var(--danger); }
.toast-warning { border-left: 4px solid var(--warning); }
.toast-info { border-left: 4px solid var(--info); }
.toast-body { flex: 1; }
.toast-title { font-size: 0.8125rem; font-weight: 600; margin-bottom: 2px; }
.toast-message { font-size: 0.8125rem; color: var(--text-secondary); line-height: 1.4; }
.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    line-height: 1;
}
.toast-close:hover { color: var(--text); }

/* ===== FILE UPLOAD ===== */
.file-upload {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    background: var(--surface-2);
    transition: border-color var(--transition);
}
.file-upload:hover { border-color: var(--accent); }
.file-upload input[type="file"] { margin-top: 12px; font-size: 0.875rem; }

.slider-table-thumb {
    width: 72px;
    height: 44px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border);
    display: block;
}

.slider-form-preview {
    margin-top: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface-2);
}

.slider-form-preview img {
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    display: block;
}

.slider-form-preview span {
    display: block;
    padding: 10px 12px;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text);
}

/* ===== PORTAL ORDER REVIEW MODAL ===== */
.portal-review-modal__subtitle {
    margin-top: 6px;
    font-size: 0.875rem;
    color: var(--text-muted);
    max-width: 640px;
}
.portal-review-modal__body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.portal-review-summary {
    padding: 20px 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.portal-review-summary__main {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.portal-review-summary__order {
    font-size: 1.125rem;
}
.portal-review-summary__label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.portal-review-summary__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}
.portal-review-summary__amount {
    color: var(--primary);
    font-size: 1.125rem;
}
.portal-review-line {
    padding: 0;
    overflow: hidden;
}
.portal-review-line__product {
    padding: 20px 24px;
    background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}
.portal-review-line__eyebrow,
.portal-review-party__label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.portal-review-line__product-head h4 {
    font-size: 1.25rem;
    margin-bottom: 4px;
}
.portal-review-line__code {
    color: var(--text-muted);
    font-size: 0.875rem;
}
.portal-review-line__product-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(110px, 1fr));
    gap: 12px;
    min-width: min(100%, 520px);
}
.portal-review-stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 14px;
}
.portal-review-stat span {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.portal-review-stat strong {
    font-size: 1rem;
}
.portal-review-stat--accent {
    border-color: rgba(37, 99, 235, 0.25);
    background: rgba(37, 99, 235, 0.05);
}
.portal-review-stat--accent strong {
    color: var(--primary);
}
.portal-review-parties {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border-bottom: 1px solid var(--border);
}
.portal-review-party {
    padding: 20px 24px;
}
.portal-review-party--store {
    border-right: 1px solid var(--border);
    background: rgba(245, 158, 11, 0.04);
}
.portal-review-party--customer {
    background: rgba(37, 99, 235, 0.04);
}
.portal-review-party__head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}
.portal-review-party__icon {
    font-size: 1.5rem;
    line-height: 1;
}
.portal-review-party__head h5 {
    font-size: 1rem;
    font-weight: 600;
}
.portal-review-party__details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 20px;
    margin: 0;
}
.portal-review-party__details div {
    min-width: 0;
}
.portal-review-party__details dt {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 2px;
}
.portal-review-party__details dd {
    margin: 0;
    font-size: 0.875rem;
    word-break: break-word;
}
.portal-review-party__address {
    grid-column: 1 / -1;
}
.portal-review-alternatives {
    padding: 20px 24px 24px;
}
.portal-review-alternatives__head {
    margin-bottom: 16px;
}
.portal-review-alternatives__head h5 {
    font-size: 1rem;
    margin-bottom: 6px;
}
.portal-review-alternatives__head p {
    color: var(--text-muted);
    font-size: 0.875rem;
}
.portal-review-table tbody tr {
    transition: background 0.15s ease;
}
.portal-review-table__row--selected {
    background: rgba(37, 99, 235, 0.08);
}
.portal-review-table__row--customer td:first-child + td strong {
    color: var(--primary);
}
.portal-review-table__tag {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.12);
    color: var(--primary);
    font-size: 0.6875rem;
    font-weight: 600;
    vertical-align: middle;
}
.portal-review-empty {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
    background: var(--surface-2);
    border-radius: var(--radius);
}
.portal-review-modal__footer {
    position: sticky;
    bottom: 0;
    background: var(--surface);
}

@media (max-width: 900px) {
    .portal-review-parties,
    .portal-review-line__product-stats,
    .portal-review-party__details {
        grid-template-columns: 1fr;
    }
    .portal-review-party--store {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 960px) {
    .auth-layout { grid-template-columns: 1fr; }
    .auth-brand { display: none; }
    .sidebar { transform: translateX(-100%); }
    .main-wrapper { margin-left: 0; }
}
