/* KODISETO Telegram Mini App · Apple Home / Nest Obsidian & Daylight Design System */
:root {
  --bg: #0b1120;
  --surface: rgba(22, 32, 51, 0.86);
  --surface-solid: #151e31;
  --surface-2: rgba(30, 41, 59, 0.72);
  --border: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --text-sec: #94a3b8;
  --text-muted: #64748b;
  --sky: #38bdf8;
  --sky-deep: #0284c7;
  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.16);
  --emerald: #10b981;
  --emerald-soft: rgba(16, 185, 129, 0.16);
  --rose: #f43f5e;
  --rose-soft: rgba(244, 63, 94, 0.16);
  --shadow: 0 18px 40px -14px rgba(2, 6, 23, 0.65);
  --nav-bg: rgba(15, 23, 42, 0.88);
  --radius: 20px;
}

html.theme-light {
  --bg: #f1f5f9;
  --surface: rgba(255, 255, 255, 0.94);
  --surface-solid: #ffffff;
  --surface-2: rgba(241, 245, 249, 0.9);
  --border: rgba(15, 23, 42, 0.09);
  --text: #0f172a;
  --text-sec: #475569;
  --text-muted: #64748b;
  --amber-soft: rgba(245, 158, 11, 0.14);
  --emerald-soft: rgba(16, 185, 129, 0.14);
  --rose-soft: rgba(244, 63, 94, 0.14);
  --shadow: 0 12px 30px -10px rgba(15, 23, 42, 0.1);
  --nav-bg: rgba(255, 255, 255, 0.92);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
  line-height: 1.4;
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
}

.mono {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  font-variant-numeric: tabular-nums;
}

.hidden { display: none !important; }

.app-shell {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: calc(88px + env(safe-area-inset-bottom, 12px));
}

/* Top Bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  background: var(--nav-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

.site-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 6px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
}
.site-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.7);
}
.site-dot.err { background: var(--rose); box-shadow: 0 0 8px rgba(244, 63, 94, 0.7); }
.site-name { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chev { width: 15px; height: 15px; opacity: 0.7; }

.topbar-right { display: flex; align-items: center; gap: 8px; }
.sync-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 11.5px; font-weight: 600; color: var(--text-sec);
}
.sync-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--emerald); }
.sync-pill.err .sync-dot { background: var(--rose); }

.icon-btn {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text);
  cursor: pointer;
}
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn.spin svg { animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Gate */
.gate-screen { padding: 48px 18px; }
.gate-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  box-shadow: var(--shadow);
}
.gate-icon { font-size: 40px; margin-bottom: 12px; }
.gate-card h2 { font-size: 18px; margin-bottom: 8px; }
.gate-card p { font-size: 14px; color: var(--text-sec); }

.main-content { padding: 12px 14px; }
.tab-view { display: none; }
.tab-view.active { display: block; animation: fadeIn 0.16s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 15px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  margin-bottom: 12px;
}

/* Alert Banner */
.alert-banner {
  background: var(--rose-soft);
  border: 1px solid rgba(244, 63, 94, 0.45);
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.alert-banner.warn {
  background: var(--amber-soft);
  border-color: rgba(245, 158, 11, 0.45);
}
.alert-banner-txt { font-size: 13px; font-weight: 600; color: var(--text); }
.alert-banner-sub { font-size: 11.5px; color: var(--text-sec); margin-top: 2px; }

/* Hero Card */
.hero-card { position: relative; overflow: hidden; }
.hero-glow {
  position: absolute; inset: -40% -20% auto -20%; height: 220px;
  background: radial-gradient(circle at 50% 40%, rgba(14, 165, 233, 0.16), transparent 68%);
  pointer-events: none; transition: background 0.4s ease;
}
.hero-card.heating .hero-glow {
  background: radial-gradient(circle at 50% 35%, rgba(245, 158, 11, 0.25), rgba(234, 88, 12, 0.08) 48%, transparent 72%);
}
.hero-card.error .hero-glow {
  background: radial-gradient(circle at 50% 35%, rgba(244, 63, 94, 0.22), transparent 68%);
}

.hero-top {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 12px;
  align-items: center;
}

.hero-arc-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 146px;
}
.hero-arc-svg { width: 100%; max-width: 190px; height: auto; display: block; }
.hero-center-readout {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 10px;
  pointer-events: none;
}
.hero-sensor-lbl {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-sec);
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hero-temp {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
  margin: 2px 0;
}
.hero-corridor {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--sky);
}
.hero-card.heating .hero-corridor { color: var(--amber); }

