:root {
  --bg: #0d0f17;
  --bg-2: #121522;
  --surface: #171b2b;
  --surface-2: #1f2438;
  --border: #272d45;
  --text: #e9ebf5;
  --muted: #8f96b3;
  --accent: #8b6cff;
  --accent-2: #22c3a6;
  --accent-soft: rgba(139, 108, 255, .16);
  --on-accent: #ffffff;
  --ok: #2fbf71;
  --ok-soft: rgba(47, 191, 113, .15);
  --warn: #f2a93b;
  --warn-soft: rgba(242, 169, 59, .15);
  --bad: #ef5b5b;
  --bad-soft: rgba(239, 91, 91, .15);
  --info: #4da3ff;
  --info-soft: rgba(77, 163, 255, .15);
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --radius: 16px;
  --radius-sm: 10px;
  --sidebar: 248px;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f7fb;
    --bg-2: #eef0f7;
    --surface: #ffffff;
    --surface-2: #f2f3f9;
    --border: #e2e5ef;
    --text: #151827;
    --muted: #646b86;
    --accent: #6d4dff;
    --accent-soft: rgba(109, 77, 255, .1);
    --shadow: 0 8px 24px rgba(20, 24, 50, .08);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: var(--accent); text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h3 { font-size: 15px; font-weight: 650; }
code, .mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .92em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mt { margin-top: 18px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- icons, buttons, inputs */
.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .05s, opacity .15s;
}
.btn:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, var(--accent-2))); border-color: transparent; color: var(--on-accent); }
.btn.danger { background: var(--bad-soft); border-color: transparent; color: var(--bad); }
.btn.ghost { background: transparent; }
.btn.small { height: 32px; padding: 0 12px; font-size: 13px; }
.btn.block { width: 100%; }
.btn.loading { position: relative; color: transparent !important; }
.btn.loading::after {
  content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--muted); border-top-color: var(--text); animation: spin .7s linear infinite;
}
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.link { font-size: 13px; font-weight: 600; }

input, select, textarea {
  width: 100%; min-width: 0; height: 42px; padding: 0 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg-2); color: var(--text); font: inherit; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; min-height: 140px; padding: 10px 12px; resize: vertical; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type="file"] { height: auto; padding: 10px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 500; }
.field > input, .field > select { color: var(--text); font-size: 15px; }
.form-error { color: var(--bad); font-size: 13px; min-height: 18px; margin: 0; }
.input-prefix { display: flex; align-items: center; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-2); }
.input-prefix span { padding: 0 0 0 12px; color: var(--muted); }
.input-prefix input { border: 0; background: transparent; box-shadow: none; }
.input-prefix:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.inline-form { display: flex; gap: 10px; align-items: center; }
.inline-form .input-prefix { flex: 1; }

.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--border); flex-wrap: wrap; }
.seg button {
  height: 32px; padding: 0 12px; border-radius: 8px; border: 0; background: transparent;
  color: var(--muted); font: inherit; font-weight: 600; font-size: 13px; cursor: pointer;
}
.seg button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* ---------- badges, pills, chips */
.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px;
  font-size: 12px; font-weight: 650; text-transform: capitalize; white-space: nowrap;
}
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.muted { background: var(--surface-2); color: var(--muted); }
.chip {
  display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text); font-weight: 650; font-variant-numeric: tabular-nums;
}
.chip.low { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 50%, var(--border)); }

