:root {
    color-scheme: dark;
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background:
        radial-gradient(
            circle at top left,
            #17202c 0,
            #0b0f15 38%,
            #07090d 100%
        );
    color: #e9edf3;
    min-height: 100vh;
}

button {
    font: inherit;
}

.page {
    max-width: 1600px;
    margin: 0 auto;
    padding: 34px;
}

.header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 28px;
}

.eyebrow {
    color: #7e8da4;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .16em;
}

h1 {
    margin: 7px 0 4px;
    font-size: 34px;
    letter-spacing: -.035em;
}

.subtitle {
    margin: 0;
    color: #8d97a8;
}

.status-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 250px;
    background: rgba(17, 23, 32, .82);
    border: 1px solid #26303e;
    border-radius: 14px;
    padding: 14px 17px;
}

.status-card strong,
.status-card small {
    display: block;
}

.status-card small {
    margin-top: 3px;
    color: #8792a4;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #55d98b;
    box-shadow:
        0 0 13px rgba(85,217,139,.65);
}

.summary-grid {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0,1fr));
    gap: 14px;
    margin-bottom: 25px;
}

.summary-card {
    background:
        rgba(16,21,29,.84);
    border: 1px solid #252e3b;
    border-radius: 15px;
    padding: 18px;
}

.summary-card span,
.summary-card small {
    color: #7f8999;
}

.summary-card strong {
    display: block;
    margin: 8px 0 4px;
    font-size: 25px;
}

.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.tab {
    border: 1px solid #293343;
    background: #101620;
    color: #9ca7b8;
    border-radius: 10px;
    padding: 10px 17px;
    cursor: pointer;
}

.tab.active {
    color: white;
    background: #1d2735;
    border-color: #42516a;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    margin: 18px 2px 12px;
}

.section-head h2 {
    margin: 0 0 4px;
}

.section-head p {
    margin: 0;
    color: #7f8999;
}

.snapshot-date {
    color: #8490a2;
    font-size: 14px;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid #242d39;
    border-radius: 15px;
    background:
        rgba(10,14,20,.91);
}

table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

th,
td {
    padding: 12px 13px;
    border-bottom:
        1px solid rgba(255,255,255,.055);
    text-align: left;
    font-size: 14px;
}

th {
    color: #7f8999;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .055em;
    background: #101620;
    position: sticky;
    top: 0;
}

tbody tr:hover {
    background:
        rgba(255,255,255,.035);
}

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

.num {
    text-align: right;
    font-variant-numeric:
        tabular-nums;
}

.total {
    font-weight: 700;
    color: #f1f4f8;
}

.address-button {
    border: 0;
    padding: 0;
    color: #91b7ff;
    background: transparent;
    cursor: pointer;
}

.address-button:hover {
    text-decoration: underline;
}

.badge {
    display: inline-flex;
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 700;
}

.badge-eoa {
    color: #7fe0ad;
    background:
        rgba(63,183,119,.13);
    border:
        1px solid rgba(63,183,119,.25);
}

.badge-contract {
    color: #eab977;
    background:
        rgba(217,145,49,.12);
    border:
        1px solid rgba(217,145,49,.25);
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    padding: 25px;
    background: rgba(0,0,0,.72);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.show {
    display: flex;
}

.modal-card {
    width: min(1000px, 96vw);
    background: #101620;
    border: 1px solid #303b4b;
    border-radius: 18px;
    padding: 25px;
    position: relative;
    box-shadow:
        0 25px 80px rgba(0,0,0,.5);
}

.modal-card h2 {
    font-size: 18px;
    word-break: break-all;
}

.modal-close {
    position: absolute;
    top: 13px;
    right: 16px;
    border: 0;
    background: transparent;
    color: #aab3c0;
    font-size: 28px;
    cursor: pointer;
}

.chart-box {
    height: 420px;
    margin-top: 20px;
    display: none;
}

#history-empty {
    color: #8490a2;
}

@media (
    max-width: 900px
) {
    .page {
        padding: 18px;
    }

    .header {
        flex-direction: column;
    }

    .status-card {
        width: 100%;
    }

    .summary-grid {
        grid-template-columns:
            repeat(2, minmax(0,1fr));
    }
}

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

    h1 {
        font-size: 28px;
    }
}
