/* ═══════════════════════════════════════════════════════════════════
   ProFlow — Industrial Editorial
   Display: Fraunces · Body: Manrope · Mono: JetBrains Mono
   ─────────────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght,SOFT@9..144,200..900,0..100&family=Manrope:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* ─── Tokens ───────────────────────────────────────────────────────── */
:root {
    /* Surfaces */
    --bg:          #0a0a0b;
    --bg-alt:      #101012;
    --surface:     #141416;
    --surface-2:   #1a1a1d;
    --surface-3:   #25252a;
    --surface-hi:  #2f2f35;

    /* Borders & lines */
    --border:        rgba(244, 241, 234, 0.08);
    --border-strong: rgba(244, 241, 234, 0.18);
    --hairline:      rgba(244, 241, 234, 0.06);

    /* Text */
    --text:    #f4f1ea;
    --text-2:  #a8a39a;
    --text-3:  #6d6862;
    --text-4:  #4a4640;

    /* Accent — signal orange */
    --accent:       #ff5b00;
    --accent-hover: #ff7726;
    --accent-dim:   rgba(255, 91, 0, 0.14);
    --accent-fg:    #0a0a0b;

    /* Status */
    --success:     #5fc879;
    --success-bg:  rgba(95, 200, 121, 0.12);
    --warning:     #ffb13d;
    --warning-bg:  rgba(255, 177, 61, 0.13);
    --danger:      #ff5151;
    --danger-bg:   rgba(255, 81, 81, 0.13);

    /* Type */
    --display: 'Fraunces', 'Times New Roman', serif;
    --body:    'Manrope', system-ui, -apple-system, sans-serif;
    --mono:    'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

    /* Sizing */
    --radius:    4px;
    --radius-md: 8px;
    --radius-lg: 14px;
    --radius-pill: 999px;

    /* Motion */
    --ease-out:   cubic-bezier(0.22, 1, 0.36, 1);
    --ease-soft:  cubic-bezier(0.4, 0, 0.2, 1);
    --t-fast:     140ms;
    --t-base:     220ms;
    --t-slow:     420ms;

    /* Compatibility aliases (legacy class names still in views) */
    --bg-primary:    var(--bg);
    --bg-secondary:  var(--surface);
    --bg-tertiary:   var(--surface-2);
    --bg-card:       var(--surface);
    --bg-card-solid: var(--surface);
    --bg-input:      var(--surface-2);
    --bg-hover:      rgba(244, 241, 234, 0.04);
    --bg-elevated:   var(--surface-2);
    --text-primary:   var(--text);
    --text-secondary: var(--text-2);
    --text-muted:     var(--text-3);
    --border-color:   var(--border);
    --border-subtle:  var(--hairline);
    --glass-bg:       var(--surface);
    --glass-border:   var(--border);
    --transition:     var(--t-base) var(--ease-out);
    --radius-xl:      var(--radius-lg);
}

[data-theme="light"] {
    --bg:        #f5f3ed;
    --bg-alt:    #ece8de;
    --surface:   #ffffff;
    --surface-2: #f0ece2;
    --surface-3: #e3ddcf;
    --surface-hi: #d8d1bf;

    --border:        rgba(26, 24, 23, 0.10);
    --border-strong: rgba(26, 24, 23, 0.22);
    --hairline:      rgba(26, 24, 23, 0.06);

    --text:    #1a1817;
    --text-2:  #534f48;
    --text-3:  #847d72;
    --text-4:  #b3aca0;

    --accent:       #d94600;
    --accent-hover: #ff5b00;
    --accent-dim:   rgba(217, 70, 0, 0.10);
    --accent-fg:    #ffffff;

    --bg-hover: rgba(26, 24, 23, 0.04);
}

