/* Kharcha — styles */
:root {
  color-scheme: light;
  --bg: #f4f6f4;
  --surface: #ffffff;
  --surface-2: #eef1ef;
  --ink: #0f1a16;
  --ink-2: #4b5752;
  --muted: #7a8580;
  --line: #e1e6e3;
  --line-2: #cfd6d2;
  --brand: #0e6b4f;
  --brand-strong: #0a553f;
  --brand-soft: #e2f0ea;
  --brand-ink: #ffffff;
  --accent: #f2a93b;
  --good: #0ca30c;
  --good-text: #006300;
  --warn: #fab219;
  --bad: #d03b3b;
  --bad-text: #b42f2f;
  --bad-soft: #fbe9e9;
  --shadow: 0 1px 2px rgba(15, 26, 22, .06), 0 4px 16px rgba(15, 26, 22, .05);
  --radius: 16px;
  --radius-sm: 10px;
  --tabbar-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0c0f0e;
    --surface: #161a19;
    --surface-2: #1f2422;
    --ink: #f1f4f2;
    --ink-2: #c3cac6;
    --muted: #8b9590;
    --line: #262c2a;
    --line-2: #343b38;
    --brand: #2fa37d;
    --brand-strong: #3bb88e;
    --brand-soft: #173a2f;
    --brand-ink: #06140f;
    --good-text: #3ecf6a;
    --bad-text: #ff8a8a;
    --bad-soft: #3a1c1c;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c0f0e; --surface: #161a19; --surface-2: #1f2422; --ink: #f1f4f2; --ink-2: #c3cac6;
  --muted: #8b9590; --line: #262c2a; --line-2: #343b38; --brand: #2fa37d; --brand-strong: #3bb88e;
  --brand-soft: #173a2f; --brand-ink: #06140f; --good-text: #3ecf6a; --bad-text: #ff8a8a; --bad-soft: #3a1c1c; --shadow: none;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.45 var(--font);
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: contain;
  min-height: 100dvh;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
h2 { font-size: 16px; margin: 0; font-weight: 650; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + var(--safe-t)) 16px 10px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 19px; letter-spacing: -.01em; }
.brand img { border-radius: 8px; }
.btn-install {
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; border-radius: 999px; padding: 8px 14px;
  background: var(--brand); color: var(--brand-ink); font-weight: 650; font-size: 14px;
}
.btn-install svg { width: 18px; height: 18px; }

main {
  max-width: 560px; margin: 0 auto;
  padding: 4px 16px calc(var(--tabbar-h) + var(--safe-b) + 24px);
}
.view { display: flex; flex-direction: column; gap: 14px; animation: fade .18s ease; }
@keyframes fade { from { opacity: .4; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- cards & basics ---------- */
.card {
  background: var(--surface); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow); border: 1px solid var(--line);
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-head__value { font-weight: 700; font-variant-numeric: tabular-nums; }
.card-head__sub { color: var(--muted); font-size: 13px; }
.hint { color: var(--muted); font-size: 13px; margin: 8px 0 0; }
.hint.center { text-align: center; }
.stack { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 12px; padding: 11px 16px;
  font-weight: 650; background: var(--surface-2); color: var(--ink);
  transition: transform .08s ease, background .15s ease;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:active { background: var(--brand-strong); }
.btn-ghost { background: transparent; border-color: var(--line-2); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-danger-ghost { background: transparent; border-color: color-mix(in srgb, var(--bad) 45%, transparent); color: var(--bad-text); }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 16px; font-size: 16px; border-radius: 14px; }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 999px; white-space: nowrap; flex: none; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border: 0; border-radius: 999px; background: transparent; color: var(--ink-2);
}
.icon-btn:active { background: var(--surface-2); }
.file-btn { cursor: pointer; }

.text-input, select, input[type="date"] {
  width: 100%; border: 1px solid var(--line-2); border-radius: 12px;
  background: var(--surface); padding: 11px 12px; min-height: 44px;
  outline: none;
}
.text-input:focus, select:focus, input[type="date"]:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }

.field { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.field.narrow { flex: 0 0 76px; }
.field-row { display: flex; gap: 12px; }
.field-label { font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 14px 0 8px; display: flex; gap: 8px; align-items: baseline; }
.field .field-label { margin: 0 0 2px; }
.add-card .field-row { margin-top: 16px; }
.field-error { color: var(--bad-text); font-size: 13px; margin: 6px 0 0; }
.field-error.inline { margin: 0; font-weight: 600; }
.emoji-input { text-align: center; font-size: 22px; padding: 6px; }

/* ---------- install card ---------- */
.install-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 12px 12px 14px; border-radius: var(--radius);
  background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent);
}
.install-card__icon img { border-radius: 10px; display: block; }
.install-card__body { flex: 1; display: flex; flex-direction: column; font-size: 13px; color: var(--ink-2); min-width: 0; }
.install-card__body strong { color: var(--ink); font-size: 14px; }
.install-card__actions { display: flex; align-items: center; gap: 2px; }
.install-status { display: flex; flex-direction: column; gap: 10px; }
.install-status p { margin: 0; color: var(--ink-2); }
.install-status .ok { color: var(--good-text); font-weight: 650; }
.install-steps ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; }
.install-steps li { color: var(--ink-2); }
.install-steps b { color: var(--ink); }
.kbd { display: inline-block; padding: 0 6px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--surface-2); font-weight: 700; }

