/* =====================================================================
   WA BROADCAST — 2026 Refresh
   Glassmorphism · Dual Theme (dark/light) · Blue + WhatsApp Green
   =====================================================================
   Bagian:
   1. Design tokens — dark (default) & light (data-theme="light")
   2. Base reset, typography, scrollbar
   3. App shell — sidebar, topbar, main
   4. Page header & buttons
   5. Cards, hero, onboarding, stats, dashboard grid
   6. Forms, search, upload, toolbar
   7. Tables
   8. Badges, status, alerts, modals
   9. Info box, empty state, progress, step, pagination, FAB, toast
  10. Login
  11. WA gateway, campaign, batch send, image preview
  12. Inbox conversation list & chat
  13. Animations, utilities, responsive
   ===================================================================== */

/* =====================================================
   1. DESIGN TOKENS — DARK (default)
   ===================================================== */
:root,
:root[data-theme="dark"] {
    color-scheme: dark;

    /* Surfaces — true-black outer, lifted charcoal cards (smart-home ref) */
    --c-bg:              #000000;
    --c-bg-soft:         #0C0D0F;
    --c-surface-1:       #151618;
    --c-surface-2:       #1C1E21;
    --c-surface-3:       #26282C;
    --c-surface-solid:   #151618;
    --c-surface-glass:   rgba(21, 22, 24, 0.85);
    --c-surface-glass-h: rgba(28, 30, 33, 0.92);

    /* Borders — soft hairlines */
    --c-border:          rgba(255, 255, 255, 0.07);
    --c-border-hi:        rgba(255, 255, 255, 0.11);
    --c-border-strong:   rgba(255, 255, 255, 0.18);

    /* Text — neutral ramp */
    --c-text-primary:    #F2F3F5;
    --c-text-secondary:  #9EA2A9;
    --c-text-muted:      #6A6E76;
    --c-text-dim:        #45484F;

    /* Brand — mint accent */
    --c-brand:           #34D399;
    --c-brand-hover:     #4ADEA8;
    --c-brand-deep:      #10B981;
    --c-brand-bg:        rgba(52, 211, 153, 0.12);
    --c-brand-ring:      rgba(52, 211, 153, 0.40);

    /* WhatsApp — aligned to mint accent */
    --c-wa:              #34D399;
    --c-wa-hover:        #4ADEA8;
    --c-wa-deep:         #10B981;
    --c-wa-bg:           rgba(52, 211, 153, 0.12);
    --c-wa-ring:         rgba(52, 211, 153, 0.30);

    /* Spectrum */
    --c-pink:            #F472B6;
    --c-cyan:            #22D3EE;
    --c-amber:           #FBBF24;
    --c-indigo:          #818CF8;
    --c-purple:          #A78BFA;

    /* Pastel tiles — soft fills for stat tiles (analytics ref).
       *-fg is the high-contrast text/icon color to lay on the pastel fill. */
    --tile-mint:    #1E3A33; --tile-mint-fg:   #6EE7B7;
    --tile-lav:     #2A2A40; --tile-lav-fg:    #C4B5FD;
    --tile-yellow:  #3A3826; --tile-yellow-fg: #FDE68A;
    --tile-peach:   #3A2A26; --tile-peach-fg:  #FDBA8C;
    --tile-sky:     #1E3340; --tile-sky-fg:    #7DD3FC;
    --tile-rose:    #3A2630; --tile-rose-fg:   #FDA4C0;

    /* Semantic */
    --c-success:         #10B981;
    --c-success-bg:      rgba(16, 185, 129, 0.12);
    --c-warning:         #F59E0B;
    --c-warning-bg:      rgba(245, 158, 11, 0.12);
    --c-danger:          #EF4444;
    --c-danger-bg:       rgba(239, 68, 68, 0.12);
    --c-info:            #4F8BFF;
    --c-info-bg:         rgba(79, 139, 255, 0.12);

    /* Gradients — saved for accents only, no longer default */
    --g-brand:           linear-gradient(135deg, #4F8BFF 0%, #6366F1 100%);
    --g-brand-wa:        linear-gradient(135deg, #4F8BFF 0%, #14B8A6 50%, #22C55E 100%);
    --g-wa:              linear-gradient(135deg, #22C55E 0%, #15803D 100%);
    --g-surface:         none;
    --g-card-hi:         none;
    --g-page-bg:         none;

    /* Shadows — minimal, borders do the work */
    --sh-xs:  0 1px 2px rgba(0, 0, 0, 0.40);
    --sh-sm:  0 1px 2px rgba(0, 0, 0, 0.40);
    --sh-md:  0 2px 8px rgba(0, 0, 0, 0.40);
    --sh-lg:  0 8px 24px rgba(0, 0, 0, 0.50);
    --sh-xl:  0 16px 48px rgba(0, 0, 0, 0.60);
    --sh-brand: 0 0 0 1px var(--c-brand-ring);
    --sh-wa:    0 0 0 1px var(--c-wa-ring);
    --sh-danger:0 0 0 1px rgba(239, 68, 68, 0.30);
    --sh-warn:  0 0 0 1px rgba(245, 158, 11, 0.30);
    --sh-inset: inset 0 1px 0 rgba(255, 255, 255, 0.03);

    /* Spacing */
    --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px; --sp-5: 20px;
    --sp-6: 24px; --sp-7: 32px; --sp-8: 40px; --sp-9: 56px; --sp-10: 80px;

    /* Radius — rounded, soft dashboard (smart-home / analytics ref) */
    --r-xs: 8px; --r-sm: 12px; --r-md: 16px; --r-lg: 20px;
    --r-xl: 26px; --r-2xl: 32px; --r-full: 999px;

    /* Transitions */
    --t-fast:   120ms cubic-bezier(0.4, 0, 0.2, 1);
    --t-base:   200ms cubic-bezier(0.4, 0, 0.2, 1);
    --t-slow:   320ms cubic-bezier(0.4, 0, 0.2, 1);
    --t-spring: 360ms cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Layout */
    --sidebar-w: 256px;
    --topbar-h:  68px;
    --content-max: 1320px;

    /* Type scale — tighter, denser editorial */
    --fs-display: 1.9rem; --fs-h1: 1.5rem; --fs-h2: 1.25rem;
    --fs-h3: 1.06rem; --fs-h4: 0.94rem; --fs-body: 0.88rem;
    --fs-sm: 0.82rem; --fs-xs: 0.74rem;

    /* Glass blur */
    --blur-sm: blur(10px) saturate(140%);
    --blur-md: blur(20px) saturate(150%);
    --blur-lg: blur(32px) saturate(160%);

    /* Focus rings */
    --ring:    0 0 0 3px var(--c-brand-ring);
    --ring-wa: 0 0 0 3px var(--c-wa-ring);
}

/* =====================================================
   1b. DESIGN TOKENS — LIGHT
   ===================================================== */
:root[data-theme="light"] {
    color-scheme: light;

    --c-bg:              #FAFAFA;
    --c-bg-soft:         #F4F4F5;
    --c-surface-1:       #FFFFFF;
    --c-surface-2:       #F7F7F8;
    --c-surface-3:       #EFEFF1;
    --c-surface-solid:   #FFFFFF;
    --c-surface-glass:   rgba(255, 255, 255, 0.85);
    --c-surface-glass-h: rgba(255, 255, 255, 0.95);

    --c-border:          rgba(0, 0, 0, 0.10);
    --c-border-hi:        rgba(0, 0, 0, 0.14);
    --c-border-strong:   rgba(0, 0, 0, 0.24);

    --c-text-primary:    #1A1A1A;
    --c-text-secondary:  #555558;
    --c-text-muted:      #8A8A8F;
    --c-text-dim:        #B5B5BA;

    --c-brand:           #059669;
    --c-brand-hover:     #047857;
    --c-brand-deep:      #065F46;
    --c-brand-bg:        rgba(5, 150, 105, 0.10);
    --c-brand-ring:      rgba(5, 150, 105, 0.30);

    --c-wa:              #059669;
    --c-wa-hover:        #047857;
    --c-wa-deep:         #065F46;
    --c-wa-bg:           rgba(5, 150, 105, 0.10);
    --c-wa-ring:         rgba(5, 150, 105, 0.26);

    --c-success-bg:      rgba(16, 185, 129, 0.10);
    --c-warning-bg:      rgba(245, 158, 11, 0.12);
    --c-danger-bg:       rgba(239, 68, 68, 0.10);
    --c-info-bg:         rgba(37, 99, 235, 0.08);

    /* Pastel tiles — light (soft fills, dark text like smart-home ref) */
    --tile-mint:    #D1FAE5; --tile-mint-fg:   #047857;
    --tile-lav:     #EDE9FE; --tile-lav-fg:    #6D28D9;
    --tile-yellow:  #FEF3C7; --tile-yellow-fg: #92722A;
    --tile-peach:   #FFE4D6; --tile-peach-fg:  #C2410C;
    --tile-sky:     #E0F2FE; --tile-sky-fg:    #0369A1;
    --tile-rose:    #FFE4EC; --tile-rose-fg:   #BE185D;

    --g-brand:           linear-gradient(135deg, #2563EB 0%, #4F46E5 100%);
    --g-brand-wa:        linear-gradient(135deg, #2563EB 0%, #14B8A6 50%, #16A34A 100%);
    --g-wa:              linear-gradient(135deg, #22C55E 0%, #15803D 100%);

    --sh-xs:  0 1px 2px rgba(0, 0, 0, 0.04);
    --sh-sm:  0 1px 2px rgba(0, 0, 0, 0.05);
    --sh-md:  0 2px 8px rgba(0, 0, 0, 0.06);
    --sh-lg:  0 8px 24px rgba(0, 0, 0, 0.08);
    --sh-xl:  0 16px 48px rgba(0, 0, 0, 0.10);
    --sh-brand: 0 0 0 1px var(--c-brand-ring);
    --sh-wa:    0 0 0 1px var(--c-wa-ring);
    --sh-danger:0 0 0 1px rgba(239, 68, 68, 0.25);
    --sh-warn:  0 0 0 1px rgba(245, 158, 11, 0.25);
    --sh-inset: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* Light mode: brand is dark emerald, so flip on-accent text back to white */
:root[data-theme="light"] .sidebar-logo .material-icons-round,
:root[data-theme="light"] .user-avatar,
:root[data-theme="light"] .btn-primary,
:root[data-theme="light"] .btn-wa,
:root[data-theme="light"] .btn-success {
    color: #fff;
}
:root[data-theme="light"] .nav-item.active {
    background: var(--c-brand);
    color: #fff;
    border-color: transparent;
}
:root[data-theme="light"] .nav-item.active .material-icons-round { color: #fff; }
:root[data-theme="light"] .login-brand-mark { color: #fff; }

/* =====================================================
   2. BASE RESET & TYPOGRAPHY
   ===================================================== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: var(--fs-body);
    line-height: 1.55;
    color: var(--c-text-primary);
    background: var(--c-bg);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    isolation: isolate;
    overflow-x: hidden;
    transition: background-color var(--t-slow), color var(--t-slow);
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

/* No more ambient orbs — clean editorial */
body::before, body::after { content: none; }

h1, h2, h3, h4, h5, h6 {
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--c-text-primary);
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }

a {
    color: var(--c-brand-hover);
    text-decoration: none;
    transition: color var(--t-fast);
}
a:hover { color: var(--c-wa); }

p { line-height: 1.6; }

code, pre, kbd {
    font-family: 'SF Mono', Monaco, Menlo, Consolas, monospace;
    font-size: 0.88em;
}
code {
    padding: 2px 6px;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-radius: var(--r-xs);
    color: var(--c-text-primary);
}

button { font-family: inherit; cursor: pointer; }
input, textarea, select, button { font-family: inherit; }
img, svg { max-width: 100%; display: block; }

hr {
    border: 0;
    height: 1px;
    background: var(--c-border);
    margin: var(--sp-4) 0;
}

::selection { background: var(--c-brand); color: #fff; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--c-border-hi);
    border-radius: var(--r-full);
    border: 2px solid transparent;
    background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background-color: var(--c-brand); background-clip: padding-box; }
* { scrollbar-width: thin; scrollbar-color: var(--c-border-hi) transparent; }

/* =====================================================
   3. APP SHELL — Sidebar, Topbar, Main
   ===================================================== */
.sidebar {
    position: fixed;
    top: 12px; left: 12px;
    width: var(--sidebar-w);
    height: calc(100vh - 24px);
    background: var(--c-surface-1);
    border: 1px solid var(--c-border);
    border-radius: var(--r-xl);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
    transition: transform var(--t-slow), background var(--t-slow), border-color var(--t-slow);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sp-5) var(--sp-5) var(--sp-4);
    border-bottom: 1px solid var(--c-border);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
    color: var(--c-text-primary);
}
.sidebar-logo .material-icons-round {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--c-brand);
    color: #07261C;
    border-radius: var(--r-sm);
    font-size: 20px;
}
.logo-text {
    color: var(--c-text-primary);
}

.sidebar-close {
    background: transparent;
    border: 1px solid var(--c-border);
    color: var(--c-text-secondary);
    width: 34px;
    height: 34px;
    border-radius: var(--r-sm);
    display: none;
    align-items: center;
    justify-content: center;
}

.sidebar-nav {
    flex: 1;
    padding: var(--sp-3) var(--sp-3) var(--sp-5);
    overflow-y: auto;
    overflow-x: hidden;
}

.nav-section {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--c-text-muted);
    padding: var(--sp-5) var(--sp-3) var(--sp-2);
    user-select: none;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: 10px var(--sp-3);
    border-radius: var(--r-sm);
    color: var(--c-text-secondary);
    font-size: var(--fs-sm);
    font-weight: 500;
    margin-bottom: 3px;
    position: relative;
    transition: background var(--t-fast), color var(--t-fast);
    cursor: pointer;
    text-decoration: none;
    border: 1px solid transparent;
}
.nav-item .material-icons-round {
    font-size: 20px;
    color: var(--c-text-muted);
    transition: color var(--t-fast), transform var(--t-base);
    flex-shrink: 0;
}
.nav-item:hover {
    background: var(--c-surface-2);
    color: var(--c-text-primary);
}
.nav-item:hover .material-icons-round {
    color: var(--c-text-secondary);
    transform: none;
}
.nav-item.active {
    background: var(--c-brand-bg);
    color: var(--c-brand-hover);
    border-color: var(--c-brand-ring);
}
.nav-item.active::before { content: none; }
.nav-item.active .material-icons-round { color: var(--c-brand); }

.nav-label-wrap {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
    flex: 1;
}
.nav-label-wrap > span:first-child {
    font-weight: 600;
    color: inherit;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nav-sub {
    font-size: 0.72rem;
    color: var(--c-text-muted);
    font-weight: 500;
}
.nav-item.active .nav-sub { color: var(--c-text-secondary); }

/* Sidebar footer */
.sidebar-footer {
    border-top: 1px solid var(--c-border);
    padding: var(--sp-4);
    display: flex;
    align-items: center;
    gap: var(--sp-3);
}
.user-info {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    flex: 1;
    min-width: 0;
}
.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: var(--r-sm);
    background: var(--c-brand);
    color: #07261C;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    flex-shrink: 0;
}
.user-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.user-name {
    font-size: var(--fs-sm);
    font-weight: 700;
    color: var(--c-text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.user-role {
    font-size: var(--fs-xs);
    color: var(--c-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.logout-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--r-sm);
    background: transparent;
    border: 1px solid var(--c-border);
    color: var(--c-text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all var(--t-fast);
    flex-shrink: 0;
}
.logout-btn:hover {
    background: var(--c-danger-bg);
    border-color: var(--c-danger);
    color: var(--c-danger);
}

/* Mobile overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    transition: opacity var(--t-base);
}
.sidebar-overlay.active { opacity: 1; }

/* Main content */
.main-content {
    margin-left: calc(var(--sidebar-w) + 24px);
    margin-right: 12px;
    margin-top: 12px;
    margin-bottom: 12px;
    min-height: calc(100vh - 24px);
    background: var(--c-surface-1);
    border: 1px solid var(--c-border);
    border-radius: var(--r-xl);
    overflow: hidden;
    transition: margin-left var(--t-slow);
    position: relative;
}

/* Topbar */
.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    padding: var(--sp-4) var(--sp-6);
    background: var(--c-surface-1);
    border-bottom: 1px solid var(--c-border);
    min-height: var(--topbar-h);
}

.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: 1px solid var(--c-border);
    background: var(--c-surface-2);
    color: var(--c-text-primary);
    border-radius: var(--r-sm);
    align-items: center;
    justify-content: center;
}

.page-title {
    flex: 1;
    font-size: var(--fs-h2);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--c-text-primary);
    margin: 0;
}
@keyframes title-dot {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.4; }
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
}
.topbar-date {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    padding: 8px 14px;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-radius: var(--r-full);
    font-size: var(--fs-sm);
    color: var(--c-text-secondary);
    font-weight: 500;
}
.topbar-date .material-icons-round {
    font-size: 16px;
    color: var(--c-brand-hover);
}

/* Theme toggle button */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--r-full);
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    color: var(--c-text-secondary);
    cursor: pointer;
    transition: all var(--t-fast);
    flex-shrink: 0;
}
.theme-toggle:hover {
    background: var(--c-surface-3);
    color: var(--c-brand-hover);
    border-color: var(--c-brand-ring);
    transform: rotate(15deg);
}
.theme-toggle .material-icons-round { font-size: 20px; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: inline-block; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: inline-block; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* Content wrapper */
.content-wrapper {
    padding: var(--sp-6) var(--sp-6) var(--sp-10);
    max-width: var(--content-max);
    margin: 0 auto;
}

/* =====================================================
   4. PAGE HEADER & BUTTONS
   ===================================================== */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--sp-4);
    margin: var(--sp-6) 0 var(--sp-4);
    flex-wrap: wrap;
}
.page-header h2 {
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    margin: 0;
}
.page-header h2::before {
    content: '';
    width: 3px;
    height: 18px;
    background: var(--c-brand);
    border-radius: var(--r-full);
}
.page-header-desc {
    font-size: var(--fs-sm);
    color: var(--c-text-secondary);
    margin-top: 2px;
}
.page-info {
    font-size: var(--fs-sm);
    color: var(--c-text-secondary);
    display: flex;
    align-items: center;
    gap: var(--sp-2);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    padding: 10px 18px;
    border-radius: var(--r-md);
    font-size: var(--fs-sm);
    font-weight: 600;
    border: 1px solid transparent;
    background: var(--c-surface-2);
    color: var(--c-text-primary);
    cursor: pointer;
    white-space: nowrap;
    user-select: none;
    text-decoration: none;
    transition: transform var(--t-fast), box-shadow var(--t-base),
                background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
.btn:hover { transform: none; }
.btn:active { transform: scale(0.98); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn .material-icons-round { font-size: 18px; }

/* No shimmer — editorial style */
.btn::after { content: none; }

.btn-primary {
    background: var(--c-brand);
    color: #07261C;
    border-color: var(--c-brand-deep);
}
.btn-primary:hover { background: var(--c-brand-hover); }

.btn-wa,
.btn-success {
    background: var(--c-wa);
    color: #07261C;
    border-color: var(--c-wa-deep);
}
.btn-wa:hover,
.btn-success:hover { background: var(--c-wa-hover); }

.btn-secondary {
    background: var(--c-surface-2);
    color: var(--c-text-primary);
    border-color: var(--c-border-hi);
}
.btn-secondary:hover {
    background: var(--c-surface-3);
    border-color: var(--c-border-strong);
}

.btn-outline {
    background: transparent;
    color: var(--c-text-primary);
    border-color: var(--c-border-hi);
}
.btn-outline:hover {
    background: var(--c-surface-2);
    border-color: var(--c-border-strong);
}

.btn-ghost {
    background: transparent;
    color: var(--c-text-secondary);
    border-color: transparent;
}
.btn-ghost:hover {
    background: var(--c-surface-2);
    color: var(--c-text-primary);
}

.btn-warning {
    background: var(--c-warning);
    color: #1a1300;
    border-color: transparent;
}
.btn-warning:hover { filter: brightness(1.05); }

.btn-danger {
    background: var(--c-danger);
    color: #fff;
    border-color: transparent;
}
.btn-danger:hover { filter: brightness(1.08); }

.btn-sm {
    padding: 6px 12px;
    font-size: var(--fs-xs);
    gap: 6px;
}
.btn-sm .material-icons-round { font-size: 15px; }

.btn-lg {
    padding: 14px 24px;
    font-size: var(--fs-h4);
    gap: 10px;
}
.btn-lg .material-icons-round { font-size: 20px; }

.btn-group {
    display: inline-flex;
    gap: var(--sp-2);
    flex-wrap: wrap;
}

.btn:disabled,
.btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* =====================================================
   5. CARDS — base, hero, onboarding, stats, grid
   ===================================================== */
.card {
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    padding: var(--sp-6);
    position: relative;
    transition: border-color var(--t-base);
}
.card:hover { border-color: var(--c-border-hi); }
.card::after { content: none; }

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-3);
    margin-bottom: var(--sp-4);
    padding-bottom: var(--sp-4);
    border-bottom: 1px solid var(--c-border);
    flex-wrap: wrap;
}
.card-title {
    font-size: var(--fs-h4);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    color: var(--c-text-primary);
    margin: 0;
    letter-spacing: -0.01em;
}
.card-title .material-icons-round {
    font-size: 18px;
    color: var(--c-text-muted);
}

/* HERO GREETING — editorial minimal */
.hero-greeting {
    position: relative;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    padding: var(--sp-7);
    margin-bottom: var(--sp-6);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-5);
}
.hero-greeting::before,
.hero-greeting::after { content: none; }
.hero-greeting-content {
    flex: 1;
    min-width: 0;
}
.hero-greeting-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--c-text-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: var(--sp-3);
}
.hero-greeting-eyebrow .material-icons-round { font-size: 14px; color: var(--c-warning); }
.hero-greeting h2 {
    font-size: var(--fs-display);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.035em;
    margin-bottom: var(--sp-2);
    color: var(--c-text-primary);
}
.hero-greeting p {
    color: var(--c-text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    max-width: 640px;
}
.hero-greeting-stats {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-4);
    margin-top: var(--sp-4);
}
.hero-stat-mini {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    font-size: var(--fs-sm);
    color: var(--c-text-secondary);
    backdrop-filter: none;
}
.hero-stat-mini strong {
    color: var(--c-text-primary);
    font-weight: 700;
    margin-right: 2px;
}
.hero-stat-mini .material-icons-round {
    font-size: 16px;
    color: var(--c-text-muted);
}
.hero-stat-mini.wa .material-icons-round { color: var(--c-wa); }
.hero-stat-mini.warn .material-icons-round { color: var(--c-warning); }