/* ---------- splash + login */
.splash { position: fixed; inset: 0; display: grid; place-items: center; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--surface-2); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.login {
  min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  background:
    radial-gradient(700px 400px at 15% 10%, var(--accent-soft), transparent 70%),
    radial-gradient(600px 400px at 90% 90%, rgba(34, 195, 166, .12), transparent 70%);
}
.login-card {
  width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 16px;
  padding: 32px 28px; border-radius: 22px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.login-card p { margin: 0; }
.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

.brand { display: flex; align-items: center; gap: 10px; font-size: 16px; letter-spacing: .2px; }
.brand b { font-weight: 750; }
.brand.big { font-size: 20px; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  background: url("/static/panel/icon.svg") center / cover;
}

/* ---------- shell */
.shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar); z-index: 30;
  display: flex; flex-direction: column; gap: 18px; padding: 20px 14px;
  background: var(--bg-2); border-right: 1px solid var(--border);
}
.sidebar .brand { padding: 4px 10px 8px; }
.nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.nav a {
  display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 12px; border-radius: 11px;
  color: var(--muted); font-weight: 600; transition: background .15s, color .15s;
}
.nav a:hover { background: var(--surface); color: var(--text); }
.nav a.active { background: var(--accent-soft); color: var(--text); }
.nav a.active .ico { color: var(--accent); }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.live { display: flex; align-items: center; gap: 8px; padding: 0 12px; font-size: 12px; color: var(--muted); }
.live .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.live.on .dot { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }

.main { margin-left: var(--sidebar); min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  height: 64px; padding: 0 32px;
  background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar h1 { font-size: 19px; font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-btn { display: none; }
.content { padding: 28px 32px 48px; max-width: 1240px; }
.view { display: flex; flex-direction: column; gap: 18px; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } }
.scrim { display: none; }

/* ---------- cards + grids */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; min-width: 0;
}
.card.flush { padding: 0; overflow: hidden; }
.card.flush > .card-head { padding: 18px 20px 0; margin-bottom: 12px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head p { margin: 2px 0 0; }
.grid { display: grid; gap: 18px; }
.cols-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.cols-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.hero-grid { grid-template-columns: 1.4fr 1fr; }
.empty { padding: 28px 12px; text-align: center; color: var(--muted); font-size: 14px; }

.hero {
  background:
    radial-gradient(500px 220px at 100% 0%, var(--accent-soft), transparent 70%),
    var(--surface);
}
.hero-top { display: flex; justify-content: space-between; align-items: center; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.hero-value { font-size: 44px; font-weight: 750; letter-spacing: -.02em; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.hero-value.low { color: var(--bad); }
.hero-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

.stat-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.stat-value { font-size: 30px; font-weight: 750; margin: 4px 0 12px; font-variant-numeric: tabular-nums; }
.stat-value span { font-size: 14px; color: var(--muted); font-weight: 600; margin-left: 4px; }
.meter { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-bottom: 14px; }
.meter span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .6s ease; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin: 0; }
.kv dt { font-size: 12px; color: var(--muted); }
.kv dd { margin: 0; font-weight: 650; font-variant-numeric: tabular-nums; }

.list, .feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.list li, .feed li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); min-width: 0; }
.list li:last-child, .feed li:last-child { border-bottom: 0; }
.list .grow, .feed .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.avatar { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.avatar.ok { background: var(--ok-soft); color: var(--ok); }
.feed .digit { font-size: 18px; font-weight: 750; color: var(--accent); }

/* ---------- tables */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 12px 16px; background: var(--bg-2); border-bottom: 1px solid var(--border); }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.table .sub { display: block; font-size: 12px; color: var(--muted); }
.table-foot { display: flex; justify-content: center; padding: 14px; border-top: 1px solid var(--border); }
.table-foot:empty { display: none; }

/* ---------- filters / summary */
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; align-items: end; }
.filters .seg { grid-column: 1 / -1; justify-self: start; }
.filter-actions { display: flex; gap: 10px; grid-column: 1 / -1; flex-wrap: wrap; }
.summary { display: flex; gap: 10px; flex-wrap: wrap; }
.summary .chip { font-weight: 600; }

/* ---------- devices */
.device-card { display: flex; flex-direction: column; gap: 14px; }
.device-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.device-name { font-size: 18px; font-weight: 750; }
.status-line { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.status-line .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.status-line.on .dot { background: var(--ok); }
.device-card .settings div { flex-direction: column; align-items: flex-start; gap: 2px; }
.device-card .settings b { text-align: left; font-size: 15px; }
.settings .sub { display: block; font-family: inherit; font-size: 12px; color: var(--muted); font-weight: 500; }
.device-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }

.settings { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.settings div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 14px; }
.settings div:last-child { border-bottom: 0; }
.settings span { color: var(--muted); }
.settings b { font-weight: 650; text-align: right; word-break: break-all; }
.copy { cursor: copy; border-bottom: 1px dashed var(--muted); }
.note { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--warn-soft); color: var(--text); font-size: 14px; }
.note.info { background: var(--info-soft); }

/* ---------- top-up */
.amounts { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.amounts .btn.active { border-color: var(--accent); background: var(--accent-soft); }
.amounts .input-prefix { width: 160px; }
.coins { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.coin {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--bg-2); color: var(--text); font: inherit; cursor: pointer; text-align: left;
}
.coin:hover:not(:disabled) { border-color: var(--accent); }
.coin:disabled { opacity: .45; cursor: not-allowed; }
.coin b { font-size: 15px; }
.coin small { color: var(--muted); font-size: 12px; }
.invoice { display: grid; grid-template-columns: 200px 1fr; gap: 22px; align-items: start; }
.invoice .qr { width: 200px; height: 200px; border-radius: 14px; background: #fff; padding: 8px; }
.invoice .settings { align-self: stretch; }

/* ---------- validation */
.job-progress { display: flex; align-items: center; gap: 10px; min-width: 140px; }
.job-progress .meter { flex: 1; margin: 0; }
.quote { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.quote div { padding: 12px; border-radius: 12px; background: var(--bg-2); }
.quote span { display: block; font-size: 12px; color: var(--muted); text-transform: capitalize; }
.quote b { font-size: 17px; }

/* ---------- hold music */
.drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center;
  padding: 34px 18px; border-radius: var(--radius); border: 2px dashed var(--border); background: var(--bg-2);
  color: var(--muted); cursor: pointer; transition: border-color .15s, background .15s;
}
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.drop .ico { width: 30px; height: 30px; color: var(--accent); }
.drop input { display: none; }
.preview-box { display: flex; flex-direction: column; gap: 14px; }
audio { width: 100%; height: 44px; }

/* ---------- dialer */
.dialer-layout { display: grid; grid-template-columns: minmax(300px, 420px) 1fr; gap: 18px; align-items: start; }
.dialer { display: flex; flex-direction: column; gap: 12px; }
.dialer-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 28px; white-space: nowrap; flex: none; padding: 0 12px; border-radius: 99px; background: var(--surface-2); font-size: 13px; font-weight: 650; color: var(--muted); }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.ready { color: var(--ok); }
.pill.down { color: var(--bad); }
.pill.busy { color: var(--warn); }
.dial-display { display: flex; align-items: center; gap: 6px; }
.dial-display input {
  height: 58px; border: 0; background: transparent; box-shadow: none !important;
  font-size: 30px; font-weight: 650; text-align: center; letter-spacing: .04em; font-variant-numeric: tabular-nums;
}
.dial-display input::placeholder { font-size: 17px; font-weight: 500; letter-spacing: 0; }
.call-state { text-align: center; color: var(--muted); min-height: 22px; font-variant-numeric: tabular-nums; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.keypad button {
  height: 64px; border-radius: 16px; border: 1px solid var(--border); background: var(--bg-2); color: var(--text);
  font: inherit; font-size: 26px; font-weight: 600; cursor: pointer; user-select: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1;
  transition: background .1s, transform .05s;
}
.keypad button:hover { background: var(--surface-2); }
.keypad button:active, .keypad button.pressed { transform: scale(.96); background: var(--accent-soft); }
.keypad small { font-size: 9px; letter-spacing: .15em; color: var(--muted); font-weight: 650; }
.dial-actions { display: flex; justify-content: center; align-items: center; gap: 22px; padding-top: 6px; }
.round { width: 64px; height: 64px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; color: #fff; transition: transform .05s, opacity .15s; }
.round .ico { width: 26px; height: 26px; }
.round:active { transform: scale(.95); }
.round:disabled { opacity: .4; cursor: not-allowed; }
.round.call { background: var(--ok); }
.round.hangup { background: var(--bad); }
.round.mute { width: 52px; height: 52px; background: var(--surface-2); color: var(--text); }
.round.mute.active { background: var(--bad); color: #fff; }
.dtmf-digits {
  min-height: 92px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 14px;
  border-radius: var(--radius-sm); background: var(--bg-2); border: 1px solid var(--border);
}
.dtmf-digits .d {
  display: grid; place-items: center; width: 40px; height: 46px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent); font-size: 22px; font-weight: 750; animation: pop .25s ease;
}
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
.tips { margin: 8px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }

/* ---------- modal + toasts */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(5, 7, 14, .6); backdrop-filter: blur(4px); animation: fade .15s ease; }
.modal-card {
  width: 100%; max-width: 480px; max-height: calc(100vh - 32px); overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow);
}
.modal.wide .modal-card { max-width: 760px; }
.modal-head { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 12px; background: var(--surface); z-index: 1; }
.modal-head h2 { font-size: 18px; }
.modal-body { padding: 4px 20px 20px; display: flex; flex-direction: column; gap: 14px; }
.modal-body form { display: flex; flex-direction: column; gap: 14px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }

.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; flex-direction: column; gap: 10px; max-width: min(380px, calc(100vw - 32px)); }
.toast {
  padding: 12px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
  font-size: 14px; font-weight: 550; border-left: 4px solid var(--info); animation: slide .2s ease; transition: opacity .4s, transform .4s;
}
.toast.ok { border-left-color: var(--ok); }
.toast.bad { border-left-color: var(--bad); }
.toast.dtmf { border-left-color: var(--accent); }
.toast.out { opacity: 0; transform: translateY(8px); }
@keyframes slide { from { opacity: 0; transform: translateY(10px); } }