/* ─── Reset & Base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

html {
    -webkit-text-size-adjust: 100%;
    text-rendering: optimizeLegibility;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--body);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.55;
    letter-spacing: -0.005em;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255, 91, 0, 0.08), transparent 60%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
    background-attachment: fixed;
    padding-bottom: 60px;
}

[data-theme="light"] body {
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(217, 70, 0, 0.06), transparent 60%);
    background-color: var(--bg);
}

a { color: var(--accent); text-decoration: none; transition: color var(--t-fast) var(--ease-out); }
a:hover { color: var(--accent-hover); }

img, svg { display: block; max-width: 100%; }

::selection { background: var(--accent); color: var(--accent-fg); }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* ─── Typography ───────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--display);
    font-weight: 400;
    font-variation-settings: "opsz" 144, "SOFT" 30;
    letter-spacing: -0.02em;
    line-height: 1.05;
    color: var(--text);
    margin: 0;
}
h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 500; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 500; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1.05rem; font-weight: 600; }

.font-display { font-family: var(--display); letter-spacing: -0.02em; font-variation-settings: "opsz" 144, "SOFT" 30; }
.font-mono    { font-family: var(--mono); letter-spacing: 0; }

.text-xs  { font-size: 11px; line-height: 1.45; }
.text-sm  { font-size: 13px; line-height: 1.5; }
.text-md  { font-size: 15px; }
.text-lg  { font-size: 18px; line-height: 1.4; }
.text-xl  { font-size: 22px; line-height: 1.3; }

.fw-bold      { font-weight: 700; }
.fw-semibold  { font-weight: 600; }
.fw-medium    { font-weight: 500; }
.fw-regular   { font-weight: 400; }

.text-muted     { color: var(--text-3) !important; }
.text-secondary { color: var(--text-2) !important; }
.text-accent    { color: var(--accent) !important; }
.text-success   { color: var(--success) !important; }
.text-warning   { color: var(--warning) !important; }
.text-danger    { color: var(--danger) !important; }
.text-right     { text-align: right; }

/* Numbers default to mono everywhere we explicitly mark them */
.num, .stat-value, .live-timer, time, .last-updated {
    font-family: var(--mono);
    font-feature-settings: "tnum" 1, "ss01" 1;
    letter-spacing: -0.02em;
}

/* ─── Layout ───────────────────────────────────────────────────────── */
.app-content {
    max-width: 920px;
    margin: 0 auto;
    padding: 18px 18px 100px;
    position: relative;
}
@media (min-width: 720px) {
    .app-content { padding: 28px 32px 120px; }
}

/* ─── Header ───────────────────────────────────────────────────────── */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 11, 0.78);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    border-bottom: 1px solid var(--hairline);
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    min-height: 60px;
}
[data-theme="light"] .app-header {
    background: rgba(245, 243, 237, 0.85);
}
.header-left, .header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}
.header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}
.header-brand h1 {
    font-family: var(--display);
    font-weight: 600;
    font-size: 18px;
    margin: 0;
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-variation-settings: "opsz" 24, "SOFT" 30;
}
.header-logo { width: 26px; height: 26px; }
.header-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-2);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out);
    -webkit-tap-highlight-color: transparent;
}
.header-btn:hover, .header-btn:active {
    background: var(--bg-hover);
    color: var(--text);
    border-color: var(--hairline);
}
.notification-btn { position: relative; }
.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: var(--accent);
    color: var(--accent-fg);
    border-radius: var(--radius-pill);
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* ─── Drawer Menu ──────────────────────────────────────────────────── */
.drawer-menu {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
    width: min(86vw, 320px);
    background: var(--bg-alt);
    border-right: 1px solid var(--border);
    transform: translateX(-100%);
    transition: transform var(--t-base) var(--ease-out);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.drawer-menu.open { transform: translateX(0); }
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--t-base) var(--ease-out);
    z-index: 999;
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }
body.drawer-open { overflow: hidden; }

.drawer-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 22px 24px 18px;
    border-bottom: 1px solid var(--hairline);
}
.drawer-logo { width: 30px; height: 30px; }
.drawer-title {
    font-family: var(--display);
    font-size: 22px;
    font-weight: 600;
    flex: 1;
    letter-spacing: -0.02em;
    font-variation-settings: "opsz" 24, "SOFT" 30;
}
.drawer-close {
    width: 32px;
    height: 32px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-2);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.drawer-close:hover { background: var(--bg-hover); color: var(--text); }

