/* Cloud9 Hub — design system */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
  --bg: #f4f6f5;
  --surface: #ffffff;
  --surface2: #eef1f0;
  --text: #16211d;
  --text2: #5b6b65;
  --text3: #93a29c;
  --line: rgba(22, 33, 29, .08);
  --accent: #0da678;
  --accent-soft: rgba(13, 166, 120, .12);
  --accent-text: #067a57;
  --violet: #8b5cf6;
  --violet-soft: rgba(139, 92, 246, .12);
  --danger: #e5484d;
  --danger-soft: rgba(229, 72, 77, .1);
  --amber: #d97706;
  --amber-soft: rgba(217, 119, 6, .12);
  --shadow: 0 1px 2px rgba(16, 24, 20, .05), 0 8px 24px rgba(16, 24, 20, .06);
  --shadow-lg: 0 24px 64px rgba(16, 24, 20, .22);
  --radius: 18px;
  --nav-h: calc(78px + env(safe-area-inset-bottom, 0px));
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1210;
    --surface: #151d1a;
    --surface2: #1c2622;
    --text: #e8efec;
    --text2: #9db0a9;
    --text3: #64756f;
    --line: rgba(232, 239, 236, .08);
    --accent: #2dd4a0;
    --accent-soft: rgba(45, 212, 160, .13);
    --accent-text: #5ce8bb;
    --violet: #a78bfa;
    --violet-soft: rgba(167, 139, 250, .14);
    --danger: #ff6369;
    --danger-soft: rgba(255, 99, 105, .12);
    --amber: #fbbf24;
    --amber-soft: rgba(251, 191, 36, .13);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    --shadow-lg: 0 24px 64px rgba(0, 0, 0, .55);
  }
}

html { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--text);
  min-height: 100%;
  font-size: 16px; line-height: 1.45;
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
}

/* ── Icons ── */
.ic { width: 20px; height: 20px; flex-shrink: 0; }
.ic-sm { width: 16px; height: 16px; }
.ic-lg { width: 24px; height: 24px; }

/* ── Boot splash ── */
.boot { display: grid; place-items: center; height: 100vh; }
.boot-logo {
  width: 88px; height: 88px; border-radius: 24px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff; font-weight: 800; font-size: 34px; letter-spacing: -1px;
  box-shadow: var(--shadow-lg);
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse { 50% { transform: scale(1.06); opacity: .85; } }

/* ── Auth ── */
.auth-wrap {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px; gap: 28px;
}
.auth-hero { text-align: center; }
.auth-logo {
  width: 76px; height: 76px; border-radius: 22px; margin: 0 auto 16px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #10b981, #047857);
  color: #fff; font-weight: 800; font-size: 30px; letter-spacing: -1px;
  box-shadow: 0 12px 32px rgba(16, 185, 129, .35);
}
.auth-hero h1 { font-size: 26px; letter-spacing: -.5px; }
.auth-hero p { color: var(--text2); margin-top: 6px; font-size: 15px; }
.auth-card {
  width: 100%; max-width: 380px;
  background: var(--surface); border-radius: 24px; box-shadow: var(--shadow);
  padding: 24px; display: flex; flex-direction: column; gap: 12px;
  border: 1px solid var(--line);
}
.auth-switch { text-align: center; color: var(--text2); font-size: 14px; }
.auth-switch a { color: var(--accent-text); font-weight: 600; text-decoration: none; cursor: pointer; }

/* ── Inputs / buttons ── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--text2); }
input, textarea, select {
  font: inherit; color: var(--text);
  background: var(--surface2); border: 1.5px solid transparent; border-radius: 13px;
  padding: 12px 14px; width: 100%; outline: none;
  transition: border-color .15s, background .15s;
  appearance: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); background: var(--surface); }
textarea { resize: vertical; min-height: 72px; }
input[type="date"], input[type="time"] { min-height: 46px; }
select { background-image: linear-gradient(45deg, transparent 50%, var(--text3) 50%), linear-gradient(135deg, var(--text3) 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%;
  background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }

.btn {
  font: inherit; font-weight: 700; font-size: 15px;
  border: none; border-radius: 14px; padding: 13px 18px;
  cursor: pointer; transition: transform .1s, opacity .15s, background .15s;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  user-select: none; -webkit-user-select: none;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: linear-gradient(135deg, #10b981, #059669); color: #fff; box-shadow: 0 6px 18px rgba(16, 185, 129, .3); }
.btn-ghost { background: var(--surface2); color: var(--text); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-sm { padding: 8px 14px; font-size: 13.5px; border-radius: 11px; }
.btn[disabled] { opacity: .55; pointer-events: none; }

.err-msg {
  background: var(--danger-soft); color: var(--danger);
  font-size: 13.5px; font-weight: 600; border-radius: 12px; padding: 10px 14px;
}

/* ── App shell ── */
.shell { min-height: 100vh; min-height: 100dvh; padding-bottom: var(--nav-h); }
.page { max-width: 680px; margin: 0 auto; padding: 0 16px 32px; animation: fadein .18s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } }

.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 10px;
  border-bottom: 1px solid var(--line);
  margin: 0 -16px 16px;
}
.topbar-inner { max-width: 648px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.topbar h1 { font-size: 21px; letter-spacing: -.4px; flex: 1; }
.topbar .sub { font-size: 13px; color: var(--text2); font-weight: 500; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 14px;
  cursor: pointer; flex-shrink: 0;
}

/* ── Bottom tab bar (iOS style) ── */
.nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  backdrop-filter: blur(24px) saturate(1.6); -webkit-backdrop-filter: blur(24px) saturate(1.6);
  border-top: 0.5px solid var(--line);
  display: flex; justify-content: space-around; align-items: flex-start;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
}
.nav-item {
  flex: 1; max-width: 110px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 4px; border: none; background: none; cursor: pointer;
  color: var(--text3); font: inherit; font-size: 10px; font-weight: 600; letter-spacing: .01em;
  transition: color .15s;
}
.nav-item .ic { width: 25px; height: 25px; transition: transform .18s cubic-bezier(.34, 1.56, .64, 1); }
.nav-item.active { color: var(--accent-text); }
.nav-item.active .ic { transform: scale(1.08); }
.nav-item:active .ic { transform: scale(.88); }

/* ── Cards / lists ── */
.card {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow); border: 1px solid var(--line);
  padding: 16px; margin-bottom: 14px;
}
.section-title {
  font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text3); margin: 20px 4px 10px; display: flex; align-items: center; gap: 8px;
}
.section-title .count {
  background: var(--surface2); color: var(--text2); border-radius: 99px;
  font-size: 11.5px; padding: 1px 8px;
}
.empty {
  text-align: center; color: var(--text3); padding: 28px 16px; font-size: 14.5px;
}
.empty .ic { width: 36px; height: 36px; margin-bottom: 10px; opacity: .6; }