/* Hide emoji from hero — editorial style */
.hero-greeting-emoji {
    display: none;
}

/* ONBOARDING CARD */
.onboarding-card {
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    padding: var(--sp-6);
    margin-bottom: var(--sp-6);
    position: relative;
}
.onboarding-title .material-icons-round {
    font-size: 20px;
    color: var(--c-text-muted);
}
.onboarding-step {
    position: relative;
    background: var(--c-surface-3);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    padding: var(--sp-5);
    transition: border-color var(--t-base);
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
    text-decoration: none;
    color: inherit;
}
.onboarding-step:hover {
    transform: none;
    border-color: var(--c-border-strong);
    box-shadow: none;
    color: inherit;
}
.onboarding-step::before { content: none; }
.onboarding-step.done {
    border-color: var(--c-wa-ring);
    background: var(--c-surface-2);
}
.onboarding-step-num {
    width: 30px; height: 30px;
    background: var(--c-surface-3);
    color: var(--c-text-secondary);
    border-radius: var(--r-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.92rem;
    box-shadow: none;
    flex-shrink: 0;
    border: 1px solid var(--c-border-hi);
}
.onboarding-step.done .onboarding-step-num {
    background: var(--c-wa);
    color: #fff;
    border-color: transparent;
}
.onboarding-step-icon {
    color: var(--c-text-muted);
    font-size: 20px;
}
.onboarding-step-cta {
    color: var(--c-brand);
}
.onboarding-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--sp-3);
    margin-bottom: var(--sp-2);
    flex-wrap: wrap;
}
.onboarding-title {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--c-text-primary);
}
.onboarding-title .material-icons-round {
    font-size: 22px;
    color: var(--c-brand-hover);
}
.onboarding-subtitle {
    color: var(--c-text-secondary);
    font-size: var(--fs-sm);
    margin-bottom: var(--sp-5);
}
.onboarding-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--sp-3);
}
.onboarding-step {
    position: relative;
    background: var(--c-surface-3);
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    padding: var(--sp-5);
    transition: transform var(--t-base), border-color var(--t-base), box-shadow var(--t-base);
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
    overflow: hidden;
    isolation: isolate;
    text-decoration: none;
    color: inherit;
}
.onboarding-step:hover {
    transform: none;
    border-color: var(--c-border-strong);
    box-shadow: none;
    color: inherit;
}
.onboarding-step::before { content: none; }
.onboarding-step:hover::before { opacity: 0; }
.onboarding-step.done {
    border-color: var(--c-wa-ring);
    background: var(--c-surface-2);
}
.onboarding-step.done::after {
    content: '✓';
    position: absolute;
    top: var(--sp-3);
    right: var(--sp-3);
    width: 22px; height: 22px;
    background: var(--c-wa);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    box-shadow: none;
}
.onboarding-step-header {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
}
.onboarding-step-num {
    width: 32px; height: 32px;
    background: var(--c-surface-3);
    color: var(--c-text-secondary);
    border: 1px solid var(--c-border-hi);
    border-radius: var(--r-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.92rem;
    box-shadow: none;
    flex-shrink: 0;
}
.onboarding-step.done .onboarding-step-num {
    background: var(--c-wa);
    color: #fff;
    border-color: transparent;
    box-shadow: none;
}
.onboarding-step-icon {
    color: var(--c-text-muted);
    font-size: 20px;
    flex-shrink: 0;
    margin-left: auto;
}
.onboarding-step-title {
    font-size: var(--fs-h4);
    font-weight: 700;
    color: var(--c-text-primary);
}
.onboarding-step-desc {
    color: var(--c-text-secondary);
    font-size: var(--fs-sm);
    line-height: 1.55;
    flex: 1;
}
.onboarding-step-cta {
    margin-top: auto;
    color: var(--c-brand-hover);
    font-size: var(--fs-sm);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* STATS GRID — editorial bento */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--sp-4);
    margin-bottom: var(--sp-6);
}
.stat-card {
    position: relative;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    padding: var(--sp-6);
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
    overflow: hidden;
    transition: border-color var(--t-base);
    text-decoration: none;
    color: inherit;
}
.stat-card:hover {
    border-color: var(--c-border-hi);
    color: inherit;
}
.stat-card::before { content: none; }
/* Pastel stat tiles — whole card tinted (smart-home / analytics ref) */
.stat-card:has(.stat-icon.blue),
.stat-card:has(.stat-icon.wa)     { background: var(--tile-mint);   border-color: transparent; }
.stat-card:has(.stat-icon.purple),
.stat-card:has(.stat-icon.indigo) { background: var(--tile-lav);    border-color: transparent; }
.stat-card:has(.stat-icon.yellow) { background: var(--tile-yellow); border-color: transparent; }
.stat-card:has(.stat-icon.red)    { background: var(--tile-peach);  border-color: transparent; }
.stat-card:has(.stat-icon.cyan)   { background: var(--tile-sky);    border-color: transparent; }
.stat-card:has(.stat-icon.green)  { background: var(--tile-mint);   border-color: transparent; }