/* ---------- add form ---------- */
.add-card { padding-top: 18px; }
.amount-field {
  display: flex; align-items: baseline; gap: 8px;
  border-bottom: 2px solid var(--line-2); padding: 4px 2px 8px;
}
.amount-field:focus-within { border-color: var(--brand); }
.amount-field__cur { font-size: 22px; font-weight: 650; color: var(--muted); }
.amount-field input {
  flex: 1; min-width: 0; border: 0; outline: none; background: transparent;
  font-size: 40px; font-weight: 750; letter-spacing: -.02em; padding: 0;
}
.amount-field.small input { font-size: 30px; }

.cat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.cat-grid.small { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cat-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 70px; padding: 8px 4px; border-radius: 14px;
  border: 1.5px solid var(--line); background: var(--surface);
  font-size: 11.5px; line-height: 1.2; font-weight: 600; color: var(--ink-2); text-align: center;
}
.cat-btn .emo {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 999px; font-size: 18px;
  background: color-mix(in srgb, var(--c) 16%, transparent);
}
.cat-btn[aria-checked="true"] { border-color: var(--c); background: color-mix(in srgb, var(--c) 10%, var(--surface)); color: var(--ink); }
.cat-btn[aria-checked="true"] .emo { background: var(--c); }
.cat-grid.error .cat-btn { border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-row.compact { flex-wrap: nowrap; }
.chip {
  border: 1.5px solid var(--line-2); background: var(--surface); border-radius: 999px;
  padding: 7px 13px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap;
}
.chip[aria-checked="true"], .chip.on { border-color: var(--brand); background: var(--brand-soft); color: var(--ink); }
.date-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.date-row input { flex: 1 1 150px; min-width: 150px; }
#addNote { margin: 14px 0 16px; }

/* ---------- transaction lists ---------- */
.tx-list { display: flex; flex-direction: column; }
.tx {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 10px 2px; border: 0; background: transparent; text-align: left;
  border-top: 1px solid var(--line);
}
.tx:first-child { border-top: 0; }
.tx__emo { flex: 0 0 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 18px;
  background: color-mix(in srgb, var(--c) 16%, transparent); }
.tx__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tx__title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx__sub { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx__amt { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.empty-line { color: var(--muted); font-size: 14px; padding: 6px 0 2px; margin: 0; }

.filters { display: flex; flex-direction: column; gap: 10px; padding: 12px; }
.search { position: relative; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }
.search input { width: 100%; border: 1px solid var(--line-2); border-radius: 12px; padding: 11px 12px 11px 38px; background: var(--surface-2); outline: none; }
.search input:focus { border-color: var(--brand); }
.filter-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.list-summary { display: flex; justify-content: space-between; color: var(--ink-2); font-size: 13.5px; padding: 0 4px; }
.list-summary strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.history { display: flex; flex-direction: column; gap: 12px; }
.day-group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 14px 4px; box-shadow: var(--shadow); }
.day-head { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); font-weight: 600; padding: 6px 0 2px; }
.day-head span:last-child { font-variant-numeric: tabular-nums; color: var(--ink-2); }

/* ---------- dashboard ---------- */
.now-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.now-tile { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 9px; display: flex; flex-direction: column; box-shadow: var(--shadow); min-width: 0; }
.now-tile span { font-size: 12px; color: var(--muted); font-weight: 600; }
.now-tile strong small { font-size: .72em; font-weight: 650; color: var(--muted); margin-right: 3px; }
.now-tile strong { font-size: clamp(13px, 3.8vw, 17px); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.period-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.segmented { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; border: 1px solid var(--line); }
.segmented button { border: 0; background: transparent; padding: 7px 16px; border-radius: 999px; font-weight: 650; font-size: 14px; color: var(--ink-2); }
.segmented button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.stepper { display: flex; align-items: center; gap: 2px; }
.stepper__label { font-weight: 650; font-size: 14px; min-width: 118px; text-align: center; }
.stepper .icon-btn:disabled { opacity: .3; }

.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow); min-width: 0; }
.kpi--hero { grid-column: 1 / -1; }
.kpi__label { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi__value { font-size: 22px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi--hero .kpi__value { font-size: 40px; letter-spacing: -.025em; line-height: 1.15; }
.kpi__sub { font-size: 12.5px; color: var(--muted); }
.delta { font-size: 13.5px; font-weight: 650; color: var(--ink-2); }
.delta.up { color: var(--bad-text); }
.delta.down { color: var(--good-text); }

.donut-wrap { position: relative; height: 210px; margin: 0 auto 8px; max-width: 260px; }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.donut-center span { font-size: 12px; color: var(--muted); font-weight: 600; }
.donut-center strong { font-size: 20px; font-weight: 750; }
.cat-legend { display: flex; flex-direction: column; }
.leg { display: grid; grid-template-columns: 12px 1fr auto; column-gap: 10px; row-gap: 6px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.leg:first-child { border-top: 0; }
.leg__sw { width: 12px; height: 12px; border-radius: 4px; background: var(--c); }
.leg__name { font-weight: 600; min-width: 0; overflow-wrap: anywhere; line-height: 1.3; }
.leg__name small { color: var(--muted); font-weight: 500; margin-left: 4px; }
.leg__val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 650; white-space: nowrap; }
.leg__val small { color: var(--muted); font-weight: 500; margin-left: 6px; }
.leg__budget { grid-column: 2 / -1; display: flex; flex-direction: column; gap: 4px; }
.meter { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 999px; background: var(--brand); }
.meter.warn > i { background: var(--warn); }
.meter.over > i { background: var(--bad); }
.meter-text { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; gap: 4px 10px; flex-wrap: wrap; }
.meter-text .over { color: var(--bad-text); font-weight: 650; }
.meter-text .warn { color: var(--ink-2); font-weight: 650; }

.bar-wrap { position: relative; height: 200px; }
.hbars { display: flex; flex-direction: column; gap: 10px; }
.hbar { display: grid; grid-template-columns: 92px 1fr auto; gap: 10px; align-items: center; font-size: 13.5px; }
.hbar__name { font-weight: 600; color: var(--ink-2); }
.hbar__track { height: 10px; border-radius: 0 4px 4px 0; background: transparent; position: relative; }
.hbar__track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 0 4px 4px 0; background: var(--brand); min-width: 2px; }
.hbar__val { font-variant-numeric: tabular-nums; font-weight: 650; text-align: right; }

.empty { text-align: center; padding: 28px 16px; }
.empty__art { font-size: 36px; }
.empty p { color: var(--ink-2); margin: 8px 0 14px; }

/* ---------- reports ---------- */
.rep-preview { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rep-stat { display: flex; flex-direction: column; min-width: 0; }
.rep-stat span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.rep-stat strong { font-size: 17px; line-height: 1.3; overflow-wrap: anywhere; }
.rep-stat.wide { grid-column: 1 / -1; }
.rep-actions { display: flex; flex-direction: column; gap: 10px; }
.rep-btn {
  display: flex; align-items: center; gap: 14px; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; box-shadow: var(--shadow);
}
.rep-btn:active { transform: scale(.99); }
.rep-btn:disabled { opacity: .5; }
.rep-btn__icon { flex: 0 0 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #fff; letter-spacing: .02em; }
.rep-pdf { background: #c8372d; }
.rep-xlsx { background: #1d6f42; }
.rep-pptx { background: #c4502a; }
.rep-btn__text { display: flex; flex-direction: column; min-width: 0; }
.rep-btn__text small { color: var(--muted); font-size: 12.5px; }
.rep-btn.busy .rep-btn__icon { animation: pulse 1s infinite ease-in-out; }
@keyframes pulse { 50% { opacity: .45; } }
.rep-results { display: flex; flex-direction: column; gap: 10px; }
.rep-file { display: flex; align-items: center; gap: 10px; background: var(--brand-soft); border-radius: 14px; padding: 10px 12px; }
.rep-file__name { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rep-file .btn { padding: 8px 12px; font-size: 13.5px; }

/* ---------- settings ---------- */
.set-list { display: flex; flex-direction: column; }
.set-row { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; width: 100%; }
.set-row:first-child { border-top: 0; }
.set-row__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.set-row__main small { color: var(--muted); font-size: 12.5px; }
.set-row svg { width: 18px; height: 18px; color: var(--muted); }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { width: 36px; height: 36px; border-radius: 999px; border: 3px solid var(--surface); background: var(--c); box-shadow: 0 0 0 1.5px var(--line-2); }
.swatch[aria-checked="true"] { box-shadow: 0 0 0 2.5px var(--ink); }

/* ---------- sheets / dialogs ---------- */
dialog.sheet {
  width: 100%; max-width: 560px; margin: auto auto 0; border: 0; padding: 18px 16px calc(18px + var(--safe-b));
  border-radius: 22px 22px 0 0; background: var(--surface); color: var(--ink);
  max-height: 92dvh; overflow-y: auto;
}
dialog.sheet[open] { animation: up .2s ease; }
@keyframes up { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }
dialog::backdrop { background: rgba(0, 0, 0, .45); }
.sheet__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.sheet__actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.sheet__actions .btn-primary { flex: 1; }
#editForm .text-input { margin-top: 0; }
#editNote { margin-top: 14px; }
#confirmDialog h2 { margin-bottom: 4px; }

/* ---------- tab bar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tabbar-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.tabbar button {
  border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted); font-size: 11px; font-weight: 600;
}
.tabbar button[aria-current="page"] { color: var(--brand); }
.tab-add__btn {
  display: grid; place-items: center; width: 46px; height: 46px; margin-top: -18px;
  border-radius: 16px; background: var(--brand); color: var(--brand-ink);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 40%, transparent);
}
.tab-add__btn svg { width: 26px; height: 26px; stroke-width: 2.4; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--tabbar-h) + var(--safe-b) + 14px); z-index: 50;
  display: flex; align-items: center; gap: 14px;
  background: #16201c; color: #fff; padding: 11px 14px 11px 16px; border-radius: 14px;
  font-size: 14px; max-width: calc(100% - 32px); box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
.toast button { border: 0; background: transparent; color: #7fe0b8; font-weight: 750; padding: 2px 4px; }

@media (min-width: 420px) {
  .cat-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 360px) {
  .kpi--hero .kpi__value { font-size: 34px; }
  .now-tile strong { font-size: 13px; }
  .stepper__label { min-width: 100px; font-size: 13px; }
}
.card-head.col { flex-direction: column; align-items: flex-start; gap: 2px; }

/* ---------- cloud sync ---------- */
.topbar__right { display: flex; align-items: center; gap: 6px; }
.cloud-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); }
.cloud-btn svg { width: 24px; height: 24px; }
.cloud-btn.ok { color: var(--brand); }
.cloud-btn.busy svg { animation: pulse 1.2s infinite ease-in-out; color: var(--brand); }
.cloud-btn.err { color: var(--bad-text); }
.muted-p { color: var(--ink-2); margin: 0 0 12px; font-size: 14px; }
.link { display: inline-block; margin-top: 10px; color: var(--brand); font-weight: 600; font-size: 14px; }
.link-btn { border: 0; background: transparent; color: var(--brand); font-weight: 600; font-size: 13.5px; padding: 6px 0; }
.link-btn.muted { color: var(--muted); font-weight: 500; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-row > .btn { flex: 1; }
.btn-row.between { justify-content: space-between; }
.cloud-err { background: var(--bad-soft); color: var(--bad-text); border-radius: 10px; padding: 9px 12px; font-size: 13.5px; margin: 0 0 12px; }
.cloud-msg { font-size: 13.5px; margin: 0; color: var(--good-text); }
.cloud-msg.is-err { color: var(--bad-text); }
.cloud-status { display: flex; gap: 12px; align-items: flex-start; background: var(--surface-2); border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; }
.cloud-status > div { display: flex; flex-direction: column; min-width: 0; }
.cloud-status small { color: var(--muted); font-size: 12.5px; }
.cloud-dot { flex: 0 0 10px; height: 10px; border-radius: 999px; margin-top: 6px; background: var(--muted); }
.cloud-status.ok .cloud-dot { background: var(--good); }
.cloud-status.busy .cloud-dot { background: var(--warn); animation: pulse 1s infinite; }
.cloud-status.err .cloud-dot { background: var(--bad); }
.cfg-input { font: 12.5px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; min-height: 150px; resize: vertical; margin-top: 8px; }