/* ── Task rows ── */
.task {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 13px 14px; margin-bottom: 8px; box-shadow: var(--shadow);
  cursor: pointer; transition: transform .1s;
}
.task:active { transform: scale(.99); }
.task.done { opacity: .55; }
.task.done .task-title { text-decoration: line-through; }
.checkbox {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; margin-top: 1px;
  border: 2px solid var(--text3); display: grid; place-items: center;
  background: none; cursor: pointer; transition: all .15s; color: transparent; padding: 0;
}
.checkbox .ic { width: 14px; height: 14px; }
.checkbox.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.task-body { flex: 1; min-width: 0; }
.task-title { font-weight: 600; font-size: 15px; word-wrap: break-word; }
.task-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; align-items: center; }
.chip {
  font-size: 11.5px; font-weight: 700; border-radius: 8px; padding: 2.5px 8px;
  display: inline-flex; align-items: center; gap: 4px;
}
.chip .ic { width: 12px; height: 12px; }
.chip-date { background: var(--surface2); color: var(--text2); }
.chip-date.today { background: var(--accent-soft); color: var(--accent-text); }
.chip-date.overdue { background: var(--danger-soft); color: var(--danger); }
.chip-sub { background: var(--violet-soft); color: var(--violet); }
.chip-prio { background: var(--amber-soft); color: var(--amber); }
.chip-att { background: var(--surface2); color: var(--text2); }
.chip-user { color: #fff; }

/* ── Calendar ── */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-head h2 { font-size: 18px; letter-spacing: -.3px; text-transform: capitalize; }
.cal-btns { display: flex; gap: 6px; }
.cal-nav-btn {
  height: 38px; min-width: 38px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); cursor: pointer;
  display: grid; place-items: center; transition: background .15s;
  font: inherit; font-size: 12px; font-weight: 700; padding: 0 10px;
}
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-dow { text-align: center; font-size: 11px; font-weight: 700; color: var(--text3); padding: 5px 0; text-transform: uppercase; }
.cal-day {
  aspect-ratio: 1 / 1.05; border-radius: 12px; border: none; background: none;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  padding-top: 6px; gap: 3px; cursor: pointer; font: inherit; color: var(--text);
  position: relative; transition: background .12s;
}
.cal-day:active { background: var(--surface2); }
.cal-day.dim { color: var(--text3); opacity: .45; }
.cal-day .n {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font-size: 14.5px; font-weight: 600;
}
.cal-day.today .n { background: var(--accent-soft); color: var(--accent-text); font-weight: 800; }
.cal-day.sel .n { background: var(--accent); color: #fff; font-weight: 800; }
.cal-dots { display: flex; gap: 2.5px; height: 5px; }
.dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.dot.t { background: var(--amber); }
.dot.more { background: var(--text3); }

.agenda { margin-top: 18px; }
.agenda h3 { font-size: 15.5px; margin-bottom: 10px; color: var(--text2); font-weight: 600; }
.event-row {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 12px 14px; margin-bottom: 8px; box-shadow: var(--shadow); cursor: pointer;
  transition: transform .1s;
}
.event-row:active { transform: scale(.99); }
.event-stripe { width: 4px; align-self: stretch; border-radius: 4px; background: var(--accent); flex-shrink: 0; }
.event-time { font-size: 12.5px; font-weight: 700; color: var(--text2); min-width: 44px; padding-top: 2px; }
.event-body { flex: 1; min-width: 0; }
.event-title { font-weight: 600; font-size: 15px; }
.event-notes { font-size: 13px; color: var(--text2); margin-top: 3px; white-space: pre-line;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ── Today ── */
.hero-date { margin: 6px 4px 16px; }
.hero-date .dow { color: var(--accent-text); font-weight: 700; font-size: 13.5px; text-transform: uppercase; letter-spacing: .05em; }
.hero-date .d { font-size: 28px; font-weight: 800; letter-spacing: -.6px; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 6px; }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 12px 14px; box-shadow: var(--shadow); cursor: pointer;
}
.stat .v { font-size: 24px; font-weight: 800; letter-spacing: -.5px; }
.stat .l { font-size: 11.5px; color: var(--text2); font-weight: 600; margin-top: 1px; }
.stat.warn .v { color: var(--danger); }

/* ── Installations ── */
.inst-head { display: flex; align-items: center; gap: 10px; }
.inst-head .dev-ic {
  width: 40px; height: 40px; border-radius: 13px; background: var(--accent-soft);
  color: var(--accent-text); display: grid; place-items: center; flex-shrink: 0;
}
.inst-head h3 { font-size: 16px; flex: 1; }
.inst-head .loc { font-weight: 500; color: var(--text3); font-size: 13px; }
.online-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text3); }
.online-dot.on { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .2); }

