/*
 * CryptoTransactionManager admin panel — design system.
 * Persian (fa), right-to-left: every rule uses logical properties (inline-start = right in RTL), so the same sheet
 * would also work left-to-right. Strict CSP: served from 'self', no inline styles, no web fonts from a CDN.
 * Light and dark themes: follows the system setting; [data-theme] on <html> (site-theme.js) overrides it.
 */

/* ============================== Font ============================== */
/* Vazirmatn 33.0.3, the variable build (every weight in one file), served from 'self' for the strict CSP.
   SIL Open Font License 1.1: fonts/Vazirmatn-OFL.txt. */
@font-face {
    font-family: "Vazirmatn";
    src: url("../fonts/vazirmatn-variable.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* ============================== Tokens ============================== */
:root {
    color-scheme: light;
    --font: "Vazirmatn", "Segoe UI", Tahoma, system-ui, sans-serif;
    --font-mono: "Cascadia Mono", "Consolas", "SFMono-Regular", ui-monospace, monospace;

    --bg: #f4f6fb;
    --bg-accent: radial-gradient(1200px 600px at 100% -10%, #e9ecff 0%, transparent 60%), radial-gradient(900px 500px at -10% 110%, #e8f6f3 0%, transparent 55%);
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --surface-hover: #f1f4fa;
    --border: #e4e8f0;
    --border-strong: #d4dae6;
    --text: #0f172a;
    --text-2: #334155;
    --muted: #64748b;

    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-soft: #eef0ff;
    --primary-text: #ffffff;
    --ring: rgba(79, 70, 229, 0.28);

    --success: #059669;
    --success-soft: #e7f8f1;
    --warning: #b45309;
    --warning-soft: #fff6e6;
    --danger: #dc2626;
    --danger-soft: #fdeeee;
    --info: #0369a1;
    --info-soft: #e8f4fc;
    --neutral-soft: #eef1f6;

    /* Solid green / blue / red action buttons (white text, same fills in both themes) and the soft red one. */
    --btn-success: #13a554;
    --btn-info: #0e79fe;
    --btn-danger: #ea2a2b;
    --btn-danger-soft: #fddadd;
    --btn-danger-soft-text: #e91c21;

    --sidebar-bg: #0f1730;
    --sidebar-text: #aab4cf;
    --sidebar-text-strong: #ffffff;
    --sidebar-hover: rgba(255, 255, 255, 0.06);
    --sidebar-active: rgba(129, 140, 248, 0.18);
    --sidebar-border: rgba(255, 255, 255, 0.06);

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 16px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 10px 40px rgba(15, 23, 42, 0.12);
    --sidebar-width: 260px;
    --topbar-height: 64px;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --bg: #0b1120;
        --bg-accent: radial-gradient(1200px 600px at 100% -10%, rgba(99, 102, 241, 0.12) 0%, transparent 60%), radial-gradient(900px 500px at -10% 110%, rgba(16, 185, 129, 0.07) 0%, transparent 55%);
        --surface: #121a2c;
        --surface-2: #0f1626;
        --surface-hover: #182238;
        --border: #222d44;
        --border-strong: #2d3a56;
        --text: #e6eaf3;
        --text-2: #c3cad9;
        --muted: #8b96ad;
        --primary: #818cf8;
        --primary-hover: #a5b4fc;
        --primary-soft: rgba(129, 140, 248, 0.14);
        --primary-text: #0b1120;
        --ring: rgba(129, 140, 248, 0.35);
        --success: #34d399;
        --success-soft: rgba(52, 211, 153, 0.12);
        --warning: #fbbf24;
        --warning-soft: rgba(251, 191, 36, 0.12);
        --danger: #f87171;
        --danger-soft: rgba(248, 113, 113, 0.12);
        --info: #38bdf8;
        --info-soft: rgba(56, 189, 248, 0.12);
        --neutral-soft: rgba(148, 163, 184, 0.12);
        --btn-danger-soft: rgba(234, 42, 45, 0.18);
        --btn-danger-soft-text: #fca5a5;
        --sidebar-bg: #0a0f1d;
        --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.25);
        --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.45);
    }
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0b1120;
    --bg-accent: radial-gradient(1200px 600px at 100% -10%, rgba(99, 102, 241, 0.12) 0%, transparent 60%), radial-gradient(900px 500px at -10% 110%, rgba(16, 185, 129, 0.07) 0%, transparent 55%);
    --surface: #121a2c;
    --surface-2: #0f1626;
    --surface-hover: #182238;
    --border: #222d44;
    --border-strong: #2d3a56;
    --text: #e6eaf3;
    --text-2: #c3cad9;
    --muted: #8b96ad;
    --primary: #818cf8;
    --primary-hover: #a5b4fc;
    --primary-soft: rgba(129, 140, 248, 0.14);
    --primary-text: #0b1120;
    --ring: rgba(129, 140, 248, 0.35);
    --success: #34d399;
    --success-soft: rgba(52, 211, 153, 0.12);
    --warning: #fbbf24;
    --warning-soft: rgba(251, 191, 36, 0.12);
    --danger: #f87171;
    --danger-soft: rgba(248, 113, 113, 0.12);
    --info: #38bdf8;
    --info-soft: rgba(56, 189, 248, 0.12);
    --neutral-soft: rgba(148, 163, 184, 0.12);
    --btn-danger-soft: rgba(234, 42, 45, 0.18);
    --btn-danger-soft-text: #fca5a5;
    --sidebar-bg: #0a0f1d;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.45);
}

/* ============================== Base ============================== */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    font-size: 14.5px;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg-accent), var(--bg);
    background-attachment: fixed;
    text-align: start;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0 0 0.5rem; line-height: 1.35; color: var(--text); font-weight: 700; }
h1 { font-size: 1.45rem; letter-spacing: -0.01em; }
h2 { font-size: 1.12rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 0.75rem; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); text-decoration: underline; text-underline-offset: 3px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.25rem 0; }
small { font-size: 0.82em; }
code { font-family: var(--font-mono); font-size: 0.88em; background: var(--neutral-soft); padding: 0.1em 0.4em; border-radius: 6px; }
pre { font-family: var(--font-mono); }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--primary-soft); }

/* Machine values (addresses, tx ids, keys, amounts, IPs, JSON) stay left-to-right and isolated in the RTL page. */
.mono, .ltr { direction: ltr; unicode-bidi: isolate; }
.mono { font-family: var(--font-mono); font-size: 0.9em; letter-spacing: 0; }
td.mono, dd.mono, li.mono, td.ltr, dd.ltr, dt.ltr, th.ltr, h3.ltr { text-align: end; }
html[dir="rtl"] td.mono, html[dir="rtl"] dd.mono, html[dir="rtl"] li.mono,
html[dir="rtl"] td.ltr, html[dir="rtl"] dd.ltr, html[dir="rtl"] dt.ltr, html[dir="rtl"] th.ltr, html[dir="rtl"] h3.ltr { text-align: right; }
.num { font-variant-numeric: tabular-nums; }
/* Amounts and balances (and the odd value that must stand out, like a balance's update time): bolder and darker than the
   notes around them. */
.amount, .emphasis { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.hint { display: block; color: var(--muted); font-size: 0.84rem; margin-top: 0.3rem; line-height: 1.6; }
.nowrap { white-space: nowrap; }
.narrow { max-width: 560px; }
ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain li { padding: 0.15rem 0; }

/* ============================== App shell ============================== */
.shell { display: flex; min-height: 100vh; }

.sidebar {
    position: fixed;
    inset-block: 0;
    inset-inline-start: 0;
    width: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    border-inline-end: 1px solid var(--sidebar-border);
    z-index: 40;
    transition: transform 0.25s ease;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.25rem 1rem;
    color: var(--sidebar-text-strong);
    text-decoration: none;
    letter-spacing: normal;
}
.brand:hover { color: var(--sidebar-text-strong); text-decoration: none; }
.brand-mark {
    flex: none;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1 0%, #22d3ee 100%);
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.35);
    color: #fff;
}
.brand-mark svg { width: 22px; height: 22px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.35; font-weight: 700; font-size: 0.95rem; }
.brand-text small { font-weight: 400; color: var(--sidebar-text); font-size: 0.72rem; direction: ltr; text-align: start; }