.drawer-nav {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}
.drawer-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 11px 24px;
    color: var(--text-2);
    text-decoration: none;
    font-size: 14.5px;
    font-weight: 500;
    transition: color var(--t-fast) var(--ease-out), background var(--t-fast) var(--ease-out);
    position: relative;
}
.drawer-item svg { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.85; }
.drawer-item:hover { color: var(--text); background: var(--bg-hover); }
.drawer-item.active {
    color: var(--text);
    background: linear-gradient(90deg, var(--accent-dim) 0%, transparent 100%);
}
.drawer-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    background: var(--accent);
}
.drawer-item.active svg { color: var(--accent); opacity: 1; }
.drawer-item-danger { color: var(--danger) !important; }
.drawer-divider {
    height: 1px;
    background: var(--hairline);
    margin: 12px 24px;
}

.drawer-footer {
    padding: 18px 24px;
    border-top: 1px solid var(--hairline);
    background: var(--surface);
}
.drawer-user {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.drawer-user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}
.drawer-user-role {
    font-family: var(--mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-3);
}

/* ─── Card ─────────────────────────────────────────────────────────── */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    margin-bottom: 12px;
    transition: border-color var(--t-fast) var(--ease-out), background var(--t-fast) var(--ease-out);
}
.card:hover { border-color: var(--border-strong); }
.card:active { transform: scale(0.997); }

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}
.card-title {
    font-family: var(--display);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.25;
    color: var(--text);
    letter-spacing: -0.015em;
    font-variation-settings: "opsz" 24, "SOFT" 30;
}
.card-subtitle { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.card-body { color: var(--text-2); font-size: 14px; }
.card-footer {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--hairline);
    display: flex;
    justify-content: space-between;
    gap: 8px;
}
.card-link { display: block; text-decoration: none; color: inherit; }
.card-link:hover { color: inherit; }

/* Detail card (used in show/detail views) */
.detail-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 14px;
    overflow: hidden;
}
.detail-card-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--hairline);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface-2);
}
.detail-card-body { padding: 16px 18px; }
.detail-row {
    display: flex;
    gap: 16px;
    padding: 8px 0;
    border-bottom: 1px solid var(--hairline);
}
.detail-row:last-child { border-bottom: none; }
.detail-label {
    font-family: var(--mono);
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-3);
    min-width: 130px;
}
.detail-value { color: var(--text); font-size: 14px; flex: 1; }
.detail-section { margin-bottom: 22px; }
.detail-title { font-family: var(--display); font-size: 18px; font-weight: 600; }

/* ─── Buttons ──────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--radius);
    font-family: var(--body);
    font-size: 14px;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--t-fast) var(--ease-out);
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    letter-spacing: -0.005em;
    min-height: 44px;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
    background: var(--accent);
    color: var(--accent-fg);
}
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-fg); }

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

.btn-success { background: var(--success); color: #07140a; }
.btn-warning { background: var(--warning); color: #1a0f00; }
.btn-danger  { background: var(--danger);  color: #fff; }

.btn-ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
}
.btn-ghost:hover { background: var(--bg-hover); border-color: var(--border-strong); color: var(--text); }

.btn-accent { background: var(--accent); color: var(--accent-fg); }
.btn-accent:hover { background: var(--accent-hover); color: var(--accent-fg); }

.btn-sm  { padding: 8px 14px; font-size: 12.5px; min-height: 36px; }
.btn-lg  { padding: 16px 26px; font-size: 15px; min-height: 52px; }
.btn-block { width: 100%; }
.btn-icon {
    padding: 0;
    width: 44px;
    min-height: 44px;
    height: 44px;
}
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* ─── Forms ────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label {
    display: block;
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-3);
    margin-bottom: 8px;
}
.form-input, .form-select, .form-textarea {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: var(--radius);
    padding: 12px 14px;
    font-family: var(--body);
    font-size: 14px;
    line-height: 1.4;
    transition: border-color var(--t-fast) var(--ease-out), background var(--t-fast) var(--ease-out);
    font-feature-settings: "ss01" 1, "tnum" 1;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--surface-2);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-3); }
.form-textarea { min-height: 90px; resize: vertical; font-family: var(--body); }
.form-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a8a39a' stroke-width='2'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}
input[type="checkbox"], input[type="radio"] {
    accent-color: var(--accent);
    width: 18px;
    height: 18px;
}
input[type="date"], input[type="datetime-local"], input[type="time"] {
    color-scheme: dark;
}
[data-theme="light"] input[type="date"],
[data-theme="light"] input[type="datetime-local"],
[data-theme="light"] input[type="time"] {
    color-scheme: light;
}

/* ─── Search Bar ───────────────────────────────────────────────────── */
.search-bar {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0 14px;
    margin-bottom: 14px;
}
.search-bar svg {
    width: 16px;
    height: 16px;
    color: var(--text-3);
    flex-shrink: 0;
}
.search-bar input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text);
    font-family: var(--body);
    font-size: 14px;
    padding: 12px 0;
    outline: none;
}
.search-bar input::placeholder { color: var(--text-3); }
.search-bar:focus-within { border-color: var(--accent); }