.stat-card:has(.stat-icon.blue):hover,
.stat-card:has(.stat-icon.wa):hover,
.stat-card:has(.stat-icon.purple):hover,
.stat-card:has(.stat-icon.indigo):hover,
.stat-card:has(.stat-icon.yellow):hover,
.stat-card:has(.stat-icon.red):hover,
.stat-card:has(.stat-icon.cyan):hover,
.stat-card:has(.stat-icon.green):hover { border-color: var(--c-border-strong); }

.stat-icon {
    width: 34px; height: 34px;
    border-radius: var(--r-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    background: rgba(255, 255, 255, 0.10);
    color: var(--c-text-secondary);
    flex-shrink: 0;
    align-self: flex-start;
}
.stat-card:hover .stat-icon { background: rgba(255, 255, 255, 0.16); }
.stat-icon::after { content: none; }

/* Tile icon + value colors keyed to the pastel fill */
.stat-card:has(.stat-icon.blue)  .stat-icon,
.stat-card:has(.stat-icon.wa)    .stat-icon,
.stat-card:has(.stat-icon.green) .stat-icon { color: var(--tile-mint-fg); }
.stat-card:has(.stat-icon.purple) .stat-icon,
.stat-card:has(.stat-icon.indigo) .stat-icon { color: var(--tile-lav-fg); }
.stat-card:has(.stat-icon.yellow) .stat-icon { color: var(--tile-yellow-fg); }
.stat-card:has(.stat-icon.red)    .stat-icon { color: var(--tile-peach-fg); }
.stat-card:has(.stat-icon.cyan)   .stat-icon { color: var(--tile-sky-fg); }

.stat-card:has(.stat-icon.blue),
.stat-card:has(.stat-icon.wa),
.stat-card:has(.stat-icon.green),
.stat-card:has(.stat-icon.purple),
.stat-card:has(.stat-icon.indigo),
.stat-card:has(.stat-icon.yellow),
.stat-card:has(.stat-icon.red),
.stat-card:has(.stat-icon.cyan) { color: var(--c-text-primary); }

.stat-info { flex: 1; min-width: 0; }
.stat-card:has(.stat-icon) .stat-label { color: var(--c-text-secondary); }
.stat-label {
    font-size: var(--fs-xs);
    color: var(--c-text-muted);
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    margin-bottom: 4px;
}
.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--c-text-primary);
    line-height: 1;
    letter-spacing: -0.04em;
    font-feature-settings: "tnum";
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-4);
    margin-bottom: var(--sp-6);
}

