/* Falcon Ledger — dark theme, red accent */
:root {
    --bg:           #000000;
    --bg-elev:      #0a0a0a;
    --bg-row:       #0e0e0e;
    --bg-row-alt:   #121212;
    --bg-row-hover: #1a1a1a;
    --border:       #1f1f1f;
    --border-strong:#2a2a2a;
    --text:         #f0f0f0;
    --text-dim:     #888888;
    --text-faint:   #555555;
    --accent:       #d62828;    /* the touch of red */
    --accent-dim:   #8a1a1a;
    --good:         #4ade80;
    --warn:         #facc15;
    --bad:          #d62828;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    background: var(--bg);
    color: var(--text);
    font-family: ui-monospace, "SF Mono", "Cascadia Mono", "JetBrains Mono", Menlo, Consolas, monospace;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

header {
    border-bottom: 1px solid var(--border);
    padding: 20px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-elev);
}

header .brand {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

header .brand-mark {
    color: var(--accent);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.05em;
}

header .brand-sub {
    color: var(--text-faint);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

header .meta {
    color: var(--text-dim);
    font-size: 12px;
}

header .meta .dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--good);
    margin-right: 6px;
    vertical-align: middle;
}

main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    padding: 16px 20px;
    border-radius: 4px;
}

.stat .label {
    color: var(--text-faint);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
}

.stat .value {
    font-size: 24px;
    font-weight: 600;
    color: var(--text);
}

.stat .value.accent {
    color: var(--accent);
}

.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text);
}

.section-header h2::before {
    content: "▌";
    color: var(--accent);
    margin-right: 8px;
}

.section-header .hint {
    color: var(--text-faint);
    font-size: 11px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
}

thead {
    background: var(--bg);
    border-bottom: 1px solid var(--border-strong);
}

th {
    text-align: left;
    padding: 12px 16px;
    color: var(--text-faint);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 1px solid var(--border);
}

th.right, td.right {
    text-align: right;
}

td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-size: 13px;
}

tbody tr:nth-child(even) {
    background: var(--bg-row-alt);
}

tbody tr:hover {
    background: var(--bg-row-hover);
}

tbody tr:last-child td {
    border-bottom: none;
}

td.amount {
    font-variant-numeric: tabular-nums;
    font-weight: 500;
}

td.dim {
    color: var(--text-dim);
}

.status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 2px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.status.authorised {
    background: rgba(74, 222, 128, 0.1);
    color: var(--good);
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.status.draft {
    background: rgba(250, 204, 21, 0.1);
    color: var(--warn);
    border: 1px solid rgba(250, 204, 21, 0.3);
}

.status.voided, .status.deleted {
    background: rgba(214, 40, 40, 0.1);
    color: var(--accent);
    border: 1px solid rgba(214, 40, 40, 0.3);
}

footer {
    border-top: 1px solid var(--border);
    padding: 16px 32px;
    color: var(--text-faint);
    font-size: 11px;
    text-align: center;
    margin-top: 64px;
}

footer .accent {
    color: var(--accent);
}

.empty {
    padding: 48px;
    text-align: center;
    color: var(--text-dim);
}

/* ── mobile (iPhone / ≤480px) ─────────────────────────────────────── */

@media (max-width: 480px) {

    html, body {
        font-size: 13px;
        -webkit-text-size-adjust: 100%;
    }

    header {
        padding: 14px 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    header .brand-sub {
        font-size: 10px;
    }

    header .meta {
        font-size: 10px;
    }

    main {
        padding: 16px 12px;
    }

    .stats {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-bottom: 20px;
    }

    .stat {
        padding: 12px 14px;
    }

    .stat .label {
        font-size: 9px;
        margin-bottom: 4px;
    }

    .stat .value {
        font-size: 18px;
    }

    .stat .value[style] {
        font-size: 13px !important;
    }

    .section-header {
        flex-direction: column;
        gap: 4px;
        margin-bottom: 10px;
    }

    .section-header h2 {
        font-size: 12px;
    }

    .section-header .hint {
        font-size: 10px;
    }

    /* horizontal swipe for the table */
    .table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -12px;
        padding: 0 12px;
    }

    table {
        min-width: 600px;
        font-size: 12px;
    }

    th, td {
        padding: 10px 10px;
        font-size: 12px;
        white-space: nowrap;
    }

    th {
        font-size: 10px;
    }

    .status {
        font-size: 10px;
        padding: 2px 6px;
    }

    footer {
        padding: 12px 16px;
        font-size: 10px;
        margin-top: 32px;
    }
}
