/* =====================================================
   InfoPaket v2.0.0 — Design System
   Light & Dark · Mobile-first · PWA-ready · Glass + Glow
   ===================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    /* ---- Brand (Emerald / Silver / White) ---- */
    --c-p-50:  #ecfdf5;  --c-p-100: #d1fae5;  --c-p-200: #a7f3d0;
    --c-p-300: #6ee7b7;  --c-p-400: #34d399;  --c-p-500: #10b981;
    --c-p-600: #059669;  --c-p-700: #047857;  --c-p-800: #065f46;
    --c-p-900: #064e3b;  --c-p-950: #022c22;

    --c-violet:   #cbd5e1;  --c-violet-d: #94a3b8;
    --c-fuchsia:  #e2e8f0;  --c-pink:     #f1f5f9;
    --c-cyan:     #94a3b8;  --c-cyan-d:   #64748b;

    /* ---- Semantic ---- */
    --c-success:      #10b981;  --c-success-l: #d1fae5;  --c-success-d: #047857;
    --c-warning:      #f59e0b;  --c-warning-l: #fef3c7;  --c-warning-d: #b45309;
    --c-danger:       #ef4444;  --c-danger-l:  #fee2e2;  --c-danger-d:  #b91c1c;
    --c-info:         #10b981;  --c-info-l:    #d1fae5;  --c-info-d:    #047857;

    /* ---- Surfaces (LIGHT) ---- */
    --bg-app:      #f5f6fa;
    --bg-muted:    #eef0f5;
    --bg-surface:  #ffffff;
    --bg-elevated: #ffffff;
    --bg-overlay:  rgba(15, 23, 42, 0.55);

    /* ---- Text (LIGHT) ---- */
    --t-primary:   #0f172a;
    --t-secondary: #475569;
    --t-tertiary:  #94a3b8;
    --t-inverse:   #ffffff;

    /* ---- Borders ---- */
    --b-light:    #e5e7eb;
    --b-default:  #cbd5e1;
    --b-strong:   #94a3b8;

    /* ---- Brand gradients (green / silver) ---- */
    --g-primary:  linear-gradient(135deg, #10b981 0%, #059669 100%);
    --g-success:  linear-gradient(135deg, #10b981 0%, #34d399 100%);
    --g-warm:     linear-gradient(135deg, #10b981 0%, #059669 100%);
    --g-cool:     linear-gradient(135deg, #059669 0%, #047857 100%);
    --g-hero:     linear-gradient(160deg, #064e3b 0%, #047857 50%, #065f46 100%);
    --g-aurora:   linear-gradient(135deg, #047857 0%, #10b981 50%, #34d399 100%);
    --g-mint:     linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    --g-sunset:   linear-gradient(135deg, #f59e0b 0%, #10b981 100%);
    --g-mesh:     radial-gradient(at 20% 20%, #34d399 0%, transparent 50%),
                  radial-gradient(at 80% 0%, #6ee7b7 0%, transparent 50%),
                  radial-gradient(at 0% 100%, #f0abfc 0%, transparent 50%);

    /* ---- Shadows ---- */
    --sh-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
    --sh-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    --sh-md: 0 4px 8px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.06);
    --sh-lg: 0 10px 20px -3px rgba(15, 23, 42, 0.1), 0 4px 8px -4px rgba(15, 23, 42, 0.06);
    --sh-xl: 0 20px 30px -5px rgba(15, 23, 42, 0.12), 0 8px 12px -6px rgba(15, 23, 42, 0.08);
    --sh-2xl: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
    --sh-glow: 0 0 32px rgba(16, 185, 129, 0.28);
    --sh-glow-success: 0 0 32px rgba(16, 185, 129, 0.32);
    --sh-glow-warm: 0 0 32px rgba(245, 158, 11, 0.32);

    /* ---- Shape ---- */
    --r-xs: 6px; --r-sm: 10px; --r-md: 14px; --r-lg: 18px;
    --r-xl: 22px; --r-2xl: 28px; --r-3xl: 36px;
    --r-full: 9999px;

    /* ---- Space ---- */
    --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px;
    --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px; --s-12: 48px; --s-16: 64px;

    /* ---- Type ---- */
    --f-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --f-mono: 'JetBrains Mono', 'SF Mono', Monaco, 'Cascadia Code', monospace;

    /* ---- Motion ---- */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
    --d-fast: 150ms; --d-norm: 250ms; --d-slow: 400ms;

    /* ---- Layout ---- */
    --header-h: 68px;
    --nav-h: 76px;
    --sidebar-w: 264px;
    --max-w: 1280px;
    --gutter: 16px;

    /* =========================================================
       Aliases — keep inline `var(--color-primary-500)` & friends
       from rendering as the initial value. Mirrors the tokens
       above so JS templates work without changes.
       ========================================================= */
    --color-primary-50:  var(--c-p-50);
    --color-primary-100: var(--c-p-100);
    --color-primary-200: var(--c-p-200);
    --color-primary-300: var(--c-p-300);
    --color-primary-400: var(--c-p-400);
    --color-primary-500: var(--c-p-500);
    --color-primary-600: var(--c-p-600);
    --color-primary-700: var(--c-p-700);
    --color-primary-800: var(--c-p-800);
    --color-primary-900: var(--c-p-900);

    --color-violet-500:  var(--c-violet);
    --color-pink-500:    var(--c-pink);
    --color-success:     var(--c-success);
    --color-success-light: var(--c-success-l);
    --color-success-darker: var(--c-success-d);
    --color-warning:     var(--c-warning);
    --color-danger:      var(--c-danger);
    --color-info:        var(--c-info);
    --color-info-light:  var(--c-info-l);

    --text-primary:   var(--t-primary);
    --text-secondary: var(--t-secondary);
    --text-tertiary:  var(--t-tertiary);

    --border-light:   var(--b-light);
    --border-default: var(--b-default);

    --gradient-primary: var(--g-primary);
    --gradient-aurora:  var(--g-aurora);
    --gradient-mint:    var(--g-mint);
    --gradient-sunset:  var(--g-sunset);
    --gradient-hero:    var(--g-hero);

    --shadow-xs: var(--sh-xs);
    --shadow-sm: var(--sh-sm);
    --shadow-md: var(--sh-md);
    --shadow-lg: var(--sh-lg);
    --shadow-xl: var(--sh-xl);
    --shadow-2xl: var(--sh-2xl);
    --shadow-glow: var(--sh-glow);

    --font-mono: var(--f-mono);

    color-scheme: light;
}

/* =====================================================
   DARK MODE — hue stays consistent, surfaces tuned for OLED
   ===================================================== */
[data-theme="dark"] {
    --c-p-50:  #022c22;  --c-p-100: #064e3b;  --c-p-200: #065f46;
    --c-p-300: #047857;  --c-p-400: #059669;  --c-p-500: #10b981;
    --c-p-600: #34d399;  --c-p-700: #6ee7b7;  --c-p-800: #a7f3d0;
    --c-p-900: #d1fae5;  --c-p-950: #ecfdf5;

    --c-violet:   #cbd5e1;  --c-violet-d: #94a3b8;
    --c-fuchsia:  #e2e8f0;  --c-pink:     #f1f5f9;
    --c-cyan:     #94a3b8;  --c-cyan-d:   #64748b;

    --c-success:    #34d399;  --c-success-l: rgba(16, 185, 129, 0.16);  --c-success-d: #6ee7b7;
    --c-warning:    #fbbf24;  --c-warning-l: rgba(245, 158, 11, 0.16);  --c-warning-d: #fcd34d;
    --c-danger:     #f87171;  --c-danger-l:  rgba(239, 68, 68, 0.16);   --c-danger-d:  #fca5a5;
    --c-info:       #10b981;  --c-info-l:    rgba(16, 185, 129, 0.16);  --c-info-d:    #34d399;

    --bg-app:      #0a0d1a;
    --bg-muted:    #161a2a;
    --bg-surface:  #161b2d;
    --bg-elevated: #1f2540;
    --bg-overlay:  rgba(0, 0, 0, 0.7);

    --t-primary:   #f1f5f9;
    --t-secondary: #cbd5e1;
    --t-tertiary:  #94a3b8;
    --t-inverse:   #0f172a;

    --b-light:    #2a3047;
    --b-default:  #3a4061;
    --b-strong:   #5b6385;

    --g-primary: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    --g-hero:    linear-gradient(160deg, #022c22 0%, #064e3b 50%, #065f46 100%);
    --g-aurora:  linear-gradient(135deg, #047857 0%, #10b981 50%, #34d399 100%);
    --g-mint:    linear-gradient(135deg, #10b981 0%, #5eead4 100%);
    --g-sunset:  linear-gradient(135deg, #fb923c 0%, #34d399 100%);

    --sh-xs: 0 1px 2px rgba(0, 0, 0, 0.25);
    --sh-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --sh-md: 0 4px 8px -1px rgba(0, 0, 0, 0.45);
    --sh-lg: 0 10px 20px -3px rgba(0, 0, 0, 0.5);
    --sh-xl: 0 20px 30px -5px rgba(0, 0, 0, 0.55);
    --sh-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    --sh-glow: 0 0 36px rgba(52, 211, 153, 0.4);

    color-scheme: dark;
}

/* =====================================================
   Base
   ===================================================== */
html, body { height: 100%; }
body {
    font-family: var(--f-sans);
    background:
      radial-gradient(1200px 600px at 0% -10%, color-mix(in srgb, var(--c-p-500) 8%, transparent) 0%, transparent 50%),
      radial-gradient(800px 600px at 100% 0%, color-mix(in srgb, var(--c-fuchsia) 6%, transparent) 0%, transparent 50%),
      var(--bg-app);
    background-attachment: fixed;
    color: var(--t-primary);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    transition: background var(--d-norm) var(--ease-out), color var(--d-norm) var(--ease-out);
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; padding: 0; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
hr { border: 0; border-top: 1px solid var(--b-light); margin: var(--s-4) 0; }
code, pre { font-family: var(--f-mono); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--t-tertiary) 50%, transparent);
    border-radius: var(--r-full);
    border: 2px solid var(--bg-app);
}
::-webkit-scrollbar-thumb:hover { background: var(--t-tertiary); }

::selection { background: var(--c-p-200); color: var(--c-p-900); }
[data-theme="dark"] ::selection { background: var(--c-p-600); color: var(--c-p-100); }

/* =====================================================
   Layout
   ===================================================== */
.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--header-h);
    background: color-mix(in srgb, var(--bg-app) 78%, transparent);
    backdrop-filter: saturate(180%) blur(24px);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    border-bottom: 1px solid color-mix(in srgb, var(--b-light) 70%, transparent);
}
.app-header::after {
    content: '';
    position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--c-p-500) 25%, transparent), transparent);
    opacity: 0.5;
    pointer-events: none;
}
.app-header-inner {
    height: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 var(--gutter);
    display: flex;
    align-items: center;
    gap: var(--s-4);
}

.app-main {
    flex: 1;
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: var(--s-5) var(--gutter) calc(var(--nav-h) + var(--s-8));
}
@media (min-width: 640px) {
    .app-main { padding: var(--s-6) var(--s-5) var(--s-8); }
}
@media (min-width: 1024px) {
    .app-main { padding: var(--s-8) var(--s-6); }
}

/* =====================================================
   Brand / Logo
   ===================================================== */
.brand { display: flex; align-items: center; gap: var(--s-3); cursor: pointer; user-select: none; }
.brand-mark {
    width: 36px; height: 36px;
    background: var(--g-primary);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: white;
    box-shadow:
        0 4px 10px -2px rgba(16, 185, 129, 0.35),
        inset 0 1px 0 rgba(255,255,255,0.25);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}
.brand-mark::after {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(circle at 30% 0%, rgba(255,255,255,0.3), transparent 60%);
    pointer-events: none;
}
.brand-mark svg { width: 20px; height: 20px; position: relative; z-index: 1; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text .name { font-weight: 800; font-size: 1.08rem; letter-spacing: -0.025em; }
.brand-text .role { font-size: 0.66rem; color: var(--t-tertiary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; margin-top: 2px; }

/* =====================================================
   Buttons
   ===================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--s-2);
    height: 42px;
    padding: 0 var(--s-5);
    border-radius: var(--r-md);
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: -0.005em;
    transition: transform var(--d-fast) var(--ease-out), box-shadow var(--d-fast) var(--ease-out), background var(--d-fast) var(--ease-out), border-color var(--d-fast) var(--ease-out), color var(--d-fast) var(--ease-out);
    white-space: nowrap;
    user-select: none;
    border: 1px solid transparent;
    flex-shrink: 0;
    position: relative;
}
.btn:focus-visible { outline: 2px solid var(--c-p-500); outline-offset: 2px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.btn-primary {
    background: var(--g-primary);
    color: white;
    box-shadow: 0 4px 14px color-mix(in srgb, var(--c-p-500) 30%, transparent), inset 0 1px 0 rgba(255,255,255,0.18);
}
.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px color-mix(in srgb, var(--c-p-500) 40%, transparent), inset 0 1px 0 rgba(255,255,255,0.22);
}
.btn-primary:active:not(:disabled) { transform: translateY(0); box-shadow: 0 2px 6px color-mix(in srgb, var(--c-p-500) 25%, transparent), inset 0 1px 0 rgba(255,255,255,0.18); }

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--t-primary);
    border-color: var(--b-light);
    box-shadow: var(--sh-xs);
}
.btn-secondary:hover:not(:disabled) { border-color: var(--b-default); background: color-mix(in srgb, var(--bg-elevated) 70%, var(--bg-muted)); }

.btn-ghost { background: transparent; color: var(--t-secondary); }
.btn-ghost:hover:not(:disabled) { background: var(--bg-muted); color: var(--t-primary); }

.btn-danger { background: var(--c-danger); color: white; box-shadow: 0 4px 14px color-mix(in srgb, var(--c-danger) 30%, transparent); }
.btn-danger:hover:not(:disabled) { background: var(--c-danger-d); transform: translateY(-1px); }
.btn-success { background: var(--c-success); color: white; box-shadow: 0 4px 14px color-mix(in srgb, var(--c-success) 30%, transparent); }
.btn-success:hover:not(:disabled) { background: var(--c-success-d); transform: translateY(-1px); }
.btn-whatsapp { background: #25D366; color: white; box-shadow: 0 4px 14px rgba(37, 211, 102, 0.32); }
.btn-whatsapp:hover:not(:disabled) { background: #1ebd5a; transform: translateY(-1px); box-shadow: 0 8px 22px rgba(37, 211, 102, 0.4); }
.btn-info { background: var(--c-info); color: white; box-shadow: 0 4px 14px color-mix(in srgb, var(--c-info) 30%, transparent); }
.btn-info:hover:not(:disabled) { background: var(--c-info-d); transform: translateY(-1px); }

.btn-sm { height: 34px; padding: 0 var(--s-3); font-size: 0.8rem; border-radius: var(--r-sm); }
.btn-xs { height: 28px; padding: 0 var(--s-2); font-size: 0.72rem; border-radius: var(--r-sm); gap: 4px; }
.btn-xs svg { width: 14px; height: 14px; }
.btn-lg { height: 52px; padding: 0 var(--s-6); font-size: 0.95rem; border-radius: var(--r-md); }
.btn-block { width: 100%; }
.btn-icon { width: 44px; padding: 0; }
.btn-icon.btn-sm { width: 38px; }
.btn-icon.btn-xs { width: 32px; }

/* =====================================================
   Forms
   ===================================================== */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--t-secondary);
}
.input, .select, .textarea {
    width: 100%;
    height: 44px;
    padding: 0 var(--s-4);
    background: var(--bg-elevated);
    border: 1.5px solid var(--b-light);
    border-radius: var(--r-md);
    font-size: 0.9rem;
    color: var(--t-primary);
    transition: all var(--d-fast) var(--ease-out);
    -webkit-appearance: none;
    appearance: none;
}
.textarea { height: auto; padding: 12px var(--s-4); min-height: 88px; resize: vertical; line-height: 1.5; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--b-default); }
.input:focus, .select:focus, .textarea:focus {
    outline: none;
    border-color: var(--c-p-500);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-p-500) 14%, transparent);
    background: var(--bg-elevated);
}
[data-theme="dark"] .input:focus, [data-theme="dark"] .select:focus, [data-theme="dark"] .textarea:focus {
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-p-500) 24%, transparent);
}
.input::placeholder, .textarea::placeholder { color: var(--t-tertiary); }
.input-lg { height: 54px; font-size: 1rem; padding: 0 18px; border-radius: var(--r-md); }

.select {
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px;
    padding-right: 38px;
}
[data-theme="dark"] .select {
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%23cbd5e1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
}

.input-icon { position: relative; }
.input-icon .icon {
    position: absolute; left: 14px; top: 50%;
    transform: translateY(-50%);
    color: var(--t-tertiary);
    pointer-events: none;
    width: 18px; height: 18px;
    z-index: 1;
}
.input-icon .input { padding-left: 44px; }
.input-icon .trailing {
    position: absolute; right: 8px; top: 50%;
    transform: translateY(-50%);
}

.checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 20px; height: 20px;
    border: 1.5px solid var(--b-default);
    border-radius: 6px;
    background: var(--bg-elevated);
    position: relative;
    cursor: pointer;
    transition: all var(--d-fast);
    flex-shrink: 0;
}
.checkbox:hover { border-color: var(--c-p-500); }
.checkbox:checked {
    background: var(--c-p-500);
    border-color: var(--c-p-500);
}
.checkbox:checked::after {
    content: '';
    position: absolute;
    left: 5px; top: 1px;
    width: 6px; height: 11px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.checkbox-row {
    display: flex; align-items: center; gap: var(--s-2);
    cursor: pointer; user-select: none;
}

/* =====================================================
   Cards
   ===================================================== */
.card {
    background: var(--bg-surface);
    border: 1px solid color-mix(in srgb, var(--b-light) 80%, transparent);
    border-radius: var(--r-xl);
    box-shadow: var(--sh-sm);
    overflow: hidden;
    transition: border-color var(--d-fast), box-shadow var(--d-fast), transform var(--d-fast) var(--ease-out);
    position: relative;
}
.card-pad { padding: var(--s-5); }
.card-pad-lg { padding: var(--s-6); }
@media (min-width: 640px) {
    .card-pad { padding: var(--s-6); }
}
.card-header {
    padding: var(--s-4) var(--s-5);
    border-bottom: 1px solid var(--b-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--s-3);
    flex-wrap: wrap;
}
.card-header h3, .card-header h2 { font-size: 1rem; font-weight: 700; color: var(--t-primary); letter-spacing: -0.01em; }
.card-body { padding: var(--s-5); }

.card-elevated { cursor: default; }
.card-elevated:hover {
    transform: translateY(-2px);
    box-shadow: var(--sh-lg);
    border-color: color-mix(in srgb, var(--c-p-500) 30%, var(--b-light));
}
[data-theme="dark"] .card-elevated:hover {
    border-color: color-mix(in srgb, var(--c-p-500) 35%, var(--b-light));
}

/* =====================================================
   Stats
   ===================================================== */
.stat {
    background: var(--bg-surface);
    border: 1px solid color-mix(in srgb, var(--b-light) 80%, transparent);
    border-radius: var(--r-xl);
    padding: var(--s-5);
    display: flex;
    gap: var(--s-4);
    align-items: center;
    box-shadow: var(--sh-sm);
    transition: all var(--d-norm) var(--ease-out);
    position: relative;
    overflow: hidden;
}
.stat::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 3px;
    background: var(--g-primary);
    opacity: 0;
    transition: opacity var(--d-fast);
}
.stat:hover {
    transform: translateY(-2px);
    box-shadow: var(--sh-md);
    border-color: color-mix(in srgb, var(--c-p-500) 25%, var(--b-light));
}
.stat:hover::before { opacity: 1; }
.stat-icon {
    width: 52px; height: 52px;
    border-radius: var(--r-md);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.18);
}
.stat-icon svg { width: 24px; height: 24px; }
.stat-icon.indigo  { background: color-mix(in srgb, var(--c-p-500) 12%, transparent);  color: var(--c-p-600); }
[data-theme="dark"] .stat-icon.indigo  { background: color-mix(in srgb, var(--c-p-500) 22%, transparent);  color: var(--c-p-400); }
.stat-icon.amber   { background: color-mix(in srgb, var(--c-warning) 12%, transparent); color: var(--c-warning); }
[data-theme="dark"] .stat-icon.amber   { background: color-mix(in srgb, var(--c-warning) 22%, transparent); color: var(--c-warning); }
.stat-icon.emerald { background: color-mix(in srgb, var(--c-success) 12%, transparent); color: var(--c-success); }
[data-theme="dark"] .stat-icon.emerald { background: color-mix(in srgb, var(--c-success) 22%, transparent); color: var(--c-success); }
.stat-icon.violet  { background: color-mix(in srgb, var(--c-violet) 12%, transparent);  color: var(--c-violet); }
[data-theme="dark"] .stat-icon.violet  { background: color-mix(in srgb, var(--c-violet) 22%, transparent);  color: var(--c-violet); }
.stat-icon.cyan    { background: color-mix(in srgb, var(--c-info) 12%, transparent);    color: var(--c-info); }
[data-theme="dark"] .stat-icon.cyan    { background: color-mix(in srgb, var(--c-info) 22%, transparent);    color: var(--c-info); }
.stat-icon.rose    { background: color-mix(in srgb, var(--c-danger) 12%, transparent);  color: var(--c-danger); }
[data-theme="dark"] .stat-icon.rose    { background: color-mix(in srgb, var(--c-danger) 22%, transparent);  color: var(--c-danger); }
.stat-content { flex: 1; min-width: 0; }
.stat-label { font-size: 0.7rem; color: var(--t-tertiary); font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; }
.stat-value { font-size: 1.6rem; font-weight: 800; color: var(--t-primary); margin-top: 4px; letter-spacing: -0.025em; line-height: 1.05; font-feature-settings: 'tnum' on; }
@media (min-width: 640px) { .stat-value { font-size: 1.9rem; } }
.stat-trend { font-size: 0.74rem; font-weight: 600; margin-top: 4px; display: inline-flex; align-items: center; gap: 4px; }
.stat-trend.up   { color: var(--c-success); }
.stat-trend.down { color: var(--c-danger); }

