/* =============================================================
   fliscore – App-Stylesheet v3
   Font: Raleway (lokal)
   Design: Modern, elegant, luftig
   ============================================================= */

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; }

body {
    font-family: 'Raleway', 'Segoe UI', Arial, sans-serif;
    background-color: #f7f7f8;
    color: #1a1a1a;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-weight: 400;
    line-height: 1.6;
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* ── Header ───────────────────────────────────────────────── */
.site-header {
    background-color: #ffffff;
    padding: 1.25rem 2rem;
    box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

.header-left { justify-self: start; }
.header-club-logo { justify-self: center; }
.header-right { justify-self: end; }

.club-logo { height: 68px; width: auto; }
.app-logo  { height: 40px; width: auto; opacity: 0.85; }

/* ── Main & Footer ────────────────────────────────────────── */
.site-main {
    flex: 1;
    padding: 2rem 1.5rem;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

.site-footer {
    background: #333333;
    color: #aaa;
    padding: 0.65rem 1.5rem;
    font-size: 0.88rem;
    letter-spacing: 0.02em;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    width: 100%;
    flex-wrap: wrap;
}

.footer-left  { flex: 0 0 auto; white-space: nowrap; }
.footer-right {
    flex: 1;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem;
}
.footer-right a { white-space: nowrap; }

@media (max-width: 750px) {
    .footer-right {
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 0.2rem 0.6rem;
    }
}

.site-footer a {
    color: #aaa;
    text-decoration: none;
}

.site-footer a:hover {
    color: #fff;
}

@media (max-width: 600px) {
    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
    .footer-left, .footer-center, .footer-right {
        text-align: center;
    }
}

.site-footer a { color: #aaa; }

/* ── Typografie ───────────────────────────────────────────── */
h1 {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
    color: #111;
}

h2 {
    font-size: 1.15rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    color: #222;
}

h3 {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #333;
}

/* ── Alerts ───────────────────────────────────────────────── */
.alert {
    padding: 0.8rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.92rem;
    border-left: 3px solid;
}

.alert-error   { background: #fff5f5; border-color: #e53e3e; color: #742a2a; }
.alert-success { background: #f0fff4; border-color: #38a169; color: #1c4532; }
.alert-info    { background: #ebf8ff; border-color: #3182ce; color: #1a365d; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: 'Raleway', sans-serif;
    letter-spacing: 0.02em;
    transition: all 0.15s ease;
    text-decoration: none;
}

.btn:hover { opacity: 0.88; transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: translateY(0); }

.btn-primary   { background-color: var(--color-primary); color: #fff; }
.btn-secondary { background-color: #f0f0f2; color: #333; border: 1px solid #e0e0e2; }
.btn-secondary:hover { background-color: #e8e8ea; }
.btn-danger    { background-color: #e53e3e; color: #fff; }
.btn-sm        { padding: 0.3rem 0.8rem; font-size: 0.82rem; }
.btn-block     { width: 100%; justify-content: center; }

/* ── Formulare ────────────────────────────────────────────── */
.form-group { margin-bottom: 1.1rem; }

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    font-size: 0.85rem;
    color: #444;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.6rem 0.9rem;
    border: 1px solid #e2e2e6;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: 'Raleway', sans-serif;
    background: #fff;
    color: #1a1a1a;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 15%, transparent);
}

/* ── Auth-Card (Login) ────────────────────────────────────── */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 4rem;
}

.auth-card {
    background: #fff;
    border: 1px solid #ebebed;
    border-radius: 14px;
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.auth-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1.75rem;
    text-align: center;
    color: #111;
}

/* ── Admin-Layout ─────────────────────────────────────────── */
.admin-wrapper {
    display: flex;
    gap: 1.75rem;
    align-items: flex-start;
}

.admin-nav {
    width: 220px;
    flex-shrink: 0;
    background: #fff;
    border: 1px solid #ebebed;
    border-radius: 12px;
    padding: 0.6rem 0;
    position: sticky;
    top: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.admin-nav ul { list-style: none; }

.admin-nav ul li a {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 1.1rem;
    color: #444;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 6px;
    margin: 0.1rem 0.4rem;
    transition: background 0.12s, color 0.12s;
}

.admin-nav ul li a i {
    font-size: 1.05rem;
    width: 18px;
    text-align: center;
    color: #999;
    flex-shrink: 0;
    transition: color 0.12s;
}

.admin-nav ul li a:hover {
    background: #f5f5f7;
    color: var(--color-primary);
    text-decoration: none;
}

.admin-nav ul li a:hover i { color: var(--color-primary); }

.admin-nav ul li a.nav-active {
    background: color-mix(in srgb, var(--color-primary) 10%, transparent);
    color: var(--color-primary);
    font-weight: 600;
}

.admin-nav ul li a.nav-active i { color: var(--color-primary); }

.nav-spacer { height: 0.75rem; border-top: 1px solid #f0f0f2; margin: 0.4rem 0.8rem; }

.admin-content { flex: 1; min-width: 0; overflow-x: hidden; }

/* ── Page Header ──────────────────────────────────────────── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* ── Dashboard-Kacheln ────────────────────────────────────── */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.dashboard-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 1.75rem 1rem;
    background: var(--color-primary);
    color: #fff;
    border-radius: 12px;
    text-decoration: none;
    transition: opacity 0.15s, transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 2px 12px color-mix(in srgb, var(--color-primary) 30%, transparent);
}

.dashboard-card:hover {
    opacity: 0.92;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px color-mix(in srgb, var(--color-primary) 35%, transparent);
    text-decoration: none;
    color: #fff;
}

.dashboard-card i { font-size: 1.9rem; color: rgba(255,255,255,0.9); }

.dashboard-card__label {
    font-weight: 600;
    font-size: 0.95rem;
    color: #fff;
    letter-spacing: 0.01em;
}

/* ── Tabellen ─────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; margin-top: 1rem; max-width: 100%; width: 100%; }

table.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}

table.data-table th,
table.data-table td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid #f0f0f2;
    text-align: left;
    vertical-align: middle;
}

table.data-table thead th {
    background-color: var(--color-primary);
    color: #fff;
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

table.data-table tbody tr:last-child td { border-bottom: none; }
table.data-table tbody tr:hover { background: #fafafa; }
.actions { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: stretch; }
.actions form { display: inline-flex; margin: 0; padding: 0; }
.actions .btn,
.actions form .btn {
    height: 30px;
    padding-top: 0;
    padding-bottom: 0;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

/* ── Leaderboard ──────────────────────────────────────────── */
.leaderboard-wrapper { width: 100%; max-width: 100%; }
.leaderboard-header  { text-align: center; margin-bottom: 1.5rem; }

.leaderboard-updated {
    font-size: .8rem;
    color: #aaa;
    margin-top: .3rem;
    letter-spacing: 0.02em;
}

.leaderboard-no-tournament { text-align: center; padding: 3rem 1rem; color: #aaa; }
.hidden { display: none !important; }

.leaderboard-tabs {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.leaderboard-tab {
    padding: 0.4rem 1.1rem;
    border-radius: 20px;
    border: 1px solid #ddd;
    color: #666;
    cursor: pointer;
    font-size: 0.88rem;
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: all 0.15s;
    background: #fff;
}

.leaderboard-tab.active,
.leaderboard-tab:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

.score-pill {
    display: inline-block;
    padding: .2rem .6rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: .88rem;
    min-width: 44px;
    text-align: center;
    letter-spacing: 0.02em;
}

.score-under  { background: #fff5f5; color: #c53030; font-weight: 700; }
.score-over   { background: transparent; color: #555; }
.score-even   { background: #ebf4ff; color: #1a56db; font-weight: 700; }
.score-pending { color: #aaa; font-size: .85rem; font-style: italic; }

.leaderboard-table .col-pos     { width: 50px; text-align: center; font-weight: 700; color: #999; }
.leaderboard-table .col-score   { width: 80px; text-align: center; }
.leaderboard-table .col-strokes { width: 80px; text-align: center; }
.leaderboard-table .col-holes   { width: 70px; text-align: center; color: #aaa; font-size: 0.85rem; }

.leaderboard-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #ebebed;
}

/* ── Scoring Login ────────────────────────────────────────── */
.scoring-login-wrapper {
    display: flex;
    justify-content: center;
    padding-top: 3rem;
}

.scoring-login-card {
    background: #fff;
    border: 1px solid #ebebed;
    border-radius: 14px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    text-align: center;
}

.scoring-login-title { margin-bottom: .5rem; }
.scoring-login-hint  { color: #999; margin-bottom: 1.5rem; font-size: .92rem; }
.leaderboard-link    { color: var(--color-primary); font-size: .9rem; font-weight: 500; }

/* ── Code-Eingabe ─────────────────────────────────────────── */
.code-input {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin: 1.5rem 0;
}

.code-digit {
    width: 54px;
    height: 66px;
    text-align: center;
    font-size: 1.9rem;
    font-weight: 700;
    font-family: 'Raleway', sans-serif;
    border: 1.5px solid #ddd;
    border-radius: 10px;
    text-transform: uppercase;
    background: #fafafa;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.code-digit:focus {
    outline: none;
    border-color: var(--color-primary);
    background: #fff;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 15%, transparent);
}

/* ── Scoring Holes ────────────────────────────────────────── */
.scoring-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: .75rem;
    border-bottom: 1px solid #ebebed;
}

.scoring-header__flight { font-weight: 600; font-size: 1rem; color: #222; }

.hole-card {
    background: #fff;
    border: 1px solid #ebebed;
    border-radius: 12px;
    padding: 1.1rem 1.25rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    transition: border-color 0.2s;
}

.hole-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f5f5f7;
}

.hole-card__title { font-weight: 700; font-size: 1rem; color: #111; }
.hole-card__meta  { font-size: 0.82rem; color: #aaa; }

.player-score-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid #f5f5f7;
}

.player-score-row:last-child { border-bottom: none; }
.player-score-row__name { flex: 1; font-size: 0.92rem; color: #333; }

.score-stepper { display: flex; align-items: center; gap: 0.5rem; }

.score-stepper__btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid #e0e0e2;
    background: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.12s;
    color: #555;
    font-family: 'Raleway', sans-serif;
    line-height: 1;
}

.score-stepper__btn:hover {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
    transform: scale(1.08);
}

.score-stepper__value {
    width: 38px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: #111;
}

.score-stepper__par {
    font-size: 0.78rem;
    width: 48px;
    text-align: right;
    font-weight: 600;
}

.course-divider {
    text-align: center;
    margin: 1.5rem 0 0.75rem;
    position: relative;
}

.course-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0; right: 0;
    height: 1px;
    background: #ebebed;
}

.course-divider span {
    position: relative;
    background: #f7f7f8;
    padding: 0 0.75rem;
    font-weight: 700;
    color: var(--color-primary);
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hole-global    { font-size: .72rem; color: #ccc; margin-left: .3rem; }
.length-m       { color: #3182ce; font-size: .8rem; }
.length-f       { color: #d53f8c; font-size: .8rem; }
.hole-card--saved { border-color: #68d391; }

.scoring-save-bar {
    position: sticky;
    bottom: 0;
    background: #f7f7f8;
    padding: .85rem 0;
    border-top: 1px solid #ebebed;
    margin-top: 1rem;
}

/* ── Formular-Ergänzungen ─────────────────────────────────── */
.form-card {
    background: #fff;
    border: 1px solid #ebebed;
    border-radius: 12px;
    padding: 1.75rem;
    max-width: 800px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.04);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group--small { max-width: 120px; }

.form-group--checkbox label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 400;
    text-transform: none;
    font-size: 0.92rem;
    color: #444;
    letter-spacing: 0;
}

.form-group--checkbox input[type="checkbox"] {
    width: 17px; height: 17px; cursor: pointer;
    accent-color: var(--color-primary);
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #f0f0f2;
}

.field-error    { display: block; color: #e53e3e; font-size: 0.8rem; margin-top: 0.3rem; }
.label-optional { font-weight: 400; color: #bbb; font-size: 0.82rem; text-transform: none; }

/* ── Loch-Tabelle ─────────────────────────────────────────── */
.holes-table td { vertical-align: middle; }

.par-select {
    width: 70px;
    padding: 0.35rem 0.5rem;
    border: 1px solid #e2e2e6;
    border-radius: 6px;
    font-size: 0.92rem;
}

.length-input {
    width: 90px;
    padding: 0.35rem 0.5rem;
    border: 1px solid #e2e2e6;
    border-radius: 6px;
    font-size: 0.92rem;
    text-align: right;
}

/* ── Status-Badges ────────────────────────────────────────── */
.badge          { display: inline-block; padding: 0.2rem 0.7rem; border-radius: 20px; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.03em; }
.badge-draft    { background: #f5f5f7; color: #888; }
.badge-active   { background: #f0fff4; color: #276749; border: 1px solid #9ae6b4; }
.badge-finished { background: #ebf8ff; color: #2b6cb0; border: 1px solid #90cdf4; }

/* ── Runden-Karten ────────────────────────────────────────── */
.round-card {
    background: #fff;
    border: 1px solid #ebebed;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.65rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    max-width: 800px;
}

.round-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.65rem;
}

.round-date { margin-left: 0.75rem; color: #aaa; font-size: 0.88rem; }

.round-courses { display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem; }

.course-badge {
    background: var(--color-primary);
    color: #fff;
    border-radius: 6px;
    padding: 0.2rem 0.6rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.course-badge__name { font-weight: 400; margin-left: 0.25rem; opacity: 0.85; }
.course-arrow { color: #ccc; font-size: 1rem; }

/* ── Kurs-Reihenfolge ─────────────────────────────────────── */
.course-order-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
    margin-top: 0.8rem;
}

.course-order-item { display: flex; align-items: center; gap: 0.5rem; }

.course-order-label {
    font-weight: 700;
    font-size: 1rem;
    color: var(--color-primary);
    width: 20px;
    flex-shrink: 0;
}

.course-select, .player-select {
    flex: 1;
    padding: 0.45rem 0.6rem;
    border: 1px solid #e2e2e6;
    border-radius: 8px;
    font-size: 0.88rem;
    font-family: 'Raleway', sans-serif;
}

/* ── Flight-Styles ────────────────────────────────────────── */
.round-heading {
    font-size: 1rem;
    font-weight: 700;
    margin: 1.5rem 0 0.5rem;
    padding-bottom: 0.35rem;
    border-bottom: 2px solid var(--color-primary);
    color: var(--color-primary);
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.access-code {
    font-family: 'Courier New', monospace;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    background: #f5f5f7;
    padding: 0.2rem 0.55rem;
    border-radius: 5px;
}

.player-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.6rem;
    margin-top: 0.8rem;
}

.player-slot { display: flex; align-items: center; gap: 0.5rem; }

.player-slot__num {
    width: 24px; height: 24px;
    background: var(--color-primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* ── Code-Anzeige-Karte ───────────────────────────────────── */
.code-display-card {
    background: #fff;
    border: 1.5px solid #ebebed;
    border-radius: 16px;
    padding: 2.5rem 2rem;
    max-width: 480px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.code-display-card__flight   { font-size: 0.9rem; color: #aaa; margin-bottom: 1.5rem; }
.code-display-card__label    { font-size: 0.75rem; color: #bbb; margin-bottom: 0.5rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }

.code-display-card__code {
    font-family: 'Courier New', monospace;
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: 0.3em;
    color: var(--color-primary);
    margin-bottom: 1.75rem;
    line-height: 1;
}

.code-display-card__players  { text-align: left; margin-bottom: 1.5rem; }
.code-display-card__players h3 { font-size: 0.78rem; color: #bbb; margin-bottom: 0.5rem; text-transform: uppercase; letter-spacing: 0.06em; }
.player-list { list-style: none; padding: 0; }
.player-list li { display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0; border-bottom: 1px solid #f5f5f7; font-size: 0.92rem; }

.gender-badge { font-size: 0.72rem; padding: 0.1rem 0.45rem; border-radius: 10px; font-weight: 700; letter-spacing: 0.02em; }
.gender-m     { background: #ebf8ff; color: #2b6cb0; }
.gender-f     { background: #fff5f7; color: #c53030; }

.code-display-card__actions { display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; margin-top: 0.5rem; }

.field-readonly {
    padding: 0.5rem 0.85rem;
    background: #f7f7f8;
    border: 1px solid #ebebed;
    border-radius: 8px;
    font-size: 0.92rem;
    color: #555;
}

.access-code-display {
    font-family: 'Courier New', monospace;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--color-primary);
}

/* ── Sonstige Hilfsstile ──────────────────────────────────── */
.empty-hint    { color: #bbb; font-style: italic; margin: 0.75rem 0; font-size: 0.9rem; }
.field-hint    { color: #aaa; font-size: 0.82rem; margin: 0.2rem 0 0.6rem; }
.page-subtitle { color: #aaa; font-size: 0.9rem; margin-top: 0.2rem; }
.club-name-text { font-size: 1.2rem; font-weight: 600; color: #222; }

/* ── Print ────────────────────────────────────────────────── */
@media print {
    .admin-nav, .site-header, .site-footer,
    .page-header, .code-display-card__actions,
    @media (max-width: 1100px) {
    .ticker-wrap { display: none !important; }
}

.ticker-wrap { display: none !important; }

    @page { margin: 1cm; size: A4 portrait; }

    html { height: auto !important; }

    body {
        background: #fff !important;
        margin: 0 !important;
        padding: 0 !important;
        min-height: 0 !important;
        height: auto !important;
        -webkit-print-color-adjust: exact;
    }

    .site-main,
    .admin-wrapper,
    .admin-content {
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
        max-width: 100% !important;
        min-height: 0 !important;
        height: auto !important;
        flex: none !important;
    }

    .code-display-card {
        border: 1px solid #ccc !important;
        box-shadow: none !important;
        page-break-after: avoid;
        page-break-inside: avoid;
        break-after: avoid;
        break-inside: avoid;
        margin: 0 !important;
        width: 100% !important;
    }

    .code-display-card__code { color: #000; font-size: 4rem; }
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 700px) {
    .admin-wrapper { flex-direction: column; }
    .admin-nav { width: 100%; position: static; }
    .site-main { padding: 1rem; }
    .club-logo { height: 52px; }
    .app-logo  { height: 30px; }
}

@media (max-width: 480px) {
    .code-digit { width: 46px; height: 58px; font-size: 1.6rem; }
    .dashboard-grid { grid-template-columns: 1fr 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .form-group--small { max-width: 100%; }
    .score-stepper__btn { width: 40px; height: 40px; }
    .score-stepper__value { font-size: 1.1rem; width: 34px; }
    .player-score-row__name { font-size: .86rem; }
    .leaderboard-table .col-holes { display: none; }
}

/* ── Dashboard-Kachel Varianten ───────────────────────────── */
.dashboard-card--muted {
    background: #f0f0f2;
    color: #666;
    box-shadow: none;
    border: 1px solid #e0e0e2;
}

.dashboard-card--muted i { color: #999; }
.dashboard-card--muted .dashboard-card__label { color: #666; }

.dashboard-card--muted:hover {
    background: #e8e8ea;
    color: #444;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.dashboard-card--muted:hover i { color: #666; }

.dashboard-section-divider {
    grid-column: 1 / -1;
    border: none;
    border-top: 1px solid #e8e8ea;
    margin: 0.25rem 0;
}

/* ── Startliste ───────────────────────────────────────────── */
.startlist-wrapper { max-width: 900px; margin: 0 auto; }

.startlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.startlist-print-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--color-primary);
}

.startlist-logo { height: 60px; width: auto; }

.startlist-title h1 { font-size: 1.4rem; margin-bottom: 0.2rem; }
.startlist-title h2 { font-size: 1rem; font-weight: 500; color: #555; margin-bottom: 0.2rem; }
.startlist-date     { font-size: 0.9rem; color: #888; }

.startlist-round { margin-bottom: 2rem; }

.startlist-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    background: #fff;
}

.startlist-table th {
    background: var(--color-primary);
    color: #fff;
    padding: 0.6rem 0.8rem;
    text-align: left;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.startlist-table td {
    padding: 0.65rem 0.8rem;
    border-bottom: 1px solid #f0f0f2;
    vertical-align: middle;
}

.startlist-table tbody tr:nth-child(even) { background: #fafafa; }

.startlist-time   { font-weight: 700; font-size: 1rem; white-space: nowrap; }
.startlist-flight { font-weight: 600; }
.startlist-code   {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.15em;
    color: var(--color-primary);
}

.startlist-players { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.startlist-player {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: #f5f5f7;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.88rem;
}

.startlist-page-break { page-break-after: always; }

/* ── Spielersuche ─────────────────────────────────────────── */
.option-taken { color: #bbb !important; }

/* ── Print Startliste ─────────────────────────────────────── */
@media print {
    .no-print-hide,
    .startlist-header,
    .admin-nav,
    .site-header,
    .site-footer { display: none !important; }

    body { background: #fff; font-size: 11pt; }
    .site-main { padding: 0; max-width: 100%; }

    .startlist-table { font-size: 10pt; }
    .startlist-code  { font-size: 12pt; }
    .startlist-time  { font-size: 11pt; }
    .startlist-page-break { page-break-after: always; }
    .startlist-print-header { border-bottom: 1.5pt solid #000; }
    .startlist-table th { background: #333 !important; -webkit-print-color-adjust: exact; }
}

/* ── Typeahead Spielerauswahl ─────────────────────────────── */
.player-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    min-height: 2rem;
    margin-bottom: 0.5rem;
}

.player-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.6rem 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.88rem;
    font-weight: 500;
}

.player-tag--m {
    background: #e8f0fe;
    color: #1a3a6e;
    border: 1px solid #b3c9f8;
}

.player-tag--f {
    background: #fce4ec;
    color: #7b1f3a;
    border: 1px solid #f5a8c0;
}

.player-tag__remove {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0;
    color: inherit;
    opacity: 0.6;
    transition: opacity 0.1s;
}

.player-tag__remove:hover { opacity: 1; }

.typeahead-wrap {
    position: relative;
}

.typeahead-input {
    width: 100%;
    padding: 0.6rem 0.9rem;
    border: 1px solid #e2e2e6;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: 'Raleway', sans-serif;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.typeahead-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 15%, transparent);
}

.typeahead-list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e2e2e6;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    z-index: 100;
    list-style: none;
    margin: 0;
    padding: 0.3rem 0;
    max-height: 260px;
    overflow-y: auto;
}

.typeahead-list:empty { display: none; }

.typeahead-item {
    padding: 0.55rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.1s;
}

.typeahead-item:hover,
.typeahead-item--active {
    background: color-mix(in srgb, var(--color-primary) 8%, transparent);
    color: var(--color-primary);
}

.typeahead-item--empty {
    color: #aaa;
    cursor: default;
    font-style: italic;
}

.typeahead-item mark {
    background: color-mix(in srgb, var(--color-primary) 20%, transparent);
    color: var(--color-primary);
    font-weight: 700;
    border-radius: 2px;
    padding: 0 1px;
}

/* ── Verfügbare Spieler Chips ─────────────────────────────── */
.available-players {
    margin-top: 1rem;
    background: #f7f7f8;
    border: 1px solid #ebebed;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    max-height: 180px;
    overflow-y: auto;
}

.available-players__group {
    margin-bottom: 0.65rem;
}

.available-players__group:last-child { margin-bottom: 0; }

.available-players__label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #aaa;
    margin-bottom: 0.4rem;
}

.available-players__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.avail-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 500;
    font-family: 'Raleway', sans-serif;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.12s;
}

.avail-chip--m {
    background: #e8f0fe;
    color: #1a3a6e;
    border-color: #b3c9f8;
}

.avail-chip--m:hover {
    background: #1a3a6e;
    color: #fff;
    border-color: #1a3a6e;
}

.avail-chip--f {
    background: #fce4ec;
    color: #7b1f3a;
    border-color: #f5a8c0;
}

.avail-chip--f:hover {
    background: #7b1f3a;
    color: #fff;
    border-color: #7b1f3a;
}

/* ── Toggle-Switch ────────────────────────────────────────── */
.toggle-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.toggle-label {
    font-size: 0.88rem;
    color: #555;
    font-weight: 500;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #ddd;
    border-radius: 22px;
    transition: background 0.2s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--color-primary);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(18px);
}

/* ── Spieler-Chips in Flight-Übersicht ────────────────────── */
.flight-players-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.flight-player-chip {
    display: inline-block;
    padding: 0.1rem 0.45rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.flight-player-chip--m {
    background: #e8f0fe;
    color: #1a3a6e;
}

.flight-player-chip--f {
    background: #fce4ec;
    color: #7b1f3a;
}

.flight-player-chip--team {
    background: #fff8e1;
    color: #7a5800;
}

/* ── Icon-Buttons in Tabellen ─────────────────────────────── */
.btn-icon {
    width: 30px;
    height: 30px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 1rem;
    flex-shrink: 0;
}

.btn-icon i { font-size: 1rem; }

/* Bearbeiten-Button: Rot */
.btn-icon.btn-secondary {
    background: color-mix(in srgb, var(--color-primary) 10%, transparent);
    color: var(--color-primary);
    border: 1px solid color-mix(in srgb, var(--color-primary) 25%, transparent);
}

.btn-icon.btn-secondary:hover {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

/* Löschen/Stop-Button: Schwarz */
.btn-icon.btn-danger {
    background: #f0f0f0;
    color: #222;
    border: 1px solid #ccc;
}

.btn-icon.btn-danger:hover {
    background: #222;
    color: #fff;
    border-color: #222;
}

/* Tooltip */
.btn-icon[title] { position: relative; }

/* ── QR-Code ──────────────────────────────────────────────── */
.qr-section {
    margin: 1.25rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.qr-code-box {
    padding: 0.75rem;
    background: #fff;
    border: 1px solid #ebebed;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.qr-url {
    font-size: 0.75rem;
    color: #aaa;
    word-break: break-all;
    text-align: center;
}

@media print {
    .qr-code-box { border: 1px solid #ccc; }
    .qr-url { font-size: 8pt; }
}

/* ── Login-Info auf Dashboard ─────────────────────────────── */
.login-info {
    margin-top: 1.5rem;
    font-size: 0.78rem;
    color: #bbb;
}


/* ── Aktives Turnier in der Liste ─────────────────────────── */
tr.row-active td { background: color-mix(in srgb, var(--color-primary) 5%, transparent) !important; }

/* ── Neutrale Buttons (Login-Seite) ───────────────────────── */
.btn-neutral {
    background: #f0f0f2;
    color: #444;
    border: 1px solid #ddd;
}

.btn-neutral:hover {
    background: #e4e4e6;
    color: #222;
    text-decoration: none;
}

.login-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid #ebebed;
}

/* ── Anlegen-Buttons im Page-Header kompakt ───────────────── */
.page-header .btn-primary {
    white-space: nowrap;
}

/* ── DataTables Responsive Fix ────────────────────────────── */
.dataTables_wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.dataTables_wrapper table.dataTable {
    min-width: 500px;
}

/* Admin-Content darf nicht breiter als verfügbar sein */
.admin-wrapper {
    min-width: 0;
    max-width: 100%;
}

.admin-content {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

/* Aktions-Buttons nicht umbrechen */
.actions {
    flex-wrap: nowrap;
}

/* ── Erste Spalte CSS-fix (ohne FixedColumns-Extension) ───── */
.dt-scroll-body table tbody tr td:first-child,
.dt-scroll-head table thead tr th:first-child {
    position: sticky;
    left: 0;
    background: #fff;
    z-index: 2;
    box-shadow: 2px 0 4px rgba(0,0,0,0.06);
}

.dt-scroll-body table tbody tr:nth-child(even) td:first-child {
    background: #fafafa;
}

.dt-scroll-body table tbody tr:hover td:first-child {
    background: #f5f5f7;
}

/* ── Mobile Navigation – nur Icons ───────────────────────── */
@media (max-width: 700px) {
    .admin-nav {
        width: 100%;
        position: static;
        padding: 0.3rem 0;
        border-radius: 8px;
        margin-bottom: 0.75rem;
    }

    .admin-nav ul {
        display: flex;
        flex-wrap: wrap;
        gap: 0.2rem;
        padding: 0.3rem 0.4rem;
    }

    .admin-nav ul li {
        flex: 0 0 auto;
    }

    /* Text verstecken – nur Icon */
    .admin-nav ul li a {
        padding: 0.5rem;
        gap: 0;
        border-radius: 8px;
        justify-content: center;
        min-width: 38px;
        font-size: 0;       /* Text unsichtbar */
    }

    .admin-nav ul li a i {
        font-size: 1.2rem;
        width: auto;
    }

    /* Spacer im Flex-Layout ausblenden */
    .nav-spacer {
        display: none;
    }

    /* Dashboard-Grid: Basis auto-fill reicht, nur Padding/Size anpassen */
    .dashboard-grid {
        gap: 0.6rem;
        margin-top: 1rem;
    }

    .dashboard-card {
        padding: 1rem 0.5rem;
    }

    .dashboard-card i {
        font-size: 1.5rem;
    }

    .dashboard-card__label {
        font-size: 0.78rem;
    }

    /* Admin-Content volle Breite */
    .admin-wrapper {
        flex-direction: column;
        gap: 0.5rem;
    }

    .admin-content {
        padding: 0;
        width: 100%;
    }

    .page-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}



/* ── Team-Badge ───────────────────────────────────────────── */
.badge-team {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffcc80;
    font-size: 0.72rem;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-weight: 600;
}

/* ── Radio-Gruppe ─────────────────────────────────────────── */
.radio-group {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.radio-option {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    font-weight: 500;
}

.radio-option input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: var(--color-primary);
    cursor: pointer;
}

/* ── Switch-Zeile in Formularen ───────────────────────────── */
.switch-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.switch-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #444;
}

.switches-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

/* ── Einstellungen ────────────────────────────────────────── */
.settings-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid #ebebed;
    max-width: 800px;
}

.maintenance-card {
    margin-bottom: 1rem;
}

.maintenance-card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

/* ── Team-Chip in Flight-Formular ─────────────────────────── */
.avail-chip--team {
    background: #fff3e0;
    color: #e65100;
    border-color: #ffcc80;
}
.avail-chip--team:hover {
    background: #e65100;
    color: #fff;
    border-color: #e65100;
}
.player-tag--team {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffcc80;
}

/* ── Leaderboard Header mit Rundenauswahl ─────────────────── */
.leaderboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.leaderboard-header__right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.round-select {
    padding: 0.4rem 0.75rem;
    border: 1px solid #e2e2e6;
    border-radius: 8px;
    font-family: 'Raleway', sans-serif;
    font-size: 0.9rem;
    background: #fff;
    cursor: pointer;
}

.round-select:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* ── Startseite ───────────────────────────────────────────── */
.home-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    gap: 2rem;
    padding: 2rem;
}

.home-no-tournament {
    color: #aaa;
    font-size: 1.1rem;
}

.home-tournament-name {
    font-size: 1.4rem;
    font-weight: 500;
    color: #444;
    text-align: center;
}

.home-buttons {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.home-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 160px;
    height: 160px;
    border-radius: 16px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.home-btn i {
    font-size: 2.5rem;
}

.home-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.home-btn--leaderboard {
    background: var(--color-primary);
    color: #fff;
}

.home-btn--scoring {
    background: #fff;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

@media (max-width: 480px) {
    .home-btn {
        width: 140px;
        height: 140px;
    }
}

/* ── Werbebanner Ticker ───────────────────────────────────── */
@media (max-width: 1100px) {
    .ticker-wrap { display: none !important; }
}

.ticker-wrap {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    box-sizing: border-box;
    opacity: 0.7;
}

.ticker-text {
    display: inline-block;
    padding-left: 100%;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
    white-space: pre;
    animation: ticker-scroll 30s linear infinite;
}

@keyframes ticker-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* ── Loch-für-Loch Scoring ────────────────────────────────── */
.scoring-wrapper {
    max-width: 600px;
    margin: 0 auto;
    padding: 0.75rem;
}

.scoring-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.scoring-round-label {
    font-weight: 600;
    font-size: 0.95rem;
    color: #555;
}

/* Loch-Info */
/* old hole-info removed */

.hole-stat__label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #999;
    letter-spacing: 0.05em;
}

.hole-stat__value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
}

/* Spieler-Karten */
.scoring-players {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.scoring-player {
    background: #fff;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    transition: opacity 0.2s;
}

.scoring-player--nr {
    opacity: 0.5;
}

.scoring-player__name {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    font-size: 0.95rem;
}

.gender-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.gender-dot--m { background: #4a90d9; }
.gender-dot--f { background: #e07bb5; }

.scoring-player__input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Stepper */
.stepper {
    display: flex;
    align-items: center;
    border: 1.5px solid #e2e2e6;
    border-radius: 8px;
    overflow: hidden;
}

.stepper--disabled {
    opacity: 0.4;
}

.stepper__btn {
    background: #f5f5f7;
    border: none;
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
    cursor: pointer;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stepper__btn:active { background: #e8e8eb; }
.stepper__btn:disabled { cursor: default; color: #aaa; }

.stepper__input {
    width: 48px;
    text-align: center;
    border: none;
    border-left: 1.5px solid #e2e2e6;
    border-right: 1.5px solid #e2e2e6;
    font-size: 1.1rem;
    font-weight: 700;
    height: 36px;
    padding: 0;
    outline: none;
    -moz-appearance: textfield;
}

.stepper__input::-webkit-outer-spin-button,
.stepper__input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* NR-Button */
.btn-nr {
    background: #f5f5f7;
    color: #999;
    border: 1.5px solid #e2e2e6;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    letter-spacing: 0.05em;
}

.btn-nr--active {
    background: #e65100;
    color: #fff;
    border-color: #e65100;
}

/* Navigation */
.scoring-nav__progress {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    padding: 0.5rem 0;
}

.progress-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ddd;
    display: inline-block;
}

.progress-dot--done   { background: #aaa; }
.progress-dot--active { background: var(--color-primary); }

.scoring-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.25rem 0;
}

.scoring-nav__btn {
    flex: 1;
    padding: 0.85rem 1rem;
    font-size: 1rem;
}

.scoring-nav__btn:last-child {
    text-align: right;
    justify-content: flex-end;
}

@media (max-width: 480px) {
    .hole-number { font-size: 1.6rem; }
    .stepper__input { width: 40px; }
}

/* ── Scoring Loch-Stats einzeilig ─────────────────────────── */
.scoring-hole-stats-row {
    display: flex;
    gap: 1.2rem;
    font-size: 0.85rem;
    color: #555;
    flex-wrap: wrap;
}

.scoring-hole-stats-row strong {
    color: #222;
}

/* ── Leaderboard Zoom via CSS custom property ───────────────*/
.leaderboard-wrapper {
    --lb-zoom: 1;
    font-size: calc(1rem * var(--lb-zoom));
}

/* ── Leaderboard Tabelle ──────────────────────────────────── */
.lb-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.lb-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    white-space: nowrap;
}

.lb-table thead tr th {
    padding: 0.4rem 0.5rem;
    text-align: center;
    font-weight: 600;
    border-bottom: 1px solid #e2e2e6;
    color: #666;
}

.lb-head-course th { font-size: 0.72rem; color: #bbb; padding: 0.2rem 0.3rem; }
.lb-head-labels th { background: #f5f5f7; font-size: 0.85rem; padding: 0.4rem 0.5rem; }
.lb-head-par th    { font-size: 0.72rem; color: #bbb; padding: 0.15rem 0.3rem; background: #fafafa; }
.lb-par-header     { font-size: 0.72rem !important; color: #bbb !important; font-weight: 500 !important; }

/* Lochnummer + PAR übereinander in einer Zelle */
.lb-cell-hole th, .lb-head-labels .lb-cell-hole {
    vertical-align: bottom;
}
.lb-hole-num {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.2;
}
.lb-par-num {
    display: block;
    font-size: 0.72rem;
    color: #aaa;
    font-weight: 400;
    line-height: 1.1;
}
.lb-par-header {
    font-size: 0.72rem !important;
    color: #aaa !important;
    font-weight: 400 !important;
    vertical-align: bottom;
}

.lb-cell-pos   { width: 40px; text-align: center !important; }
.lb-cell-name  { text-align: left !important; padding-left: 0.75rem !important; min-width: 160px; }
.lb-cell-score { width: 60px; text-align: center !important; }
.lb-cell-hole  { width: 36px; text-align: center !important; }
.lb-cell-sum   { width: 44px; text-align: center !important; font-weight: 700; background: #f5f5f7; border-left: 2px solid #e2e2e6; }
.lb-cell-round { width: 44px; text-align: center !important; font-weight: 700; border-left: 2px solid #e2e2e6; }
.lb-cell-total { width: 52px; text-align: center !important; font-weight: 700; border-left: 2px solid #e2e2e6; padding-right: 1rem !important; }

.lb-row td {
    padding: 0.45rem 0.5rem;
    border-bottom: 1px solid #f0f0f2;
}

.lb-row:hover { background: #fafafa; }

/* Score-Einfärbung */
.lb-score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 0.82rem;
    font-weight: 700;
}

.score-albatross { background: #0d47a1; color: #fff; }
.score-eagle     { background: #1976d2; color: #fff; }
.score-birdie    { background: #90caf9; color: #333; }
.score-par {
    background: transparent;
    color: #333;
}

/* Raute nur in der Legende */
.lb-legend .score-par {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.lb-legend .score-par::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 20px; height: 20px;
    background: transparent;
    border: 2px solid #999;
    transform: translate(-50%, -50%) rotate(45deg);
    border-radius: 2px;
}
.score-bogey     { background: #ff9800; color: #fff; border-radius: 3px; }
.score-double    { background: #bf360c; color: #fff; border-radius: 3px; }
.score-triple    { background: #6d4c41; color: #fff; border-radius: 3px; }

.lb-dash  { color: #ccc; }
.lb-nr    { font-size: 0.72rem; color: #e65100; font-weight: 700; }
.lb-par   { color: #aaa !important; }

/* Legende */
.lb-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1rem 0 0.5rem;
    justify-content: flex-end;
    font-size: 0.82rem;
    color: #666;
}

.lb-legend-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* lb-detail-row immer versteckt außer auf Mobile */
.lb-detail-row { display: none; }

/* ── Mobile Leaderboard ───────────────────────────────────── */
@media (max-width: 1100px) {
    /* Desktop-Lochspalten verstecken – aber NICHT die Hole-Spalte (4. Spalte) */
    .lb-table .lb-cell-hole,
    .lb-table .lb-cell-sum,
    .lb-table .lb-head-course,
    .lb-table .lb-head-par,
    .lb-table .lb-head-labels .lb-cell-hole,
    .lb-table .lb-head-labels .lb-cell-sum {
        display: none;
    }
    /* Hole-Spalte (4. td/th) immer sichtbar */
    .lb-table tr td:nth-child(4),
    .lb-table tr th:nth-child(4) {
        display: table-cell !important;
    }

    .lb-row { cursor: pointer; }
    .lb-table { font-size: 0.9rem; }
    .lb-cell-pos   { width: 24px !important; }
    .lb-cell-score { width: 36px !important; }
    .lb-cell-hole  { width: 28px !important; }
    .lb-cell-round { width: 32px !important; }
    .lb-cell-total { width: 32px !important; padding-right: 0.3rem !important; }
    .lb-cell-name  { min-width: 80px; }

    /* Aufgeklappte Detailzeile */
    .lb-detail-row.visible {
        display: table-row;
        background: #f9f9fb;
    }

    .lb-detail-cell {
        padding: 0.5rem 0 0.75rem;
        border-bottom: 2px solid #e2e2e6;
    }

    .lb-detail-grid {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    .lb-detail-half {
        display: flex;
        flex-direction: column;
        gap: 0.3rem;
    }

    .lb-detail-label {
        font-size: 0.72rem;
        font-weight: 600;
        color: #999;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        padding: 0 0.5rem;
    }

    .lb-detail-holes {
        display: grid;
        grid-template-columns: repeat(9, 1fr);
        gap: 0.2rem;
        width: 100%;
    }

    .lb-detail-hole {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.1rem;
        min-width: 0;
    }

    .lb-detail-hole__num {
        font-size: 0.9rem;
        font-weight: 600;
        color: #555;
        line-height: 1;
    }

    .lb-detail-hole__par {
        font-size: 0.85rem;
        font-weight: 500;
        color: #888;
        line-height: 1;
    }

    .lb-detail-hole__score {
        line-height: 1;
    }

    .lb-detail-hole .lb-score {
        width: 32px;
        height: 32px;
        font-size: 0.95rem;
    }

    /* Legende auf Mobile ausblenden */
    .lb-legend { display: none; }
}

/* ── Code-Karte Header ────────────────────────────────────── */
.code-display-card__header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #e2e2e6;
}

.code-card-logo {
    height: 60px;
    width: auto;
    flex-shrink: 0;
}

.code-card-club__name {
    font-size: 1rem;
    font-weight: 700;
    color: #222;
}

.code-card-club__tournament {
    font-size: 0.85rem;
    color: #888;
    margin-top: 0.2rem;
}

@media print {
    .code-card-logo { height: 50px; }
}


/* ── iOS Safari: Auto-Zoom verhindern ────────────────────── */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="date"],
    input[type="time"],
    input[type="tel"],
    select,
    textarea {
        font-size: 16px !important;
    }
}
/* ── Kursname in Mobile-Detail ────────────────────────────── */
.lb-detail-course {
    font-size: 0.72rem;
    color: #aaa;
    font-weight: 400;
    margin-left: 0.4rem;
    text-transform: none;
    letter-spacing: 0;
}

/* ── Mobile/Desktop Label-Umschaltung ────────────────────── */
.lb-show-mobile { display: none; }
.lb-hide-mobile { display: inline; }

@media (max-width: 1100px) {
    .lb-show-mobile { display: inline; }
    .lb-hide-mobile { display: none; }
}

/* ── Home Legal Text ──────────────────────────────────────── */
.home-legal {
    margin-top: 0.75rem;
    font-size: 0.72rem;
    color: #bbb;
    text-align: left;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}
.home-legal a {
    color: #aaa;
    text-decoration: underline;
}

/* ── Scoring Loch-Info ───────────────────────────────────── */
.scoring-hole-info {
    background: #fff;
    border-radius: 16px;
    padding: 1.1rem 1.2rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    border: 1px solid #efefef;
}
.shi-grid3 {
    display: grid;
    grid-template-columns: auto 1fr;
    row-gap: 0.25rem;
}
.shi-grid3 > div:nth-child(odd),
.shi-grid3 > span:nth-child(odd) { justify-self: start; }
.shi-grid3 > div:nth-child(even),
.shi-grid3 > span:nth-child(even) { justify-self: end; }
/* Zeile 1: Kursname mittig, PAR mittig */
.shi-grid3 .shi-course {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    align-self: center;
}
.shi-grid3 .shi-par {
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
    justify-content: flex-end;
    align-self: center;
}
/* Zeile 2: Labels */
.shi-labels-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-self: end;
}
.shi-nums-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-self: end;
}
.shi-labels-row .shi-label { text-align: center; }
.shi-nums-row .shi-hole-num { text-align: center; }
/* Zeile 2+3 rechts: H und D */
.shi-grid3 .shi-length-row {
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 0.3rem;
}
.shi-course-badge {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px;
    background: var(--color-primary);
    color: #fff;
    font-weight: 800; font-size: 1rem;
    border-radius: 9px; flex-shrink: 0;
}
.shi-course-name { font-size: 1.05rem; font-weight: 700; color: #111; }
.shi-par-label { font-weight: 600; font-size: 1rem; color: #111; }
.shi-par-value { font-size: 1rem; color: #555; }
.shi-label {
    font-size: 0.72rem; font-weight: 700; color: #aaa;
    letter-spacing: 0.07em; text-transform: uppercase;
    text-align: left;
}
.shi-hole-num {
    font-size: 2rem; font-weight: 600;
    color: var(--color-primary); line-height: 1.2;
    text-align: center;
}
.shi-length-key { font-size: 0.82rem; color: #aaa; }
.shi-length-val { font-size: 0.95rem; font-weight: 700; color: #222; }

/* ── shi-loch-cols ───────────────────────────────────────── */
.shi-loch-cols {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.8rem;
}
.shi-loch-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}
.shi-loch-col .shi-label {
    white-space: nowrap;
    text-align: center;
}
.shi-loch-col .shi-hole-num {
    text-align: center;
}

.shi-lengths-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 0.1rem;
}

/* ── Mobile-only Elemente ────────────────────────────────── */
.lb-mobile-only { display: none; }
@media (max-width: 1100px) {
    .lb-mobile-only { display: inline-flex; }
}

/* ── Score-Edit Tabelle ───────────────────────────────────── */
.se-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    white-space: nowrap;
}
.se-table th {
    background: #f5f5f7;
    color: #555;
    padding: 0.4rem 0.5rem;
    text-align: center;
    font-weight: 600;
    border-bottom: 2px solid #e2e2e6;
}
.se-course-code {
    font-size: 0.68rem;
    color: #aaa;
    font-weight: 400;
    display: block;
    line-height: 1;
}
.se-table td {
    padding: 0.35rem 0.5rem;
    border-bottom: 1px solid #e2e2e6;
    text-align: center;
    vertical-align: middle;
}
.se-name { text-align: left !important; min-width: 120px; font-weight: 600; }
.se-hole { cursor: pointer; min-width: 36px; }
.se-hole:hover { background: #f0f4ff; }
.se-nr-cell { background: #fff3e0; }
.se-sum { font-weight: 700; background: #f5f5f7; min-width: 40px; }
.se-nr { min-width: 36px; }
.se-table tbody tr:hover td { background: #fafafe; }
.se-table tbody tr:hover td.se-sum { background: #f0f0f4; }

/* ── Club-Modus Zoom ─────────────────────────────────────── */
body.club-mode {
    font-size: var(--club-zoom, 1rem);
}
body.club-mode .lb-table {
    font-size: inherit;
}
body.club-mode .lb-cell-pos,
body.club-mode .lb-cell-score,
body.club-mode .lb-cell-hole,
body.club-mode .lb-cell-sum,
body.club-mode .lb-cell-round,
body.club-mode .lb-cell-total,
body.club-mode .lb-cell-name {
    width: auto;
}
body.club-mode .lb-score {
    width: 1.8em;
    height: 1.8em;
    font-size: 0.85em;
}

/* ── Leaderboard Tabs Row ────────────────────────────────── */
.leaderboard-tabs-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}
.leaderboard-tabs-row .leaderboard-tabs {
    margin-bottom: 0;
}
.lb-desktop-only { display: none; }
@media (min-width: 1101px) {
    .lb-desktop-only { display: inline-flex; align-items: center; font-size: 0.82rem; color: #888; }
}

/* ── Leaderboard Legend Row ──────────────────────────────── */
.lb-legend-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.75rem;
}
.lb-legend-row .lb-legend {
    margin-top: 0;
}

/* ── Custom Header Image ─────────────────────────────────── */
.custom-header-img {
    height: 48px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
}

/* ── Top 3 fixiert ───────────────────────────────────────── */
.lb-row-top3 td {
    background: #fffaf9 !important;
}

/* ── Club-Badge im Leaderboard ───────────────────────────────────────────── */
.lb-club-badge {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1;
    margin-top: 2px;
    opacity: 0.85;
}
