/* ============================================================
   VERGED INTERNAL — App tokens + base components
   Light-only, medium density, Qonto-style structure
   Builds on /colors_and_type.css for brand + typography
   ============================================================ */

:root {
  /* ---------- SURFACES ---------- */
  --app-canvas:      #F4F5F7;
  --app-surface:     #FFFFFF;
  --app-sidebar:     #FFFFFF;
  --app-active:      #F1F3F5;
  --app-hover:       #F8F9FA;
  --app-inverse:     #15273F;

  /* ---------- NEUTRAL GREY SCALE ---------- */
  --gray-50:  #FAFBFC;
  --gray-100: #F4F5F7;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #0F172A;

  /* ---------- TEXT ---------- */
  --app-text:        #15273F;   /* navy ink */
  --app-text-2:      #36475C;
  --app-text-muted:  #6B7280;
  --app-text-subtle: #9CA3AF;
  --app-text-on-dark: #FFFFFF;

  /* ---------- BORDERS ---------- */
  --app-border:        #E5E7EB;
  --app-border-strong: #D1D5DB;
  --app-divider:       #F1F3F5;

  /* ---------- STATUS ---------- */
  --app-success:      #16A34A;
  --app-success-soft: #DCFCE7;
  --app-danger:       #DC2626;
  --app-danger-soft:  #FEE2E2;
  --app-warning:      #B45309;
  --app-warning-soft: #FEF3C7;
  --app-info:         #2E7AA0;
  --app-info-soft:    #D6E5EE;

  /* ---------- ACCENT (Verged orange — sparingly) ---------- */
  --app-accent:       #EC5B29;
  --app-accent-deep:  #C44516;
  --app-accent-soft:  #FBE3D6;

  /* ---------- AVATAR PASTELS ---------- */
  --av-mint:     #A7E5C5;
  --av-pink:     #FBC7D4;
  --av-lavender: #D9D2F5;
  --av-peach:    #FDD8B8;
  --av-yellow:   #FCE8A6;
  --av-blue:     #BDDEF5;
  --av-rose:     #F5B7B0;
  --av-sage:     #C8DCC2;

  /* ---------- RADII (Qonto-generous) ---------- */
  --r-xs:  6px;
  --r-sm:  10px;
  --r:     14px;
  --r-lg:  20px;
  --r-xl:  24px;
  --r-pill: 999px;

  /* ---------- DENSITY ---------- */
  --row-h:         56px;
  --row-h-compact: 44px;
  --input-h:       44px;
  --btn-h:         40px;
  --btn-h-sm:      32px;
  --btn-h-lg:      48px;

  /* ---------- SHADOWS ---------- */
  --sh-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --sh:    0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --sh-md: 0 4px 12px rgba(15, 23, 42, 0.06), 0 2px 4px rgba(15, 23, 42, 0.04);
  --sh-lg: 0 10px 30px rgba(15, 23, 42, 0.08);

  /* ---------- SIDEBAR ---------- */
  --sidebar-w:           248px;
  --sidebar-w-compact:   72px;
  --topbar-h:            64px;

  /* ---------- TYPE SCALE (denser than marketing) ---------- */
  --app-fs-xs:    12px;
  --app-fs-sm:    13px;
  --app-fs-body:  14px;
  --app-fs-md:    15px;
  --app-fs-lg:    17px;
  --app-fs-xl:    20px;
  --app-fs-2xl:   24px;
  --app-fs-3xl:   32px;
  --app-fs-4xl:   40px;
  --app-fs-hero:  56px;

  --app-lh-tight: 1.2;
  --app-lh:       1.4;
  --app-lh-loose: 1.55;
}

/* ============================================================
   APP RESET (scoped under .app)
   ============================================================ */
.app, .app * { box-sizing: border-box; }
.app {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: var(--app-fs-body);
  line-height: var(--app-lh);
  color: var(--app-text);
  background: var(--app-canvas);
  -webkit-font-smoothing: antialiased;
}
.app h1, .app h2, .app h3, .app h4, .app h5 {
  font-family: "Inter", sans-serif;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
  color: var(--app-text);
}
.app h1 { font-size: var(--app-fs-3xl); line-height: var(--app-lh-tight); }
.app h2 { font-size: var(--app-fs-2xl); line-height: var(--app-lh-tight); }
.app h3 { font-size: var(--app-fs-xl); line-height: var(--app-lh-tight); }
.app h4 { font-size: var(--app-fs-lg); }
.app p { margin: 0; }
.app a { color: inherit; text-decoration: none; }
.app button { font-family: inherit; cursor: pointer; }