.side-nav { flex: 1; overflow-y: auto; padding: 0.5rem 0.75rem 1rem; }
.side-nav-label { padding: 0.9rem 0.75rem 0.35rem; font-size: 0.72rem; color: rgba(170, 180, 207, 0.6); }
.side-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.62rem 0.8rem;
    margin-block: 2px;
    border-radius: 10px;
    color: var(--sidebar-text);
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}
.side-nav a svg { width: 19px; height: 19px; flex: none; opacity: 0.85; }
.side-nav a:hover { background: var(--sidebar-hover); color: var(--sidebar-text-strong); }
.side-nav a.active { background: var(--sidebar-active); color: var(--sidebar-text-strong); box-shadow: inset 3px 0 0 #818cf8; }
html[dir="rtl"] .side-nav a.active { box-shadow: inset -3px 0 0 #818cf8; }
.side-nav a.active svg { opacity: 1; color: #a5b4fc; }

.sidebar-footer { padding: 1rem 1.25rem 1.25rem; border-top: 1px solid var(--sidebar-border); font-size: 0.8rem; }
.sidebar-footer .network { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }

.main { flex: 1; min-width: 0; margin-inline-start: var(--sidebar-width); display: flex; flex-direction: column; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-inline: 1.75rem;
    background: color-mix(in srgb, var(--surface) 82%, transparent);
    backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid var(--border);
}
.topbar-title { display: none; font-weight: 700; font-size: 1rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 0.6rem; }

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-2);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.icon-btn:hover { background: var(--surface-hover); border-color: var(--border-strong); }
.icon-btn svg { width: 18px; height: 18px; }
.menu-toggle { display: none; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: inline; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
    :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: inline; }
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.25rem 0.35rem 0.25rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
}
html[dir="rtl"] .user-chip { padding: 0.25rem 0.75rem 0.25rem 0.35rem; }
.avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #6366f1, #22d3ee);
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
}
.user-name { font-weight: 600; font-size: 0.88rem; }
.user-menu { display: flex; align-items: center; gap: 0.5rem; }
.user-link { font-size: 0.85rem; color: var(--text-2); }

.content { flex: 1; width: 100%; max-width: 1440px; margin-inline: auto; padding: 1.75rem; }
.container { width: 100%; }

.footer { padding: 1rem 1.75rem 1.5rem; text-align: center; font-size: 0.8rem; color: var(--muted); }

.sidebar-backdrop { display: none; }

@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
    html[dir="rtl"] .sidebar { transform: translateX(100%); }
    body.sidebar-open .sidebar { transform: none; }
    body.sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(15, 23, 42, 0.45); z-index: 35; }
    .main { margin-inline-start: 0; }
    .menu-toggle { display: inline-grid; }
    .topbar-title { display: block; }
    .topbar { padding-inline: 1rem; }
    .content { padding: 1.1rem; }
    .user-name, .user-link { display: none; }
}

@media (max-width: 480px) {
    .topbar-title { display: none; }
    .topbar-actions { gap: 0.4rem; }
}

/* ============================== Auth pages (sign-in, 2FA setup) ============================== */
.auth-shell { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem 1rem; gap: 1.25rem; }
.auth-brand { display: flex; align-items: center; gap: 0.75rem; color: var(--text); font-weight: 700; font-size: 1.05rem; text-decoration: none; }
.auth-brand:hover { color: var(--text); text-decoration: none; }
.auth-brand .brand-text small { color: var(--muted); }
.auth-shell .content { padding: 0; max-width: none; flex: none; width: auto; }
.auth-card, .setup-card {
    width: min(440px, calc(100vw - 2rem));
    margin-inline: auto;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}
.setup-card { width: min(560px, calc(100vw - 2rem)); }
.auth-card h1, .setup-card h1 { font-size: 1.35rem; margin-bottom: 0.35rem; }
.auth-card .btn-primary, .setup-card .btn-primary { width: 100%; justify-content: center; padding-block: 0.7rem; margin-top: 0.5rem; }
.auth-footer { color: var(--muted); font-size: 0.8rem; display: flex; align-items: center; gap: 0.5rem; }

ol.setup-steps { margin: 0.5rem 0 1.25rem; padding-inline-start: 1.25rem; color: var(--text-2); }
ol.setup-steps li { margin-bottom: 0.35rem; }
.qr-figure { display: flex; justify-content: center; margin: 1rem 0; }
.qr-code {
    width: 220px;
    height: 220px;
    padding: 12px;
    border-radius: var(--radius);
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    image-rendering: pixelated;
}
.setup-secret { background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: 0.9rem 1rem; margin-bottom: 1rem; }
.secret-key { font-family: var(--font-mono); font-size: 1.05rem; letter-spacing: 0.06em; color: var(--text); word-break: break-all; }

/* ============================== Page header ============================== */
.page-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    margin-bottom: 1.5rem;
}
.page-header h1 { margin: 0; }
.page-header > p, .page-header .muted { flex-basis: 100%; margin: 0; }
.page-header .actions { margin-inline-start: auto; }

/* ============================== Cards & grids ============================== */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 1.35rem 1.5rem;
    margin-bottom: 1.25rem;
}
.card > :last-child { margin-bottom: 0; }
/* A wide table scrolls inside its card; the page itself never scrolls sideways. */
.card:has(> table.data), .card:has(> .table-wrap) { overflow-x: auto; }
.content { min-width: 0; }
.card h2 { font-size: 1.02rem; margin-bottom: 0.9rem; }
.card-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    margin: -0.15rem 0 1rem;
}
.card-header h2, .card-header h3 { margin: 0; }
.card-header > .muted:last-child, .card-header > .actions:last-child { margin-inline-start: auto; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.25rem; margin-bottom: 1.25rem; }
.grid > .card { margin-bottom: 0; }

/* Dashboard stat tiles */
.stat { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 0.25rem; }
.stat::after {
    content: "";
    position: absolute;
    inset-block-start: -40px;
    inset-inline-end: -40px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--primary-soft);
    opacity: 0.7;
}
.stat > * { position: relative; z-index: 1; }
.stat-label { color: var(--muted); font-size: 0.85rem; font-weight: 600; }
.stat-value { font-size: 2.1rem; font-weight: 800; line-height: 1.15; color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.stat-of { font-size: 1rem; font-weight: 600; color: var(--muted); margin-inline-start: 0.25rem; }
.stat a { font-size: 0.86rem; font-weight: 600; }

/* ============================== Definition lists ============================== */
.kv { display: grid; grid-template-columns: minmax(130px, max-content) 1fr; gap: 0; margin: 0; }
.kv dt, .kv dd { padding: 0.6rem 0; border-bottom: 1px solid var(--border); margin: 0; }
.kv dt { color: var(--muted); font-weight: 600; font-size: 0.86rem; padding-inline-end: 1.25rem; }
.kv dd { color: var(--text); word-break: break-word; min-width: 0; }
.kv dt:nth-last-of-type(1), .kv dd:last-of-type { border-bottom: 0; }
.kv dd.mono, .kv dd .mono { overflow-wrap: anywhere; }
/* In a narrow card (three-column detail grids) labels sit above their values instead of squeezing them. */
.card { container-type: inline-size; }
.card[hidden] { display: none; }

/* Tabs (Settings): a row of buttons above the cards, the selected one underlined. */
.tabs { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-bottom: 1rem; border-bottom: 1px solid var(--border); }
.tabs[hidden] { display: none; }
.tab {
    padding: 0.6rem 1.1rem;
    margin-bottom: -1px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: none;
    color: var(--muted);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--primary); border-bottom-color: var(--primary); }