/* ─── Filter Chips ─────────────────────────────────────────────────── */
.filter-bar {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-bottom: 14px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    color: var(--text-2);
    font-family: var(--body);
    font-size: 12.5px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--t-fast) var(--ease-out);
    scroll-snap-align: start;
    flex-shrink: 0;
}
.filter-chip:hover { color: var(--text); border-color: var(--border-strong); }
.filter-chip.active {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
}

/* ─── Section Header ───────────────────────────────────────────────── */
.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 22px 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--hairline);
}
.section-title {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-3);
}
.section-link {
    font-size: 12px;
    color: var(--accent);
}

/* ─── Stats Grid ───────────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    margin-bottom: 22px;
    border-top: 1px solid var(--border);
    border-left: 1px solid var(--border);
}
.stat-card {
    background: transparent;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 18px 16px;
    position: relative;
    transition: background var(--t-fast) var(--ease-out);
    text-decoration: none;
    color: inherit;
    display: block;
}
.stat-card:hover { background: var(--bg-hover); }
.stat-value {
    font-family: var(--mono);
    font-size: 26px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.03em;
    line-height: 1.1;
    font-feature-settings: "tnum" 1, "ss01" 1;
}
.stat-label {
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.10em;
    color: var(--text-3);
    margin-top: 6px;
}
.stat-card.accent .stat-value  { color: var(--accent); }
.stat-card.success .stat-value { color: var(--success); }
.stat-card.warning .stat-value { color: var(--warning); }
.stat-card.danger .stat-value  { color: var(--danger); }

/* On wider screens — more columns */
@media (min-width: 600px) {
    .stats-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
    .stats-grid { grid-template-columns: repeat(5, 1fr); }
}

.stat-grid { /* legacy alias */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

/* ─── Badges ───────────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-family: var(--mono);
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1.4;
    background: var(--surface-3);
    color: var(--text);
}
.badge-success  { background: var(--success-bg); color: var(--success); }
.badge-warning  { background: var(--warning-bg); color: var(--warning); }
.badge-danger   { background: var(--danger-bg);  color: var(--danger); }
.badge-accent   { background: var(--accent-dim); color: var(--accent); }
.badge-default, .badge-secondary { background: var(--surface-3); color: var(--text-2); }
.badge-primary  { background: var(--accent); color: var(--accent-fg); }
.badge-muted    { background: transparent; color: var(--text-3); border: 1px solid var(--border); }

/* ─── Alerts ───────────────────────────────────────────────────────── */
.alert {
    padding: 12px 14px;
    border-radius: var(--radius);
    font-size: 13.5px;
    margin-bottom: 14px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}
.alert-success { background: var(--success-bg); color: var(--success); border-color: var(--success); }
.alert-error   { background: var(--danger-bg);  color: var(--danger);  border-color: var(--danger); }

/* ─── Empty State ──────────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-3);
}
.empty-state svg {
    width: 40px;
    height: 40px;
    margin: 0 auto 14px;
    opacity: 0.5;
}
.empty-state p {
    font-family: var(--display);
    font-size: 18px;
    font-weight: 400;
    color: var(--text-2);
    margin: 0;
    letter-spacing: -0.01em;
    font-style: italic;
}

/* ─── Pagination ───────────────────────────────────────────────────── */
.pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin: 22px 0;
}
.pagination-item, .pagination a {
    min-width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-2);
    font-family: var(--mono);
    font-size: 12px;
    text-decoration: none;
    transition: all var(--t-fast) var(--ease-out);
}
.pagination-item.active, .pagination a.active {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
}
.pagination-item:hover, .pagination a:hover { border-color: var(--text); color: var(--text); }
.pagination-info { color: var(--text-3); font-family: var(--mono); font-size: 11px; }

