/* ==========================================================================
   wa-console — design tokens
   ========================================================================== */
:root {
  /* DriveMe palette — mirrors DriveMe/theme/driveMeTheme.js */
  --bg: #F8FAFC;             /* slate 50 */
  --surface: #FFFFFF;
  --surface-2: #F8FAFC;      /* slate 50 */
  --surface-3: #F1F5F9;      /* slate 100 */
  --border: #E2E8F0;         /* slate 200 */
  --border-strong: #CBD5E1;  /* slate 300 */
  --text: #0F172A;           /* slate 900 */
  --text-2: #475569;         /* slate 600 */
  --text-3: #64748B;         /* slate 500 */

  --brand: #4338CA;          /* indigo 700 */
  --brand-strong: #3730A3;   /* indigo 800 */
  --brand-soft: #EEF2FF;     /* indigo 50 */
  --on-brand: #FFFFFF;
  --ring: rgba(99, 102, 241, .28);        /* indigo 500 focus */
  --brand-shadow: rgba(67, 56, 202, .35);

  --accent: #0D9488;  --accent-soft: #F0FDFA;  /* teal 600 / 50 */
  --success: #15803D; --success-soft: #F0FDF4; /* green 700 / 50 */
  --warn: #B45309;    --warn-soft: #FFFBEB;    /* amber 700 / 50 */
  --danger: #DC2626;  --danger-soft: #FEF2F2;  /* red 600 / 50 */
  --info: #4F46E5;    --info-soft: #EEF2FF;    /* indigo 600 / 50 */
  --neutral: #475569; --neutral-soft: #F1F5F9; /* slate 600 / 100 */

  --sidebar: #1E1B4B;        /* indigo 950 */
  --sidebar-hover: rgba(255, 255, 255, .06);
  --sidebar-text: #C7D2FE;   /* indigo 200 */
  --sidebar-muted: #818CF8;  /* indigo 400 */
  --sidebar-line: rgba(255, 255, 255, .08);
  --sidebar-active: rgba(129, 140, 248, .18);
  --sidebar-accent: #2DD4BF; /* teal 400 */

  --wa-bar: #075e54;
  --wa-chat: #efeae2;
  --wa-dots: rgba(0, 0, 0, .045);
  --wa-bubble: #ffffff;
  --wa-text: #111b21;
  --wa-meta: #667781;
  --wa-link: #027eb5;
  --wa-var: #d9fdd3;
  --wa-var-text: #0a6c46;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .04);
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 2px 6px rgba(16, 24, 40, .04);
  --shadow-lg: 0 24px 48px -12px rgba(16, 24, 40, .22), 0 4px 12px rgba(16, 24, 40, .06);

  --radius: 14px;
  --radius-sm: 9px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;
  --font-display: "Hanken Grotesk", var(--font);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #020617; --surface: #0F172A; --surface-2: #131C31; --surface-3: #1E293B;
    --border: #1E293B; --border-strong: #334155;
    --text: #F1F5F9; --text-2: #CBD5E1; --text-3: #94A3B8;
    --brand: #6366F1; --brand-strong: #4F46E5; --brand-soft: rgba(99, 102, 241, .16); --on-brand: #FFFFFF; --ring: rgba(129, 140, 248, .35); --brand-shadow: rgba(99, 102, 241, .35);
    --accent: #2DD4BF; --accent-soft: rgba(20, 184, 166, .14);
    --success: #4ADE80; --success-soft: rgba(34, 197, 94, .14);
    --warn: #FBBF24; --warn-soft: rgba(245, 158, 11, .14);
    --danger: #F87171; --danger-soft: rgba(239, 68, 68, .14);
    --info: #A5B4FC; --info-soft: rgba(99, 102, 241, .16);
    --neutral: #94A3B8; --neutral-soft: rgba(148, 163, 184, .12);
    --sidebar: #0B0A24; --sidebar-line: rgba(255, 255, 255, .06);
    --wa-bar: #202c33; --wa-chat: #0b141a; --wa-dots: rgba(255, 255, 255, .03); --wa-bubble: #202c33;
    --wa-text: #e9edef; --wa-meta: #8696a0; --wa-link: #53bdeb; --wa-var: rgba(0, 168, 132, .25); --wa-var-text: #7ae3c3;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 2px 8px rgba(0, 0, 0, .2);
    --shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #020617; --surface: #0F172A; --surface-2: #131C31; --surface-3: #1E293B;
  --border: #1E293B; --border-strong: #334155;
  --text: #F1F5F9; --text-2: #CBD5E1; --text-3: #94A3B8;
  --brand: #6366F1; --brand-strong: #4F46E5; --brand-soft: rgba(99, 102, 241, .16); --on-brand: #FFFFFF; --ring: rgba(129, 140, 248, .35); --brand-shadow: rgba(99, 102, 241, .35);
  --accent: #2DD4BF; --accent-soft: rgba(20, 184, 166, .14);
  --success: #4ADE80; --success-soft: rgba(34, 197, 94, .14);
  --warn: #FBBF24; --warn-soft: rgba(245, 158, 11, .14);
  --danger: #F87171; --danger-soft: rgba(239, 68, 68, .14);
  --info: #A5B4FC; --info-soft: rgba(99, 102, 241, .16);
  --neutral: #94A3B8; --neutral-soft: rgba(148, 163, 184, .12);
  --sidebar: #0B0A24; --sidebar-line: rgba(255, 255, 255, .06);
  --wa-bar: #202c33; --wa-chat: #0b141a; --wa-dots: rgba(255, 255, 255, .03); --wa-bubble: #202c33;
  --wa-text: #e9edef; --wa-meta: #8696a0; --wa-link: #53bdeb; --wa-var: rgba(0, 168, 132, .25); --wa-var-text: #7ae3c3;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 2px 8px rgba(0, 0, 0, .2);
  --shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

/* ==========================================================================
   base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 14px/1.5 var(--font);
  font-feature-settings: "cv11", "ss01";
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4 { margin: 0; letter-spacing: -.015em; font-family: var(--font-display); }
.brand-name, .kpi-value, .card-title, .section-title, .status-hero-title, .empty-title { font-family: var(--font-display); }
p { margin: 0; }
button { font: inherit; color: inherit; }
::selection { background: var(--ring); }

.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon-sm { width: 15px; height: 15px; }
.icon-xs { width: 12px; height: 12px; stroke-width: 2.2; }

.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: 12.5px; }
.mono { font-family: var(--mono); font-size: 12.5px; letter-spacing: -.01em; }
.m0 { margin: 0; }
.nowrap { white-space: nowrap; }
.text-danger { color: var(--danger); }
.text-warn { color: var(--warn); }
.truncate { display: inline-block; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }

/* top loading bar */
#progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 400; overflow: hidden; opacity: 0; transition: opacity .2s; pointer-events: none; }
#progress.active { opacity: 1; }
#progress::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 35%; background: linear-gradient(90deg, transparent, var(--brand), transparent); animation: progress 1s ease-in-out infinite; }
@keyframes progress { from { transform: translateX(-100%); } to { transform: translateX(300%); } }

/* ==========================================================================
   buttons & inputs
   ========================================================================== */
.btn {
  --spin: var(--text-2);
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 500; line-height: 1; white-space: nowrap;
  cursor: pointer; user-select: none;
  transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s, transform .05s;
}
.btn:active:not(:disabled) { transform: translateY(.5px); }
.btn:focus-visible, .icon-btn:focus-visible, .chip:focus-visible, .nav-item:focus-visible, .kpi-link:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
.btn:disabled { cursor: default; opacity: .6; }
.btn .icon { width: 16px; height: 16px; }
.btn-primary { --spin: var(--on-brand); background: var(--brand); color: var(--on-brand); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 4px 12px -4px var(--brand-shadow); }
.btn-primary:hover:not(:disabled) { background: var(--brand-strong); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-3); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-3); color: var(--text); }
.btn-danger { --spin: #fff; background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { filter: brightness(.94); }
.btn-danger-ghost { --spin: var(--danger); background: transparent; color: var(--danger); }
.btn-danger-ghost:hover:not(:disabled) { background: var(--danger-soft); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; gap: 6px; }
.btn-sm .icon { width: 14px; height: 14px; }
.btn-lg { height: 44px; font-size: 14.5px; }
.btn-block { width: 100%; }
.is-loading { color: transparent !important; }
.is-loading::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 15px; height: 15px; margin: -7.5px 0 0 -7.5px;
  border: 2px solid var(--spin); border-right-color: transparent; border-radius: 50%;
  animation: spin .6s linear infinite;
}
.icon-btn.is-loading::after { --spin: var(--text-2); }
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; padding: 0;
  border: 0; border-radius: 8px; background: transparent; color: var(--text-2);
  cursor: pointer; transition: background-color .15s, color .15s;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn-dark { color: var(--sidebar-text); }