.tab:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--ring); border-radius: 8px 8px 0 0; }
@container (max-width: 460px) {
    .kv { grid-template-columns: 1fr; }
    .kv dt { border-bottom: 0; padding-bottom: 0.1rem; font-size: 0.8rem; }
    .kv dd { padding-top: 0; }
}
@media (max-width: 640px) {
    .kv { grid-template-columns: 1fr; }
    .kv dt { border-bottom: 0; padding-bottom: 0; }
}

/* ============================== Tables ============================== */
.table-wrap { overflow-x: auto; margin-inline: -1.5rem; margin-bottom: -1.35rem; border-top: 1px solid var(--border); }
.card > .table-wrap:first-child { margin-top: -1.35rem; border-top: 0; }
.card > table.data { margin-bottom: 0; }
table.data { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.9rem; }
table.data th, table.data td { padding: 0.75rem 1rem; text-align: start; vertical-align: middle; border-bottom: 1px solid var(--border); white-space: nowrap; }
/* Free-text columns (reasons, descriptions, audit details) may wrap; everything else stays on one line and the table scrolls. */
table.data td.wrap, table.data td:has(> pre.json) { white-space: normal; min-width: 220px; }
table.data th {
    position: sticky;
    top: 0;
    background: var(--surface-2);
    color: var(--muted);
    font-weight: 600;
    font-size: 0.8rem;
    white-space: nowrap;
    text-transform: none;
    letter-spacing: normal;
}
table.data tbody tr { transition: background 0.12s ease; }
table.data tbody tr:hover { background: var(--surface-hover); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data td.num, table.data th.num, table.data .num { text-align: end; }
html[dir="rtl"] table.data td.num, html[dir="rtl"] table.data th.num, html[dir="rtl"] table.data .num { text-align: left; }
/* Row actions wrap into a compact block instead of one very wide row of buttons. */
table.data td .actions { flex-wrap: wrap; gap: 0.35rem; min-width: 150px; max-width: 250px; white-space: normal; }
/* Secondary lines inside a cell (who, until when, last sweep) are quieter than the value. */
table.data td .muted { font-size: 0.78rem; }
table.data tr.current td { background: var(--primary-soft); }
/* Deposits are tinted green and withdrawals red wherever they are listed. */
table.data.deposits tbody tr { background: var(--success-soft); }
table.data.deposits tbody tr:hover { background: color-mix(in srgb, var(--success) 16%, var(--surface)); }
table.data.withdrawals tbody tr { background: var(--danger-soft); }
table.data.withdrawals tbody tr:hover { background: color-mix(in srgb, var(--danger) 16%, var(--surface)); }
/* The danger badge shares the row's tint, so it needs its own fill to stay visible. */
table.data.withdrawals .badge-danger { background: var(--surface); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--danger) 35%, transparent); }
.table-wrap table.data th:first-child, .table-wrap table.data td:first-child { padding-inline-start: 1.5rem; }
.table-wrap table.data th:last-child, .table-wrap table.data td:last-child { padding-inline-end: 1.5rem; }

/* ============================== Wallet list ============================== */
/* The approved wallet-list design: centred cells, darker column titles, pill badges with bright dots, blue icons
   beside the address and full-width stacked row buttons. Colours are sampled from the mockup; dark mode keeps the hues. */
table.data.wallets {
    --w-link: #2c6ecb;
    --w-head-bg: #f8fafb;
    --w-head-text: #344054;
    --w-muted: #6b7280;
    --w-green: #15803d;
    --w-green-soft: #e2f9ed;
    --w-green-dot: #1ba05c;
    --w-orange: #d35a1e;
    --w-orange-soft: #feeee1;
    --w-orange-dot: #f0731d;
    --w-gray: #4b5563;
    --w-gray-soft: #f1f3f6;
    --w-gray-dot: #788198;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) table.data.wallets {
        --w-link: #60a5fa;
        --w-head-bg: var(--surface-2);
        --w-head-text: var(--text-2);
        --w-muted: var(--muted);
        --w-green: var(--success);
        --w-green-soft: var(--success-soft);
        --w-green-dot: var(--success);
        --w-orange: #fb923c;
        --w-orange-soft: rgba(251, 146, 60, 0.14);
        --w-orange-dot: #fb923c;
        --w-gray: var(--text-2);
        --w-gray-soft: var(--neutral-soft);
        --w-gray-dot: var(--muted);
    }
}
:root[data-theme="dark"] table.data.wallets {
    --w-link: #60a5fa;
    --w-head-bg: var(--surface-2);
    --w-head-text: var(--text-2);
    --w-muted: var(--muted);
    --w-green: var(--success);
    --w-green-soft: var(--success-soft);
    --w-green-dot: var(--success);
    --w-orange: #fb923c;
    --w-orange-soft: rgba(251, 146, 60, 0.14);
    --w-orange-dot: #fb923c;
    --w-gray: var(--text-2);
    --w-gray-soft: var(--neutral-soft);
    --w-gray-dot: var(--muted);
}
table.data.wallets th, table.data.wallets td { text-align: center; }
table.data.wallets td { padding-block: 0.9rem; }
table.data.wallets thead tr:first-child th { background: var(--w-head-bg); color: var(--w-head-text); font-size: 0.85rem; font-weight: 700; }
table.data.wallets td a { color: var(--w-link); font-weight: 600; }
table.data.wallets td .muted { color: var(--w-muted); }
table.data.wallets .badge { padding: 0.28rem 0.85rem; font-size: 0.8rem; font-weight: 700; }
table.data.wallets .badge::before { width: 7px; height: 7px; opacity: 1; }
table.data.wallets .badge-success { background: var(--w-green-soft); color: var(--w-green); }
table.data.wallets .badge-success::before { background: var(--w-green-dot); }
table.data.wallets .badge-warning { background: var(--w-orange-soft); color: var(--w-orange); }
table.data.wallets .badge-warning::before { background: var(--w-orange-dot); }
table.data.wallets .badge-muted { background: var(--w-gray-soft); color: var(--w-gray); }
table.data.wallets .badge-muted::before { background: var(--w-gray-dot); }
.wallet-balance { display: block; font-weight: 700; font-size: 0.95rem; color: var(--text); }
.address-actions { display: inline-flex; align-items: center; gap: 0.1rem; }
.address-actions > .mono { margin-inline-start: 0.55rem; color: var(--text); }
table.data.wallets .btn-icon { padding: 0.25rem; border-color: transparent; background: none; color: var(--w-link); }
table.data.wallets .btn-icon:hover { background: color-mix(in srgb, var(--w-link) 12%, transparent); color: var(--w-link); }
table.data.wallets .btn-icon.copied { color: var(--w-green-dot); }
table.data.wallets .btn-icon svg { width: 20px; height: 20px; }
/* Mockup geometry: 146px wide, 34px tall, 2px apart, each with a faint shadow in its own colour. */
table.data.wallets td .actions { display: grid; grid-template-columns: 1fr; gap: 2px; width: 146px; min-width: 0; max-width: none; margin-inline: auto; }
table.data.wallets td .actions form { margin: 0; }
table.data.wallets td .actions .btn { width: 100%; padding: 0.42rem 0.75rem; border-radius: 6px; font-size: 0.82rem; font-weight: 700; }
table.data.wallets td .actions .btn-success { box-shadow: 0 1px 2px color-mix(in srgb, var(--btn-success) 30%, transparent); }
table.data.wallets td .actions .btn-info { box-shadow: 0 1px 2px color-mix(in srgb, var(--btn-info) 30%, transparent); }
table.data.wallets td .actions .btn-danger, table.data.wallets td .actions .btn-danger-soft { box-shadow: 0 1px 2px color-mix(in srgb, var(--btn-danger) 30%, transparent); }
/* A sweep that cannot run (zero balance, or one already open) keeps its place, faded, with the reason in its tooltip. */
table.data.wallets td .actions .btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; transform: none; }
table.data.wallets td .actions .btn-danger-soft:disabled:hover { background: var(--btn-danger-soft); color: var(--btn-danger-soft-text); }
table.data.wallets .btn-danger { background: var(--btn-danger); border-color: var(--btn-danger); }
table.data.wallets .btn-danger:hover { background: color-mix(in srgb, var(--btn-danger) 88%, #000); }

/* ============================== Wallet history ============================== */
/* A deposit wallet's deposits and sweeps in one table: pill tabs above it, green rows in, red rows out. */
table.data.wallet-history {
    --h-in-row: #f0fbf5;
    --h-in-pill: #d9f5e7;
    --h-in-text: #047857;
    --h-in-dot: #059669;
    --h-out-row: #fef2f2;
    --h-out-pill: #fde3e4;
    --h-out-text: #c81e1e;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) table.data.wallet-history {
        --h-in-row: rgba(52, 211, 153, 0.08);
        --h-in-pill: rgba(52, 211, 153, 0.16);
        --h-in-text: #34d399;
        --h-in-dot: #34d399;
        --h-out-row: rgba(248, 113, 113, 0.08);
        --h-out-pill: rgba(248, 113, 113, 0.16);
        --h-out-text: #f87171;
    }
}
:root[data-theme="dark"] table.data.wallet-history {
    --h-in-row: rgba(52, 211, 153, 0.08);
    --h-in-pill: rgba(52, 211, 153, 0.16);
    --h-in-text: #34d399;
    --h-in-dot: #34d399;
    --h-out-row: rgba(248, 113, 113, 0.08);
    --h-out-pill: rgba(248, 113, 113, 0.16);
    --h-out-text: #f87171;
}
.history-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 1rem; }
.history-tab {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-2);
    font-size: 0.875rem;
    font-weight: 600;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.history-tab:hover { background: var(--surface-hover); color: var(--text); text-decoration: none; }
