/* ============================================================
   MAWSI PMS — minimal, compact. Blue accent, light + dark.
   ============================================================ */
:root {
  --blue-50: #eff6ff; --blue-100: #dbeafe; --blue-200: #bfdbfe; --blue-300: #93c5fd;
  --blue-400: #60a5fa; --blue-500: #3b82f6; --blue-600: #2563eb; --blue-700: #1d4ed8;

  --brand: var(--blue-600);
  --brand-hover: var(--blue-700);
  --brand-soft: #eef4ff;
  --brand-soft-2: #dde8ff;
  --on-brand: #fff;

  --bg: #fafbfc;
  --surface: #ffffff;
  --surface-2: #f6f7f9;
  --surface-hover: #f2f4f7;
  --border: #e8ebf0;
  --border-strong: #d5dae2;
  --text: #11151c;
  --text-2: #565f6e;
  --text-3: #8b94a3;

  --green: #15803d; --green-soft: #e8f6ec; --green-text: #166534;
  --amber: #b45309; --amber-soft: #fdf3e0; --amber-text: #92400e;
  --red: #c62828;   --red-soft: #fdebec;   --red-text: #991b1b;
  --violet: #6d28d9; --violet-soft: #f1ecfd; --violet-text: #5b21b6;
  --slate-soft: #f0f2f5; --slate-text: #3d4654;

  --radius: 8px; --radius-sm: 6px; --radius-lg: 10px;
  --shadow-lg: 0 16px 48px -12px rgba(15,23,42,.25);
  --ring: 0 0 0 2px rgba(37,99,235,.28);

  --sidebar-w: 208px;
  --topbar-h: 48px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --brand: var(--blue-500); --brand-hover: var(--blue-400);
  --brand-soft: rgba(59,130,246,.12); --brand-soft-2: rgba(59,130,246,.22);
  --bg: #0b0e14; --surface: #11151d; --surface-2: #0e1219; --surface-hover: #171c26;
  --border: #1d2430; --border-strong: #2b3444;
  --text: #e6eaf2; --text-2: #9aa4b6; --text-3: #667186;
  --green: #4ade80; --green-soft: rgba(34,197,94,.14); --green-text: #86efac;
  --amber: #fbbf24; --amber-soft: rgba(245,158,11,.14); --amber-text: #fcd34d;
  --red: #f87171; --red-soft: rgba(239,68,68,.16); --red-text: #fca5a5;
  --violet: #a78bfa; --violet-soft: rgba(139,92,246,.18); --violet-text: #c4b5fd;
  --slate-soft: rgba(148,163,184,.12); --slate-text: #cbd5e1;
  --shadow-lg: 0 16px 48px -12px rgba(0,0,0,.8);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: var(--blue-500); --brand-hover: var(--blue-400);
    --brand-soft: rgba(59,130,246,.12); --brand-soft-2: rgba(59,130,246,.22);
    --bg: #0b0e14; --surface: #11151d; --surface-2: #0e1219; --surface-hover: #171c26;
    --border: #1d2430; --border-strong: #2b3444;
    --text: #e6eaf2; --text-2: #9aa4b6; --text-3: #667186;
    --green: #4ade80; --green-soft: rgba(34,197,94,.14); --green-text: #86efac;
    --amber: #fbbf24; --amber-soft: rgba(245,158,11,.14); --amber-text: #fcd34d;
    --red: #f87171; --red-soft: rgba(239,68,68,.16); --red-text: #fca5a5;
    --violet: #a78bfa; --violet-soft: rgba(139,92,246,.18); --violet-text: #c4b5fd;
    --slate-soft: rgba(148,163,184,.12); --slate-text: #cbd5e1;
    --shadow-lg: 0 16px 48px -12px rgba(0,0,0,.8);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 13px/1.45 var(--font); -webkit-font-smoothing: antialiased; letter-spacing: -0.003em; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -0.01em; font-weight: 600; }
p { margin: 0; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 5px; }
.muted { color: var(--text-2); } .faint { color: var(--text-3); }
.nowrap { white-space: nowrap; } .right { text-align: right; } .hidden { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.boot { display: grid; place-items: center; height: 100vh; }
.boot-logo { width: 28px; height: 28px; border-radius: 7px; background: var(--brand); animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.85); opacity: .55; } }

/* icons */
.i { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.i-sm { width: 14px; height: 14px; } .i-lg { width: 20px; height: 20px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 6px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-weight: 500; white-space: nowrap; transition: background .12s, border-color .12s; }
.btn:hover { background: var(--surface-hover); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-hover); color: var(--text); }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-soft { background: var(--brand-soft); border-color: transparent; color: var(--brand); }
.btn-soft:hover { background: var(--brand-soft-2); }
.btn-sm { height: 26px; padding: 0 9px; font-size: 12px; }
.btn-lg { height: 36px; padding: 0 16px; font-size: 13.5px; }
.btn-block { width: 100%; }
.icon-btn { width: 28px; height: 28px; padding: 0; border-radius: 6px; border: 1px solid transparent; background: transparent; color: var(--text-2); display: inline-grid; place-items: center; }
.icon-btn:hover { background: var(--surface-hover); color: var(--text); }