/* =====================================================
   6. FORMS — labels, inputs, search, upload, toolbar
   ===================================================== */
.form-group { margin-bottom: var(--sp-5); }

.form-label {
    display: block;
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--c-text-primary);
    margin-bottom: var(--sp-2);
    letter-spacing: -0.01em;
}
.form-label .text-red { color: var(--c-danger); margin-left: 2px; }

.form-control,
input[type="text"]:not(.search-box input),
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="search"],
input[type="date"],
input[type="datetime-local"],
input[type="file"],
textarea,
select {
    width: 100%;
    padding: 11px 14px;
    font-size: var(--fs-body);
    color: var(--c-text-primary);
    background: var(--c-surface-2);
    border: 1px solid var(--c-border-hi);
    border-radius: var(--r-md);
    transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
    font-family: inherit;
    line-height: 1.5;
}
.form-control:hover,
input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):hover,
textarea:hover,
select:hover {
    border-color: var(--c-border-strong);
}
.form-control:focus,
input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--c-brand);
    box-shadow: var(--ring);
    background: var(--c-surface-3);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

select {
    appearance: none;
    background-image:
        url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* Native option dropdown — paksa kontras tinggi */
option {
    background: var(--c-surface-solid);
    color: var(--c-text-primary);
    padding: 8px 12px;
}
:root[data-theme="dark"] option {
    background: #1B2238;
    color: #F4F6FB;
}
:root[data-theme="light"] option {
    background: #FFFFFF;
    color: #0F172A;
}

.form-hint {
    font-size: var(--fs-xs);
    color: var(--c-text-muted);
    margin-top: 6px;
    line-height: 1.5;
}
.form-hint strong { color: var(--c-brand-hover); }

::placeholder {
    color: var(--c-text-muted);
    opacity: 1;
}

/* Checkbox */
input[type="checkbox"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--c-border-strong);
    border-radius: var(--r-xs);
    background: var(--c-surface-2);
    cursor: pointer;
    position: relative;
    transition: all var(--t-fast);
    flex-shrink: 0;
    vertical-align: middle;
}
input[type="checkbox"]:hover { border-color: var(--c-brand); }
input[type="checkbox"]:checked {
    background: var(--c-brand);
    border-color: var(--c-brand);
}
input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 4px; top: 1px;
    width: 6px; height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Radio */
input[type="radio"] {
    appearance: none;
    width: 18px; height: 18px;
    border: 1.5px solid var(--c-border-strong);
    border-radius: 50%;
    background: var(--c-surface-2);
    cursor: pointer;
    position: relative;
    transition: all var(--t-fast);
    flex-shrink: 0;
    vertical-align: middle;
}
input[type="radio"]:checked {
    border-color: var(--c-brand);
    background: var(--c-brand);
    box-shadow: inset 0 0 0 3px var(--c-surface-2);
}

/* Search box */
.search-box {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 240px;
}
.search-box .material-icons-round {
    position: absolute;
    left: 14px;
    color: var(--c-text-muted);
    font-size: 20px;
    pointer-events: none;
    z-index: 1;
}
.search-box input,
.search-box input[type="text"],
.search-box input[type="search"] {
    padding: 11px 14px 11px 42px;
    width: 100%;
    background: var(--c-surface-2);
    color: var(--c-text-primary);
    border: 1px solid var(--c-border-hi);
    border-radius: var(--r-md);
    font-family: inherit;
    font-size: var(--fs-body);
    line-height: 1.5;
}
.search-box input:hover {
    border-color: var(--c-border-strong);
}
.search-box input:focus {
    outline: none;
    border-color: var(--c-brand);
    box-shadow: var(--ring);
}

/* Toolbar */
.toolbar {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    flex-wrap: wrap;
    margin-bottom: var(--sp-4);
    padding: var(--sp-4);
    background: var(--c-surface-1);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
}
.filter-group {
    display: flex;
    gap: var(--sp-2);
    align-items: center;
    flex-wrap: wrap;
}
.filter-group label {
    font-size: var(--fs-xs);
    color: var(--c-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mapping-select { min-width: 160px; }

/* Upload area */
.upload-area {
    border: 2px dashed var(--c-border-strong);
    border-radius: var(--r-lg);
    padding: var(--sp-8) var(--sp-5);
    text-align: center;
    background: var(--c-surface-1);
    transition: all var(--t-base);
    cursor: pointer;
}
.upload-area:hover,
.upload-area.drag-over {
    border-color: var(--c-brand);
    background: var(--c-brand-bg);
}
.upload-area .material-icons-round {
    font-size: 48px;
    color: var(--c-brand-hover);
    margin-bottom: var(--sp-3);
    animation: float-up 3s ease-in-out infinite;
}
@keyframes float-up {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}

/* Tags chip (variables / category filters) */
.tags-input-container {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-2);
    padding: var(--sp-3);
    background: var(--c-surface-2);
    border: 1px solid var(--c-border-hi);
    border-radius: var(--r-md);
    min-height: 44px;
    align-items: center;
}

.var-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--c-brand-bg);
    color: var(--c-brand-hover);
    border: 1px solid var(--c-brand-ring);
    border-radius: var(--r-full);
    font-size: var(--fs-xs);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--t-fast);
}
.var-chip:hover {
    background: var(--c-brand);
    color: #fff;
    transform: translateY(-1px);
}

.contact-chk {
    accent-color: var(--c-brand);
}

/* Tag chip — kategorikal filter (import dynamic filters) */
.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--r-full);
    font-size: var(--fs-sm);
    font-weight: 500;
    transition: all var(--t-fast);
    user-select: none;
    cursor: pointer;
}
.tag-chip.selected {
    background: var(--c-brand);
    border: 1px solid var(--c-brand);
    color: #fff;
    box-shadow: var(--sh-brand);
}
.tag-chip.unselected {
    background: var(--c-surface-2);
    border: 1px solid var(--c-border-hi);
    color: var(--c-text-secondary);
}
.tag-chip.unselected:hover {
    border-color: var(--c-brand);
    color: var(--c-text-primary);
    background: var(--c-surface-3);
}

/* Import wizard stepper */
.import-stepper {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    margin-bottom: var(--sp-5);
    padding: var(--sp-4);
    background: var(--c-surface-1);
    backdrop-filter: var(--blur-sm);
    -webkit-backdrop-filter: var(--blur-sm);
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    flex-wrap: wrap;
}
.import-step {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-2) var(--sp-3);
    border-radius: var(--r-sm);
    font-size: var(--fs-sm);
    flex: 1;
    min-width: 180px;
}
.import-step .istep-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--c-surface-3);
    border: 1px solid var(--c-border-hi);
    color: var(--c-text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    transition: all var(--t-base);
}
.import-step .istep-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.import-step .istep-label {
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    color: var(--c-text-muted);
}
.import-step .istep-title {
    color: var(--c-text-primary);
    font-weight: 600;
}
.import-step.active .istep-num {
    background: var(--g-brand);
    color: #fff;
    border-color: transparent;
    box-shadow: var(--sh-brand);
}
.import-step.active .istep-label { color: var(--c-brand-hover); }
.import-step.done .istep-num {
    background: var(--g-wa);
    color: #fff;
    border-color: transparent;
}
.import-step.done .istep-label { color: var(--c-wa); }
.import-step-conn {
    flex: 0 0 24px;
    height: 2px;
    background: var(--c-border);
    border-radius: var(--r-full);
}
.import-step-conn.done {
    background: linear-gradient(90deg, var(--c-wa), var(--c-brand));
}

/* Import section */
.import-section {
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    padding: var(--sp-5);
    margin-bottom: var(--sp-4);
}
.import-section-title {
    font-size: var(--fs-h4);
    font-weight: 700;
    color: var(--c-text-primary);
    margin-bottom: var(--sp-2);
    display: flex;
    align-items: center;
    gap: var(--sp-2);
}
.import-section-title .material-icons-round {
    font-size: 18px;
    color: var(--c-brand-hover);
}
.import-section-desc {
    color: var(--c-text-secondary);
    font-size: var(--fs-sm);
    margin-bottom: var(--sp-4);
}
.mapping-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--sp-3);
}
.mapping-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--c-text-primary);
    font-size: var(--fs-sm);
}
.dynamic-filter-card {
    background: var(--c-surface-1);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    padding: var(--sp-4);
    margin-bottom: var(--sp-3);
}
.dynamic-filter-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--sp-3);
}
.dynamic-filter-head h5 {
    margin: 0;
    color: var(--c-brand-hover);
    font-size: var(--fs-sm);
    display: flex;
    align-items: center;
    gap: 6px;
}
.dynamic-filter-remove {
    background: transparent;
    border: 0;
    color: var(--c-text-muted);
    cursor: pointer;
    width: 26px;
    height: 26px;
    border-radius: var(--r-xs);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--t-fast);
}
.dynamic-filter-remove:hover {
    background: var(--c-danger-bg);
    color: var(--c-danger);
}
.dynamic-filter-remove .material-icons-round { font-size: 16px; }
.add-filter-row {
    display: flex;
    gap: var(--sp-3);
    align-items: center;
    flex-wrap: wrap;
}
.add-filter-row > select:first-child { flex: 1; min-width: 200px; }