/* =====================================================
   Badges & Chips
   ===================================================== */
.badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px; border-radius: var(--r-full);
    font-size: 0.68rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
    white-space: nowrap;
    border: 1px solid transparent;
}
.badge svg { width: 12px; height: 12px; }
.badge::before {
    content: ''; width: 6px; height: 6px; border-radius: 50%;
    background: currentColor; flex-shrink: 0;
    box-shadow: 0 0 8px currentColor;
}
.badge-received, .badge-new {
    background: color-mix(in srgb, var(--c-warning) 14%, transparent);
    color: var(--c-warning-d);
}
.badge-notified {
    background: color-mix(in srgb, var(--c-violet) 14%, transparent);
    color: var(--c-violet-d);
}
.badge-picked, .badge-completed {
    background: color-mix(in srgb, var(--c-success) 14%, transparent);
    color: var(--c-success-d);
}
.badge-archived {
    background: var(--bg-muted);
    color: var(--t-tertiary);
}
.badge-warning {
    background: color-mix(in srgb, var(--c-p-700) 14%, white);
    color: var(--c-p-800);
    border: 1px solid color-mix(in srgb, var(--c-p-500) 40%, white);
}
.stat-card {
    background: var(--bg-surface);
    border: 1px solid color-mix(in srgb, var(--b-light) 80%, transparent);
    border-radius: var(--r-lg);
    padding: var(--s-4);
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: var(--sh-xs);
    transition: all var(--d-fast);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--sh-sm); }
.stat-card .stat-value { font-size: 1.6rem; }
.badge-fragile {
    background: color-mix(in srgb, var(--c-danger) 14%, transparent);
    color: var(--c-danger-d);
}
.badge-info {
    background: color-mix(in srgb, var(--c-info) 14%, transparent);
    color: var(--c-info-d);
}
[data-theme="dark"] .badge-received,
[data-theme="dark"] .badge-new {
    background: color-mix(in srgb, var(--c-warning) 22%, transparent);
    color: var(--c-warning);
}
[data-theme="dark"] .badge-notified {
    background: color-mix(in srgb, var(--c-violet) 22%, transparent);
    color: var(--c-violet);
}
[data-theme="dark"] .badge-picked,
[data-theme="dark"] .badge-completed {
    background: color-mix(in srgb, var(--c-success) 22%, transparent);
    color: var(--c-success);
}
[data-theme="dark"] .badge-archived {
    background: var(--bg-muted);
    color: var(--t-tertiary);
}
.badge-warning {
    background: color-mix(in srgb, var(--c-p-700) 14%, white);
    color: var(--c-p-800);
    border: 1px solid color-mix(in srgb, var(--c-p-500) 40%, white);
}
.stat-card {
    background: var(--bg-surface);
    border: 1px solid color-mix(in srgb, var(--b-light) 80%, transparent);
    border-radius: var(--r-lg);
    padding: var(--s-4);
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: var(--sh-xs);
    transition: all var(--d-fast);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--sh-sm); }
.stat-card .stat-value { font-size: 1.6rem; }
[data-theme="dark"] .badge-fragile {
    background: color-mix(in srgb, var(--c-danger) 22%, transparent);
    color: var(--c-danger);
}
[data-theme="dark"] .badge-info {
    background: color-mix(in srgb, var(--c-info) 22%, transparent);
    color: var(--c-info);
}

.chip {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 11px; border-radius: var(--r-full);
    font-size: 0.78rem; font-weight: 600;
    background: var(--bg-muted);
    color: var(--t-secondary);
    border: 1px solid var(--b-light);
}
.chip-primary {
    background: color-mix(in srgb, var(--c-p-500) 12%, transparent);
    color: var(--c-p-700);
    border-color: color-mix(in srgb, var(--c-p-500) 22%, transparent);
}
[data-theme="dark"] .chip-primary {
    background: color-mix(in srgb, var(--c-p-500) 22%, transparent);
    color: var(--c-p-300);
    border-color: color-mix(in srgb, var(--c-p-500) 30%, transparent);
}