/* ============================================================
   APP SHELL — sidebar + topbar + main
   ============================================================ */
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
  background: var(--app-canvas);
}
.app-sidebar {
  background: var(--app-sidebar);
  border-right: 1px solid var(--app-border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.app-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ---------- Sidebar parts ---------- */
.sb-org {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px;
  cursor: pointer;
  border-radius: var(--r);
  margin: 8px;
  transition: background 140ms;
}
.sb-org:hover { background: var(--app-hover); }
.sb-org-avatar {
  width: 28px; height: 28px;
  border-radius: var(--r-pill);
  background: var(--av-lavender);
  display: grid; place-items: center;
  font-weight: 600;
  font-size: 13px;
  color: var(--app-text);
  flex-shrink: 0;
}
.sb-org-name {
  font-weight: 500;
  font-size: var(--app-fs-md);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.sb-org-caret {
  color: var(--app-text-subtle);
  flex-shrink: 0;
}
.sb-search {
  margin: 0 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  background: var(--app-active);
  border-radius: var(--r-sm);
  color: var(--app-text-muted);
  font-size: var(--app-fs-body);
  cursor: pointer;
  transition: background 140ms;
}
.sb-search:hover { background: var(--gray-200); }
.sb-search-icon { color: var(--app-text-subtle); }
.sb-search-kbd {
  margin-left: auto;
  font-size: var(--app-fs-xs);
  color: var(--app-text-subtle);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.sb-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 8px;
  flex: 1;
}
.sb-group-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--app-text-subtle);
  padding: 16px 12px 6px;
}
.sb-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  color: var(--app-text);
  font-size: var(--app-fs-md);
  font-weight: 400;
  transition: background 140ms, color 140ms;
  position: relative;
}
.sb-item:hover { background: var(--app-hover); }
.sb-item.is-active {
  background: var(--app-active);
  font-weight: 500;
}
.sb-item svg { flex-shrink: 0; color: var(--app-text-2); }
.sb-item.is-active svg { color: var(--app-text); }
.sb-item-badge {
  margin-left: auto;
  background: var(--app-accent);
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--r-pill);
}
.sb-footer {
  padding: 8px;
  border-top: 1px solid var(--app-border);
}

/* ---------- Topbar ---------- */
.app-topbar {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 32px;
  background: var(--app-canvas);
  position: sticky;
  top: 0;
  z-index: 10;
}
.app-topbar h1 {
  font-size: var(--app-fs-2xl);
  font-weight: 600;
  flex: 1;
}
.app-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.app-mobile-menu {
  display: none;
  width: 40px; height: 40px;
  border-radius: var(--r-sm);
  border: 1px solid var(--app-border);
  background: var(--app-surface);
  align-items: center;
  justify-content: center;
  color: var(--app-text);
}

/* ---------- Content ---------- */
.app-content {
  padding: 8px 32px 48px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex: 1;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--btn-h);
  padding: 0 16px;
  border-radius: var(--r-sm);
  font-size: var(--app-fs-body);
  font-weight: 500;
  border: 1px solid transparent;
  background: transparent;
  color: var(--app-text);
  transition: all 140ms;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--app-text);
  color: white;
  border-color: var(--app-text);
}
.btn-primary:hover { background: black; border-color: black; }

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

.btn-ghost {
  background: transparent;
  color: var(--app-text);
}
.btn-ghost:hover { background: var(--app-active); }

