/* ContaRRART: paleta derivada do índigo #2714A6
   índigo (primária), verde-esmeralda (entradas), framboesa (saídas), âmbar (metas e investimentos), orquídea (transferências)
   O tema é definido em <html data-theme="light|dark"> por um script no <head>; a preferência fica salva no navegador. */
:root {
  --bg: #F3F2F9;
  --surface: #FFFFFF;
  --surface-2: #F6F5FC;
  --ink: #1A1633;
  --ink-2: #57536F;
  --ink-3: #8A86A0;
  --line: #E1DEEE;
  --blue: #2714A6;
  --blue-soft: #E9E6F9;
  --on-primary: #FFFFFF;
  --green: #17865F;
  --green-soft: #DDF3E9;
  --red: #C0395A;
  --red-soft: #FAE4EA;
  --gold: #A9730F;
  --gold-soft: #F8EDD5;
  --purple: #9B3FC7;
  --shadow-tint: 39, 20, 166;
  --backdrop: rgba(18, 12, 48, .5);
  --radius-lg: 16px;
  --radius: 11px;
  --radius-sm: 8px;
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --sidebar: 232px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0F0C24;
  --surface: #18142F;
  --surface-2: #211C3D;
  --ink: #ECEAF7;
  --ink-2: #ADA8C8;
  --ink-3: #7F7A9A;
  --line: #2E2852;
  --blue: #A99DFF;
  --blue-soft: #272055;
  --on-primary: #130E33;
  --green: #4FCB98;
  --green-soft: #143429;
  --red: #F27C98;
  --red-soft: #3B1A29;
  --gold: #E2B455;
  --gold-soft: #372B15;
  --purple: #D9A3F5;
  --shadow-tint: 0, 0, 0;
  --backdrop: rgba(4, 2, 14, .62);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: var(--blue); }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 1.75rem; font-weight: 750; }
h2 { font-size: 1.12rem; font-weight: 650; }
h3 { font-size: 1rem; font-weight: 650; }
p { margin: 0 0 .75em; }
code { font-size: .88em; background: var(--surface-2); padding: .1em .35em; border-radius: 4px; word-break: break-all; }
.num, .money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.muted { color: var(--ink-2); }
.small { font-size: .85rem; }
.pos { color: var(--green); }
.neg { color: var(--red); }
.gold { color: var(--gold); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- Marca ---------- */
.brand-logo { display: inline-grid; width: 48px; height: 48px; flex: none; }
.brand-logo img { grid-area: 1 / 1; width: 100%; height: 100%; object-fit: contain; }
.brand-logo.sm { width: 30px; height: 30px; }
.brand-logo .l-dark { display: none; }
:root[data-theme="dark"] .brand-logo .l-dark { display: block; }
:root[data-theme="dark"] .brand-logo .l-light { display: none; }

/* ---------- Login / setup ---------- */
.auth-body { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 32px; }
.auth-card.wide { max-width: 640px; }
.auth-card h1 { margin: 16px 0 6px; }
.stack { display: grid; gap: 14px; margin-top: 20px; }
.form-grid { display: grid; gap: 18px; margin-top: 18px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 16px; display: grid; gap: 12px; margin: 0; }
legend { font-weight: 600; padding: 0 6px; }

/* ---------- Formulários ---------- */
label { display: grid; gap: 5px; font-size: .86rem; font-weight: 500; color: var(--ink-2); }
input, select, textarea {
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 9px 11px; width: 100%; min-height: 40px;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
input[type="checkbox"] { width: 18px; min-height: 18px; accent-color: var(--blue); }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--ink); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 560px) { .row2, .row3 { grid-template-columns: 1fr; } }
.hint { font-size: .8rem; color: var(--ink-3); font-weight: 400; }

.btn {
  font: inherit; font-weight: 600; font-size: .9rem;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  padding: 8px 14px; min-height: 38px; border-radius: 999px; cursor: pointer; text-decoration: none;
  transition: background .15s, border-color .15s;
}
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: var(--on-primary); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, var(--line)); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { min-height: 30px; padding: 4px 10px; font-size: .82rem; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: wait; }
.icon-btn { border: 0; background: transparent; color: var(--ink-2); cursor: pointer; padding: 6px; border-radius: 8px; font-size: 1.05rem; line-height: 1; }
.icon-btn svg { width: 20px; height: 20px; display: block; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }

.segmented { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.segmented button { font: inherit; font-size: .85rem; font-weight: 500; border: 0; background: transparent; color: var(--ink-2); padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.segmented button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(var(--shadow-tint), .14); font-weight: 600; }
.segmented.type button.on[data-v="despesa"] { color: var(--red); }
.segmented.type button.on[data-v="receita"] { color: var(--green); }
.segmented.type button.on[data-v="transferencia"] { color: var(--purple); }

.alert { padding: 10px 12px; border-radius: var(--radius-sm); font-size: .9rem; margin: 10px 0; }
.alert.error { background: var(--red-soft); color: var(--red); }
.alert.info { background: var(--blue-soft); color: var(--blue); }
.alert.ok { background: var(--green-soft); color: var(--green); }

/* ---------- Estrutura ---------- */
#app { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar);
  background: var(--surface); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 20px 14px; gap: 18px; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 750; font-size: 1.3rem; color: var(--ink); text-decoration: none; padding: 0 8px; }
.nav { display: grid; gap: 2px; }
.nav-link {
  display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 10px;
  color: var(--ink-2); text-decoration: none; font-weight: 500; font: inherit; border: 0; background: none; cursor: pointer; text-align: left; width: 100%;
}
.nav-link svg { width: 19px; height: 19px; flex: none; }
.nav-link:hover { background: var(--surface-2); color: var(--ink); }
.nav-link.on { background: var(--blue-soft); color: var(--blue); font-weight: 600; }
.nav-sep { height: 1px; background: var(--line); margin: 8px 6px; }
.sidebar-foot { margin-top: auto; display: grid; gap: 2px; }
.theme-toggle > span { display: inline-flex; align-items: center; }
.theme-toggle .when-dark, :root[data-theme="dark"] .theme-toggle .when-light { display: none; }
:root[data-theme="dark"] .theme-toggle .when-dark { display: inline-flex; }
.topbar-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mobile-only { display: none !important; }