.courier-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px; border-radius: var(--r-full);
    font-size: 0.74rem; font-weight: 700;
}
.courier-chip .dot { width: 6px; height: 6px; border-radius: 50%; }

/* =====================================================
   Unit Status Pills (AKTIF / DIAMBIL)
   ===================================================== */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 1.5px solid transparent;
    transition: all var(--d-fast);
}
.status-pill::before {
    content: '';
    display: inline-block;
    width: 7px; height: 7px; border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.6);
}
.status-pill.status-aktif {
    background: color-mix(in srgb, var(--c-warning) 14%, white);
    color: #b45309;
    border-color: color-mix(in srgb, var(--c-warning) 35%, white);
}
.status-pill.status-aktif::before {
    background: var(--c-warning);
    animation: pulse-dot 1.6s ease-in-out infinite;
}
.status-pill.status-diambil {
    background: var(--c-p-100);
    color: var(--c-p-800);
    border-color: color-mix(in srgb, var(--c-p-500) 35%, white);
}
.status-pill.status-diambil::before {
    background: var(--c-p-600);
}
@keyframes pulse-dot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.55; }
}

/* =====================================================
   Unit Stat Cards (AKTIF / DIAMBIL hero stats)
   ===================================================== */
.unit-stat {
    display: flex; align-items: center; gap: 14px;
    padding: 16px 18px;
    border-radius: var(--r-lg);
    background: var(--bg-surface);
    border: 1.5px solid color-mix(in srgb, var(--b-light) 60%, transparent);
    box-shadow: var(--sh-xs);
    cursor: pointer;
    transition: all var(--d-norm);
    text-align: left;
}
.unit-stat:hover {
    transform: translateY(-2px);
    box-shadow: var(--sh-sm);
}
.unit-stat-aktif .unit-stat-icon {
    background: linear-gradient(135deg, var(--c-warning), #d97706);
}
.unit-stat-diambil .unit-stat-icon {
    background: linear-gradient(135deg, var(--c-p-500), var(--c-p-700));
}
.unit-stat.is-active {
    border-color: currentColor;
    box-shadow: 0 8px 24px color-mix(in srgb, currentColor 18%, transparent);
}
.unit-stat-aktif.is-active {
    border-color: var(--c-warning);
    background: linear-gradient(135deg, color-mix(in srgb, var(--c-warning) 8%, var(--bg-surface)), var(--bg-surface));
}
.unit-stat-diambil.is-active {
    border-color: var(--c-p-500);
    background: linear-gradient(135deg, color-mix(in srgb, var(--c-p-500) 6%, var(--bg-surface)), var(--bg-surface));
}
.unit-stat-icon {
    width: 52px; height: 52px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(0,0,0,0.10), inset 0 1px 0 rgba(255,255,255,0.18);
}
.unit-stat-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.unit-stat-label {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: var(--t-tertiary);
}
.unit-stat-aktif .unit-stat-label { color: var(--c-warning); }
.unit-stat-diambil .unit-stat-label { color: var(--c-p-700); }
.unit-stat-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    color: var(--t-primary);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}
.unit-stat-sub {
    font-size: 0.72rem;
    color: var(--t-tertiary);
    font-weight: 500;
}
/* =====================================================
   Reception Entry Flow — 4-step wizard
   ===================================================== */
.stepper-mini {
    display: flex; align-items: center; justify-content: center;
    gap: 4px; padding: 8px 4px; max-width: 760px; margin: 0 auto;
}
.stepper-dot {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--bg-muted);
    color: var(--t-tertiary);
    font-size: 0.74rem; font-weight: 700;
    transition: all var(--d-norm);
    border: 1.5px solid transparent;
}
.stepper-dot .n {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--b-light);
    color: var(--t-tertiary);
    font-size: 0.72rem; font-weight: 800;
    flex-shrink: 0;
}
.stepper-dot .l { letter-spacing: 0.03em; }
.stepper-dot.active {
    background: var(--c-p-50);
    color: var(--c-p-700);
    border-color: color-mix(in srgb, var(--c-p-500) 35%, transparent);
}
.stepper-dot.active .n {
    background: var(--c-p-500);
    color: white;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-p-500) 18%, transparent);
}
.stepper-dot.done {
    background: color-mix(in srgb, var(--c-p-500) 12%, white);
    color: var(--c-p-700);
}
.stepper-dot.done .n {
    background: var(--c-p-600); color: white;
}
.stepper-line {
    flex: 0 1 28px; height: 2px;
    background: var(--b-light);
    border-radius: 2px;
}

.rxn-step {
    background: var(--bg-surface);
    border: 1px solid color-mix(in srgb, var(--b-light) 60%, transparent);
    border-radius: var(--r-lg);
    padding: 22px;
    box-shadow: var(--sh-xs);
    margin-bottom: 16px;
}
.rxn-step-head {
    display: flex; align-items: flex-start; gap: 14px;
    margin-bottom: 18px;
}
.rxn-step-n {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--c-p-500), var(--c-p-700));
    color: white; font-weight: 800; font-size: 0.95rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--c-p-500) 25%, transparent);
}
.rxn-step-title {
    font-size: 1.05rem; font-weight: 800; color: var(--t-primary);
    letter-spacing: -0.01em; line-height: 1.2;
}
.rxn-step-sub {
    font-size: 0.82rem; color: var(--t-tertiary); margin-top: 3px;
    font-weight: 500;
}
.rxn-step-body { display: flex; flex-direction: column; gap: 14px; }
.rxn-step-footer {
    display: flex; gap: 10px; margin-top: 18px;
    padding-top: 16px; border-top: 1px dashed var(--b-light);
}
.rxn-step-tools {
    display: flex; justify-content: flex-end; padding-top: 2px;
}

.rxn-chip-grid {
    display: flex; flex-wrap: wrap; gap: 10px;
}
.rxn-chip {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 16px;
    border-radius: 14px;
    background: var(--bg-muted);
    border: 1.5px solid color-mix(in srgb, var(--b-light) 70%, transparent);
    color: var(--t-primary);
    font-weight: 600; font-size: 0.88rem;
    cursor: pointer;
    transition: all var(--d-fast);
    min-height: 44px;
}
.rxn-chip:hover {
    background: color-mix(in srgb, var(--c-p-500) 6%, var(--bg-muted));
    border-color: color-mix(in srgb, var(--c-p-500) 30%, transparent);
    transform: translateY(-1px);
}
.rxn-chip.selected {
    background: var(--c-p-500);
    color: white;
    border-color: var(--c-p-600);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--c-p-500) 28%, transparent);
}
.rxn-chip-emoji { font-size: 1.05rem; }
.rxn-chip-dot {
    width: 10px; height: 10px; border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.4);
}
.rxn-chip-courier {
    background: var(--bg-surface);
}
.rxn-chip-courier.selected { background: var(--c-p-500); }

.rxn-mini-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px;
    background: transparent;
    border: 1px dashed var(--b-default);
    border-radius: 10px;
    color: var(--t-secondary);
    font-size: 0.78rem; font-weight: 600;
    cursor: pointer;
    transition: all var(--d-fast);
}
.rxn-mini-btn:hover {
    background: var(--bg-muted);
    color: var(--c-p-700);
    border-color: var(--c-p-500);
}

.rxn-unit-results {
    display: flex; flex-direction: column; gap: 8px;
    margin-top: -2px;
}
.rxn-results-label {
    font-size: 0.72rem; color: var(--t-tertiary);
    text-transform: uppercase; letter-spacing: 0.07em; font-weight: 700;
    padding: 0 2px;
}
.rxn-result-row {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--bg-surface);
    border: 1.5px solid color-mix(in srgb, var(--b-light) 60%, transparent);
    cursor: pointer;
    transition: all var(--d-fast);
}
.rxn-result-row:hover {
    background: color-mix(in srgb, var(--c-p-500) 6%, var(--bg-surface));
    border-color: color-mix(in srgb, var(--c-p-500) 40%, transparent);
    transform: translateX(2px);
}
.rxn-result-row.selected {
    background: var(--c-p-50);
    border-color: var(--c-p-500);
    box-shadow: 0 4px 14px color-mix(in srgb, var(--c-p-500) 18%, transparent);
}
.rxn-result-icon {
    width: 40px; height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--c-p-100), var(--c-p-200));
    color: var(--c-p-800);
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.95rem;
    flex-shrink: 0;
}
.rxn-result-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.rxn-result-text .primary {
    font-weight: 700; color: var(--t-primary); font-size: 0.92rem;
}
.rxn-result-text .secondary {
    font-size: 0.76rem; color: var(--t-tertiary); font-weight: 500;
}
.rxn-results-empty {
    padding: 12px;
    text-align: center; font-size: 0.82rem; color: var(--t-tertiary);
    background: var(--bg-muted); border-radius: 10px;
}

.rxn-info-card {
    padding: 16px;
    background: linear-gradient(135deg, var(--c-p-50), color-mix(in srgb, var(--c-p-100) 70%, white));
    border: 1.5px solid color-mix(in srgb, var(--c-p-500) 25%, transparent);
    border-radius: 14px;
}
.rxn-info-row {
    display: flex; align-items: center; gap: 10px;
    padding: 5px 0;
    font-size: 0.88rem;
}
.rxn-info-row .k {
    color: var(--t-tertiary);
    font-weight: 600; font-size: 0.78rem;
    min-width: 90px;
}
.rxn-info-row .v {
    color: var(--t-primary);
    font-weight: 600;
}
.whatsapp-link {
    color: var(--c-success-d); font-weight: 700; text-decoration: none;
    display: inline-flex; align-items: center; gap: 4px;
}
.whatsapp-link:hover { text-decoration: underline; }

.rxn-new-form {
    padding: 16px;
    background: color-mix(in srgb, var(--c-p-50) 50%, var(--bg-surface));
    border: 1.5px dashed color-mix(in srgb, var(--c-p-500) 35%, transparent);
    border-radius: 14px;
    display: flex; flex-direction: column; gap: 12px;
}
.rxn-new-head {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 0.85rem; color: var(--c-p-800);
}

.rxn-photo-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 10px;
}
.rxn-photo-add {
    aspect-ratio: 1/1;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 4px;
    background: var(--bg-muted);
    border: 2px dashed var(--b-default);
    border-radius: 12px;
    color: var(--t-tertiary);
    cursor: pointer;
    font-size: 0.72rem; font-weight: 600;
    transition: all var(--d-fast);
}
.rxn-photo-add:hover {
    background: color-mix(in srgb, var(--c-p-500) 6%, var(--bg-muted));
    border-color: var(--c-p-500);
    color: var(--c-p-700);
}
.rxn-photo {
    position: relative;
    aspect-ratio: 1/1;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-muted);
    box-shadow: var(--sh-xs);
}
.rxn-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rxn-photo-del {
    position: absolute; top: 4px; right: 4px;
    width: 24px; height: 24px;
    border-radius: 50%;
    background: rgba(0,0,0,0.65); color: white;
    border: none;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: background var(--d-fast);
}
.rxn-photo-del:hover { background: var(--c-danger); }

.rxn-summary {
    background: var(--bg-muted);
    border-radius: 12px;
    padding: 12px 14px;
    margin-top: 6px;
}
.rxn-summary-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 4px 0;
    font-size: 0.85rem;
}
.rxn-summary-row .lbl {
    color: var(--t-tertiary); font-weight: 600; font-size: 0.78rem;
}
.rxn-summary-row .val {
    color: var(--t-primary); font-weight: 700;
}

@media (max-width: 640px) {
    .stepper-mini { gap: 2px; }
    .stepper-dot { padding: 6px 10px; font-size: 0.7rem; }
    .stepper-dot .l { display: none; }
    .stepper-line { flex-basis: 14px; }
    .rxn-step { padding: 18px; }
    .rxn-step-footer { flex-direction: column-reverse; }
    .rxn-step-footer .btn { width: 100%; }
}
@media (max-width: 480px) {
    .rxn-step-head { gap: 10px; }
    .rxn-step-n { width: 32px; height: 32px; font-size: 0.85rem; }
    .rxn-step-title { font-size: 0.95rem; }
}

.rxn-pkg-list {
    display: flex; flex-direction: column; gap: 8px;
}
.rxn-pkg-row {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--bg-surface);
    border: 1.5px solid color-mix(in srgb, var(--b-light) 60%, transparent);
    cursor: pointer;
    transition: all var(--d-fast);
}
.rxn-pkg-row:hover {
    background: color-mix(in srgb, var(--c-p-500) 5%, var(--bg-surface));
    border-color: color-mix(in srgb, var(--c-p-500) 35%, transparent);
}
.rxn-pkg-row:has(input:checked) {
    background: var(--c-p-50);
    border-color: var(--c-p-500);
    box-shadow: 0 2px 10px color-mix(in srgb, var(--c-p-500) 14%, transparent);
}
.rxn-pkg-row-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.rxn-pkg-row-top {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.92rem; color: var(--t-primary);
}
.rxn-pkg-row-top strong { font-weight: 700; letter-spacing: -0.01em; }
.rxn-pkg-row-bot {
    font-size: 0.78rem; color: var(--t-tertiary); font-weight: 500;
}
.rxn-pkg-row-bot em {
    color: var(--c-warning-d); font-style: normal; font-weight: 600;
}
/* =====================================================
   Tables
   ===================================================== */
