/* ============================================================
   Zevaa Price List — admin theme
   ============================================================ */
:root {
  --rose: #C9486A;
  --rose-ink: #A8355A;
  --rose-50: #FCF2F5;
  --rose-100: #F7E0E7;
  --rose-200: #EFC3D0;
  --ink: #1F1A1D;
  --ink-2: #5D5358;
  --ink-3: #998D93;
  --line: #ECE4E7;
  --line-2: #F3EEF0;
  --bg: #F8F5F4;
  --surface: #FFFFFF;
  --ok: #23845B;  --ok-50: #EAF6F0;
  --warn: #9A6214; --warn-50: #FDF4E4;
  --bad: #C2353B; --bad-50: #FDEEEE;
  --info: #3E5C9A; --info-50: #EEF2FA;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(31,26,29,.04), 0 1px 1px rgba(31,26,29,.03);
  --shadow: 0 1px 2px rgba(31,26,29,.04), 0 8px 24px rgba(31,26,29,.05);
  --shadow-lg: 0 24px 64px rgba(31,26,29,.18);
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;
  --sidebar-w: 244px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--sans); font-size: 14px; line-height: 1.5;
  color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased;
}
a { color: var(--rose-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
code { background: var(--line-2); padding: 1px 6px; border-radius: 5px; font-size: 12.5px; }

/* ---------- Shell ---------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); background: var(--surface);
  border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 60;
  transition: transform .2s ease;
}
.sidebar-brand { padding: 26px 24px 20px; border-bottom: 1px solid var(--line-2); }
.sidebar-brand img { max-height: 34px; max-width: 150px; display: block; }
.sidebar-brand .brand-fallback { font-family: var(--serif); font-size: 28px; font-weight: 600; color: var(--rose); }
.sidebar-brand .brand-sub { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin-top: 8px; }
.side-nav { padding: 14px 12px; display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.side-label { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); padding: 14px 12px 6px; }
.side-link {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px;
  color: var(--ink-2); font-weight: 500; font-size: 13.5px; position: relative; text-decoration: none !important;
  transition: background .15s, color .15s;
}
.side-link svg { width: 18px; height: 18px; flex-shrink: 0; opacity: .8; }
.side-link:hover { background: var(--line-2); color: var(--ink); }
.side-link.active { background: var(--rose-50); color: var(--rose-ink); }
.side-link.active svg { opacity: 1; }
.side-link .count {
  margin-left: auto; background: var(--rose); color: #fff; font-size: 10.5px; font-weight: 700;
  border-radius: 999px; padding: 1px 7px; line-height: 17px;
}
.side-foot { padding: 12px; border-top: 1px solid var(--line-2); }
.me-chip { display: flex; align-items: center; gap: 10px; padding: 6px 12px 10px; }
.me-av { width: 34px; height: 34px; border-radius: 50%; background: var(--rose-50); color: var(--rose-ink); display: grid; place-items: center; font-weight: 700; font-size: 12.5px; border: 1px solid var(--rose-100); flex-shrink: 0; }
.me-chip b { display: block; font-size: 13px; line-height: 1.2; }
.me-chip small { color: var(--ink-3); font-size: 11.5px; }

.mobile-bar { display: none; }
.main { margin-left: var(--sidebar-w); min-height: 100vh; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 34px 36px 60px; }
.scrim { display: none; }

@media (max-width: 960px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(31,26,29,.35); z-index: 55; }
  .main { margin-left: 0; }
  .mobile-bar {
    display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 50;
    background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); padding: 10px 16px;
  }
  .mobile-bar img { max-height: 24px; }
  .mobile-bar button { background: none; border: 1px solid var(--line); border-radius: 9px; width: 38px; height: 38px; display: grid; place-items: center; cursor: pointer; color: var(--ink); }
  .wrap { padding: 22px 16px 60px; }
}

/* ---------- Page header ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.eyebrow { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--rose-ink); font-weight: 600; margin-bottom: 6px; }
.page-title { font-family: var(--serif); font-weight: 600; font-size: 38px; line-height: 1.05; margin: 0; letter-spacing: -.01em; }
.page-sub { color: var(--ink-2); font-size: 13.5px; margin: 8px 0 0; max-width: 680px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.card + .card { margin-top: 16px; }
.card-title { font-size: 15px; font-weight: 600; margin: 0 0 4px; }
.card-sub { font-size: 12.5px; color: var(--ink-3); margin: 0 0 16px; }
.card.flush { padding: 0; overflow: hidden; }
.section-gap { margin-top: 18px; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
@media (max-width: 1100px) { .stats { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 520px) { .stats { grid-template-columns: 1fr; } }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-sm); }
.stat-label { font-size: 11.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .1em; font-weight: 600; }
.stat-value { font-family: var(--serif); font-size: 40px; font-weight: 600; line-height: 1.1; margin-top: 6px; }
.stat-note { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.stat-note.bad { color: var(--bad); }
.meter { height: 6px; background: var(--line-2); border-radius: 99px; overflow: hidden; margin-top: 10px; }
.meter > span { display: block; height: 100%; background: var(--rose); border-radius: 99px; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label, label.field-label { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.field-hint { font-size: 11.5px; color: var(--ink-3); }
.input, .text-input, select.input, textarea.input {
  width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  font: inherit; font-size: 13.5px; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
textarea.input { resize: vertical; min-height: 70px; }
.input:focus, .text-input:focus { outline: none; border-color: var(--rose); box-shadow: 0 0 0 3px var(--rose-100); }
select.input { appearance: none; padding-right: 32px; background: var(--surface) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="%235D5358" stroke-width="2"><path d="M6 9l6 6 6-6"/></svg>') no-repeat right 11px center; cursor: pointer; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
.span-all { grid-column: 1 / -1; }
@media (max-width: 760px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.search { position: relative; flex: 1; min-width: 220px; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; width: 16px; height: 16px; }
.search input { padding-left: 36px; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar > select.input { width: auto; min-width: 150px; }

.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; font-size: 13px; color: var(--ink-2); }
.switch input { display: none; }
.switch .track { width: 34px; height: 20px; border-radius: 99px; background: var(--line); position: relative; transition: background .15s; flex-shrink: 0; }
.switch .track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: left .15s; }
.switch input:checked + .track { background: var(--rose); }
.switch input:checked + .track::after { left: 16px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 16px; border-radius: 10px;
  font: inherit; font-size: 13px; font-weight: 600; border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .05s; text-decoration: none !important;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #3A3236; }
.btn-rose { background: var(--rose); color: #fff; box-shadow: 0 4px 14px rgba(201,72,106,.25); }
.btn-rose:hover { background: var(--rose-ink); }
.btn-ghost, .btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover, .btn-secondary:hover { border-color: var(--ink-3); }
.btn-danger { background: var(--surface); color: var(--bad); border-color: #F1C9CB; }
.btn-danger:hover { background: var(--bad-50); }
.btn-sm { padding: 6px 11px; font-size: 12px; border-radius: 8px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-link { background: none; border: none; color: var(--rose-ink); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 4px 6px; }
.btn-link:hover { text-decoration: underline; }
.btn-link.danger { color: var(--bad); }
.icon-btn { width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: 8px; border: 1px solid transparent; background: none; cursor: pointer; color: var(--ink-2); }
.icon-btn:hover { background: var(--line-2); color: var(--ink); }
.icon-btn.danger:hover { color: var(--bad); background: var(--bad-50); }
.icon-btn svg { width: 16px; height: 16px; }

/* ---------- Badges / chips ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; background: var(--line-2); color: var(--ink-2); }
.badge-rose { background: var(--rose-50); color: var(--rose-ink); }
.badge-ok { background: var(--ok-50); color: var(--ok); }
.badge-warn { background: var(--warn-50); color: var(--warn); }
.badge-bad { background: var(--bad-50); color: var(--bad); }
.badge-info { background: var(--info-50); color: var(--info); }
.badge-dark { background: var(--ink); color: #fff; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }

/* ---------- Tables ---------- */
.table-wrap { overflow: auto; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.tbl th {
  position: sticky; top: 0; z-index: 2; background: #FBF9F9; text-align: left; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); padding: 11px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tbody tr:hover td { background: #FCFAFA; }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl .center { text-align: center; }
.tbl .muted, .muted { color: var(--ink-3); }
.tbl tr.is-off td { color: var(--ink-3); }
.tbl tr.is-off td .item-name { text-decoration: line-through; text-decoration-color: var(--ink-3); }
td.item-cell { min-width: 260px; }
.item-name { font-weight: 600; color: var(--ink); line-height: 1.3; }
.item-sub { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.empty { text-align: center; padding: 48px 20px; color: var(--ink-3); font-size: 13.5px; }

.thumb { width: 40px; height: 40px; border-radius: 9px; object-fit: cover; border: 1px solid var(--line); background: var(--line-2); display: block; cursor: zoom-in; }
.thumb.mono { display: grid; place-items: center; font-family: var(--serif); font-size: 18px; font-weight: 600; color: var(--rose-ink); background: var(--rose-50); border-color: var(--rose-100); cursor: default; }

/* inline money input */
.cost-input {
  width: 108px; text-align: right; padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; font: inherit;
  font-size: 13px; font-variant-numeric: tabular-nums; background: #fff; transition: border-color .15s, box-shadow .15s, background .3s;
}
.cost-input:focus { outline: none; border-color: var(--rose); box-shadow: 0 0 0 3px var(--rose-100); }
.cost-input.empty-cost { background: var(--warn-50); border-color: #F0DDB8; }
.cost-input.saved { background: var(--ok-50); border-color: #BDE3CF; }
.cost-input.err { background: var(--bad-50); border-color: #F1C9CB; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tab { padding: 10px 14px; border: none; background: none; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink-3); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); border-bottom-color: var(--rose); }
.tab .badge { margin-left: 6px; }

/* ---------- Alerts / notices ---------- */
.alert { padding: 11px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 16px; border: 1px solid transparent; }
.alert-success { background: var(--ok-50); color: var(--ok); border-color: #CBE9D9; }
.alert-danger { background: var(--bad-50); color: var(--bad); border-color: #F4D2D3; }
.alert-warning { background: var(--warn-50); color: var(--warn); border-color: #F2E0BE; }
.alert-info { background: var(--info-50); color: var(--info); border-color: #D6DEF0; }

/* ---------- Modal ---------- */
.modal { display: none; position: fixed; inset: 0; z-index: 200; background: rgba(31,26,29,.42); backdrop-filter: blur(3px); align-items: center; justify-content: center; padding: 20px; }
.modal.open { display: flex; }
.modal-box { background: var(--surface); border-radius: 18px; width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; box-shadow: var(--shadow-lg); animation: pop .16s ease; }
.modal-box.wide { max-width: 980px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 22px 24px 0; }
.modal-title { font-family: var(--serif); font-size: 26px; font-weight: 600; line-height: 1.15; margin: 0; }
.modal-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }
.modal-body { padding: 18px 24px 24px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 0 24px 22px; }
@keyframes pop { from { transform: translateY(6px) scale(.985); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Toast ---------- */
#toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 12px; font-size: 13px; font-weight: 500; opacity: 0; pointer-events: none; transition: all .2s; z-index: 400; box-shadow: var(--shadow-lg); max-width: calc(100vw - 32px); }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.bad { background: var(--bad); }

/* ---------- Lightbox ---------- */
.lightbox { display: none; position: fixed; inset: 0; background: rgba(31,26,29,.82); z-index: 300; align-items: center; justify-content: center; padding: 30px; cursor: zoom-out; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 88vh; border-radius: 14px; box-shadow: var(--shadow-lg); background: #fff; }

/* ---------- Misc ---------- */
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spacer { flex: 1; }
.mt-1 { margin-top: 6px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 20px; }
.mb-2 { margin-bottom: 12px; } .mb-3 { margin-bottom: 20px; }
.text-sm { font-size: 12.5px; } .text-xs { font-size: 11.5px; }
.text-right { text-align: right; }
.nowrap { white-space: nowrap; }
.list-plain { list-style: none; margin: 0; padding: 0; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 13px; }
.kv dt { color: var(--ink-3); } .kv dd { margin: 0; }
.up { color: var(--bad); } .down { color: var(--ok); }
hr.sep { border: none; border-top: 1px solid var(--line-2); margin: 18px 0; }

@media print { .no-print, .sidebar, .mobile-bar { display: none !important; } .main { margin: 0; } }

/* ============================================================
   MOBILE LAYER (phones & small tablets)
   ============================================================ */
.tabbar, .m-only, .drawer-close { display: none; }
.sidebar-brand { position: relative; }

@media (max-width: 960px) {
  /* top bar: logo + messages; navigation moves to the bottom tab bar */
  .mobile-bar { justify-content: space-between; padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top)); }
  .mobile-bar .mb-right { display: flex; gap: 8px; align-items: center; }
  .mobile-bar .mb-icon { position: relative; width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #fff; }
  .mobile-bar .mb-icon svg { width: 18px; height: 18px; }
  .mobile-bar .mb-icon .count { position: absolute; top: -5px; right: -5px; background: var(--rose); color: #fff; font-size: 10px; font-weight: 700; border-radius: 999px; padding: 0 5px; line-height: 16px; min-width: 16px; text-align: center; }

  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    background: rgba(255,255,255,.96); backdrop-filter: blur(12px); border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a, .tabbar button {
    display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 5px 2px; border: none; background: none;
    font: inherit; font-size: 10.5px; font-weight: 600; color: var(--ink-3); text-decoration: none !important; cursor: pointer; position: relative;
  }
  .tabbar svg { width: 22px; height: 22px; }
  .tabbar .on { color: var(--rose-ink); }
  .tabbar .on::before { content: ''; position: absolute; top: -7px; width: 26px; height: 3px; border-radius: 0 0 3px 3px; background: var(--rose); }
  .tabbar .count { position: absolute; top: 0; left: 55%; background: var(--rose); color: #fff; font-size: 9.5px; border-radius: 999px; padding: 0 5px; line-height: 15px; }
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  #toast { bottom: calc(80px + env(safe-area-inset-bottom)); }
  .side-foot { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
}

@media (max-width: 760px) {
  body { font-size: 14px; }
  .m-only { display: initial; }
  .d-only { display: none !important; }
  .wrap { padding: 18px 14px 40px; }

  /* headings & header actions */
  .page-head { margin-bottom: 18px; gap: 12px; }
  .page-title { font-size: 30px; }
  .page-sub { font-size: 13px; }
  .eyebrow { font-size: 10.5px; }
  .head-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .head-actions > .btn, .head-actions > form, .head-actions > a { width: 100%; justify-content: center; }
  .head-actions > .btn-primary, .head-actions > .btn-rose { grid-column: 1 / -1; order: -1; }
  .head-actions > .btn:only-child, .head-actions > form:only-child { grid-column: 1 / -1; }
  .head-actions input[type=file] { display: none; }

  /* compact stats: 2 per row */
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 13px 14px; border-radius: 12px; }
  .stat-label { font-size: 10px; letter-spacing: .08em; }
  .stat-value { font-size: 28px; margin-top: 4px; }
  .stat-note { font-size: 11px; line-height: 1.35; }

  .card { padding: 16px; border-radius: 14px; }
  .card.flush { padding: 0; }

  /* inputs: 16px stops iOS from zooming in on focus */
  .input, .text-input, select.input, textarea.input, .cost-input, .search input { font-size: 16px; }
  .btn { padding: 10px 14px; }
  .icon-btn { width: 38px; height: 38px; }

  /* filters */
  .toolbar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .toolbar > .search { grid-column: 1 / -1; min-width: 0; }
  .toolbar > select.input { width: 100%; min-width: 0; }
  .toolbar > select.input:last-child:nth-child(even) { grid-column: 1 / -1; }

  /* tabs scroll sideways */
  .tabs { margin-left: -14px; margin-right: -14px; padding: 0 14px; }

  /* modals become bottom sheets */
  .modal { align-items: flex-end; padding: 0; }
  .modal-box, .modal-box.wide { max-width: 100%; width: 100%; max-height: 92vh; border-radius: 20px 20px 0 0; animation: sheet .22s ease; padding-bottom: env(safe-area-inset-bottom); }
  .modal-box::before { content: ''; display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 8px auto 0; }
  .modal-head { padding: 12px 18px 0; }
  .modal-title { font-size: 24px; }
  .modal-body { padding: 14px 18px 18px; }
  .modal-foot { position: sticky; bottom: 0; background: #fff; padding: 12px 18px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line-2); }
  .modal-foot .btn { flex: 1; }

  /* generic tables → stacked cards */
  table.tbl.stack, .tbl.stack tbody, .tbl.stack tr, .tbl.stack td { display: block; width: 100%; }
  .tbl.stack thead { display: none; }
  .tbl.stack tr { padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
  .tbl.stack tr:last-child { border-bottom: none; }
  .tbl.stack td { border: none !important; padding: 3px 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: right; white-space: normal; }
  .tbl.stack td[data-label]::before { content: attr(data-label); font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); font-weight: 600; text-align: left; flex-shrink: 0; }
  .tbl.stack td.t-main { display: block; text-align: left; padding-bottom: 6px; }
  .tbl.stack td.t-actions { justify-content: flex-start; flex-wrap: wrap; padding-top: 10px; gap: 6px; }
  .tbl.stack td.empty { display: block; text-align: center; }
  .tbl.stack tbody tr:hover td { background: none; }
  .tbl.stack .num { text-align: right; }
}
@keyframes sheet { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
@media (max-width: 960px) {
  .sidebar { z-index: 90; width: min(300px, 86vw); }
  .drawer-close { display: grid; place-items: center; position: absolute; top: 18px; right: 14px; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); cursor: pointer; }
  .drawer-close svg { width: 18px; height: 18px; }
  body.nav-open .scrim { z-index: 85; }
  .side-link { padding: 12px 12px; font-size: 14.5px; }
  .tbl.stack .t-actions .btn-link { padding: 8px 6px; }
}
