:root {
  --bg: #f6f2ea;
  --surface: #ffffff;
  --surface-2: #fbf9f5;
  --ink: #23291f;
  --ink-2: #454c40;
  --muted: #6f776a;
  --line: #e6dfd2;
  --line-2: #f0eae0;
  --brand: #1f6f5c;
  --brand-dark: #165448;
  --brand-soft: #e6f1ec;
  --accent: #d98e2b;
  --accent-soft: #fbf1de;
  --danger: #b3402f;
  --danger-soft: #fbeae6;
  --ok: #2f7d4f;
  --ok-soft: #e8f4ec;
  --shadow: 0 1px 2px rgba(35, 41, 31, 0.05), 0 8px 24px rgba(35, 41, 31, 0.06);
  --shadow-lg: 0 12px 48px rgba(35, 41, 31, 0.16);
  --r: 14px;
  --r-sm: 10px;
  --sidebar: 236px;
  --max: 1120px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-size-adjust: 100%;
}

body { min-height: 100dvh; }

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 0.7rem; }
a { color: var(--brand); }
button { font-family: inherit; font-size: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }

/* ---------- boot ---------- */
.app-loading { display: grid; place-items: center; min-height: 100dvh; }
.boot { text-align: center; color: var(--muted); }
.boot-logo { font-size: 3rem; animation: bob 1.4s infinite ease-in-out; }
.boot-text { margin-top: 0.5rem; font-size: 0.9rem; letter-spacing: 0.04em; }
@keyframes bob { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-6px) } }