.history-tab[aria-current="page"] { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.history-tab:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--ring); }
table.data.wallet-history td.mono, table.data.wallet-history td.ltr { text-align: start; }
table.data.wallet-history tbody tr.history-in { background: var(--h-in-row); }
table.data.wallet-history tbody tr.history-out { background: var(--h-out-row); }
table.data.wallet-history tbody tr.history-in:hover { background: color-mix(in srgb, var(--h-in-pill) 60%, var(--surface)); }
table.data.wallet-history tbody tr.history-out:hover { background: color-mix(in srgb, var(--h-out-pill) 60%, var(--surface)); }
table.data.wallet-history td > a { font-weight: 600; }
.history-kind {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
}
.history-kind svg { width: 16px; height: 16px; stroke-width: 2.2; }
.history-kind-in { background: var(--h-in-pill); color: var(--h-in-text); }
.history-kind-out { background: var(--h-out-pill); color: var(--h-out-text); }
table.data.wallet-history .badge { height: 28px; padding: 0 12px; font-size: 0.8125rem; }
table.data.wallet-history .badge::before { width: 6px; height: 6px; opacity: 1; }
table.data.wallet-history .badge-success { background: var(--h-in-pill); color: var(--h-in-text); }
table.data.wallet-history .badge-success::before { background: var(--h-in-dot); }
table.data.wallet-history .tx-hash { gap: 14px; }
table.data.wallet-history .tx-actions { gap: 8px; }
table.data.wallet-history .btn-icon { width: 34px; height: 34px; padding: 0; border-color: var(--border); background: var(--surface); color: var(--primary); }
table.data.wallet-history .btn-icon:hover { border-color: var(--primary); color: var(--primary-hover); }
table.data.wallet-history .btn-icon.copied { border-color: var(--success); color: var(--success); }
table.data.wallet-history .btn-icon svg { width: 17px; height: 17px; }

/* ============================== Badges ============================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.18rem 0.6rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 600;
    line-height: 1.6;
    white-space: nowrap;
    background: var(--neutral-soft);
    color: var(--text-2);
    border: 1px solid transparent;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.85; }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-muted { background: var(--neutral-soft); color: var(--muted); }
.sidebar .badge { background: rgba(255, 255, 255, 0.08); color: #c7d2fe; }

/* ============================== Buttons ============================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.55rem 1.05rem;
    border-radius: 10px;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
}
.btn:hover { text-decoration: none; background: var(--surface-hover); color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--ring); }
.btn:disabled, .btn[aria-disabled="true"], form[aria-busy="true"] .btn[type="submit"] { opacity: 0.6; cursor: progress; }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-text); box-shadow: 0 1px 2px rgba(79, 70, 229, 0.25); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--primary-text); }
.btn-secondary { background: var(--surface); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 88%, #000); border-color: transparent; color: #fff; }
.btn-success { background: var(--btn-success); border-color: var(--btn-success); color: #fff; }
.btn-success:hover { background: color-mix(in srgb, var(--btn-success) 88%, #000); border-color: transparent; color: #fff; }
.btn-info { background: var(--btn-info); border-color: var(--btn-info); color: #fff; }
.btn-info:hover { background: color-mix(in srgb, var(--btn-info) 88%, #000); border-color: transparent; color: #fff; }
.btn-danger-soft { background: var(--btn-danger-soft); border-color: var(--btn-danger-soft); color: var(--btn-danger-soft-text); }
.btn-danger-soft:hover { background: color-mix(in srgb, var(--btn-danger) 24%, var(--surface)); border-color: transparent; color: var(--btn-danger-soft-text); }
.btn-small { padding: 0.32rem 0.7rem; font-size: 0.8rem; border-radius: 8px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.inline-form { display: inline; margin: 0; }
/* Square icon-only button; the label lives in title and aria-label. */
.btn-icon { padding: 0.3rem; border-radius: 8px; color: var(--muted); }
.btn-icon:hover { color: var(--text); }
.btn-icon.copied { color: var(--success); border-color: var(--success); }
/* A transaction hash followed by its copy and open-in-explorer icons. */
.tx-hash { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; max-width: 100%; }
.tx-hash > a { overflow-wrap: anywhere; }
.tx-actions { display: inline-flex; gap: 0.25rem; }

/* ============================== Forms ============================== */
label { display: block; font-weight: 600; font-size: 0.86rem; color: var(--text-2); margin-bottom: 0.35rem; }
input[type="text"], input[type="password"], input[type="number"], input[type="date"], input[type="datetime-local"],
input[type="search"], input[type="email"], input:not([type]), select, textarea {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 0.92rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--primary) 35%, var(--border-strong)); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--ring); }
input[readonly], textarea[readonly] { background: var(--surface-2); }
textarea { min-height: 7rem; resize: vertical; }
select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position: 1rem 55%, calc(1rem + 5px) 55%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-inline-end: 0.8rem;
    padding-inline-start: 2.2rem;
}
html:not([dir="rtl"]) select { background-position: calc(100% - 1.3rem) 55%, calc(100% - 1rem) 55%; padding-inline-start: 0.8rem; padding-inline-end: 2.2rem; }
input[type="checkbox"] { width: 1.05rem; height: 1.05rem; accent-color: var(--primary); vertical-align: middle; margin: 0; }
input.mono, textarea.mono, input[type="password"], input[type="date"], input[dir="ltr"], select[dir="ltr"] { direction: ltr; text-align: left; }

.form-row { margin-bottom: 1rem; }
.form-row:last-child { margin-bottom: 0; }
.form-row.checkbox, .checkbox { display: flex; align-items: flex-start; gap: 0.6rem; }
.checkbox label { margin: 0; font-weight: 500; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 1.25rem; }
.code-input { font-family: var(--font-mono); font-size: 1.35rem !important; letter-spacing: 0.45em; text-align: center !important; direction: ltr; padding-block: 0.65rem !important; }
.code-hint { margin-top: 0.35rem; }

