/* otolabo — shared styles
   Rebuilt from the "otolabo hearing" Figma file, Page 6 (MacBook Pro 16" frames). */

@import url("https://fonts.googleapis.com/css2?family=Nunito+Sans:opsz,wght@6..12,400;6..12,600;6..12,700;6..12,800&display=swap");

:root {
  --ink: #1b2433;
  --ink-2: #3c4a57;
  --muted: #6f7f8b;
  --line: #e6edf0;
  --surface: #ffffff;
  --surface-2: #f4f8f9;

  --teal-900: #1f4f5a;
  --teal-800: #2a5f6b;
  --teal-700: #3a7883;
  --teal-600: #4a8a94;
  --teal-400: #7fb5bd;
  --teal-200: #bfdde1;
  --teal-100: #e3f0f2;
  --teal-50: #f0f7f8;

  --red: #b4443d;
  --red-bg: #fae3e0;
  --orange: #d4874a;
  --orange-bg: #fcecdc;
  --green: #4f9361;
  --green-bg: #e2f2e5;
  --green-line: #9fd0aa;

  --radius-lg: 18px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 10px rgba(31, 79, 90, 0.07);
  --shadow-lg: 0 20px 60px rgba(20, 40, 50, 0.22);

  --font: "Nunito Sans", "Avenir Next", Avenir, system-ui, -apple-system, "Segoe UI", sans-serif;
  --logo-font: Verdana, "DejaVu Sans", Geneva, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
html { min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.4;
  min-height: 100vh;
  background: #fff linear-gradient(115deg, #ffffff 35%, #e9f5f7 70%, #d6edf2 100%) no-repeat;
  background-size: 100% 100%;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
svg.i { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- layout ---------- */
.page { max-width: 1440px; margin: 0 auto; padding: 36px 56px 56px; }
.topbar { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.topbar .title { display: flex; align-items: center; gap: 16px; flex: 1; min-width: 0; }
.topbar h1 { font-size: 32px; font-weight: 700; letter-spacing: -0.01em; }
.back { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--ink); }
.back:hover { background: var(--teal-100); }
.back svg.i { width: 24px; height: 24px; }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--teal-700); position: relative; }
.icon-btn:hover { background: var(--teal-100); }
.icon-btn .dot { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); border: 2px solid #fff; }
.pill {
  display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
  font-weight: 600; font-size: 15px; color: var(--ink);
}
.pill svg.i { width: 18px; height: 18px; color: var(--ink-2); }
.user-pill { padding-right: 6px; }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--teal-700); color: #fff; }
.avatar svg.i { width: 18px; height: 18px; }

