:root {
    --bg: #f2ede3;
    --panel: rgba(255, 252, 246, 0.92);
    --panel-strong: #fffdf8;
    --ink: #1c1915;
    --muted: #685d52;
    --line: rgba(28, 25, 21, 0.12);
    --accent: #b6461d;
    --positive: #1f7a4e;
    --negative: #a33b21;
    --shadow: 0 20px 60px rgba(64, 42, 24, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Barlow", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(182, 70, 29, 0.18), transparent 32%),
        radial-gradient(circle at top right, rgba(56, 104, 83, 0.18), transparent 28%),
        linear-gradient(180deg, #f7f1e6 0%, var(--bg) 100%);
    min-height: 100vh;
}

.shell {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0 48px;
}

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

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

h1, h2, strong {
    font-family: "Space Grotesk", sans-serif;
}

h1 {
    margin: 0;
    font-size: clamp(2.3rem, 4vw, 4.5rem);
    line-height: 0.95;
    max-width: 12ch;
}

.hero-copy {
    max-width: 60ch;
    color: var(--muted);
    font-size: 1.05rem;
}

.hero-meta,
.panel,
.stat-card {
    background: var(--panel);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: var(--shadow);
    border-radius: 22px;
}

.hero-meta {
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 180px;
}

.hero-meta span {
    color: var(--muted);
}

.hero-meta strong {
    font-size: clamp(2rem, 4vw, 3.4rem);
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    padding: 18px 20px;
}

.stat-card span {
    color: var(--muted);
    display: block;
    margin-bottom: 8px;
}

.stat-card strong {
    font-size: 1.6rem;
}

.stat-card.accent {
    background: linear-gradient(135deg, rgba(182, 70, 29, 0.96), rgba(138, 47, 17, 0.9));
    color: white;
}

.stat-card.accent span {
    color: rgba(255, 255, 255, 0.85);
}

.panel {
    padding: 20px;
    margin-bottom: 20px;
}

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

.filters label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-weight: 600;
}

.filters input,
.filters select,
.actions a,
.actions button {
    min-height: 46px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #fffdf8;
    padding: 0 14px;
    font: inherit;
    color: var(--ink);
}

.checkbox {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding-top: 28px;
}

.checkbox input {
    min-height: auto;
}

.actions {
    display: flex;
    align-items: end;
    gap: 12px;
}

.actions button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.actions button {
    background: var(--ink);
    color: white;
    border-color: transparent;
}

.ghost-button {
    color: var(--ink);
}

.results-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-bottom: 16px;
}

.results-head h2 {
    margin: 0;
}

.results-head p {
    margin: 4px 0 0;
    color: var(--muted);
}

.pager {
    display: flex;
    gap: 10px;
}

.pager a {
    text-decoration: none;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 10px 16px;
    background: #fffdf8;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 860px;
}

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

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

tbody tr:hover {
    background: rgba(182, 70, 29, 0.05);
}

td a {
    color: var(--accent);
    font-weight: 700;
}

.positive {
    color: var(--positive);
    font-weight: 700;
}

.negative {
    color: var(--negative);
    font-weight: 700;
}

.empty {
    text-align: center;
    color: var(--muted);
    padding: 32px 12px;
}

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    background: rgba(28, 25, 21, 0.08);
    border-radius: 8px;
    padding: 2px 6px;
}

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

@media (max-width: 720px) {
    .shell {
        width: min(100% - 20px, 1200px);
        padding-top: 20px;
    }

    .hero,
    .stats,
    .filters {
        grid-template-columns: 1fr;
    }

    .actions,
    .results-head {
        flex-direction: column;
        align-items: stretch;
    }
}