/* List pages: every column has its filter in a second header row, as wide as the column, with the column title centered
   above it. The inputs belong to form#filters (the bar above the table, with its one filter button) through their form
   attribute, so the table can keep its own row forms. */
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin-bottom: 0.75rem; }
.filter-buttons { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-inline-start: auto; }
/* A row above a list's table: page-wide actions on the right, the filter bar (its button on the left) taking the rest. */
.list-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin-bottom: 0.75rem; }
.list-toolbar > form { margin: 0; }
.list-toolbar > .filter-bar { flex: 1; margin-bottom: 0; }
.list-toolbar .btn svg { width: 14px; height: 14px; }
.filter-buttons .btn svg { width: 14px; height: 14px; }
/* Closed by default: only «اعمال فیلتر» shows and the table has no filter row; open, it gives way to «پاک کردن فیلترها». */
.filter-buttons[data-collapsed] .when-open, .filter-buttons:not([data-collapsed]) .when-collapsed { display: none; }
body:has(.filter-buttons[data-collapsed]) table.data tr.filter-row { display: none; }
body:has(.filter-buttons[data-collapsed]) table.data tr:has(+ tr.filter-row) th { border-bottom: 1px solid var(--border); padding-bottom: 0.75rem; }
.filter-note { margin: 0; font-size: 0.85rem; }
table.data tr:has(+ tr.filter-row) th { border-bottom: 0; padding-bottom: 0.35rem; text-align: center; }
table.data tr.filter-row th {
    position: static;
    padding-block: 0.3rem 0.65rem;
    vertical-align: top;
    text-align: center;
    font-weight: 500;
}
table.data tr.filter-row input, table.data tr.filter-row select {
    display: block;
    width: 100%;
    min-width: 8.5rem;
    padding-block: 0.34rem;
    font-size: 0.82rem;
    border-radius: 8px;
}
table.data tr.filter-row input::placeholder { color: var(--muted); opacity: 0.8; }
/* Two inputs in one column (a from/to range, or actor type and name) stack instead of widening the column. */
.filter-stack { display: grid; gap: 0.3rem; }
/* A range input with its "از" / "تا" inside the box, so the box itself is as wide as the column. */
.filter-affix {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    min-width: 10.5rem;
    margin: 0;
    padding-inline-start: 0.6rem;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    background: var(--surface);
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: text;
}
.filter-affix:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px var(--ring); }
table.data tr.filter-row .filter-affix input { flex: 1; min-width: 0; border: 0; box-shadow: none; background: transparent; padding-inline-start: 0.25rem; }

fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 0.9rem 1rem; margin: 0 0 1rem; }
legend { padding-inline: 0.4rem; font-weight: 700; font-size: 0.88rem; color: var(--text-2); }
details { border: 1px solid var(--border); border-radius: var(--radius); padding: 0.6rem 0.9rem; background: var(--surface-2); }
details summary { cursor: pointer; font-weight: 600; text-align: start; }

.policy-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.policy-list li { display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0.65rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); flex-wrap: wrap; }
.policy-list li:hover { border-color: var(--border-strong); }
.policy-list label { margin: 0; display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; font-weight: 500; cursor: pointer; }

.key-copy, .key-copy-block { display: flex; gap: 0.5rem; align-items: stretch; margin-block: 0.5rem; }
.key-copy-block { flex-direction: column; }
.key-copy input { font-family: var(--font-mono); direction: ltr; }
.key-pem, .key-copy textarea { font-family: var(--font-mono); font-size: 0.78rem; min-height: 9rem; direction: ltr; text-align: left; white-space: pre; }
.new-api-key { border-color: color-mix(in srgb, var(--warning) 45%, var(--border)); box-shadow: 0 0 0 4px var(--warning-soft), var(--shadow); }

pre.json {
    direction: ltr;
    text-align: left;
    unicode-bidi: isolate;
    margin: 0;
    padding: 0.6rem 0.75rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.78rem;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 14rem;
    overflow: auto;
}

/* ============================== Alerts ============================== */
.alert, .alert-success, .alert-error, .alert-warning, .alert-info {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
    border-radius: var(--radius);
    border: 1px solid transparent;
    font-size: 0.9rem;
    line-height: 1.65;
}
.alert-success::before, .alert-error::before, .alert-warning::before, .alert-info::before {
    content: "";
    flex: none;
    width: 8px;
    height: 8px;
    margin-top: 0.55rem;
    border-radius: 50%;
    background: currentColor;
}
.alert-success { background: var(--success-soft); color: var(--success); border-color: color-mix(in srgb, var(--success) 22%, transparent); }
.alert-error { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 22%, transparent); }
.alert-warning { background: var(--warning-soft); color: var(--warning); border-color: color-mix(in srgb, var(--warning) 25%, transparent); }
.alert-info { background: var(--info-soft); color: var(--info); border-color: color-mix(in srgb, var(--info) 22%, transparent); }
.alert-success a, .alert-error a, .alert-warning a, .alert-info a { color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; margin-inline-start: 0.35rem; }
.warnings { display: grid; gap: 0.6rem; margin-bottom: 1.25rem; }
.warnings > * { margin: 0; }

/* ============================== Popups ============================== */
dialog.modal {
    width: min(640px, calc(100vw - 2rem));
    max-height: calc(100dvh - 2rem);
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}
dialog.modal.modal-wide { width: min(760px, calc(100vw - 2rem)); }
dialog.modal[open] { display: flex; flex-direction: column; animation: modal-in 160ms ease-out; }
dialog.modal > form { display: flex; flex-direction: column; min-height: 0; flex: 1; }
dialog.modal::backdrop { background: rgba(15, 23, 42, 0.45); backdrop-filter: blur(3px); }
.modal-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}
.modal-header h2 { margin: 0; font-size: 1.05rem; }
.modal-header .icon-btn { margin-inline-start: auto; }
.modal-body { padding: 1.25rem; overflow-y: auto; min-height: 0; flex: 1; }
.modal-body > :last-child { margin-bottom: 0; }
.modal-footer {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.9rem 1.25rem;
    border-top: 1px solid var(--border);
    background: var(--surface-2);
}
.modal .new-api-key { border: 0; box-shadow: none; padding: 0; margin: 0; background: none; }
body:has(dialog.modal[open]) { overflow: hidden; }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { dialog.modal[open] { animation: none; } }
@media (max-width: 480px) {
    dialog.modal, dialog.modal.modal-wide { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; margin: 0; }
}