/* =====================================================
   Tables
   ===================================================== */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.table th, .table td { padding: 14px var(--s-4); text-align: left; vertical-align: middle; }
.table th {
    font-size: 0.68rem; font-weight: 700;
    color: var(--t-tertiary);
    text-transform: uppercase; letter-spacing: 0.07em;
    background: var(--bg-muted);
    border-bottom: 1px solid var(--b-light);
    white-space: nowrap;
}
.table tbody tr {
    border-bottom: 1px solid color-mix(in srgb, var(--b-light) 60%, transparent);
    transition: background var(--d-fast);
}
.table tbody tr:hover { background: color-mix(in srgb, var(--c-p-500) 4%, transparent); }
.table tbody tr:last-child { border-bottom: none; }
.table .actions { display: flex; gap: 6px; justify-content: flex-end; }
.table .num { font-variant-numeric: tabular-nums; color: var(--t-tertiary); font-weight: 600; }
.table .whatsapp-link { color: var(--c-success-d); font-weight: 600; text-decoration: none; }
.table .whatsapp-link:hover { text-decoration: underline; }
.table-wrap .empty { padding: 36px 16px; }
@media (max-width: 640px) {
    .table th, .table td { padding: 10px var(--s-3); font-size: 0.78rem; }
}
@media (max-width: 480px) {
    .table th, .table td { padding: 8px 10px; font-size: 0.74rem; }
}

/* =====================================================
   Pagination
   ===================================================== */
.pagination {
    display: flex; flex-wrap: wrap;
    align-items: center; justify-content: space-between;
    gap: 12px; padding: 12px 4px;
}
.pagination-info { font-size: 0.78rem; color: var(--t-tertiary); font-weight: 500; }
.pagination-controls { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pagination-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 34px; height: 34px; padding: 0 10px;
    border-radius: var(--r-sm);
    background: var(--bg-surface);
    border: 1px solid color-mix(in srgb, var(--b-light) 80%, transparent);
    color: var(--t-secondary);
    font-weight: 600; font-size: 0.82rem;
    cursor: pointer;
    transition: all var(--d-fast);
}
.pagination-btn:hover:not(:disabled) {
    background: color-mix(in srgb, var(--c-p-500) 8%, transparent);
    border-color: var(--c-p-500);
    color: var(--c-p-700);
}
.pagination-btn.active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--c-p-500) 30%, transparent);
}
.pagination-btn:disabled { opacity: 0.4; cursor: not-allowed; }
@media (max-width: 640px) {
    .pagination {
        flex-direction: column;
        align-items: stretch;
    }
    .pagination-controls, .pagination-size { justify-content: center; }
    .pagination-info { text-align: center; }
    .pagination-btn { min-width: 30px; height: 30px; padding: 0 8px; font-size: 0.78rem; }
}
.pagination-ellipsis { padding: 0 4px; color: var(--t-tertiary); font-weight: 600; }
.pagination-size {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.78rem; color: var(--t-tertiary);
}
.pagination-size select { padding: 6px 28px 6px 10px; font-size: 0.82rem; }

/* =====================================================
   Toolbar (filter + actions row, used by table pages)
   ===================================================== */
.toolbar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
    padding: 14px;
    background: var(--bg-surface);
    border: 1px solid color-mix(in srgb, var(--b-light) 70%, transparent);
    border-radius: var(--r-lg);
    margin-bottom: 14px;
}
.toolbar > .grow { flex: 1; min-width: 200px; }
.toolbar .toolbar-label {
    font-size: 0.68rem; color: var(--t-tertiary);
    text-transform: uppercase; letter-spacing: 0.06em;
    font-weight: 700; margin-right: 4px;
}
@media (max-width: 640px) {
    .toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .toolbar > .grow { width: 100%; min-width: 0; }
    .toolbar > .select,
    .toolbar > .input,
    .toolbar > button { width: 100%; }
}

/* =====================================================
   Tabs
   ===================================================== */
.tabs {
    display: flex; gap: 4px;
    background: var(--bg-muted);
    padding: 4px;
    border-radius: var(--r-md);
    overflow-x: auto;
    scrollbar-width: none;
    border: 1px solid var(--b-light);
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
    padding: 9px 16px;
    border-radius: var(--r-sm);
    font-size: 0.85rem; font-weight: 600;
    color: var(--t-secondary);
    white-space: nowrap;
    transition: all var(--d-fast);
    flex-shrink: 0;
}
.tab:hover { color: var(--t-primary); }
.tab.active {
    background: var(--bg-elevated);
    color: var(--c-p-600);
    box-shadow: var(--sh-sm);
}
[data-theme="dark"] .tab.active { color: var(--c-p-400); }

.tab-underline {
    display: flex; gap: var(--s-2);
    border-bottom: 1.5px solid var(--b-light);
    overflow-x: auto;
    scrollbar-width: none;
}
.tab-underline::-webkit-scrollbar { display: none; }
.tab-underline .tab {
    border-radius: 0;
    padding: 12px 4px;
    margin-right: var(--s-4);
    border-bottom: 2px solid transparent;
    margin-bottom: -1.5px;
    background: transparent;
    box-shadow: none !important;
}
.tab-underline .tab.active {
    color: var(--c-p-600);
    border-bottom-color: var(--c-p-500);
    background: transparent;
}
[data-theme="dark"] .tab-underline .tab.active { color: var(--c-p-400); border-bottom-color: var(--c-p-500); }

/* =====================================================
   Modal
   ===================================================== */
.modal-backdrop {
    position: fixed; inset: 0; z-index: 100;
    background: var(--bg-overlay);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    padding: var(--s-4);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--d-norm) var(--ease-out);
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }
.modal {
    background: var(--bg-surface);
    border-radius: var(--r-2xl);
    box-shadow: var(--sh-2xl);
    max-width: 480px; width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex; flex-direction: column;
    transform: scale(0.95) translateY(10px);
    transition: transform var(--d-norm) var(--ease-spring);
    border: 1px solid var(--b-light);
}
.modal-backdrop.open .modal { transform: scale(1) translateY(0); }
.modal-lg { max-width: 640px; }
.modal-xl { max-width: 820px; }
.modal-header {
    padding: var(--s-5) var(--s-6);
    border-bottom: 1px solid var(--b-light);
    display: flex; justify-content: space-between; align-items: center;
    background: var(--bg-surface);
}
.modal-header h3 { font-size: 1.05rem; font-weight: 700; color: var(--t-primary); letter-spacing: -0.015em; }
.modal-body { padding: var(--s-6); overflow-y: auto; flex: 1; background: var(--bg-surface); }
.modal-footer {
    padding: var(--s-4) var(--s-6);
    border-top: 1px solid var(--b-light);
    display: flex; justify-content: flex-end; gap: var(--s-2);
    background: var(--bg-muted);
}
@media (max-width: 640px) {
    .modal-backdrop { padding: var(--s-3); align-items: flex-end; }
    .modal { max-height: 95vh; border-radius: var(--r-2xl) var(--r-2xl) 0 0; }
    .modal-header, .modal-body, .modal-footer { padding-left: var(--s-4); padding-right: var(--s-4); }
}

/* =====================================================
   Drawer
   ===================================================== */
.drawer-backdrop {
    position: fixed; inset: 0; z-index: 90;
    background: var(--bg-overlay);
    backdrop-filter: blur(6px);
    opacity: 0; pointer-events: none;
    transition: opacity var(--d-norm);
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.drawer {
    position: fixed; z-index: 95;
    background: var(--bg-surface);
    transition: transform var(--d-norm) var(--ease-out);
    box-shadow: var(--sh-2xl);
    display: flex; flex-direction: column;
    border: 1px solid var(--b-light);
}
.drawer-left { top: 0; left: 0; bottom: 0; width: min(320px, 85vw); transform: translateX(-100%); }
.drawer-left.open { transform: translateX(0); }
.drawer-right { top: 0; right: 0; bottom: 0; width: min(420px, 100vw); transform: translateX(100%); }
.drawer-right.open { transform: translateX(0); }

/* =====================================================
   Toast
   ===================================================== */
.toast-stack {
    position: fixed; top: 80px; right: 20px; z-index: 200;
    display: flex; flex-direction: column; gap: 10px;
    max-width: 380px;
    pointer-events: none;
}
.toast {
    background: var(--bg-elevated);
    color: var(--t-primary);
    border-radius: var(--r-md);
    box-shadow: var(--sh-xl);
    padding: 14px var(--s-4);
    display: flex; align-items: center; gap: 12px;
    border: 1px solid var(--b-light);
    pointer-events: auto;
    transform: translateX(120%);
    transition: transform var(--d-norm) var(--ease-spring);
    min-width: 280px;
}
.toast.show { transform: translateX(0); }
.toast-icon {
    width: 32px; height: 32px;
    border-radius: var(--r-sm);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.toast-icon svg { width: 18px; height: 18px; }
.toast.success .toast-icon { background: color-mix(in srgb, var(--c-success) 16%, transparent); color: var(--c-success); }
.toast.error   .toast-icon { background: color-mix(in srgb, var(--c-danger) 16%, transparent);  color: var(--c-danger); }
.toast.warning .toast-icon { background: color-mix(in srgb, var(--c-warning) 16%, transparent); color: var(--c-warning); }
.toast.info    .toast-icon { background: color-mix(in srgb, var(--c-info) 16%, transparent);    color: var(--c-info); }
.toast-body { flex: 1; font-size: 0.875rem; font-weight: 500; min-width: 0; }
.toast-body .title { font-weight: 700; margin-bottom: 2px; color: var(--t-primary); }
.toast-body .desc { color: var(--t-secondary); font-weight: 400; font-size: 0.8rem; word-break: break-word; }
.toast-close { color: var(--t-tertiary); padding: 4px; flex-shrink: 0; }
.toast-close:hover { color: var(--t-primary); }

@media (max-width: 640px) {
    .toast-stack { top: 72px; right: 12px; left: 12px; max-width: none; }
    .toast { min-width: 0; }
}

/* =====================================================
   Bottom Nav (Mobile)
   ===================================================== */
.bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 40;
    background: color-mix(in srgb, var(--bg-app) 88%, transparent);
    backdrop-filter: saturate(180%) blur(28px);
    -webkit-backdrop-filter: saturate(180%) blur(28px);
    border-top: 1px solid color-mix(in srgb, var(--b-light) 60%, transparent);
    padding: 8px;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
}
.bottom-nav-inner {
    display: flex; gap: 6px;
    max-width: var(--max-w);
    margin: 0 auto;
    justify-content: space-around;
}
.bottom-nav-item {
    flex: 1;
    display: flex; flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 6px;
    min-height: 56px;
    border-radius: var(--r-md);
    color: var(--t-tertiary);
    transition: color var(--d-fast), background var(--d-fast);
    position: relative;
    font-size: 0.7rem;
    font-weight: 600;
}
.bottom-nav-item svg { width: 22px; height: 22px; }
.bottom-nav-item:hover { color: var(--t-secondary); }
.bottom-nav-item.active { color: var(--c-p-600); background: color-mix(in srgb, var(--c-p-500) 10%, transparent); }
[data-theme="dark"] .bottom-nav-item.active { color: var(--c-p-400); }
.bottom-nav-item.active::before {
    content: '';
    position: absolute; top: 0; left: 50%;
    transform: translateX(-50%);
    width: 28px; height: 3px;
    background: var(--g-primary);
    border-radius: 0 0 4px 4px;
}
.bottom-nav-fab { position: relative; margin-top: -22px; }
.bottom-nav-fab .fab-circle {
    width: 58px; height: 58px;
    border-radius: 50%;
    background: var(--g-primary);
    color: white;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--sh-glow), inset 0 2px 0 rgba(255,255,255,0.2);
    transition: all var(--d-fast);
    position: relative;
    overflow: hidden;
}
.bottom-nav-fab .fab-circle::after {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(circle at 30% 0%, rgba(255,255,255,0.35), transparent 60%);
    pointer-events: none;
}
.bottom-nav-fab:active .fab-circle { transform: scale(0.92); }
.bottom-nav-fab .fab-circle svg { width: 26px; height: 26px; position: relative; z-index: 1; }

@media (min-width: 1024px) { .bottom-nav { display: none; } }

/* =====================================================
   Sidebar — desktop always-visible, mobile drawer (burger)
   ===================================================== */
.sidebar-shell {
    position: fixed;
    inset: 0;
    z-index: 60;
    pointer-events: none;
}
@media (min-width: 1024px) {
    .sidebar-shell {
        position: static;
        inset: auto;
        pointer-events: auto;
    }
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: var(--bg-overlay);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity var(--d-norm);
    z-index: 55;
    pointer-events: none;
}
[data-theme="dark"] .sidebar-backdrop { background: rgba(0,0,0,0.7); }
.sidebar-shell.open .sidebar-backdrop { opacity: 1; pointer-events: auto; }
.sidebar-shell.open > .sidebar { pointer-events: auto; }
@media (min-width: 1024px) { .sidebar-backdrop { display: none; } }

.sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: var(--sidebar-w);
    max-width: 86vw;
    background: var(--bg-surface);
    border-right: 1px solid color-mix(in srgb, var(--b-light) 70%, transparent);
    z-index: 65;
    display: flex;
    flex-direction: column;
    padding: var(--s-5) var(--s-3);
    gap: var(--s-1);
    transform: translateX(-100%);
    transition: transform var(--d-norm) var(--ease-spring);
    will-change: transform;
}
@media (min-width: 1024px) {
    .sidebar {
        position: fixed;
        transform: none;
        z-index: 30;
        width: var(--sidebar-w);
        max-width: none;
    }
}
.sidebar-shell.open > .sidebar { transform: translateX(0); }

.sidebar-close {
    display: inline-flex;
    align-items: center; justify-content: center;
    width: 36px; height: 36px;
    border-radius: var(--r-sm);
    background: var(--bg-muted);
    color: var(--t-secondary);
    border: 1px solid var(--b-light);
}
.sidebar-close:hover { color: var(--t-primary); background: var(--bg-elevated); }
@media (min-width: 1024px) { .sidebar-close { display: none; } }

.sidebar-header {
    padding: var(--s-3) var(--s-3);
    display: flex; align-items: center; gap: var(--s-3);
    margin-bottom: var(--s-3);
}
.sidebar-nav { display: flex; flex-direction: column; gap: 3px; flex: 1; overflow-y: auto; padding-bottom: var(--s-4); padding-top: var(--s-2); }
.sidebar-section { padding: var(--s-4) var(--s-3) var(--s-1); font-size: 0.68rem; font-weight: 700; color: var(--t-tertiary); text-transform: uppercase; letter-spacing: 0.07em; }
.sidebar-link {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px;
    border-radius: var(--r-md);
    color: var(--t-secondary);
    font-weight: 500;
    font-size: 0.875rem;
    transition: all var(--d-fast);
    cursor: pointer;
    position: relative;
}
.sidebar-link:hover {
    background: color-mix(in srgb, var(--c-p-500) 6%, transparent);
    color: var(--t-primary);
}
.sidebar-link.active {
    background: var(--g-primary);
    color: white;
    box-shadow: 0 6px 18px color-mix(in srgb, var(--c-p-500) 35%, transparent);
}
.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: -3px; top: 50%; transform: translateY(-50%);
    width: 4px; height: 22px;
    background: white;
    border-radius: 0 3px 3px 0;
}
.sidebar-link svg { width: 20px; height: 20px; flex-shrink: 0; }
.sidebar-link .count {
    margin-left: auto;
    background: color-mix(in srgb, white 22%, transparent);
    color: inherit;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: var(--r-full);
    font-weight: 700;
    min-width: 22px;
    text-align: center;
}
.sidebar-link:not(.active) .count {
    background: color-mix(in srgb, var(--c-p-500) 12%, transparent);
    color: var(--c-p-700);
}
[data-theme="dark"] .sidebar-link:not(.active) .count {
    background: color-mix(in srgb, var(--c-p-500) 24%, transparent);
    color: var(--c-p-300);
}

/* Floating chat button (unit users only) */
.chat-fab {
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gradient-primary, linear-gradient(135deg, var(--c-p-500), var(--c-p-700)));
    color: white;
    border: none;
    box-shadow: 0 8px 24px color-mix(in srgb, var(--c-p-500) 35%, transparent),
                0 2px 6px rgba(0,0,0,0.12),
                inset 0 1px 0 rgba(255,255,255,0.2);
    cursor: pointer;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--d-fast), box-shadow var(--d-fast);
}
.chat-fab:hover { transform: translateY(-2px) scale(1.05); box-shadow: 0 12px 32px color-mix(in srgb, var(--c-p-500) 45%, transparent); }
.chat-fab:active { transform: translateY(0) scale(0.98); }
.chat-fab-icon { display:flex;align-items:center;justify-content:center; }
.chat-fab-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    background: var(--color-error, #ef4444);
    color: white;
    font-size: 0.7rem;
    font-weight: 800;
    border-radius: 999px;
    border: 2px solid var(--bg-elevated, white);
    display: flex;
    align-items: center;
    justify-content: center;
}
@media (max-width: 640px) {
    .chat-fab { right: 14px; bottom: 80px; } /* sits above bottom-nav on mobile */
}

/* Admin chat inbox */
.admin-conv-item:hover { background: var(--color-primary-50, var(--bg-muted)); }
.admin-conv-item.active { background: var(--color-primary-50); border-left: 3px solid var(--c-p-500); }

/* Collapsible sidebar group */
.sidebar-group { display: flex; flex-direction: column; gap: 2px; }
.sidebar-group-toggle {
    cursor: pointer;
    user-select: none;
    position: relative;
}
.sidebar-group-toggle .sidebar-group-chevron {
    margin-left: auto;
    transition: transform var(--d-fast);
    color: var(--t-tertiary);
    display: flex; align-items: center;
}
.sidebar-group.open > .sidebar-group-toggle .sidebar-group-chevron {
    transform: rotate(180deg);
}
.sidebar-group-toggle.active {
    background: var(--g-primary);
    color: white;
    box-shadow: 0 6px 18px color-mix(in srgb, var(--c-p-500) 35%, transparent);
}
.sidebar-group-toggle.active .sidebar-group-chevron { color: white; }
.sidebar-sub {
    display: none;
    flex-direction: column;
    gap: 2px;
    padding: 4px 0 4px 14px;
    margin-left: 10px;
    border-left: 1px solid var(--border-light);
}
.sidebar-group.open .sidebar-sub { display: flex; }
.sidebar-sub-link { padding: 8px 12px; font-size: 0.82rem; }
.sidebar-sub-link.active {
    background: color-mix(in srgb, var(--c-p-500) 12%, transparent);
    color: var(--c-p-700);
    box-shadow: none;
    font-weight: 600;
}
.sidebar-sub-link.active::before { display: none; }
[data-theme="dark"] .sidebar-sub-link.active {
    background: color-mix(in srgb, var(--c-p-500) 18%, transparent);
    color: var(--c-p-300);
}

.sidebar-footer {
    padding: var(--s-3);
    border-top: 1px solid var(--b-light);
    display: flex; align-items: center; gap: var(--s-3);
}
.sidebar-footer .avatar,
.sidebar-footer img.avatar-img {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--g-primary); color: white;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; flex-shrink: 0;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
    overflow: hidden;
    object-fit: cover;
}
.sidebar-footer img.avatar-img { background: var(--bg-muted); }

/* Burger button — visible only on small screens, only for admin */
.burger-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px;
    border-radius: var(--r-sm);
    background: transparent;
    color: var(--t-secondary);
    border: 1px solid transparent;
}
.burger-btn:hover { background: var(--bg-muted); color: var(--t-primary); }
@media (min-width: 1024px) { .burger-btn { display: none; } }

/* Sidebar visual treatment for portrait/tablet gap */
@media (max-width: 1023px) {
    .sidebar { padding-top: calc(var(--header-h) + var(--s-3)); }
    .sidebar-close { position: absolute; top: 14px; right: 14px; }
    .sidebar-header { padding-right: 50px; }
}

.with-sidebar .app-header { padding-left: var(--sidebar-w); }
.with-sidebar .app-main {
    margin-left: var(--sidebar-w);
    max-width: calc(var(--max-w) + var(--sidebar-w));
}
@media (max-width: 1023px) {
    .with-sidebar .app-header { padding-left: 0; }
    .with-sidebar .app-main { margin-left: 0; max-width: var(--max-w); }
}

/* When shell is open on mobile, lock body scroll & dim the rest */
body.sidebar-locked { overflow: hidden; }

/* =====================================================
   Hero / Banner
   ===================================================== */
.hero {
    background: var(--g-hero);
    color: white;
    border-radius: var(--r-2xl);
    padding: var(--s-6);
    box-shadow: var(--sh-lg);
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%; right: -10%;
    width: 60%; height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 60%);
    pointer-events: none;
}
.hero::after {
    content: '';
    position: absolute; left: -50px; top: -50px;
    width: 200px; height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.08), transparent 70%);
    pointer-events: none;
}
.hero-content { position: relative; z-index: 1; }
.hero h1 { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.025em; line-height: 1.15; }
@media (min-width: 640px) { .hero h1 { font-size: 1.75rem; } }
.hero p { opacity: 0.92; font-size: 0.9rem; margin-top: 8px; }

.hero-light {
    background: var(--g-primary);
    color: white;
    border-radius: var(--r-2xl);
    padding: var(--s-6);
    box-shadow: var(--sh-lg);
    position: relative;
    overflow: hidden;
}
.hero-light::before {
    content: '';
    position: absolute;
    top: -50%; right: -20%;
    width: 60%; height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.18) 0%, transparent 60%);
    pointer-events: none;
}
.hero-light::after {
    content: '';
    position: absolute; left: -30px; bottom: -80px;
    width: 240px; height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.1), transparent 70%);
    pointer-events: none;
}

.hero-aurora {
    background: var(--g-aurora);
}
.hero-mint {
    background: var(--g-mint);
}
.hero-sunset {
    background: var(--g-sunset);
}

/* =====================================================
   Auth screen (split on desktop, single on mobile)
   ===================================================== */
.auth-screen {
    min-height: 100vh;
    background: var(--bg-app);
    display: flex; align-items: center; justify-content: center;
    padding: var(--s-4);
    position: relative;
    overflow: hidden;
}
.auth-screen::before {
    content: '';
    position: absolute; inset: 0;
    background-image:
        radial-gradient(circle at 18% 25%, rgba(255, 255, 255, 0.18) 0%, transparent 45%),
        radial-gradient(circle at 82% 70%, rgba(255, 255, 255, 0.12) 0%, transparent 45%),
        radial-gradient(circle at 50% 110%, rgba(255,255,255,0.1), transparent 60%);
    pointer-events: none;
}
.auth-screen::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(45deg, rgba(255,255,255,0.03) 0 1px, transparent 1px 24px);
    pointer-events: none;
    mix-blend-mode: overlay;
}

.auth-shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-6);
    width: 100%;
    max-width: 1040px;
    align-items: stretch;
}
@media (min-width: 960px) {
    .auth-shell {
        grid-template-columns: 1.1fr 1fr;
        gap: var(--s-8);
    }
}

.auth-hero {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    color: white;
    padding: var(--s-7);
    background: var(--g-hero);
    border-radius: var(--r-2xl);
    box-shadow: 0 20px 60px -20px rgba(16, 185, 129, 0.35);
}
@media (min-width: 960px) {
    .auth-hero { display: flex; }
}
.auth-hero .badge-hero {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 14px;
    border-radius: var(--r-full);
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    color: white;
    font-size: 0.78rem; font-weight: 600;
    border: 1px solid rgba(255,255,255,0.2);
    width: fit-content;
}
.auth-hero h2 {
    font-size: 2.4rem; font-weight: 800;
    letter-spacing: -0.035em; line-height: 1.05;
    margin: var(--s-6) 0 var(--s-3);
}
.auth-hero p { opacity: 0.9; font-size: 0.95rem; line-height: 1.6; max-width: 380px; }
.auth-hero-features {
    display: grid;
    gap: var(--s-3);
    margin-top: var(--s-6);
}
.auth-hero-feature {
    display: flex; align-items: center; gap: 12px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 12px 14px;
    border-radius: var(--r-md);
    backdrop-filter: blur(10px);
}
.auth-hero-feature .ic {
    width: 36px; height: 36px;
    border-radius: var(--r-sm);
    background: rgba(255,255,255,0.18);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.auth-hero-feature .ic svg { width: 18px; height: 18px; }
.auth-hero-feature .t { font-weight: 600; font-size: 0.9rem; }
.auth-hero-feature .d { font-size: 0.78rem; opacity: 0.85; }
.auth-hero-stats {
    display: flex; gap: var(--s-6);
    margin-top: var(--s-6);
    padding-top: var(--s-6);
    border-top: 1px solid rgba(255,255,255,0.15);
}
.auth-hero-stats .num {
    font-size: 1.4rem; font-weight: 800; letter-spacing: -0.02em;
}
.auth-hero-stats .lbl {
    font-size: 0.72rem; opacity: 0.8; text-transform: uppercase; letter-spacing: 0.06em;
}

.auth-card {
    position: relative;
    background: var(--bg-surface);
    border: 1px solid var(--b-light);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--r-2xl);
    box-shadow: var(--sh-2xl);
    width: 100%;
    overflow: hidden;
    animation: authIn 0.5s var(--ease-out);
}
@keyframes authIn {
    from { opacity: 0; transform: translateY(20px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.auth-header {
    padding: 40px var(--s-6) 28px;
    text-align: center;
    border-bottom: 1px solid var(--b-light);
    margin-bottom: 24px;
}
.auth-logo {
    width: 64px; height: 64px;
    background: var(--g-primary);
    border-radius: 18px;
    margin: 0 auto 18px;
    display: flex; align-items: center; justify-content: center;
    color: white;
    box-shadow:
        0 6px 16px -4px rgba(16, 185, 129, 0.35),
        inset 0 1px 0 rgba(255,255,255,0.25);
    position: relative;
    overflow: hidden;
}
.auth-logo::after {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(circle at 30% 0%, rgba(255,255,255,0.35), transparent 60%);
    pointer-events: none;
}
.auth-logo svg { width: 40px; height: 40px; position: relative; z-index: 1; }
.auth-title { font-size: 1.5rem; font-weight: 800; color: var(--t-primary); letter-spacing: -0.025em; }
.auth-subtitle { color: var(--t-tertiary); font-size: 0.85rem; margin-top: 4px; }

.auth-tabs {
    display: flex;
    margin: 0 var(--s-6);
    background: var(--bg-muted);
    padding: 5px;
    border-radius: 12px;
    gap: 5px;
    border: 1px solid var(--b-light);
}
.auth-tab {
    flex: 1;
    padding: 10px 8px;
    border-radius: var(--r-sm);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--t-secondary);
    text-align: center;
    transition: all var(--d-fast);
    display: flex; flex-direction: column;
    align-items: center; gap: 4px;
}
.auth-tab svg { width: 18px; height: 18px; }
.auth-tab.active {
    background: var(--bg-elevated);
    color: var(--c-p-600);
    box-shadow: var(--sh-sm);
}
[data-theme="dark"] .auth-tab.active { color: var(--c-p-400); }

.auth-body { padding: var(--s-5) var(--s-6) var(--s-6); }
.auth-footer {
    text-align: center;
    padding: var(--s-4);
    background: var(--bg-muted);
    color: var(--t-tertiary);
    font-size: 0.78rem;
    border-top: 1px solid var(--b-light);
}

/* =====================================================
   Package Card
   ===================================================== */
.pkg-card {
    background: var(--bg-surface);
    border: 1px solid color-mix(in srgb, var(--b-light) 80%, transparent);
    border-radius: var(--r-xl);
    padding: var(--s-4);
    display: flex; flex-direction: column; gap: var(--s-3);
    transition: all var(--d-norm) var(--ease-out);
    position: relative;
    overflow: hidden;
}
@media (min-width: 640px) { .pkg-card { padding: var(--s-5); } }
.pkg-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--c-p-500);
    opacity: 0;
    transition: opacity var(--d-fast);
}
.pkg-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--sh-lg);
    border-color: color-mix(in srgb, var(--c-p-500) 25%, var(--b-light));
}
.pkg-card:hover::before { opacity: 1; }
[data-theme="dark"] .pkg-card:hover { border-color: color-mix(in srgb, var(--c-p-500) 35%, var(--b-light)); }