/* ---------- struttura ---------- */
.app {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  min-height: 100dvh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  background: linear-gradient(175deg, #1f6f5c 0%, #175447 60%, #123f37 100%);
  color: #eaf3ef;
  display: flex;
  flex-direction: column;
  padding: 18px 14px 14px;
  gap: 6px;
  overflow-y: auto;
}

.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px;
  background: rgba(255,255,255,0.14);
  display: grid; place-items: center; font-size: 1.35rem;
  border: 1px solid rgba(255,255,255,0.16);
}
.brand-name { font-weight: 700; font-size: 0.98rem; line-height: 1.1; }
.brand-sub { font-size: 0.72rem; color: rgba(255,255,255,0.62); margin-top: 2px; letter-spacing: 0.02em; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  color: rgba(255,255,255,0.78); text-decoration: none;
  font-size: 0.92rem; font-weight: 500;
  border: 0; background: none; text-align: left; cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.nav-item .ico { width: 20px; text-align: center; font-size: 1rem; opacity: 0.9; }
.nav-item .lbl-short { display: none; }
.nav-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav-item.active { background: rgba(255,255,255,0.15); color: #fff; font-weight: 600; }
.nav-item .badge-count {
  margin-left: auto; background: var(--accent); color: #2a1c05;
  font-size: 0.7rem; font-weight: 700; padding: 1px 7px; border-radius: 99px;
}
.nav-sep { height: 1px; background: rgba(255,255,255,0.12); margin: 10px 8px; }

.sidebar-foot { margin-top: auto; padding: 10px 8px 0; border-top: 1px solid rgba(255,255,255,0.12); }
.who { display: flex; align-items: center; gap: 9px; padding: 6px 0; }
.who-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,0.16); display: grid; place-items: center;
  font-weight: 700; font-size: 0.8rem; color: #fff;
}
.who-name { font-size: 0.85rem; font-weight: 600; color: #fff; }
.who-role { font-size: 0.7rem; color: rgba(255,255,255,0.6); }
.link-btn {
  display: block; background: none; border: 0; color: rgba(255,255,255,0.65);
  font-size: 0.78rem; cursor: pointer; padding: 5px 0; text-align: left;
}
.link-btn + .link-btn { margin-top: 2px; }
.link-btn:hover { color: #fff; text-decoration: underline; }

.main { min-width: 0; padding: 26px 30px 60px; }
.container { max-width: var(--max); margin: 0 auto; }

.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.topbar > div:first-child { flex: 1; min-width: 0; }
.topbar h1 { flex: 1; }
.sync {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.75rem; color: var(--muted);
  background: var(--surface); border: 1px solid var(--line);
  padding: 5px 10px; border-radius: 99px; white-space: nowrap;
}
.sync .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.sync.stale .dot { background: var(--accent); }

.mobile-only { display: none; }

/* ---------- componenti ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow);
  padding: 18px 20px;
}
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.card-head h2, .card-head h3 { flex: 1; }
.card-sub { color: var(--muted); font-size: 0.85rem; margin-top: -8px; margin-bottom: 14px; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: 10px; border: 1px solid transparent;
  background: var(--brand); color: #fff; font-weight: 600; font-size: 0.92rem;
  cursor: pointer; transition: transform 0.05s, background 0.15s, box-shadow 0.15s;
  min-height: 42px; text-decoration: none;
}
.btn:hover { background: var(--brand-dark); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 20px; font-size: 1rem; min-height: 52px; border-radius: 12px; }
.btn-ghost { background: transparent; color: var(--ink-2); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-soft { background: var(--brand-soft); color: var(--brand-dark); }
.btn-soft:hover { background: #d9eae2; }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #94311f; }
.btn-danger-soft { background: var(--danger-soft); color: var(--danger); }
.btn-danger-soft:hover { background: #f7dcd5; }
.btn-accent { background: var(--accent); color: #2a1c05; }
.btn-accent:hover { background: #c47d1f; }
.btn-sm { padding: 6px 11px; min-height: 34px; font-size: 0.82rem; border-radius: 8px; }
.btn-icon { padding: 0; width: 38px; min-height: 38px; border-radius: 9px; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em;
  padding: 3px 8px; border-radius: 99px; white-space: nowrap;
  background: var(--line-2); color: var(--ink-2);
}
.badge-pending { background: var(--accent-soft); color: #8a5a10; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-fix { background: var(--danger-soft); color: var(--danger); }
.badge-cat { background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
.badge-in { background: #e8eefb; color: #2c4f96; }
.badge-transfer { background: #f0e9f7; color: #5b3f86; }

.amount { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.amount-neg { color: var(--danger); }
.amount-pos { color: var(--ok); }
.muted { color: var(--muted); }
.small { font-size: 0.82rem; }
.tiny { font-size: 0.74rem; }
.mono { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap { flex-wrap: wrap; }

/* ---------- stat cards ---------- */
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow); }
.stat-label { font-size: 0.76rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.stat-value { font-size: 1.55rem; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 4px; letter-spacing: -0.02em; }
.stat-foot { font-size: 0.78rem; color: var(--muted); margin-top: 4px; }
.stat.green { border-left: 4px solid var(--brand); }
.stat.amber { border-left: 4px solid var(--accent); }
.stat.red { border-left: 4px solid var(--danger); }

/* ---------- form ---------- */
.field { margin-bottom: 16px; }
.label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.label .req { color: var(--danger); }
.hint { font-size: 0.78rem; color: var(--muted); margin-top: 5px; }
.input, .select, .textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--surface); color: var(--ink);
  outline: none; transition: border 0.15s, box-shadow 0.15s;
  min-height: 44px;
}
.textarea { min-height: 72px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(31,111,92,0.12); }
.input.error, .select.error { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(179,64,47,0.1); }
.input-amount {
  font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums;
  padding: 10px 58px 10px 14px; min-height: 64px; letter-spacing: -0.02em;
}
.currency-wrap { position: relative; }
.currency-wrap .cur { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; }

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  padding: 7px 12px; border-radius: 99px; border: 1px solid var(--line);
  background: var(--surface); cursor: pointer; font-size: 0.84rem; color: var(--ink-2);
  font-weight: 500; min-height: 36px;
}
.chip:hover { border-color: var(--brand); color: var(--brand-dark); }
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }

.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 9px; }
.cat {
  display: flex; align-items: center; gap: 10px; text-align: left;
  padding: 11px 12px; border-radius: 11px; border: 1.5px solid var(--line);
  background: var(--surface); cursor: pointer; min-height: 54px;
  transition: border 0.12s, background 0.12s, transform 0.05s;
}
.cat:hover { border-color: #b9cdc4; background: var(--surface-2); }
.cat:active { transform: scale(0.99); }
.cat.active { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 2px rgba(31,111,92,0.1); }
.cat-ico { font-size: 1.25rem; width: 26px; text-align: center; flex: none; }
.cat-label { display: block; font-size: 0.86rem; font-weight: 600; line-height: 1.2; }
.cat-hint { display: block; font-size: 0.72rem; color: var(--muted); line-height: 1.25; margin-top: 2px; }

.seg { display: flex; gap: 6px; background: var(--line-2); padding: 4px; border-radius: 11px; }
.seg button {
  flex: 1; border: 0; background: transparent; padding: 9px 8px; border-radius: 8px;
  cursor: pointer; font-weight: 600; font-size: 0.82rem; color: var(--ink-2);
  display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px;
  white-space: nowrap;
}
.seg button.active { background: var(--surface); color: var(--brand-dark); box-shadow: 0 1px 3px rgba(0,0,0,0.1); }

.pay-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 9px; }
.pay {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 12px; border: 1.5px solid var(--line); border-radius: 11px;
  background: var(--surface); cursor: pointer; min-height: 66px; justify-content: center;
}
.pay.active { border-color: var(--brand); background: var(--brand-soft); }
.pay-ico { font-size: 1.2rem; }
.pay-label { font-weight: 600; font-size: 0.88rem; }
.pay-sub { font-size: 0.72rem; color: var(--muted); }