.btn-danger {
  background: var(--app-danger);
  border-color: var(--app-danger);
  color: white;
}
.btn-danger:hover { background: #B81E1E; border-color: #B81E1E; }

.btn-icon {
  width: var(--btn-h);
  padding: 0;
}
.btn-sm { height: var(--btn-h-sm); padding: 0 12px; font-size: var(--app-fs-sm); }
.btn-lg { height: var(--btn-h-lg); padding: 0 20px; font-size: var(--app-fs-md); }

.btn-circle {
  width: 44px; height: 44px;
  border-radius: var(--r-pill);
  background: var(--app-text);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 140ms, transform 140ms;
}
.btn-circle:hover { background: black; transform: scale(1.05); }

/* ============================================================
   INPUTS
   ============================================================ */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field-label {
  font-size: var(--app-fs-sm);
  font-weight: 500;
  color: var(--app-text);
}
.field-hint {
  font-size: var(--app-fs-xs);
  color: var(--app-text-muted);
}
.field-error { color: var(--app-danger); }

.input, .select, .textarea {
  height: var(--input-h);
  padding: 0 14px;
  border: 1px solid var(--app-border);
  border-radius: var(--r-sm);
  background: var(--app-surface);
  font-size: var(--app-fs-body);
  font-family: inherit;
  color: var(--app-text);
  transition: border-color 140ms, box-shadow 140ms;
  width: 100%;
}
.textarea { height: auto; padding: 12px 14px; resize: vertical; min-height: 96px; }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--app-text);
  box-shadow: 0 0 0 3px rgba(21, 39, 63, 0.08);
}
.input::placeholder, .textarea::placeholder { color: var(--app-text-subtle); }
.input-search {
  background: var(--app-active);
  border-color: transparent;
}

/* Search input with icon */
.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-wrap .input { padding-left: 40px; }
.input-wrap > svg {
  position: absolute;
  left: 14px;
  color: var(--app-text-subtle);
  pointer-events: none;
}

/* Toggle */
.toggle {
  appearance: none;
  width: 40px; height: 24px;
  border-radius: var(--r-pill);
  background: var(--gray-300);
  position: relative;
  cursor: pointer;
  transition: background 140ms;
}
.toggle::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: white;
  box-shadow: var(--sh-sm);
  transition: transform 140ms;
}
.toggle:checked { background: var(--app-text); }
.toggle:checked::after { transform: translateX(16px); }