/* forms */
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > label, .label { font-size: 12px; font-weight: 500; color: var(--text-2); }
.field .req { color: var(--red); margin-left: 2px; }
.hint { font-size: 11.5px; color: var(--text-3); }
.input, .select, .textarea { width: 100%; height: 32px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); transition: border-color .12s, box-shadow .12s; }
.textarea { height: auto; min-height: 68px; padding: 7px 10px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.input-group { position: relative; }
.input-group .prefix { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.input-group .input { padding-left: 26px; }
.input-icon { padding-left: 30px; }
.search { position: relative; }
.search .i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.check { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.check input { width: 14px; height: 14px; accent-color: var(--brand); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-section { grid-column: 1 / -1; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); padding-top: 4px; border-top: 1px solid var(--border); margin-top: 2px; }
.form-section:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.form-error { background: var(--red-soft); color: var(--red-text); padding: 8px 10px; border-radius: 6px; font-size: 12.5px; }

.segmented { display: inline-flex; padding: 2px; background: var(--slate-soft); border-radius: 7px; gap: 1px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.segmented::-webkit-scrollbar { display: none; }
.segmented button { flex: none; white-space: nowrap; border: 0; background: transparent; height: 24px; padding: 0 9px; border-radius: 5px; color: var(--text-2); font-weight: 500; font-size: 12px; }
.segmented button.active { background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--border); }

/* layout */
.shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--border); padding: 12px 8px; }
.brand { display: flex; align-items: center; gap: 8px; padding: 2px 8px 12px; font-weight: 650; font-size: 15px; letter-spacing: -0.02em; }
.brand-mark { width: 22px; height: 22px; border-radius: 6px; background: var(--brand); display: grid; place-items: center; }
.brand-mark svg { width: 13px; height: 13px; stroke: #fff; fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.org-switch { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border: 1px solid transparent; background: transparent; border-radius: 6px; text-align: left; margin-bottom: 8px; }
.org-switch:hover { background: var(--surface-hover); }
.org-switch .org-name { font-weight: 600; font-size: 12.5px; }
.org-switch .org-sub { font-size: 11.5px; color: var(--text-3); }
.org-logo { width: 22px; height: 22px; border-radius: 6px; background: var(--brand-soft-2); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: 10px; flex: none; }
.nav { display: flex; flex-direction: column; gap: 1px; overflow-y: auto; flex: 1; }
.nav-label { font-size: 10.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--text-3); padding: 12px 8px 4px; }
.nav a { display: flex; align-items: center; gap: 9px; padding: 5px 8px; border-radius: 6px; color: var(--text-2); font-weight: 500; text-decoration: none; }
.nav a:hover { background: var(--surface-hover); color: var(--text); }
.nav a.active { background: var(--brand-soft); color: var(--brand); }
.nav .badge { margin-left: auto; }
.sidebar-foot { padding-top: 8px; border-top: 1px solid var(--border); margin-top: 6px; }
.demo-pill { margin: 0 2px 8px; padding: 6px 8px; background: var(--amber-soft); color: var(--amber-text); border-radius: 6px; font-size: 11.5px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; height: var(--topbar-h); display: flex; align-items: center; gap: 8px; padding: 0 20px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.topbar h1 { display: none; font-size: 14px; flex: 1; }
.topbar .spacer { display: none; }
.menu-btn { display: none; }
.kbd { font: 500 10.5px var(--font); padding: 1px 5px; border-radius: 4px; border: 1px solid var(--border-strong); color: var(--text-3); background: var(--surface); }
.search-trigger { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 10px; min-width: 240px; margin-right: auto; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--text-3); }
.search-trigger:hover { border-color: var(--border-strong); }
.search-trigger .kbd { margin-left: auto; }
.content { padding: 18px 20px 40px; max-width: 1280px; width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.page-head h2 { font-size: 17px; font-weight: 650; letter-spacing: -0.015em; }
.page-head p { color: var(--text-3); margin-top: 2px; }
.page-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.toolbar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar .grow { flex: 1; min-width: 180px; }
.toolbar .select { width: auto; min-width: 120px; }

/* cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.card-pad { padding: 14px 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px 0; }
.card-head h3 { font-size: 13px; font-weight: 600; }
.card-head .sub { color: var(--text-3); font-size: 12px; margin-top: 1px; }
.card-body { padding: 10px 16px 14px; }
.grid { display: grid; gap: 12px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 8px; }
.row.between { justify-content: space-between; } .row.wrap { flex-wrap: wrap; }

/* KPI strip: joined cells, hairline dividers */
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--surface); padding: 11px 14px; border: 0; border-radius: 0; }
.stat .stat-top { display: flex; align-items: center; justify-content: space-between; color: var(--text-2); font-size: 12px; }
.stat .stat-icon { display: none; }
.stat .stat-value { font-size: 20px; font-weight: 650; letter-spacing: -0.025em; margin-top: 4px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat .stat-foot { margin-top: 3px; font-size: 11.5px; color: var(--text-3); display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.delta-up { color: var(--green); font-weight: 600; } .delta-down { color: var(--red); font-weight: 600; }

/* tables */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); padding: 7px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface); }
.table th.right, .table td.right { text-align: right; }
.table td { padding: 7px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr:hover { background: var(--surface-2); }
.table .cell-main { font-weight: 550; }
.table .cell-sub { font-size: 11.5px; color: var(--text-3); }
.table tfoot td { font-weight: 600; background: var(--surface-2); border-top: 1px solid var(--border); }
.row-actions { display: flex; gap: 0; justify-content: flex-end; opacity: 0; transition: opacity .1s; }
tr:hover .row-actions, .row-actions:focus-within { opacity: 1; }
@media (hover: none) { .row-actions { opacity: 1; } }

/* chips */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 1px 7px; border-radius: 999px; font-size: 11.5px; font-weight: 550; background: var(--slate-soft); color: var(--slate-text); white-space: nowrap; line-height: 1.5; }
.chip::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .7; }
.chip.plain::before { display: none; }
.chip.blue { background: var(--brand-soft); color: var(--brand); }
.chip.green { background: var(--green-soft); color: var(--green-text); }
.chip.amber { background: var(--amber-soft); color: var(--amber-text); }
.chip.red { background: var(--red-soft); color: var(--red-text); }
.chip.violet { background: var(--violet-soft); color: var(--violet-text); }
.badge { display: inline-grid; place-items: center; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 999px; background: var(--brand-soft-2); color: var(--brand); font-size: 10.5px; font-weight: 700; }

