/* =========================
   THEME VARIABLES
========================= */
:root {
    --bg: #f3f4f6;
    --text: #111827;
    --card: #ffffff;
    --accent: #2563eb;
    --border: #e5e7eb;

    --ok-bg: #dcfce7;
    --ok-text: #166534;

    --wait-bg: #fef9c3;
    --wait-text: #854d0e;

    --post-bg: #fee2e2;
    --post-text: #991b1b;
}

[data-theme="dark"] {
    --bg: #0f172a;
    --text: #e5e7eb;
    --card: #1e293b;
    --accent: #38bdf8;
    --border: #334155;

    --ok-bg: #14532d;
    --ok-text: #bbf7d0;

    --wait-bg: #713f12;
    --wait-text: #fde68a;

    --post-bg: #7f1d1d;
    --post-text: #fecaca;
}

/* =========================
   GLOBAL
========================= */
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, Segoe UI, sans-serif;
}

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

.container {
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 20px;
}

/* =========================
   HEADER
========================= */
.topbar {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 18px;
    font-weight: 700;
}

.nav a {
    margin-right: 15px;
}

.nav button {
    background: none;
    border: 1px solid var(--border);
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
}

/* =========================
   PAGE TITLE (HERO)
========================= */
.page-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    font-size: 30px;
    font-weight: 900;
    letter-spacing: 0.5px;

    margin: 10px auto 30px;
    padding: 22px 26px;

    color: var(--accent);

    background: linear-gradient(
        135deg,
        rgba(56,189,248,0.15),
        rgba(99,102,241,0.15)
    );

    border: 1px solid rgba(56,189,248,0.4);
    border-radius: 18px;

    box-shadow:
        0 10px 30px rgba(0,0,0,.25),
        inset 0 0 0 1px rgba(255,255,255,.05);
}
.filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}
/* =========================
   FORM
========================= */
form {
    margin-bottom: 20px;
}

select, button {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
}

/* =========================
   TABLE
========================= */
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
}

th {
    background: rgba(0,0,0,.03);
    text-align: left;
    padding: 12px;
    font-size: 14px;
}

td {
    padding: 12px;
    border-top: 1px solid var(--border);
}

/* =========================
   STATUS
========================= */
.stato-G {
    background: var(--ok-bg);
    color: var(--ok-text);
    font-weight: 600;
    text-align: center;
}

.stato-D {
    background: var(--wait-bg);
    color: var(--wait-text);
    font-weight: 600;
    text-align: center;
}

.stato-R {
    background: var(--post-bg);
    color: var(--post-text);
    font-weight: 600;
    text-align: center;
}

/* =========================
   NEXT MATCH
========================= */
tr.prossima {
    outline: 3px solid var(--accent);
    outline-offset: -3px;
}

/* =========================
   FOOTER
========================= */
.footer {
    text-align: center;
    margin: 40px 0 20px;
    font-size: 14px;
    opacity: .7;
}