.inst-slot { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
.inst-slot-head { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.inst-week {
  width: 46px; height: 46px; border-radius: 14px; flex-shrink: 0;
  background: var(--violet-soft); color: var(--violet);
  display: grid; place-items: center; font-weight: 800; font-size: 12px; text-align: center; line-height: 1.15;
}
.inst-week.idle { background: var(--surface2); color: var(--text3); }
.inst-body { flex: 1; min-width: 0; }
.inst-name { font-weight: 700; font-size: 14.5px; }
.inst-next { font-size: 12.5px; color: var(--text2); margin-top: 2px; }
.progress { height: 5px; border-radius: 99px; background: var(--surface2); margin-top: 7px; overflow: hidden; }
.progress > div { height: 100%; border-radius: 99px; background: linear-gradient(90deg, #10b981, #8b5cf6); }
.inst-chev { color: var(--text3); transition: transform .2s; }
.inst-chev.open { transform: rotate(90deg); }

.week-plan { margin-top: 12px; display: flex; flex-direction: column; gap: 2px; }
.week-row {
  display: flex; gap: 12px; align-items: flex-start; padding: 9px 10px; border-radius: 12px;
}
.week-row.current { background: var(--accent-soft); }
.week-badge {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; margin-top: 1px;
  display: grid; place-items: center; font-size: 11.5px; font-weight: 800;
  background: var(--surface2); color: var(--text3);
}
.week-row.current .week-badge { background: var(--accent); color: #fff; }
.week-badge.done { background: var(--accent-soft); color: var(--accent-text); }
.week-badge.done .ic { width: 13px; height: 13px; }
.week-badge.missed { background: var(--amber-soft); color: var(--amber); }
.week-info { flex: 1; min-width: 0; }
.week-title { font-size: 13.5px; font-weight: 650; }
.week-row.current .week-title { color: var(--accent-text); }
.week-sub { font-size: 12px; color: var(--text3); margin-top: 1px; }
.week-action { font-size: 12.5px; color: var(--text2); margin-top: 5px; line-height: 1.45; }

/* ── FAB ── */
.fab {
  position: fixed; right: 18px; bottom: calc(var(--nav-h) + 14px); z-index: 25;
  width: 58px; height: 58px; border-radius: 19px; border: none; cursor: pointer;
  background: linear-gradient(135deg, #10b981, #059669); color: #fff;
  box-shadow: 0 10px 28px rgba(16, 185, 129, .45);
  display: grid; place-items: center; transition: transform .12s;
}
.fab .ic { width: 26px; height: 26px; }
.fab:active { transform: scale(.92); }

/* ── Sheet (modal) ── */
.sheet-back {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(8, 12, 10, .5); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadein .15s ease;
}
.sheet {
  width: 100%; max-width: 560px; max-height: 88vh; max-height: 88dvh; overflow-y: auto;
  background: var(--surface); border-radius: 24px 24px 0 0;
  padding: 10px 20px calc(20px + env(safe-area-inset-bottom, 0px));
  box-shadow: var(--shadow-lg);
  animation: slideup .22s cubic-bezier(.2, .9, .3, 1);
}
@keyframes slideup { from { transform: translateY(40px); opacity: .6; } }
@media (min-width: 640px) {
  .sheet-back { align-items: center; padding: 24px; }
  .sheet { border-radius: 24px; padding-bottom: 20px; }
}
.sheet-grip { width: 40px; height: 4.5px; border-radius: 99px; background: var(--line); margin: 6px auto 14px; }
.sheet h2 { font-size: 19px; letter-spacing: -.3px; margin-bottom: 16px; }
.sheet .form { display: flex; flex-direction: column; gap: 13px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sheet-actions { display: flex; gap: 10px; margin-top: 18px; }
.sheet-actions .btn-primary { flex: 1; }
.sheet-label { font-size: 13px; font-weight: 700; color: var(--text2); margin-top: 4px; }

/* ── Markdown notes ── */
.notes-head { display: flex; align-items: center; justify-content: space-between; }
.md {
  font-size: 14px; line-height: 1.55; color: var(--text);
  background: var(--surface2); border-radius: 13px; padding: 12px 14px;
  overflow-wrap: break-word; max-height: 46vh; overflow-y: auto;
}
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md h2, .md h3, .md h4, .md h5 { margin: 14px 0 6px; letter-spacing: -.2px; line-height: 1.3; }
.md h2 { font-size: 17px; } .md h3 { font-size: 15.5px; } .md h4, .md h5 { font-size: 14px; }
.md p { margin: 6px 0; }
.md ul, .md ol { margin: 6px 0; padding-left: 22px; }
.md li { margin: 3px 0; }
.md .md-sub { color: var(--text2); font-size: 13px; }
.md blockquote { border-left: 3px solid var(--accent); padding: 2px 12px; margin: 8px 0; color: var(--text2); }
.md hr { border: none; border-top: 1px solid var(--line); margin: 12px 0; }
.md code {
  background: color-mix(in srgb, var(--text) 8%, transparent);
  border-radius: 5px; padding: 1px 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em;
}
.md pre {
  background: color-mix(in srgb, var(--text) 7%, transparent);
  border-radius: 10px; padding: 10px 12px; margin: 8px 0; overflow-x: auto;
}
.md pre code { background: none; padding: 0; font-size: 12.5px; line-height: 1.5; }
.md a { color: var(--accent-text); font-weight: 600; }
.md .tbl { overflow-x: auto; margin: 8px 0; border-radius: 10px; border: 1px solid var(--line); }
.md table { border-collapse: collapse; font-size: 13px; min-width: 100%; }
.md th, .md td { border-bottom: 1px solid var(--line); padding: 7px 10px; text-align: left; vertical-align: top; white-space: nowrap; }
.md td { white-space: normal; min-width: 70px; }
.md th { background: color-mix(in srgb, var(--text) 5%, transparent); font-weight: 700; font-size: 12px; }
.md tr:last-child td { border-bottom: none; }

/* ── Subtasks in sheet ── */
.subtask-list { display: flex; flex-direction: column; gap: 6px; }
.subtask-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface2); border-radius: 12px; padding: 9px 12px;
}
.subtask-row .checkbox { width: 21px; height: 21px; }
.subtask-row .st-title { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; cursor: pointer; }
.subtask-row.done .st-title { text-decoration: line-through; opacity: .6; }
.subtask-row .st-date { font-size: 11.5px; font-weight: 700; color: var(--text2); }
.subtask-row .st-date.overdue { color: var(--danger); }
.st-del { background: none; border: none; color: var(--text3); cursor: pointer; padding: 2px; display: grid; place-items: center; }
.st-del .ic { width: 15px; height: 15px; }
.subtask-add { display: flex; gap: 8px; }
.subtask-add input { flex: 1; padding: 10px 12px; border-radius: 12px; }
.subtask-add .btn { padding: 0 14px; border-radius: 12px; }

/* ── Attachments ── */
.att-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.att-item {
  position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden;
  background: var(--surface2); border: 1px solid var(--line); cursor: pointer;
}
.att-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.att-item .att-file {
  width: 100%; height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px; color: var(--text2);
  font-size: 9.5px; font-weight: 700; padding: 4px; text-align: center; word-break: break-all;
}
.att-del {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px;
  border-radius: 50%; border: none; cursor: pointer;
  background: rgba(0, 0, 0, .55); color: #fff; display: grid; place-items: center;
}
.att-del .ic { width: 12px; height: 12px; }
.att-add {
  aspect-ratio: 1; border-radius: 12px; border: 1.5px dashed var(--text3);
  background: none; color: var(--text2); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font: inherit; font-size: 10px; font-weight: 700;
}
.att-add .ic { width: 20px; height: 20px; }
.att-uploading { opacity: .5; pointer-events: none; }

/* ── Lightbox ── */
.lightbox {
  position: fixed; inset: 0; z-index: 70; background: rgba(0, 0, 0, .92);
  display: grid; place-items: center; animation: fadein .15s ease; cursor: zoom-out;
}
.lightbox img { max-width: 100vw; max-height: 100vh; object-fit: contain; }
.lightbox .lb-close {
  position: absolute; top: calc(14px + env(safe-area-inset-top, 0px)); right: 16px;
  width: 38px; height: 38px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255, 255, 255, .14); color: #fff; display: grid; place-items: center;
}

/* ── Profile sheet bits ── */
.profile-row { display: flex; align-items: center; gap: 14px; padding: 8px 0 16px; }
.profile-row .avatar { width: 52px; height: 52px; font-size: 20px; }
.profile-row .nm { font-weight: 700; font-size: 17px; }
.profile-row .em { color: var(--text2); font-size: 13.5px; }

/* ── Toast ── */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--nav-h) + 16px); z-index: 60;
  background: var(--text); color: var(--bg);
  font-size: 14px; font-weight: 600; padding: 11px 20px; border-radius: 99px;
  box-shadow: var(--shadow-lg); animation: toastin .25s cubic-bezier(.2, .9, .3, 1);
  max-width: 90vw; text-align: center;
}
@keyframes toastin { from { transform: translate(-50%, 12px); opacity: 0; } }

.link-btn {
  background: none; border: none; color: var(--accent-text); font: inherit;
  font-size: 14px; font-weight: 600; cursor: pointer; padding: 0;
  display: inline-flex; align-items: center; gap: 6px;
}

.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 4px 2px; }
.toggle-row span { font-size: 14.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }
.switch { position: relative; width: 48px; height: 29px; flex-shrink: 0; }
.switch input { opacity: 0; width: 100%; height: 100%; position: absolute; cursor: pointer; z-index: 2; }
.switch .tr {
  position: absolute; inset: 0; border-radius: 99px; background: var(--surface2); transition: background .18s;
  border: 1px solid var(--line);
}
.switch .tr::after {
  content: ''; position: absolute; top: 2.5px; left: 3px; width: 22px; height: 22px;
  border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.25); transition: transform .18s;
}
.switch input:checked + .tr { background: var(--accent); border-color: var(--accent); }
.switch input:checked + .tr::after { transform: translateX(19px); }

::-webkit-scrollbar { width: 0; height: 0; }
