/* Veerhaven Capital Partners branding — TV-dashboard (1920×1080)
   blauw  #00529b | taupe #8a7967 | font Ubuntu | dotted lijnen */

:root {
    --vh-blue: #00529b;
    --vh-blue-dark: #003c72;
    --vh-taupe: #8a7967;
    --vh-taupe-light: #b3a596;
    --bg: #f4f6f9;
    --card: #ffffff;
    --up: #1e8a4c;
    --down: #c0392b;
    --toto-bg: #c8e6c9;
    --toto-text: #1e6a3c;
}

* { box-sizing: border-box; }

html { font-size: clamp(11px, 0.85vw, 20px); }

body {
    margin: 0;
    background: var(--bg);
    color: var(--vh-blue);
    font-family: 'Ubuntu', sans-serif;
    font-size: 1rem;
    line-height: 1.4;
    overflow: hidden;
}

.tv {
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 1rem 1.25rem 0.5rem;
    gap: 0.9rem;
}

/* ---------- header ---------- */

header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 3px dotted var(--vh-taupe);
    flex: 0 0 auto;
}

.vh-logo { max-height: 4rem; width: auto; }

.header-text h1 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    white-space: nowrap;
}

.subtitle {
    margin: 0;
    color: var(--vh-taupe);
    font-weight: 500;
    font-size: 1rem;
}

.header-stats {
    display: flex;
    gap: 0.9rem;
    flex: 1;
    justify-content: center;
}

.stat-card {
    background: var(--card);
    border-radius: 0.6rem;
    padding: 0.5rem 1.1rem;
    box-shadow: 0 1px 4px rgba(0, 82, 155, .08);
    border-top: 4px solid var(--vh-blue);
    display: flex;
    flex-direction: column;
    min-width: 11rem;
}

.stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--vh-taupe);
    font-weight: 500;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 16rem;
}

.clock {
    text-align: right;
    line-height: 1.15;
}

#clock-time { display: block; font-size: 2.1rem; font-weight: 700; }
#clock-date { display: block; font-size: 0.95rem; color: var(--vh-taupe); font-weight: 500; }

/* ---------- hoofdgrid ---------- */

.grid {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-columns: 23fr 26fr 26fr 25fr;
    gap: 0.9rem;
}

.card {
    background: var(--card);
    border-radius: 0.6rem;
    padding: 0.9rem 1.1rem;
    box-shadow: 0 1px 4px rgba(0, 82, 155, .08);
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.card h2 {
    margin: 0 0 0.6rem;
    font-size: 1.15rem;
    font-weight: 700;
    border-bottom: 3px dotted var(--vh-taupe);
    padding-bottom: 0.45rem;
    flex: 0 0 auto;
}

.card h2 .h2-sub {
    float: right;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--vh-taupe);
}

.col-right {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    min-height: 0;
}

.scorers-card { flex: 0 1 auto; }
.chart-card { flex: 1 1 auto; }

/* ---------- ranking tabel ---------- */

.col-stand table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    flex: 1;
}

.col-stand th {
    text-align: left;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--vh-taupe);
    font-weight: 500;
    padding: 0.15rem 0.4rem;
}

.col-stand td {
    padding: 0.28rem 0.4rem;
    border-top: 1px dotted #d4ccc4;
}

th.num, td.num { text-align: right; }
td.total { font-weight: 700; }
tr.top3 td.rank { font-weight: 700; }

td.delta { width: 2.6rem; white-space: nowrap; font-size: 0.8rem; font-weight: 500; }
.delta-up { color: var(--up); }
.delta-down { color: var(--down); }
.delta-flat { color: #9aa3ad; }

td.name {
    max-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---------- wedstrijden ---------- */

.match-list {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    overflow: hidden;
}

.match {
    border: 1px dotted var(--vh-taupe-light);
    border-radius: 0.55rem;
    padding: 0.55rem 0.8rem;
    flex: 0 1 auto;
    min-height: 0;
    overflow: hidden;
}

.match-head {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.6rem;
}

.match-team {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.05rem;
    min-width: 0;
}

.match-team span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-team.away { justify-content: flex-end; }

.match-team img { height: 1.5rem; width: 1.5rem; flex: 0 0 auto; }

.match-score {
    font-size: 1.35rem;
    font-weight: 700;
    white-space: nowrap;
    text-align: center;
    min-width: 4.2rem;
}

.match-score.upcoming { font-size: 1.05rem; color: var(--vh-taupe); }

.match-when {
    text-align: center;
    font-size: 0.75rem;
    color: var(--vh-taupe);
    font-weight: 500;
    margin-top: -0.1rem;
}

.match-goals {
    margin: 0.3rem 0 0;
    font-size: 0.8rem;
    color: var(--vh-taupe);
    text-align: center;
    line-height: 1.35;
}

.match-goals b { color: var(--vh-blue); font-weight: 500; }

.match-preds {
    margin-top: 0.45rem;
    padding-top: 0.4rem;
    border-top: 1px dotted #e0d9d1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(5, auto);
    grid-auto-flow: column;   /* op ranglijstvolgorde van boven naar beneden */
    gap: 0.3rem 0.4rem;
}

.chip {
    font-size: 0.78rem;
    font-weight: 500;
    border-radius: 0.4rem;
    padding: 0.12rem 0.5rem;
    background: #eef2f7;
    color: var(--vh-blue);
    white-space: nowrap;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
}

.chip .chip-name {
    overflow: hidden;
    text-overflow: ellipsis;
}

.chip .chip-score { font-weight: 700; }

.chip.exact { background: var(--up); color: #fff; }
.chip.toto { background: var(--toto-bg); color: var(--toto-text); }
.chip.wrong { background: var(--down); color: #fff; }

.no-matches {
    color: var(--vh-taupe);
    font-size: 0.95rem;
    text-align: center;
    margin-top: 2rem;
}

/* ---------- topscorers ---------- */

#topscorers { width: 100%; border-collapse: collapse; font-size: 0.92rem; }

#topscorers td {
    padding: 0.26rem 0.4rem;
    border-top: 1px dotted #d4ccc4;
    white-space: nowrap;
}

#topscorers tr:first-child td { border-top: none; }
#topscorers img { height: 1.2rem; width: 1.2rem; vertical-align: -0.25rem; margin-right: 0.45rem; }
#topscorers td.pts { text-align: right; color: var(--vh-taupe); font-size: 0.8rem; }
#topscorers td.goals { text-align: right; font-weight: 700; }

/* ---------- grafiek ---------- */

.chart-box { position: relative; flex: 1; min-height: 0; }

/* ---------- footer ---------- */

footer {
    flex: 0 0 auto;
    padding: 0.4rem 0 0.3rem;
    border-top: 3px dotted var(--vh-taupe);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--vh-taupe);
}

.legend-hint { display: inline-flex; align-items: center; gap: 0.4rem; }

.powered { display: inline-flex; align-items: center; gap: 0.5rem; }

.scorito-logo { height: 1.1rem; width: auto; vertical-align: middle; }
