/* CoachDesk design system ------------------------------------------------ */
:root {
  color-scheme: light;
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --surface-3: #eef0f4;
  --border: #e3e6eb;
  --border-strong: #cdd3dc;
  --text: #0f172a;
  --text-2: #475569;
  --text-3: #667085;
  --primary: #059669;
  --primary-hover: #047857;
  --primary-soft: #e6f6ef;
  --primary-text: #047857;
  --on-primary: #ffffff;
  --focus: 0 0 0 3px rgba(5, 150, 105, 0.25);
  --danger: #dc2626;
  --danger-soft: #fdecec;
  --danger-text: #b91c1c;
  --warning: #d97706;
  --warning-soft: #fdf3e1;
  --warning-text: #92400e;
  --info: #2563eb;
  --info-soft: #eaf1fe;
  --info-text: #1d4ed8;
  --neutral-soft: #eef0f4;
  --sidebar-bg: #0c1424;
  --sidebar-text: #a9b3c4;
  --sidebar-strong: #ffffff;
  --sidebar-hover: rgba(255, 255, 255, 0.06);
  --sidebar-active: rgba(52, 211, 153, 0.14);
  --series-1: #2a78d6;
  --chart-grid: #e8eaee;
  --chart-axis: #c3c7cf;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 18px 40px rgba(15, 23, 42, 0.16), 0 2px 6px rgba(15, 23, 42, 0.06);
  --font: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #0a0e16;
  --surface: #121826;
  --surface-2: #161d2c;
  --surface-3: #1d2536;
  --border: #242d3f;
  --border-strong: #334057;
  --text: #e7eaf0;
  --text-2: #aab3c3;
  --text-3: #8591a6;
  --primary: #10b981;
  --primary-hover: #34d399;
  --primary-soft: rgba(16, 185, 129, 0.14);
  --primary-text: #34d399;
  --on-primary: #04140d;
  --focus: 0 0 0 3px rgba(52, 211, 153, 0.3);
  --danger: #f05252;
  --danger-soft: rgba(240, 82, 82, 0.14);
  --danger-text: #f87171;
  --warning: #f59e0b;
  --warning-soft: rgba(245, 158, 11, 0.14);
  --warning-text: #fbbf24;
  --info: #3b82f6;
  --info-soft: rgba(59, 130, 246, 0.15);
  --info-text: #7aa7fa;
  --neutral-soft: #1d2536;
  --sidebar-bg: #070b12;
  --series-1: #3987e5;
  --chart-grid: #232b3a;
  --chart-axis: #3a4558;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 18px 40px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv11', 'ss01';
}
body.modal-open { overflow: hidden; }
a { color: var(--primary-text); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: 24px; font-weight: 700; }
h2 { font-size: 17px; font-weight: 650; }
h3 { font-size: 15px; font-weight: 650; }
p { margin: 0; }
small, .small { font-size: 12.5px; }
.muted { color: var(--text-3); }
.text-2 { color: var(--text-2); }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.spacer { flex: 1; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
svg.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }

/* Layout ------------------------------------------------------------------ */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: var(--sidebar-bg); color: var(--sidebar-text); padding: 18px 12px; gap: 4px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; color: var(--sidebar-strong); font-weight: 750; font-size: 17px; letter-spacing: -0.02em; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, #34d399, #059669); color: #04140d;
}
.brand-mark svg.icon { width: 19px; height: 19px; stroke-width: 2.4; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: #6b778c; padding: 14px 12px 6px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 9px;
  color: var(--sidebar-text); font-weight: 500; text-decoration: none;
}
.nav a:hover { background: var(--sidebar-hover); color: var(--sidebar-strong); }
.nav a.active { background: var(--sidebar-active); color: var(--sidebar-strong); }
.nav a.active svg.icon { color: #34d399; }
.nav a .count { margin-left: auto; font-size: 11px; background: #f59e0b; color: #1a1204; padding: 1px 7px; border-radius: 99px; font-weight: 700; }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.plan-pill { display: block; padding: 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); color: var(--sidebar-text); font-size: 12.5px; text-decoration: none; }
.plan-pill strong { color: var(--sidebar-strong); display: block; font-size: 13px; }
.plan-pill:hover { background: rgba(255, 255, 255, 0.08); text-decoration: none; }
.plan-pill .bar { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.1); margin-top: 8px; overflow: hidden; }
.plan-pill .bar span { display: block; height: 100%; background: #34d399; border-radius: 4px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--sidebar-strong); }
.user-chip .who { min-width: 0; flex: 1; }
.user-chip .who div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.user-chip .who small { color: var(--sidebar-text); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip button { color: var(--sidebar-text); }
.user-chip button:hover { color: #fff; background: var(--sidebar-hover); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; height: 62px; display: flex; align-items: center; gap: 12px;
  padding: 0 28px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar .mobile-brand { display: none; }
.search { position: relative; width: min(420px, 100%); }
.search input { padding-left: 38px; background: var(--surface); }
.search > svg.icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.search-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 30; max-height: 360px; overflow: auto;
}
.search-results a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text); text-decoration: none; }
.search-results a:hover, .search-results a.hl { background: var(--surface-3); }
.view-host { padding: 26px 28px 60px; max-width: 1320px; width: 100%; margin: 0 auto; }
.bottom-nav { display: none; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .sub { color: var(--text-3); margin-top: 4px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--text-3); font-weight: 500; margin-bottom: 10px; }
.back-link svg.icon { width: 16px; height: 16px; }

/* Grid helpers */
.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols-main { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-wrap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 0; }
.card-head h2 { font-size: 15.5px; }
.card-head .sub { color: var(--text-3); font-size: 12.5px; }
.card-body { padding: 14px 20px 18px; }
.card-foot { border-top: 1px solid var(--border); padding: 12px 20px; }
.card.flush .card-body { padding: 8px 0 8px; }

/* KPI tiles */
.kpi { padding: 16px 18px; }
.kpi .label { color: var(--text-3); font-size: 12.5px; font-weight: 500; display: flex; align-items: center; gap: 6px; }
.kpi .value { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin-top: 6px; }
.kpi .value small { font-size: 14px; font-weight: 500; color: var(--text-3); }
.kpi .delta { font-size: 12.5px; margin-top: 2px; color: var(--text-3); }
.delta-up { color: var(--primary-text); }
.delta-down { color: var(--danger-text); }

/* Buttons */
button { font: inherit; color: inherit; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 15px;
  border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap; text-decoration: none; transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.btn:hover { background: var(--surface-3); text-decoration: none; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn svg.icon { width: 17px; height: 17px; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(0.95); background: var(--danger); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }
.btn-soft { background: var(--primary-soft); border-color: transparent; color: var(--primary-text); }
.btn-soft:hover { background: var(--primary-soft); filter: brightness(0.97); }
.btn-sm { height: 32px; padding: 0 11px; font-size: 13px; }
.btn-lg { height: 46px; padding: 0 20px; font-size: 15px; border-radius: 11px; }
.btn-block { width: 100%; }
.btn-icon {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; border: 0; background: transparent;
  color: var(--text-2); cursor: pointer; flex: none;
}
.btn-icon:hover { background: var(--surface-3); color: var(--text); }
.btn-icon.sm { width: 28px; height: 28px; }
.btn-icon.sm svg.icon { width: 15px; height: 15px; }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-left: -1px; }
.btn-group .btn:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); margin-left: 0; }
.btn-group .btn:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* Segmented control */
.segmented { display: inline-flex; background: var(--surface-3); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.segmented button, .segmented a {
  border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; font-weight: 550; font-size: 13px; color: var(--text-2); cursor: pointer; text-decoration: none;
}
.segmented button:hover, .segmented a:hover { color: var(--text); text-decoration: none; }
.segmented .on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs a {
  padding: 10px 14px; color: var(--text-2); font-weight: 550; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none;
}
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.on { color: var(--text); border-bottom-color: var(--primary); }
.tabs a .count { font-size: 11.5px; color: var(--text-3); margin-left: 4px; }

/* Forms */
.form { display: flex; flex-direction: column; gap: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.form-grid .span-2 { grid-column: span 2; }
.form-grid .span-all { grid-column: 1 / -1; }
.form-section { font-size: 12px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-3); font-weight: 650; padding-top: 6px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > .label { font-weight: 550; font-size: 13px; color: var(--text-2); }
.field .hint { font-size: 12px; color: var(--text-3); }
.input, .select, .textarea {
  width: 100%; height: 38px; padding: 0 12px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font: inherit; transition: border-color 0.12s, box-shadow 0.12s;
}
.textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--focus); }
.input::placeholder, .textarea::placeholder { color: var(--text-3); opacity: 0.8; }
.input-group { display: flex; align-items: stretch; }
.input-group .input { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group .addon { display: grid; place-items: center; padding: 0 11px; border: 1px solid var(--border-strong); border-left: 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--surface-2); color: var(--text-3); font-size: 13px; }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; line-height: 1.4; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--primary); flex: none; }
.form-error { background: var(--danger-soft); color: var(--danger-text); padding: 10px 12px; border-radius: 9px; font-weight: 500; }
input[type='color'] { padding: 3px; width: 52px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches label { position: relative; cursor: pointer; }
.swatches input { position: absolute; opacity: 0; }
.swatches span { display: block; width: 26px; height: 26px; border-radius: 99px; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border-strong); }
.swatches input:checked + span { box-shadow: 0 0 0 2px var(--text); }