.pkg-card-received::before { background: var(--c-warning); opacity: 1; }
.pkg-card-notified::before { background: var(--c-violet); opacity: 1; }
.pkg-card-picked::before  { background: var(--c-success); opacity: 1; }

.pkg-card-head {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 10px;
}
.pkg-card-trx {
    font-weight: 800; font-size: 0.95rem;
    color: var(--t-primary); letter-spacing: -0.01em;
    word-break: break-all;
    line-height: 1.25;
}
.pkg-card-meta {
    font-size: 0.72rem; color: var(--t-tertiary); margin-top: 4px;
    display: inline-flex; align-items: center; gap: 4px;
}
.pkg-card-meta::before {
    content: ''; width: 4px; height: 4px; border-radius: 50%;
    background: var(--c-success);
}

.pkg-card-courier {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.78rem; font-weight: 700;
    color: var(--c-p-700);
    background: color-mix(in srgb, var(--c-p-500) 12%, transparent);
    padding: 5px 10px;
    border-radius: var(--r-full);
}
[data-theme="dark"] .pkg-card-courier {
    background: color-mix(in srgb, var(--c-p-500) 22%, transparent);
    color: var(--c-p-300);
}
.pkg-card-body { display: flex; gap: 12px; align-items: flex-start; }
.pkg-card-photos { display: flex; gap: 6px; flex-shrink: 0; }
.pkg-card-photo {
    width: 64px; height: 64px;
    border-radius: var(--r-md);
    background: var(--bg-muted);
    overflow: hidden;
    border: 1.5px solid var(--b-light);
    display: flex; align-items: center; justify-content: center;
    color: var(--t-tertiary);
    box-shadow: var(--sh-xs);
}
.pkg-card-photo img { width: 100%; height: 100%; object-fit: cover; }
.pkg-card-info {
    flex: 1; min-width: 0; font-size: 0.82rem;
    display: flex; flex-direction: column; gap: 3px;
}
.pkg-card-info .row { display: flex; gap: 6px; min-width: 0; }
.pkg-card-info .label { color: var(--t-tertiary); font-weight: 500; flex-shrink: 0; }
.pkg-card-info .value {
    color: var(--t-primary); font-weight: 600;
    word-break: break-word;
    overflow: hidden; text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1; min-width: 0;
}
.pkg-card-actions {
    display: flex; gap: 8px; flex-wrap: wrap;
    padding-top: var(--s-3);
    border-top: 1px solid var(--b-light);
    margin-top: auto;
}
.pkg-card-actions .btn { flex: 1 1 auto; min-width: 0; }

/* =====================================================
   Section header (page-level title)
   ===================================================== */
.section-title {
    display: flex; align-items: center; justify-content: space-between;
    gap: 14px;
    margin-bottom: var(--s-5);
    flex-wrap: wrap;
}
.section-title .txt { min-width: 0; }
.section-title h1 {
    font-size: 1.55rem; font-weight: 800;
    letter-spacing: -0.025em; line-height: 1.15;
}
.section-title .lede {
    font-size: 0.88rem; color: var(--t-tertiary);
    margin-top: 4px;
}

/* =====================================================
   Step Bar (for multi-step forms like reception/entry)
   ===================================================== */
.step-bar {
    display: flex;
    align-items: stretch;
    gap: 0;
    background: var(--bg-surface);
    border: 1px solid var(--b-light);
    border-radius: var(--r-xl);
    padding: var(--s-3);
    overflow-x: auto;
    scrollbar-width: none;
    box-shadow: var(--sh-xs);
}
.step-bar::-webkit-scrollbar { display: none; }
.step {
    flex: 1;
    min-width: 0;
    display: flex; align-items: center; gap: 10px;
    padding: var(--s-3) var(--s-3);
    border-radius: var(--r-md);
    color: var(--t-tertiary);
    transition: color var(--d-fast), background var(--d-fast);
    position: relative;
}
@media (max-width: 480px) {
    .step .label { display: none; }
    .step { justify-content: center; padding: var(--s-2); }
}
.step + .step::before {
    content: '';
    position: absolute;
    left: -8px; top: 50%; transform: translateY(-50%);
    width: 16px; height: 1.5px;
    background: var(--b-light);
}
.step .n {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--bg-muted);
    border: 1.5px solid var(--b-light);
    color: var(--t-tertiary);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.85rem;
    flex-shrink: 0;
    transition: all var(--d-fast);
}
.step .label {
    font-weight: 600; font-size: 0.85rem;
    white-space: nowrap;
}
.step.active { color: var(--t-primary); background: color-mix(in srgb, var(--c-p-500) 6%, transparent); }
.step.active .n {
    background: var(--g-primary);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--c-p-500) 40%, transparent);
}
.step.done .n {
    background: var(--c-success);
    border-color: transparent;
    color: white;
}
.step.done .label { color: var(--t-secondary); }
.step.done + .step::before { background: var(--c-success); }

/* =====================================================
   Empty State
   ===================================================== */
.empty {
    padding: var(--s-12) var(--s-6);
    text-align: center;
    color: var(--t-tertiary);
}
.empty-icon {
    width: 96px; height: 96px;
    margin: 0 auto var(--s-4);
    background: var(--bg-muted);
    border-radius: var(--r-2xl);
    display: flex; align-items: center; justify-content: center;
    color: var(--t-tertiary);
    border: 1px solid var(--b-light);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
    position: relative;
}
[data-theme="dark"] .empty-icon { box-shadow: inset 0 1px 0 rgba(255,255,255,0.06); }
.empty-icon svg { width: 44px; height: 44px; opacity: 0.85; }
.empty h3 { font-size: 1.05rem; font-weight: 700; color: var(--t-secondary); margin-bottom: 4px; letter-spacing: -0.01em; }
.empty p { font-size: 0.88rem; max-width: 360px; margin: 0 auto; }

/* =====================================================
   Loading
   ===================================================== */