/* ============================== Pager ============================== */
.pager { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.25rem; }
.pager-summary { color: var(--muted); font-size: 0.85rem; }
.pager-links { display: flex; align-items: center; gap: 0.3rem; flex-wrap: wrap; }
.pager-links a, .pager-page, .pager-gap {
    min-width: 36px;
    height: 36px;
    padding: 0 0.65rem;
    display: inline-grid;
    place-items: center;
    border-radius: 9px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-2);
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
}
.pager-links a:hover { background: var(--surface-hover); text-decoration: none; }
.pager-page.current, .pager-links .current, span.pager-page { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.pager-gap { border: 0; background: none; }
.pager-links [aria-disabled="true"] { opacity: 0.45; cursor: default; }
.pager-size { display: flex; align-items: center; gap: 0.4rem; margin: 0; }
.pager-size label { margin: 0; color: var(--muted); font-size: 0.85rem; font-weight: 500; }
.pager-size select { width: auto; min-width: 4.75rem; padding-block: 0.3rem; font-size: 0.85rem; }
/* A pager under a table inside a card sits closer; in the padless dashboard cards it brings its own padding. */
.card > .pager { margin-top: 0.9rem; }
.card.dash-activity > .pager { margin: 0; padding: 10px 15px; border-top: 1px solid var(--d-border); }

/* ============================== Dashboard ============================== */
/* The approved dashboard design: an overview card (side panel on the right, the hot wallet laid out toward the left)
   and compact activity tables. Colours and sizes are sampled from the mockup; dark mode keeps the hues. */
.dash-hero, .dash-activity, .dash-stats, .dash-top {
    --d-border: #e9ecf1;
    --d-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 4px 14px rgba(16, 24, 40, 0.07);
    --d-title: #151627;
    --d-text: #2a2f4b;
    --d-time: #69738b;
    --d-label: #6c738a;
    --d-sub: #7c8296;
    --d-faint: #7a8299;
    --d-red-soft: #fef0f0;
    --d-green: #02a97a;
    --d-green-soft: #eefaf4;
    --d-blue: #144cea;
    --d-blue-soft: #f0f3fd;
    --d-blue-ring: #dde7fd;
    --d-field: #f5f8fc;
    --d-field-border: #e5e9ef;
    --d-accent: #384fb5;
    --d-link: #1f23b5;
    --d-icon: #3841a8;
    --d-pill-on-bg: #dff6e9;
    --d-pill-on: #208c58;
    --d-meter-track: #eaedf5;
    --d-meter-fill: #3264fd;
    --d-meter-icon: #2e6dfb;
    --d-meter-ring: #ecf2fd;
    --d-meter-icon-2: #8b3afb;
    --d-meter-ring-2: #f4e9fe;
    --d-meter-fill-2: #7736fb;
    --d-meter-total: #414a5f;
    --d-help: #929eb6;
    --d-soft-btn-bg: #eef2fe;
    --d-soft-btn: #2e56f9;
    --d-divider: #edf0f5;
    --d-head-bg: #f2f7fa;
    --d-head-text: #757e97;
    --d-in-row: #f2fcf6;
    --d-in-sep: #e3f3ea;
    --d-in-icon-bg: #e9fbf2;
    --d-in-icon: #1a9150;
    --d-out-row: #feebed;
    --d-out-sep: #f6dcdf;
    --d-out-icon-bg: #fdeded;
    --d-out-icon: #c52526;
    --d-ok-bg: #d6f9e8;
    --d-ok: #1d8f4c;
    --d-ok-dot: #0c9945;
    --d-copy: #3e465d;
    --d-balance-bg: #fef4f4;
    --d-stat-label: #484e66;
    --d-stat-link: #3241f8;
    --d-stat-blue: #2666fc;
    --d-stat-blue-ring: #ecf2fe;
    --d-stat-blue-deco: #f0f6fd;
    --d-stat-orange: #fa6101;
    --d-stat-orange-ring: #feebdc;
    --d-stat-orange-deco: #fef5ed;
    --d-stat-purple: #8136fa;
    --d-stat-purple-ring: #f4e8fe;
    --d-stat-purple-deco: #f8f1fd;
    --d-stat-green: #16a34a;
    --d-stat-green-ring: #e3f7ec;
    --d-stat-green-deco: #effaf3;
    --d-net-border: #c9d6fb;
    --d-net-bg: #eef3ff;
    --d-net-text: #2a3fb5;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .dash-hero, :root:not([data-theme="light"]) .dash-activity, :root:not([data-theme="light"]) .dash-stats, :root:not([data-theme="light"]) .dash-top {
        --d-border: var(--border);
        --d-shadow: var(--shadow);
        --d-title: var(--text);
        --d-text: var(--text-2);
        --d-time: var(--muted);
        --d-label: var(--muted);
        --d-sub: var(--muted);
        --d-faint: var(--muted);
        --d-red-soft: rgba(242, 4, 28, 0.12);
        --d-green-soft: rgba(2, 169, 122, 0.12);
        --d-blue: #7aa2ff;
        --d-blue-soft: rgba(20, 76, 234, 0.14);
        --d-blue-ring: rgba(122, 162, 255, 0.18);
        --d-field: var(--surface-2);
        --d-field-border: var(--border);
        --d-accent: #a5b4fc;
        --d-link: #a5b4fc;
        --d-icon: #93a4ff;
        --d-pill-on-bg: var(--success-soft);
        --d-pill-on: var(--success);
        --d-meter-track: rgba(148, 163, 184, 0.18);
        --d-meter-fill: #3b82f6;
        --d-meter-icon: #7aa2ff;
        --d-meter-ring: rgba(46, 109, 251, 0.18);
        --d-meter-icon-2: #c4a5ff;
        --d-meter-ring-2: rgba(139, 58, 251, 0.2);
        --d-meter-fill-2: #a78bfa;
        --d-meter-total: var(--muted);
        --d-help: var(--muted);
        --d-soft-btn-bg: rgba(46, 86, 249, 0.16);
        --d-soft-btn: #a5b4fc;
        --d-divider: var(--border);
        --d-head-bg: var(--surface-2);
        --d-head-text: var(--muted);
        --d-in-row: rgba(52, 211, 153, 0.07);
        --d-in-sep: rgba(52, 211, 153, 0.14);
        --d-in-icon-bg: var(--success-soft);
        --d-in-icon: var(--success);
        --d-out-row: rgba(248, 113, 113, 0.08);
        --d-out-sep: rgba(248, 113, 113, 0.16);
        --d-out-icon-bg: var(--danger-soft);
        --d-out-icon: var(--danger);
        --d-ok-bg: var(--success-soft);
        --d-ok: var(--success);
        --d-ok-dot: var(--success);
        --d-copy: var(--text-2);
        --d-balance-bg: rgba(239, 0, 39, 0.1);
        --d-stat-label: var(--text-2);
        --d-stat-link: #a5b4fc;
        --d-stat-blue: #7aa2ff;
        --d-stat-blue-ring: rgba(38, 102, 252, 0.18);
        --d-stat-blue-deco: rgba(38, 102, 252, 0.07);
        --d-stat-orange: #fb923c;
        --d-stat-orange-ring: rgba(250, 97, 1, 0.18);
        --d-stat-orange-deco: rgba(250, 97, 1, 0.07);
        --d-stat-purple: #c4a5ff;
        --d-stat-purple-ring: rgba(129, 54, 250, 0.2);
        --d-stat-purple-deco: rgba(129, 54, 250, 0.08);
        --d-stat-green: #4ade80;
        --d-stat-green-ring: rgba(22, 163, 74, 0.18);
        --d-stat-green-deco: rgba(22, 163, 74, 0.07);
        --d-net-border: rgba(129, 140, 248, 0.4);
        --d-net-bg: rgba(129, 140, 248, 0.12);
        --d-net-text: #a5b4fc;
    }
}
:root[data-theme="dark"] .dash-hero, :root[data-theme="dark"] .dash-activity, :root[data-theme="dark"] .dash-stats, :root[data-theme="dark"] .dash-top {
    --d-border: var(--border);
    --d-shadow: var(--shadow);
    --d-title: var(--text);
    --d-text: var(--text-2);
    --d-time: var(--muted);
    --d-label: var(--muted);
    --d-sub: var(--muted);
    --d-faint: var(--muted);
    --d-red-soft: rgba(242, 4, 28, 0.12);
    --d-green-soft: rgba(2, 169, 122, 0.12);
    --d-blue: #7aa2ff;
    --d-blue-soft: rgba(20, 76, 234, 0.14);
    --d-blue-ring: rgba(122, 162, 255, 0.18);
    --d-field: var(--surface-2);
    --d-field-border: var(--border);
    --d-accent: #a5b4fc;
    --d-link: #a5b4fc;
    --d-icon: #93a4ff;
    --d-pill-on-bg: var(--success-soft);
    --d-pill-on: var(--success);
    --d-meter-track: rgba(148, 163, 184, 0.18);
    --d-meter-fill: #3b82f6;
    --d-meter-icon: #7aa2ff;
    --d-meter-ring: rgba(46, 109, 251, 0.18);
    --d-meter-icon-2: #c4a5ff;
    --d-meter-ring-2: rgba(139, 58, 251, 0.2);
    --d-meter-fill-2: #a78bfa;
    --d-meter-total: var(--muted);
    --d-help: var(--muted);
    --d-soft-btn-bg: rgba(46, 86, 249, 0.16);
    --d-soft-btn: #a5b4fc;
    --d-divider: var(--border);
    --d-head-bg: var(--surface-2);
    --d-head-text: var(--muted);
    --d-in-row: rgba(52, 211, 153, 0.07);
    --d-in-sep: rgba(52, 211, 153, 0.14);
    --d-in-icon-bg: var(--success-soft);
    --d-in-icon: var(--success);
    --d-out-row: rgba(248, 113, 113, 0.08);
    --d-out-sep: rgba(248, 113, 113, 0.16);
    --d-out-icon-bg: var(--danger-soft);
    --d-out-icon: var(--danger);
    --d-ok-bg: var(--success-soft);
    --d-ok: var(--success);
    --d-ok-dot: var(--success);
    --d-copy: var(--text-2);
    --d-balance-bg: rgba(239, 0, 39, 0.1);
    --d-stat-label: var(--text-2);
    --d-stat-link: #a5b4fc;
    --d-stat-blue: #7aa2ff;
    --d-stat-blue-ring: rgba(38, 102, 252, 0.18);
    --d-stat-blue-deco: rgba(38, 102, 252, 0.07);
    --d-stat-orange: #fb923c;
    --d-stat-orange-ring: rgba(250, 97, 1, 0.18);
    --d-stat-orange-deco: rgba(250, 97, 1, 0.07);
    --d-stat-purple: #c4a5ff;
    --d-stat-purple-ring: rgba(129, 54, 250, 0.2);
    --d-stat-purple-deco: rgba(129, 54, 250, 0.08);
    --d-stat-green: #4ade80;
    --d-stat-green-ring: rgba(22, 163, 74, 0.18);
    --d-stat-green-deco: rgba(22, 163, 74, 0.07);
    --d-net-border: rgba(129, 140, 248, 0.4);
    --d-net-bg: rgba(129, 140, 248, 0.12);
    --d-net-text: #a5b4fc;
}
.card.dash-hero, .card.dash-activity { border-color: var(--d-border); border-radius: 14px; box-shadow: var(--d-shadow); }

