/* Central SI, appli — feuille de style
   Bleu nuit du logo pour la structure, bleu électrique pour l'action ; les couleurs d'état sont réservées aux alertes.
   Mise en page : téléphone = une colonne + barre d'onglets ; ordinateur = menu, liste, détail. */
:root {
  --night: #0B1B4A;
  --night-2: #13286B;
  --blue: #1463F3;
  --blue-2: #1E90FF;
  --blue-press: #0F50C9;
  --blue-soft: #EAF1FF;
  --bg: #F4F6FB;
  --surface: #FFFFFF;
  --surface-2: #F8F9FD;
  --line: #E1E6F0;
  --line-strong: #C9D1E2;
  --text: #0B1B4A;
  --muted: #56627F;
  --faint: #8792AC;
  --crit: #D1302A;
  --crit-soft: #FDECEB;
  --val: #B45F06;
  --val-soft: #FFF2DF;
  --info: #3B57A8;
  --info-soft: #EDF1FB;
  --ok: #137A4D;
  --ok-soft: #E3F4EB;
  --bubble-me: #1463F3;
  --bubble-me-text: #FFFFFF;
  --shadow: 0 1px 2px rgba(11, 27, 74, .06), 0 8px 24px rgba(11, 27, 74, .06);
  --shadow-lg: 0 20px 60px rgba(11, 27, 74, .18);
  --radius: 14px;
  --radius-sm: 10px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --rail: 248px;
  --list: 400px;
  --tabbar: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #070D22; --surface: #0E1733; --surface-2: #121D3E; --line: #1F2C55; --line-strong: #2C3B6A;
    --text: #E8ECF8; --muted: #9CA7C8; --faint: #6F7BA0; --blue: #4C8DFF; --blue-2: #66B2FF; --blue-press: #3A79EB; --blue-soft: #14275A;
    --crit: #FF6A60; --crit-soft: #3A1515; --val: #F2A54A; --val-soft: #36240E; --info: #8FA8EE; --info-soft: #18244B; --ok: #3FCB8A; --ok-soft: #0E2C20;
    --bubble-me: #2F6FE6; --shadow: 0 1px 2px rgba(0,0,0,.3); --shadow-lg: 0 20px 60px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none;
}
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 45%, transparent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -.01em; text-wrap: balance; }
p { margin: 0; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------------------------------------------------------------- Boutons et champs */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px;
  border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); font-weight: 600; font-size: 14px;
  cursor: pointer; transition: background .15s, border-color .15s, transform .05s; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: default; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-press); }
.btn.danger { color: var(--crit); }
.btn.big { min-height: 48px; font-size: 15px; padding: 0 20px; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn svg { width: 18px; height: 18px; flex: none; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; border: 0; background: transparent; cursor: pointer; color: var(--text); }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 22px; height: 22px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--muted); }
.input, .field input, .field select {
  height: 46px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); width: 100%;
}
.input:focus, .field input:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 20%, transparent); }
.form { display: flex; flex-direction: column; gap: 14px; }
.error-box { background: var(--crit-soft); color: var(--crit); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 14px; font-weight: 500; }

/* ---------------------------------------------------------------- Écrans d'accueil (installation, connexion) */
.auth { min-height: 100%; display: grid; place-items: center; padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
  background: radial-gradient(1200px 600px at 10% -10%, color-mix(in srgb, var(--blue) 14%, transparent), transparent 60%), var(--bg); }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 32px 28px; display: flex; flex-direction: column; gap: 22px; }