/* ─── FAB ──────────────────────────────────────────────────────────── */
.fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 90;
    width: 56px;
    height: 56px;
    background: var(--accent);
    color: var(--accent-fg);
    border: 1px solid var(--accent);
    border-radius: var(--radius-pill);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 300;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(255, 91, 0, 0.32), 0 2px 6px rgba(0, 0, 0, 0.4);
    transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out);
}
.fab:hover { background: var(--accent-hover); color: var(--accent-fg); transform: translateY(-2px); }
.fab:active { transform: scale(0.95); }

/* ─── Modal ────────────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1500;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--t-base) var(--ease-out);
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1501;
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-height: 85vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform var(--t-base) var(--ease-out);
}
.modal-panel.open { transform: translateY(0); }
.modal-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--hairline);
    position: sticky;
    top: 0;
    background: inherit;
    z-index: 1;
}
.modal-panel-title {
    font-family: var(--display);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.modal-close {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-2);
    font-size: 18px;
    width: 32px;
    height: 32px;
    border-radius: var(--radius);
    cursor: pointer;
    line-height: 1;
}
.modal-panel-body { padding: 20px; }

@media (min-width: 720px) {
    .modal-panel {
        bottom: auto;
        top: 50%;
        left: 50%;
        right: auto;
        transform: translate(-50%, -50%) scale(0.96);
        opacity: 0;
        width: 520px;
        max-height: 80vh;
        border-radius: var(--radius-lg);
        border: 1px solid var(--border);
    }
    .modal-panel.open { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* ─── Action Sheet ─────────────────────────────────────────────────── */
.action-sheet-overlay {
    position: fixed;
    inset: 0;
    z-index: 1500;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--t-base) var(--ease-out);
}
.action-sheet-overlay.open { opacity: 1; pointer-events: auto; }
.action-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1501;
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    padding: 8px 0 24px;
    transform: translateY(100%);
    transition: transform var(--t-base) var(--ease-out);
    max-height: 85vh;
    overflow-y: auto;
}
.action-sheet.open { transform: translateY(0); }
.action-sheet-handle {
    width: 36px;
    height: 4px;
    background: var(--border-strong);
    border-radius: 2px;
    margin: 8px auto 14px;
}
.action-sheet-title {
    font-family: var(--display);
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    color: var(--text-2);
    padding: 0 20px 12px;
}
.action-sheet-item {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 14px 24px;
    background: transparent;
    border: none;
    color: var(--text);
    font-family: var(--body);
    font-size: 14.5px;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background var(--t-fast) var(--ease-out);
}
.action-sheet-item:hover { background: var(--bg-hover); }

/* ─── Notification Panel ───────────────────────────────────────────── */
.notification-panel {
    position: fixed;
    top: 70px;
    right: 12px;
    z-index: 200;
    width: min(380px, calc(100vw - 24px));
    max-height: 70vh;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transform: translateY(-8px) scale(0.97);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--t-base) var(--ease-out), transform var(--t-base) var(--ease-out);
    display: flex;
    flex-direction: column;
}
.notification-panel.open { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }
.notification-overlay {
    position: fixed; inset: 0; z-index: 199; background: transparent;
    pointer-events: none;
}
.notification-overlay.open { pointer-events: auto; }
.notification-panel-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px; border-bottom: 1px solid var(--hairline);
}
.notification-panel-title {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.10em;
    color: var(--text-3);
}
.notification-panel-list { overflow-y: auto; flex: 1; }