.form-sticky {
  position: sticky; bottom: 0; z-index: 5;
  margin: 8px -20px -18px; padding: 12px 20px 16px;
  background: linear-gradient(to top, rgba(255,255,255,1) 55%, rgba(255,255,255,0.92) 85%, rgba(255,255,255,0));
}

/* ---------- elenchi ---------- */
.section-title { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); font-weight: 700; margin: 0 0 10px; }

.mov {
  display: grid; grid-template-columns: 54px minmax(0,1fr) auto auto;
  gap: 12px; align-items: center; padding: 12px 14px;
  border-bottom: 1px solid var(--line-2); cursor: pointer;
}
.mov:hover { background: var(--surface-2); }
.mov:last-child { border-bottom: 0; }
.mov-date { font-size: 0.78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.mov-desc { font-weight: 600; font-size: 0.92rem; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; }
.mov-meta { font-size: 0.76rem; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 3px; }
.mov-amount { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mov-actions { display: flex; gap: 4px; }

.table-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
table.data { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
table.data th {
  text-align: left; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--muted); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.data td { padding: 9px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr.clickable:hover { background: var(--surface-2); cursor: pointer; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data tr.group td { background: var(--surface-2); font-weight: 700; }
table.data tr.classe td { background: var(--brand-soft); font-weight: 700; }
table.data tr.total td { border-top: 1.5px solid var(--line); font-weight: 700; }
table.data tr.liv-1 td.nm { padding-left: 0; }
table.data tr.liv-2 td.nm { padding-left: 18px; }
table.data tr.liv-3 td.nm { padding-left: 34px; }
table.data tr.liv-4 td.nm { padding-left: 50px; color: var(--ink-2); }

/* ---------- avvisi ---------- */
.alert {
  display: flex; gap: 12px; padding: 13px 15px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--surface); align-items: flex-start;
}
.alert + .alert { margin-top: 8px; }
.alert-ico { font-size: 1.1rem; line-height: 1.3; }
.alert-title { font-weight: 700; font-size: 0.9rem; }
.alert-text { font-size: 0.84rem; color: var(--ink-2); margin-top: 2px; }
.alert.error { background: var(--danger-soft); border-color: #f0cdc4; }
.alert.warn { background: var(--accent-soft); border-color: #f0dcb8; }
.alert.info { background: var(--brand-soft); border-color: #cfe4da; }

.empty { text-align: center; padding: 36px 20px; color: var(--muted); }
.empty-ico { font-size: 2.2rem; margin-bottom: 8px; opacity: 0.7; }

/* ---------- modale ---------- */
.modal-back {
  position: fixed; inset: 0; background: rgba(26,32,24,0.45);
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 100; padding: 0; animation: fade 0.15s;
}
@media (min-width: 640px) { .modal-back { align-items: center; padding: 24px; } }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
.modal {
  background: var(--surface); width: 100%; max-width: 560px;
  border-radius: 18px 18px 0 0; max-height: 92dvh; overflow: auto;
  box-shadow: var(--shadow-lg); animation: slide 0.2s ease-out;
}
@media (min-width: 640px) { .modal { border-radius: 18px; } }
@keyframes slide { from { transform: translateY(14px); opacity: 0.6 } to { transform: none; opacity: 1 } }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px 0; }
.modal-head h3 { flex: 1; }
.modal-body { padding: 16px 20px; }
.modal-foot { padding: 0 20px 20px; display: flex; gap: 9px; justify-content: flex-end; flex-wrap: wrap; }

/* ---------- toast ---------- */
.toast-root { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  background: #23291f; color: #fff; padding: 11px 18px; border-radius: 99px;
  font-size: 0.86rem; font-weight: 500; box-shadow: var(--shadow-lg);
  animation: toastIn 0.2s ease-out; max-width: 92vw;
}
.toast.ok { background: #235f45; }
.toast.err { background: #96321f; }
@keyframes toastIn { from { transform: translateY(10px); opacity: 0 } to { transform: none; opacity: 1 } }

/* ---------- login ---------- */
.login-wrap { min-height: 100dvh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art {
  background: linear-gradient(160deg, #1f6f5c 0%, #154b41 55%, #0f342e 100%);
  color: #eaf3ef; padding: 48px; display: flex; flex-direction: column; justify-content: center;
  position: relative; overflow: hidden;
}
.login-art .art-foot { position: absolute; left: 48px; bottom: 34px; }
.login-art .art-logo { margin-bottom: 26px; }
.login-art::after {
  content: "🐢"; position: absolute; font-size: 22rem; right: -60px; bottom: -110px; opacity: 0.07; transform: rotate(-12deg);
}
.login-art h1 { font-size: 2rem; line-height: 1.15; max-width: 420px; }
.login-art p { color: rgba(255,255,255,0.72); max-width: 380px; margin-top: 14px; }
.login-form-wrap { display: grid; place-items: center; padding: 32px; }
.login-form { width: 100%; max-width: 360px; }
.login-form .brand-mark { background: var(--brand-soft); color: var(--brand-dark); border-color: transparent; }

/* ---------- altro ---------- */
.bars { display: grid; gap: 7px; }
.bar-row { display: grid; grid-template-columns: 110px 1fr 88px; gap: 10px; align-items: center; font-size: 0.82rem; }
.bar-track { height: 9px; background: var(--line-2); border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, #2b8a72, #1f6f5c); border-radius: 99px; }
.bar-val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

.month-chart { display: flex; align-items: flex-end; gap: 6px; height: 110px; padding-top: 10px; }
.month-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.month-bar { width: 100%; max-width: 34px; background: var(--brand); border-radius: 4px 4px 0 0; min-height: 2px; transition: height 0.4s; }
.month-bar.in { background: #7fb9a6; }
.month-lbl { font-size: 0.68rem; color: var(--muted); }

.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 14px; font-size: 0.88rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }

.photo-thumb { width: 100%; max-height: 220px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }

.history-item { border-left: 2px solid var(--line); padding: 0 0 12px 14px; position: relative; font-size: 0.82rem; }
.history-item::before { content: ""; position: absolute; left: -5px; top: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.history-item:first-child::before { background: var(--brand); }

@media print {
  .sidebar, .sync, .btn, .btn-group, .toast-root, .nav, .modal-back, .no-print { display: none !important; }
  .app { display: block; }
  .main { padding: 0; }
  body { background: #fff; }
  .card { box-shadow: none; border: 0; padding: 0; }
  .card + .card { margin-top: 18px; }
  .stat { border: 1px solid #ddd; }
  table.data { font-size: 9.5pt; }
  table.data th { color: #333; }
  .topbar { margin-bottom: 10px; }
  a { text-decoration: none; color: inherit; }
  .print-only { display: block !important; }
  @page { margin: 14mm 12mm; }
}

.print-only { display: none; }

@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: sticky; top: 0; height: auto; z-index: 50;
    flex-direction: row; align-items: center; gap: 4px;
    padding: 8px 10px; overflow-x: auto; overflow-y: hidden;
    max-width: 100vw;
  }
  .brand { padding: 0 6px 0 0; flex: none; }
  .brand-sub { display: none; }
  .brand-mark { width: 34px; height: 34px; font-size: 1.1rem; }
  .brand-name { font-size: 0.82rem; max-width: 78px; }
  .nav { flex-direction: row; gap: 2px; }
  .nav-item { padding: 8px 10px; font-size: 0.8rem; white-space: nowrap; }
  .nav-item .ico { font-size: 0.95rem; }
  .nav-item .lbl-full { display: none; }
  .nav-item .lbl-short { display: inline; }
  .nav-sep, .sidebar-foot { display: none; }
  .main { padding: 18px 14px 90px; }
  .mobile-foot {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: var(--surface);
    border-top: 1px solid var(--line); padding: 8px 12px; gap: 10px; z-index: 60;
    align-items: center; justify-content: space-between;
  }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .mov { grid-template-columns: 48px minmax(0,1fr) auto; }
  .mov-actions { display: none; }
  .card { padding: 15px 15px; }
  .form-sticky { margin: 8px -15px -15px; padding: 12px 15px 14px; }
  .table-wrap { margin: 0 -15px; padding: 0 15px; }
  h1 { font-size: 1.28rem; }
  .topbar { gap: 8px; }
  .sync { display: none; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dt { margin-top: 8px; }
}