.avatar { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 600; font-size: 10px; color: #fff; flex: none; }
.avatar.sm { width: 20px; height: 20px; font-size: 8.5px; } .avatar.lg { width: 40px; height: 40px; font-size: 14px; }
.avatar-stack { display: flex; } .avatar-stack .avatar { border: 2px solid var(--surface); margin-left: -6px; } .avatar-stack .avatar:first-child { margin-left: 0; }
.person { display: flex; align-items: center; gap: 8px; min-width: 0; }

.progress { height: 4px; border-radius: 999px; background: var(--slate-soft); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 999px; background: var(--brand); transition: width .4s ease; }
.progress.green > span { background: var(--green); } .progress.amber > span { background: var(--amber); } .progress.red > span { background: var(--red); }

/* lists */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.list-item:last-child { border-bottom: 0; padding-bottom: 0; } .list-item:first-child { padding-top: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { font-weight: 550; } .list-item .sub { font-size: 11.5px; color: var(--text-3); }
.dot-icon { width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center; flex: none; background: var(--brand-soft); color: var(--brand); }
.dot-icon .i { width: 14px; height: 14px; }
.dot-icon.green { background: var(--green-soft); color: var(--green); } .dot-icon.red { background: var(--red-soft); color: var(--red); } .dot-icon.amber { background: var(--amber-soft); color: var(--amber); }

/* empty + skeleton */
.empty { text-align: center; padding: 32px 20px; }
.empty .empty-art { width: 36px; height: 36px; margin: 0 auto 10px; border-radius: 9px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.empty h3 { font-size: 14px; } .empty p { color: var(--text-2); margin: 4px auto 12px; max-width: 360px; }
.skeleton { background: linear-gradient(90deg, var(--slate-soft) 25%, var(--surface-hover) 37%, var(--slate-soft) 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; border-radius: 6px; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* overlays */
.overlay { position: fixed; inset: 0; z-index: 100; background: rgba(10,14,22,.42); display: grid; place-items: center; padding: 16px; animation: fade .12s ease; }
.overlay.top { place-items: start center; padding-top: 12vh; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; max-width: 480px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; animation: rise .14s ease; }
.modal.lg { max-width: 640px; } .modal.sm { max-width: 360px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 14px 16px 0; }
.modal-head h3 { font-size: 15px; } .modal-head p { color: var(--text-3); margin-top: 2px; }
.modal-body { padding: 14px 16px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 6px; padding: 10px 16px; border-top: 1px solid var(--border); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); background: var(--surface); border-left: 1px solid var(--border); box-shadow: var(--shadow-lg); z-index: 101; display: flex; flex-direction: column; animation: slide .18s ease; }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } }
.drawer-head { padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; gap: 12px; align-items: flex-start; }
.drawer-body { padding: 14px 16px; overflow-y: auto; flex: 1; }
.drawer-foot { padding: 10px 16px; border-top: 1px solid var(--border); display: flex; gap: 6px; justify-content: flex-end; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; margin: 0; }
.kv dt { color: var(--text-3); } .kv dd { margin: 0; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.section-title { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); margin: 16px 0 8px; }
.section-title:first-child { margin-top: 0; }

.menu { position: fixed; z-index: 120; min-width: 190px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow-lg); padding: 4px; animation: rise .1s ease; }
.menu button, .menu a { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border: 0; background: transparent; border-radius: 5px; text-align: left; color: var(--text); text-decoration: none; }
.menu button:hover, .menu a:hover { background: var(--surface-hover); text-decoration: none; }
.menu .sep { height: 1px; background: var(--border); margin: 4px 0; }
.menu .menu-label { padding: 4px 8px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); font-weight: 600; }
.menu .danger { color: var(--red); } .menu .check-on { margin-left: auto; color: var(--brand); }