/* Boiler Status & Forecast Mini-Section */
.boiler-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.boiler-box.on {
  background: var(--amber-soft);
  border-color: rgba(245, 158, 11, 0.42);
}
.boiler-box.offline {
  background: var(--rose-soft);
  border-color: rgba(244, 63, 94, 0.45);
}
.boiler-box-head { display: flex; align-items: center; gap: 7px; }
.boiler-state-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}
.boiler-box.on .boiler-state-dot {
  background: var(--amber);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.9);
  animation: pulse 1.8s infinite;
}
.boiler-box.offline .boiler-state-dot { background: var(--rose); }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.28); opacity: 0.7; } }

.boiler-state-title { font-size: 12px; font-weight: 800; letter-spacing: 0.04em; }
.boiler-fact { font-size: 16px; font-weight: 700; color: var(--text); }
.boiler-eta { font-size: 12px; font-weight: 600; color: var(--text-sec); line-height: 1.3; }
.boiler-meta-row { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
.micro-tag {
  font-size: 10.5px; font-weight: 600;
  padding: 3px 7px; border-radius: 7px;
  background: rgba(148, 163, 184, 0.14);
  color: var(--text-sec);
}

.hero-reason {
  margin-top: 10px;
  padding: 8px 11px;
  border-radius: 12px;
  background: var(--surface-2);
  font-size: 12px;
  color: var(--text-sec);
  line-height: 1.35;
}

/* Segmented Controls */
.control-block { margin-top: 12px; }
.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 3px;
  gap: 3px;
}
.segmented.small { grid-template-columns: repeat(4, 1fr); border-radius: 11px; padding: 2px; }
.seg-btn {
  min-height: 40px;
  border: none;
  border-radius: 11px;
  background: transparent;
  color: var(--text-sec);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
}
.segmented.small .seg-btn { min-height: 32px; font-size: 12px; border-radius: 9px; padding: 0 8px; }
.seg-btn.active {
  background: var(--sky-deep);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}
.seg-btn.active[data-mode="on"] {
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.38);
}
.seg-btn.active[data-mode="off"] {
  background: #475569;
  box-shadow: none;
}