/* ─── Bulk Bar ─────────────────────────────────────────────────────── */
.bulk-bar {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 90;
    background: var(--bg-alt);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-pill);
    padding: 8px 12px 8px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}
.bulk-bar-count {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text);
}
.bulk-bar-actions { display: flex; gap: 6px; }

/* ─── Login ────────────────────────────────────────────────────────── */
.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 32px 22px 60px;
    max-width: 480px;
    margin: 0 auto;
    position: relative;
}
.login-logo { display: flex; align-items: center; gap: 12px; margin-top: 16px; margin-bottom: 36px; }
.login-logo-img { width: 32px; height: 32px; }
.login-mark {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.30em;
    color: var(--text-3);
    text-transform: uppercase;
    padding-top: 2px;
}
.login-headline {
    font-family: var(--display);
    color: var(--text);
    font-size: clamp(3rem, 14vw, 5.6rem);
    font-weight: 500;
    line-height: 0.92;
    letter-spacing: -0.035em;
    margin: 0 0 18px;
    font-variation-settings: "opsz" 144, "SOFT" 30;
}
.login-headline em.login-headline-italic {
    font-style: italic;
    font-weight: 400;
    color: var(--accent);
    font-variation-settings: "opsz" 144, "SOFT" 100;
}
.login-headline em.login-headline-italic::after {
    content: '↘';
    margin-left: 0.18em;
    font-style: normal;
    font-weight: 300;
    color: var(--accent);
    font-size: 0.6em;
    vertical-align: 0.4em;
}
.login-subline {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    color: var(--text-3);
    text-transform: uppercase;
    margin-bottom: 36px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--hairline);
}
.login-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px 22px;
}
.login-submit {
    position: relative;
}
.login-submit-arrow {
    transition: transform var(--t-base) var(--ease-out);
    display: inline-block;
}
.login-submit:hover .login-submit-arrow {
    transform: translateX(4px);
}
.login-footer {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    margin-top: 36px;
    padding-top: 20px;
    border-top: 1px solid var(--hairline);
}
.login-footer .sys-tag {
    font-family: var(--mono);
    font-size: 9.5px;
    letter-spacing: 0.18em;
    color: var(--text-3);
    text-transform: uppercase;
}
.login-footer .sys-sep { color: var(--text-4); font-family: var(--mono); }

/* legacy aliases kept for any older view */
.login-subtitle { font-family: var(--display); font-size: 28px; }
.login-form { margin: 0; }

/* ─── Dashboard / Greeting ─────────────────────────────────────────── */
.dashboard-greeting {
    margin: 6px 0 26px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--hairline);
}
.greeting-text {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-3);
}
.greeting-name {
    font-family: var(--display);
    font-size: clamp(2rem, 7vw, 3.4rem);
    font-weight: 500;
    line-height: 0.98;
    letter-spacing: -0.025em;
    color: var(--text);
    margin-top: 4px;
    font-variation-settings: "opsz" 144, "SOFT" 30;
}
.greeting-name::after {
    content: '';
    display: inline-block;
    width: 0.4em;
    height: 0.18em;
    background: var(--accent);
    vertical-align: 0.1em;
    margin-left: 0.18em;
}
.greeting-date {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-3);
    margin-top: 10px;
    letter-spacing: 0.05em;
}

/* ─── Chart Container ──────────────────────────────────────────────── */
.chart-container {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    margin-bottom: 18px;
}
.chart-title {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.10em;
    color: var(--text-3);
    margin-bottom: 14px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

/* ─── Live Timer ───────────────────────────────────────────────────── */
.live-timer {
    font-family: var(--mono);
    font-size: 24px;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: -0.02em;
    font-feature-settings: "tnum" 1;
}
.timer-pulse {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    margin-right: 8px;
    animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.4; transform: scale(0.7); }
}