/* Badges and chips */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--neutral-soft); color: var(--text-2); white-space: nowrap; }
.badge .dot { width: 6px; height: 6px; border-radius: 9px; background: currentColor; }
.badge.green { background: var(--primary-soft); color: var(--primary-text); }
.badge.blue { background: var(--info-soft); color: var(--info-text); }
.badge.amber { background: var(--warning-soft); color: var(--warning-text); }
.badge.red { background: var(--danger-soft); color: var(--danger-text); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; background: var(--surface-3); color: var(--text-2); font-size: 12px; font-weight: 550; }
.chip-btn { border: 1px solid var(--border); background: var(--surface); cursor: pointer; padding: 6px 12px; border-radius: 99px; font-weight: 550; font-size: 13px; color: var(--text-2); }
.chip-btn:hover { border-color: var(--border-strong); color: var(--text); }
.chip-btn.on { background: var(--text); color: var(--surface); border-color: var(--text); }

/* Avatar */
.avatar {
  --c: var(--primary); width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: color-mix(in srgb, var(--c) 16%, var(--surface)); color: color-mix(in srgb, var(--c) 75%, var(--text));
  font-weight: 700; font-size: 13px; letter-spacing: 0.02em;
}
.avatar.lg { width: 64px; height: 64px; font-size: 22px; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }

/* Lists */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 11px 20px; color: var(--text); text-decoration: none; }
.list-item + .list-item { border-top: 1px solid var(--border); }
a.list-item:hover, .list-item.clickable:hover { background: var(--surface-2); text-decoration: none; cursor: pointer; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .meta { color: var(--text-3); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.time-col { width: 78px; flex: none; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.time-col small { display: block; color: var(--text-3); font-weight: 500; }
.color-bar { width: 4px; align-self: stretch; border-radius: 4px; flex: none; }

/* Tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-3); padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface-2); }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: var(--surface-2); }
.card > .table-wrap:first-child .table th:first-child { border-top-left-radius: var(--radius); }

/* Progress bars */
.progress { height: 8px; border-radius: 8px; background: var(--surface-3); overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: 8px; background: var(--primary); }
.progress.amber span { background: var(--warning); }
.progress.red span { background: var(--danger); }

/* Alerts / banners */
.banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; font-weight: 500; }
.banner.info { background: var(--info-soft); color: var(--info-text); }
.banner.warn { background: var(--warning-soft); color: var(--warning-text); }
.banner.danger { background: var(--danger-soft); color: var(--danger-text); }
.banner.success { background: var(--primary-soft); color: var(--primary-text); }
.banner .btn { margin-left: auto; }
.flag { display: flex; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--warning-soft); color: var(--warning-text); font-size: 13px; }
.flag.red { background: var(--danger-soft); color: var(--danger-text); }

/* Empty states */
.empty { text-align: center; padding: 38px 20px; color: var(--text-3); }
.empty .empty-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; margin: 0 auto 12px; background: var(--primary-soft); color: var(--primary-text); }
.empty h3 { color: var(--text); margin-bottom: 4px; }
.empty p { max-width: 380px; margin: 0 auto 14px; }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100; background: rgba(8, 12, 20, 0.5); display: flex; align-items: flex-start; justify-content: center;
  padding: 6vh 16px 16px; overflow-y: auto; animation: fade 0.12s ease-out;
}
.modal { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); width: 100%; max-width: 560px; animation: pop 0.14s ease-out; display: flex; flex-direction: column; max-height: 88vh; }
.modal-sm { max-width: 420px; }
.modal-lg { max-width: 780px; }
.modal-xl { max-width: 1040px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-head h2 { font-size: 16.5px; }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-foot { display: flex; align-items: center; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(0.98); } }