.grid-main { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; }
.grid-main.wide-side { grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr); gap: 36px; }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); border: 1px solid rgba(230, 237, 240, 0.7); }
.card.pad { padding: 22px 24px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 34px 0 16px; }
.section-head h2 { font-size: 22px; font-weight: 700; }
.link { color: var(--teal-700); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 4px; }
.link:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: 9px; border: 1px solid transparent;
  font-weight: 600; font-size: 14px; white-space: nowrap; transition: background .15s, border-color .15s;
}
.btn-primary { background: var(--teal-700); color: #fff; }
.btn-primary:hover { background: var(--teal-800); }
.btn-outline { background: #fff; color: var(--teal-700); border-color: var(--teal-600); }
.btn-outline:hover { background: var(--teal-50); }
.btn-soft { background: var(--teal-100); color: var(--teal-800); }
.btn-soft:hover { background: var(--teal-200); }
.btn-ghost-light { background: transparent; color: #cfe9d6; border-color: #8fc79f; }
.btn-danger-outline { background: #fff; color: var(--red); border-color: var(--red); }
.btn-sm { height: 32px; padding: 0 14px; font-size: 12.5px; border-radius: 7px; }
.btn-block { width: 100%; }
.chip-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--teal-600); color: var(--teal-700); background: #fff; font-weight: 600; font-size: 14px; }
.chip-btn:hover { background: var(--teal-50); }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 5px; font-size: 12.5px; font-weight: 700; color: #fff; }
.badge.red { background: var(--red); }
.badge.orange { background: var(--orange); }
.badge.green { background: var(--green); }
.badge.amber { background: #d29b56; }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.tag.red { background: var(--red-bg); color: var(--red); }
.tag.orange { background: var(--orange-bg); color: var(--orange); }
.tag.green { background: var(--green-bg); color: var(--green); }
.label-chip { display: inline-block; padding: 3px 9px; border-radius: 5px; background: var(--teal-100); color: var(--teal-800); font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }

/* ---------- summary strip ---------- */
.summary { display: grid; grid-template-columns: repeat(3, 1fr); padding: 18px 8px; }
.summary-item { display: flex; align-items: center; gap: 18px; padding: 4px 26px; }
.summary-item + .summary-item { border-left: 1px solid var(--line); }
.summary-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 12px; background: var(--teal-100); color: var(--teal-800); flex: none; }
.summary-icon svg.i { width: 28px; height: 28px; }
.summary-icon.solid { background: var(--teal-700); color: #fff; }
.summary-item strong { display: block; font-size: 16px; font-weight: 600; }
.summary-item .sub { font-size: 13px; color: var(--teal-700); margin-top: 4px; }
.summary-item .sub.muted { color: var(--muted); }
.hl { color: var(--teal-700); font-weight: 700; }
.progress { height: 8px; border-radius: 99px; background: var(--teal-100); overflow: hidden; margin-top: 10px; width: 100%; max-width: 230px; }
.progress > span { display: block; height: 100%; background: var(--teal-800); border-radius: inherit; }

/* ---------- staff cards ---------- */
.staff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.staff-grid.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px) {
  .staff-grid.two-col { grid-template-columns: 1fr; }
  .topbar .title { flex-wrap: wrap; }
  .wel-head { flex-wrap: wrap; }
  .wel-head .logo { flex-basis: 100%; }
  .settings-card { padding: 22px 18px; }
  .settings-card > header { flex-wrap: wrap; gap: 14px; }
  .acct-row { flex-wrap: wrap; }
}
.staff-card { padding: 20px 22px 18px; display: flex; flex-direction: column; }
.staff-card h3 { font-size: 22px; font-weight: 700; margin: 16px 0 6px; }
.staff-meta { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); }
.staff-meta b { font-weight: 700; color: var(--ink); }
.staff-meta .sep { width: 1px; height: 14px; background: var(--line); }
.disclosure { display: flex; align-items: center; gap: 10px; width: 100%; padding: 14px 0; margin-top: 18px; border: 0; border-top: 1px solid var(--line); background: none; font-size: 15px; color: var(--ink); text-align: left; }
.disclosure svg.i:first-child { color: var(--ink-2); width: 18px; height: 18px; }
.disclosure .chev { margin-left: auto; width: 18px; height: 18px; transition: transform .2s; }
.disclosure[aria-expanded="true"] .chev { transform: rotate(180deg); }
.disclosure-body { padding-bottom: 12px; }
.disclosure-body[hidden] { display: none; }
.staff-actions { display: flex; gap: 10px; margin-top: auto; padding-top: 8px; }
.staff-actions .btn { flex: 1; padding: 0 10px; }
.mini-event { display: flex; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); position: relative; }
.mini-event .ev-icon { width: 54px; height: 54px; }
.mini-event h4 { color: var(--teal-700); font-size: 13.5px; font-weight: 700; margin-bottom: 2px; }
.mini-event p { font-size: 12px; color: var(--muted); line-height: 1.5; }
.mini-event .edit { position: absolute; top: 10px; right: 10px; color: var(--teal-700); }
.mini-event .edit svg.i { width: 15px; height: 15px; }
.status-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 9px; background: var(--teal-50); font-size: 13px; }
.status-row .ok { width: 18px; height: 18px; border-radius: 50%; background: var(--teal-700); color: #fff; display: grid; place-items: center; flex: none; }
.status-row .ok svg.i { width: 12px; height: 12px; stroke-width: 3; }
.status-row .ring { margin-left: auto; color: var(--teal-600); }
.status-row b { display: block; font-weight: 700; font-size: 13px; }
.status-row span.small { color: var(--muted); }

/* event icon tile (dental drill) */
.ev-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 10px; background: var(--teal-100); color: var(--teal-900); flex: none; }
.ev-icon svg { width: 60%; height: 60%; }