.palette { width: min(560px, 94vw); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg); overflow: hidden; animation: rise .12s ease; }
.palette input { width: 100%; border: 0; border-bottom: 1px solid var(--border); background: transparent; padding: 13px 16px; font-size: 14px; outline: none; }
.palette-results { max-height: 50vh; overflow-y: auto; padding: 4px; }
.palette-item { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 6px; cursor: pointer; }
.palette-item.sel, .palette-item:hover { background: var(--brand-soft); }
.palette-group { padding: 6px 10px 2px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); font-weight: 600; }

#toast-root { position: fixed; right: 16px; bottom: 16px; z-index: 200; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.toast { background: var(--text); color: var(--bg); padding: 8px 12px; border-radius: 8px; box-shadow: var(--shadow-lg); display: flex; gap: 8px; align-items: center; animation: rise .16s ease; max-width: 340px; }
.toast.ok .i { color: #4ade80; } .toast.err .i { color: #f87171; }

/* kanban */
.board { display: grid; grid-template-columns: repeat(4, minmax(230px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 6px; align-items: start; }
.column { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; min-height: 120px; transition: background .12s, border-color .12s; }
.column.drop { background: var(--brand-soft); border-color: var(--brand); }
.column-head { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 6px; font-weight: 600; font-size: 12.5px; }
.column-head .count { color: var(--text-3); font-weight: 500; margin-left: 2px; }
.task-card { background: var(--surface); border: 1px solid var(--border); border-radius: 7px; padding: 8px 10px; margin-bottom: 6px; cursor: grab; transition: border-color .12s; }
.task-card:hover { border-color: var(--border-strong); }
.task-card.dragging { opacity: .45; }
.task-card .t-title { font-weight: 500; margin: 4px 0 6px; line-height: 1.35; }
.task-card .t-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; color: var(--text-3); font-size: 11.5px; }
.prio { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; }
.prio.low { color: var(--text-3); } .prio.medium { color: var(--brand); } .prio.high { color: var(--amber); } .prio.urgent { color: var(--red); }
.due.over { color: var(--red); font-weight: 600; }

/* team cards */
.person-card { padding: 12px 14px; cursor: pointer; transition: border-color .12s; }
.person-card:hover { border-color: var(--border-strong); }
.person-card .pc-top { display: flex; gap: 10px; align-items: center; }
.person-card .pc-meta { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 10px; }
.person-card .pc-foot { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border); color: var(--text-2); font-size: 12px; gap: 6px; }
.person-card .pc-foot .i { vertical-align: -2px; }

/* auth: plain centred card */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 340px; }
.auth-card .brand { padding: 0 0 18px; font-size: 16px; }
.auth-card h2 { font-size: 18px; } .auth-card .sub { color: var(--text-2); margin: 3px 0 16px; }
.auth-form { display: grid; gap: 12px; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--text-3); font-size: 11.5px; margin: 2px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* onboarding */
.onb { min-height: 100vh; background: var(--bg); padding: 20px 16px 48px; }
.onb-top { max-width: 860px; margin: 0 auto 18px; display: flex; align-items: center; justify-content: space-between; }
.onb-wrap { max-width: 860px; margin: 0 auto; }
.steps { display: flex; gap: 6px; margin-bottom: 12px; }
.step { flex: 1; display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 7px; border: 1px solid var(--border); background: var(--surface); color: var(--text-3); font-weight: 500; }
.step .n { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--slate-soft); font-size: 10.5px; font-weight: 700; flex: none; }
.step.active { color: var(--text); border-color: var(--brand); } .step.active .n { background: var(--brand); color: #fff; }
.step.done .n { background: var(--green); color: #fff; } .step.done { color: var(--text-2); }
.onb-card { padding: 22px; } .onb-card h2 { font-size: 18px; } .onb-card .lead { color: var(--text-2); margin: 4px 0 18px; }
.choice-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.choice { text-align: left; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); transition: border-color .12s, background .12s; }
.choice:hover { border-color: var(--text-3); }
.choice.sel { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 1px var(--brand); }
.choice .i { color: var(--brand); width: 18px; height: 18px; } .choice b { display: block; margin: 6px 0 1px; } .choice span { color: var(--text-2); font-size: 11.5px; }
.team-rows { display: grid; gap: 6px; }
.team-row { display: grid; grid-template-columns: 1.1fr 1.6fr 1fr 1fr 104px 92px 28px; gap: 6px; align-items: center; }
.team-row.head { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); }
.onb-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--border); }
.success { text-align: center; padding: 16px 0; } .success .check-big { width: 44px; height: 44px; border-radius: 50%; background: var(--green-soft); color: var(--green); display: grid; place-items: center; margin: 0 auto 12px; }

