:root {
    --bg: #07110d;
    --panel: rgba(11, 24, 19, 0.92);
    --panel-strong: rgba(15, 31, 24, 0.98);
    --line: rgba(165, 255, 205, 0.10);
    --line-strong: rgba(165, 255, 205, 0.2);
    --text: #f2fff8;
    --muted: rgba(242, 255, 248, 0.72);
    --green: #34d399;
    --amber: #fbbf24;
    --red: #fb7185;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background:
        radial-gradient(circle at top left, rgba(52, 211, 153, 0.12), transparent 30%),
        radial-gradient(circle at bottom right, rgba(251, 191, 36, 0.08), transparent 24%),
        linear-gradient(180deg, #04100b 0%, #08150f 50%, #04100b 100%);
    color: var(--text);
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

.page-shell {
    max-width: 1360px;
    margin: 0 auto;
    padding: 1.25rem;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.2rem 1.3rem;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(10, 24, 18, 0.96), rgba(8, 16, 12, 0.9));
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.eyebrow {
    margin: 0 0 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--green);
    font-size: 0.74rem;
    font-weight: 800;
}

.topbar h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.4rem);
    letter-spacing: -0.04em;
}

.subcopy {
    margin: 0.55rem 0 0;
    max-width: 760px;
    color: var(--muted);
    line-height: 1.65;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.ghost-link,
.refresh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.8rem 1.1rem;
    font-weight: 700;
    border: 1px solid var(--line-strong);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.ghost-link {
    background: rgba(255, 255, 255, 0.04);
}

.refresh-btn {
    color: #04100b;
    background: linear-gradient(135deg, #9ef0be, #34d399);
    border: none;
    cursor: pointer;
}

.ghost-link:hover,
.refresh-btn:hover {
    transform: translateY(-1px);
}

.dashboard-grid {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.metric-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.metric-card,
.content-panel,
.hero-panel {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.metric-card {
    padding: 1rem 1.05rem;
    min-height: 118px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.metric-card.alert {
    background: linear-gradient(180deg, rgba(56, 23, 28, 0.92), rgba(18, 10, 12, 0.95));
    border-color: rgba(251, 113, 133, 0.22);
}

.metric-label {
    color: var(--muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.metric-card strong {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    line-height: 1;
}

.hero-panel {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 1rem;
    padding: 1.2rem;
    background:
        radial-gradient(circle at top right, rgba(52, 211, 153, 0.14), transparent 28%),
        linear-gradient(180deg, rgba(12, 28, 22, 0.96), rgba(9, 18, 14, 0.94));
}

.panel-kicker {
    margin: 0 0 0.35rem;
    text-transform: uppercase;
    color: var(--amber);
    letter-spacing: 0.14em;
    font-size: 0.75rem;
    font-weight: 800;
}

.hero-panel h2 {
    margin: 0;
    font-size: clamp(1.4rem, 2.6vw, 2.1rem);
}

.hero-panel p {
    color: var(--muted);
    line-height: 1.65;
}

.hero-panel-visual {
    position: relative;
    min-height: 220px;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(8, 16, 12, 0.45), rgba(14, 32, 23, 0.75));
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    opacity: 0.9;
}

.orb-a {
    width: 150px;
    height: 150px;
    top: 10%;
    left: 8%;
    background: radial-gradient(circle, rgba(52, 211, 153, 0.85), rgba(52, 211, 153, 0.05));
}

.orb-b {
    width: 180px;
    height: 180px;
    bottom: -20px;
    right: -10px;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.8), rgba(251, 191, 36, 0.04));
}

.orb-c {
    width: 92px;
    height: 92px;
    top: 36%;
    right: 28%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.04));
}

.content-panel {
    padding: 1rem;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.9rem;
}

.section-head h3 {
    margin: 0;
    font-size: 1.1rem;
}

.live-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: rgba(52, 211, 153, 0.12);
    color: #a7f3d0;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--green);
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.45);
    animation: pulse 1.6s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.45); }
    70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.helper-text {
    color: var(--muted);
    font-size: 0.85rem;
}

.order-tape,
.flagged-list {
    display: grid;
    gap: 0.75rem;
}

.order-row,
.flagged-row {
    display: grid;
    grid-template-columns: 0.9fr 0.6fr 0.6fr 0.7fr 0.9fr 1fr;
    gap: 0.7rem;
    align-items: center;
    padding: 0.9rem 0.95rem;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.03);
}

.flagged-row {
    background: rgba(22, 28, 19, 0.92);
}

.order-row.suspicious,
.flagged-row.suspicious {
    border-color: rgba(251, 113, 133, 0.22);
    background: linear-gradient(180deg, rgba(54, 19, 25, 0.9), rgba(26, 11, 15, 0.94));
}

.order-row .pill,
.flagged-row .pill {
    display: inline-flex;
    width: fit-content;
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.pill.buy {
    color: #b7f7cf;
    background: rgba(52, 211, 153, 0.12);
}

.pill.sell {
    color: #ffd1d8;
    background: rgba(251, 113, 133, 0.12);
}

.pill.high {
    color: #fee2e2;
    background: rgba(251, 113, 133, 0.18);
}

.pill.mid {
    color: #fde68a;
    background: rgba(251, 191, 36, 0.18);
}

.order-meta {
    color: var(--muted);
    font-size: 0.83rem;
}

.order-id {
    font-weight: 800;
}

.score-bar {
    height: 10px;
    width: 100%;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    overflow: hidden;
}

.score-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #34d399, #fbbf24, #fb7185);
}

.flagged-header {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: center;
}

.flagged-label {
    font-size: 0.82rem;
    color: var(--muted);
}

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

@media (max-width: 1100px) {
    .metric-row,
    .hero-panel {
        grid-template-columns: 1fr;
    }

    .order-row,
    .flagged-row {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 720px) {
    .page-shell {
        padding: 0.9rem;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .order-row,
    .flagged-row {
        grid-template-columns: 1fr;
    }

    .section-head {
        flex-direction: column;
        align-items: flex-start;
    }
}
