/* ==========================================================================
   agoPlay admin
   --------------------------------------------------------------------------
   Ontwerp: design_handoff_admin_platform (desktop 2a, tablet 3a).
   Tokens hieronder komen 1-op-1 uit de handoff. Geen schaduwen in de UI:
   diepte komt uit de kaartkleur op de achtergrond (#EEF4EE). Randen zijn
   inset box-shadows van 1px, zoals in het ontwerp.
   ag-* klassen: zelfde namen als in de app (Agonet/wwwroot/css/theme.css).
   ad-* klassen: admin-specifiek.
   ========================================================================== */

:root {
    --ink: #101a19;
    --dark: #1E2E2C;
    --lime: #DDEA3B;
    --lime-line: #c9d62a;
    --teal: #0E8FA8;
    --teal-tint: #E3F3F6;
    --teal-line: #bfe3ea;
    --teal-ink: #0b6475;
    --bg: #EEF4EE;
    --soft: #F1F5F1;
    --card: #ffffff;
    --muted: #56605d;
    --muted-2: #93a09b;
    --line: #e3e9e3;
    --line-2: #f1f4f1;
    --body: #3b4644;
    --warn-tint: #f6e3da;
    --warn-ink: #9a4420;
    --danger: #B3261E;
    /* aliassen die de app gebruikt */
    --acc: var(--teal);
    --sky: var(--teal-tint);
    --mut: var(--muted-2);
    --mut2: var(--muted);
    --brand-ball: var(--lime);
    --brand-danger: var(--danger);
    --font-display: 'Quicksand', system-ui, sans-serif;
    --font-body: 'Archivo', system-ui, sans-serif;
    --font-logo: 'Outfit', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 14px;
}