/* Checkbox */
.check {
  appearance: none;
  width: 18px; height: 18px;
  border: 1.5px solid var(--app-border-strong);
  border-radius: 4px;
  background: var(--app-surface);
  cursor: pointer;
  position: relative;
  transition: all 120ms;
  flex-shrink: 0;
}
.check:checked {
  background: var(--app-text);
  border-color: var(--app-text);
}
.check:checked::after {
  content: '';
  position: absolute;
  left: 4px; top: 1px;
  width: 6px; height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--app-surface);
  border-radius: var(--r-lg);
  padding: 24px;
  border: 1px solid transparent;
}
.card-bordered { border-color: var(--app-border); }
.card-hd {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.card-title {
  font-size: var(--app-fs-md);
  font-weight: 500;
  color: var(--app-text-muted);
}
.card-actions { display: flex; gap: 6px; }

/* ============================================================
   AVATARS
   ============================================================ */
.av {
  width: 36px; height: 36px;
  border-radius: var(--r-pill);
  display: grid; place-items: center;
  font-weight: 600;
  font-size: var(--app-fs-sm);
  flex-shrink: 0;
  color: var(--app-text);
}
.av-sm { width: 28px; height: 28px; font-size: var(--app-fs-xs); }
.av-lg { width: 56px; height: 56px; font-size: var(--app-fs-lg); }
.av-mint     { background: var(--av-mint); }
.av-pink     { background: var(--av-pink); }
.av-lavender { background: var(--av-lavender); }
.av-peach    { background: var(--av-peach); }
.av-yellow   { background: var(--av-yellow); }
.av-blue     { background: var(--av-blue); }
.av-rose     { background: var(--av-rose); }
.av-sage     { background: var(--av-sage); }
.av-dark     { background: var(--app-text); color: white; }

/* ============================================================
   STEPPER (multi-step form / wizard)
   ============================================================ */
.stepper {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
}
.step { display: flex; align-items: center; gap: 8px; font-size: var(--app-fs-sm); color: var(--app-text-subtle); }
.step-dot {
  width: 24px; height: 24px;
  border-radius: var(--r-pill);
  background: var(--app-active);
  color: var(--app-text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--app-fs-xs);
  font-weight: 600;
}
.step.is-done .step-dot   { background: var(--app-success-soft); color: var(--app-success); }
.step.is-active .step-dot { background: var(--app-text); color: white; }
.step.is-active           { color: var(--app-text); font-weight: 500; }
.step-line                { flex: 1; height: 1px; background: var(--app-border); max-width: 48px; }

/* ============================================================
   CHIPS / PILLS / BADGES
   ============================================================ */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  background: var(--app-active);
  font-size: var(--app-fs-sm);
  color: var(--app-text);
  cursor: pointer;
  transition: background 140ms;
  border: none;
}
.chip:hover { background: var(--gray-200); }
.chip.is-active { background: var(--app-text); color: white; }
.chip-add { background: transparent; border: 1px dashed var(--app-border-strong); color: var(--app-text-muted); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  font-size: var(--app-fs-xs);
  font-weight: 500;
  background: var(--app-active);
  color: var(--app-text);
}
.badge-success { background: var(--app-success-soft); color: var(--app-success); }
.badge-danger  { background: var(--app-danger-soft);  color: var(--app-danger); }
.badge-warning { background: var(--app-warning-soft); color: var(--app-warning); }
.badge-info    { background: var(--app-info-soft);    color: var(--app-info); }
.badge-accent  { background: var(--app-accent-soft);  color: var(--app-accent-deep); }
.badge-dot::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ============================================================
   TABLE
   ============================================================ */
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--app-fs-body);
}
.table thead th {
  text-align: left;
  font-size: var(--app-fs-sm);
  font-weight: 500;
  color: var(--app-text-muted);
  padding: 12px 16px;
  border-bottom: 1px solid var(--app-border);
  position: sticky;
  top: 0;
  background: var(--app-surface);
  white-space: nowrap;
}
.table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--app-divider);
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background 120ms; }
.table tbody tr:hover { background: var(--app-hover); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .pos { color: var(--app-success); font-weight: 500; }
.table .neg { color: var(--app-text); font-weight: 500; }
.t-cell-2 {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.t-cell-2 .sub { font-size: var(--app-fs-xs); color: var(--app-text-muted); }

/* ============================================================
   QUICK ACTION CHIPS (Dashboard)
   ============================================================ */
.action-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.action-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: var(--r-pill);
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  font-size: var(--app-fs-body);
  font-weight: 500;
  color: var(--app-text);
  transition: all 140ms;
}
.action-chip:hover {
  background: var(--app-hover);
  border-color: var(--app-border-strong);
}

/* ============================================================
   KPI / STAT CARDS
   ============================================================ */
.kpi {
  background: var(--app-surface);
  border-radius: var(--r-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 220px;
}
.kpi-label {
  font-size: var(--app-fs-md);
  font-weight: 500;
  color: var(--app-text-muted);
}
.kpi-period {
  font-size: var(--app-fs-xs);
  color: var(--app-text-subtle);
  margin-top: -2px;
}
.kpi-value {
  font-size: var(--app-fs-2xl);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--app-text);
  margin-top: 4px;
}
.kpi-value.is-danger { color: var(--app-danger); }
.kpi-value.is-success { color: var(--app-success); }
.kpi-chart {
  margin-top: auto;
}

/* ============================================================
   FORM LAYOUT
   ============================================================ */
.form-section {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  padding: 32px 0;
  border-bottom: 1px solid var(--app-divider);
}
.form-section:last-child { border-bottom: none; }
.form-section-head h3 {
  font-size: var(--app-fs-lg);
  font-weight: 600;
  margin-bottom: 6px;
}
.form-section-head p {
  font-size: var(--app-fs-sm);
  color: var(--app-text-muted);
  line-height: var(--app-lh-loose);
}
.form-grid {
  display: grid;
  gap: 20px;
}
.form-grid-2 { grid-template-columns: 1fr 1fr; }

/* ============================================================
   TIMELINE
   ============================================================ */
.timeline {
  display: flex;
  flex-direction: column;
  position: relative;
}
.timeline-day {
  font-size: var(--app-fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--app-text-subtle);
  font-weight: 500;
  padding: 24px 0 12px;
}
.timeline-item {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 16px;
  padding: 14px 0;
  align-items: flex-start;
  position: relative;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: 19px; top: 38px; bottom: -14px;
  width: 2px;
  background: var(--app-divider);
}
.timeline-item:last-child::before { display: none; }
.timeline-icon {
  width: 40px; height: 40px;
  border-radius: var(--r-pill);
  background: var(--app-active);
  color: var(--app-text);
  display: grid;
  place-items: center;
  position: relative;
  z-index: 1;
}
.timeline-body .ti-title { font-weight: 500; font-size: var(--app-fs-md); }
.timeline-body .ti-detail { font-size: var(--app-fs-sm); color: var(--app-text-muted); margin-top: 2px; }
.timeline-time { font-size: var(--app-fs-sm); color: var(--app-text-subtle); white-space: nowrap; }

/* ============================================================
   AI ASSISTANT FAB (floating bottom-right pill)
   ============================================================ */
.ai-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 6px 6px 6px 18px;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--r-pill);
  box-shadow: var(--sh-md);
  font-size: var(--app-fs-body);
  color: var(--app-text-muted);
  z-index: 50;
  transition: all 140ms;
}
.ai-fab:hover { box-shadow: var(--sh-lg); }
.ai-fab-orb {
  width: 36px; height: 36px;
  border-radius: var(--r-pill);
  background: radial-gradient(circle at 30% 30%, #BDDEF5, #2E7AA0);
  flex-shrink: 0;
}

/* ============================================================
   RESPONSIVE — tablet + mobile
   ============================================================ */
@media (max-width: 1023px) {
  .app-shell { grid-template-columns: var(--sidebar-w-compact) 1fr; }
  .app-sidebar .sb-org-name,
  .app-sidebar .sb-org-caret,
  .app-sidebar .sb-search-kbd,
  .app-sidebar .sb-group-label,
  .app-sidebar .sb-item-label,
  .app-sidebar .sb-search-text { display: none; }
  .app-sidebar .sb-item { justify-content: center; padding: 10px; }
  .app-sidebar .sb-search { justify-content: center; padding: 0; }
  .app-sidebar .sb-org { justify-content: center; padding: 12px 8px; }
  .form-section { grid-template-columns: 1fr; gap: 20px; padding: 24px 0; }
  .form-grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
  .app-shell { grid-template-columns: 1fr; }
  .app-sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: 280px;
    transform: translateX(-100%);
    transition: transform 240ms cubic-bezier(.22,.61,.36,1);
    z-index: 100;
    box-shadow: var(--sh-lg);
  }
  .app-shell.is-mobile-open .app-sidebar { transform: translateX(0); }
  .app-sidebar .sb-org-name,
  .app-sidebar .sb-org-caret,
  .app-sidebar .sb-search-kbd,
  .app-sidebar .sb-group-label,
  .app-sidebar .sb-item-label,
  .app-sidebar .sb-search-text { display: block; }
  .app-sidebar .sb-item { justify-content: flex-start; padding: 9px 12px; }
  .app-sidebar .sb-search { justify-content: flex-start; padding: 0 12px; }
  .app-sidebar .sb-org { justify-content: flex-start; padding: 18px 16px; }
  .app-mobile-menu { display: inline-flex; }
  .app-topbar { padding: 0 16px; gap: 12px; }
  .app-topbar h1 { font-size: var(--app-fs-xl); }
  .app-content { padding: 8px 16px 32px; gap: 16px; }
  .card { padding: 16px; border-radius: var(--r); }
  .kpi { padding: 16px; min-height: 160px; }
  .ai-fab { right: 16px; bottom: 16px; }
  .ai-fab-text { display: none; }
  .ai-fab { padding: 6px; }
}

/* ---------- Mobile sidebar backdrop ---------- */
.app-mobile-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  z-index: 99;
}
.app-shell.is-mobile-open .app-mobile-backdrop { display: block; }

/* ============================================================
   UTILITIES
   ============================================================ */
.muted { color: var(--app-text-muted); }
.subtle { color: var(--app-text-subtle); }
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-6 { gap: 24px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1; }
.tabular { font-variant-numeric: tabular-nums; }
.divider { height: 1px; background: var(--app-border); border: none; margin: 0; }
.row { display: flex; align-items: center; gap: 12px; }
.col { display: flex; flex-direction: column; gap: 12px; }
