/* FOUNDRY — Linear-grade surface, basic CRM functions only
   Clients · Jobs · Invoices · Home · Team/Billing
   Typography + spacing model inspired by Linear; FOUNDRY red as restrained accent.
   System font stack (no external font CDN) for CSP + speed. */

:root {
  --bg: #08090a;
  --bg-elevated: #0e0f11;
  --panel: #131416;
  --panel-hover: #181a1d;
  --panel-soft: #16171a;
  --line: rgba(255, 255, 255, 0.06);
  --line-strong: rgba(255, 255, 255, 0.1);
  --text: #f4f5f6;
  --text-secondary: #d0d2d6;
  --muted: #8b8f97;
  --dim: #636770;
  --accent: #e11d24;
  --accent-soft: rgba(225, 29, 36, 0.12);
  --accent-hover: #f22930;
  --focus: rgba(94, 106, 210, 0.55);
  --good: #4cc38a;
  --good-soft: rgba(76, 195, 138, 0.12);
  --warn: #f0b429;
  --danger: #ff6b6f;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --shadow: 0 0 0 1px var(--line), 0 12px 40px rgba(0, 0, 0, 0.45);
  --font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --nav-h: 52px;
  --sidebar-w: 220px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* { box-sizing: border-box; }
html {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
}
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(900px 420px at 12% -8%, rgba(225, 29, 36, 0.07), transparent 55%),
    radial-gradient(700px 360px at 100% 0%, rgba(94, 106, 210, 0.05), transparent 50%),
    var(--bg);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }

/* —— Layout —— */
.shell { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.app-main .shell { width: min(1040px, calc(100% - 40px)); }

/* —— Nav (landing / auth) —— */
.nav {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(8, 9, 10, 0.82);
  backdrop-filter: blur(16px) saturate(1.2);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--text);
}
.brand img { width: 28px; height: 28px; object-fit: contain; border-radius: 6px; }
.nav-actions { display: flex; align-items: center; gap: 8px; }

/* —— Controls —— */
.locale-select {
  appearance: none;
  min-height: 32px;
  max-width: 140px;
  padding: 0 28px 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background:
    var(--panel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238b8f97'%3E%3Cpath d='M3 4.5 6 8l3-3.5'/%3E%3C/svg%3E") no-repeat right 8px center;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease);
}
.locale-select.compact { min-height: 30px; max-width: 112px; font-size: 11px; }
.locale-select:hover { border-color: var(--line-strong); background-color: var(--panel-hover); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background 0.12s var(--ease), border-color 0.12s var(--ease), transform 0.08s ease, box-shadow 0.12s var(--ease);
  white-space: nowrap;
}
.btn:hover { background: var(--panel-hover); border-color: var(--line-strong); }
.btn:active { transform: scale(0.98); }
.btn.primary {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset;
}
.btn.primary:hover { background: var(--accent-hover); border-color: transparent; }
.btn.compact { min-height: 30px; padding: 0 10px; font-size: 12px; }
.btn.full { width: 100%; }
.btn:disabled, .mini-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}

/* —— Landing —— */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
  padding: 56px 0 40px;
}
.hero-seal { display: flex; justify-content: center; }
.hero-seal img {
  width: min(280px, 68vw);
  height: auto;
  filter: drop-shadow(0 20px 48px rgba(0, 0, 0, 0.5));
}
.eyebrow {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}
h1, .app-title {
  font-size: clamp(2.4rem, 7vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
  font-weight: 600;
  margin: 10px 0 14px;
  color: var(--text);
}
.hero-copy {
  font-size: 16px;
  color: var(--muted);
  max-width: 520px;
  line-height: 1.55;
  font-weight: 400;
}
.price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 22px 0 10px;
  color: var(--text);
  font-weight: 600;
}
.price strong {
  font-size: clamp(2.4rem, 6vw, 3.25rem);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--text);
}
.price span { font-size: 14px; color: var(--muted); font-weight: 500; }
.feature-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 20px 0; }
.pill {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 999px;
  padding: 5px 11px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
}
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.hero-actions .btn { min-height: 36px; padding: 0 16px; }
.subline { margin-top: 18px; color: var(--dim); font-size: 13px; }