/* misc */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 12px; overflow-x: auto; align-items: center; }
.tabs button { background: none; border: 0; padding: 7px 10px; color: var(--text-2); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.active { color: var(--brand); border-bottom-color: var(--brand); }
.chart-box { position: relative; height: 210px; } .chart-box.sm { height: 150px; }
.legend { display: flex; gap: 10px; flex-wrap: wrap; font-size: 11.5px; color: var(--text-2); }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }
.callout { display: flex; gap: 10px; padding: 10px 12px; border-radius: 8px; background: var(--brand-soft); border: 1px solid var(--brand-soft-2); }
.callout .i { color: var(--brand); margin-top: 1px; }
.callout.warn { background: var(--amber-soft); border-color: transparent; } .callout.warn .i { color: var(--amber); }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--text-3); margin-bottom: 8px; }
.back:hover { color: var(--text); text-decoration: none; }
.project-head { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; margin-bottom: 14px; }
.mini-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 14px; }
.mini-kpi { padding: 9px 12px; background: var(--surface); }
.mini-kpi .l { color: var(--text-3); font-size: 11.5px; } .mini-kpi .v { font-size: 16px; font-weight: 650; margin-top: 1px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

/* dashboard header block (replaces the old hero) */
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.dash-head h2 { font-size: 17px; font-weight: 650; letter-spacing: -0.015em; }
.dash-head p { color: var(--text-3); margin-top: 2px; }
.section-gap { margin-top: 12px; }

/* responsive */
@media (max-width: 1100px) {
  .grid-main { grid-template-columns: minmax(0, 1fr); }
  .choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 240px; z-index: 90; transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow-lg); }
  .shell.nav-open .sidebar { transform: none; }
  .scrim { position: fixed; inset: 0; background: rgba(10,14,22,.42); z-index: 80; }
  .menu-btn { display: inline-grid; }
  .topbar { padding: 0 10px; } .topbar h1 { display: block; } .search-trigger { margin-right: 0; }
  .content { padding: 14px 12px 32px; }
  .search-trigger { min-width: 0; width: 30px; padding: 0; justify-content: center; } .search-trigger span, .search-trigger .kbd { display: none; }
  .grid-3, .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .team-row { grid-template-columns: 1fr 1fr; } .team-row.head { display: none; } .team-row > :last-child { justify-self: end; }
  .steps .step span.t { display: none; } .onb-card { padding: 16px 14px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) { .choice-grid { grid-template-columns: minmax(0, 1fr); } }