.icon-btn-dark:hover { background: var(--sidebar-hover); color: #fff; }

.input {
  display: block; width: 100%; height: 38px; padding: 0 12px;
  font: inherit; font-size: 14px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.input::placeholder { color: var(--text-3); }
.input:hover:not(:disabled):not(:focus) { border-color: var(--text-3); }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
.input:disabled { background: var(--surface-3); color: var(--text-2); cursor: not-allowed; }
.input.invalid { border-color: var(--danger); }
.input-lg { height: 44px; font-size: 14.5px; }
textarea.input { height: auto; min-height: 96px; padding: 10px 12px; line-height: 1.6; resize: vertical; }
textarea.textarea-body { min-height: 180px; font-size: 14.5px; }
textarea.mono { font-size: 12.5px; }
select.input {
  appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238c96a5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px;
}
.input-wrap { position: relative; display: block; }
.input-wrap .input { padding-right: 44px; }
.input-affix { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label { font-size: 13px; font-weight: 500; color: var(--text); }
.field-hint { font-size: 12px; color: var(--text-3); }
.field-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.counter { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.counter.over { color: var(--danger); font-weight: 600; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.span-2 { grid-column: 1 / -1; }
.form-error { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--danger-soft); color: var(--danger); font-size: 13px; white-space: pre-wrap; }

.check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.check { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; transition: border-color .15s, background-color .15s; }
.check:hover { border-color: var(--border-strong); }
.check input { margin: 2px 0 0; accent-color: var(--brand); width: 15px; height: 15px; flex: none; }
.check:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.check-title { font-size: 13px; font-weight: 500; text-transform: capitalize; }
.check-desc { font-size: 12px; color: var(--text-3); line-height: 1.4; }

.stack-sm { display: grid; gap: 14px; min-width: 0; }
.form-divider { display: flex; align-items: center; gap: 10px; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.form-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* per-variable parameter editor */
.var-rows { display: grid; gap: 8px; min-width: 0; }
.var-row { display: grid; grid-template-columns: 54px minmax(0, 1.3fr) 118px 62px minmax(0, 1fr); gap: 8px; align-items: center; }
.var-row .input { height: 34px; font-size: 13px; }
.var-head { font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); }
.var-chip { display: inline-block; padding: 3px 6px; border-radius: 6px; background: var(--brand-soft); color: var(--brand); font-family: var(--mono); font-size: 12px; text-align: center; }
.input-code { text-transform: uppercase; }
@media (max-width: 720px) {
  .var-row { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
  .var-head { display: none; }
  .var-chip { justify-self: start; }
}

/* ==========================================================================
   badges, tags, chips, avatars
   ========================================================================== */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 12px; font-weight: 500; line-height: 1; white-space: nowrap; text-transform: capitalize;
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.t-success { color: var(--success); background: var(--success-soft); }
.t-warn    { color: var(--warn);    background: var(--warn-soft); }
.t-danger  { color: var(--danger);  background: var(--danger-soft); }
.t-info    { color: var(--info);    background: var(--info-soft); }
.t-neutral { color: var(--neutral); background: var(--neutral-soft); }
.t-brand   { color: var(--brand);   background: var(--brand-soft); }
.t-accent  { color: var(--accent);  background: var(--accent-soft); }

.tag {
  display: inline-flex; align-items: center; height: 22px; padding: 0 7px;
  border: 1px solid var(--border); border-radius: 6px; background: var(--surface-2);
  font-family: var(--mono); font-size: 11.5px; color: var(--text-2); white-space: nowrap;
}
.tag.cap { font-family: var(--font); font-size: 12px; text-transform: capitalize; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
  font-size: 13px; font-weight: 500; color: var(--text-2); text-transform: capitalize;
  cursor: pointer; transition: all .15s;
}
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip.active { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.chip-count { font-size: 11.5px; opacity: .6; font-variant-numeric: tabular-nums; }

.avatar {
  --h: 160;
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 32px; height: 32px; border-radius: 50%;
  background: hsl(var(--h) 55% 42%); color: #fff;
  font-size: 12px; font-weight: 600; letter-spacing: .02em;
}
.avatar-sm { width: 24px; height: 24px; font-size: 10px; }

/* ==========================================================================
   sign in
   ========================================================================== */
.auth { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); min-height: 100vh; }
.auth-brand {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  padding: 44px 56px; color: #EEF2FF;
  background:
    radial-gradient(900px 520px at 0% 0%, rgba(99, 102, 241, .35), transparent 60%),
    radial-gradient(700px 480px at 100% 100%, rgba(13, 148, 136, .5), transparent 60%),
    linear-gradient(160deg, #1E1B4B 0%, #312E81 55%, #134E4A 100%);
}
.auth-brand::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%);
}
.auth-brand > * { position: relative; z-index: 1; }
.auth-hero { max-width: 500px; }
.auth-hero h2 { font-size: 38px; line-height: 1.12; font-weight: 650; letter-spacing: -.035em; color: #fff; }
.auth-hero > p { margin-top: 14px; font-size: 16px; line-height: 1.6; color: #C7D2FE; }
.auth-preview { margin: 34px 0 30px; max-width: 400px; }
.ap-chip { display: inline-block; margin-bottom: 10px; padding: 5px 10px; border-radius: 999px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); font-family: var(--mono); font-size: 11.5px; color: #C7D2FE; }
.ap-chip b { color: #2DD4BF; font-weight: 500; }
.ap-bubble { position: relative; padding: 12px 14px 22px; border-radius: 4px 14px 14px 14px; background: #1f2c33; color: #e9edef; font-size: 14px; line-height: 1.5; box-shadow: 0 20px 40px -10px rgba(0, 0, 0, .5); }
.ap-var { padding: 0 4px; border-radius: 4px; background: rgba(0, 168, 132, .28); color: #86efc6; }
.ap-time { position: absolute; right: 12px; bottom: 5px; font-size: 11px; color: #8696a0; }
.auth-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.auth-points li { display: flex; align-items: center; gap: 12px; font-size: 14px; color: #E0E7FF; }
.auth-points li > span { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(45, 212, 191, .18); color: #2DD4BF; }
.auth-points .icon { width: 13px; height: 13px; stroke-width: 2.4; }
.auth-foot { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #A5B4FC; }
.auth-foot .icon { width: 14px; height: 14px; }

.auth-panel { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: var(--surface); }
.auth-form { width: 100%; max-width: 380px; display: grid; gap: 18px; }
.auth-form h1 { font-size: 27px; font-weight: 650; letter-spacing: -.03em; }
.auth-form h1 + p { margin-top: 6px; }
.auth-note { text-align: center; font-size: 12.5px; color: var(--text-3); }
.brand-mobile { display: none !important; }

/* ==========================================================================
   app shell
   ========================================================================== */
.shell { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; }

.brand { display: flex; align-items: center; gap: 11px; }
.logo { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 38px; height: 38px; }
.logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.auth-brand .logo { width: 46px; height: 46px; }
.brand-mobile .logo { width: 44px; height: 44px; }
.brand-name { font-size: 15px; font-weight: 650; letter-spacing: -.02em; color: #fff; line-height: 1.2; }
.brand-sub { font-size: 12px; color: var(--sidebar-muted); line-height: 1.3; }
.auth-brand .brand-sub { color: #A5B4FC; }

.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  background: var(--sidebar); color: var(--sidebar-text);
  border-right: 1px solid var(--sidebar-line);
}
.sidebar > .brand { padding: 20px 20px 18px; }
.nav { flex: 1; overflow-y: auto; padding: 4px 12px 16px; scrollbar-width: thin; scrollbar-color: rgba(199, 210, 254, .22) transparent; }
.nav::-webkit-scrollbar { width: 6px; }
.nav::-webkit-scrollbar-track { background: transparent; }
.nav::-webkit-scrollbar-thumb { background: rgba(199, 210, 254, .22); border-radius: 999px; }
.nav-group { margin: 18px 10px 6px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--sidebar-muted); }
.nav-group:first-child { margin-top: 6px; }
.nav-item {
  position: relative;
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 8px 10px; margin: 1px 0;
  border: 0; border-radius: 8px; background: transparent; color: var(--sidebar-text);
  font-size: 13.5px; font-weight: 500; text-align: left; cursor: pointer;
  transition: background-color .15s, color .15s;
}
.nav-item .icon { width: 17px; height: 17px; opacity: .85; }
.nav-item:hover { background: var(--sidebar-hover); color: #fff; }
.nav-item.active { background: var(--sidebar-active); color: #fff; }
.nav-item.active .icon { color: var(--sidebar-accent); opacity: 1; }
.nav-item.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--sidebar-accent); }
.sidebar-foot { display: flex; align-items: center; gap: 10px; padding: 14px 14px 14px 18px; border-top: 1px solid var(--sidebar-line); }
.me-text { flex: 1; min-width: 0; }
.me-name { color: #fff; font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-sub { font-size: 12px; color: var(--sidebar-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-transform: capitalize; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  height: 56px; padding: 0 32px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar .spacer { flex: 1; }
.topbar-path { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-3); }
.topbar-path span:last-child { color: var(--text); font-weight: 500; }
.topbar-path .sep { color: var(--border-strong); }
.menu-btn { display: none; }
.env-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); font-size: 12.5px; font-weight: 600; cursor: help; }
.env-chip .icon { width: 14px; height: 14px; }

.content { width: 100%; max-width: 1320px; margin: 0 auto; padding: 28px 32px 72px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page-head-text { min-width: 0; }
.page-head h1 { font-size: 24px; font-weight: 650; letter-spacing: -.028em; line-height: 1.25; overflow-wrap: anywhere; }
.page-subtitle { margin-top: 4px; color: var(--text-2); font-size: 14px; }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.crumb { margin-bottom: 8px; }
.crumb-link { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--text-2); font-size: 13px; font-weight: 500; cursor: pointer; }
.crumb-link:hover { color: var(--brand); }

.view { animation: fade-in .22s ease-out; }
@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   layout blocks
   ========================================================================== */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.card-title { font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; }
.card-sub { margin-top: 1px; font-size: 12.5px; color: var(--text-3); }
.card-body { padding: 20px; }
.card-body > * + * { margin-top: 14px; }
.card-flush { overflow: hidden; border-radius: 0 0 var(--radius) var(--radius); }

.section { margin-top: 32px; }
.section:first-child { margin-top: 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-title { font-size: 16px; font-weight: 600; }
.section-sub { margin-top: 2px; font-size: 13px; color: var(--text-2); }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-detail { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 20px; align-items: start; }
.stack { display: grid; gap: 20px; min-width: 0; }
.sticky { position: sticky; top: 76px; }
.row-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }

.callout { display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; border: 1px solid transparent; font-size: 13.5px; }
.callout-icon { flex: none; margin-top: 1px; }
.callout-body { min-width: 0; display: grid; gap: 6px; color: var(--text-2); }
.callout-title { font-weight: 600; color: var(--text); }
.c-info    { background: var(--info-soft);    border-color: color-mix(in srgb, var(--info) 18%, transparent); }
.c-info .callout-icon { color: var(--info); }
.c-success { background: var(--success-soft); border-color: color-mix(in srgb, var(--success) 18%, transparent); }
.c-success .callout-icon { color: var(--success); }
.c-warn    { background: var(--warn-soft);    border-color: color-mix(in srgb, var(--warn) 20%, transparent); }
.c-warn .callout-icon { color: var(--warn); }
.c-danger  { background: var(--danger-soft);  border-color: color-mix(in srgb, var(--danger) 20%, transparent); }
.c-danger .callout-icon { color: var(--danger); }
.help-list { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.help-list dt { font-weight: 500; color: var(--text); }
.help-list dd { margin: 0; }

/* ==========================================================================
   dashboard
   ========================================================================== */
.status-hero { display: flex; align-items: center; gap: 14px; padding: 16px 20px; margin-bottom: 20px; border-radius: var(--radius); border: 1px solid transparent; }
.status-hero-text { flex: 1; min-width: 0; }
.status-hero-title { font-size: 15px; font-weight: 600; color: var(--text); }
.status-hero-sub { font-size: 13px; color: var(--text-2); }
.pulse { position: relative; width: 10px; height: 10px; border-radius: 50%; background: var(--tone); flex: none; margin: 0 4px; }
.pulse::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; background: var(--tone); opacity: .35; animation: pulse 2s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(.5); opacity: .5; } 100% { transform: scale(1.6); opacity: 0; } }
.status-hero.c-success { --tone: var(--success); }
.status-hero.c-warn { --tone: var(--warn); }

.progress { height: 8px; margin-top: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: 999px; background: var(--brand); transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.progress-legend { display: flex; justify-content: space-between; gap: 12px; margin-top: 6px; font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.status-hero.c-danger { --tone: var(--danger); }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.kpi {
  --tone: var(--neutral); --tone-soft: var(--neutral-soft);
  position: relative; display: block; width: 100%; padding: 18px; text-align: left;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  color: var(--text); overflow: hidden;
}
.kpi::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--tone); opacity: 0; transition: opacity .2s; }
.kpi-link { cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.kpi-link:hover { border-color: var(--border-strong); box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.kpi-link:hover::before { opacity: 1; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi-label { font-size: 13px; font-weight: 500; color: var(--text-2); }
.kpi-icon { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 9px; background: var(--tone-soft); color: var(--tone); }
.kpi-icon .icon { width: 16px; height: 16px; }
.kpi-value { margin-top: 10px; font-size: 28px; font-weight: 650; letter-spacing: -.03em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.kpi-hint { margin-top: 3px; font-size: 12.5px; color: var(--text-3); }
.tone-success { --tone: var(--success); --tone-soft: var(--success-soft); }
.tone-warn    { --tone: var(--warn);    --tone-soft: var(--warn-soft); }
.tone-danger  { --tone: var(--danger);  --tone-soft: var(--danger-soft); }
.tone-info    { --tone: var(--info);    --tone-soft: var(--info-soft); }
.tone-brand   { --tone: var(--brand);   --tone-soft: var(--brand-soft); }
.tone-accent  { --tone: var(--accent);  --tone-soft: var(--accent-soft); }
.tone-danger .kpi-value { color: var(--danger); }

.list-item { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.list-item:last-child { border-bottom: 0; }
.list-main { flex: 1; min-width: 0; }
.list-title { font-weight: 500; }
.list-sub { color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-side { display: grid; justify-items: end; gap: 4px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.status-dot.is-ok { background: var(--success); box-shadow: 0 0 0 4px var(--success-soft); }
.status-dot.is-bad { background: var(--danger); box-shadow: 0 0 0 4px var(--danger-soft); }

.bars { display: grid; gap: 4px; padding: 6px 0; }
.bar-row { display: grid; grid-template-columns: 130px minmax(0, 1fr) 64px; align-items: center; gap: 14px; }
.bar { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 999px; background: var(--neutral); transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.f-success { background: var(--success); } .f-warn { background: var(--warn); } .f-danger { background: var(--danger); } .f-info { background: var(--info); }
.bar-count { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ==========================================================================
   tables
   ========================================================================== */
.table-card { overflow: hidden; }
.table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.table-toolbar-right { display: flex; align-items: center; gap: 12px; }
.table-count { font-size: 12.5px; color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.search { position: relative; }
.search .icon { position: absolute; left: 10px; top: 50%; width: 15px; height: 15px; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.input-search { height: 34px; width: 260px; max-width: 100%; padding-left: 33px; background: var(--surface-2); box-shadow: none; }
.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table th {
  padding: 10px 16px; text-align: left; white-space: nowrap;
  font-size: 12px; font-weight: 500; color: var(--text-3);
  background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; font-size: 13.5px; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background-color .12s; }
.table tbody tr:not(.empty-row):hover td { background: var(--surface-2); }
.table tr.clickable { cursor: pointer; }
.table .actions-cell { width: 1%; text-align: right; white-space: nowrap; }
.cell-stack { display: grid; gap: 2px; min-width: 0; }
.cell-stack strong { font-weight: 550; }
.cell-user { display: flex; align-items: center; gap: 10px; }
.time-cell { display: grid; gap: 1px; white-space: nowrap; }
.mono-name { font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: -.01em; }
.chev { display: inline-flex; color: var(--text-3); transition: transform .15s, color .15s; }
tr.clickable:hover .chev { color: var(--text); transform: translateX(2px); }
.req { display: flex; align-items: center; gap: 8px; min-width: 0; }
.method { display: inline-flex; align-items: center; justify-content: center; min-width: 50px; height: 20px; padding: 0 6px; border-radius: 5px; font-family: var(--mono); font-size: 11px; font-weight: 600; background: var(--neutral-soft); color: var(--neutral); }
.m-get { background: var(--info-soft); color: var(--info); }
.m-post { background: var(--success-soft); color: var(--success); }
.m-delete { background: var(--danger-soft); color: var(--danger); }

.empty { padding: 44px 20px; text-align: center; }
.empty-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-bottom: 12px; border-radius: 12px; background: var(--surface-3); color: var(--text-3); }
.empty-icon .icon { width: 20px; height: 20px; }
.empty-title { font-size: 14px; font-weight: 600; }
.empty-text { max-width: 380px; margin: 4px auto 0; font-size: 13px; color: var(--text-2); }
.error-state { padding: 48px 20px; text-align: center; }
.error-state .btn { margin-top: 16px; }
.empty-icon.t-danger { background: var(--danger-soft); color: var(--danger); }

/* skeleton */
.skeleton { display: grid; gap: 16px; }
.sk-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.sk { border-radius: var(--radius); background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 50%, var(--surface-3) 75%); background-size: 200% 100%; animation: shimmer 1.3s ease-in-out infinite; }
.sk-kpi { height: 112px; }
.sk-block { height: 320px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ==========================================================================
   template detail & editor
   ========================================================================== */
.status-block { display: flex; align-items: center; gap: 10px; }
.status-block .badge { height: 26px; padding: 0 10px; font-size: 13px; }

.issues { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.issue { display: flex; gap: 10px; padding: 10px 12px; border-radius: 10px; font-size: 13px; }
.issue .icon { width: 16px; height: 16px; margin-top: 1px; }
.issue.is-error { background: var(--danger-soft); color: var(--danger); }
.issue.is-warn { background: var(--warn-soft); color: var(--warn); }
.issue-msg { color: var(--text); }
.issue-field { margin-top: 2px; font-size: 11.5px; color: var(--text-2); }
.check-ok { display: flex; align-items: center; gap: 12px; }
.check-ok-icon { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--success-soft); color: var(--success); flex: none; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 18px 24px; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--brand); }
.timeline li::after { content: ""; position: absolute; left: 4px; top: 19px; bottom: 2px; width: 2px; background: var(--border); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::after { display: none; }
.timeline li.is-bad::before { border-color: var(--danger); }
.tl-title { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.tl-reason { margin-top: 4px; font-size: 13px; color: var(--text-2); }
.tl-meta { margin-top: 3px; font-size: 12px; color: var(--text-3); }

/* WhatsApp phone preview */
.phone { max-width: 360px; margin: 0 auto; border-radius: 22px; overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-lg); }
.phone-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--wa-bar); color: #fff; }
.phone-avatar { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, #4F46E5, #0D9488); font-size: 12px; font-weight: 700; flex: none; }
.phone-avatar img { width: 24px; height: 24px; object-fit: contain; }
.phone-name { font-size: 14px; font-weight: 600; line-height: 1.2; }
.phone-status { font-size: 11.5px; opacity: .75; }
.phone-chat {
  min-height: 300px; padding: 18px 14px 26px;
  background-color: var(--wa-chat);
  background-image: radial-gradient(var(--wa-dots) 1px, transparent 1px);
  background-size: 14px 14px;
}
.bubble {
  position: relative; max-width: 92%; padding: 7px 9px 6px;
  border-radius: 2px 10px 10px 10px; background: var(--wa-bubble); color: var(--wa-text);
  box-shadow: 0 1px .5px rgba(11, 20, 26, .13);
  font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif; font-size: 14.2px; line-height: 1.42;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.bubble::before { content: ""; position: absolute; left: -7px; top: 0; border: 8px solid transparent; border-top-color: var(--wa-bubble); border-right-color: var(--wa-bubble); border-width: 0 8px 10px 0; border-color: transparent var(--wa-bubble) transparent transparent; }
.bubble-header { margin-bottom: 3px; font-weight: 700; }
.bubble-media { display: flex; align-items: center; justify-content: center; height: 120px; margin: -3px -5px 6px; border-radius: 7px; background: rgba(134, 150, 160, .2); color: var(--wa-meta); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.bubble-footer { margin-top: 3px; font-size: 12.8px; color: var(--wa-meta); }
.bubble-time { margin-top: 1px; text-align: right; font-size: 11px; color: var(--wa-meta); }
.bubble-placeholder { color: var(--wa-meta); font-style: italic; }
.var { padding: 0 3px; border-radius: 4px; background: var(--wa-var); color: var(--wa-var-text); font-weight: 600; }
.bubble-buttons { max-width: 92%; display: grid; gap: 2px; margin-top: 2px; }
.bubble-btn { padding: 9px; border-radius: 8px; background: var(--wa-bubble); color: var(--wa-link); text-align: center; font-size: 14px; font-weight: 500; box-shadow: 0 1px .5px rgba(11, 20, 26, .13); }

/* ==========================================================================
   code / JSON
   ========================================================================== */
.code { overflow: hidden; border-radius: 12px; border: 1px solid #1E293B; background: #020617; }
.code-bare { border: 0; border-radius: 0; }
.code-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 6px 14px; background: #0F172A; border-bottom: 1px solid #1E293B; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; color: #7d8590; }
.code-copy { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 8px; border: 0; border-radius: 6px; background: transparent; color: #9da7b3; font-size: 12px; font-weight: 500; letter-spacing: 0; cursor: pointer; }
.code-copy:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.code-copy .icon { width: 13px; height: 13px; }
.code pre { margin: 0; padding: 14px 16px; max-height: 480px; overflow: auto; font-family: var(--mono); font-size: 12.5px; line-height: 1.65; color: #e6edf3; tab-size: 2; }
.j-key { color: #A5B4FC; }
.j-str { color: #99F6E4; }
.j-num { color: #FCD34D; }
.j-lit { color: #F87171; }
.quote { padding: 12px 14px; border-left: 3px solid var(--brand); border-radius: 0 10px 10px 0; background: var(--surface-2); white-space: pre-wrap; overflow-wrap: anywhere; }

/* ==========================================================================
   overlays: modal, drawer, toast
   ========================================================================== */
.overlay {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(15, 23, 42, .5);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  opacity: 0; transition: opacity .18s ease;
}
.overlay.show { opacity: 1; }
.overlay-top { z-index: 200; }
.modal {
  width: 100%; max-width: 500px; max-height: calc(100vh - 40px); overflow: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg);
  transform: translateY(10px) scale(.98); transition: transform .2s cubic-bezier(.2, .8, .2, 1);
}
.overlay.show .modal { transform: none; }
.modal-sm { max-width: 400px; }
.modal-wide { max-width: 640px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 24px 0; }
.modal-head h3 { font-size: 17px; font-weight: 600; }
.modal-head p { margin-top: 4px; font-size: 13.5px; }
.modal-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-bottom: 14px; border-radius: 11px; background: var(--warn-soft); color: var(--warn); }
.modal-body { display: grid; gap: 16px; padding: 20px 24px 22px; }
.modal-head + .modal-foot { margin-top: 22px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 24px; background: var(--surface-2); border-top: 1px solid var(--border); border-radius: 0 0 16px 16px; }

.overlay-drawer { justify-content: flex-end; padding: 0; }
.drawer {
  display: flex; flex-direction: column;
  width: min(580px, 100%); height: 100%;
  background: var(--surface); border-left: 1px solid var(--border); box-shadow: var(--shadow-lg);
  transform: translateX(100%); transition: transform .24s cubic-bezier(.2, .8, .2, 1);
}
.overlay.show .drawer { transform: none; }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.drawer-head h3 { font-size: 17px; font-weight: 600; }
.drawer-head p { margin-top: 3px; overflow-wrap: anywhere; }
.drawer-body { flex: 1; overflow: auto; display: grid; align-content: start; gap: 22px; padding: 22px 24px 40px; }
.drawer-sub { margin-bottom: 10px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 12px; background: var(--border); }
.fact { padding: 12px 14px; background: var(--surface); min-width: 0; }
.fact-wide { grid-column: 1 / -1; }
.fact dt { margin-bottom: 5px; font-size: 12px; color: var(--text-3); }
.fact dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 300; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; pointer-events: none; }
.toast {
  display: flex; align-items: flex-start; gap: 10px;
  min-width: 280px; max-width: 440px; padding: 12px 16px 12px 14px;
  border-radius: 12px; background: #0F172A; color: #f3f4f6; border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 16px 32px -8px rgba(0, 0, 0, .35);
  font-size: 13.5px; line-height: 1.45;
  opacity: 0; transform: translateY(10px) scale(.98); transition: opacity .2s, transform .2s cubic-bezier(.2, .8, .2, 1);
  pointer-events: auto;
}
.toast.show { opacity: 1; transform: none; }
.toast .icon { margin-top: 1px; }
.toast-success .icon { color: #4ADE80; }
.toast-error .icon { color: #F87171; }
.toast-info .icon { color: #A5B4FC; }
.toast-msg { overflow-wrap: anywhere; }

.scrim { display: none; }

/* ==========================================================================
   responsive
   ========================================================================== */
@media (max-width: 1180px) {
  .grid-detail { grid-template-columns: minmax(0, 1fr); }
  .sticky { position: static; }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 60; width: 272px; transform: translateX(-100%); transition: transform .24s cubic-bezier(.2, .8, .2, 1); }
  .shell.sidebar-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  .scrim { position: fixed; inset: 0; z-index: 50; background: rgba(15, 23, 42, .5); }
  .shell.sidebar-open .scrim { display: block; }
  .menu-btn { display: inline-flex; margin-left: -6px; }
  .topbar { padding: 0 16px; }
  .content { padding: 22px 16px 60px; }
  .page-head { flex-direction: column; align-items: stretch; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-brand { display: none; }
  .brand-mobile { display: flex !important; margin-bottom: 8px; }
  .brand-mobile .brand-name { color: var(--text); }
}
@media (max-width: 600px) {
  .form-grid, .check-grid, .facts { grid-template-columns: minmax(0, 1fr); }
  .table-toolbar { flex-wrap: wrap; }
  .input-search { width: 100%; }
  .search { flex: 1; }
  .bar-row { grid-template-columns: 100px minmax(0, 1fr) 48px; gap: 10px; }
  .toasts { left: 16px; right: 16px; align-items: stretch; }
  .toast { min-width: 0; max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