.main { margin-left: var(--sidebar); min-height: 100vh; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 22px 32px 6px; flex-wrap: wrap; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#view { padding: 14px 32px 48px; max-width: 1320px; outline: none; }

.bottom-nav { display: none; }

@media (max-width: 900px) {
  .sidebar { display: none; }
  .main { margin-left: 0; }
  .topbar { padding: calc(14px + env(safe-area-inset-top)) 16px 4px; }
  .topbar h1 { font-size: 1.4rem; }
  .mobile-only { display: inline-grid !important; }
  .topbar-title { flex: 1 1 auto; }
  .topbar .page-actions:empty { display: none; }
  .topbar .theme-toggle svg { width: 21px; height: 21px; }
  #view { padding: 10px 14px calc(96px + env(safe-area-inset-bottom)); }
  .bottom-nav {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bottom-nav a, .bottom-nav button {
    display: grid; justify-items: center; gap: 2px; font: inherit; font-size: .7rem; color: var(--ink-3);
    text-decoration: none; background: none; border: 0; padding: 4px 0; cursor: pointer;
  }
  .bottom-nav svg { width: 22px; height: 22px; }
  .bottom-nav .on { color: var(--blue); font-weight: 600; }
  .bottom-nav .fab span.plus {
    width: 46px; height: 46px; border-radius: 50%; background: var(--blue); color: var(--on-primary); display: grid; place-items: center;
    font-size: 1.7rem; line-height: 1; margin-top: -18px; border: 4px solid var(--bg);
  }
}

.filter-toggle { display: none; }
@media (max-width: 900px) {
  .hide-mobile { display: none !important; }
  .filter-toggle { display: inline-flex; }
  .toolbar.filters { display: none; }
  .toolbar.filters.open { display: flex; }
  .toolbar.filters select, .toolbar.filters input { flex: 1 1 45%; min-width: 0; }
  .summary-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
  .summary-strip .wide-only { display: none; }
  .row3 > * { grid-column: auto !important; }
  .page-actions { width: 100%; }
}

/* ---------- Grade e painéis ---------- */
.grid { display: grid; gap: 16px; }
.g-kpi { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.g-1-1 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) { .g-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-2-1, .g-3 { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .g-1-1 { grid-template-columns: 1fr; } .g-kpi { gap: 10px; } }
.mt { margin-top: 16px; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.panel-head .muted { font-size: .85rem; }
.chart-box { position: relative; height: 260px; }
.chart-box.tall { height: 320px; }
.chart-box.short { height: 200px; }

.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; min-width: 0; }
.kpi .label { font-size: .84rem; color: var(--ink-2); }
.kpi .value { font-family: var(--font-display); font-weight: 650; font-size: 1.55rem; margin: 2px 0; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .sub { font-size: .8rem; color: var(--ink-3); }
@media (max-width: 700px) { .kpi { padding: 11px 12px; } .kpi .value { font-size: 1.18rem; } }

.empty { text-align: center; padding: 26px 12px; color: var(--ink-2); }
.empty p { margin-bottom: 12px; }

/* ---------- Barra de comando (lançamento rápido com IA) ---------- */
.command {
  display: flex; align-items: stretch; gap: 0; background: var(--surface); border-radius: var(--radius-lg);
  border: 1px solid var(--line); box-shadow: 0 6px 22px -12px rgba(var(--shadow-tint), .28); margin-bottom: 16px; overflow: hidden;
}
.command::before { content: ""; width: 6px; flex: none; background: linear-gradient(var(--blue) 0 40%, var(--gold) 40% 70%, var(--green) 70% 100%); }
.command form { display: flex; align-items: center; gap: 8px; flex: 1; padding: 8px 8px 8px 14px; min-width: 0; }
.command input[type="text"] { border: 0; box-shadow: none; font-size: 1.05rem; padding: 10px 4px; min-width: 0; background: transparent; }
.command input[type="text"]:focus { box-shadow: none; }
.command .file-chip { font-size: .8rem; background: var(--surface-2); border-radius: 999px; padding: 3px 10px; white-space: nowrap; max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.command-reply { white-space: pre-wrap; font-size: .92rem; background: var(--surface-2); border-radius: var(--radius); padding: 12px 14px; margin: -6px 0 16px; border: 1px solid var(--line); }
.command-reply .actions { margin-top: 8px; display: flex; gap: 8px; }

/* ---------- Listas ---------- */
.list { display: grid; }
.item { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--line); min-width: 0; }
.item:last-child { border-bottom: 0; }
.item.clickable { cursor: pointer; border-radius: 8px; }
.item.clickable:hover { background: var(--surface-2); }
.item .grow { flex: 1; min-width: 0; }
.item .title { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .meta { font-size: .8rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .amount { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.cat-dot { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; font-size: 1.05rem; }
.badge { display: inline-block; font-size: .72rem; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); vertical-align: middle; }
.badge.pend { background: var(--gold-soft); color: var(--gold); }
.badge.late { background: var(--red-soft); color: var(--red); }
.badge.src { background: var(--blue-soft); color: var(--blue); }
.tag { font-size: .75rem; color: var(--blue); }

.day-group { margin-top: 14px; }
.day-head { display: flex; justify-content: space-between; font-size: .82rem; color: var(--ink-2); font-weight: 600; padding: 4px 2px; border-bottom: 1px solid var(--line); }

.bar { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 999px; background: var(--green); }
.bar > span.warn { background: var(--gold); }
.bar > span.over { background: var(--red); }

table.data { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.data th { text-align: left; font-weight: 600; color: var(--ink-2); font-size: .8rem; padding: 8px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data td.r, table.data th.r { text-align: right; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr.clickable { cursor: pointer; }
table.data tbody tr.clickable:hover { background: var(--surface-2); }
.table-wrap { overflow-x: auto; }

/* ---------- Filtros ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.toolbar select, .toolbar input { width: auto; min-width: 130px; min-height: 36px; padding: 6px 10px; }
.toolbar .search { flex: 1; min-width: 180px; }
.toolbar input[type="checkbox"] { min-width: 0; width: 18px; min-height: 18px; padding: 0; }
.toolbar .check { white-space: nowrap; }
.month-nav { display: inline-flex; align-items: center; gap: 4px; }
.month-nav strong { min-width: 130px; text-align: center; font-family: var(--font-display); font-weight: 650; }
.summary-strip { display: flex; gap: 22px; flex-wrap: wrap; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 6px; }
.summary-strip div { display: grid; }
.summary-strip span { font-size: .78rem; color: var(--ink-2); }
.summary-strip strong { font-variant-numeric: tabular-nums; font-size: 1.05rem; }

/* ---------- Contas e metas ---------- */
.acc-card { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px; background: var(--surface); position: relative; overflow: hidden; cursor: pointer; }
.acc-card::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--c, var(--blue)); }
.acc-card .big { font-family: var(--font-display); font-size: 1.45rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.goal-card { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; background: var(--surface); display: grid; gap: 10px; }
.goal-card .top { display: flex; gap: 12px; align-items: center; }
.goal-card .icon { font-size: 1.5rem; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--gold-soft); }
.goal-card .needed { background: var(--gold-soft); color: var(--ink); border-radius: var(--radius); padding: 10px 12px; font-size: .9rem; }
.goal-card .needed strong { color: var(--gold); font-size: 1.15rem; font-family: var(--font-display); }

.indicators { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 700px) { .indicators { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.indicator { background: var(--surface-2); border-radius: var(--radius); padding: 10px 12px; }
.indicator .v { font-family: var(--font-display); font-weight: 650; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.indicator .l { font-size: .8rem; color: var(--ink-2); }

.news-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
@media (max-width: 800px) { .news-grid { grid-template-columns: 1fr; } }
.news-item { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.news-item:hover .t { color: var(--blue); }
.news-item .t { font-weight: 500; line-height: 1.35; }
.news-item .why { font-size: .85rem; color: var(--ink-2); margin-top: 3px; padding-left: 10px; border-left: 2px solid var(--blue); }
.news-item .s { font-size: .78rem; color: var(--ink-3); margin-top: 4px; }
details.panel summary { cursor: pointer; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 4px; }
.chips:empty { display: none; }
.chip { font: inherit; font-size: .82rem; font-weight: 500; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); padding: 4px 11px; border-radius: 999px; cursor: pointer; }
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip.on { background: var(--blue-soft); border-color: transparent; color: var(--blue); font-weight: 600; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs button { font: inherit; font-weight: 500; background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 12px; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.tabs button.on { color: var(--blue); border-bottom-color: var(--blue); font-weight: 600; }

/* ---------- Chat ---------- */
.chat { display: flex; flex-direction: column; height: calc(100vh - 150px); min-height: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
@media (max-width: 900px) { .chat { height: calc(100vh - 190px); } }
.chat-log { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 82%; padding: 10px 14px; border-radius: 16px; white-space: pre-wrap; font-size: .93rem; line-height: 1.45; }
.bubble.me { align-self: flex-end; background: var(--blue); color: var(--on-primary); border-bottom-right-radius: 5px; }
.bubble.bot { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 5px; }
.bubble .when { display: block; font-size: .7rem; opacity: .65; margin-top: 4px; }
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); align-items: center; }
.chat-form input[type="text"] { flex: 1; }

/* ---------- Modal e toast ---------- */
.modal-backdrop { position: fixed; inset: 0; background: var(--backdrop); z-index: 100; display: grid; place-items: center; padding: 16px; animation: fade .15s ease-out; }
.modal { background: var(--surface); border-radius: var(--radius-lg); width: 100%; max-width: 560px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .45); }
.modal.wide { max-width: 820px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px 8px; }
.modal-body { padding: 8px 18px 18px; overflow-y: auto; display: grid; gap: 12px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.modal-foot .left { margin-right: auto; }
@media (max-width: 600px) {
  .modal-backdrop { place-items: end stretch; padding: 0; }
  .modal { max-height: 92vh; border-radius: var(--radius-lg) var(--radius-lg) 0 0; animation: sheet .2s ease-out; }
  .modal-foot { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
}
@keyframes fade { from { opacity: 0; } }
@keyframes sheet { from { transform: translateY(40px); opacity: .6; } }

#toast-root { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; }
@media (max-width: 900px) { #toast-root { bottom: calc(86px + env(safe-area-inset-bottom)); } }
.toast { background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-size: .9rem; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); animation: fade .2s; max-width: 90vw; }
.toast.error { background: var(--red); color: var(--on-primary); }

.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: var(--radius); min-height: 90px; }
@keyframes shimmer { to { background-position: -200% 0; } }

.sheet-menu { display: grid; gap: 4px; }
.sheet-menu a { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 500; }
.sheet-menu a:hover { background: var(--surface-2); }
.sheet-menu svg { width: 20px; height: 20px; color: var(--ink-2); }

.steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.copy-field { display: flex; gap: 6px; }
.copy-field input { font-size: .85rem; }
.pill-code { font-family: var(--font-display); font-size: 1.6rem; font-weight: 750; letter-spacing: .12em; color: var(--blue); }
