/* Seite frontend/dashboard.php */
@import url('/css/fonts.css');
body { font-family: 'Inter', sans-serif; }

.gradient-bg { background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #7e22ce 100%); }

.glass { background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.2); box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); }
.glass-dark { background: rgba(0, 0, 0, 0.15); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2); }

.menu-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.35); opacity: 0; pointer-events: none; transition: opacity 0.2s ease; z-index: 48; }
.menu-backdrop.open { opacity: 1; pointer-events: auto; }
.menu-overlay { position: fixed; top: 0; left: 0; width: 280px; height: 100vh; background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%); color: white; padding: 80px 20px 20px; transform: translateX(-100%); transition: transform 0.2s ease; z-index: 49; overflow-y: auto; }
.menu-overlay.open { transform: translateX(0); }
.menu-overlay a { display: block; color: white; text-decoration: none; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.15); transition: all 0.2s ease; }
.menu-overlay a:hover { padding-left: 8px; color: rgba(255,255,255,0.8); }

.mini-club-logo { width: 18px; height: 18px; object-fit: contain; border-radius: 3px; vertical-align: middle; margin-right: 6px; background: #fff; border: 1px solid rgba(31, 42, 54, 0.2); }
.team-inline { display: inline-flex; align-items: center; gap: 0; }

.score-win { background: rgba(34, 197, 94, 0.2); color: #86efac; font-weight: bold; }
.score-lose { background: rgba(239, 68, 68, 0.2); color: #fca5a5; font-weight: bold; }
.score-draw { background: rgba(107, 114, 128, 0.2); color: #d1d5db; font-weight: bold; }
.top-toggle {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.1);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
}
.top-toggle:hover { background: rgba(255,255,255,0.2); }
.top-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 70;
}
.top-modal-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}
.top-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -46%);
    width: min(560px, 94vw);
    max-height: 80vh;
    max-height: 80dvh;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
    z-index: 71;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(17,24,39,0.82);
    backdrop-filter: blur(12px);
    color: #fff;
    box-shadow: 0 18px 48px rgba(0,0,0,0.35);
}
.top-modal.open {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%);
}
.top-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}
.top-modal-body {
    padding: 12px 14px 14px 14px;
    max-height: calc(80vh - 58px);
    max-height: calc(80dvh - 58px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}
.top-rank-card {
    position: relative;
    overflow: hidden;
}
.top-rank-card::after {
    content: "";
    position: absolute;
    top: -8px;
    bottom: -8px;
    right: 114px;
    width: 28px;
    border-radius: 999px;
    opacity: 0.78;
    pointer-events: none;
    background-repeat: no-repeat;
    background-position: center;
}
.top-rank-1::after {
    background-image:
        radial-gradient(62% 16% at 30% 10%, rgba(255, 227, 92, 0.96) 0 52%, rgba(255, 227, 92, 0) 54%),
        radial-gradient(62% 16% at 70% 30%, rgba(245, 191, 24, 0.9) 0 52%, rgba(245, 191, 24, 0) 54%),
        radial-gradient(62% 16% at 30% 50%, rgba(255, 227, 92, 0.96) 0 52%, rgba(255, 227, 92, 0) 54%),
        radial-gradient(62% 16% at 70% 70%, rgba(245, 191, 24, 0.9) 0 52%, rgba(245, 191, 24, 0) 54%),
        radial-gradient(62% 16% at 30% 90%, rgba(255, 227, 92, 0.96) 0 52%, rgba(255, 227, 92, 0) 54%);
}
.top-rank-2::after {
    background-image:
        radial-gradient(62% 16% at 30% 10%, rgba(246, 249, 252, 0.96) 0 52%, rgba(246, 249, 252, 0) 54%),
        radial-gradient(62% 16% at 70% 30%, rgba(184, 194, 208, 0.9) 0 52%, rgba(184, 194, 208, 0) 54%),
        radial-gradient(62% 16% at 30% 50%, rgba(246, 249, 252, 0.96) 0 52%, rgba(246, 249, 252, 0) 54%),
        radial-gradient(62% 16% at 70% 70%, rgba(184, 194, 208, 0.9) 0 52%, rgba(184, 194, 208, 0) 54%),
        radial-gradient(62% 16% at 30% 90%, rgba(246, 249, 252, 0.96) 0 52%, rgba(246, 249, 252, 0) 54%);
}
.top-rank-3::after {
    background-image:
        radial-gradient(62% 16% at 30% 10%, rgba(224, 156, 97, 0.96) 0 52%, rgba(224, 156, 97, 0) 54%),
        radial-gradient(62% 16% at 70% 30%, rgba(166, 102, 58, 0.88) 0 52%, rgba(166, 102, 58, 0) 54%),
        radial-gradient(62% 16% at 30% 50%, rgba(224, 156, 97, 0.96) 0 52%, rgba(224, 156, 97, 0) 54%),
        radial-gradient(62% 16% at 70% 70%, rgba(166, 102, 58, 0.88) 0 52%, rgba(166, 102, 58, 0) 54%),
        radial-gradient(62% 16% at 30% 90%, rgba(224, 156, 97, 0.96) 0 52%, rgba(224, 156, 97, 0) 54%);
}
/* Breiten automatisch: Zahlen und „Letzte 5“ so breit wie nötig (nie umbrechen), das Team bekommt den Rest. */
.league-table-fixed {
    table-layout: auto;
    width: 100%;
}
.league-table-fixed th, .league-table-fixed td { white-space: nowrap; padding-left: 6px; padding-right: 6px; }
.league-table-fixed th.team-cell, .league-table-fixed td.team-cell { width: 100%; }
/* Pfeil vor dem Rang: Platzierung seit dem letzten abgeschlossenen Match */
.rank-cell { white-space: nowrap; }
.rank-move { display: inline-block; width: 14px; margin-right: 4px; font-size: 11px; font-weight: 800; line-height: 1; text-align: center; }
.rank-move.up { color: #22c55e; }
.rank-move.down { color: #f87171; }
.rank-move.same { color: rgba(255, 255, 255, 0.4); }
/* „Letzte 5“: älteste links, letztes Match rechts (größer, mit Ring) */
.form-row { display: flex; gap: 5px; justify-content: center; align-items: center; }
.form-dot { width: 20px; height: 20px; border-radius: 50%; color: #fff; font-size: 11px; font-weight: 700; line-height: 1;
    display: inline-flex; align-items: center; justify-content: center; flex: none; }
.form-dot.form-S { background: #22c55e; }
.form-dot.form-U { background: #9ca3af; }
.form-dot.form-N { background: #ef4444; }
.form-dot.form-last { width: 24px; height: 24px; font-size: 13px; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85); }
.league-table-fixed th.team-cell,
.league-table-fixed td.team-cell {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* Handy: nur Rang, Team, Satzpunkte, Pkt und die letzten 3 – sonst bleibt für die Teamnamen kein Platz */
@media (max-width: 640px) {
    .league-table-fixed th, .league-table-fixed td { padding-left: 3px; padding-right: 3px; }
    .league-table-fixed th:nth-child(3), .league-table-fixed td:nth-child(3),
    .league-table-fixed th:nth-child(4), .league-table-fixed td:nth-child(4),
    .league-table-fixed th:nth-child(5), .league-table-fixed td:nth-child(5),
    .league-table-fixed th:nth-child(6), .league-table-fixed td:nth-child(6),
    .league-table-fixed th:nth-child(8), .league-table-fixed td:nth-child(8) { display: none; }
    .league-table-fixed th.team-cell, .league-table-fixed td.team-cell { white-space: normal; overflow: visible; overflow-wrap: break-word; }
    .rank-move { width: 10px; margin-right: 2px; font-size: 9px; }
    .form-head { font-size: 0; }
    .form-head::after { content: "Letzte 3"; font-size: 0.875rem; }
    .form-row { gap: 2px; }
    .form-dot { width: 16px; height: 16px; font-size: 9px; }
    .form-dot.form-last { width: 19px; height: 19px; font-size: 10px; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.85); }
    .form-dot:nth-last-child(n+4) { display: none; }
}

/* Platz für die feste Fußzeile (backend/views/footer.php) */
body { padding-bottom: 64px; }

/* Match mit Sätzen nach der Entscheidung (ab 6 Satzpunkten): gelb markieren */
.match-early-decision { border: 2px solid #facc15; box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.18); }
.early-decision-note { background: rgba(250, 204, 21, 0.14); border: 1px solid rgba(250, 204, 21, 0.5); color: #fef9c3; border-radius: 10px; padding: 10px 12px; font-size: 0.9rem; line-height: 1.4; }

/* Abzug der Mannschaft in einem Satz (aus der Ergebnis-Eingabe, Zeile „Mannschaft“) */
[data-penalty-note]::after { content: " (" attr(data-penalty-note) ")"; font-size: 0.8em; font-weight: 700; color: #fca5a5; white-space: nowrap; }