.section {
  padding: 40px 0;
  border-top: 1px solid var(--line);
}
.section h2 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin: 6px 0 16px;
  letter-spacing: -0.03em;
  font-weight: 600;
}
.grid3, .grid4 { display: grid; grid-template-columns: 1fr; gap: 10px; }
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  min-height: 0;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.card:hover { border-color: var(--line-strong); background: var(--panel-hover); }
.card b {
  display: block;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.card span, .card p { color: var(--muted); line-height: 1.5; font-size: 13px; }

.pricing-strip { display: grid; gap: 20px; }
.price-points { display: grid; gap: 8px; }
.price-points span {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  color: var(--muted);
  background: var(--panel);
  font-size: 13px;
}
.price-points b {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  min-width: 52px;
}

.footer {
  padding: 28px 0 48px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
}

/* —— Auth —— */
.login-wrap {
  min-height: calc(100vh - var(--nav-h));
  display: grid;
  place-items: center;
  padding: 32px 0;
}
.auth-card {
  width: min(400px, 92vw);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  box-shadow: var(--shadow);
}
.auth-card h1 {
  font-size: 22px;
  line-height: 1.2;
  margin: 0 0 6px;
  letter-spacing: -0.03em;
  font-weight: 600;
}
.auth-card .hero-copy { font-size: 13px; margin: 0; max-width: none; }
.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 20px 0 8px;
  padding: 3px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.tab {
  padding: 7px 10px;
  border-radius: 6px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: background 0.12s var(--ease), color 0.12s var(--ease);
}
.tab.active {
  background: var(--panel-hover);
  color: var(--text);
  box-shadow: 0 0 0 1px var(--line);
}
.field { display: grid; gap: 6px; margin: 12px 0; }
.field label {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}
.field input,
.field select,
.field textarea,
.team-invite input,
#business-switch {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 6px;
  padding: 9px 11px;
  font-size: 13px;
  transition: border-color 0.12s var(--ease), box-shadow 0.12s var(--ease);
}
.field input:hover,
.field select:hover,
.field textarea:hover,
.team-invite input:hover,
#business-switch:hover { border-color: var(--line-strong); }
.field input:focus,
.field select:focus,
.field textarea:focus,
.team-invite input:focus,
#business-switch:focus {
  border-color: rgba(94, 106, 210, 0.5);
  box-shadow: 0 0 0 3px rgba(94, 106, 210, 0.15);
  outline: none;
}
.field textarea { min-height: 84px; resize: vertical; }
.notice { font-size: 12px; color: var(--muted); min-height: 18px; margin-top: 10px; }

/* —— App shell —— */
.app-shell { min-height: 100vh; padding-bottom: 72px; }
.topbar {
  min-height: var(--nav-h);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(8, 9, 10, 0.88);
  backdrop-filter: blur(16px) saturate(1.2);
  z-index: 20;
}
.topbar-inner {
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.topbar-brand-wrap {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbrand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.02em;
}
.topbrand img { width: 24px; height: 24px; border-radius: 5px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.topbar-brand-wrap #business-switch {
  width: auto;
  max-width: 168px;
  min-height: 30px;
  padding: 4px 28px 4px 10px;
  font-size: 12px;
}

.dashboard { padding: 20px 0 32px; }
.app-notice {
  min-height: 0;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  padding: 0;
}
.app-notice:not(:empty) {
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--panel);
  border: 1px solid var(--line);
  margin-bottom: 16px;
}
.app-notice.bad {
  color: var(--danger);
  background: rgba(255, 107, 111, 0.08);
  border-color: rgba(255, 107, 111, 0.2);
}
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.section-head .app-title { margin-bottom: 0; }
.view-copy { color: var(--muted); max-width: 560px; line-height: 1.5; font-size: 13px; margin: 0 0 14px; }

/* Stats — Linear-style metric tiles */
.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 14px 12px;
  transition: border-color 0.12s var(--ease);
}
.stat:hover { border-color: var(--line-strong); }
.stat strong {
  display: block;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.15;
}
.stat span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.quick {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin: 16px 0 20px;
}
.quick .btn {
  min-height: 34px;
  font-size: 12px;
  padding: 0 8px;
}