/* =====================================================
   7. TABLES
   ===================================================== */
.table-container {
    overflow-x: auto;
    border-radius: var(--r-md);
    border: 1px solid var(--c-border);
    background: var(--c-surface-1);
}
table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--fs-sm);
}
thead th {
    background: var(--c-surface-2);
    color: var(--c-text-secondary);
    text-align: left;
    padding: var(--sp-3) var(--sp-4);
    font-weight: 600;
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--c-border);
    white-space: nowrap;
    position: sticky;
    top: 0;
}
tbody td {
    padding: var(--sp-3) var(--sp-4);
    border-bottom: 1px solid var(--c-border);
    color: var(--c-text-primary);
    vertical-align: middle;
}
tbody tr {
    transition: background var(--t-fast);
}
tbody tr:hover {
    background: var(--c-surface-2);
}
tbody tr:last-child td { border-bottom: 0; }

.preview-table table { font-size: var(--fs-xs); }
.preview-table .row-error {
    background: var(--c-danger-bg);
}

/* =====================================================
   8. BADGES, STATUS, ALERTS
   ===================================================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--r-full);
    font-size: var(--fs-xs);
    font-weight: 600;
    background: var(--c-surface-3);
    color: var(--c-text-secondary);
    border: 1px solid var(--c-border-hi);
    line-height: 1.5;
    white-space: nowrap;
}
.badge .material-icons-round { font-size: 13px; }

.badge-draft    { background: var(--c-surface-3); color: var(--c-text-secondary); }
.badge-scheduled {
    background: var(--c-info-bg);
    color: var(--c-brand);
    border-color: var(--c-brand-ring);
}
.badge-pending  {
    background: var(--c-warning-bg);
    color: var(--c-warning);
    border-color: rgba(245, 158, 11, 0.30);
}
.badge-running,
.badge-opened {
    background: var(--c-info-bg);
    color: var(--c-brand-hover);
    border-color: var(--c-brand-ring);
}
.badge-sent,
.badge-completed {
    background: var(--c-wa-bg);
    color: var(--c-wa);
    border-color: var(--c-wa-ring);
}
.badge-failed,
.badge-stopped {
    background: var(--c-danger-bg);
    color: var(--c-danger);
    border-color: rgba(239, 68, 68, 0.30);
}
.badge-paused {
    background: var(--c-warning-bg);
    color: var(--c-warning);
    border-color: rgba(245, 158, 11, 0.30);
}

/* Status dot */
.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--c-text-muted);
    margin-right: 4px;
    vertical-align: middle;
}
.status-dot.draft     { background: var(--c-text-muted); }
.status-dot.running   { background: var(--c-brand); box-shadow: 0 0 8px var(--c-brand); animation: pulse-dot 1.6s ease-in-out infinite; }
.status-dot.paused    { background: var(--c-warning); }
.status-dot.stopped   { background: var(--c-danger); }
.status-dot.completed { background: var(--c-wa); box-shadow: 0 0 8px var(--c-wa); }
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.5; transform: scale(1.3); }
}

/* Status legend */
.status-legend {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--sp-3) var(--sp-4);
    padding: var(--sp-3) var(--sp-4);
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    margin-bottom: var(--sp-4);
    font-size: var(--fs-xs);
    color: var(--c-text-secondary);
}
.legend-title {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    color: var(--c-text-primary);
}
.legend-title .material-icons-round {
    font-size: 16px;
    color: var(--c-brand-hover);
}
.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Alerts */
.alert {
    display: flex;
    align-items: flex-start;
    gap: var(--sp-3);
    padding: var(--sp-3) var(--sp-4);
    border-radius: var(--r-md);
    border: 1px solid var(--c-border);
    margin-bottom: var(--sp-4);
    background: var(--c-surface-2);
    color: var(--c-text-primary);
    font-size: var(--fs-sm);
    position: relative;
}
.alert .material-icons-round {
    font-size: 20px;
    flex-shrink: 0;
}
.alert > span:nth-child(2),
.alert > div {
    flex: 1;
}
.alert-close {
    background: transparent;
    border: 0;
    color: var(--c-text-muted);
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
}
.alert-close .material-icons-round { font-size: 18px; }
.alert-close:hover { color: var(--c-text-primary); }

.alert-success {
    background: var(--c-wa-bg);
    border-color: var(--c-wa-ring);
    color: var(--c-wa);
}
.alert-error {
    background: var(--c-danger-bg);
    border-color: rgba(239, 68, 68, 0.30);
    color: var(--c-danger);
}
.alert-warning {
    background: var(--c-warning-bg);
    border-color: rgba(245, 158, 11, 0.30);
    color: var(--c-warning);
}
.alert-info {
    background: var(--c-info-bg);
    border-color: var(--c-brand-ring);
    color: var(--c-brand-hover);
}

.login-error {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    padding: var(--sp-3) var(--sp-4);
    background: var(--c-danger-bg);
    border: 1px solid rgba(239, 68, 68, 0.30);
    border-radius: var(--r-md);
    color: var(--c-danger);
    font-size: var(--fs-sm);
    margin-bottom: var(--sp-4);
}
.login-error .material-icons-round { font-size: 18px; }

/* =====================================================
   9. MODALS, INFO BOX, EMPTY, PROGRESS, STEP, PAGINATION
   ===================================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--t-base), visibility var(--t-base);
    padding: var(--sp-4);
}
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.modal {
    background: var(--c-surface-solid);
    border: 1px solid var(--c-border-hi);
    border-radius: var(--r-lg);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--sh-xl);
    transform: translateY(20px) scale(0.97);
    transition: transform var(--t-spring);
}
.modal-overlay.active .modal {
    transform: translateY(0) scale(1);
}
.modal-lg { max-width: 720px; }

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-3);
    padding: var(--sp-5) var(--sp-6);
    border-bottom: 1px solid var(--c-border);
}
.modal-title {
    font-size: var(--fs-h3);
    font-weight: 700;
    color: var(--c-text-primary);
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
}
.modal-title .material-icons-round {
    font-size: 20px;
    color: var(--c-text-muted);
}
.modal-close {
    background: transparent;
    border: 0;
    color: var(--c-text-muted);
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: var(--r-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--t-fast);
}
.modal-close:hover {
    background: var(--c-surface-2);
    color: var(--c-text-primary);
}
.modal-body {
    padding: var(--sp-5) var(--sp-6);
}
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--sp-3);
    padding: var(--sp-4) var(--sp-6);
    border-top: 1px solid var(--c-border);
    background: var(--c-surface-1);
    flex-wrap: wrap;
}

/* Info box */
.info-box {
    display: flex;
    align-items: flex-start;
    gap: var(--sp-3);
    padding: var(--sp-4) var(--sp-5);
    margin-bottom: var(--sp-4);
    background: var(--c-surface-1);
    border: 1px solid var(--c-border);
    border-left: 3px solid var(--c-brand);
    border-radius: var(--r-md);
}
.info-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--r-sm);
    background: var(--c-brand-bg);
    color: var(--c-brand-hover);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.info-icon .material-icons-round { font-size: 22px; }
.info-content { flex: 1; min-width: 0; }
.info-title {
    font-weight: 700;
    color: var(--c-text-primary);
    margin-bottom: 4px;
    font-size: var(--fs-sm);
}
.info-desc {
    color: var(--c-text-secondary);
    font-size: var(--fs-sm);
    line-height: 1.55;
}
.info-tip {
    border-left-color: var(--c-wa);
}
.info-tip .info-icon {
    background: var(--c-wa-bg);
    color: var(--c-wa);
}
.info-warn {
    border-left-color: var(--c-warning);
}
.info-warn .info-icon {
    background: var(--c-warning-bg);
    color: var(--c-warning);
}
.info-wa {
    border-left-color: var(--c-wa);
}
.info-wa .info-icon {
    background: var(--c-wa-bg);
    color: var(--c-wa);
}

