:root {
    --bg: #f4efe4;
    --surface: rgba(255, 250, 240, 0.88);
    --surface-strong: #fff8ee;
    --ink: #1a1f1c;
    --muted: #58635d;
    --line: rgba(33, 41, 36, 0.12);
    --accent: #005f73;
    --accent-soft: #e1f0ec;
    --signal: #bb3e03;
    --success: #2a9d8f;
    --warning: #d17a22;
    --shadow: 0 22px 70px rgba(53, 43, 28, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(255, 213, 128, 0.32), transparent 28%),
        radial-gradient(circle at 85% 15%, rgba(0, 95, 115, 0.18), transparent 26%),
        linear-gradient(180deg, #f6f0e6 0%, #eee2d0 100%);
}

.page-shell {
    max-width: 1320px;
    margin: 0 auto;
    padding: 32px 20px 48px;
}

.hero {
    display: grid;
    grid-template-columns: 1.5fr 0.9fr;
    gap: 20px;
    align-items: end;
    margin-bottom: 24px;
}

.eyebrow {
    margin: 0 0 8px;
    font-size: 0.8rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
}

h1,
h2,
strong {
    font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
}

h1 {
    margin: 0;
    font-size: clamp(2.5rem, 5vw, 4.2rem);
    line-height: 0.95;
}

.lede {
    max-width: 60ch;
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.6;
}

.layout {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(8px);
}

.hero-status,
.panel-overview,
.panel-wallets,
.panel-signals,
.panel-history,
.panel-system {
    padding: 22px;
}

.hero-status {
    display: flex;
    flex-direction: column;
    gap: 14px;
    justify-content: center;
    background:
        linear-gradient(145deg, rgba(0, 95, 115, 0.06), rgba(42, 157, 143, 0.14)),
        var(--surface-strong);
}

.status-row,
.system-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}

.status-row span,
.section-note,
.system-item span,
.meta-line {
    color: var(--muted);
}

.panel-overview {
    grid-column: span 12;
}

.panel-wallets {
    grid-column: span 8;
}

.panel-signals {
    grid-column: span 4;
}

.panel-history,
.panel-system {
    grid-column: span 6;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.section-heading h2 {
    margin: 0;
    font-size: 1.55rem;
}

.button {
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    font-size: 0.95rem;
    color: #fffaf5;
    background: linear-gradient(135deg, var(--accent), #0a7f95);
    cursor: pointer;
}

.button:hover {
    filter: brightness(1.06);
}

.stats-grid,
.system-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.stat-card,
.system-item {
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.48);
    border: 1px solid rgba(33, 41, 36, 0.08);
}

.stat-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.stat-card strong {
    display: block;
    margin-top: 8px;
    font-size: 1.8rem;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

th {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

td strong {
    font-size: 1rem;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    background: var(--accent-soft);
    color: var(--accent);
}

.pill.signal {
    background: rgba(187, 62, 3, 0.1);
    color: var(--signal);
}

.signals-list,
.history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.signal-card,
.history-card {
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.52);
    border: 1px solid rgba(33, 41, 36, 0.08);
}

.signal-card h3,
.history-card h3 {
    margin: 0 0 10px;
    font-size: 1.02rem;
}

.signal-line,
.history-line {
    margin: 6px 0;
    font-size: 0.95rem;
}

.mono {
    font-family: "Courier New", monospace;
    font-size: 0.9em;
}

.empty-state {
    padding: 18px;
    border-radius: 18px;
    color: var(--muted);
    border: 1px dashed var(--line);
    background: rgba(255, 255, 255, 0.38);
}

@media (max-width: 980px) {
    .hero {
        grid-template-columns: 1fr;
    }

    .panel-wallets,
    .panel-signals,
    .panel-history,
    .panel-system {
        grid-column: span 12;
    }
}

@media (max-width: 680px) {
    .page-shell {
        padding: 20px 14px 32px;
    }

    .section-heading {
        flex-direction: column;
    }

    .button {
        width: 100%;
    }
}