/* ─── List Group (Dashboard sections) ──────────────────────────────── */
.list-group {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 18px;
    background: var(--surface);
}
.list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--hairline);
    color: inherit;
    text-decoration: none;
    transition: background var(--t-fast) var(--ease-out);
}
.list-item:last-child { border-bottom: none; }
.list-item:hover { background: var(--bg-hover); }
.list-item-content { flex: 1; min-width: 0; }
.list-item-title {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.list-item-subtitle {
    font-size: 12px;
    color: var(--text-3);
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.list-item-meta { font-family: var(--mono); font-size: 11px; margin-top: 4px; color: var(--text-3); }

/* ─── System Footer ────────────────────────────────────────────────── */
.system-footer {
    margin-top: 60px;
    padding-top: 22px;
    border-top: 1px solid var(--hairline);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}
.system-footer .sys-tag {
    font-family: var(--mono);
    font-size: 9.5px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--text-3);
}
.system-footer .sys-sep { color: var(--text-4); font-family: var(--mono); }

/* ─── Last Updated ─────────────────────────────────────────────────── */
.last-updated {
    text-align: center;
    color: var(--text-3);
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.10em;
    margin-top: 32px;
    padding-top: 18px;
    border-top: 1px solid var(--hairline);
    text-transform: uppercase;
}
.last-updated::before { content: '↳ '; color: var(--accent); }

/* ─── Animations ───────────────────────────────────────────────────── */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.animate-in { animation: fadeIn 0.5s var(--ease-out) both; }

/* Stagger children */
.animate-in > * { animation: fadeIn 0.5s var(--ease-out) both; }
.animate-in > *:nth-child(1) { animation-delay: 0.04s; }
.animate-in > *:nth-child(2) { animation-delay: 0.08s; }
.animate-in > *:nth-child(3) { animation-delay: 0.12s; }
.animate-in > *:nth-child(4) { animation-delay: 0.16s; }
.animate-in > *:nth-child(5) { animation-delay: 0.20s; }
.animate-in > *:nth-child(6) { animation-delay: 0.24s; }
.animate-in > *:nth-child(7) { animation-delay: 0.28s; }
.animate-in > *:nth-child(n+8) { animation-delay: 0.32s; }

/* ─── Utilities ────────────────────────────────────────────────────── */
.d-flex { display: flex; }
.d-block { display: block; }
.d-none { display: none; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.align-items-center { align-items: center; }
.gap-1 { gap: 6px; }
.gap-2 { gap: 12px; }
.gap-3 { gap: 18px; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 14px; }
.mb-3 { margin-bottom: 22px; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 14px; }
.mt-3 { margin-top: 22px; }
.p-0 { padding: 0 !important; }
.w-full { width: 100%; }

/* ─── Tables ───────────────────────────────────────────────────────── */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}
.table th {
    text-align: left;
    padding: 10px 14px;
    font-family: var(--mono);
    font-size: 10.5px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-3);
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
}
.table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--hairline);
    color: var(--text);
}
.table tr:hover td { background: var(--bg-hover); }

/* ─── Tabs ─────────────────────────────────────────────────────────── */
.tabs, .tab-bar {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 18px;
    overflow-x: auto;
    scrollbar-width: none;
}
.tabs::-webkit-scrollbar, .tab-bar::-webkit-scrollbar { display: none; }
.tab {
    padding: 10px 16px;
    font-family: var(--body);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-3);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: color var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out);
    cursor: pointer;
    background: transparent;
    border-top: none;
    border-left: none;
    border-right: none;
    white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-color: var(--accent); }