/* Overview: a 264px side panel (first in the markup, so on the right), a hairline, then the hot wallet. The uneven
   paddings are the mockup's: the side panel runs almost to the card's right edge. */
.card.dash-hero { display: grid; grid-template-columns: 264px 15px 1px 5px minmax(0, 1fr); padding-block: 8px 2px; padding-inline: 5px 17px; }
.dash-side { grid-column: 1; }
.dash-divider { grid-column: 3; margin-block: 10px; background: var(--d-divider); }
.dash-main { grid-column: 5; min-width: 0; }

.dash-pill { display: inline-flex; align-items: center; height: 25px; padding: 0 14px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; white-space: nowrap; }
.dash-pill-on { background: var(--d-pill-on-bg); color: var(--d-pill-on); }
.dash-pill-off { background: var(--neutral-soft); color: var(--muted); }
a.dash-pill:hover { color: var(--d-title); text-decoration: none; }

.dash-address { display: flex; align-items: center; gap: 16px; height: 42px; margin: 0; padding-inline: 16px 2px; border: 1px solid var(--d-field-border); border-radius: 8px; background: var(--d-field); }
/* The free space sits after the label (the address is LTR, so its own inline margins would point the other way). */
.dash-address-label { margin-inline-end: auto; color: var(--d-label); font-size: 0.8125rem; white-space: nowrap; }
.dash-address-value { min-width: 0; overflow: hidden; color: var(--d-title); font-size: 0.8125rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.dash-address-value:hover { color: var(--d-title); }
.dash-copy { display: inline-flex; align-items: center; justify-content: center; flex: none; gap: 6px; width: 68px; height: 32px; border: 1px solid var(--d-field-border); border-radius: 8px; background: var(--surface); color: var(--d-copy); font: inherit; font-size: 0.8125rem; font-weight: 600; cursor: pointer; }
.dash-copy:hover { background: var(--surface-hover); }
.dash-copy svg { width: 15px; height: 15px; }

/* The TRX balance fills the rest of the column: the logo with label, amount and update time beside it, on the left. */
.dash-main { display: flex; flex-direction: column; gap: 10px; }
.dash-balance { display: flex; flex: 1; align-items: flex-start; justify-content: flex-end; gap: 14px; min-height: 110px; padding: 14px 18px; border-radius: 12px; background: var(--d-balance-bg); }
.dash-balance-logo { display: inline-grid; flex: none; width: 34px; height: 34px; }
.dash-balance-logo svg { width: 100%; height: 100%; }
.dash-balance-text { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; min-width: 0; text-align: end; }
.dash-balance-label { color: var(--d-label); font-size: 0.8125rem; font-weight: 600; line-height: 1.5; }
.dash-balance-value { color: var(--d-title); font-size: 1.375rem; font-weight: 800; line-height: 1.25; }
.dash-balance-foot { color: var(--d-sub); font-size: 0.75rem; line-height: 1.5; }

/* First row: three white summary cards, each with a tinted icon circle on the left and a faint circle of the same tint
   peeking in at the bottom left. */
.dash-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 12px; }
.dash-stat { position: relative; display: flex; flex-direction: column; align-items: flex-start; min-height: 128px; padding: 14px 16px 12px; overflow: hidden; border: 1px solid var(--d-border); border-radius: 12px; background: var(--surface); box-shadow: var(--d-shadow); }
.dash-stat::after { content: ""; position: absolute; inset-inline-end: -34px; bottom: -52px; width: 112px; height: 112px; border-radius: 50%; background: var(--d-stat-deco); }
.dash-stat > * { position: relative; z-index: 1; }
.dash-stat-icon { position: absolute; top: 12px; inset-inline-end: 14px; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--d-stat-ring); color: var(--d-stat-ink); }
.dash-stat-icon svg { width: 20px; height: 20px; }
.dash-stat-label { color: var(--d-stat-label); font-size: 0.8125rem; font-weight: 600; line-height: 1.5; }
.dash-stat-value { margin-top: 6px; color: var(--d-title); font-size: 1.6rem; font-weight: 800; line-height: 1.2; }
.dash-stat-sub { margin-top: 4px; color: var(--d-sub); font-size: 0.75rem; line-height: 1.5; }
.dash-stat-link { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 8px; color: var(--d-stat-link); font-size: 0.8125rem; font-weight: 700; }
.dash-stat-link svg { width: 14px; height: 14px; }
.dash-stat-blue { --d-stat-ring: var(--d-stat-blue-ring); --d-stat-ink: var(--d-stat-blue); --d-stat-deco: var(--d-stat-blue-deco); }
.dash-stat-orange { --d-stat-ring: var(--d-stat-orange-ring); --d-stat-ink: var(--d-stat-orange); --d-stat-deco: var(--d-stat-orange-deco); }
.dash-stat-purple { --d-stat-ring: var(--d-stat-purple-ring); --d-stat-ink: var(--d-stat-purple); --d-stat-deco: var(--d-stat-purple-deco); }
.dash-stat-green { --d-stat-ring: var(--d-stat-green-ring); --d-stat-ink: var(--d-stat-green); --d-stat-deco: var(--d-stat-green-deco); }
.dash-stat-pill { margin-top: 8px; height: 22px; padding: 0 12px; font-size: 0.75rem; }
.dash-pill-bad { background: var(--danger-soft); color: var(--danger); }