/* Empty state */
.empty-state,
.empty-state-friendly {
    text-align: center;
    padding: var(--sp-8) var(--sp-4);
    color: var(--c-text-secondary);
}
.empty-state .material-icons-round {
    font-size: 48px;
    color: var(--c-text-muted);
    margin-bottom: var(--sp-3);
}
.empty-state p {
    color: var(--c-text-secondary);
    line-height: 1.6;
}
.empty-icon-wrap {
    width: 84px;
    height: 84px;
    margin: 0 auto var(--sp-4);
    border-radius: 50%;
    background: var(--c-brand-bg);
    border: 1px solid var(--c-brand-ring);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.empty-icon-wrap .material-icons-round {
    font-size: 38px;
    color: var(--c-brand-hover);
    margin: 0;
}
.empty-state-friendly h3 {
    margin-bottom: var(--sp-2);
    color: var(--c-text-primary);
}
.empty-state-friendly p {
    color: var(--c-text-secondary);
    max-width: 420px;
    margin: 0 auto var(--sp-4);
    line-height: 1.6;
}

/* Progress bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--c-surface-3);
    border-radius: var(--r-full);
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: var(--c-brand);
    border-radius: var(--r-full);
    transition: width var(--t-slow);
}
.progress-fill::after { content: none; }

/* Step indicator (campaign create) */
.step-indicator {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    margin-bottom: var(--sp-5);
    padding: var(--sp-4);
    background: var(--c-surface-1);
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    flex-wrap: wrap;
}
.step {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-3);
    flex-shrink: 0;
}
.step-circle,
.step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--c-surface-3);
    color: var(--c-text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: var(--fs-sm);
    flex-shrink: 0;
    border: 1px solid var(--c-border-hi);
}
.step.active .step-circle,
.step.active .step-num {
    background: var(--c-brand);
    color: #fff;
    border-color: transparent;
    box-shadow: none;
}
.step.done .step-circle,
.step.done .step-num {
    background: var(--c-wa);
    color: #fff;
    border-color: transparent;
}
.step-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.step-label {
    font-size: var(--fs-xs);
    color: var(--c-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}
.step-title {
    font-size: var(--fs-sm);
    color: var(--c-text-primary);
    font-weight: 600;
}
.step.active .step-title { color: var(--c-brand); }
.step.done .step-title   { color: var(--c-wa); }
.step-connector {
    flex: 1;
    height: 2px;
    background: var(--c-border);
    border-radius: var(--r-full);
    min-width: 24px;
}
.step.done + .step-connector,
.step-connector.done {
    background: var(--c-wa);
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    flex-wrap: wrap;
    margin-top: var(--sp-4);
    padding: var(--sp-3) var(--sp-4);
    border-top: 1px solid var(--c-border);
}
.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: var(--r-sm);
    background: var(--c-surface-2);
    color: var(--c-text-primary);
    border: 1px solid var(--c-border-hi);
    font-size: var(--fs-sm);
    font-weight: 600;
    text-decoration: none;
    transition: all var(--t-fast);
}
.page-btn:hover {
    background: var(--c-surface-3);
    border-color: var(--c-brand);
    color: var(--c-brand-hover);
}
.page-btn.active {
    background: var(--c-brand);
    color: #fff;
    border-color: transparent;
}
.page-info {
    margin-left: auto;
    font-size: var(--fs-xs);
    color: var(--c-text-muted);
}

/* =====================================================
   10. HELP FAB, TOAST, LOGIN
   ===================================================== */
.help-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--c-brand);
    color: #fff;
    border: 0;
    border-radius: var(--r-full);
    padding: 10px 18px;
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    box-shadow: var(--sh-md);
    cursor: pointer;
    z-index: 800;
    font-size: var(--fs-sm);
    font-weight: 600;
    transition: background var(--t-fast);
}
.help-fab:hover { background: var(--c-brand-hover); }
.help-fab .material-icons-round { font-size: 22px; }

.toast-container {
    position: fixed;
    top: 84px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
    z-index: 2000;
    pointer-events: none;
}
.toast {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    padding: var(--sp-3) var(--sp-4);
    background: var(--c-surface-solid);
    color: var(--c-text-primary);
    border: 1px solid var(--c-border-hi);
    border-radius: var(--r-md);
    box-shadow: var(--sh-lg);
    font-size: var(--fs-sm);
    pointer-events: auto;
    min-width: 240px;
    max-width: 380px;
    animation: toast-in 0.3s ease forwards;
}
.toast .material-icons-round { font-size: 18px; flex-shrink: 0; }
.toast-success { border-left: 3px solid var(--c-wa); }
.toast-success .material-icons-round { color: var(--c-wa); }
.toast-error { border-left: 3px solid var(--c-danger); }
.toast-error .material-icons-round { color: var(--c-danger); }
.toast-info { border-left: 3px solid var(--c-brand); }
.toast-info .material-icons-round { color: var(--c-brand-hover); }
.toast-warning { border-left: 3px solid var(--c-warning); }
.toast-warning .material-icons-round { color: var(--c-warning); }

@keyframes toast-in {
    from { transform: translateX(20px); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}
@keyframes toastSlideOut {
    to { transform: translateX(20px); opacity: 0; }
}

/* Login page — single centered card, Linear/Vercel minimal */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--sp-5);
    background: var(--c-bg);
    position: relative;
    isolation: isolate;
}
/* Subtle dotted grid — quiet, not glowing */
.login-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(var(--c-border-hi) 1px, transparent 1px);
    background-size: 28px 28px;
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 0%, transparent 75%);
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 0%, transparent 75%);
    pointer-events: none;
    z-index: -1;
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: var(--c-surface-1);
    border: 1px solid var(--c-border);
    border-radius: var(--r-xl);
    box-shadow: var(--sh-lg);
    padding: var(--sp-8) var(--sp-7);
}

.login-brand {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-3);
    margin-bottom: var(--sp-7);
}
.login-brand-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--c-brand);
    color: #07261C;
    border-radius: var(--r-md);
    font-size: 20px;
}
.login-brand-name {
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: -0.01em;
    color: var(--c-text-primary);
}

.login-form-head {
    margin-bottom: var(--sp-6);
}
.login-form-head h1 {
    font-size: var(--fs-h1);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--c-text-primary);
    margin-bottom: 6px;
}
.login-form-head p {
    color: var(--c-text-secondary);
    font-size: var(--fs-sm);
    line-height: 1.5;
}

.login-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.login-input-wrap {
    position: relative;
}
.login-form-side .login-input-wrap input,
.login-input-wrap input.form-control {
    padding-right: 64px;
}
.login-input-wrap .toggle-pwd {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: 0;
    color: var(--c-text-secondary);
    cursor: pointer;
    font-size: var(--fs-xs);
    font-weight: 600;
    padding: 4px 8px;
    border-radius: var(--r-xs);
}
.login-input-wrap .toggle-pwd:hover {
    background: var(--c-surface-3);
    color: var(--c-text-primary);
}

.login-forgot {
    font-size: var(--fs-xs);
    color: var(--c-brand-hover);
    font-weight: 500;
    text-decoration: none;
}
.login-forgot:hover { color: var(--c-brand); text-decoration: underline; }

.login-foot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: var(--sp-6);
    padding-top: var(--sp-5);
    border-top: 1px solid var(--c-border);
    font-size: var(--fs-xs);
    color: var(--c-text-muted);
}
.login-foot .material-icons-round {
    font-size: 13px;
    color: var(--c-text-muted);
}

@media (max-width: 480px) {
    .login-card { padding: var(--sp-6) var(--sp-5); }
    .login-form-head h1 { font-size: 1.35rem; }
}

/* =====================================================
   11. WA GATEWAY · CAMPAIGN · BATCH · IMAGE PREVIEW
   ===================================================== */
.wa-gateway-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-4);
    padding: var(--sp-4) var(--sp-5);
    background: var(--c-surface-1);
    backdrop-filter: var(--blur-sm);
    -webkit-backdrop-filter: var(--blur-sm);
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    margin-bottom: var(--sp-4);
    flex-wrap: wrap;
}
.wa-gateway-banner.wa-banner-connected {
    border-color: var(--c-wa-ring);
    background: linear-gradient(135deg, var(--c-wa-bg), var(--c-surface-1));
}
.wa-gateway-banner.wa-banner-qr_ready {
    border-color: var(--c-warning);
    background: linear-gradient(135deg, var(--c-warning-bg), var(--c-surface-1));
}
.wa-gateway-banner.wa-banner-offline,
.wa-gateway-banner.wa-banner-disconnected {
    border-color: rgba(239, 68, 68, 0.30);
    background: linear-gradient(135deg, var(--c-danger-bg), var(--c-surface-1));
}
.wa-banner-icon {
    font-size: 30px;
    padding: var(--sp-2);
    border-radius: var(--r-md);
    background: var(--c-surface-2);
    color: var(--c-brand-hover);
}
.wa-banner-connected .wa-banner-icon { color: var(--c-wa); }
.wa-banner-qr_ready .wa-banner-icon { color: var(--c-warning); }
.wa-banner-offline .wa-banner-icon,
.wa-banner-disconnected .wa-banner-icon { color: var(--c-danger); }
.wa-banner-content {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: var(--sp-3);
}
.wa-banner-content > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.wa-banner-actions {
    display: flex;
    gap: var(--sp-2);
}

/* WA Gateway Grid: QR panel + info panel */
.wa-gateway-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-4);
    margin-bottom: var(--sp-6);
}
@media (max-width: 900px) {
    .wa-gateway-grid { grid-template-columns: 1fr; }
}

.wa-qr-panel {
    text-align: center;
}
.wa-qr-display {
    min-height: 350px;
    background: var(--c-surface-2);
    border-radius: var(--r-md);
    border: 1px solid var(--c-border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--sp-4);
    overflow: hidden;
    position: relative;
}
.wa-qr-image {
    max-width: 280px;
    width: 100%;
    height: auto;
    border-radius: var(--r-sm);
    background: #fff;
    padding: var(--sp-2);
}
.wa-qr-loader { margin-bottom: var(--sp-3); }
.wa-qr-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-2);
    color: var(--c-text-secondary);
    padding: var(--sp-5);
}
.wa-qr-loader .material-icons-round {
    font-size: 56px;
    color: var(--c-brand-hover);
}
.wa-qr-placeholder p {
    color: var(--c-text-secondary);
    font-size: var(--fs-sm);
}

.wa-info-panel {
    display: flex;
    flex-direction: column;
    gap: var(--sp-4);
}

.wa-conn-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-3);
    padding: var(--sp-3) var(--sp-4);
    border-radius: var(--r-md);
    border: 1px solid var(--c-border);
    margin-bottom: var(--sp-4);
    background: var(--c-surface-1);
    flex-wrap: wrap;
}
.wa-conn-info {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    flex: 1;
    min-width: 0;
}
.wa-conn-info > div {
    display: flex;
    flex-direction: column;
}
.wa-conn-info .material-icons-round {
    font-size: 24px;
    color: var(--c-brand-hover);
}
.wa-conn-actions { flex-shrink: 0; }
.wa-conn-connected { border-color: var(--c-wa-ring); background: var(--c-wa-bg); }
.wa-conn-connected .wa-conn-info .material-icons-round { color: var(--c-wa); }
.wa-conn-disconnected,
.wa-conn-offline { border-color: rgba(239, 68, 68, 0.3); background: var(--c-danger-bg); }
.wa-conn-disconnected .wa-conn-info .material-icons-round,
.wa-conn-offline .wa-conn-info .material-icons-round { color: var(--c-danger); }