/* Lists — Linear issue-row language */
.list { display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--panel); }
.list:empty::after {
  content: "Nothing here yet.";
  display: block;
  padding: 28px 16px;
  text-align: center;
  color: var(--dim);
  font-size: 13px;
}
.row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 12px 14px;
  transition: background 0.1s var(--ease);
}
.row:last-child { border-bottom: 0; }
.row:hover { background: var(--panel-hover); }
.row-main { min-width: 0; flex: 1; }
.row-main strong, .row > strong {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
}
.row small {
  display: block;
  color: var(--dim);
  margin-top: 2px;
  font-size: 12px;
  font-weight: 400;
}
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 0;
  flex-shrink: 0;
}
.mini-btn {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.1s var(--ease), border-color 0.1s var(--ease), color 0.1s var(--ease);
}
.mini-btn:hover { background: var(--panel-hover); border-color: var(--line-strong); color: var(--text); }
.mini-btn.success {
  color: var(--good);
  border-color: rgba(76, 195, 138, 0.25);
  background: var(--good-soft);
}
.status-dot {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
  background: var(--bg);
  letter-spacing: 0.01em;
}
.status-dot.good {
  color: var(--good);
  border-color: rgba(76, 195, 138, 0.25);
  background: var(--good-soft);
}
.photo-strip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin-top: 10px;
  padding-bottom: 2px;
}
.photo-strip img {
  width: 72px;
  height: 56px;
  border-radius: 6px;
  border: 1px solid var(--line);
  object-fit: cover;
  flex: none;
}

/* Bottom / side nav */
.bottomnav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(8, 9, 10, 0.92);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding-bottom: max(6px, env(safe-area-inset-bottom));
  z-index: 25;
}
.bottomnav button {
  min-height: 52px;
  background: none;
  border: 0;
  color: var(--dim);
  padding: 8px 4px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.12s var(--ease);
}
.bottomnav button:hover { color: var(--text-secondary); }
.bottomnav button.active { color: var(--text); }

.view { display: none; }
.view.active { display: block; }

.fab {
  position: fixed;
  right: 16px;
  bottom: 72px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 0;
  background: var(--accent);
  color: #fff;
  font-size: 22px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(225, 29, 36, 0.35);
  transition: transform 0.1s ease, background 0.12s var(--ease);
  z-index: 24;
}
.fab:hover { background: var(--accent-hover); }
.fab:active { transform: scale(0.96); }

/* Modals */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(4px);
  display: none;
  place-items: end center;
  z-index: 50;
}
.modal.open { display: grid; }
.modal-card {
  width: min(480px, 100%);
  background: var(--bg-elevated);
  border: 1px solid var(--line-strong);
  border-radius: 16px 16px 0 0;
  padding: 18px 18px 22px;
  max-height: 90vh;
  overflow: auto;
  box-shadow: var(--shadow);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.modal-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.iconbtn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  font-size: 16px;
  display: grid;
  place-items: center;
  transition: background 0.1s var(--ease), color 0.1s var(--ease);
}
.iconbtn:hover { background: var(--panel-hover); color: var(--text); }

