:root {
    --bg: #f5f6f8;
    --surface: #ffffff;
    --ink: #1f2937;
    --ink-muted: #6b7280;
    --line: #e5e7eb;
    --accent: #2563eb;
    --ok-bg: #dcfce7;
    --ok-ink: #166534;
    --off-bg: #f3f4f6;
    --off-ink: #6b7280;
    --err-bg: #fee2e2;
    --err-ink: #991b1b;
}

* { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    background: var(--bg);
    color: var(--ink);
}

header {
    background: var(--ink);
    color: #fff;
    padding: 0.75em 1.5em;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1em;
    flex-wrap: wrap;
}

header .brand { font-weight: 600; font-size: 1.1em; }
header .user { font-size: 0.9em; opacity: 0.85; }
header .sep { margin: 0 0.4em; }
header a { color: #cbd5e1; text-decoration: none; }
header a:hover { color: #fff; }

nav {
    background: #374151;
    padding: 0 1.5em;
    display: flex;
    gap: 0;
    flex-wrap: wrap;
}

nav .nav-link {
    color: #d1d5db;
    padding: 0.7em 1.2em;
    text-decoration: none;
    border-bottom: 3px solid transparent;
}

nav .nav-link:hover { color: #fff; background: #4b5563; }
nav .nav-link.active { color: #fff; border-bottom-color: #60a5fa; background: #4b5563; }

main { max-width: 1100px; margin: 1.5em auto; padding: 0 1.5em; }

main a { color: var(--accent); }
main a.muted { color: var(--ink-muted); }

main.wide { max-width: none; }

h1 { margin-top: 0; font-size: 1.5em; }

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 1.2em;
}

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }

table { width: 100%; border-collapse: collapse; font-size: 0.95em; }
th, td { padding: 0.7em 0.9em; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { background: #fafafa; font-weight: 600; color: var(--ink-muted); font-size: 0.85em; text-transform: uppercase; letter-spacing: 0.03em; }
tr:last-child td { border-bottom: none; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
th.num { text-align: right; }

th .sort {
    font: inherit;
    color: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    background: none;
    border: 0;
    padding: 0;
    text-decoration: none;
    cursor: pointer;
}

th .sort:hover { color: var(--ink); text-decoration: underline; }
th .sort .arrow { padding-left: 0.35em; }
th[aria-sort="none"] .sort .arrow { padding-left: 0; }
th[aria-sort]:not([aria-sort="none"]) .sort { color: var(--ink); }

.badge { display: inline-block; padding: 0.2em 0.6em; border-radius: 999px; font-size: 0.8em; font-weight: 600; }
.badge-on { background: var(--ok-bg); color: var(--ok-ink); }
.badge-off { background: var(--off-bg); color: var(--off-ink); }

.muted { color: var(--ink-muted); }
.empty { padding: 2em 1.2em; text-align: center; color: var(--ink-muted); }

@media (max-width: 640px) {
    nav { padding: 0 0.4em; }
    nav .nav-link { padding: 0.7em 0.75em; }

    .table-wrap { border: none; background: transparent; overflow-x: visible; }
    table thead { display: none; }
    table, table tbody, table tr, table td { display: block; width: 100%; }

    table tr {
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: 8px;
        margin-bottom: 0.7em;
        padding: 0.3em 0.2em;
    }

    table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 1em;
        white-space: normal;
        border-bottom: 1px solid var(--line);
        padding: 0.55em 0.9em;
    }

    table tr td:last-child { border-bottom: none; }
    table td.num { text-align: right; }

    table td::before {
        content: attr(data-label);
        color: var(--ink-muted);
        font-size: 0.8em;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        font-weight: 600;
        flex: 0 0 auto;
    }
}

.error {
    background: var(--err-bg);
    color: var(--err-ink);
    padding: 0.7em 0.9em;
    border-radius: 6px;
    margin-bottom: 1em;
    font-size: 0.9em;
}

.saved {
    background: var(--ok-bg);
    color: var(--ok-ink);
    padding: 0.7em 0.9em;
    border-radius: 6px;
    margin-bottom: 1em;
    font-size: 0.9em;
}

body.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5em;
}

.login-card {
    background: var(--surface);
    padding: 2em;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 380px;
}

.login-card h1 { margin: 0 0 1em; font-size: 1.4em; }
.login-card label { display: block; margin-bottom: 0.3em; font-size: 0.9em; color: var(--ink-muted); }

.login-card input[type=email],
.login-card input[type=password],
.login-card input[type=text] {
    width: 100%;
    padding: 0.6em;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    margin-bottom: 1em;
}

.login-card button {
    width: 100%;
    padding: 0.75em;
    background: var(--ink);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    cursor: pointer;
}

.login-card button:hover { background: #374151; }

.step-hint { margin: -0.4em 0 1.2em; font-size: 0.9em; color: var(--ink-muted); }
.step-back { margin: 1.2em 0 0; text-align: center; font-size: 0.85em; }
.step-back a { color: var(--ink-muted); }

.login-alt { margin: 1.2em 0 0; text-align: center; font-size: 0.85em; }
.login-alt a { color: var(--ink-muted); }

.cf-turnstile { margin-bottom: 1em; min-height: 65px; }

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8em;
    align-items: flex-end;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 1em;
    margin-bottom: 1em;
}

.filters > div { display: flex; flex-direction: column; gap: 0.3em; }
.filters .grow { flex: 1 1 14em; }
.filters label { font-size: 0.8em; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.03em; font-weight: 600; }

.filters select,
.filters input {
    font: inherit;
    padding: 0.45em 0.6em;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
    min-width: 9em;
}

.filters .actions { flex-direction: row; align-items: center; gap: 0.5em; flex-wrap: wrap; flex-basis: 100%; }

.filters button {
    font: inherit;
    padding: 0.5em 1.1em;
    border: none;
    border-radius: 6px;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

.filters button:hover { filter: brightness(1.08); }
.filters button.export { background: var(--ok-ink); }
.filters .reset { padding: 0.5em 0.6em; color: var(--ink-muted); text-decoration: none; }
.filters .reset:hover { color: var(--ink); text-decoration: underline; }

.hint { color: var(--ink-muted); font-size: 0.85em; margin: 0 0 1em; max-width: 70ch; }

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.82em; }

.status-success { background: var(--ok-bg); color: var(--ok-ink); }
.status-failed, .status-rejected { background: var(--err-bg); color: var(--err-ink); }
.status-new, .status-wait, .status-partialcompleted { background: var(--off-bg); color: var(--off-ink); }

.pager { display: flex; justify-content: space-between; align-items: center; gap: 1em; flex-wrap: wrap; margin-top: 1em; font-size: 0.9em; }
.pager .pages { display: flex; align-items: center; gap: 1em; }
.pager .current { color: var(--ink-muted); }

.back { margin: 0 0 0.5em; font-size: 0.9em; }
.back a { color: var(--ink-muted); text-decoration: none; }
.back a:hover { color: var(--ink); text-decoration: underline; }

h2 { font-size: 1.1em; margin: 1.5em 0 0.6em; }

.details dl { display: grid; grid-template-columns: 15em 1fr; gap: 0.55em 1.2em; margin: 0; }
.details dt { color: var(--ink-muted); font-size: 0.9em; }
.details dd { margin: 0; display: flex; align-items: center; gap: 0.6em; flex-wrap: wrap; }

@media (max-width: 640px) {
    .details dl { grid-template-columns: 1fr; gap: 0.15em; }
    .details dt { margin-top: 0.6em; font-size: 0.8em; text-transform: uppercase; letter-spacing: 0.03em; font-weight: 600; }
}

@media (max-width: 640px) {
    table td .mono { word-break: break-all; text-align: right; }
}

.table-wrap + .hint { margin: 1em 0 0; }

.details .hint { margin: 0.9em 0 0; }
.details .hint:first-child { margin: 0 0 1.1em; }

.details dt .param {
    display: inline-block;
    margin-left: 0.4em;
    padding: 0.05em 0.4em;
    border-radius: 4px;
    background: var(--off-bg);
    color: var(--ink-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.9em;
    text-transform: none;
    letter-spacing: 0;
}

.reveal { display: inline-flex; align-items: center; gap: 0.8em; flex-wrap: wrap; }
.reveal .secret { color: var(--ink); letter-spacing: 0.02em; word-break: break-all; }
.reveal .copied { font-size: 0.85em; }

button.link {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-size: 0.9em;
    color: var(--accent);
    cursor: pointer;
}

button.link:hover { text-decoration: underline; }
button.link:disabled { color: var(--ink-muted); cursor: default; text-decoration: none; }

.key-error { margin-top: 0.9em; }

.dir { display: inline-block; padding: 0.15em 0.55em; border-radius: 4px; font-size: 0.8em; font-weight: 600; white-space: nowrap; }
.dir-in { background: #e0edff; color: #1e40af; }
.dir-out { background: var(--off-bg); color: var(--off-ink); }

.unverified {
    display: inline-block;
    width: 1.25em;
    height: 1.25em;
    margin-left: 0.35em;
    border-radius: 50%;
    background: var(--off-bg);
    color: var(--ink-muted);
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1.25em;
    text-align: center;
    cursor: help;
}

table.timeline td { vertical-align: top; }
table.timeline td.actions { text-align: right; }
table.timeline tr.series td { background: #fbfbfd; }
table.timeline .note { display: block; margin-top: 0.25em; color: var(--err-ink); font-size: 0.85em; white-space: normal; }
table.timeline tr[hidden] { display: none; }

table.timeline tr.event-details td { padding: 0; border-bottom: 1px solid var(--line); }
.detail-body { padding: 0.9em 1em; background: #fbfbfd; }
.detail-title { color: var(--ink-muted); font-size: 0.8em; text-transform: uppercase; letter-spacing: 0.03em; font-weight: 600; margin-bottom: 0.3em; }
.detail-title + pre { margin: 0 0 1em; }
.detail-body pre:last-child { margin-bottom: 0; }

.detail-body pre {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.82em;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    max-height: 22em;
    overflow: auto;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 0.7em 0.8em;
}

.timeline-error { margin-top: 0.9em; }

@media (max-width: 640px) {
    table.timeline td.detail-cell { padding: 0; }
    table.timeline td.detail-cell::before { content: none; }
    table.timeline td.actions { text-align: left; }
    table.timeline .what { text-align: right; }
    table.timeline .note { margin-top: 0.4em; }
}

.filters .check { flex-direction: row; align-items: center; gap: 0.45em; align-self: center; padding-top: 1.1em; }
.filters .check input { min-width: 0; width: 1.05em; height: 1.05em; }
.filters .check label { text-transform: none; letter-spacing: 0; font-size: 0.9em; color: var(--ink); }

table.requests td { vertical-align: top; }
table.requests td.actions { text-align: right; }
table.requests tr[hidden] { display: none; }
table.requests .request-what { display: flex; flex-direction: column; gap: 0.25em; align-items: flex-start; }
table.requests .what { display: flex; gap: 0.5em; align-items: baseline; flex-wrap: wrap; }
table.requests .request-error { color: var(--err-ink); font-size: 0.85em; white-space: normal; }

table.requests tr.request-details td { padding: 0; border-bottom: 1px solid var(--line); }

.detail-headers { display: grid; grid-template-columns: auto 1fr; gap: 0.15em 0.9em; margin: 0 0 1em; font-size: 0.85em; }
.detail-headers dt { color: var(--ink-muted); font-weight: 600; white-space: nowrap; }
.detail-headers dd { margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }

.requests-error { margin-top: 0.9em; }

@media (max-width: 640px) {
    table.requests td.detail-cell { padding: 0; }
    table.requests td.detail-cell::before { content: none; }
    table.requests td.actions { text-align: left; }
    table.requests .request-what { align-items: flex-end; text-align: right; }
    .detail-headers { grid-template-columns: 1fr; }
    .detail-headers dd { margin-bottom: 0.4em; }
    .filters .check { padding-top: 0; }
}

.resend-result { font-size: 0.9em; padding: 0.45em 0.7em; border-radius: 6px; }
.resend-result.ok { background: var(--ok-bg); color: var(--ok-ink); }
.resend-result.warn { background: var(--err-bg); color: var(--err-ink); }
.resend-result.plain { color: var(--ink-muted); }

.not-found-links { display: flex; gap: 1.2em; justify-content: center; margin: 1.2em 0 0; }

.card.empty p { max-width: 70ch; margin-left: auto; margin-right: auto; }

.account-number { margin-top: 1em; }
.account-number code { font-size: 1.3em; letter-spacing: 0.05em; color: var(--ink); }

.empty-action { margin-top: 1.2em; }

a.button {
    display: inline-block;
    font: inherit;
    padding: 0.55em 1.2em;
    border-radius: 6px;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}

a.button:hover { filter: brightness(1.08); }

.details dd, .details .mono { overflow-wrap: anywhere; }

.form-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 1.2em;
    margin-bottom: 1em;
    display: flex;
    flex-direction: column;
    gap: 1em;
    max-width: 46em;
}

.field { display: flex; flex-direction: column; gap: 0.3em; }
.field label,
.field .field-title { font-size: 0.8em; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.03em; font-weight: 600; }

.checks { display: flex; flex-wrap: wrap; gap: 0.5em 1.2em; padding: 0.25em 0; }

.field .checks label.check {
    display: flex;
    align-items: center;
    gap: 0.45em;
    font-size: 0.95em;
    color: var(--ink);
    text-transform: none;
    letter-spacing: normal;
    font-weight: 400;
    cursor: pointer;
}

.field .checks input { width: 1.05em; height: 1.05em; margin: 0; }

.field input,
.field select,
.field textarea {
    font: inherit;
    padding: 0.5em 0.65em;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
    width: 100%;
    box-sizing: border-box;
}

.field .field-hint { font-size: 0.8em; color: var(--ink-muted); }
.field .field-error { font-size: 0.85em; color: var(--err-ink); }
.field.invalid input, .field.invalid select { border-color: var(--err-ink); }

.field-row { display: flex; gap: 0.9em; flex-wrap: wrap; }
.field-row .field { flex: 1 1 12em; }

.gateway-fields { display: flex; flex-direction: column; gap: 1em; }
.gateway-fields[hidden] { display: none; }

.choice {
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 0.9em;
    display: flex;
    flex-direction: column;
    gap: 0.7em;
}

.choice .choice-title { font-size: 0.8em; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.03em; font-weight: 600; }
.choice-tabs { display: flex; gap: 1em; flex-wrap: wrap; }
.choice-tabs label { display: flex; align-items: center; gap: 0.4em; font-size: 0.9em; cursor: pointer; }
.choice-tabs input { width: 1.05em; height: 1.05em; }
.choice [data-group] { display: flex; flex-direction: column; gap: 0.7em; }
.choice [data-group][hidden] { display: none; }

.form-card .extra { border: 1px solid var(--line); border-radius: 6px; padding: 0.6em 0.9em; }
.form-card .extra[open] { padding-bottom: 0.9em; }
.form-card .extra summary { cursor: pointer; font-size: 0.9em; color: var(--ink-muted); }
.form-card .extra .field { margin-top: 0.9em; }

.form-card .actions { display: flex; gap: 0.8em; align-items: center; flex-wrap: wrap; }

.form-card button {
    font: inherit;
    padding: 0.55em 1.2em;
    border: none;
    border-radius: 6px;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

.form-card button:hover { filter: brightness(1.08); }

.form-card .actions a { font-size: 0.9em; color: var(--ink-muted); }

.qr {
    display: block;
    width: 228px;
    height: 228px;
    max-width: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    padding: 0.5em;
    box-sizing: border-box;
}

.invoice-result {
    background: var(--ok-bg);
    border: 1px solid var(--ok-ink);
    border-radius: 8px;
    padding: 1em 1.1em;
    margin-bottom: 1em;
    max-width: 46em;
}

.invoice-result .invoice-done { margin: 0 0 0.7em; color: var(--ok-ink); font-weight: 600; }
.invoice-link { display: flex; gap: 0.5em; flex-wrap: wrap; }
.invoice-link input { font: inherit; flex: 1 1 18em; padding: 0.5em 0.65em; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); }

.invoice-link button {
    font: inherit;
    padding: 0.5em 1em;
    border: none;
    border-radius: 6px;
    background: var(--ok-ink);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

.invoice-meta { margin: 0.7em 0 0; font-size: 0.85em; color: var(--ink-muted); }
.invoice-meta .sep { margin: 0 0.4em; }

@media (max-width: 640px) {
    .form-card { padding: 1em; }
    .field-row .field { flex-basis: 100%; }
    .invoice-link input { flex-basis: 100%; }
    .invoice-link button { width: 100%; }
}

.invoice-result .invoice-warn { margin: 0.7em 0 0; font-size: 0.85em; color: var(--ok-ink); font-weight: 600; }

table tr[hidden] { display: none; }

.filters .find { flex: 1 1 20em; max-width: 30em; }
.filters .found { justify-content: flex-end; align-self: center; padding-top: 1.1em; color: var(--ink-muted); font-size: 0.85em; }

select[hidden] { display: none; }

.tp { position: relative; display: block; width: 100%; }
.tp-input { width: 100%; padding-right: 1.9em; text-overflow: ellipsis; }
.tp-arrow { position: absolute; right: 0.65em; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--ink-muted); font-size: 0.75em; }
.tp.open .tp-arrow { transform: translateY(-50%) rotate(180deg); }

.tp-list {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 100%;
    width: max-content;
    max-width: 26em;
    margin-top: 2px;
    display: none;
    max-height: 20em;
    overflow-y: auto;
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 6px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.14);
    z-index: 20;
}

.tp.open .tp-list { display: block; }
.tp.up .tp-list { top: auto; bottom: 100%; margin: 0 0 2px; }

.tp-option {
    padding: 0.45em 0.7em;
    font-size: 0.9em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.tp-option.active { background: #eff6ff; }
.tp-option.current { background: var(--ink); color: #fff; }
.tp-option.current.active { background: #374151; }
.tp-empty { padding: 0.9em 0.7em; text-align: center; font-size: 0.88em; color: var(--ink-muted); }

.tp-group {
    padding: 0.5em 0.7em 0.25em;
    font-size: 0.78em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--ink-muted);
}

@media (max-width: 640px) {
    .filters .found { padding-top: 0; align-self: flex-start; }
}

.currency-head { font-size: 1.05em; margin: 1.6em 0 0.6em; color: var(--ink-muted); }

.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.8em; margin-bottom: 1.2em; }

.tile {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0.9em 1em;
    display: flex;
    flex-direction: column;
    gap: 0.25em;
    min-width: 0;
}

.tile-label { font-size: 0.82em; color: var(--ink-muted); }
.tile strong { font-size: 1.5em; font-variant-numeric: tabular-nums; line-height: 1.15; overflow-wrap: anywhere; }
.tile-sub { font-size: 0.82em; color: var(--ink-muted); min-height: 1.2em; }
.tile-sub a { color: var(--accent); text-decoration: none; }
.tile-sub a:hover { text-decoration: underline; }

.chart-head { display: flex; justify-content: space-between; align-items: center; gap: 1em; flex-wrap: wrap; margin-bottom: 0.6em; }

.switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--surface); }
.switch a { padding: 0.4em 1.1em; font-size: 0.88em; color: var(--ink-muted); text-decoration: none; }
.switch a.on { background: var(--ink); color: #fff; }
.switch a:not(.on):hover { background: var(--off-bg); color: var(--ink); }

.legend { display: flex; align-items: center; gap: 0.4em; font-size: 0.82em; color: var(--ink-muted); }
.legend .key { width: 0.7em; height: 0.7em; border-radius: 2px; display: inline-block; }
.legend .key:not(:first-child) { margin-left: 0.8em; }
.legend .key-success { background: #22c55e; }
.legend .key-failed { background: #ef4444; }
.legend .key-progress { background: #d1d5db; }

.chart-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 0.8em 0.4em 0.2em; overflow-x: auto; }
.chart { display: block; }
.chart .axis { stroke: var(--line); stroke-width: 1; }
.chart .hit { fill: transparent; }
.chart a:hover .hit { fill: rgba(37, 99, 235, 0.07); }
.chart .bar-success { fill: #22c55e; }
.chart .bar-failed { fill: #ef4444; }
.chart .bar-progress { fill: #d1d5db; }
.chart .tick { fill: var(--ink-muted); font-size: 10px; text-anchor: middle; }

@media (max-width: 900px) {
    .tiles { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .tiles { grid-template-columns: 1fr; }
    .tile strong { font-size: 1.3em; }
    .chart-head { gap: 0.6em; }
}

.terminal-cell .mono { margin-left: 0.45em; }

.row-actions { display: flex; gap: 0.9em; align-items: center; flex-wrap: wrap; }
.row-actions form { display: inline; margin: 0; }
.row-actions a { font-size: 0.9em; }

td .ok { color: var(--ok-ink); }
td .error-text { color: var(--err-ink); }

.preview {
    white-space: pre-wrap;
    word-break: break-word;
    background: var(--off-bg);
    border-radius: 8px;
    padding: 0.9em 1.1em;
    line-height: 1.5;
}

.preview a { color: var(--accent); }

.notes { margin: 0.9em 0 0; padding-left: 1.2em; color: var(--err-ink); font-size: 0.9em; }
.notes li { margin-bottom: 0.3em; }
.notes:empty { display: none; }

.answers { margin: 0; padding: 0; list-style: none; font-size: 0.9em; }
.answers li { margin-bottom: 0.2em; }
.answers .q { color: var(--ink-muted); }

@media (max-width: 720px) {
    .row-actions { gap: 0.7em; }
}

.balances { max-width: 720px; margin-bottom: 1.2em; }
.balances tfoot td { font-weight: 600; background: #f3f4f6; border-top: 2px solid var(--line); }

table.zebra tbody tr:nth-child(even) td { background: #eef1f6; }
table.zebra tbody tr:hover td { background: #e0e7ff; }

.payout-request { display: flex; gap: 1em; align-items: end; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 1em 1.1em; margin-bottom: 1.2em; }
.payout-request label { display: block; font-size: 0.85em; color: var(--ink-muted); margin-bottom: 0.3em; }
.payout-request select, .payout-request input { padding: 0.45em 0.6em; border: 1px solid var(--line); border-radius: 6px; font-size: 0.95em; }

nav.tabs { display: flex; gap: 0.3em; margin-bottom: 1em; padding: 0; background: transparent; border-bottom: 1px solid var(--line); }
nav.tabs a { padding: 0.55em 1em; text-decoration: none; color: var(--ink-muted); border-bottom: 2px solid transparent; }
nav.tabs a.current { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }

td.in { color: #047857; font-variant-numeric: tabular-nums; }
td.out { color: #b91c1c; font-variant-numeric: tabular-nums; }
td.hash { font-family: ui-monospace, monospace; font-size: 0.82em; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 720px) {
    .payout-request { flex-direction: column; align-items: stretch; }
    .payout-request select, .payout-request input { width: 100%; }
}

.payout-request button {
    font: inherit;
    padding: 0.5em 1.1em;
    border: none;
    border-radius: 6px;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

.payout-request button:hover { filter: brightness(1.08); }