@media print { .sidebar, .topbar, .page-actions, .toolbar { display: none !important; } .shell { display: block; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ============================================================
   Colour layer — navy sidebar, tinted ground, gradients, accents
   ============================================================ */
:root { --bg: #eef2fa; --surface-2: #f4f7fc; --border: #e3e9f5; }

/* sidebar */
.sidebar { background: linear-gradient(185deg, #17307f 0%, #0e1d52 46%, #0a1338 100%); border-right: 0; color: #c5d0ee; }
.sidebar .brand { color: #fff; }
.sidebar .brand-mark { background: linear-gradient(135deg, #7db4ff, #2563eb); box-shadow: 0 4px 14px -2px rgba(96,165,250,.6); }
.sidebar .org-switch { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.09); color: #fff; }
.sidebar .org-switch:hover { background: rgba(255,255,255,.13); }
.sidebar .org-sub { color: #93a6d6; }
.sidebar .org-logo { background: rgba(125,180,255,.28); color: #dbe8ff; }
.sidebar .nav-label { color: #6f86c6; }
.sidebar .nav a { color: #b8c5e8; }
.sidebar .nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar .nav a.active { background: linear-gradient(90deg, rgba(125,180,255,.30), rgba(125,180,255,.08)); color: #fff; box-shadow: inset 2px 0 0 #7db4ff; }
.sidebar .badge { background: rgba(125,180,255,.32); color: #e3eeff; }
.sidebar-foot { border-top-color: rgba(255,255,255,.1); }
.sidebar .demo-pill { background: rgba(251,191,36,.16); color: #fde68a; }

/* top bar + page titles */
.topbar { background: color-mix(in srgb, var(--bg) 86%, transparent); }
.page-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.page-icon { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: #fff; flex: none; background: linear-gradient(135deg, #60a5fa, #2563eb); box-shadow: 0 6px 14px -6px rgba(37,99,235,.65); }
.page-icon.green { background: linear-gradient(135deg, #34d399, #059669); box-shadow: 0 6px 14px -6px rgba(5,150,105,.6); }
.page-icon.violet { background: linear-gradient(135deg, #a78bfa, #6d28d9); box-shadow: 0 6px 14px -6px rgba(109,40,217,.6); }
.page-icon.amber { background: linear-gradient(135deg, #fbbf24, #d97706); box-shadow: 0 6px 14px -6px rgba(217,119,6,.6); }
.page-icon.slate { background: linear-gradient(135deg, #94a3b8, #475569); box-shadow: 0 6px 14px -6px rgba(71,85,105,.6); }
.page-head p { margin-top: 1px; }

/* cards */
.card { box-shadow: 0 1px 2px rgba(16,32,90,.04), 0 6px 18px -14px rgba(16,32,90,.18); }
.grid-4 { box-shadow: 0 1px 2px rgba(16,32,90,.04), 0 6px 18px -14px rgba(16,32,90,.18); }
.stat { box-shadow: none; position: relative; overflow: hidden; }
.stat .stat-icon { display: grid; width: 24px; height: 24px; border-radius: 7px; place-items: center; background: var(--brand-soft-2); color: var(--brand); }
.stat .stat-icon .i { width: 14px; height: 14px; }
.stat .stat-icon.green { background: var(--green-soft); color: var(--green); }
.stat .stat-icon.amber { background: var(--amber-soft); color: var(--amber); }
.stat .stat-icon.red { background: var(--red-soft); color: var(--red); }
.stat .stat-icon.violet { background: var(--violet-soft); color: var(--violet); }
.stat.t-blue { background: linear-gradient(135deg, var(--brand-soft) 0%, var(--surface) 70%); }
.stat.t-green { background: linear-gradient(135deg, var(--green-soft) 0%, var(--surface) 70%); }
.stat.t-amber { background: linear-gradient(135deg, var(--amber-soft) 0%, var(--surface) 70%); }
.stat.t-red { background: linear-gradient(135deg, var(--red-soft) 0%, var(--surface) 70%); }
.stat.t-violet { background: linear-gradient(135deg, var(--violet-soft) 0%, var(--surface) 70%); }
.stat .spark { position: absolute; right: 12px; top: 33px; width: 72px; height: 26px; pointer-events: none; }
.mini-kpi:nth-child(1) .v { color: var(--brand); } .mini-kpi:nth-child(5) .v { color: inherit; }

/* dashboard banner */
.dash-head { background: linear-gradient(115deg, #1e40af 0%, #2563eb 48%, #5b9bff 100%); color: #fff; border-radius: 12px; padding: 14px 18px; align-items: center; position: relative; overflow: hidden; box-shadow: 0 14px 28px -18px rgba(37,99,235,.8); }
.dash-head::before { content: ""; position: absolute; right: 120px; top: -70px; width: 190px; height: 190px; border-radius: 50%; background: rgba(255,255,255,.10); }
.dash-head::after { content: ""; position: absolute; right: -40px; bottom: -90px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,.08); }
.dash-head > * { position: relative; z-index: 1; }
.dash-head h2 { color: #fff; } .dash-head p { color: rgba(255,255,255,.82); } .dash-head p .delta-down { color: #ffd1d1; }
.dash-head .segmented { background: rgba(255,255,255,.16); }
.dash-head .segmented button { color: rgba(255,255,255,.86); }
.dash-head .segmented button.active { background: #fff; color: #1d4ed8; box-shadow: none; }
.dash-head .btn { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.3); color: #fff; }
.dash-head .btn:hover { background: rgba(255,255,255,.24); }
.dash-head .btn-primary { background: #fff; border-color: #fff; color: #1d4ed8; }
.dash-head .btn-primary:hover { background: #eaf1ff; }

/* progress with gradient */
.progress { height: 5px; }
.progress > span { background: linear-gradient(90deg, #60a5fa, #2563eb); }
.progress.green > span { background: linear-gradient(90deg, #4ade80, #16a34a); }
.progress.amber > span { background: linear-gradient(90deg, #fcd34d, #d97706); }
.progress.red > span { background: linear-gradient(90deg, #fca5a5, #dc2626); }

/* kanban */
.column { border-top-width: 3px; }
.column[data-col="todo"] { border-top-color: #94a3b8; background: linear-gradient(180deg, rgba(148,163,184,.12), var(--surface-2) 90px); }
.column[data-col="in_progress"] { border-top-color: #3b82f6; background: linear-gradient(180deg, rgba(59,130,246,.10), var(--surface-2) 90px); }
.column[data-col="review"] { border-top-color: #8b5cf6; background: linear-gradient(180deg, rgba(139,92,246,.10), var(--surface-2) 90px); }
.column[data-col="done"] { border-top-color: #22c55e; background: linear-gradient(180deg, rgba(34,197,94,.10), var(--surface-2) 90px); }
.column.drop { background: var(--brand-soft); border-color: var(--brand); }
.task-card { border-left: 3px solid #cbd5e1; }
.task-card.p-low { border-left-color: #94a3b8; } .task-card.p-medium { border-left-color: #3b82f6; }
.task-card.p-high { border-left-color: #f59e0b; } .task-card.p-urgent { border-left-color: #ef4444; }

/* people + projects */
.person-card { border-top: 3px solid var(--c, var(--brand)); background: linear-gradient(180deg, color-mix(in srgb, var(--c, #2563eb) 9%, var(--surface)) 0%, var(--surface) 62px); }
.proj-tile { width: 26px; height: 26px; border-radius: 7px; display: inline-grid; place-items: center; color: #fff; font-weight: 700; font-size: 10px; flex: none; letter-spacing: .02em; }
.proj-tile.sm { width: 18px; height: 18px; border-radius: 5px; font-size: 8px; margin-right: 6px; }
.table th { background: var(--surface-2); }
.tabs button.active { color: var(--brand); }

/* empty states */
.empty { padding: 26px 20px; }
.empty .empty-art { width: auto; height: auto; background: none; border-radius: 0; margin: 0 auto 6px; display: block; }
.ring { flex: none; color: var(--text); }

/* auth + onboarding backdrop */
.auth { background: radial-gradient(700px 420px at 12% 8%, rgba(96,165,250,.34), transparent 70%), radial-gradient(640px 420px at 92% 92%, rgba(139,92,246,.20), transparent 70%), radial-gradient(500px 300px at 85% 10%, rgba(52,211,153,.14), transparent 70%), var(--bg); }
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 24px 24px 20px; box-shadow: 0 24px 60px -28px rgba(37,99,235,.45); max-width: 360px; }
.onb { background: radial-gradient(900px 320px at 50% -100px, rgba(96,165,250,.38), transparent 70%), radial-gradient(500px 260px at 100% 0, rgba(139,92,246,.16), transparent 70%), var(--bg); }
.step.active .n { background: linear-gradient(135deg, #60a5fa, #2563eb); }
.choice.sel { background: linear-gradient(135deg, var(--brand-soft), var(--surface)); }
.success .check-big { background: linear-gradient(135deg, #34d399, #059669); color: #fff; }

/* dark mode: tune the new layer */
:root[data-theme="dark"] { --bg: #0b0e14; --surface-2: #0e1219; --border: #1d2430; }
:root[data-theme="dark"] .card { box-shadow: none; }
:root[data-theme="dark"] .auth-card { box-shadow: 0 24px 60px -28px rgba(0,0,0,.8); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #0b0e14; --surface-2: #0e1219; --border: #1d2430; }
  :root:not([data-theme="light"]) .card { box-shadow: none; }
}
@media (max-width: 900px) { .dash-head::before, .dash-head::after { opacity: .6; } .stat .spark { width: 60px; } }
@media (max-width: 600px) { .stat .spark { display: none; } }

.brand { white-space: nowrap; font-size: 14px; letter-spacing: -0.01em; }
.auth-card .brand { font-size: 16px; }

/* GoalBay link in the sidebar */
.goalbay-btn { display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 9px; margin: 0 0 8px; border-radius: 8px; border: 1px solid rgba(255,255,255,.12); background: linear-gradient(120deg, rgba(139,92,246,.30), rgba(52,211,153,.18)); color: #fff; text-align: left; transition: border-color .12s, background .12s; }
.goalbay-btn:hover { border-color: rgba(255,255,255,.28); background: linear-gradient(120deg, rgba(139,92,246,.42), rgba(52,211,153,.26)); }
.goalbay-btn .gb-text { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.2; }
.goalbay-btn .gb-text b { font-size: 12.5px; } .goalbay-btn .gb-text small { font-size: 11px; color: #c7d2ee; }
.goalbay-btn > .i { color: #c7d2ee; }
.gb-mark { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; flex: none; color: #fff; background: linear-gradient(135deg, #8b5cf6, #34d399); }
.gb-mark.lg { width: 40px; height: 40px; border-radius: 11px; }
.gb-hero { display: flex; gap: 12px; align-items: flex-start; }
.gb-hero p { margin-top: 3px; }

/* GoalBay connect card + My pay */
.gb-card { min-width: 0; }
.gb-state { display: flex; gap: 10px; align-items: flex-start; }
.gb-state > div { min-width: 0; }
.gb-badge { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none; color: #fff; background: linear-gradient(135deg, #8b5cf6, #34d399); }
.gb-badge.ok { background: linear-gradient(135deg, #34d399, #059669); }
.gb-points { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 6px; color: var(--text-2); }
.gb-points li { display: flex; gap: 8px; align-items: flex-start; } .gb-points .i { color: var(--green); margin-top: 2px; }
.gb-code { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding: 12px 14px; border-radius: 10px; border: 1px dashed var(--brand); background: var(--brand-soft); }
.gb-code span { font: 650 20px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; color: var(--brand); overflow-wrap: anywhere; }
@media (max-width: 480px) { .gb-code span { font-size: 16px; } }

/* GoalBay's own icon */
.gb-logo { width: 24px; height: 24px; border-radius: 7px; display: block; flex: none; object-fit: cover; box-shadow: 0 0 0 1px rgba(255,255,255,.18); }
.gb-logo.lg { width: 34px; height: 34px; border-radius: 9px; }
.dot-icon .gb-logo { width: 100%; height: 100%; border-radius: 6px; box-shadow: none; }

/* Team-member screens */
.week-bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; }
.wb { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11.5px; color: var(--text-3); }
.wb b { color: var(--text); font-size: 12px; } .wb.today small { color: var(--brand); font-weight: 700; }
.wb-col { width: 100%; max-width: 34px; height: 92px; display: flex; align-items: flex-end; background: var(--slate-soft); border-radius: 6px; overflow: hidden; }
.wb-col span { display: block; width: 100%; border-radius: 6px 6px 0 0; background: linear-gradient(180deg, #60a5fa, #2563eb); transition: height .4s ease; }
.wb.today .wb-col { box-shadow: 0 0 0 1.5px var(--brand); }
.ts-day { display: grid; grid-template-columns: 74px 1fr auto; gap: 10px; align-items: start; padding: 9px 0; border-bottom: 1px solid var(--border); }
.ts-day:last-child { border-bottom: 0; } .ts-day.today { background: linear-gradient(90deg, var(--brand-soft), transparent 60%); margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
.ts-date { display: flex; flex-direction: column; line-height: 1.25; }
.ts-rows { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ts-row { display: flex; align-items: center; gap: 8px; width: 100%; padding: 5px 8px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); text-align: left; }
.ts-row:hover { border-color: var(--border-strong); background: var(--surface-2); } .ts-row .grow { flex: 1; min-width: 0; }
.proj-dot { width: 8px; height: 8px; border-radius: 3px; flex: none; }
.ts-total { display: flex; align-items: center; gap: 4px; font-weight: 650; min-width: 62px; justify-content: flex-end; }
.home-proj { display: block; padding: 12px 14px; border: 1px solid var(--border); border-top: 3px solid var(--c, var(--brand)); border-radius: 8px; color: inherit; text-decoration: none; background: linear-gradient(180deg, color-mix(in srgb, var(--c, #2563eb) 8%, var(--surface)), var(--surface) 60px); }
.home-proj:hover { border-color: var(--border-strong); border-top-color: var(--c, var(--brand)); text-decoration: none; }
@media (max-width: 560px) { .ts-day { grid-template-columns: 56px 1fr; } .ts-total { grid-column: 2; justify-content: flex-start; } }

/* Access controls in the team drawer */
.access-box { padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }

/* ---------- iOS home-screen app polish ---------- */
html { -webkit-text-size-adjust: 100%; }
body { -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none; }
button, a, .btn, [role="button"], select, label { touch-action: manipulation; }
.topbar { padding-top: env(safe-area-inset-top); height: calc(var(--topbar-h) + env(safe-area-inset-top)); padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
.content { padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
#toast-root { bottom: calc(16px + env(safe-area-inset-bottom)); right: max(16px, env(safe-area-inset-right)); }
@supports (height: 100dvh) {
  .boot, .shell, .auth, .onb { min-height: 100dvh; } .boot { height: 100dvh; } .sidebar { height: 100dvh; }
  .modal { max-height: calc(100dvh - 32px); }
}
/* 16px fields stop iOS zooming the page when one is focused */
@media (hover: none) and (pointer: coarse) { input, select, textarea, .input, .select, .textarea { font-size: 16px; } }
.ios-steps { margin: 0; padding-left: 20px; display: grid; gap: 10px; line-height: 1.5; }
.ios-steps svg { vertical-align: -3px; color: var(--primary, #2563eb); }