.timer-chips {
  display: flex; align-items: center; gap: 6px; margin-top: 8px; flex-wrap: wrap;
}
.timer-lbl { font-size: 11.5px; color: var(--text-sec); margin-right: 2px; }
.chip-btn {
  min-height: 32px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.chip-btn.active { border-color: var(--sky); background: rgba(56, 189, 248, 0.18); color: var(--sky); }

/* Steppers & Quick Actions */
.quick-actions-row {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 9px;
  margin-top: 12px;
}
.stepper-card, .arrive-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 9px 11px;
}
.stepper-card { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.stepper-title { display: block; font-size: 12px; font-weight: 700; color: var(--text); }
.stepper-sub { display: block; font-size: 10.5px; color: var(--text-sec); }
.stepper-ctrls { display: flex; align-items: center; gap: 6px; }
.step-btn {
  width: 34px; height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}
.step-val { min-width: 34px; text-align: center; font-size: 15px; font-weight: 800; }

.arrive-card {
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.arrive-card.active { border-color: rgba(56, 189, 248, 0.55); background: rgba(56, 189, 248, 0.12); }
.arrive-lbl { font-size: 11px; font-weight: 700; color: var(--text-sec); }
.arrive-val { font-size: 12.5px; font-weight: 700; color: var(--text); margin-top: 2px; }

/* Section Head */
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 14px 2px 8px;
}
.section-head h3 { font-size: 14px; font-weight: 700; color: var(--text-sec); text-transform: uppercase; letter-spacing: 0.05em; }
.section-sub { font-size: 11.5px; color: var(--text-muted); }
.link-btn {
  background: none; border: none; color: var(--sky);
  font-size: 13px; font-weight: 700; cursor: pointer; padding: 4px 6px;
}

/* Sensor Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.sensor-tile {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 12px 13px;
  text-align: left;
  cursor: pointer;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: transform 0.12s ease, border-color 0.16s ease;
}
.sensor-tile:active { transform: scale(0.98); }
.sensor-tile.service {
  border-style: dashed;
  border-color: rgba(245, 158, 11, 0.65);
  background: var(--amber-soft);
}
.sensor-tile.alert {
  border-color: rgba(244, 63, 94, 0.65);
  background: var(--rose-soft);
}
.tile-accent { height: 4px; width: 32px; border-radius: 4px; margin-bottom: 8px; }
.tile-top { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.tile-label { font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-role { font-size: 10.5px; font-weight: 600; color: var(--text-sec); flex-shrink: 0; }
.tile-temp { font-size: 28px; font-weight: 800; margin: 5px 0 3px; letter-spacing: -0.03em; }
.tile-temp.offline { font-size: 16px; color: var(--rose); padding: 7px 0; }
.tile-bottom { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--text-sec); gap: 6px; }
.tile-badge {
  font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 6px;
  background: rgba(148, 163, 184, 0.15); color: var(--text);
}
.tile-badge.svc { background: rgba(245, 158, 11, 0.25); color: #fbbf24; }
.tile-badge.ctrl { background: rgba(56, 189, 248, 0.18); color: var(--sky); }
.tile-badge.warn { background: rgba(244, 63, 94, 0.25); color: #fda4af; }

/* Context Grid */
.context-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mini-stat-card { padding: 12px 14px; margin-bottom: 0; cursor: pointer; }
.mini-stat-lbl { font-size: 11.5px; color: var(--text-sec); font-weight: 600; }
.mini-stat-val { font-size: 21px; font-weight: 800; margin: 4px 0 2px; }
.mini-stat-sub { font-size: 11px; color: var(--text-muted); }

/* Chart Tab */
.chart-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.card-title { font-size: 16px; font-weight: 700; }
.card-sub { font-size: 12px; color: var(--text-sec); margin-top: 2px; }
.chart-hud {
  min-height: 36px;
  padding: 7px 10px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 11.5px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.hud-hint { color: var(--text-muted); }
.hud-item { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.hud-dot { width: 7px; height: 7px; border-radius: 50%; }

.canvas-wrap {
  position: relative;
  width: 100%;
  height: 260px;
  touch-action: pan-y;
}
#telemetry-canvas { width: 100%; height: 100%; display: block; border-radius: 12px; }
.chips-wrap { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.series-chip {
  display: inline-flex; align-items: center; gap: 5px;
  min-height: 30px; padding: 4px 9px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text); font-size: 11.5px; font-weight: 600; cursor: pointer;
}
.series-chip.muted { opacity: 0.42; }

/* Weather Card */
.weather-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 10px; }
.badge { font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.badge.neutral { background: var(--emerald-soft); color: var(--emerald); }
.badge.warn { background: var(--amber-soft); color: var(--amber); }
.wx-metrics-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.wx-metric { background: var(--surface-2); border-radius: 12px; padding: 8px 10px; }
.wx-metric span { display: block; font-size: 10.5px; color: var(--text-sec); }
.wx-metric strong { font-size: 14px; font-weight: 700; }
.wx-hourly-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.wx-hour-item {
  flex: 0 0 64px; text-align: center;
  background: var(--surface-2); border-radius: 12px; padding: 8px 6px;
}
.wx-hour-item .wh { font-size: 11px; color: var(--text-sec); }
.wx-hour-item .wt { font-size: 14px; font-weight: 700; margin: 3px 0; }
.wx-hour-item .ww { font-size: 10.5px; color: var(--text-muted); }

/* Lists & Forms */
.stack-list { display: flex; flex-direction: column; gap: 9px; margin-bottom: 12px; }
.list-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.list-row.service { border-style: dashed; border-color: rgba(245, 158, 11, 0.65); }
.list-main { min-width: 0; flex: 1; }
.list-title { font-size: 14.5px; font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.list-sub { font-size: 11.5px; color: var(--text-sec); margin-top: 2px; }
.list-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

.svc-actions-row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.btn-soft, .btn-ghost, .btn-primary, .btn-danger {
  min-height: 40px; padding: 8px 14px; border-radius: 12px;
  font-size: 13px; font-weight: 700; cursor: pointer; border: none;
}
.btn-primary { background: var(--sky-deep); color: #fff; }
.btn-soft { background: rgba(56, 189, 248, 0.16); color: var(--sky); }
.btn-ghost { background: var(--surface-2); border: 1px solid var(--border); color: var(--text); }
.btn-danger { background: var(--rose-soft); color: var(--rose); border: 1px solid rgba(244, 63, 94, 0.35); }
.btn-sm { min-height: 34px; padding: 6px 10px; font-size: 12px; border-radius: 10px; }

.form-card { padding: 15px; }
.form-row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.row-label { font-size: 14px; font-weight: 700; }
.divider { height: 1px; background: var(--border); margin: 12px 0; }
.stepper-inline { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 4px; }
.slider-block { margin-top: 12px; }
.slider-head { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
input[type="range"] { width: 100%; accent-color: var(--sky); }
.preset-row { display: flex; gap: 6px; margin-top: 8px; }

/* iOS Switch */
.ios-switch { position: relative; display: inline-block; width: 48px; height: 28px; flex-shrink: 0; }
.ios-switch input { opacity: 0; width: 0; height: 0; }
.ios-switch .slider {
  position: absolute; cursor: pointer; inset: 0;
  background: rgba(148, 163, 184, 0.3);
  border-radius: 999px; transition: 0.2s;
}
.ios-switch .slider::before {
  content: ""; position: absolute; height: 22px; width: 22px; left: 3px; bottom: 3px;
  background: #fff; border-radius: 50%; transition: 0.2s;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
}
.ios-switch input:checked + .slider { background: var(--emerald); }
.ios-switch input:checked + .slider::before { transform: translateX(20px); }

/* Physics Grid */
.physics-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 10px; }
.phy-cell { background: var(--surface-2); border-radius: 12px; padding: 9px 10px; }
.phy-cell span { display: block; font-size: 11px; color: var(--text-sec); }
.phy-cell strong { font-size: 14px; font-weight: 700; }

/* Bottom Floating Navigation */
.bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: max(10px, env(safe-area-inset-bottom, 10px));
  z-index: 40;
  width: min(520px, calc(100% - 24px));
  background: var(--nav-bg);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 5px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
}
.nav-btn {
  border: none;
  background: transparent;
  color: var(--text-sec);
  padding: 7px 4px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.nav-btn svg { width: 20px; height: 20px; }
.nav-btn.active { color: var(--sky); background: rgba(56, 189, 248, 0.14); }

/* Bottom Sheet Modal */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(2, 6, 23, 0.6);
  backdrop-filter: blur(4px);
}
.sheet-modal {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: 0; z-index: 51;
  width: min(560px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  background: var(--surface-solid);
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  border: 1px solid var(--border);
  padding: 10px 16px calc(22px + env(safe-area-inset-bottom, 12px));
  box-shadow: 0 -16px 40px rgba(0, 0, 0, 0.45);
}
.sheet-grab { width: 42px; height: 4px; border-radius: 4px; background: var(--text-muted); opacity: 0.5; margin: 0 auto 12px; }
.sheet-title { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.sheet-sub { font-size: 12px; color: var(--text-sec); margin-bottom: 14px; }
.field-group { margin-bottom: 12px; }
.field-group label { display: block; font-size: 12px; font-weight: 700; color: var(--text-sec); margin-bottom: 5px; }
.field-input, .field-select {
  width: 100%; min-height: 42px;
  padding: 9px 12px; border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text); font-size: 14px;
}
.role-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
.role-opt {
  min-height: 44px; padding: 8px 10px; text-align: left;
  border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); cursor: pointer;
}
.role-opt.active { border-color: var(--sky); background: rgba(56, 189, 248, 0.16); }
.role-opt strong { display: block; font-size: 12.5px; }
.role-opt span { display: block; font-size: 10.5px; color: var(--text-sec); }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  top: 62px; z-index: 70;
  padding: 9px 16px; border-radius: 999px;
  background: rgba(15, 23, 42, 0.94); color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 13px; font-weight: 600;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
}