/* Top row: the page title with its subtitle on the right, the network picker on the left. */
.dash-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 14px; }
.dash-top-title h1 { margin: 0; color: var(--d-title); font-size: 1.35rem; font-weight: 800; line-height: 1.4; }
.dash-top-title p { margin: 0; color: var(--d-sub); font-size: 0.8rem; }
.dash-networks { display: flex; flex-wrap: wrap; gap: 8px; margin-inline-start: auto; }
.dash-network { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding-inline: 12px 10px; border: 1px solid var(--d-net-border); border-radius: 8px; background: var(--d-net-bg); color: var(--d-net-text); font-size: 0.8125rem; font-weight: 700; white-space: nowrap; }
.dash-network-logo { display: inline-grid; width: 20px; height: 20px; }
.dash-network-logo svg { width: 100%; height: 100%; }
/* The radio: a ring with a filled centre, as the selected option of the design. */
.dash-network-radio { width: 14px; height: 14px; border: 2px solid var(--d-net-text); border-radius: 50%; box-shadow: inset 0 0 0 2px var(--d-net-bg); background: var(--d-net-text); }

/* Side panel (the second design): a titled header with a help icon, a soft "network settings" button, then the energy
   and bandwidth meters, each with its icon in a tinted circle on the left. */
.dash-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; padding-inline: 8px 4px; }
.dash-side-head { display: flex; align-items: center; gap: 6px; margin-bottom: -6px; padding-block: 4px 9px; border-bottom: 1px solid var(--d-divider); }
.dash-hero .dash-side-title a { color: inherit; }
.dash-side-head .dash-pill { margin-inline-start: auto; }
.dash-hero .dash-side-title { margin: 0; color: var(--d-title); font-size: 0.95rem; font-weight: 800; line-height: 1.4; }
.dash-side-help { display: inline-flex; color: var(--d-help); cursor: help; }
.dash-side-help svg { width: 17px; height: 17px; }
.dash-side-btn { display: inline-flex; align-items: center; gap: 8px; align-self: flex-end; height: 32px; padding-inline: 12px; border-radius: 8px; background: var(--d-soft-btn-bg); color: var(--d-soft-btn); font-size: 0.8125rem; font-weight: 700; white-space: nowrap; }
.dash-side-btn:hover { background: color-mix(in srgb, var(--d-soft-btn) 14%, var(--surface)); color: var(--d-soft-btn); text-decoration: none; }
.dash-side-btn svg { width: 15px; height: 15px; }
.dash-meter { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 0 9px; }
.dash-meter-icon { display: inline-grid; place-items: center; width: 38px; height: 38px; margin-top: 2px; border-radius: 50%; background: var(--d-meter-ring); color: var(--d-meter-icon); }
.dash-meter-icon svg { width: 18px; height: 18px; }
.dash-meter-bandwidth { --d-meter-icon: var(--d-meter-icon-2); --d-meter-ring: var(--d-meter-ring-2); --d-meter-fill: var(--d-meter-fill-2); }
.dash-meter-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; line-height: 1.4; }
.dash-meter-label { color: var(--d-title); font-size: 0.8125rem; font-weight: 700; }
.dash-meter-nums { color: var(--d-meter-total); font-size: 0.8125rem; }
.dash-meter-nums b { color: var(--d-title); font-weight: 700; }
/* A <progress> bar (no inline width under the strict CSP), filling from the left like the design. */
.dash-meter-bar { display: block; width: 100%; height: 8px; margin-top: 5px; overflow: hidden; border: 0; border-radius: 999px; background: var(--d-meter-track); direction: ltr; appearance: none; }
.dash-meter-bar::-webkit-progress-bar { border-radius: 999px; background: var(--d-meter-track); }
.dash-meter-bar::-webkit-progress-value { border-radius: 999px; background: var(--d-meter-fill); }
.dash-meter-bar::-moz-progress-bar { border-radius: 999px; background: var(--d-meter-fill); }
.dash-meter-rest { display: block; margin-top: 5px; color: var(--d-faint); font-size: 0.75rem; line-height: 1.4; }

@media (max-width: 1100px) {
    .card.dash-hero { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 12px 16px; }
    .dash-side, .dash-main { grid-column: 1; }
    .dash-main { order: -1; }
    .dash-divider { display: none; }
}

/* Activity cards: header with a tinted icon square and an "all" link, then a compact centred table. */
.card.dash-activity { margin-bottom: 12px; padding: 0; overflow: hidden; }
.dash-activity-head { display: flex; align-items: center; gap: 12px; min-height: 41px; padding-block: 6px; padding-inline: 9px 15px; border-bottom: 1px solid var(--d-border); }
.dash-activity .dash-activity-head h2 { margin: 0; color: var(--d-title); font-size: 1rem; font-weight: 800; }
.dash-activity-icon { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 8px; }
.dash-activity-icon svg { width: 16px; height: 16px; }
.dash-activity-in { background: var(--d-in-icon-bg); color: var(--d-in-icon); }
.dash-activity-out { background: var(--d-out-icon-bg); color: var(--d-out-icon); }
.dash-activity-link { display: inline-flex; align-items: center; gap: 6px; margin-inline-start: auto; color: var(--d-link); font-size: 0.8125rem; font-weight: 700; }
.dash-activity-link svg { width: 13px; height: 13px; }
.dash-activity-empty { margin: 0; padding: 16px; }
.dash-activity .table-wrap { margin: 0; border-top: 0; }
table.data.dash-table { font-size: 0.75rem; }
table.data.dash-table th, table.data.dash-table td { height: 30px; padding-block: 0; padding-inline: 10px; text-align: center; }
table.data.dash-table th { height: 25px; border-bottom: 1px solid var(--d-border); background: var(--d-head-bg); color: var(--d-head-text); font-size: 0.72rem; font-weight: 600; }
table.data.dash-table td { color: var(--d-text); }
table.data.dash-table.deposits tbody tr { background: var(--d-in-row); }
table.data.dash-table.deposits tbody tr:hover { background: color-mix(in srgb, var(--d-in-row) 94%, var(--text)); }
table.data.dash-table.deposits td { border-bottom-color: var(--d-in-sep); }
table.data.dash-table.withdrawals tbody tr { background: var(--d-out-row); }
table.data.dash-table.withdrawals tbody tr:hover { background: color-mix(in srgb, var(--d-out-row) 94%, var(--text)); }
table.data.dash-table.withdrawals td { border-bottom-color: var(--d-out-sep); }
.dash-row-link { color: var(--d-time); }
.dash-row-link:hover { color: var(--d-link); }
/* Shortened value with copy and open icons before it (on its right). */
.short-actions { display: inline-flex; align-items: center; gap: 6px; }
.short-actions > a.btn-icon { margin-inline-end: 5px; }
.short-actions .btn-icon { padding: 0; border: 0; background: none; color: var(--primary); }
.short-actions .btn-icon:hover { background: none; color: var(--primary-hover); }
.short-actions .btn-icon.copied { color: var(--success); }
.short-actions .btn-icon svg { width: 15px; height: 15px; }
table.data.dash-table .btn-icon { padding: 0; border: 0; background: none; color: var(--d-icon); }
table.data.dash-table .btn-icon:hover { background: none; color: var(--d-link); }
table.data.dash-table .btn-icon.copied { color: var(--d-ok-dot); }
table.data.dash-table .btn-icon svg { width: 14px; height: 14px; }
table.data.dash-table .badge { gap: 6px; height: 20px; padding: 0 8px; font-size: 0.6875rem; line-height: 20px; }
table.data.dash-table .badge::before { width: 6px; height: 6px; opacity: 1; }
table.data.dash-table .badge-success { background: var(--d-ok-bg); color: var(--d-ok); }
table.data.dash-table .badge-success::before { background: var(--d-ok-dot); }

/* ============================== Misc ============================== */
.asset-settings .card { margin-bottom: 1rem; }
.status { font-weight: 600; }
.empty { padding: 2.5rem 1rem; text-align: center; color: var(--muted); }

@media print {
    .sidebar, .topbar, .footer, .actions, .tx-actions, .pager, .tabs, .dash-copy, .short-actions .btn-icon, .dash-side-btn { display: none !important; }
    .card[hidden] { display: block; }
    .main { margin: 0; }
    .card { box-shadow: none; }
}