.wa-connected-state {
    text-align: center;
}
.wa-connected-icon {
    margin-bottom: var(--sp-3);
}
.wa-account-info {
    text-align: center;
    margin-bottom: var(--sp-3);
    font-size: var(--fs-sm);
    color: var(--c-text-secondary);
}
.wa-account-info strong {
    color: var(--c-text-primary);
}

.wa-instructions {
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    padding: var(--sp-4);
    margin-top: var(--sp-4);
    text-align: left;
}
.wa-instructions h4 {
    margin-bottom: var(--sp-3);
    color: var(--c-text-primary);
    font-size: var(--fs-sm);
}
.wa-instructions .wa-step {
    display: flex;
    align-items: flex-start;
    gap: var(--sp-3);
    padding: var(--sp-2) 0;
    color: var(--c-text-secondary);
    font-size: var(--fs-sm);
    line-height: 1.5;
}
.wa-instructions .wa-step .step-num {
    width: 24px;
    height: 24px;
    font-size: var(--fs-xs);
    background: var(--g-brand);
    color: #fff;
    border-color: transparent;
    flex-shrink: 0;
}
.wa-step strong { color: var(--c-text-primary); }

.wa-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sp-2) 0;
    border-bottom: 1px solid var(--c-border);
    font-size: var(--fs-sm);
}
.wa-status-row:last-child { border-bottom: 0; }
.wa-status-row > span:last-child {
    color: var(--c-text-primary);
    font-weight: 600;
}

.wa-status-details {
    padding: var(--sp-2) 0;
}

/* WA status dot di sidebar */
.wa-status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--c-text-muted);
    margin-left: auto;
    flex-shrink: 0;
    transition: background var(--t-fast);
}
.wa-status-dot.connected {
    background: var(--c-wa);
    box-shadow: 0 0 8px var(--c-wa);
}
.wa-status-dot.waiting { background: var(--c-warning); }
.wa-status-dot.disconnected,
.wa-status-dot.offline { background: var(--c-danger); }

.wa-quick-actions {
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
}

.wa-sending-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--c-info-bg);
    border: 1px solid var(--c-brand-ring);
    border-radius: var(--r-sm);
    color: var(--c-brand-hover);
    font-size: var(--fs-xs);
    font-weight: 600;
}
.wa-sending-indicator .material-icons-round { font-size: 16px; }

/* Campaign controls */
.campaign-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-3);
    padding: var(--sp-4);
    background: var(--c-surface-1);
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    margin-bottom: var(--sp-4);
    flex-wrap: wrap;
}
.campaign-status-display {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    color: var(--c-text-primary);
}

.batch-progress-card {
    border-color: var(--c-brand-ring);
    background: var(--c-info-bg);
}
.batch-progress-info {
    padding: var(--sp-3) 0;
}

/* Image preview panel (campaign detail) */
.img-preview-panel {
    background: var(--c-surface-1);
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    padding: var(--sp-5);
    margin-bottom: var(--sp-4);
}
.img-instructions {
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    padding: var(--sp-4);
}
.img-instructions .step {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-1) 0;
    color: var(--c-text-secondary);
    font-size: var(--fs-sm);
}
.img-instructions .step .step-num {
    width: 24px;
    height: 24px;
    font-size: var(--fs-xs);
    background: var(--g-brand);
    color: #fff;
    border-color: transparent;
}

.template-preview {
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    padding: var(--sp-4);
    color: var(--c-text-primary);
    font-size: var(--fs-sm);
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}
.template-preview .placeholder {
    background: var(--c-brand-bg);
    color: var(--c-brand-hover);
    padding: 1px 6px;
    border-radius: var(--r-xs);
    border: 1px solid var(--c-brand-ring);
    font-weight: 600;
    font-size: 0.92em;
}

/* Inbox badge & count pill */
.inbox-badge {
    background: var(--c-danger);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: var(--r-full);
    line-height: 1.4;
    margin-left: auto;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 0 0 2px var(--c-bg);
}
.inbox-count-pill {
    background: var(--c-wa);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 1px 8px;
    border-radius: var(--r-full);
    display: inline-block;
}

/* =====================================================
   12. INBOX — Conversation list, header card, chat thread
   ===================================================== */
.conversation-list {
    display: flex;
    flex-direction: column;
}
.conversation-item {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-4) var(--sp-5);
    border-bottom: 1px solid var(--c-border);
    text-decoration: none;
    color: inherit;
    transition: background var(--t-fast);
    position: relative;
}
.conversation-item:last-child { border-bottom: 0; }
.conversation-item:hover {
    background: var(--c-surface-2);
    color: inherit;
}
.conversation-item.has-unread {
    background: var(--c-surface-2);
}
.conversation-item.has-unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12%;
    bottom: 12%;
    width: 3px;
    background: var(--c-brand);
    border-radius: 0 var(--r-full) var(--r-full) 0;
}
.conv-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--c-surface-3);
    color: var(--c-text-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
    border: 1px solid var(--c-border);
    position: relative;
}
.conv-unread-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    background: var(--c-danger);
    border-radius: 50%;
    border: 2px solid var(--c-bg);
}
.conv-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.conv-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-2);
}
.conv-name {
    font-weight: 600;
    color: var(--c-text-primary);
    font-size: var(--fs-sm);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.conversation-item.has-unread .conv-name { color: var(--c-text-primary); font-weight: 700; }
.conv-time {
    font-size: var(--fs-xs);
    color: var(--c-text-muted);
    flex-shrink: 0;
}
.conversation-item.has-unread .conv-time { color: var(--c-brand-hover); font-weight: 600; }
.conv-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-2);
}
.conv-preview {
    color: var(--c-text-secondary);
    font-size: var(--fs-xs);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}
.conversation-item.has-unread .conv-preview { color: var(--c-text-primary); }
.conv-meta {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    flex-shrink: 0;
}
.conv-total {
    font-size: var(--fs-xs);
    color: var(--c-text-muted);
}
.conv-chevron {
    color: var(--c-text-muted);
    flex-shrink: 0;
    transition: transform var(--t-fast);
}
.conversation-item:hover .conv-chevron {
    color: var(--c-brand-hover);
    transform: translateX(2px);
}

.conv-header-card {
    background: var(--c-surface-1);
}
.conv-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.conv-stat-label {
    font-size: var(--fs-xs);
    color: var(--c-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}
.conv-stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--c-text-primary);
}

/* Chat thread bubbles */
.chat-thread {
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
    padding: var(--sp-4);
    background: var(--c-surface-1);
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    max-height: 70vh;
    overflow-y: auto;
}
.chat-date-divider {
    text-align: center;
    margin: var(--sp-3) 0 var(--sp-2);
    position: relative;
}
.chat-date-divider span {
    display: inline-block;
    padding: 4px 14px;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-radius: var(--r-full);
    font-size: var(--fs-xs);
    color: var(--c-text-secondary);
    font-weight: 600;
}
.chat-row {
    display: flex;
    margin: 2px 0;
}
.chat-row.in { justify-content: flex-start; }
.chat-row.out { justify-content: flex-end; }
.chat-bubble {
    max-width: min(72%, 520px);
    padding: var(--sp-3) var(--sp-4);
    border-radius: var(--r-lg);
    font-size: var(--fs-sm);
    line-height: 1.5;
    position: relative;
    box-shadow: var(--sh-xs);
}
.chat-row.out .chat-bubble {
    background: var(--c-brand);
    color: #fff;
    border-bottom-right-radius: 4px;
}
.chat-row.in .chat-bubble {
    background: var(--c-surface-2);
    color: var(--c-text-primary);
    border: 1px solid var(--c-border);
    border-bottom-left-radius: 4px;
}
.chat-campaign-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: var(--r-full);
    font-size: var(--fs-xs);
    font-weight: 600;
    margin-bottom: 6px;
}
.chat-campaign-tag .material-icons-round { font-size: 14px; }
.chat-bubble-img {
    max-width: 100%;
    border-radius: var(--r-sm);
    margin-bottom: 6px;
    cursor: zoom-in;
    transition: transform var(--t-fast);
}
.chat-bubble-img:hover { transform: scale(1.01); }

.chat-bubble-video {
    max-width: 100%;
    width: 320px;
    border-radius: var(--r-sm);
    margin-bottom: 6px;
    background: #000;
}
.chat-bubble-audio {
    width: 100%;
    min-width: 240px;
    margin-bottom: 6px;
}
.chat-bubble-doc {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--r-sm);
    color: inherit;
    text-decoration: none;
    margin-bottom: 6px;
    max-width: 280px;
    transition: background var(--t-fast);
}
.chat-row.in .chat-bubble-doc {
    background: var(--c-surface-3);
    border-color: var(--c-border);
}
.chat-bubble-doc:hover { background: rgba(255, 255, 255, 0.16); color: inherit; }
.chat-row.in .chat-bubble-doc:hover { background: var(--c-surface-2); }
.chat-bubble-doc .material-icons-round { font-size: 22px; }
.chat-doc-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: var(--fs-sm);
    font-weight: 500;
}
.chat-doc-dl { opacity: 0.7; font-size: 18px !important; }