/* Brand / team rooms */
.room-grid { display: grid; gap: 10px; margin: 16px 0; }
.room-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  min-height: 0;
  padding: 16px;
}
.room-number {
  font-size: 18px;
  line-height: 1;
  color: var(--dim);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  padding-top: 2px;
}
.room-card h2 {
  margin: 4px 0 6px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.room-card .btn { margin-top: 10px; }
.button-row, .button-stack { display: flex; flex-wrap: wrap; gap: 8px; }
.button-stack .btn { flex: 1; }
.team-invite {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 12px;
}
.compact-list { margin-top: 10px; border: 0; background: transparent; }
.compact-list .row {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
}
.compact-list .row:hover { background: transparent; }
.brand-preview {
  display: grid;
  place-items: center;
  min-height: 180px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  margin: 14px 0;
  overflow: hidden;
}
.brand-preview img { width: 140px; height: 140px; object-fit: contain; }

/* Billing */
.billing-card {
  margin-top: 10px;
  margin-bottom: 8px;
  padding: 16px;
}
.billing-card h2, .billing-card h3 {
  margin: 6px 0 4px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.billing-card p { color: var(--muted); font-size: 13px; margin: 0; }
.billing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.billing-actions .btn { flex: 1 1 140px; }
.billing-gate { text-align: center; padding: 32px 0; }
.billing-seal { width: 72px; height: 72px; margin: 0 auto 16px; }
.billing-gate h2 {
  font-size: clamp(1.4rem, 5vw, 1.8rem);
  margin: 10px 0;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.billing-gate > p { color: var(--muted); line-height: 1.5; font-size: 13px; }
.billing-gate .price { justify-content: center; margin: 18px 0; }
.billing-gate .btn { width: 100%; max-width: 280px; margin: 6px auto 0; }

.rtl { direction: rtl; }

/* Home section titles inside views */
.view > .eyebrow + .app-title { margin-top: 4px; }
.view h2 {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 8px 0 10px;
}

/* Mobile */
@media (max-width: 560px) {
  .shell, .app-main .shell { width: calc(100% - 28px); }
  .nav { height: 48px; }
  .brand { font-size: 12px; gap: 8px; }
  .brand img { width: 24px; height: 24px; }
  .nav-actions { gap: 6px; }
  .nav-actions .btn { padding: 0 10px; font-size: 12px; }
  .nav-actions .btn:not(.primary) { display: none; }
  .hero { padding-top: 32px; }
  .hero-seal img { width: min(220px, 70vw); }
  .hero-actions .btn { width: 100%; }
  .quick { grid-template-columns: 1fr; }
  .section-head { align-items: flex-start; flex-direction: column; gap: 10px; }
  .section-head .btn { width: 100%; }
  .topbrand span { display: none; }
  .topbar-brand-wrap #business-switch { max-width: 150px; }
  .row {
    flex-direction: column;
    align-items: flex-start;
  }
  .row-actions { width: 100%; margin-top: 8px; }
  .team-invite { grid-template-columns: 1fr; }
  .team-invite .btn { width: 100%; }
  .room-card { grid-template-columns: 1fr; gap: 8px; }
  .room-number { font-size: 12px; color: var(--muted); }
}

/* Desktop — Linear sidebar */
@media (min-width: 900px) {
  .hero {
    grid-template-columns: 0.9fr 1.1fr;
    padding: 72px 0 56px;
    gap: 48px;
  }
  .hero-seal { justify-content: flex-start; order: -1; }
  .hero-seal img { width: min(320px, 100%); }
  .grid3 { grid-template-columns: repeat(3, 1fr); }
  .grid4 { grid-template-columns: repeat(2, 1fr); }
  .pricing-strip {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
  }
  .room-grid { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(4, 1fr); }

  .app-shell { padding-bottom: 0; }
  .bottomnav {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    bottom: 0;
    right: auto;
    width: var(--sidebar-w);
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-top: 0;
    border-right: 1px solid var(--line);
    background: var(--bg);
    backdrop-filter: none;
    padding: 12px 10px;
    float: none;
  }
  .bottomnav button {
    text-align: start;
    padding: 8px 10px;
    font-size: 13px;
    min-height: 34px;
    border-radius: 6px;
    color: var(--muted);
  }
  .bottomnav button:hover {
    background: var(--panel);
    color: var(--text-secondary);
  }
  .bottomnav button.active {
    background: var(--panel);
    color: var(--text);
    box-shadow: 0 0 0 1px var(--line);
  }
  .app-main {
    margin-inline-start: var(--sidebar-w);
    min-height: calc(100vh - var(--nav-h));
  }
  .fab { right: 28px; bottom: 28px; }
  .modal { place-items: center; }
  .modal-card {
    border-radius: var(--radius-xl);
    width: min(440px, 92vw);
  }
}

/* Print-safe */
@media print {
  .bottomnav, .fab, .topbar-actions { display: none !important; }
  .app-main { margin: 0 !important; }
  body { background: #fff; color: #000; }
}