/* ---------- responsive */
@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: 1fr; }
  .dialer-layout { grid-template-columns: 1fr; }
  .dialer { max-width: 460px; width: 100%; margin: 0 auto; }
}

@media (max-width: 960px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; box-shadow: var(--shadow); }
  .shell.drawer .sidebar { transform: none; }
  .shell.drawer .scrim { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(5, 7, 14, .55); }
  .main { margin-left: 0; }
  .menu-btn { display: inline-grid; }
  .topbar { padding: 0 16px; padding-top: env(safe-area-inset-top); height: calc(60px + env(safe-area-inset-top)); }
  .content { padding: 18px 16px 40px; }
}

@media (max-width: 720px) {
  .card { padding: 16px; }
  .hero-value { font-size: 36px; }
  .cols-2, .cols-3 { grid-template-columns: 1fr; }
  .invoice { grid-template-columns: 1fr; justify-items: center; }
  .invoice .settings { width: 100%; }
  .rtable thead { display: none; }
  .rtable, .rtable tbody, .rtable tr, .rtable td { display: block; width: 100%; }
  .rtable tr { padding: 12px 16px; border-bottom: 1px solid var(--border); }
  .rtable tr:last-child { border-bottom: 0; }
  .rtable td { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border: 0; text-align: right; }
  .rtable td::before { content: attr(data-label); color: var(--muted); font-size: 13px; text-align: left; }
  .rtable td.num { text-align: right; }
  .rtable tbody tr:hover td { background: transparent; }
  .toasts { left: 16px; right: 16px; bottom: 16px; max-width: none; }
  .modal { align-items: end; padding: 0; }
  .modal-card { max-width: none; border-radius: 20px 20px 0 0; max-height: 90vh; padding-bottom: env(safe-area-inset-bottom); }
  .inline-form { flex-wrap: wrap; }
}