.skeleton {
    background: linear-gradient(90deg, var(--bg-muted) 0%, color-mix(in srgb, var(--bg-elevated) 80%, var(--bg-surface)) 50%, var(--bg-muted) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s linear infinite;
    border-radius: var(--r-sm);
}
[data-theme="dark"] .skeleton {
    background: linear-gradient(90deg, var(--bg-muted) 0%, var(--bg-elevated) 50%, var(--bg-muted) 100%);
    background-size: 200% 100%;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.spinner {
    display: inline-block;
    width: 18px; height: 18px;
    border: 2.5px solid color-mix(in srgb, var(--b-light) 70%, transparent);
    border-top-color: var(--c-p-500);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
.spinner-lg { width: 32px; height: 32px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay {
    position: fixed; inset: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 200;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity var(--d-norm);
}
.loading-overlay.show { opacity: 1; pointer-events: auto; }

/* =====================================================
   Animations
   ===================================================== */
.fade-in { animation: fadeIn 0.3s var(--ease-out); }
.fade-up { animation: fadeUp 0.4s var(--ease-out); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.pulse { animation: pulse 2s infinite; }
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}
.shake { animation: shake 0.4s; }
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

/* =====================================================
   Utilities
   ===================================================== */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: var(--s-1); } .gap-2 { gap: var(--s-2); } .gap-3 { gap: var(--s-3); }
.gap-4 { gap: var(--s-4); } .gap-5 { gap: var(--s-5); }
.mt-1 { margin-top: var(--s-1); } .mt-2 { margin-top: var(--s-2); }
.mt-3 { margin-top: var(--s-3); } .mt-4 { margin-top: var(--s-4); } .mt-6 { margin-top: var(--s-6); }
.mb-1 { margin-bottom: var(--s-1); } .mb-2 { margin-bottom: var(--s-2); }
.mb-3 { margin-bottom: var(--s-3); } .mb-4 { margin-bottom: var(--s-4); } .mb-6 { margin-bottom: var(--s-6); }
.p-3 { padding: var(--s-3); } .p-4 { padding: var(--s-4); } .p-5 { padding: var(--s-5); } .p-6 { padding: var(--s-6); }
.text-xs { font-size: 0.72rem; } .text-sm { font-size: 0.85rem; } .text-base { font-size: 0.95rem; }
.text-lg { font-size: 1.1rem; } .text-xl { font-size: 1.25rem; } .text-2xl { font-size: 1.5rem; }
.font-bold { font-weight: 700; } .font-semibold { font-weight: 600; } .font-medium { font-weight: 500; }
.text-muted { color: var(--t-tertiary); }
.text-secondary { color: var(--t-secondary); }
.text-primary { color: var(--t-primary); }
.text-success { color: var(--c-success); }
.text-danger { color: var(--c-danger); }
.text-warning { color: var(--c-warning); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.uppercase { text-transform: uppercase; letter-spacing: 0.05em; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden { display: none !important; }
.hidden-mobile { display: none; }
@media (min-width: 1024px) {
    .hidden-mobile { display: block; }
    .hidden-desktop { display: none; }
}

.grid { display: grid; }
.grid-2 { grid-template-columns: 1fr; gap: var(--s-4); }
.grid-3 { grid-template-columns: 1fr; gap: var(--s-4); }
.grid-4 { grid-template-columns: 1fr 1fr; gap: var(--s-4); }

@media (min-width: 640px) {
    .grid-2 { grid-template-columns: 1fr 1fr; }
    .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
    .grid-3 { grid-template-columns: 1fr 1fr 1fr; }
    .grid-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
}

/* =====================================================
   Scanner
   ===================================================== */
.scanner-wrap {
    position: relative;
    background: #000;
    border-radius: var(--r-2xl);
    overflow: hidden;
    aspect-ratio: 4/3;
    max-width: 480px;
    margin: 0 auto;
}
.scanner-wrap video, .scanner-wrap canvas, .scanner-wrap > div { width: 100%; height: 100%; object-fit: cover; }
.scanner-overlay {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    pointer-events: none;
}
.scanner-frame {
    width: 80%; height: 50%;
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: var(--r-lg);
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.4);
    position: relative;
}
.scanner-frame::before, .scanner-frame::after {
    content: '';
    position: absolute;
    width: 24px; height: 24px;
    border: 3px solid var(--c-p-400);
}
.scanner-frame::before { top: -2px; left: -2px; border-right: none; border-bottom: none; border-top-left-radius: var(--r-md); }
.scanner-frame::after { top: -2px; right: -2px; border-left: none; border-bottom: none; border-top-right-radius: var(--r-md); }
.scanner-line {
    position: absolute; left: 4%; right: 4%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--c-p-400), transparent);
    box-shadow: 0 0 12px var(--c-p-400);
    animation: scanline 2s linear infinite;
}
@keyframes scanline { 0%, 100% { top: 0; } 50% { top: calc(100% - 2px); } }
.scanner-status {
    position: absolute; bottom: 16px; left: 0; right: 0;
    text-align: center; color: white; font-size: 0.85rem; font-weight: 600;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px;
}

/* =====================================================
   Print
   ===================================================== */
@media print {
    .app-header, .bottom-nav, .sidebar, .modal-backdrop, .toast-stack, .no-print { display: none !important; }
    .with-sidebar .app-main { margin-left: 0 !important; }
    body { background: white; }
    .card, .hero { box-shadow: none !important; border: 1px solid #ddd; }
}

/* =====================================================
   Accessibility
   ===================================================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
}

/* WCAG 2.2 focus-not-obscured helper: keep focused elements visible
   even when sticky bars may cover part of the viewport. */
html { scroll-padding-top: calc(var(--header-h) + 12px); scroll-padding-bottom: calc(var(--nav-h) + 12px); }
@media (min-width: 1024px) {
    html { scroll-padding-top: calc(var(--header-h) + 12px); }
}

/* Visible focus ring for every interactive control — works in both
   light & dark themes and respects token colors. */
:where(a, button, [role="button"], input, select, textarea, summary, .sidebar-link, .tab, .auth-tab, .step, .bottom-nav-item, .brand):focus-visible {
    outline: 2px solid var(--c-p-500);
    outline-offset: 2px;
    border-radius: inherit;
}

/* Skip-to-content: keyboard users jump straight past nav */
.skip-link {
    position: fixed;
    top: 8px; left: 8px;
    z-index: 300;
    padding: 10px 16px;
    background: var(--c-p-600);
    color: white;
    border-radius: var(--r-sm);
    font-weight: 700; font-size: 0.875rem;
    transform: translateY(-200%);
    transition: transform var(--d-fast) var(--ease-out);
    box-shadow: var(--sh-lg);
}
.skip-link:focus-visible,
.skip-link:focus {
    transform: translateY(0);
    outline: none;
}

/* Loading state indicator for assistive tech */
[aria-busy="true"], .is-loading { cursor: progress; }
[aria-busy="true"]:focus { outline-color: var(--c-info); }

/* =====================================================
   Premium Polish v2 — placement, hierarchy, micro-motion
   Applied after base styles to refine the look & feel.
   ===================================================== */

/* ----- 1. Buttons: smoother press, loading state, ripple-ish ----- */
.btn { isolation: isolate; }
.btn::after {
    content: '';
    position: absolute; inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at center, currentColor 0%, transparent 70%);
    opacity: 0; transform: scale(0.6);
    transition: opacity 0.45s ease, transform 0.45s ease;
    pointer-events: none;
    color: white;
    mix-blend-mode: overlay;
}
.btn:active::after { opacity: 0.18; transform: scale(1); transition: transform 0s, opacity 0s; }

.btn-primary, .btn-success, .btn-danger, .btn-info, .btn-whatsapp {
    transition: transform 0.18s var(--ease-out), box-shadow 0.25s var(--ease-out), background 0.18s ease;
}
.btn-primary:hover:not(:disabled) { transform: translateY(-1.5px); }

.btn .spinner {
    width: 16px; height: 16px;
    border-width: 2px;
    border-top-color: currentColor;
}

.btn { -webkit-tap-highlight-color: transparent; }

/* ----- 2. Cards: subtle depth + clean borders ----- */
.card {
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card-pad { padding: 22px; }

@media (min-width: 640px) {
    .card-pad { padding: 28px; }
}

/* ----- 3. Hero / banners: stronger gradient + better text rhythm ----- */
.hero { padding: 32px; }
@media (min-width: 640px) { .hero { padding: 40px; } }
.hero h1 { font-size: 1.5rem; line-height: 1.1; }
@media (min-width: 640px) { .hero h1 { font-size: 2rem; } }

.hero-light { padding: 28px; }

/* ----- 4. Step bar: clickable, with progress fill ----- */
.step {
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.step:hover:not(.active) .n {
    border-color: color-mix(in srgb, var(--c-p-500) 30%, var(--b-light));
    color: var(--c-p-700);
}
.step:focus-visible { outline: 2px solid var(--c-p-500); outline-offset: 2px; border-radius: var(--r-md); }

/* ----- 5. Inputs: bigger touch, cleaner focus ----- */
.input, .select, .textarea {
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.input:focus, .select:focus, .textarea:focus {
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-p-500) 14%, transparent);
    border-color: var(--c-p-500);
}
.input-lg { height: 56px; }

/* ----- 6. Stat cards: subtle gradient tint ----- */
.stat {
    background: var(--bg-surface);
    border: 1px solid var(--b-light);
    box-shadow: 0 1px 2px rgba(15,23,42,0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.stat:hover { transform: translateY(-2px); box-shadow: 0 8px 24px -8px rgba(16,185,129,0.18); }

/* ----- 7. Package cards: lift on hover ----- */
.pkg-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    border: 1px solid var(--b-light);
}
.pkg-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 36px -12px rgba(16,185,129,0.18);
    border-color: color-mix(in srgb, var(--c-p-500) 22%, var(--b-light));
}

/* ----- 8. Modal: refined entrance + cleaner look ----- */
.modal-backdrop {
    background: color-mix(in srgb, var(--bg-overlay) 80%, transparent);
    backdrop-filter: blur(8px) saturate(160%);
    -webkit-backdrop-filter: blur(8px) saturate(160%);
}
.modal {
    background: var(--bg-surface);
    border: 1px solid var(--b-light);
    box-shadow: 0 30px 80px -20px rgba(15,23,42,0.4), 0 4px 12px rgba(15,23,42,0.06);
    animation: modalEnter 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalEnter {
    from { opacity: 0; transform: translateY(12px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ----- 9. Toasts: smoother entrance ----- */
.toast {
    animation: toastEnter 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 18px 40px -12px rgba(15,23,42,0.25);
}
@keyframes toastEnter {
    from { opacity: 0; transform: translateY(20px) scale(0.94); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ----- 10. Sidebar links: smoother, with active indicator ----- */
.sidebar-link {
    transition: background 0.18s ease, color 0.18s ease, padding 0.18s ease;
}
.sidebar-link:hover:not(.active) { padding-left: 16px; }
.sidebar-link .count {
    transition: transform 0.2s ease;
}
.sidebar-link:hover .count { transform: scale(1.08); }

/* ----- 11. Bottom nav: cleaner look, better FAB ----- */
.bottom-nav-item {
    transition: color 0.15s ease;
}
.bottom-nav-fab .fab-circle {
    transition: transform 0.2s var(--ease-spring), box-shadow 0.2s ease;
}
.bottom-nav-fab:hover .fab-circle {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 14px 28px -8px color-mix(in srgb, var(--c-p-500) 50%, transparent);
}
.bottom-nav-fab:active .fab-circle { transform: scale(0.95); }

/* ----- 12. Tabs: cleaner active state ----- */
.tab {
    transition: color 0.18s ease, background 0.18s ease;
}

/* ----- 13. Tables: zebra + hover ----- */
.table tbody tr {
    transition: background 0.15s ease;
}
.table tbody tr:hover { background: color-mix(in srgb, var(--c-p-500) 4%, transparent); }

/* ----- 14. Badges & chips: cleaner ----- */
.badge, .chip {
    transition: background 0.15s ease;
}

/* ----- 15. Skeleton: smoother shimmer ----- */
.skeleton {
    animation: shimmer 1.8s ease-in-out infinite;
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ----- 16. App header: subtle border + better rhythm ----- */
.app-header {
    border-bottom: 1px solid color-mix(in srgb, var(--b-light) 50%, transparent);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    background: color-mix(in srgb, var(--bg-surface) 85%, transparent);
}

/* ----- 17. Bottom nav: subtle border + glassy bg ----- */
.bottom-nav {
    border-top: 1px solid color-mix(in srgb, var(--b-light) 50%, transparent);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    background: color-mix(in srgb, var(--bg-surface) 90%, transparent);
}

/* ----- 18. Sidebar: refined look ----- */
.sidebar {
    border-right: 1px solid color-mix(in srgb, var(--b-light) 50%, transparent);
}

/* ----- 19. Empty state: more polished ----- */
.empty {
    padding: 48px 24px;
    text-align: center;
}
.empty-icon {
    width: 72px; height: 72px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--c-p-500) 12%, var(--bg-muted)), color-mix(in srgb, var(--c-violet) 10%, var(--bg-muted)));
    color: var(--c-p-600);
    border-radius: 22px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
}
.empty h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; }
.empty p { font-size: 0.88rem; color: var(--t-secondary); max-width: 320px; margin: 0 auto; line-height: 1.5; }

/* ----- 21. Photo grid: nicer ----- */
.photo-add {
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.photo-add:hover {
    border-color: var(--c-p-500);
    background: color-mix(in srgb, var(--c-p-500) 8%, var(--bg-muted));
    transform: scale(1.02);
}

/* ----- 22. Buttons in admin packages table: smaller, cleaner ----- */
.table .btn-sm { height: 32px; font-size: 0.78rem; }

/* ----- 23. Login tabs: clearer active state ----- */
.auth-tab {
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

/* ----- 24. Member request cards: gentle hover ----- */
.card.card-pad.fade-up {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card.card-pad.fade-up:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px -10px rgba(15,23,42,0.12);
}

/* ----- 25. Section title: better hierarchy ----- */
.section-title {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 16px; margin-bottom: 22px; flex-wrap: wrap;
}
.section-title h1 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.025em; line-height: 1.15; margin: 0; }
.section-title .lede { color: var(--t-tertiary); font-size: 0.88rem; margin-top: 4px; }
.section-title .txt { min-width: 0; }

/* ----- 26. Form sections within cards ----- */
.field label {
    font-weight: 600; font-size: 0.82rem;
    color: var(--t-secondary);
    letter-spacing: -0.005em;
}

/* ----- 27. Checkbox row ----- */
.checkbox-row {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    border-radius: var(--r-md);
    cursor: pointer;
    transition: background 0.15s ease;
}
.checkbox-row:hover { background: color-mix(in srgb, var(--c-p-500) 5%, transparent); }

/* ----- 28. Sticky bottom action bar (for reception entry) ----- */
.sticky-actions {
    position: sticky;
    bottom: 0;
    margin: 24px calc(-1 * var(--s-5)) calc(-1 * var(--s-5));
    padding: 16px var(--s-5);
    background: color-mix(in srgb, var(--bg-surface) 92%, transparent);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid var(--b-light);
    border-radius: 0 0 var(--r-xl) var(--r-xl);
    display: flex; gap: 12px; align-items: center;
    z-index: 10;
}
@media (max-width: 480px) {
    .sticky-actions { margin-left: calc(-1 * var(--s-3)); margin-right: calc(-1 * var(--s-3)); padding: 12px var(--s-3); }
}

/* ----- 29. Page transition ----- */
main.app-main > * {
    animation: pageEnter 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes pageEnter {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ----- 30. Reduced motion: turn off the cinematic stuff ----- */
@media (prefers-reduced-motion: reduce) {
    .btn::after, .card, .pkg-card, .stat, .card-elevated, .empty-icon,
    main.app-main > *, .modal, .toast, .sidebar-link, .bottom-nav-fab .fab-circle,
    .sidebar-link .count, .tab, .badge, .chip, .skeleton, .photo-add {
        animation: none !important;
        transition: none !important;
    }
}

/* =====================================================
   Buttons on colored hero surfaces
   ===================================================== */
.btn-glass {
    background: rgba(255,255,255,0.15);
    color: white;
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255,255,255,0.22);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.18);
}
.btn-glass:hover:not(:disabled) {
    background: rgba(255,255,255,0.22);
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.28), 0 8px 20px -6px rgba(0,0,0,0.18);
}
.btn-on-hero {
    background: white;
    color: var(--c-p-700);
    box-shadow: 0 8px 24px -6px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.6);
    font-weight: 700;
}
.btn-on-hero:hover:not(:disabled) {
    background: white;
    color: var(--c-p-800);
    transform: translateY(-1px);
    box-shadow: 0 14px 32px -6px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.6);
}

/* =====================================================
   Auth screen — green / silver / white
   ===================================================== */
.auth-screen {
    background: #f8fafc;
    position: relative;
}
.auth-screen::before {
    background:
        radial-gradient(circle at 50% 0%, rgba(16, 185, 129, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 0% 100%, rgba(148, 163, 184, 0.1) 0%, transparent 45%),
        radial-gradient(circle at 100% 100%, rgba(16, 185, 129, 0.06) 0%, transparent 45%);
    opacity: 1;
}
.auth-screen::after {
    background: none;
}

.auth-card {
    background: white;
    border: 1px solid #e2e8f0;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 4px 12px rgba(15, 23, 42, 0.05),
        0 24px 48px -16px rgba(15, 23, 42, 0.12);
}
[data-theme="dark"] .auth-card {
    background: #0f172a;
    border-color: #1e293b;
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.3),
        0 24px 48px -16px rgba(0, 0, 0, 0.6);
}

.auth-logo {
    width: 64px; height: 64px;
    border-radius: 18px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow:
        0 0 0 6px rgba(16, 185, 129, 0.12),
        0 8px 20px -4px rgba(16, 185, 129, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}
.auth-title { font-size: 1.75rem !important; letter-spacing: -0.03em !important; }
.auth-subtitle { font-size: 0.92rem !important; }

.auth-tabs {
    background: rgba(238, 240, 245, 0.6) !important;
    border: 1px solid rgba(0, 0, 0, 0.04) !important;
    padding: 5px !important;
}
.auth-tab {
    padding: 12px 8px !important;
    font-size: 0.82rem !important;
}
.auth-tab.active {
    background: white !important;
    color: var(--c-p-700) !important;
    box-shadow: 0 4px 12px -2px rgba(16, 185, 129, 0.25), 0 1px 3px rgba(15, 23, 42, 0.06) !important;
}

.auth-hero h2 {
    font-size: 2.75rem !important;
    font-weight: 900 !important;
    letter-spacing: -0.04em !important;
    line-height: 1.05 !important;
    color: #0f172a;
}
.auth-hero .badge-hero {
    background: rgba(255, 255, 255, 0.18) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    backdrop-filter: blur(10px);
}
.auth-hero-feature .ic {
    background: rgba(255, 255, 255, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    backdrop-filter: blur(8px);
}
.auth-hero-stats .num {
    font-size: 2rem !important;
    color: #047857;
}

.auth-footer {
    background: rgba(238, 240, 245, 0.5) !important;
}

/* Better input fields in auth */
.auth-body .input,
.auth-body .select {
    height: 50px !important;
    font-size: 0.95rem !important;
    border-radius: 12px !important;
    border-color: var(--b-light) !important;
}
.auth-body .input:focus {
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15), 0 1px 2px rgba(15, 23, 42, 0.04) !important;
}

/* =====================================================
   Layout Fix v3 — responsive, no stacking, clear fonts
   ===================================================== */

/* ----- Z-index scale: consistent stacking across the app ----- */
:root {
    --z-base: 1;
    --z-content: 10;
    --z-sticky: 20;
    --z-header: 40;
    --z-sidebar-backdrop: 55;
    --z-sidebar: 60;
    --z-overlay: 80;
    --z-modal-backdrop: 100;
    --z-modal: 110;
    --z-toast: 150;
    --z-tooltip: 200;
    --z-loading: 250;
}

/* App header & bottom nav use consistent values */
.app-header { z-index: var(--z-header) !important; }
.bottom-nav { z-index: var(--z-header) !important; }
.sidebar-backdrop { z-index: var(--z-sidebar-backdrop) !important; }
.sidebar { z-index: var(--z-sidebar) !important; }
.modal-backdrop { z-index: var(--z-modal-backdrop) !important; }
.modal { z-index: var(--z-modal) !important; }
.toast-stack { z-index: var(--z-toast) !important; }
.loading-overlay { z-index: var(--z-loading) !important; }

/* ----- Clear, accessible font colors ----- */
:root {
    --t-primary: #0f172a;       /* near-black slate */
    --t-secondary: #475569;     /* mid slate */
    --t-tertiary: #94a3b8;      /* light slate */
    --t-inverse: #ffffff;
}
[data-theme="dark"] {
    --t-primary: #f1f5f9;
    --t-secondary: #cbd5e1;
    --t-tertiary: #64748b;
    --t-inverse: #0f172a;
}

/* Stronger borders for both themes */
:root {
    --b-light: #e2e8f0;
    --b-default: #cbd5e1;
    --b-strong: #94a3b8;
}
[data-theme="dark"] {
    --b-light: #1e293b;
    --b-default: #334155;
    --b-strong: #475569;
}

/* Background surfaces - white / silver only */
:root {
    --bg-app: #f8fafc;
    --bg-muted: #f1f5f9;
    --bg-surface: #ffffff;
    --bg-elevated: #ffffff;
    --bg-overlay: rgba(15, 23, 42, 0.5);
}
[data-theme="dark"] {
    --bg-app: #020617;
    --bg-muted: #0f172a;
    --bg-surface: #0f172a;
    --bg-elevated: #1e293b;
    --bg-overlay: rgba(0, 0, 0, 0.7);
}

/* ----- Typography scale ----- */
body {
    font-family: 'Inter', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--t-primary);
    line-height: 1.5;
}

/* All headings: tight letter-spacing, weight 800 for hierarchy */
h1, .h1 { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.025em; line-height: 1.15; }
h2, .h2 { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
h3, .h3 { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.015em; line-height: 1.3; }
h4, .h4 { font-size: 1rem;   font-weight: 700; letter-spacing: -0.01em;  line-height: 1.35; }
@media (min-width: 640px) {
    h1, .h1 { font-size: 2rem; }
    h2, .h2 { font-size: 1.5rem; }
}

/* ----- Section title pattern (used across pages) ----- */
.section-title {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 16px; margin-bottom: 22px; flex-wrap: wrap;
}
.section-title .txt { min-width: 0; flex: 1; }
.section-title h1 { margin: 0; }
.section-title .lede {
    color: var(--t-secondary); font-size: 0.92rem; margin: 6px 0 0; line-height: 1.5;
}
.section-title > .btn,
.section-title > div { flex-shrink: 0; }
@media (max-width: 640px) {
    .section-title {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .section-title > .btn,
    .section-title > div { width: 100%; }
    .section-title > .btn { justify-content: center; }
}

/* ----- Header & bottom nav: comfortable tap targets ----- */
.app-header {
    height: var(--header-h, 60px);
    min-height: var(--header-h, 60px);
}
.brand-mark {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: var(--g-primary);
    color: white;
    display: flex; align-items: center; justify-content: center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}
.brand-mark svg { width: 22px; height: 22px; }

/* ----- Bottom nav: spacing for FAB ----- */
.bottom-nav { height: var(--nav-h, 64px); }
.bottom-nav-item {
    min-height: 48px; padding: 6px 10px;
}
.bottom-nav-fab .fab-circle {
    width: 52px; height: 52px;
    background: var(--g-primary);
    color: white;
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    box-shadow:
        0 8px 20px -4px rgba(16, 185, 129, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    margin-top: -16px;
}

/* ----- Hero: better rhythm on mobile ----- */
.hero {
    padding: 24px;
    border-radius: 20px;
}
@media (min-width: 640px) { .hero { padding: 36px; border-radius: 24px; } }
.hero h1 { font-size: 1.5rem; line-height: 1.1; }
@media (min-width: 640px) { .hero h1 { font-size: 2rem; } }
.hero p { font-size: 0.92rem; opacity: 0.92; margin-top: 8px; line-height: 1.5; }

.hero-light {
    padding: 24px;
    border-radius: 20px;
}
@media (min-width: 640px) { .hero-light { padding: 32px; border-radius: 24px; } }

/* ----- Empty state ----- */
.empty {
    padding: 56px 24px;
    text-align: center;
    color: var(--t-secondary);
}
.empty h3 {
    font-size: 1.1rem; font-weight: 700;
    color: var(--t-primary);
    margin: 0 0 8px;
}
.empty p {
    font-size: 0.9rem;
    color: var(--t-secondary);
    max-width: 340px;
    margin: 0 auto;
    line-height: 1.55;
}
.empty-icon {
    width: 80px; height: 80px;
    margin: 0 auto 20px;
    background: var(--bg-muted);
    color: var(--t-tertiary);
    border-radius: 22px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--b-light);
}
.empty-icon svg { width: 36px; height: 36px; }

/* ----- Buttons: clear, no stacking issues ----- */
.btn { position: relative; isolation: isolate; }
.btn .badge,
.btn .count { position: static; }

/* Prevent buttons from wrapping text awkwardly */
.btn { white-space: nowrap; }
.btn-block { white-space: normal; }

/* ----- App main: proper container ----- */
main.app-main {
    padding: 24px 16px 100px;
    max-width: var(--max-w, 1200px);
    margin: 0 auto;
    width: 100%;
}
@media (min-width: 640px) { main.app-main { padding: 32px 24px 100px; } }
@media (min-width: 1024px) { main.app-main { padding: 40px 32px 60px; } }

/* ----- Cards: clean & consistent ----- */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--b-light);
    border-radius: 16px;
}
.card-pad { padding: 22px; }
@media (min-width: 640px) { .card-pad { padding: 26px; } }

/* ----- Stat card: clear hierarchy ----- */
.stat {
    display: flex; align-items: center; gap: 14px;
    padding: 18px;
    background: var(--bg-surface);
    border: 1px solid var(--b-light);
    border-radius: 16px;
}
.stat-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.stat-content { min-width: 0; flex: 1; }
.stat-label {
    font-size: 0.78rem; font-weight: 600;
    color: var(--t-secondary);
    text-transform: uppercase; letter-spacing: 0.04em;
}
.stat-value {
    font-size: 1.65rem; font-weight: 800;
    color: var(--t-primary);
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-top: 2px;
}

/* ----- Skeleton ----- */
.skeleton { border-radius: 12px; }

/* ----- Input ----- */
.input, .select, .textarea {
    background: var(--bg-surface);
    color: var(--t-primary);
}
.input::placeholder, .textarea::placeholder { color: var(--t-tertiary); }

/* ----- Modal & backdrop ----- */
.modal-backdrop {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* ----- Toast stack position (avoid overlap with bottom-nav) ----- */
.toast-stack {
    bottom: calc(var(--nav-h, 64px) + 16px);
}

/* ----- App shell layout: prevent horizontal scroll ----- */
.app-shell { overflow-x: hidden; }

/* ----- Print tweaks ----- */
@media print {
    .toast-stack, .app-header, .bottom-nav, .sidebar { display: none !important; }
    main.app-main { padding: 0; max-width: none; }
}

/* ----- Auth-screen final polish: light + emerald accents ----- */
.auth-screen .auth-shell { padding: 16px 0; }

/* ----- Ensure text contrast for buttons on colored bg ----- */
.btn-on-hero { color: #064e0e; }
.btn-on-hero:hover { color: #052e0a; }

[data-theme="dark"] .btn-on-hero {
    background: #064e3b;
    color: white;
}

/* ----- Visible scrollbars for scrollable sections ----- */
.scroll-y { overflow-y: auto; scrollbar-width: thin; }
.scroll-y::-webkit-scrollbar { width: 6px; }
.scroll-y::-webkit-scrollbar-thumb { background: var(--b-default); border-radius: 3px; }
.scroll-y::-webkit-scrollbar-track { background: transparent; }

/* ----- Bottom safe-area for iOS notch ----- */
@supports (padding: env(safe-area-inset-bottom)) {
    .bottom-nav { padding-bottom: env(safe-area-inset-bottom); }
    .sticky-actions { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
}

/* =====================================================
   Reception entry — shortcuts (duplicate-last + recent units)
   Palette: emerald + silver, light theme only.
   ===================================================== */
.rxn-shortcuts {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.rxn-shortcut-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.rxn-shortcut {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-surface);
    border: 1px solid var(--b-light);
    border-radius: 14px;
    cursor: pointer;
    transition: transform 0.18s var(--ease-out), border-color 0.18s, box-shadow 0.18s, background 0.18s;
    color: var(--t-primary);
    font-family: inherit;
    text-align: left;
    min-height: 44px;
}
.rxn-shortcut:hover {
    transform: translateY(-1px);
    border-color: var(--c-p-300);
    box-shadow: var(--sh-sm);
}
.rxn-shortcut:active { transform: translateY(0); }
.rxn-shortcut .t {
    display: block;
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--c-p-700);
    letter-spacing: -0.01em;
    line-height: 1.2;
}
.rxn-shortcut .t small {
    font-weight: 500;
    color: var(--t-secondary);
    font-size: 0.78rem;
}
.rxn-shortcut .d {
    display: block;
    font-size: 0.72rem;
    color: var(--t-tertiary);
    line-height: 1.3;
    margin-top: 2px;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rxn-shortcut-duplicate {
    background: linear-gradient(135deg, var(--c-p-50) 0%, var(--c-p-100) 100%);
    border-color: var(--c-p-300);
    align-self: flex-start;
}
.rxn-shortcut-duplicate .t {
    color: var(--c-p-700);
    font-size: 0.92rem;
}
.rxn-shortcut-duplicate .d {
    color: var(--c-p-700);
    font-weight: 600;
    opacity: 0.85;
}
.rxn-draft-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 780px;
    margin: 0 auto 14px;
    padding: 10px 14px;
    background: var(--c-p-50);
    border: 1px solid var(--c-p-200);
    border-radius: 14px;
    font-size: 0.85rem;
    color: var(--c-p-800);
}
.rxn-draft-banner button {
    margin-left: auto;
    flex-shrink: 0;
}

/* ===== Staff Assist Request (request petugas) ===== */
.assist-fee-pill,
.assist-pay-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 48px;
    border-radius: 12px;
    background: var(--bg-surface);
    border: 1.5px solid var(--b-default);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.92rem;
    transition: all 0.15s ease;
    cursor: pointer;
    padding: 0 10px;
}
.assist-fee-pill:hover,
.assist-pay-pill:hover {
    border-color: var(--c-p-300);
    background: var(--c-p-50);
}
.assist-fee-pill.selected,
.assist-pay-pill.selected {
    border-color: var(--c-p-500);
    background: var(--c-p-50);
    color: var(--c-p-700);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}
.assist-pay-pill svg {
    flex-shrink: 0;
}