.auth-card .wordmark { height: 52px; width: auto; align-self: flex-start; }
.auth-card h1 { font-size: 22px; font-weight: 800; }
.auth-card .lead { color: var(--muted); font-size: 14.5px; }
.wordmark-plate { background: #fff; border-radius: 12px; padding: 6px 10px; align-self: flex-start; }

/* ---------------------------------------------------------------- Structure */
.shell { height: 100%; display: grid; grid-template-columns: var(--rail) var(--list) 1fr; }
.rail { background: var(--night); color: #DCE3F7; display: flex; flex-direction: column; padding: 20px 14px; gap: 6px; padding-top: max(20px, env(safe-area-inset-top)); }
.rail .brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.rail .brand .mark { width: 40px; height: 40px; border-radius: 11px; background: #fff; display: grid; place-items: center; flex: none; }
.rail .brand .mark img { width: 32px; height: auto; }
.rail .brand b { font-size: 17px; font-weight: 800; color: #fff; letter-spacing: -.01em; }
.rail .brand b span { color: var(--blue-2); }
.rail .brand small { display: block; font-size: 11.5px; color: #9FB0DA; font-weight: 500; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: #C9D3EE; font-weight: 600; font-size: 14.5px; text-decoration: none; }
.nav-item:hover { background: rgba(255,255,255,.06); text-decoration: none; color: #fff; }
.nav-item.on { background: rgba(255,255,255,.1); color: #fff; }
.nav-item svg { width: 20px; height: 20px; flex: none; opacity: .9; }
.nav-item .count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--blue); color: #fff; font-size: 12px; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.nav-item .count.crit { background: var(--crit); }
.rail .spacer { flex: 1; }
.rail .me { display: flex; align-items: center; gap: 10px; padding: 10px 8px 0; border-top: 1px solid rgba(255,255,255,.08); margin-top: 8px; padding-top: 14px; font-size: 13px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: var(--blue); color: #fff; flex: none; }
.rail .me .who { min-width: 0; }
.rail .me .who b { display: block; color: #fff; font-size: 13.5px; }
.rail .me .who span { color: #9FB0DA; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.install-card { background: rgba(255,255,255,.06); border-radius: 12px; padding: 12px; font-size: 13px; color: #C9D3EE; display: flex; flex-direction: column; gap: 8px; }
.install-card .btn { min-height: 34px; font-size: 13px; }

.pane { min-width: 0; display: flex; flex-direction: column; height: 100%; overflow: hidden; }
.pane-list { background: var(--surface); border-right: 1px solid var(--line); }
.pane-head { display: flex; align-items: center; gap: 10px; padding: 18px 20px 12px; padding-top: max(18px, env(safe-area-inset-top)); }
.pane-head h1 { font-size: 22px; font-weight: 800; }
.pane-head .sub { color: var(--muted); font-size: 13px; }
.pane-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.pane-detail { background: var(--bg); overflow-y: auto; scrollbar-width: thin; }
#app { height: 100%; }
.mobile-head, .tabbar { display: none; }
.shell[data-view="page"] { grid-template-columns: var(--rail) 1fr; }
.shell[data-view="page"] .pane-list { display: none; }

.seg { display: flex; gap: 4px; padding: 0 20px 12px; }
.seg a { padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); border: 1px solid var(--line); background: var(--surface); text-decoration: none; }
.seg a.on { background: var(--night); color: #fff; border-color: var(--night); }
@media (prefers-color-scheme: dark) { .seg a.on { background: var(--text); color: var(--bg); border-color: var(--text); } }

/* ---------------------------------------------------------------- Liste d'alertes */
.alert-list { list-style: none; margin: 0; padding: 0 12px 20px; display: flex; flex-direction: column; gap: 6px; }
.alert-row { position: relative; display: grid; grid-template-columns: 10px 1fr auto; gap: 4px 12px; padding: 14px 14px 14px 12px; border-radius: 12px; color: var(--text); text-decoration: none; border: 1px solid transparent; }
.alert-row:hover { background: var(--surface-2); text-decoration: none; }
.alert-row.on { background: var(--blue-soft); border-color: color-mix(in srgb, var(--blue) 25%, transparent); }
.alert-row .dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; background: var(--sev); box-shadow: 0 0 0 4px var(--sev-soft); }
.alert-row.reglee .dot { background: var(--line-strong); box-shadow: none; }
.alert-row .t { font-weight: 700; font-size: 14.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.alert-row.reglee .t { color: var(--muted); font-weight: 600; }
.alert-row .time { font-size: 12px; color: var(--faint); white-space: nowrap; font-variant-numeric: tabular-nums; }
.alert-row .meta { grid-column: 2 / 4; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 12.5px; color: var(--muted); }
.alert-row .preview { grid-column: 2 / 4; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.unread { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--blue); color: #fff; font-size: 11.5px; font-weight: 700; display: inline-grid; place-items: center; }

.sev-critique { --sev: var(--crit); --sev-soft: var(--crit-soft); }
.sev-a_valider { --sev: var(--val); --sev-soft: var(--val-soft); }
.sev-info { --sev: var(--info); --sev-soft: var(--info-soft); }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .01em; white-space: nowrap; }
.pill.sev { color: var(--sev); background: var(--sev-soft); }
.pill.st-ouverte { color: var(--text); background: var(--surface-2); border: 1px solid var(--line); }
.pill.st-repondue { color: var(--blue); background: var(--blue-soft); }
.pill.st-en_cours { color: var(--blue); background: var(--blue-soft); }
.pill.st-reglee { color: var(--ok); background: var(--ok-soft); }
.pill.dec-valider { color: var(--ok); background: var(--ok-soft); }
.pill.dec-refuser { color: var(--crit); background: var(--crit-soft); }

.empty { padding: 48px 24px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty .ill { width: 64px; height: 64px; border-radius: 18px; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; }
.empty .ill svg { width: 30px; height: 30px; }
.empty h2 { color: var(--text); font-size: 17px; }
.empty p { max-width: 34ch; font-size: 14px; }

/* ---------------------------------------------------------------- Détail d'une alerte */
.detail { max-width: 760px; width: 100%; margin: 0 auto; padding: 28px 28px 0; display: flex; flex-direction: column; gap: 18px; }
.detail-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.detail h1 { font-size: 24px; font-weight: 800; }
.detail .meta { color: var(--muted); font-size: 13.5px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.body-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.6; }
.decide { display: flex; flex-direction: column; gap: 12px; border-left: 4px solid var(--val); }
.decide h2 { font-size: 16px; }
.decide .row { display: flex; gap: 10px; flex-wrap: wrap; }
.decide .row .btn { flex: 1 1 140px; }
.decide .btn.confirm { background: var(--ok); border-color: var(--ok); color: #fff; }
.decide .btn.confirm-no { background: var(--crit); border-color: var(--crit); color: #fff; }
.decided { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.resolution { border-left: 4px solid var(--ok); }

.thread { display: flex; flex-direction: column; gap: 12px; padding-bottom: 8px; }
.thread-title { font-size: 12px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; }
.msg { display: flex; gap: 10px; align-items: flex-end; max-width: 92%; }
.msg .bubble { padding: 10px 14px; border-radius: 16px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; line-height: 1.5; }
.msg.claude .bubble { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg.user { align-self: flex-end; flex-direction: row-reverse; }
.msg.user .bubble { background: var(--bubble-me); color: var(--bubble-me-text); border-bottom-right-radius: 6px; }
.msg .claude-mark { width: 28px; height: 28px; border-radius: 8px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; flex: none; }
.msg .claude-mark img { width: 22px; }
.msg-meta { font-size: 11.5px; color: var(--faint); margin-top: 4px; display: flex; gap: 6px; align-items: center; }
.msg.user .msg-meta { justify-content: flex-end; }
.msg-meta .read { color: var(--ok); font-weight: 600; }
.msg-col { display: flex; flex-direction: column; min-width: 0; }

.composer-wrap { position: sticky; bottom: 0; padding: 12px 28px max(16px, env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) 70%, transparent); }
.composer { max-width: 760px; margin: 0 auto; display: flex; gap: 8px; align-items: flex-end; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 16px; padding: 6px 6px 6px 14px; box-shadow: var(--shadow); }
.composer:focus-within { border-color: var(--blue); }
.composer textarea { flex: 1; border: 0; resize: none; background: transparent; padding: 8px 0; max-height: 160px; min-height: 24px; line-height: 1.45; outline: none; box-shadow: none; }
.composer .send { width: 40px; height: 40px; border-radius: 12px; border: 0; background: var(--blue); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.composer .send[disabled] { opacity: .45; cursor: default; }
.composer .send svg { width: 20px; height: 20px; }
.composer-hint { max-width: 760px; margin: 6px auto 0; font-size: 12px; color: var(--faint); padding-left: 4px; }

.detail-foot { display: flex; gap: 10px; flex-wrap: wrap; padding: 4px 0 8px; }
.placeholder { height: 100%; display: grid; place-items: center; color: var(--muted); text-align: center; padding: 24px; }
.placeholder img { width: 72px; opacity: .9; margin-bottom: 12px; }

/* ---------------------------------------------------------------- Échanges */
.chat { max-width: 760px; width: 100%; margin: 0 auto; padding: 20px 28px 0; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.chat-intro { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; font-size: 14px; color: var(--muted); }
.chat-intro b { color: var(--text); }

/* ---------------------------------------------------------------- Réglages */
.settings { max-width: 760px; width: 100%; margin: 0 auto; padding: 28px 28px 48px; display: flex; flex-direction: column; gap: 22px; }
.settings h1 { font-size: 24px; font-weight: 800; }
.group { display: flex; flex-direction: column; gap: 10px; }
.group > h2 { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; padding-left: 4px; }
.list-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.item { display: flex; align-items: center; gap: 14px; padding: 14px 18px; min-height: 60px; }
.list-card > * + * { border-top: 1px solid var(--line); }
.item .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.item .txt b { font-weight: 600; font-size: 14.5px; }
.item .txt span { font-size: 13px; color: var(--muted); }
.item .ico { width: 36px; height: 36px; border-radius: 10px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; flex: none; }
.item .ico svg { width: 19px; height: 19px; }
.item .ico.ok { background: var(--ok-soft); color: var(--ok); }
.item .ico.warn { background: var(--val-soft); color: var(--val); }
.item .ico.bad { background: var(--crit-soft); color: var(--crit); }
.item .actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.switch { position: relative; width: 46px; height: 28px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--line-strong); transition: background .15s; pointer-events: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked + span { background: var(--blue); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:disabled + span { opacity: .6; }
.switch input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--blue) 45%, transparent); outline-offset: 2px; }
.time-input { height: 38px; width: 118px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--line-strong); background: var(--surface); font-variant-numeric: tabular-nums; }
.copy-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; overflow-wrap: anywhere; }
.qr { width: 180px; height: 180px; background: #fff; border-radius: 12px; padding: 8px; }
.qr svg { width: 100%; height: 100%; }
.callout { background: var(--blue-soft); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 13.5px; color: var(--text); }
.callout.warn { background: var(--val-soft); }
.inline-form { padding: 14px 18px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }

/* ---------------------------------------------------------------- Toasts */
#toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 50; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--night); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 14px; font-weight: 500; box-shadow: var(--shadow-lg); animation: up .2s ease-out; max-width: calc(100vw - 32px); }
.toast.err { background: var(--crit); }
@keyframes up { from { transform: translateY(8px); opacity: 0; } }
.offline { position: fixed; top: env(safe-area-inset-top); left: 0; right: 0; z-index: 40; background: var(--val); color: #fff; text-align: center; font-size: 13px; font-weight: 600; padding: 4px; }

/* ---------------------------------------------------------------- Ordinateur moyen : liste et détail sans menu large */
@media (max-width: 1180px) and (min-width: 861px) {
  .shell { --rail: 76px; --list: 360px; }
  .rail .brand b, .rail .brand small, .nav-item .lbl, .rail .me .who, .install-card { display: none; }
  .rail .brand { justify-content: center; padding: 4px 0 18px; }
  .nav-item { justify-content: center; position: relative; padding: 12px; }
  .nav-item .count { position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; font-size: 10.5px; padding: 0 5px; }
  .rail .me { justify-content: center; }
}

/* ---------------------------------------------------------------- Téléphone */
@media (max-width: 860px) {
  .shell { display: block; height: auto; min-height: 100%; }
  .rail { display: none; }
  .pane { height: auto; overflow: visible; min-height: 100vh; min-height: 100dvh; }
  .pane-scroll { overflow: visible; }
  .pane-list, .pane-detail { border: 0; }
  .shell[data-view="list"] .pane-detail, .shell[data-view="detail"] .pane-list { display: none; }
  .pane-list { background: var(--bg); padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom)); }
  .mobile-head { display: flex; position: sticky; top: 0; z-index: 20; align-items: center; gap: 8px; padding: 8px 12px; padding-top: max(8px, env(safe-area-inset-top));
    background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); min-height: 56px; }
  .mobile-head .mark { width: 32px; height: 32px; border-radius: 9px; background: #fff; display: grid; place-items: center; border: 1px solid var(--line); }
  .mobile-head .mark img { width: 26px; }
  .mobile-head .title { font-weight: 800; font-size: 17px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pane-head { padding: 16px 16px 10px; }
  .pane-head h1 { font-size: 26px; }
  .seg { padding: 0 16px 12px; overflow-x: auto; scrollbar-width: none; }
  .alert-list { padding: 0 10px 16px; gap: 8px; }
  .alert-row { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
  .alert-row.on { background: var(--surface); border-color: var(--line); }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: color-mix(in srgb, var(--surface) 94%, transparent);
    backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .shell[data-view="detail"] .tabbar { display: none; }
  .tabbar a { flex: 1; height: var(--tabbar); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11.5px; font-weight: 600; color: var(--faint); text-decoration: none; position: relative; }
  .tabbar a svg { width: 24px; height: 24px; }
  .tabbar a.on { color: var(--blue); }
  .tabbar .count { position: absolute; top: 7px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--blue); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; }
  .tabbar .count.crit { background: var(--crit); }
  .detail, .chat, .settings { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); padding-top: 16px; }
  .detail h1 { font-size: 21px; }
  .composer-wrap { padding: 10px 12px max(12px, env(safe-area-inset-bottom)); }
  .settings { padding-bottom: calc(var(--tabbar) + 32px + env(safe-area-inset-bottom)); }
  .shell[data-tab="echanges"] .composer-wrap { bottom: calc(var(--tabbar) + env(safe-area-inset-bottom)); padding-bottom: 10px; }
  .shell[data-tab="echanges"] .pane-detail { padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom)); }
  .item { padding: 12px 14px; flex-wrap: wrap; }
  .item .actions { width: 100%; justify-content: flex-start; padding-left: 50px; }
  .item.compact .actions { width: auto; padding-left: 0; }
  #toasts { bottom: calc(var(--tabbar) + 16px + env(safe-area-inset-bottom)); }
}

.ico-wrap { display: contents; }
.mt6 { margin-top: 6px; }
.start { align-self: flex-start; }
.center { align-self: center; }
.pane-head.flush { padding: 0; }
.claude-mark.lg { width: 36px; height: 36px; border-radius: 10px; background: #fff; display: grid; place-items: center; border: 1px solid var(--line); flex: none; }
.claude-mark.lg img { width: 28px; }
.input.short { max-width: 160px; height: 42px; }