/* Media viewer overlay (full-screen image) */
.media-viewer {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    cursor: zoom-out;
    padding: var(--sp-5);
}
.media-viewer.active { display: flex; }
.media-viewer img {
    max-width: 95vw;
    max-height: 92vh;
    border-radius: var(--r-md);
    box-shadow: var(--sh-xl);
}
.media-viewer-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.media-viewer-close:hover { background: rgba(255, 255, 255, 0.1); }
.chat-type-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--c-brand-bg);
    border: 1px solid var(--c-brand-ring);
    border-radius: var(--r-sm);
    color: var(--c-brand-hover);
    font-size: var(--fs-xs);
    font-weight: 600;
    margin-bottom: 6px;
}
.chat-type-indicator .material-icons-round { font-size: 14px; }
.chat-text {
    word-break: break-word;
    white-space: pre-wrap;
}
.chat-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    margin-top: 4px;
    font-size: 0.7rem;
    opacity: 0.7;
}
.chat-row.in .chat-meta { color: var(--c-text-muted); }
.chat-tick .material-icons-round { font-size: 13px; vertical-align: middle; }

/* Recent replies (dashboard) */
.recent-replies-list {
    display: flex;
    flex-direction: column;
}
.recent-reply-item {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-3) 0;
    border-bottom: 1px solid var(--c-border);
    text-decoration: none;
    color: inherit;
    position: relative;
    transition: background var(--t-fast);
}
.recent-reply-item:last-child { border-bottom: 0; }
.recent-reply-item:hover {
    background: var(--c-surface-2);
    color: inherit;
}
.recent-reply-item.unread {
    background: var(--c-surface-2);
}
.recent-reply-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.recent-reply-top {
    display: flex;
    justify-content: space-between;
    gap: var(--sp-2);
}
.recent-reply-name {
    font-weight: 700;
    color: var(--c-text-primary);
    font-size: var(--fs-sm);
}
.recent-reply-time {
    font-size: var(--fs-xs);
    color: var(--c-text-muted);
}
.recent-reply-preview {
    font-size: var(--fs-xs);
    color: var(--c-text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.recent-reply-item.unread .recent-reply-preview {
    color: var(--c-text-primary);
}
.recent-reply-unread-dot {
    width: 8px;
    height: 8px;
    background: var(--c-brand);
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 8px var(--c-brand);
}

.reply-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    margin-left: 6px;
    background: var(--c-wa-bg);
    color: var(--c-wa);
    border: 1px solid var(--c-wa-ring);
    border-radius: var(--r-full);
    font-size: 0.7rem;
    font-weight: 700;
    text-decoration: none;
    transition: all var(--t-fast);
}
.reply-indicator:hover {
    background: var(--c-wa);
    color: #fff;
}
.reply-indicator .material-icons-round { font-size: 12px; }

/* =====================================================
   13. UTILITIES, ANIMATIONS, RESPONSIVE
   ===================================================== */
.flex-1 { flex: 1; }
.mt-1 { margin-top: var(--sp-2); }
.mt-2 { margin-top: var(--sp-4); }
.text-xs { font-size: var(--fs-xs); }
.text-sm { font-size: var(--fs-sm); }
.text-primary { color: var(--c-brand-hover); }
.text-muted { color: var(--c-text-muted); }
.text-green { color: var(--c-wa); }
.text-wa { color: var(--c-wa); }
.text-red { color: var(--c-danger); }

.spinning {
    display: inline-block;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Legacy aliases — beberapa template lama pakai nama bg variable berbeda */
:root {
    --bg-primary:        var(--c-bg);
    --bg-secondary:      var(--c-bg-soft);
    --bg-tertiary:       var(--c-surface-2);
    --bg-card:           var(--c-surface-1);
    --bg-input:          var(--c-surface-2);
    --border-color:      var(--c-border);
    --text-primary:      var(--c-text-primary);
    --text-secondary:    var(--c-text-secondary);
    --text-muted:        var(--c-text-muted);
    --accent-primary:    var(--c-brand);
    --accent-blue:       var(--c-brand);
    --accent-green:      var(--c-wa);
    --accent-wa-green:   var(--c-wa);
    --accent-red:        var(--c-danger);
    --accent-yellow:     var(--c-warning);
    --accent-blue-bg:    var(--c-info-bg);
    --accent-green-bg:   var(--c-wa-bg);
    --accent-red-bg:     var(--c-danger-bg);
    --radius-sm:         var(--r-sm);
    --radius-md:         var(--r-md);
    --radius-lg:         var(--r-lg);
    --radius-xl:         var(--r-xl);
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 1100px) {
    .onboarding-steps {
        grid-template-columns: repeat(2, 1fr);
    }
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

@media (max-width: 900px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .hero-greeting { flex-direction: column; text-align: center; }
    .hero-greeting h2 { font-size: 1.6rem; }
    .hero-greeting-emoji { font-size: 3.5rem; }
    .step-indicator { flex-direction: column; align-items: stretch; }
    .step-connector { display: none; }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.active {
        transform: translateX(0);
        box-shadow: var(--sh-xl);
    }
    .sidebar-overlay.active { display: block; }
    .sidebar-close { display: inline-flex; }
    .main-content { margin-left: 0; }
    .menu-toggle { display: inline-flex; }
    .content-wrapper { padding: var(--sp-4) var(--sp-4) var(--sp-9); }
    .topbar { padding: var(--sp-3) var(--sp-4); }
    .topbar-date { display: none; }
    .onboarding-steps { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-greeting { padding: var(--sp-5); }
    .hero-greeting h2 { font-size: 1.4rem; }
    .help-fab { bottom: 16px; right: 16px; padding: 10px 16px; }
    .help-fab-label { display: none; }
    .toast-container { top: 70px; right: 12px; left: 12px; }
    .toast { min-width: auto; max-width: none; }
    .modal { max-width: calc(100vw - 32px); }
    .chat-bubble { max-width: 84%; }
    .recent-reply-time { font-size: 0.65rem; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .stat-card { padding: var(--sp-4); }
    .stat-value { font-size: 1.5rem; }
    .card { padding: var(--sp-4); }
    .card-header { gap: var(--sp-2); }
}

/* Chat compose box (inbox detail) */
.chat-compose {
    display: flex;
    align-items: flex-end;
    gap: var(--sp-2);
    margin-top: var(--sp-3);
    padding: var(--sp-3);
    background: var(--c-surface-1);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
}
.compose-attach {
    flex-shrink: 0;
}
.compose-attach-btn {
    background: transparent;
    border: 1px solid var(--c-border-hi);
    color: var(--c-text-secondary);
    width: 42px;
    height: 42px;
    border-radius: var(--r-sm);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--t-fast);
}
.compose-attach-btn:hover {
    color: var(--c-brand);
    border-color: var(--c-brand);
    background: var(--c-brand-bg);
}
.compose-attach-btn .material-icons-round { font-size: 22px; }

.compose-text-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
    min-width: 0;
}
.compose-preview {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    padding: 8px 12px;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border-hi);
    border-radius: var(--r-sm);
    font-size: var(--fs-sm);
}
.compose-preview > .material-icons-round {
    font-size: 20px;
    color: var(--c-brand);
    flex-shrink: 0;
}
.compose-preview-name {
    flex: 1;
    color: var(--c-text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}
.compose-preview-size {
    color: var(--c-text-muted);
    font-size: var(--fs-xs);
    flex-shrink: 0;
}
.compose-preview-remove {
    background: transparent;
    border: 0;
    color: var(--c-text-muted);
    cursor: pointer;
    width: 24px;
    height: 24px;
    border-radius: var(--r-xs);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.compose-preview-remove:hover {
    color: var(--c-danger);
    background: var(--c-danger-bg);
}
.compose-preview-remove .material-icons-round { font-size: 16px; }
.chat-compose textarea {
    width: 100%;
    min-height: 42px;
    max-height: 160px;
    padding: 10px 14px;
    resize: none;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border-hi);
    border-radius: var(--r-sm);
    color: var(--c-text-primary);
    font-size: var(--fs-body);
    line-height: 1.45;
    font-family: inherit;
}
.chat-compose textarea:focus {
    outline: none;
    border-color: var(--c-brand);
    box-shadow: var(--ring);
}
.chat-compose .btn {
    flex-shrink: 0;
    padding: 10px 16px;
}
@media (max-width: 600px) {
    .chat-compose .compose-send-label { display: none; }
    .chat-compose .btn { padding: 10px; }
    .compose-attach-btn { width: 38px; height: 38px; }
}

/* Auto-send bar — campaign detail */
.auto-send-bar {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    flex-wrap: wrap;
    padding: var(--sp-3) var(--sp-4);
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
}
.auto-send-delay {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    flex-wrap: wrap;
}
.auto-send-delay > .material-icons-round {
    font-size: 18px;
    color: var(--c-wa);
}
.auto-send-label {
    font-size: var(--fs-sm);
    color: var(--c-text-primary);
    font-weight: 600;
}
.auto-send-input {
    display: inline-flex;
    align-items: center;
    background: var(--c-surface-1);
    border: 1px solid var(--c-border-hi);
    border-radius: var(--r-sm);
    padding: 0 10px;
    transition: border-color var(--t-fast);
}
.auto-send-input:focus-within {
    border-color: var(--c-brand);
    box-shadow: var(--ring);
}
.auto-send-input input {
    width: 72px;
    padding: 7px 0;
    background: transparent;
    border: 0;
    color: var(--c-text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    outline: none;
    font-feature-settings: "tnum";
}
.auto-send-suffix {
    font-size: var(--fs-xs);
    color: var(--c-text-muted);
    margin-left: 4px;
    font-weight: 500;
}
.auto-send-hint {
    font-size: var(--fs-xs);
    color: var(--c-text-muted);
}
.auto-send-hint code {
    padding: 1px 5px;
    background: var(--c-surface-3);
    border: 1px solid var(--c-border-hi);
    border-radius: 4px;
    font-size: 0.78rem;
    color: var(--c-text-secondary);
}
.auto-send-actions {
    display: flex;
    gap: var(--sp-2);
    margin-left: auto;
    flex-wrap: wrap;
}

@media (max-width: 720px) {
    .auto-send-actions { margin-left: 0; width: 100%; }
    .auto-send-actions .btn { flex: 1; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    body::before, body::after { animation: none !important; }
}