a { color: var(--teal); text-decoration: none; }
a:hover { color: #0a6f83; }

button, input, select, textarea { font-family: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }

h1, h2, h3, .ag-display {
    font-family: var(--font-display);
    letter-spacing: -0.02em;
    margin: 0;
}

/* -------------------------------------------------------------------------
   Basiscomponenten
   ------------------------------------------------------------------------- */
.ag-card {
    background: var(--card);
    border-radius: 20px;
    padding: 20px;
    box-shadow: inset 0 0 0 1px var(--line);
}

/* Filterchip (2a): 8x14, 13/600; actief ink/wit */
.ag-chip {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    background: var(--soft);
    color: var(--body);
    border: none;
    white-space: nowrap;
}
    .ag-chip.on { background: var(--ink); color: #fff; }
    .ag-chip .count {
        font-size: 11px;
        font-weight: 700;
        padding: 1px 7px;
        border-radius: 999px;
        background: #fff;
        color: var(--muted);
    }
    .ag-chip.on .count { background: var(--lime); color: var(--ink); }

/* Segmented (3a): track soft r999 padding 4, actief ink/wit 700 */
.ag-segmented {
    display: inline-flex;
    gap: 2px;
    background: var(--soft);
    border-radius: 999px;
    padding: 4px;
}

.ag-segment {
    flex: 1;
    text-align: center;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    background: transparent;
    color: var(--muted);
    border: none;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
    .ag-segment.on { background: var(--ink); color: #fff; font-weight: 700; }

.ag-cta {
    height: 48px;
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    border: none;
    width: 100%;
}
    .ag-cta:disabled { background: #c6cfc8; cursor: default; }

.ag-toggle {
    flex: none;
    width: 42px;
    height: 24px;
    border-radius: 999px;
    padding: 3px;
    display: flex;
    justify-content: flex-start;
    background: #dfe6df;
    cursor: pointer;
    border: none;
    transition: background .15s;
}
    .ag-toggle.on { justify-content: flex-end; background: var(--teal); }
    .ag-toggle .knob { width: 18px; height: 18px; border-radius: 50%; background: #fff; }

.ag-field-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted-2);
}

.ag-input {
    width: 100%;
    margin-top: 7px;
    height: 44px;
    border-radius: 14px;
    border: 0;
    box-shadow: inset 0 0 0 1px var(--line);
    background: var(--card);
    padding: 0 14px;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--ink);
    outline: none;
    transition: box-shadow .12s;
}
    .ag-input:focus { box-shadow: inset 0 0 0 2px var(--teal); }
    .ag-input:disabled { background: var(--soft); color: var(--muted); }
    .ag-input::placeholder { color: var(--muted-2); }
    textarea.ag-input { height: auto; min-height: 84px; padding: 12px 14px; resize: vertical; line-height: 1.45; }
    select.ag-input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2356605d' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
    .ag-input.invalid { box-shadow: inset 0 0 0 2px var(--danger); }

.ag-eyebrow {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted-2);
}

/* Status-pil (2a): 12/700, 5x10 */
.ag-tag {
    font-weight: 700;
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    display: inline-block;
    white-space: nowrap;
    background: var(--soft);
    color: var(--muted);
    line-height: 1.2;
}
    .ag-tag.ink, .ag-tag.paid { background: var(--ink); color: #fff; }
    .ag-tag.sky, .ag-tag.confirmed { background: var(--teal-tint); color: var(--teal-ink); }
    .ag-tag.acc { background: var(--teal); color: #fff; }
    .ag-tag.ball, .ag-tag.open { background: var(--lime); color: var(--ink); }
    .ag-tag.squash { background: #F3E8DA; color: #6A4518; }
    .ag-tag.badminton { background: #E1EFE5; color: #1F5136; }
    .ag-tag.pickleball { background: #ECE6F6; color: #3D2F6B; }
    .ag-tag.warn { background: #FBEFC9; color: #7A5A00; }
    .ag-tag.danger, .ag-tag.cancelled { background: var(--warn-tint); color: var(--warn-ink); }
    .ag-tag.training { background: var(--soft); color: var(--muted); }
    .ag-tag.sm { font-size: 11px; padding: 4px 9px; }

.ag-avatar {
    flex: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    background-size: cover;
    background-position: center;
    letter-spacing: -0.01em;
}

.ag-empty-swatch {
    position: relative;
    background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.16) 0 7px, transparent 7px 14px);
}

.ag-round-btn {
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ink);
    cursor: pointer;
    border: none;
    padding: 0;
}
    .ag-round-btn:hover { background: #e6ede6; }
    .ag-round-btn:disabled { opacity: .4; cursor: default; }
    .ag-round-btn svg { width: 16px; height: 16px; }

/* -------------------------------------------------------------------------
   Shell 2a: zwevende kaarten
   ------------------------------------------------------------------------- */
.ad-shell {
    display: flex;
    gap: 16px;
    padding: 16px;
    height: 100vh;
    background: var(--bg);
}

.ad-side {
    flex: none;
    width: 224px;
    background: var(--card);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    padding: 22px 12px 14px;
    min-height: 0;
}

.ad-brand { padding: 0 10px; color: var(--ink); display: block; }
.ad-side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ad-nav-close, .ad-nav-backdrop, .ad-burger, .ad-top-brand { display: none; }
.ad-top-brand { padding: 0 4px; align-items: center; }
.ad-burger {
    position: relative; flex: none; width: 42px; height: 42px; border-radius: 50%; border: none; cursor: pointer;
    background: var(--card); flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
    .ad-burger span { width: 18px; height: 2px; border-radius: 1px; background: var(--ink); }
.ad-burger-dot { position: absolute; top: 8px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 2px var(--card); }
.ad-nav a > span:not(.ad-nav-badge) { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ad-grid-2.ad-grid-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }

/* Niet-opgeslagen wijzigingen (SaveBar) */
.ad-savebar-wrap { position: sticky; bottom: 18px; z-index: 20; margin-top: 18px; display: flex; justify-content: center; }
.ad-savebar { background: var(--ink); color: #fff; border-radius: 999px; padding: 8px 8px 8px 20px; box-shadow: 0 14px 34px rgba(16,26,25,.25); animation: ad-pop .2s ease; }
.ad-savebar-txt { font-weight: 600; font-size: 13px; margin-right: 10px; }

.ad-nav { display: flex; flex-direction: column; gap: 2px; margin-top: 26px; overflow-y: auto; min-height: 0; }
    .ad-nav a {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 11px 12px;
        border-radius: 14px;
        font-size: 14px;
        font-weight: 500;
        color: var(--body);
        white-space: nowrap;
    }
    .ad-nav a svg { width: 16px; height: 16px; flex: none; color: var(--muted-2); }
    .ad-nav a:hover { background: var(--soft); color: var(--ink); }
    .ad-nav a.active { background: var(--ink); color: #fff; font-weight: 700; }
    .ad-nav a.active svg { color: var(--lime); }
    .ad-nav-sep { height: 1px; background: var(--line-2); margin: 8px 12px; flex: none; }

.ad-today {
    background: var(--dark);
    color: #fff;
    border-radius: 18px;
    padding: 14px;
    margin-top: 12px;
    flex: none;
}
    .ad-today .l { font-size: 12px; color: rgba(255,255,255,.6); }
    .ad-today .v { font-family: var(--font-display); font-weight: 700; font-size: 22px; margin-top: 4px; letter-spacing: -0.02em; }
    .ad-today .track { height: 6px; border-radius: 3px; background: rgba(255,255,255,.12); margin-top: 10px; overflow: hidden; }
    .ad-today .fill { height: 100%; border-radius: 3px; background: var(--lime); }

.ad-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; }

.ad-top { display: flex; align-items: center; gap: 12px; flex: none; }

.ad-search-pill {
    flex: 1;
    max-width: 560px;
    background: var(--card);
    border-radius: 999px;
    padding: 13px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--muted-2);
    border: none;
    cursor: text;
    text-align: left;
}
    .ad-search-pill svg { width: 16px; height: 16px; flex: none; }
    .ad-search-pill .ph { flex: 1; }
    .ad-kbd { font-size: 11.5px; font-weight: 700; color: var(--muted); background: var(--soft); padding: 3px 8px; border-radius: 6px; }

.ad-club-pill {
    position: relative;
    background: var(--card);
    border-radius: 999px;
    padding: 7px 14px 7px 7px;
    display: flex;
    align-items: center;
    gap: 9px;
    border: none;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}
    .ad-club-pill.can { cursor: pointer; }
    .ad-club-pill svg { width: 14px; height: 14px; color: var(--muted); }

.ad-user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--lime);
    color: var(--ink);
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    flex: none;
}

.ad-menu {
    position: absolute;
    z-index: 40;
    right: 0;
    top: calc(100% + 8px);
    min-width: 260px;
    background: var(--card);
    border-radius: 18px;
    box-shadow: inset 0 0 0 1px var(--line), 0 16px 40px rgba(16,26,25,.14);
    padding: 6px;
    max-height: 420px;
    overflow: auto;
    animation: ad-pop .14s ease;
}
    .ad-menu button, .ad-menu a {
        width: 100%;
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 8px 10px;
        border: none;
        background: none;
        border-radius: 12px;
        cursor: pointer;
        font-weight: 600;
        font-size: 13px;
        text-align: left;
        color: var(--ink);
    }
    .ad-menu button:hover, .ad-menu a:hover, .ad-menu .on { background: var(--soft); }
    .ad-menu .head { padding: 10px 10px 8px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; }
    .ad-menu svg { width: 16px; height: 16px; color: var(--muted); }

.ad-content {
    flex: 1;
    min-height: 0;
    background: var(--card);
    border-radius: 24px;
    padding: 24px 26px;
    overflow-y: auto;
    position: relative;
}

/* Kop van een scherm: titel 28 Quicksand + teller 13px, knoppen rechts */
.ad-page-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
    .ad-page-head h1 { font-weight: 700; font-size: 28px; letter-spacing: -0.02em; }
    .ad-page-head .meta { font-size: 13px; color: var(--muted); margin-top: 4px; }
    .ad-page-head .spacer { flex: 1; }
.ad-page-sub { font-size: 13.5px; color: var(--muted); margin-top: 6px; max-width: 720px; line-height: 1.45; }
.ad-page-body { margin-top: 22px; }
.ad-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* -------------------------------------------------------------------------
   Knoppen (pillen)
   ------------------------------------------------------------------------- */
.ad-btn {
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-weight: 700;
    font-size: 13px;
    line-height: 1.35;
    cursor: pointer;
    white-space: nowrap;
}
    .ad-btn svg { width: 15px; height: 15px; }
    .ad-btn:hover { background: #22302e; color: #fff; }
    .ad-btn:disabled { background: #c6cfc8; color: #fff; cursor: default; }
    /* Doorgaan met Google / Apple (Login) */
    .ad-btn.social { height: 44px; gap: 10px; }
    .ad-btn.social svg { width: 18px; height: 18px; }
    .ad-btn.social.google { background: #fff; color: var(--ink); border: 1px solid #e4eae3; }
    .ad-btn.social.google:hover { background: #f5f7f2; color: var(--ink); }
    .ad-btn.social.apple { background: #000; color: #fff; }
    .ad-btn.social.apple:hover { background: #222; }
    .ad-btn.social:disabled { opacity: .5; }
    .ad-btn.ghost, .ad-btn.soft { background: var(--soft); color: var(--ink); font-weight: 600; padding: 10px 16px; }
    .ad-btn.ghost:hover, .ad-btn.soft:hover { background: #e6ede6; }
    .ad-btn.ghost:disabled, .ad-btn.soft:disabled { color: var(--muted-2); }
    .ad-btn.white { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px #dfe5df; }
    .ad-btn.danger { background: var(--warn-tint); color: var(--warn-ink); }
    .ad-btn.danger:hover { background: #f1d4c7; }
    .ad-btn.danger.armed, .ad-btn.armed { background: var(--warn-ink); color: #fff; }
    .ad-btn.sm { padding: 7px 13px; font-size: 12.5px; }
    .ad-btn.lg { padding: 12px 0; font-size: 13.5px; flex: 1; }
    .ad-btn.touch { min-height: 44px; }

/* -------------------------------------------------------------------------
   Layout-hulpjes
   ------------------------------------------------------------------------- */
.ad-stack { display: flex; flex-direction: column; gap: 16px; }
.ad-row { display: flex; align-items: center; gap: 12px; }
.ad-grow { flex: 1; min-width: 0; }
.ad-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ad-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ad-grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.ad-span-2 { grid-column: span 2; }
.ad-split { display: grid; gap: 16px; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; }
    .ad-split.wide-left { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.ad-muted { color: var(--muted); }
.ad-small { font-size: 12px; }
/* Speler-id naast een naam (Pid.razor). */
.ad-pid { font-family: var(--font-mono, ui-monospace, monospace); font-size: 11px; font-weight: 500; color: var(--muted); margin-left: 4px; white-space: nowrap; }
.ad-mono { font-variant-numeric: tabular-nums; }
.ad-ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ad-section-title { font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
.ad-section-sub { color: var(--muted); font-size: 12.5px; margin-top: 3px; line-height: 1.45; }
.ad-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }

.ad-settings { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 28px; padding: 22px; }
.ad-settings + .ad-settings { margin-top: 14px; }

.ad-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--soft);
}
    .ad-switch-row .t { font-weight: 600; font-size: 13.5px; }
    .ad-switch-row .s { font-size: 12px; color: var(--muted); margin-top: 2px; }

.ad-field { display: block; }
.ad-hint { font-size: 12px; color: var(--muted-2); margin-top: 6px; line-height: 1.4; }
.ad-error { font-size: 12px; color: var(--danger); margin-top: 6px; }

/* vertaalveld NL / EN / FR */
.ad-lang-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ad-lang-tabs { display: inline-flex; gap: 2px; background: var(--soft); border-radius: 999px; padding: 2px; }
    .ad-lang-tabs button {
        border: none; background: none; padding: 3px 9px; border-radius: 999px;
        font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; color: var(--muted-2); cursor: pointer; position: relative;
    }
    .ad-lang-tabs button.on { background: var(--ink); color: #fff; }
    .ad-lang-tabs button.empty::after {
        content: ""; position: absolute; top: 2px; right: 2px; width: 5px; height: 5px; border-radius: 50%; background: #e0763a;
    }

.ad-swatches { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; align-items: center; }
    .ad-swatches button { width: 30px; height: 30px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; }
    .ad-swatches button.on { border-color: #fff; box-shadow: 0 0 0 2px var(--ink); }
    .ad-swatches input[type=color] { width: 30px; height: 30px; border: none; padding: 0; background: none; cursor: pointer; border-radius: 50%; overflow: hidden; }
    .ad-swatches input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
    .ad-swatches input[type=color]::-webkit-color-swatch { border: 2px dashed #b9c2bc; border-radius: 50%; }
    .ad-swatches input[type=color]::-moz-color-swatch { border: 2px dashed #b9c2bc; border-radius: 50%; }

/* -------------------------------------------------------------------------
   Tabellen
   ------------------------------------------------------------------------- */
.ag-card:has(> .ad-table) { box-shadow: none; padding: 0 !important; overflow-x: auto; }
.ad-table { width: 100%; border-collapse: separate; border-spacing: 0; }
    .ad-table th {
        text-align: left;
        font-size: 12px;
        font-weight: 600;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: var(--muted-2);
        padding: 0 14px 8px;
        white-space: nowrap;
    }
    .ad-table td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; font-size: 13.5px; }
    .ad-table tr.click { cursor: pointer; }
    .ad-table tr.click:hover td { background: var(--soft); border-bottom-color: transparent; }
    .ad-table tr.click:hover td:first-child { border-radius: 14px 0 0 14px; }
    .ad-table tr.click:hover td:last-child { border-radius: 0 14px 14px 0; }
    .ad-table td.right, .ad-table th.right { text-align: right; }
    .ad-table .t { font-weight: 600; }
    .ad-table .s { font-size: 12px; color: var(--muted-2); margin-top: 2px; }

/* Boekingenlijst (2a): grid-rijen */
.ad-blist-head, .ad-blist-row {
    display: grid;
    grid-template-columns: 110px 110px minmax(0, 1.3fr) 150px 80px 80px 130px;
    gap: 0 16px;
    align-items: center;
}
.ad-blist-head {
    padding: 0 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted-2);
    text-transform: uppercase;
    letter-spacing: .06em;
}
.ad-blist { display: flex; flex-direction: column; margin-top: 8px; }
.ad-blist-row {
    padding: 11px 14px;
    border-radius: 14px;
    border-bottom: 1px solid var(--line-2);
    cursor: pointer;
    background: none;
    border-left: 0; border-right: 0; border-top: 0;
    text-align: left;
    width: 100%;
    font: inherit;
    color: inherit;
}
    .ad-blist-row:hover, .ad-blist-row.on { background: var(--soft); border-bottom-color: transparent; }
    .ad-blist-row.cancelled { opacity: .6; }
    .ad-blist-row .time { font-weight: 700; font-size: 14px; }
    .ad-blist-row .day { font-size: 12px; color: var(--muted-2); margin-top: 2px; }
    .ad-blist-row .court { font-size: 13.5px; font-weight: 600; }
    .ad-blist-row .by { display: flex; align-items: center; gap: 10px; min-width: 0; }
    .ad-blist-row .by .n { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .ad-blist-row .dur { font-size: 13.5px; }
    .ad-blist-row .price { font-size: 13.5px; font-weight: 600; }
.ad-dots { display: flex; align-items: center; }
    .ad-dots i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #fff; margin-left: -5px; display: block; }
    .ad-dots i:first-child { margin-left: 0; }
    .ad-dots i.free { background: var(--soft); outline: 1.5px dashed #b9c2bc; outline-offset: -3px; }
    .ad-dots span { font-size: 12px; color: var(--muted); margin-left: 8px; }

.ad-empty { text-align: center; padding: 46px 20px; color: var(--muted); }
    .ad-empty .ad-section-title { color: var(--ink); margin-bottom: 6px; }
    .ad-empty .ad-btn { margin-top: 16px; }

.ad-list-card {
    display: flex; align-items: center; gap: 14px; padding: 14px 16px;
    background: var(--soft); border-radius: 18px; cursor: pointer; border: none; text-align: left; color: inherit; font: inherit;
}
    .ad-list-card:hover { background: #e9efe9; }
    .ad-list-card.on { box-shadow: inset 0 0 0 2px var(--ink); }

.ad-search {
    height: 40px;
    border-radius: 999px;
    border: none;
    background: var(--soft);
    padding: 0 16px 0 40px;
    min-width: 240px;
    font-size: 13px;
    outline: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 20 20' fill='none' stroke='%2393a09b' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='9' cy='9' r='6'/%3E%3Cpath d='m14 14 4 4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 15px center;
}

/* -------------------------------------------------------------------------
   Dashboard
   ------------------------------------------------------------------------- */
.ad-stat { padding: 18px 20px; }
    .ad-stat .v { font-family: var(--font-display); font-weight: 700; font-size: 30px; letter-spacing: -0.02em; margin-top: 8px; font-variant-numeric: tabular-nums; }
    .ad-stat .d { font-size: 12px; color: var(--muted); margin-top: 4px; }
    .ad-stat.hero { background: var(--dark); color: #fff; box-shadow: none; }
    .ad-stat.hero .ag-eyebrow, .ad-stat.hero .d { color: rgba(255,255,255,.6); }

.ad-meter { height: 6px; border-radius: 3px; background: var(--soft); overflow: hidden; margin-top: 12px; }
    .ad-meter > div { height: 100%; border-radius: inherit; background: var(--teal); }
    .ad-stat.hero .ad-meter { background: rgba(255,255,255,.12); }
    .ad-stat.hero .ad-meter > div { background: var(--lime); }

.ad-bars { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding-top: 8px; }
    .ad-bars .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
    .ad-bars .bar { width: 100%; max-width: 44px; border-radius: 10px 10px 4px 4px; background: var(--teal-tint); min-height: 4px; }
    .ad-bars .col.today .bar { background: var(--ink); }
    .ad-bars .lbl { font-size: 11px; font-weight: 600; color: var(--muted-2); text-transform: uppercase; letter-spacing: .06em; }
    .ad-bars .num { font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; }

.ad-time-chip {
    flex: none; width: 62px; text-align: center; padding: 8px 0; border-radius: 14px;
    background: var(--soft); font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums;
}

/* -------------------------------------------------------------------------
   Planner: banen x uren. Kleuren per soort = KIND uit de handoff.
   ------------------------------------------------------------------------- */
.ad-plan { overflow-x: auto; padding: 4px 0 0; }
.ad-plan-inner { min-width: max-content; }
.ad-plan-row { display: flex; }
.ad-plan-hours { padding-left: 150px; }
.ad-plan-hours-track { position: relative; height: 22px; }
.ad-plan-hour {
    position: absolute; top: 0; transform: translateX(-50%);
    font-size: 11px; color: var(--muted-2); font-variant-numeric: tabular-nums; white-space: nowrap;
}
    .ad-plan-hour.first { transform: none; }
    .ad-plan-hour.last { transform: translateX(-100%); }
.ad-plan-row { border-top: 1px solid var(--line-2); min-height: 62px; }
.ad-plan-label {
    position: sticky; left: 0; z-index: 2; flex: none; width: 150px; background: var(--card);
    padding: 10px 12px 10px 2px; display: flex; flex-direction: column; justify-content: center;
}
    .ad-plan-label .n { font-weight: 700; font-size: 14px; }
    .ad-plan-label .m { font-size: 12px; color: var(--muted-2); margin-top: 2px; }
.ad-plan-track { position: relative; flex: none; }
.ad-plan-cell { position: absolute; top: 5px; bottom: 5px; border-left: 1px dashed #e7ede7; cursor: copy; }
    .ad-plan-cell:hover { background: rgba(14, 143, 168, .06); }
.ad-plan-block {
    position: absolute; top: 5px; bottom: 5px; border-radius: 11px; padding: 0 10px; overflow: hidden; cursor: pointer;
    text-align: left; background: var(--ink); color: #fff; border: 1px solid var(--ink);
    display: flex; flex-direction: column; justify-content: center; gap: 2px; font: inherit;
}
    .ad-plan-block .t { font-weight: 700; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .ad-plan-block .s { font-size: 11.5px; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
    .ad-plan-block.open { background: var(--lime); color: var(--ink); border-color: var(--lime-line); }
    .ad-plan-block.training { background: var(--teal-tint); color: var(--teal-ink); border-color: var(--teal-line); }
    .ad-plan-block.block { background: repeating-linear-gradient(135deg, #eef1ee 0 6px, #e0e6e0 6px 12px); color: var(--muted); border-color: transparent; }
    .ad-plan-block.played { background: #c9d3cc; color: var(--ink); border-color: #c9d3cc; }
    .ad-plan-block.cancelled { opacity: .45; text-decoration: line-through; }
    .ad-plan-block.on { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--teal); z-index: 1; }
.ad-plan-now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--teal); z-index: 1; pointer-events: none; }

.ad-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
    .ad-legend span { display: inline-flex; align-items: center; gap: 6px; }
    .ad-legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }

.ad-day-nav { display: flex; align-items: center; gap: 8px; }
    .ad-day-nav .day { font-family: var(--font-display); font-weight: 700; font-size: 16px; min-width: 170px; text-align: center; }

/* -------------------------------------------------------------------------
   Zijpaneel (detail / bewerken). Stijl van het detailpaneel uit 1b.
   ------------------------------------------------------------------------- */
.ad-drawer-backdrop { position: fixed; inset: 0; background: rgba(16, 26, 25, 0.32); z-index: 50; animation: ad-fade .18s ease; }
.ad-drawer {
    position: fixed; top: 16px; right: 16px; bottom: 16px; width: min(420px, calc(100vw - 32px));
    background: var(--card); border-radius: 24px; z-index: 51; display: flex; flex-direction: column;
    animation: ad-slide .26s cubic-bezier(.22,.9,.3,1);
}
    .ad-drawer.wide { width: min(600px, calc(100vw - 32px)); }
.ad-drawer-head { display: flex; align-items: flex-start; gap: 12px; padding: 22px 22px 12px; }
    .ad-drawer-head h2 { font-weight: 700; font-size: 22px; letter-spacing: -0.02em; margin-top: 4px; }
.ad-drawer-body { flex: 1; overflow-y: auto; padding: 4px 22px 22px; display: flex; flex-direction: column; gap: 14px; }
.ad-drawer-foot { padding: 12px 22px 22px; display: flex; gap: 8px; align-items: center; }

/* Detail van een boeking (1b) */
.ad-kind { font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; display: inline-block; }
    .ad-kind.match { background: var(--ink); color: #fff; }
    .ad-kind.open { background: var(--lime); color: var(--ink); }
    .ad-kind.training { background: var(--teal-tint); color: var(--teal-ink); }
    .ad-kind.block { background: #e7ece7; color: var(--muted); }
    .ad-kind.cancelled { background: var(--warn-tint); color: var(--warn-ink); }
.ad-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
    .ad-tiles > div { background: var(--soft); border-radius: 14px; padding: 11px 13px; }
    .ad-tiles .l { font-size: 11.5px; color: var(--muted); }
    .ad-tiles .v { font-weight: 700; font-size: 15px; margin-top: 3px; }
.ad-players { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
    .ad-players .p { display: flex; align-items: center; gap: 10px; min-height: 34px; }
    .ad-players .av { width: 30px; height: 30px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; background: var(--soft); color: var(--ink); }
    .ad-players .av.free { background: none; border: 1.5px dashed #b9c2bc; color: var(--muted-2); }
    .ad-players .name { flex: 1; font-size: 13.5px; font-weight: 600; min-width: 0; }
    .ad-players .meta { font-size: 12px; color: var(--muted); }
.ad-note { background: var(--soft); border-radius: 14px; padding: 12px 14px; font-size: 12.5px; color: var(--muted); line-height: 1.45; }

/* stappen in de boekingsflow */
.ad-steps { display: flex; gap: 6px; }
    .ad-steps span { flex: 1; height: 4px; border-radius: 2px; background: var(--soft); }
    .ad-steps span.on { background: var(--ink); }
.ad-slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
    .ad-slots button {
        border: none; border-radius: 12px; padding: 10px 0; background: var(--soft); font: inherit; font-weight: 700; font-size: 13.5px;
        cursor: pointer; font-variant-numeric: tabular-nums;
    }
    .ad-slots button.on { background: var(--ink); color: #fff; }
    .ad-slots button:disabled { background: none; color: #c3ccc6; text-decoration: line-through; box-shadow: inset 0 0 0 1px var(--line-2); cursor: default; }

/* -------------------------------------------------------------------------
   Command palette (⌘K)
   ------------------------------------------------------------------------- */
.ad-palette-backdrop { position: fixed; inset: 0; background: rgba(16, 26, 25, 0.32); z-index: 70; animation: ad-fade .14s ease; }
.ad-palette {
    position: fixed; z-index: 71; left: 50%; top: 12vh; transform: translateX(-50%); width: min(620px, calc(100vw - 32px));
    background: var(--card); border-radius: 24px; padding: 10px; animation: ad-pop .16s ease;
}
    .ad-palette input {
        width: 100%; border: none; outline: none; font-size: 16px; padding: 14px 16px 14px 46px; border-radius: 16px; background: var(--soft);
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 20 20' fill='none' stroke='%2393a09b' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='9' cy='9' r='6'/%3E%3Cpath d='m14 14 4 4'/%3E%3C/svg%3E");
        background-repeat: no-repeat; background-position: 16px center;
    }
    .ad-palette .grp { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); padding: 12px 12px 4px; }
    .ad-palette .res { max-height: 52vh; overflow-y: auto; }
    .ad-palette .item {
        width: 100%; display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 14px; border: none; background: none;
        font: inherit; text-align: left; cursor: pointer; color: inherit;
    }
    .ad-palette .item.on, .ad-palette .item:hover { background: var(--soft); }
    .ad-palette .item .t { font-weight: 600; font-size: 13.5px; }
    .ad-palette .item .s { font-size: 12px; color: var(--muted); }
    .ad-palette .empty { padding: 22px; text-align: center; color: var(--muted); font-size: 13px; }

/* -------------------------------------------------------------------------
   Foto's
   ------------------------------------------------------------------------- */
.ad-photo { position: relative; height: 180px; border-radius: 20px; overflow: hidden; background-size: cover; background-position: center; }
.ad-photo-img { position: absolute; inset: 0; background-size: cover; background-position: center; }
.ad-upload { position: relative; overflow: hidden; }
    .ad-upload input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* -------------------------------------------------------------------------
   Aanmelden
   ------------------------------------------------------------------------- */
.ad-login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(380px, 1fr); gap: 16px; padding: 16px; }
.ad-login-art {
    background: var(--dark); color: #fff; padding: 44px; display: flex; flex-direction: column; justify-content: space-between;
    position: relative; overflow: hidden; border-radius: 24px;
}
    .ad-login-art h1 { font-size: 46px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.04; max-width: 460px; }
    .ad-login-art p { color: rgba(255,255,255,.62); max-width: 420px; line-height: 1.5; font-size: 14.5px; }
    .ad-login-court { position: absolute; right: -90px; bottom: -60px; width: 520px; height: 340px; border: 3px solid rgba(255,255,255,.1); border-radius: 18px; transform: rotate(-12deg); }
    .ad-login-court::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; border-left: 3px solid rgba(255,255,255,.1); }
    .ad-login-court::after { content: ""; position: absolute; left: 22%; right: 22%; top: 50%; border-top: 3px solid rgba(255,255,255,.1); }
.ad-login-form { display: flex; align-items: center; justify-content: center; padding: 40px; background: var(--card); border-radius: 24px; }
    .ad-login-form form { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 16px; }
    .ad-login-form h2 { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }

.ad-alert { border-radius: 14px; padding: 12px 14px; font-size: 13px; line-height: 1.45; background: var(--warn-tint); color: var(--warn-ink); }
    .ad-alert.info { background: var(--soft); color: var(--muted); }

/* -------------------------------------------------------------------------
   Balie live (tablet 3a), licht thema, tikdoelen >= 44px
   ------------------------------------------------------------------------- */
.ad-live { height: 100vh; background: var(--bg); padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 14px; }
.ad-live-top { flex: none; display: flex; align-items: center; gap: 16px; padding: 0 4px; }
    .ad-live-top .sep { width: 1px; height: 22px; background: #cfd8cf; }
    .ad-live-top .club { font-size: 15px; color: var(--muted); }
    .ad-live-dot { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; letter-spacing: .06em; color: var(--teal); }
    .ad-live-dot i { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(14,143,168,.18); }
    .ad-live-dot.off { color: var(--muted-2); }
    .ad-live-dot.off i { background: var(--muted-2); box-shadow: 0 0 0 4px rgba(147,160,155,.18); }
    .ad-live-clock { font-family: var(--font-display); font-weight: 700; font-size: 30px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
    .ad-live-menu-btn {
        width: 48px; height: 48px; border-radius: 50%; background: #fff; border: none; cursor: pointer;
        display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; position: relative;
    }
    .ad-live-menu-btn span { width: 18px; height: 2px; border-radius: 1px; background: var(--ink); }
.ad-live-main { flex: 1; min-height: 0; background: #fff; border-radius: 24px; padding: 20px 20px 16px; display: flex; flex-direction: column; gap: 16px; }
.ad-live-head { display: flex; align-items: center; gap: 12px; }
    .ad-live-head h1 { font-weight: 700; font-size: 26px; letter-spacing: -0.02em; flex: 1; }
    .ad-live-head .ag-segment { height: 40px; padding: 0 16px; font-size: 13.5px; }
    .ad-live-head .ad-btn { height: 48px; padding: 0 20px; font-size: 14px; }
.ad-live-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: minmax(230px, 1fr); gap: 12px; overflow-y: auto; padding: 5px; margin: -5px; }
.ad-court {
    border-radius: 20px; padding: 16px 18px 14px; display: flex; flex-direction: column; min-width: 0; cursor: pointer; text-align: left;
    border: none; font: inherit; color: var(--ink);
    background: #F7F9F6; box-shadow: inset 0 0 0 1px var(--line);
}
    .ad-court.free { background: #fff; box-shadow: inset 0 0 0 2px var(--lime); }
    .ad-court.warn { background: var(--lime); box-shadow: none; }
    .ad-court.train { background: var(--teal-tint); color: #08404b; box-shadow: none; }
    .ad-court.block, .ad-court.closed { background: repeating-linear-gradient(135deg, #f4f6f3 0 10px, #ebefea 10px 20px); color: var(--body); box-shadow: none; }
    .ad-court.on { outline: 3px solid var(--teal); outline-offset: 2px; }
    .ad-court .hd { display: flex; align-items: center; gap: 8px; }
    .ad-court .name { flex: 1; font-size: 16px; font-weight: 700; }
    .ad-court .tag { font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 999px; white-space: nowrap; background: var(--ink); color: #fff; }
    .ad-court.free .tag { background: var(--lime); color: var(--ink); }
    .ad-court.warn .tag { background: var(--ink); color: var(--lime); }
    .ad-court.train .tag { background: #fff; color: var(--teal-ink); }
    .ad-court.block .tag, .ad-court.closed .tag { background: #fff; color: var(--muted); }
    .ad-court .meta { font-size: 12px; opacity: .6; margin-top: 2px; }
    .ad-court .state { font-family: var(--font-display); font-weight: 700; font-size: 24px; letter-spacing: -0.02em; margin-top: 14px; }
    .ad-court .who { font-size: 13px; opacity: .75; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .ad-court .track { height: 6px; border-radius: 3px; background: rgba(16,26,25,.08); margin-top: auto; overflow: hidden; }
    .ad-court .bar { height: 100%; border-radius: 3px; background: var(--ink); }
    .ad-court.train .bar { background: var(--teal); }
    .ad-court.block .bar { background: var(--muted-2); }
    .ad-court .foot { min-height: 44px; margin-top: 12px; border-top: 1px solid rgba(16,26,25,.08); display: flex; align-items: center; gap: 8px; font-size: 13px; padding-top: 10px; }
    .ad-court .foot .l { flex: 1; opacity: .7; }
    .ad-court .foot .r { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
    .ad-court .acts { display: flex; gap: 8px; margin-top: 12px; }
    .ad-court .acts .ad-btn { flex: 1; height: 44px; font-size: 13px; }
.ad-live-strip {
    flex: none; height: 60px; background: #fff; border-radius: 20px; display: flex; align-items: center; gap: 8px; padding: 0 12px 0 18px;
    overflow-x: auto; white-space: nowrap;
}
    .ad-live-strip .l { font-size: 13px; color: var(--muted); margin-right: 4px; flex: none; }
    .ad-live-strip .c { flex: none; height: 40px; border-radius: 999px; background: var(--soft); display: flex; align-items: center; gap: 6px; padding: 0 14px; font-size: 13px; color: var(--muted); }
    .ad-live-strip .c b { color: var(--ink); font-variant-numeric: tabular-nums; }
.ad-live-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; min-width: 240px; }
    .ad-live-menu a, .ad-live-menu button { min-height: 44px; font-size: 14px; }

/* -------------------------------------------------------------------------
   Toasts, laden
   ------------------------------------------------------------------------- */
.ad-toasts { position: fixed; right: 24px; bottom: 24px; z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.ad-toast {
    background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 16px; font-size: 13px; font-weight: 600; max-width: 420px;
    display: flex; gap: 10px; align-items: center; cursor: pointer; animation: ad-pop .2s ease;
}
    .ad-toast.err { background: var(--warn-ink); }
    .ad-toast svg { width: 16px; height: 16px; flex: none; color: var(--lime); }
    .ad-toast.err svg { color: #fff; }

.ad-boot { min-height: 100vh; display: flex; align-items: center; justify-content: center; color: var(--ink); }
    .ad-boot svg { animation: ad-bounce 1s ease-in-out infinite; }

.ad-skel { background: var(--soft); border-radius: 14px; animation: ad-pulse 1.2s ease-in-out infinite; }

@keyframes ad-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ad-slide { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes ad-pop { from { transform: translateY(6px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes ad-pulse { 50% { opacity: .55; } }
@keyframes ad-bounce { 50% { transform: translateY(-10px); } }

/* -------------------------------------------------------------------------
   Vanaf ~1280px vloeiend; kleiner: zijbalk boven
   ------------------------------------------------------------------------- */
@media (max-width: 1279px) {
    .ad-blist-head, .ad-blist-row { grid-template-columns: 90px 90px minmax(0, 1.3fr) 120px 70px 70px 120px; gap: 0 12px; }
    .ad-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ad-settings { grid-template-columns: 1fr; gap: 16px; }
}

@media (max-width: 1100px) {
    .ad-live-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
    /* Topbalk: hamburger, logo, zoeken (icoon), club, gebruiker. Menu schuift in van links. */
    .ad-shell { flex-direction: column; height: auto; min-height: 100vh; min-height: 100dvh; padding: 0 10px 10px; gap: 10px; }
    .ad-side {
        position: fixed; z-index: 60; top: 0; bottom: 0; left: 0; width: min(300px, 86vw);
        border-radius: 0 24px 24px 0; padding: calc(14px + env(safe-area-inset-top)) 12px calc(14px + env(safe-area-inset-bottom));
        transform: translateX(-104%); transition: transform .24s cubic-bezier(.22,.9,.3,1); box-shadow: 0 0 40px rgba(16,26,25,.18);
        overflow-y: auto;
    }
    .ad-shell.nav-open .ad-side { transform: none; }
    .ad-nav-backdrop { display: block; position: fixed; inset: 0; z-index: 59; background: rgba(16,26,25,.32); opacity: 0; pointer-events: none; transition: opacity .2s; }
    .ad-shell.nav-open .ad-nav-backdrop { opacity: 1; pointer-events: auto; }
    .ad-nav-close { display: flex; }
    .ad-nav { margin-top: 14px; overflow: visible; }
    .ad-nav a { padding: 12px; font-size: 15px; }
    .ad-burger, .ad-top-brand { display: flex; }

    .ad-top {
        position: sticky; top: 0; z-index: 30; margin: 0 -10px; padding: calc(8px + env(safe-area-inset-top)) 10px 8px;
        background: var(--bg); gap: 8px;
    }
    .ad-search-pill { flex: none; width: 42px; height: 42px; padding: 0; justify-content: center; }
    .ad-search-pill .ph, .ad-kbd { display: none; }
    .ad-club-pill { padding: 5px 10px 5px 5px; }
    .ad-club-name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
    .ad-menu { position: fixed; left: 10px; right: 10px; top: calc(60px + env(safe-area-inset-top)); min-width: 0; max-height: 70vh; }
    .ad-content { padding: 18px 16px; overflow: visible; border-radius: 20px; }
    .ad-grid-2, .ad-grid-3, .ad-split, .ad-split.wide-left { grid-template-columns: minmax(0, 1fr); }
    .ad-page-head h1 { font-size: 24px; }
    .ad-search { min-width: 0; width: 100%; }
    .ad-blist-head { display: none; }
    .ad-blist-row { grid-template-columns: 64px minmax(0, 1fr) auto; gap: 4px 10px; }
    .ad-blist-row > .c-court, .ad-blist-row > .c-dots, .ad-blist-row > .c-dur, .ad-blist-row > .c-price { display: none; }
    .ad-login { grid-template-columns: 1fr; }
    .ad-login-art { display: none; }
    .ad-live-grid { grid-template-columns: minmax(0, 1fr); }
}

#blazor-error-ui {
    display: none; position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%);
    background: var(--warn-ink); color: #fff; padding: 12px 18px; border-radius: 16px; z-index: 100; font-weight: 600;
}
    #blazor-error-ui a { color: #fff; text-decoration: underline; margin-left: 8px; }
    #blazor-error-ui .dismiss { cursor: pointer; margin-left: 10px; }

/* Inhoud direct onder de kop van een scherm */
.ad-page-head + :not(.ad-page-sub):not(.ad-page-body),
.ad-page-sub + :not(.ad-page-body) { margin-top: 22px; }

/* ----- Mini-planner bij verplaatsen (BookingPanel) ----- */
.ad-mini-plan { display: flex; flex-direction: column; gap: 3px; padding: 10px; background: var(--soft); border-radius: 14px; }
.ad-mini-row { display: flex; align-items: center; gap: 6px; }
.ad-mini-court { flex: none; width: 74px; font-size: 11.5px; font-weight: 600; color: var(--body); }
.ad-mini-cells { flex: 1; min-width: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 1px; }
.ad-mini-row.head .ad-mini-cells { gap: 1px; }
.ad-mini-hour { font-size: 9.5px; color: var(--muted-2); white-space: nowrap; overflow: visible; height: 12px; }
.ad-mini-cell { height: 20px; border: none; padding: 0; border-radius: 3px; background: var(--card); cursor: pointer; }
    .ad-mini-cell:hover { background: var(--teal-tint); }
    .ad-mini-cell.busy { background: var(--muted-2); cursor: not-allowed; }
    .ad-mini-cell.past { background: var(--line); cursor: not-allowed; }
    .ad-mini-cell.cur { background: var(--teal-line); }
    .ad-mini-cell.sel { background: var(--lime); box-shadow: inset 0 0 0 1px var(--lime-line); }
.ad-mini-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; font-size: 11px; color: var(--muted); }
    .ad-mini-legend span { display: inline-flex; align-items: center; gap: 5px; }
    .ad-mini-legend i { width: 12px; height: 12px; border-radius: 3px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
    .ad-mini-legend i.sel { background: var(--lime); box-shadow: none; }
    .ad-mini-legend i.busy { background: var(--muted-2); box-shadow: none; }
    .ad-mini-legend i.cur { background: var(--teal-line); box-shadow: none; }

/* Openingsuren per dag (Clubprofiel) */
.ad-hours { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.ad-hours-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 40px; }
.ad-hours-day { width: 92px; font-weight: 600; font-size: 13.5px; }
.ad-hours-time { width: 110px; margin-top: 0; height: 36px; }

/* Adres in delen (Clubprofiel): straat + nummer, postcode + gemeente, land. */
.ad-address { display: grid; grid-template-columns: 130px minmax(0, 1fr) minmax(0, 1fr) 110px; gap: 12px 14px; }
.ad-address .street { grid-column: 1 / 4; }
.ad-address .nr { grid-column: 4; }
.ad-address .zip { grid-column: 1; }
.ad-address .city { grid-column: 2 / 5; }
.ad-address .country { grid-column: 1 / 3; }
@media (max-width: 640px) {
    .ad-address { grid-template-columns: minmax(0, 1fr) 100px; }
    .ad-address .street { grid-column: 1; }
    .ad-address .nr { grid-column: 2; }
    .ad-address .zip { grid-column: 1 / -1; }
    .ad-address .city { grid-column: 1 / -1; }
    .ad-address .country { grid-column: 1 / -1; }
}

/* ---------- Support en berichten (077) ---------- */
.ad-nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--lime); color: var(--ink); font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.ad-unread-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--acc, #0E8FA8); margin-right: 8px; vertical-align: middle; }
.ad-ctx { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 10px 12px; border-radius: 12px; background: var(--soft, #F1F4EF); font-size: 12.5px; margin-bottom: 14px; }
.ad-ctx b { font-weight: 600; margin-right: 4px; color: var(--mut2, #6b7672); }
.ad-thread { display: flex; flex-direction: column; gap: 12px; }
.ad-msg { max-width: 85%; align-self: flex-start; display: flex; flex-direction: column; gap: 4px; }
.ad-msg.staff { align-self: flex-end; align-items: flex-end; }
.ad-msg .who { font-size: 11.5px; color: var(--mut2, #6b7672); }
.ad-msg .bubble { padding: 10px 13px; border-radius: 14px 14px 14px 4px; background: var(--soft, #F1F4EF); font-size: 13.5px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.ad-msg.staff .bubble { border-radius: 14px 14px 4px 14px; background: var(--ink); color: #fff; }
.ad-msg-photo { display: block; max-width: 280px; max-height: 320px; border-radius: 12px; object-fit: cover; }
.ad-stack-trace { margin: 0; padding: 12px; border-radius: 12px; background: var(--soft, #F1F4EF); font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 60vh; overflow-y: auto; }

/* -------------------------------------------------------------------------
   Gsm (afwerking): tabellen schuiven, panelen als blad van onderen, grotere tikvlakken
   ------------------------------------------------------------------------- */
@media (max-width: 860px) {
    .ad-page-head { gap: 10px; }
    .ad-page-head .spacer { display: none; }
    .ad-page-head .ad-actions { width: 100%; }
    .ad-page-head .ad-actions > .ad-search { flex: 1 1 100%; }
    .ad-page-sub { font-size: 13px; }
    .ad-settings { padding: 16px; }
    .ad-card-head { flex-wrap: wrap; }
    .ad-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .ad-grid-2.ad-grid-2-1 { grid-template-columns: minmax(0, 1fr); }
    .ad-span-2 { grid-column: auto; }

    /* Tabellen: horizontaal schuiven in hun kaart in plaats van samengeperst te worden. */
    .ag-card:has(> .ad-table) { -webkit-overflow-scrolling: touch; }
    .ad-table { min-width: 620px; }
    .ad-table td { padding: 12px 12px; }

    /* Zijpaneel: blad van onderen over bijna de hele hoogte. */
    .ad-drawer, .ad-drawer.wide {
        top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-height: 92vh; max-height: 92dvh;
        border-radius: 24px 24px 0 0; animation: ad-sheet .26s cubic-bezier(.22,.9,.3,1);
    }
    .ad-drawer-head { padding: 18px 16px 10px; }
    .ad-drawer-head h2 { font-size: 19px; }
    .ad-drawer-body { padding: 4px 16px 16px; }
    .ad-drawer-foot { padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); flex-wrap: wrap; border-top: 1px solid var(--line-2); }

    .ad-palette { top: calc(10px + env(safe-area-inset-top)); width: calc(100vw - 20px); border-radius: 20px; }
    .ad-palette .res { max-height: 60vh; }

    .ad-toasts { left: 10px; right: 10px; bottom: calc(12px + env(safe-area-inset-bottom)); align-items: stretch; }
    .ad-toast { max-width: none; }

    .ad-savebar-wrap { bottom: calc(10px + env(safe-area-inset-bottom)); }
    .ad-savebar { padding: 6px 6px 6px 16px; }

    .ad-day-nav { flex-wrap: wrap; }
    .ad-day-nav .day { min-width: 0; flex: 1; }
    .ad-slots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ad-msg { max-width: 92%; }
    .ad-msg-photo { max-width: 100%; }

    /* Balie-scherm op gsm */
    .ad-live { height: auto; min-height: 100vh; padding: 10px; }
    .ad-live-top { flex-wrap: wrap; gap: 10px; }
    .ad-live-clock { font-size: 24px; }
    .ad-live-main { padding: 14px; }
    .ad-live-head { flex-wrap: wrap; }
    .ad-live-head h1 { font-size: 22px; flex-basis: 100%; }
    .ad-live-grid { overflow: visible; grid-auto-rows: auto; }
}

@media (max-width: 520px) {
    /* iOS zoomt in op velden kleiner dan 16px. */
    .ag-input, .ad-search, select.ag-input, textarea.ag-input { font-size: 16px; }
    .ad-content { padding: 16px 12px; }
    .ad-page-head h1 { font-size: 22px; }
    .ad-club-name { display: none; }
    .ad-club-pill svg { display: none; }
    .ad-club-pill { padding: 5px; }
    .ad-savebar-txt { display: none; }
    .ad-hours-day { width: 100%; }
    .ad-hours-time { width: calc(50% - 30px); }
    .ad-tiles { grid-template-columns: minmax(0, 1fr); }
    .ad-btn { padding: 10px 16px; }
}

@keyframes ad-sheet { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Geen beweging voor wie dat uitzette. */
@media (prefers-reduced-motion: reduce) {
    .ad-side, .ad-nav-backdrop { transition: none; }
    .ad-drawer, .ad-menu, .ad-toast, .ad-savebar { animation: none; }
}

/* Planner op gsm: enkel de planning schuift horizontaal, nooit de hele pagina. */
@media (max-width: 860px) {
    .ad-main { min-width: 0; width: 100%; }
    .ad-content { min-width: 0; max-width: 100%; overflow-x: clip; }
    .ad-plan-toolbar { flex-direction: column; align-items: stretch; }
    .ad-plan-days { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px; }
    .ad-plan-week { display: flex; overflow-x: auto; scrollbar-width: none; min-width: 0; }
    .ad-plan-week::-webkit-scrollbar { display: none; }
    .ad-plan-week .ag-segment { flex: none; padding: 8px 11px; }
    .ad-plan-days > .ad-btn, .ad-plan-days > .ad-plan-date { grid-column: 1 / -1; }
    .ad-plan-days > .ad-plan-date { width: 100% !important; }
    .ad-plan-filters { justify-content: space-between; flex-wrap: wrap; }
    .ad-plan-filters .ag-segmented { flex: 1; min-width: 0; }
    .ad-plan { margin-left: -16px; margin-right: -16px; padding-left: 16px; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
    .ad-plan-label { width: 96px; padding-right: 8px; box-shadow: 6px 0 8px -6px rgba(16,26,25,.15); }
    .ad-plan-label .n { font-size: 13px; }
    .ad-plan-label .m { font-size: 11px; }
    .ad-plan-hours { padding-left: 96px; }
}
@media (max-width: 520px) {
    .ad-plan { margin-left: -12px; margin-right: -12px; padding-left: 12px; }
}

/* ---- Plattegrond-voorbeeld (CourtPlanPreview): zoals spelers hem in de app zien ---- */
.ad-plan-area { margin-bottom: 10px; }
.ad-plan-ground {
    padding: 12px;
    border-radius: 18px;
    background:
        linear-gradient(rgba(16, 26, 25, .05) 1px, transparent 1px) 0 0 / 18px 18px,
        linear-gradient(90deg, rgba(16, 26, 25, .05) 1px, transparent 1px) 0 0 / 18px 18px,
        var(--soft);
}
.ad-plan-empty { padding: 18px 8px; text-align: center; font-size: 13px; color: var(--muted); }
.ad-plan { display: grid; gap: 8px; justify-content: center; /* kolommen max. zo breed als een rij hoog: banen blijven 2:1 */ }
.ad-plan-court {
    position: relative;
    width: 100%; height: 100%; min-width: 0;
    padding: 0; border: 0; border-radius: 10px;
    overflow: hidden;
    background: #2C6E7E;
    color: #fff;
    font: inherit;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 3px 10px rgba(16, 26, 25, .14);
    transition: opacity .2s ease, filter .2s ease, box-shadow .2s ease;
}
.ad-plan-court.tennis { background: #B85F3E; }
.ad-plan-court.squash { background: #B07D45; }
.ad-plan-court.badminton { background: #3D7A57; }
.ad-plan-court.pickleball { background: #6C5B9E; }
.ad-plan-court .ln { position: absolute; background: rgba(255, 255, 255, .5); }
.ad-plan-court .outline { inset: 6px; background: none; border: 1.5px solid rgba(255, 255, 255, .5); border-radius: 2px; }
.ad-plan-court .svc-a, .ad-plan-court .svc-b { top: 6px; bottom: 6px; width: 1.5px; }
.ad-plan-court .svc-a { left: 24%; }
.ad-plan-court .svc-b { right: 24%; }
.ad-plan-court .mid { left: 24%; right: 24%; top: 50%; height: 1.5px; margin-top: -.75px; }
.ad-plan-court .net { position: absolute; left: 50%; top: 3px; bottom: 3px; width: 3px; margin-left: -1.5px; background: rgba(255, 255, 255, .9); }
.ad-plan-court.portrait .svc-a, .ad-plan-court.portrait .svc-b { top: auto; bottom: auto; left: 6px; right: 6px; width: auto; height: 1.5px; }
.ad-plan-court.portrait .svc-a { top: 24%; }
.ad-plan-court.portrait .svc-b { bottom: 24%; }
.ad-plan-court.portrait .mid { top: 24%; bottom: 24%; left: 50%; right: auto; width: 1.5px; height: auto; margin: 0 0 0 -.75px; }
.ad-plan-court.portrait .net { top: 50%; bottom: auto; left: 3px; right: 3px; width: auto; height: 3px; margin: -1.5px 0 0; }
.ad-plan-label {
    position: relative;
    display: block;
    width: max-content;
    max-width: calc(100% - 10px);
    padding: 3px 8px;
    border-radius: 8px;
    background: rgba(16, 26, 25, .62);
    font-weight: 700; font-size: 11.5px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ad-plan-court.portrait .ad-plan-label { padding: 3px 4px; }
.ad-plan-court.here { box-shadow: 0 0 0 2.5px var(--lime), 0 6px 16px rgba(0, 0, 0, .2); z-index: 1; }
.ad-plan-court.here .ad-plan-label { background: var(--lime); color: var(--ink); }
.ad-plan-court.dim { opacity: .5; filter: saturate(.5); }
.ad-plan-court.clash { box-shadow: 0 0 0 2.5px #B3261E; }
.ad-plan-court.clash .ad-plan-label { background: #B3261E; color: #fff; }

/* Enkelbaan padel (100): 20 × 6 m i.p.v. 20 × 10 m, dus 60% zo breed binnen dezelfde plaats. */
.ad-plan-court.single:not(.portrait) { height: 60%; align-self: center; }
.ad-plan-court.single.portrait { width: 60%; justify-self: center; }

/* Fout of geen internet op een pagina (ScreenErrorBoundary). */
.ad-fail { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 40vh; padding: 40px 24px; text-align: center; color: var(--ink); }
.ad-fail svg { width: 32px; height: 32px; color: var(--muted); }
.ad-fail h2 { margin: 0; font-size: 20px; }
.ad-fail p { margin: 0 0 8px; max-width: 420px; color: var(--muted); line-height: 1.5; }