/* ─── Global Search Overlay ────────────────────────────────────────── */
.global-search-overlay {
    position: fixed;
    inset: 0;
    z-index: 1500;
    background: rgba(10, 10, 11, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--t-base) var(--ease-out);
    padding: 80px 18px 18px;
    overflow-y: auto;
}
.global-search-overlay.open { opacity: 1; pointer-events: auto; }
.global-search-container {
    max-width: 680px;
    margin: 0 auto;
}
.global-search-input-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    padding: 0 18px;
    margin-bottom: 18px;
}
.global-search-input-wrap svg { width: 18px; height: 18px; color: var(--text-3); }
.global-search-input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text);
    font-family: var(--display);
    font-size: 22px;
    font-weight: 500;
    padding: 18px 0;
    outline: none;
    letter-spacing: -0.01em;
}
.global-search-close {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-2);
    width: 32px; height: 32px;
    border-radius: var(--radius);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}
.global-search-results {
    color: var(--text-2);
}

/* ─── Kanban Board ─────────────────────────────────────────────────── */
.kanban-board {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(260px, 1fr);
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 12px;
    scrollbar-width: thin;
}
.kanban-column {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px;
    min-height: 200px;
}
.kanban-column-header {
    font-family: var(--mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-3);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.kanban-card {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 8px;
    cursor: grab;
}
.kanban-card:hover { border-color: var(--border-strong); }
.kanban-compact .kanban-card .d-flex { display: none !important; }

/* ─── Yarn Cards ───────────────────────────────────────────────────── */
.yarn-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}
.yarn-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.yarn-card-swatch {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.yarn-card-name { font-size: 13px; font-weight: 600; color: var(--text); }
.yarn-card-code { font-family: var(--mono); font-size: 10.5px; color: var(--text-3); }
.yarn-card-info { display: flex; justify-content: space-between; align-items: center; }
.yarn-stock-badge {
    font-family: var(--mono);
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
}
.yarn-stock-ok   { background: var(--success-bg); color: var(--success); }
.yarn-stock-low  { background: var(--warning-bg); color: var(--warning); }
.yarn-stock-none { background: var(--danger-bg);  color: var(--danger); }

/* ─── Machine Grid ─────────────────────────────────────────────────── */
.machine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

/* ─── Private toggle (settings) ────────────────────────────────────── */
.private-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 18px;
}
.private-toggle-info { flex: 1; }
.private-toggle-title { font-size: 14px; font-weight: 600; }
.private-toggle-desc { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.private-toggle-switch {
    width: 44px; height: 26px;
    background: var(--surface-3);
    border-radius: 13px;
    position: relative;
    cursor: pointer;
    border: 1px solid var(--border);
    transition: background var(--t-fast) var(--ease-out);
}
.private-toggle-switch.on { background: var(--accent); border-color: var(--accent); }
.private-toggle-knob {
    position: absolute;
    top: 2px; left: 2px;
    width: 20px; height: 20px;
    background: var(--bg);
    border-radius: 50%;
    transition: transform var(--t-fast) var(--ease-out);
}
.private-toggle-switch.on .private-toggle-knob { transform: translateX(18px); background: var(--bg); }
.toggle-track { /* alias */ background: var(--surface-3); }

/* ─── Section Helpers ──────────────────────────────────────────────── */
.detail-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 22px;
}

/* ─── Chat ─────────────────────────────────────────────────────────── */
.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    min-height: 320px;
}
.chat-bubble {
    max-width: 78%;
    padding: 10px 14px;
    background: var(--surface-2);
    border-radius: var(--radius-md);
    font-size: 14px;
    line-height: 1.5;
}
.chat-bubble.outgoing {
    align-self: flex-end;
    background: var(--accent);
    color: var(--accent-fg);
}

/* ─── Page enter — global ──────────────────────────────────────────── */
@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;
    }
}

/* ─── Responsive Tweaks ────────────────────────────────────────────── */
@media (max-width: 480px) {
    body { font-size: 14.5px; }
    .app-content { padding: 16px 14px 100px; }
    .card { padding: 14px 16px; }
    .stat-card { padding: 14px 12px; }
    .stat-value { font-size: 22px; }
    .filter-chip { padding: 7px 12px; font-size: 12px; }
    .btn-lg { padding: 14px 22px; font-size: 14.5px; }
}