/* Toasts */
.toasts { position: fixed; bottom: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast {
  display: flex; align-items: center; gap: 10px; min-width: 260px; max-width: 420px; padding: 12px 14px; border-radius: 12px; background: #0f172a; color: #f1f5f9;
  box-shadow: var(--shadow-lg); font-weight: 500; animation: pop 0.16s ease-out;
}
.toast .t-icon { width: 22px; height: 22px; border-radius: 99px; display: grid; place-items: center; flex: none; background: #10b981; color: #04140d; }
.toast.error .t-icon { background: #f05252; color: #fff; }
.toast .t-icon svg.icon { width: 14px; height: 14px; stroke-width: 3; }
.toast a { color: #6ee7b7; margin-left: auto; }

/* Loading */
.loading { display: grid; place-items: center; padding: 80px 0; color: var(--text-3); }
.spinner { width: 26px; height: 26px; border-radius: 99px; border: 3px solid var(--border); border-top-color: var(--primary); animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Dropdown menu */
.menu-wrap { position: relative; }
.menu {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow-lg); padding: 6px; z-index: 40;
}
.menu button, .menu a { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; background: none; border-radius: 8px; text-align: left; cursor: pointer; color: var(--text); font-weight: 500; text-decoration: none; }
.menu button:hover, .menu a:hover { background: var(--surface-3); text-decoration: none; }
.menu hr { border: 0; border-top: 1px solid var(--border); margin: 6px 0; }
.menu .danger { color: var(--danger-text); }

/* Charts */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid-line { stroke: var(--chart-grid); stroke-width: 1; }
.chart .axis-line { stroke: var(--chart-axis); stroke-width: 1; }
.chart .tick { fill: var(--text-3); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .line { stroke: var(--series-1); stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.chart .area { fill: var(--series-1); opacity: 0.1; }
.chart .dot { fill: var(--series-1); stroke: var(--surface); stroke-width: 2; }
.chart .bar { fill: var(--series-1); }
.chart .bar.dim { opacity: 0.45; }
.chart .crosshair { stroke: var(--chart-axis); stroke-width: 1; }
.chart .end-label { fill: var(--text); font-size: 12px; font-weight: 650; }
.chart-tip {
  position: absolute; pointer-events: none; transform: translate(-50%, calc(-100% - 12px)); background: var(--text); color: var(--surface);
  padding: 6px 10px; border-radius: 8px; font-size: 12px; white-space: nowrap; box-shadow: var(--shadow-lg); z-index: 5;
}
.chart-tip strong { display: block; font-size: 13px; }
.chart-empty { display: grid; place-items: center; height: 180px; color: var(--text-3); background: var(--surface-2); border-radius: 12px; text-align: center; padding: 16px; }

/* Calendar ------------------------------------------------------------------ */
.cal-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.cal-toolbar .range { font-size: 18px; font-weight: 700; margin: 0 6px; min-width: 200px; }
.cal { overflow: hidden; }
.cal-head { display: grid; grid-template-columns: 56px repeat(var(--days), minmax(0, 1fr)); border-bottom: 1px solid var(--border); background: var(--surface-2); }
.cal-head div { padding: 8px 6px; text-align: center; font-size: 12px; color: var(--text-3); font-weight: 600; }
.cal-head div strong { display: block; font-size: 19px; color: var(--text); font-weight: 650; }
.cal-head .today strong { color: var(--on-primary); background: var(--primary); width: 34px; height: 34px; line-height: 34px; border-radius: 99px; margin: 2px auto 0; font-size: 16px; }
.cal-scroll { max-height: calc(100vh - 250px); min-height: 420px; overflow-y: auto; }
.cal-body { display: grid; grid-template-columns: 56px repeat(var(--days), minmax(0, 1fr)); position: relative; }
.cal-hours div { height: var(--hour); position: relative; font-size: 11px; color: var(--text-3); text-align: right; padding-right: 8px; }
.cal-hours div span { position: relative; top: -8px; }
.cal-col {
  position: relative; border-left: 1px solid var(--border); cursor: cell;
  background-image: repeating-linear-gradient(to bottom, var(--border) 0 1px, transparent 1px var(--hour));
}
.cal-col.weekend { background-color: var(--surface-2); }
.cal-col .off { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--border) 50%, transparent) 6px 7px); pointer-events: none; }
.now-line { position: absolute; left: 0; right: 0; height: 2px; background: var(--danger); z-index: 4; pointer-events: none; }
.now-line::before { content: ''; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 99px; background: var(--danger); }
.ev {
  --c: var(--primary); position: absolute; border-radius: 8px; padding: 4px 7px; overflow: hidden; cursor: pointer; z-index: 2;
  background: color-mix(in srgb, var(--c) 15%, var(--surface)); border-left: 3px solid var(--c); color: var(--text);
  font-size: 12px; line-height: 1.3; box-shadow: 0 0 0 1px var(--surface); user-select: none; touch-action: none;
}
.ev:hover { background: color-mix(in srgb, var(--c) 24%, var(--surface)); z-index: 3; }
.ev .ev-title { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev .ev-meta { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11.5px; }
.ev.completed { background: color-mix(in srgb, var(--c) 8%, var(--surface)); }
.ev.completed .ev-title::before { content: '✓ '; color: var(--primary-text); }
.ev.cancelled, .ev.late_cancel { opacity: 0.55; }
.ev.cancelled .ev-title, .ev.late_cancel .ev-title { text-decoration: line-through; }
.ev.no_show { border-left-style: dashed; }
.ev.no_show .ev-title::after { content: ' · no-show'; color: var(--danger-text); font-weight: 600; }
.ev.block { --c: #64748b; background: repeating-linear-gradient(135deg, var(--surface-3) 0 6px, var(--surface-2) 6px 12px); }
.ev.dragging { opacity: 0.85; box-shadow: var(--shadow-lg); z-index: 10; cursor: grabbing; }
.ev.short { padding-top: 1px; padding-bottom: 1px; }
.ev.short .ev-meta { display: none; }

.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.month .dow { padding: 8px; font-size: 12px; font-weight: 600; color: var(--text-3); text-align: center; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.month .cell { min-height: 112px; padding: 6px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); cursor: pointer; }
.month .cell:nth-child(7n) { border-right: 0; }
.month .cell.other { background: var(--surface-2); }
.month .cell.other .d { color: var(--text-3); }
.month .cell:hover { background: var(--surface-2); }
.month .d { font-weight: 650; font-size: 13px; margin-bottom: 4px; display: inline-grid; place-items: center; min-width: 26px; height: 26px; border-radius: 99px; }
.month .cell.today .d { background: var(--primary); color: var(--on-primary); }
.mchip { --c: var(--primary); display: flex; gap: 5px; align-items: center; font-size: 11.5px; padding: 2px 5px; border-radius: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mchip:hover { background: var(--surface-3); }
.mchip i { width: 7px; height: 7px; border-radius: 9px; background: var(--c); flex: none; }
.mchip.cancelled, .mchip.late_cancel { text-decoration: line-through; opacity: 0.6; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-3); margin-top: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* Client header ------------------------------------------------------------- */
.client-hero { display: flex; gap: 18px; align-items: center; padding: 20px; flex-wrap: wrap; }
.client-hero .info { flex: 1; min-width: 220px; }
.client-hero h1 { font-size: 22px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.client-hero .meta { color: var(--text-3); margin-top: 4px; display: flex; gap: 14px; flex-wrap: wrap; }
.client-hero .meta span { display: inline-flex; align-items: center; gap: 5px; }
.client-hero .meta svg.icon { width: 15px; height: 15px; }
.stat-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--border); }
.stat-strip > div { padding: 14px 20px; }
.stat-strip > div + div { border-left: 1px solid var(--border); }
.stat-strip .label { color: var(--text-3); font-size: 12px; font-weight: 500; }
.stat-strip .value { font-size: 18px; font-weight: 700; margin-top: 2px; }
.stat-strip .value small { color: var(--text-3); font-weight: 500; font-size: 12.5px; }

.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 14px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; font-weight: 500; white-space: pre-wrap; }
.targets { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.target { background: var(--surface-2); border-radius: 12px; padding: 12px; }
.target .label { color: var(--text-3); font-size: 12px; }
.target .value { font-size: 18px; font-weight: 700; }

/* Program view & builder --------------------------------------------------- */
.day-card { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface); }
.day-card + .day-card { margin-top: 14px; }
.day-card .day-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.day-card .day-head h3 { flex: 1; }
.ex-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ex-table th { text-align: left; font-size: 11.5px; color: var(--text-3); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.ex-table td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.ex-table tr:last-child td { border-bottom: 0; }
.ex-table .grp { font-weight: 700; color: var(--primary-text); width: 34px; }
.ex-table .ex-name { font-weight: 600; }
.ex-table .ex-note { color: var(--text-3); font-size: 12.5px; }
.builder-row { display: grid; grid-template-columns: 54px minmax(180px, 2.4fr) repeat(6, minmax(60px, 1fr)) 96px; gap: 6px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.builder-row.head { font-size: 11.5px; color: var(--text-3); font-weight: 600; background: var(--surface-2); }
.builder-row .input { height: 34px; padding: 0 8px; font-size: 13px; }
.builder-row .ex-pick { display: flex; flex-direction: column; min-width: 0; }
.builder-row .ex-pick .input { font-weight: 600; }
.builder-row .row-actions { display: flex; justify-content: flex-end; }
.builder-row .note-input { grid-column: 2 / -2; }
.sticky-bar {
  position: sticky; bottom: 0; z-index: 15; margin-top: 18px; display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg);
}
.picker-list { max-height: 420px; overflow-y: auto; border: 1px solid var(--border); border-radius: 12px; margin-top: 12px; }
.picker-list label { display: flex; gap: 12px; align-items: center; padding: 9px 12px; cursor: pointer; }
.picker-list label + label { border-top: 1px solid var(--border); }
.picker-list label:hover { background: var(--surface-2); }
.picker-list input { width: 17px; height: 17px; accent-color: var(--primary); }

/* Session logger ----------------------------------------------------------- */
.logger { max-width: 860px; margin: 0 auto; }
.logger-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.logger-head .timer { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; padding: 6px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.lx { margin-bottom: 14px; }
.lx-head { display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px 10px; }
.lx-head .grow { flex: 1; min-width: 0; }
.lx-head h3 { font-size: 16px; }
.lx-target { color: var(--text-2); font-size: 13px; margin-top: 2px; }
.lx-last { color: var(--text-3); font-size: 12.5px; margin-top: 2px; }
.sets { padding: 0 16px 12px; }
.set-row { display: grid; grid-template-columns: 34px 1fr 1fr 0.8fr 48px 30px; gap: 8px; align-items: center; padding: 5px 0; }
.set-row.head { font-size: 11.5px; color: var(--text-3); font-weight: 600; padding-bottom: 0; }
.set-row .n { font-weight: 700; color: var(--text-3); text-align: center; }
.set-row .input { height: 44px; font-size: 16px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.set-check { width: 48px; height: 44px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--text-3); }
.set-check:hover { border-color: var(--primary); color: var(--primary-text); }
.set-row.done .set-check { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.set-row.done .input { background: var(--primary-soft); border-color: transparent; }
.rest-timer {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 50; display: flex; align-items: center; gap: 12px;
  background: #0f172a; color: #fff; padding: 10px 12px 10px 18px; border-radius: 99px; box-shadow: var(--shadow-lg);
}
.rest-timer .t { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 56px; }
.rest-timer button { background: rgba(255, 255, 255, 0.12); color: #fff; border: 0; border-radius: 99px; height: 34px; padding: 0 14px; font-weight: 600; cursor: pointer; }
.rest-timer.done { background: var(--primary); color: var(--on-primary); }
.pr-burst { text-align: center; padding: 10px 0 4px; }
.pr-burst .big { font-size: 46px; line-height: 1; }
.pr-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.pr-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; background: var(--warning-soft); }
.pr-item svg.icon { color: var(--warning); }
.rpe-scale { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.rpe-scale label { position: relative; }
.rpe-scale input { position: absolute; opacity: 0; }
.rpe-scale span { display: grid; place-items: center; height: 38px; border-radius: 8px; border: 1px solid var(--border-strong); font-weight: 650; cursor: pointer; }
.rpe-scale input:checked + span { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }

/* Photos */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.photo { position: relative; border-radius: 12px; overflow: hidden; background: var(--surface-3); aspect-ratio: 3 / 4; cursor: pointer; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 10px 8px; background: linear-gradient(transparent, rgba(0, 0, 0, 0.65)); color: #fff; font-size: 12px; font-weight: 600; }
.photo.selected { outline: 3px solid var(--primary); outline-offset: 2px; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.compare img { width: 100%; border-radius: 12px; display: block; }

/* Plans / billing */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.plan { padding: 22px; position: relative; display: flex; flex-direction: column; gap: 10px; }
.plan.featured { border: 2px solid var(--primary); }
.plan .price { font-size: 34px; font-weight: 750; letter-spacing: -0.03em; }
.plan .price small { font-size: 14px; color: var(--text-3); font-weight: 500; }
.plan ul { margin: 4px 0 10px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 7px; color: var(--text-2); }
.plan li { display: flex; gap: 8px; }
.plan li svg.icon { color: var(--primary-text); width: 17px; height: 17px; margin-top: 2px; }
.ribbon { position: absolute; top: -11px; right: 18px; background: var(--primary); color: var(--on-primary); font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 99px; }
.code { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-weight: 650; letter-spacing: 0.04em; white-space: nowrap; }
textarea.code { white-space: pre; }

/* Auth & landing ----------------------------------------------------------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-side { background: radial-gradient(circle at 20% 10%, #0f3b2e 0, #0c1424 55%); color: #d6deea; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-side .brand { padding: 0; }
.auth-side h2 { font-size: 30px; color: #fff; font-weight: 750; letter-spacing: -0.02em; max-width: 460px; }
.auth-side ul { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-direction: column; gap: 14px; }
.auth-side li { display: flex; gap: 12px; align-items: flex-start; }
.auth-side li svg.icon { color: #34d399; margin-top: 2px; }
.auth-main { display: grid; place-items: center; padding: 40px 20px; background: var(--surface); }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { margin-bottom: 6px; }
.auth-card .sub { color: var(--text-3); margin-bottom: 24px; }
.auth-card .switch { text-align: center; margin-top: 18px; color: var(--text-3); }

.landing { background: var(--surface); }
.l-nav { display: flex; align-items: center; justify-content: space-between; padding: 18px 32px; max-width: 1200px; margin: 0 auto; }
.l-nav .brand { color: var(--text); padding: 0; }
.l-hero { text-align: center; padding: 64px 24px 40px; max-width: 900px; margin: 0 auto; }
.l-hero .eyebrow { display: inline-block; padding: 5px 12px; border-radius: 99px; background: var(--primary-soft); color: var(--primary-text); font-weight: 650; font-size: 13px; margin-bottom: 18px; }
.l-hero h1 { font-size: clamp(32px, 5vw, 54px); letter-spacing: -0.035em; font-weight: 800; line-height: 1.06; }
.l-hero p { font-size: 18px; color: var(--text-2); max-width: 640px; margin: 18px auto 28px; }
.l-hero .cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.l-section { max-width: 1120px; margin: 0 auto; padding: 48px 24px; }
.l-section > h2 { font-size: 30px; text-align: center; letter-spacing: -0.02em; margin-bottom: 8px; }
.l-section > p.lead { text-align: center; color: var(--text-2); margin-bottom: 30px; }
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.feature { padding: 20px; }
.feature .f-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-text); margin-bottom: 12px; }
.feature h3 { margin-bottom: 6px; }
.feature p { color: var(--text-2); }
.faq { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.faq details { padding: 14px 18px; }
.faq summary { font-weight: 650; cursor: pointer; }
.faq details p { color: var(--text-2); margin-top: 8px; }
.l-foot { text-align: center; color: var(--text-3); padding: 30px; border-top: 1px solid var(--border); }

/* Client portal ------------------------------------------------------------ */
.portal { max-width: 720px; margin: 0 auto; padding: 18px 16px 60px; }
.portal-hero { background: linear-gradient(135deg, #064e3b, #0c1424); color: #e6fff5; border-radius: 20px; padding: 24px; margin-bottom: 16px; }
.portal-hero h1 { color: #fff; font-size: 26px; }
.portal-hero .small { color: #a7f3d0; }
.portal-hero .row-wrap { margin-top: 16px; }
.portal-hero .pill { background: rgba(255, 255, 255, 0.1); padding: 8px 12px; border-radius: 12px; }
.portal-hero .pill strong { display: block; font-size: 18px; color: #fff; }
details.day-card summary { list-style: none; cursor: pointer; }
details.day-card summary::-webkit-details-marker { display: none; }

/* Onboarding */
.onboard { padding: 18px 20px; }
.onboard ol { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.onboard li a { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 12px; border: 1px dashed var(--border-strong); color: var(--text); height: 100%; text-decoration: none; }
.onboard li a:hover { border-color: var(--primary); }
.onboard li.done a { border-style: solid; background: var(--primary-soft); }
.onboard .tick { width: 22px; height: 22px; border-radius: 99px; border: 2px solid var(--border-strong); flex: none; display: grid; place-items: center; }
.onboard li.done .tick { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.onboard .tick svg.icon { width: 13px; height: 13px; stroke-width: 3; }

/* Responsive ---------------------------------------------------------------- */
@media (max-width: 1100px) {
  .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols-main { grid-template-columns: minmax(0, 1fr); }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .onboard ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .builder-row { grid-template-columns: 46px minmax(140px, 2fr) repeat(6, minmax(52px, 1fr)) 90px; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar { padding: 0 14px; height: 58px; }
  .topbar .mobile-brand { display: flex; color: var(--text); padding: 0; font-size: 16px; }
  .topbar .search { display: none; }
  .topbar .search.open { display: block; position: absolute; left: 10px; right: 10px; top: 10px; width: auto; }
  .view-host { padding: 18px 14px 96px; }
  .bottom-nav {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--surface); border-top: 1px solid var(--border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bottom-nav a, .bottom-nav button { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--text-3); padding: 4px 0; border: 0; background: none; text-decoration: none; font-weight: 550; }
  .bottom-nav .active { color: var(--primary-text); }
  .bottom-nav svg.icon { width: 22px; height: 22px; }
  .cols-2, .cols-3, .plans { grid-template-columns: minmax(0, 1fr); }
  .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-strip > div:nth-child(3) { border-left: 0; }
  .stat-strip > div:nth-child(n + 3) { border-top: 1px solid var(--border); }
  .auth { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .features { grid-template-columns: 1fr; }
  .form-grid.three, .form-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .builder-row { grid-template-columns: 40px 1fr 1fr 1fr; }
  .builder-row.head { display: none; }
  .builder-row .ex-pick { grid-column: 2 / -1; }
  .builder-row .row-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .builder-row .note-input { grid-column: 1 / -1; }
  .builder-row [data-col]::before { content: attr(data-col); display: block; font-size: 10.5px; color: var(--text-3); }
  .cal-scroll { max-height: calc(100vh - 230px); }
  .toasts { left: 14px; right: 14px; bottom: 84px; }
  .toast { min-width: 0; max-width: none; }
  .rest-timer { bottom: 84px; }
  .sticky-bar { bottom: 74px; }
  .modal-backdrop { padding: 0; align-items: flex-end; }
  .modal { border-radius: 18px 18px 0 0; max-height: 94vh; max-width: none !important; }
  .page-head h1 { font-size: 21px; }
  .kv { grid-template-columns: 110px 1fr; }
  .l-nav { padding: 14px 16px; }
}
@media (max-width: 560px) {
  .form-grid, .form-grid.three, .form-grid.four { grid-template-columns: minmax(0, 1fr); }
  .form-grid .span-2 { grid-column: auto; }
  .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi .value { font-size: 22px; }
  .set-row { grid-template-columns: 26px 1fr 1fr 0.7fr 46px 26px; gap: 6px; }
  .client-hero { gap: 12px; padding: 16px; }
  .client-hero .avatar.lg { width: 48px; height: 48px; font-size: 17px; }
  .client-hero .info { min-width: 0; flex-basis: calc(100% - 64px); }
  .client-hero .meta { gap: 2px 12px; }
  .client-hero > .row-wrap { width: 100%; }
  .logger-head { gap: 10px; flex-wrap: nowrap; }
  .logger-head .avatar { display: none; }
  .logger-head h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 17px !important; }
  .logger-head .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .logger-head .timer { font-size: 16px; padding: 6px 10px; }
  .month .cell { min-height: 74px; padding: 3px; }
  .mchip span { display: none; }
  .cal-toolbar .range { min-width: 0; font-size: 16px; width: 100%; order: -1; margin: 0; }
  .hide-sm { display: none !important; }
  .onboard ol { grid-template-columns: 1fr; }
}
@media print {
  .sidebar, .topbar, .bottom-nav, .page-head .actions, .tabs, .btn { display: none !important; }
  .app { display: block; }
  .card { box-shadow: none; break-inside: avoid; }
}