/* ---------- insights (dashboard right column) ---------- */
.primary-rec { background: var(--teal-800); color: #fff; border-radius: var(--radius-lg); padding: 18px 22px 20px; box-shadow: var(--shadow); }
.primary-rec .label-chip { background: var(--teal-200); color: var(--teal-900); }
.primary-rec .rec-head { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.primary-rec .rec-head svg.i { width: 26px; height: 26px; color: var(--teal-200); }
.primary-rec h3 { font-size: 17px; font-weight: 700; }
.primary-rec p { margin: 10px 0 0 38px; font-size: 13.5px; color: #e3f0f2; max-width: 360px; }
.primary-rec ul { margin: 10px 0 0 38px; padding-left: 16px; font-size: 12px; color: #cfe3e6; }
.primary-rec .row-end { display: flex; justify-content: flex-end; margin-top: 4px; }
.insight-card { display: flex; gap: 20px; padding: 20px 22px; }
.insight-card .ic { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--teal-100); color: var(--teal-800); flex: none; }
.insight-card .ic svg.i { width: 26px; height: 26px; }
.insight-card .body { flex: 1; min-width: 0; }
.insight-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 0; border: 0; background: none; text-align: left; color: inherit; }
.insight-row + .insight-row { border-top: 1px solid var(--line); }
.insight-row .grow { flex: 1; min-width: 0; }
.insight-row strong { display: block; color: var(--teal-800); font-size: 15px; font-weight: 700; }
.insight-row strong .soft { color: var(--muted); font-weight: 400; font-size: 12.5px; }
.insight-row .sub { font-size: 12.5px; color: var(--muted); }
.insight-row > svg.i { color: var(--ink-2); width: 18px; height: 18px; }
.insight-row:hover strong { text-decoration: underline; }
.stack { display: flex; flex-direction: column; gap: 18px; }

/* progress card */
.progress-card { display: flex; gap: 22px; padding: 24px; background: var(--surface-2); border-radius: var(--radius-lg); align-items: center; }
.progress-card .lead { display: flex; gap: 16px; flex: 0 0 auto; max-width: 250px; }
.circle-icon { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: var(--teal-700); color: #fff; flex: none; }
.circle-icon svg.i { width: 24px; height: 24px; }
.progress-card h4 { color: var(--teal-700); font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.progress-card .lead p { font-size: 13px; color: var(--ink-2); }
.progress-card .proj { flex: 1; border-left: 1px solid var(--line); padding-left: 22px; }
.progress-card .proj > p { font-size: 13px; color: var(--ink-2); margin-bottom: 12px; }
.proj-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.proj-stats b { display: block; font-size: 22px; font-weight: 600; }
.proj-stats span { font-size: 12.5px; color: var(--ink-2); }

/* ---------- key insights (trends right column) ---------- */
.key-insights { padding: 22px; }
.key-insights h3 { font-size: 22px; font-weight: 700; }
.key-insights .caption { font-size: 11.5px; color: var(--muted); margin: 2px 0 16px; }
.ki-hero { display: flex; gap: 16px; align-items: center; background: var(--teal-800); color: #fff; border-radius: 6px; padding: 18px; margin-bottom: 14px; }
.ki-hero .star { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: var(--teal-600); flex: none; }
.ki-hero .star svg.i { fill: #fff; stroke: #fff; width: 24px; height: 24px; }
.ki-hero strong { display: block; font-size: 15.5px; font-weight: 700; color: var(--teal-100); line-height: 1.3; }
.ki-hero span { display: block; font-size: 12px; margin-top: 6px; color: #e3f0f2; }
.ki-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; width: 100%; text-align: left; color: inherit; font: inherit; }
.ki-row + .ki-row { margin-top: 8px; }
.ki-row strong { display: block; color: var(--teal-800); font-size: 14.5px; font-weight: 700; }
.ki-row .small { color: var(--muted); }
.ki-row .impact { text-align: right; color: var(--teal-700); font-weight: 600; font-size: 15px; line-height: 1.1; }
.ki-row .impact small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 400; }
.ki-row.active { background: var(--teal-200); border-color: var(--teal-400); }
.ki-trend { display: flex; gap: 14px; align-items: center; margin-top: 18px; padding: 14px 16px; border-radius: 8px; background: var(--green-bg); border: 1px solid var(--green-line); font-size: 13px; color: var(--green); }
.ki-trend .sq { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 7px; background: var(--green); color: #fff; flex: none; }
.ki-trend .sq svg.i { width: 20px; height: 20px; }

/* ---------- chart ---------- */
.chart-card { padding: 20px 22px 14px; }
.chart-card .chart-title { font-size: 15px; color: var(--muted); margin-bottom: 8px; }
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .axis text { font-size: 13px; fill: var(--ink-2); font-family: var(--font); }
.chart .grid line { stroke: #eef2f4; }
.chart .line { fill: none; stroke: var(--teal-700); stroke-width: 2.6; }
.chart .line.compare { stroke: var(--teal-400); stroke-dasharray: 9 7; stroke-width: 2.2; }
.chart .marker-line { stroke: var(--teal-400); stroke-dasharray: 5 5; stroke-width: 1.4; }
.chart .marker-dot { fill: var(--teal-700); stroke: #fff; stroke-width: 2.5; cursor: pointer; transition: r .15s; }
.chart .marker-hit { fill: transparent; cursor: pointer; }
.chart .marker-label { font-family: var(--font); font-size: 14px; }
.chart .marker-label .d { fill: var(--teal-800); font-weight: 600; }
.chart .marker-label .t { fill: var(--ink); font-weight: 600; }
.tooltip { position: absolute; pointer-events: none; background: var(--teal-50); border: 1.5px solid var(--teal-400); border-radius: 6px; padding: 10px 12px; font-size: 13px; min-width: 150px; box-shadow: var(--shadow); opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s; }
.tooltip.show { opacity: 1; transform: none; }
.tooltip b { color: var(--teal-900); font-weight: 600; }
.tooltip .sub { font-size: 11.5px; color: var(--muted); }
.tooltip hr { border: 0; border-top: 1.5px solid var(--teal-400); margin: 8px 0 6px; }
.tooltip .aff { font-size: 12px; color: var(--ink-2); }

.filter-row { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.seg { height: 36px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--muted); font-weight: 600; font-size: 14px; }
.seg.on { background: var(--teal-700); color: #fff; border-color: var(--teal-700); }
.legend { display: inline-flex; align-items: center; gap: 10px; color: var(--teal-700); font-size: 14px; margin-left: 24px; }
.legend i { display: inline-block; width: 22px; height: 0; border-top: 2.5px solid var(--teal-700); }
.legend i.dash { border-top: 2.5px dashed var(--teal-400); }

.key-actions { display: grid; grid-template-columns: auto repeat(4, minmax(0, 1fr)); gap: 18px; align-items: start; margin-top: 22px; }
.key-actions h3 { font-size: 22px; font-weight: 700; padding: 6px 12px 0 0; }
.ka { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; }
.ka b { display: block; color: var(--teal-700); font-size: 20px; font-weight: 600; }
.ka span { display: block; font-size: 12.5px; color: var(--ink-2); line-height: 1.45; margin-top: 4px; }

/* ---------- notable events ---------- */
.events-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.events-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.event-card { padding: 18px 20px; }
.event-card .when { color: var(--teal-800); font-weight: 600; font-size: 15px; margin-bottom: 12px; }
.event-bar { display: flex; align-items: center; justify-content: space-between; padding: 6px 12px; border-radius: 3px; background: var(--teal-600); color: #fff; font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.event-bar.alert { background: var(--red); }
.event-bar svg.i { width: 16px; height: 16px; }
.event-body { border: 1px solid var(--line); border-radius: 6px; }
.event-body .row { display: flex; gap: 18px; align-items: center; padding: 16px; }
.event-body dl { margin: 0; font-size: 12.5px; color: var(--teal-700); line-height: 1.7; }
.event-body dl .hot { color: var(--orange); }
.event-body dl .alarm { color: var(--red); }
.event-body .steps { border-top: 1px solid var(--line); padding: 10px 16px; font-size: 12.5px; color: var(--teal-700); }
.event-body .steps b { color: var(--teal-900); font-weight: 700; }
.event-card.big .event-body h4 { color: var(--teal-700); font-size: 15px; }

.donut-card { padding: 20px; }
.donut-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 12px; }
.donut { display: block; width: 100%; max-width: 190px; margin: 0 auto 20px; }
.legend-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; font-size: 13px; color: var(--ink-2); }
.legend-list li { display: flex; align-items: center; gap: 12px; }
.legend-list i { width: 14px; height: 14px; border-radius: 50%; flex: none; }

/* ---------- staff changes list ---------- */
.changes { overflow: hidden; }
.changes h3 { background: var(--teal-700); color: #fff; font-size: 14px; font-weight: 600; padding: 12px 18px; }
.changes ul { list-style: none; margin: 0; padding: 10px 18px 14px; display: grid; gap: 10px; font-size: 13.5px; color: var(--ink-2); }
.changes li { display: flex; align-items: center; gap: 10px; }
.changes li svg.i { width: 16px; height: 16px; }
.up { color: var(--red); }
.flat { color: var(--orange); }
.down { color: var(--green); }

/* ---------- forms ---------- */
.field { display: grid; gap: 7px; }
.field label { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.input { position: relative; }
.input input, .input select {
  width: 100%; height: 44px; border: 1px solid #d9e2e6; border-radius: 9px; padding: 0 44px 0 14px;
  font: inherit; font-size: 15px; color: var(--ink); background: #fff; outline: none; transition: border-color .15s, box-shadow .15s;
}
.input input:focus, .input select:focus { border-color: var(--teal-600); box-shadow: 0 0 0 3px rgba(74, 138, 148, .18); }
.input .eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; display: grid; place-items: center; border: 0; background: none; color: var(--ink-2); border-radius: 6px; }
.input .eye:hover { background: var(--teal-50); }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--teal-700); margin: 0; }
.rules { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; color: var(--muted); }
.rules span { display: inline-flex; align-items: center; gap: 6px; transition: color .15s; }
.rules span svg.i { width: 16px; height: 16px; stroke-width: 2.4; color: var(--muted); }
.rules span.ok { color: var(--ink-2); }
.rules span.ok svg.i { color: var(--teal-700); }

/* ---------- auth screens ---------- */
.auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 56px 20px 40px; }
.logo { font-family: var(--logo-font); font-weight: 700; color: var(--teal-800); font-size: 38px; letter-spacing: -0.01em; line-height: 1; }
.logo.sm { font-size: 26px; }
.auth .logo { margin-bottom: 40px; }
.auth-card { width: 100%; max-width: 480px; padding: 36px 38px 30px; border-radius: 14px; background: rgba(255,255,255,.92); box-shadow: 0 4px 24px rgba(31, 79, 90, .08); border: 1px solid var(--line); }
.auth-card h1 { font-size: 27px; text-align: center; font-weight: 700; }
.auth-card .lede { text-align: center; color: var(--muted); font-size: 14px; margin: 8px 0 30px; }
.auth-card form { display: grid; gap: 20px; }
.auth-card .foot { text-align: center; font-size: 14px; color: var(--ink-2); margin-top: 22px; }
.auth-card .foot a { color: var(--teal-700); font-weight: 700; margin-left: 4px; }
.row-between { display: flex; justify-content: space-between; align-items: center; }
.pairing { flex: 1; display: grid; place-items: center; text-align: center; }
.pairing h1 { font-size: 30px; font-weight: 700; }
.pairing p { color: var(--muted); margin-top: 8px; }
.pulse { width: 120px; height: 120px; margin: 0 auto 28px; border-radius: 50%; display: grid; place-items: center; background: var(--teal-100); color: var(--teal-800); position: relative; }
.pulse::before, .pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--teal-400); animation: ping 2.2s cubic-bezier(0, .4, .6, 1) infinite; }
.pulse::after { animation-delay: 1.1s; }
.pulse svg.i { width: 48px; height: 48px; }
.pulse.done { background: var(--teal-700); color: #fff; }
.pulse.done::before, .pulse.done::after { animation: none; opacity: 0; }
@keyframes ping { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(1.7); opacity: 0; } }

/* ---------- modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(40, 50, 55, .42); display: grid; place-items: center; padding: 24px; z-index: 50; animation: fade .15s ease-out; }
.modal-backdrop[hidden] { display: none; }
.modal { background: #fff; border-radius: 12px; box-shadow: var(--shadow-lg); width: 100%; max-width: 860px; max-height: calc(100vh - 48px); overflow: auto; position: relative; animation: rise .18s ease-out; }
.modal .x { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border: 0; background: none; border-radius: 6px; display: grid; place-items: center; color: var(--teal-700); }
.modal .x:hover { background: var(--teal-100); }
.modal-head { padding: 26px 30px 6px; }
.modal-head h2 { font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.modal-head h2 svg.i { width: 17px; height: 17px; color: var(--muted); }
.modal-head p { font-size: 13px; color: var(--muted); margin-top: 2px; }
.modal-body { padding: 16px 30px 28px; }
.modal-band { background: var(--teal-800); color: #fff; padding: 16px 30px; display: flex; align-items: center; gap: 14px; font-weight: 700; font-size: 15px; }
.modal-band .bar { width: 1.5px; height: 18px; background: #fff; opacity: .7; }
.modal-band .x { color: #fff; top: 10px; }
.modal-band .x:hover { background: rgba(255,255,255,.12); }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(10px); opacity: .6; } }

.rec { display: flex; gap: 22px; align-items: center; padding: 18px 22px; border: 1px solid var(--line); border-left: 3px solid var(--teal-700); border-radius: 10px; box-shadow: var(--shadow); }
.rec + .rec { margin-top: 14px; }
.rec .ic { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--teal-100); color: var(--teal-800); flex: none; }
.rec .ic svg.i { width: 28px; height: 28px; }
.rec h3 { font-size: 15.5px; font-weight: 700; }
.rec p { font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.rec .act { font-size: 13px; color: var(--teal-700); font-weight: 600; margin-top: 8px; }

.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-weight: 700; color: var(--ink); padding: 10px 12px; font-size: 13px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px; vertical-align: middle; }
.table tbody tr + tr td { border-top: 1px solid var(--line); }
.drill-table td { color: var(--ink-2); padding: 14px 10px; white-space: nowrap; }
.drill-table td:first-child { padding-left: 0; }

.callout { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 8px; background: var(--teal-50); border: 1px solid var(--teal-100); font-size: 13.5px; color: var(--ink-2); }
.callout svg.i { color: var(--teal-700); }
.insight-note { background: var(--teal-50); border: 1px solid var(--teal-100); border-radius: 6px; padding: 14px 18px; }
.insight-note b { color: var(--teal-800); font-size: 13.5px; }
.insight-note p { font-size: 13px; color: var(--muted); margin-top: 4px; }
.option { padding: 14px 18px; }
.option + .option { border-top: 1px solid var(--line); }
.option b { font-size: 14px; }
.option p { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 12px; padding-top: 22px; }

/* ---------- settings ---------- */
.settings-card { padding: 30px 32px 34px; margin-bottom: 32px; }
.settings-card > header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; }
.settings-card h2 { font-size: 24px; font-weight: 700; }
.settings-card header p { font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.profile-grid { display: grid; grid-template-columns: 200px minmax(0, 1fr) 460px; gap: 36px; }
.photo { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.photo .big-avatar { width: 128px; height: 128px; border-radius: 50%; background: var(--teal-700); color: #fff; display: grid; place-items: center; overflow: hidden; }
.photo .big-avatar svg.i { width: 64px; height: 64px; stroke-width: 1.6; }
.photo .big-avatar img { width: 100%; height: 100%; object-fit: cover; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 22px; }
.form-grid .span-2 { grid-column: span 2; }
.form-grid .input input, .form-grid .input select { height: 38px; font-size: 14px; padding-right: 14px; }
.h-label { font-size: 14px; font-weight: 700; margin-bottom: 14px; }
.acct-row { display: flex; align-items: center; gap: 18px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; }
.acct-row + .acct-row { margin-top: 14px; }
.acct-row .sq { width: 46px; height: 46px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.acct-row .sq.g { background: var(--green-bg); color: var(--green); }
.acct-row .sq.o { background: var(--orange-bg); color: var(--orange); }
.acct-row .sq.r { background: var(--red-bg); color: var(--red); }
.acct-row strong { display: block; font-size: 15px; }
.acct-row .small { color: var(--muted); }
.acct-row .grow { flex: 1; }
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.feature { display: flex; gap: 18px; padding: 24px; background: var(--surface-2); border-radius: 12px; border: 1px solid var(--line); }
.feature .ic { width: 48px; height: 48px; border-radius: 50%; background: var(--teal-100); color: var(--teal-800); display: grid; place-items: center; flex: none; }
.feature h3 { color: var(--teal-800); font-size: 16px; font-weight: 700; }
.feature p { font-size: 13px; color: var(--ink-2); margin: 4px 0 14px; }
.toast { position: fixed; bottom: 28px; left: 50%; transform: translate(-50%, 20px); background: var(--teal-900); color: #fff; padding: 12px 20px; border-radius: 10px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow-lg); opacity: 0; transition: .2s; z-index: 80; display: flex; gap: 10px; align-items: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- welcome / empty state ---------- */
.wel-head { display: flex; align-items: center; gap: 18px; margin-bottom: 24px; }
.wel-head .logo { flex: 1; }
.connected { display: flex; align-items: center; gap: 14px; padding: 14px 22px 14px 16px; border-radius: 12px; background: var(--teal-50); border: 1px solid var(--teal-100); }
.connected .ok { width: 36px; height: 36px; border-radius: 50%; background: #6bb37f; color: #fff; display: grid; place-items: center; }
.connected .ok svg.i { stroke-width: 3; }
.connected b { font-size: 14px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); padding: 18px 8px; margin: 22px 0; }
.kpi { display: flex; gap: 16px; align-items: center; padding: 4px 22px; }
.kpi + .kpi { border-left: 1px solid var(--line); }
.kpi .ic { width: 50px; height: 50px; border-radius: 50%; background: var(--teal-50); color: var(--teal-700); display: grid; place-items: center; flex: none; }
.kpi .lbl { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.kpi .lbl svg.i { width: 14px; height: 14px; color: var(--muted); }
.kpi .val { font-size: 22px; font-weight: 700; line-height: 1.1; margin: 2px 0; }
.empty { text-align: center; padding: 34px 20px 28px; }
.empty .art { width: 200px; margin: 0 auto 18px; }
.empty h3 { font-size: 20px; font-weight: 700; }
.empty p { color: var(--muted); max-width: 340px; margin: 8px auto 20px; font-size: 14px; }
.tabs { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.tabs button { border: 0; background: #fff; padding: 7px 16px; font-weight: 600; font-size: 13px; color: var(--muted); }
.tabs button + button { border-left: 1px solid var(--line); }
.tabs button.on { background: var(--teal-50); color: var(--teal-800); box-shadow: inset 0 0 0 1.5px var(--teal-400); }
.steps-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.steps-list li { display: flex; gap: 14px; align-items: flex-start; }
.steps-list .ic { width: 40px; height: 40px; border-radius: 10px; background: var(--teal-50); color: var(--teal-700); display: grid; place-items: center; flex: none; }
.steps-list .ic.solid { background: var(--teal-700); color: #fff; }
.steps-list b { display: block; font-size: 14px; }
.steps-list p { font-size: 12.5px; color: var(--muted); }
.steps-list .done { margin-left: auto; width: 24px; height: 24px; border-radius: 50%; background: var(--teal-100); color: var(--teal-700); display: grid; place-items: center; flex: none; }
.steps-list .done svg.i { width: 14px; height: 14px; stroke-width: 3; }

/* ---------- hub (index) ---------- */
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.hub-card { padding: 20px 22px; transition: transform .15s, box-shadow .15s; display: block; }
.hub-card:hover { transform: translateY(-2px); box-shadow: 0 8px 26px rgba(31,79,90,.12); }
.hub-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.hub-card p { font-size: 13px; color: var(--muted); }
.hub-card .frames { margin-top: 12px; font-size: 11.5px; color: var(--teal-700); font-weight: 700; letter-spacing: .03em; }

/* ---------- responsive ---------- */
@media (max-width: 1200px) {
  .grid-main, .grid-main.wide-side { grid-template-columns: 1fr; }
  .profile-grid { grid-template-columns: 180px 1fr; }
  .profile-grid > :last-child { grid-column: span 2; }
  .key-actions { grid-template-columns: repeat(2, 1fr); }
  .key-actions h3 { grid-column: span 2; }
}
@media (max-width: 860px) {
  .page { padding: 22px 16px 40px; }
  .topbar { flex-wrap: wrap; }
  .topbar h1 { font-size: 24px; }
  .topbar-actions { width: 100%; justify-content: flex-end; }
  .summary, .kpis { grid-template-columns: 1fr; }
  .summary-item + .summary-item, .kpi + .kpi { border-left: 0; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 10px; }
  .events-grid, .events-grid.two, .feature-grid, .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .profile-grid { grid-template-columns: 1fr; }
  .profile-grid > :last-child { grid-column: auto; }
  .progress-card { flex-direction: column; align-items: stretch; }
  .progress-card .proj { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 16px; }
  .rules { flex-direction: column; }
  .auth-card { padding: 28px 22px; }
  .modal-head, .modal-body { padding-left: 18px; padding-right: 18px; }
}
