/* ============================================================
   Self-hosted webfonts (Inter Tight + Fraunces, latin + latin-ext)
   ============================================================ */
@font-face {
    font-family: 'Inter Tight';
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url('fonts/intertight-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Inter Tight';
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url('fonts/intertight-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Fraunces';
    font-style: normal;
    font-weight: 500 700;
    font-display: swap;
    src: url('fonts/fraunces-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Fraunces';
    font-style: normal;
    font-weight: 500 700;
    font-display: swap;
    src: url('fonts/fraunces-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ============================================================
   Design tokens (shared with login page)
   ============================================================ */
:root {
    --ink:        #0b1220;
    --ink-soft:   #1e293b;
    --muted:      #5b6776;
    --line:       rgba(15, 23, 42, 0.08);
    --surface:    rgba(255, 255, 255, 0.72);
    --surface-2:  rgba(255, 255, 255, 0.55);
}

body {
    font-family: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    min-height: 100vh;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.55) 0%, rgba(255,255,255,0.78) 100%),
        url("img/login-bg.png") center 65% / cover no-repeat fixed,
        #cfe6f5;
}

/* ============================================================
   Topbar
   ============================================================ */
.topbar {
    position: relative;
    z-index: 5;
    background: transparent;
    border-bottom: 0;
    box-shadow: none;
}

.topbar__row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
    padding: 0 24px;
    height: 68px;
}

#dayPicker.day-picker {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

/* User chip + logout */
.topbar__user {
    display: flex;
    align-items: center;
    gap: 8px;
}
.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px 6px 6px;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    font-size: 13.5px;
    font-weight: 500;
    color: var(--ink-soft);
}
.user-chip__avatar {
    width: 26px; height: 26px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: var(--ink);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.user-chip__name {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.topbar__logout {
    display: grid; place-items: center;
    width: 36px; height: 36px;
    border-radius: 10px;
    color: var(--muted);
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
}
.topbar__logout:hover {
    background: rgba(15, 23, 42, 0.06);
    color: var(--ink);
}

/* ============================================================
   Day picker (segmented pill)
   ============================================================ */
.day-picker {
    display: inline-flex;
    align-items: stretch;
    gap: 4px;
    padding: 4px;
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid var(--line);
    border-radius: 14px;
    flex-wrap: nowrap;
}

.day-picker .day-btn {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 6px 12px;
    min-width: 56px;
    border-radius: 10px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    color: var(--ink-soft);
    cursor: pointer;
    font-family: inherit;
    transition: background .15s ease, color .15s ease, box-shadow .15s ease, transform .12s ease;
}
.day-picker .day-btn .dow {
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    transition: color .15s ease;
}
.day-picker .day-btn .date {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.day-picker .day-btn:hover:not(.is-active) {
    background: rgba(15, 23, 42, 0.06);
}
.day-picker .day-btn.is-active {
    background: var(--ink);
    color: #fff;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.12) inset,
        0 8px 18px -8px rgba(15, 23, 42, 0.55);
}
.day-picker .day-btn.is-active .dow { color: rgba(255, 255, 255, 0.7); }

/* ============================================================
   Legend chips
   ============================================================ */
.legend {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}
.legend-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--muted);
    white-space: nowrap;
}
.legend-dot {
    width: 9px; height: 9px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    flex-shrink: 0;
}
.legend--below {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 16px;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.legend-dot.free       { background-color: #d4edda; }
.legend-dot.booked     { background-color: #e2e3e5; }
.legend-dot.training   { background-color: #0099e6; border-color: rgba(0, 153, 230, 0.4); }
.legend-dot.tournament { background-color: #ebff3b; border-color: rgba(0, 0, 0, 0.15); }
.legend-dot.reserved   { background-color: #fbd5e3; border-color: rgba(192, 39, 96, 0.55); }

/* ============================================================
   Page wrapper
   ============================================================ */
.page {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px;
}

/* ============================================================
   Booking grid
   ============================================================ */
.grid-wrap {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 18px;
    overflow: clip;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 24px 50px -28px rgba(15, 23, 42, 0.22);
}

.grid-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    font-family: "Inter Tight", sans-serif;
    color: var(--ink);
    background: transparent;
}

/* Header */
.grid-table thead th {
    position: sticky;
    top: 0;
    z-index: 5;
    background: #ffffff;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    padding: 16px 10px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--ink);
    text-align: center;
}
.grid-table thead th.time-col {
    text-align: left;
    padding-left: 18px;
    width: 80px;
    color: var(--muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 10.5px;
}

/* Body cells */
.grid-table tbody td {
    position: relative;
    height: 32px;
    padding: 0;
    vertical-align: middle;
    text-align: center;
    border-bottom: 1px solid rgba(15, 23, 42, 0.05);
    transition: background-color .15s ease;
    font-size: 12.5px;
    background-color: #ffffff;
}
.grid-table tbody tr:last-child td { border-bottom: 0; }
.grid-table tbody tr:last-child td:first-child { border-bottom-left-radius: 18px; }
.grid-table tbody tr:last-child td:last-child  { border-bottom-right-radius: 18px; }

.grid-table tbody td.time-col {
    text-align: left;
    padding-left: 18px;
    color: var(--muted);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    background: #fafbfc;
    border-right: 1px solid rgba(15, 23, 42, 0.05);
    width: 80px;
    font-size: 11.5px;
}

/* Zebra striping */
.grid-table tbody tr:nth-child(even) .slot.unavailable,
.grid-table tbody tr:nth-child(even) td.time-col {
    background-color: #fafbfc;
}
.grid-table tbody tr:nth-child(even) .slot.unavailable.past {
    background-color: #e6e9ee;
}
.grid-table tbody tr:nth-child(even) .slot.free {
    background-color: #dcecdf;
}

/* Status colors — solid, refined */
.slot.free {
    background-color: #e7f5e9;
    cursor: pointer;
}
.grid-table tbody .slot.free:hover,
.grid-table tbody tr:nth-child(even) .slot.free:hover {
    background-color: #c5e3cc;
}

.slot.unavailable { background-color: #ffffff; }
.slot.unavailable.past { background-color: #eef0f4; }

.slot.booked {
    background-color: #e2e8f0;
    color: #2c333d;
}
.slot.booked.is-own {
    background-color: #cfe1ff;
    color: #1a3b7a;
    cursor: pointer;
}
.grid-table tbody .slot.booked.is-own:hover {
    background-color: #b9d2fb;
}
.slot.booked.is-own-past {
    background-color: #e6ebf2;
    color: #6b7280;
    cursor: default;
}
.slot.training {
    background-color: #bfdbef;
    color: #08416b;
}
.slot.tournament {
    background-color: #fde68a;
    color: #5a4708;
}
.slot.match {
    background-color: #fcd6a8;
    color: #7a3e07;
}
.slot.blocked {
    background-color: #fbc4cc;
    color: #8a1a26;
}
/* Reservations (out-of-window, scheduler-driven). Pink = our tool's reservations.
   .is-own  : created by the logged-in user  -> pink fill
   .is-other: created by someone else        -> grey (like .booked) + pink border */
.slot.reserved.is-own {
    background-color: #fbd5e3;
    color: #7a1e44;
    cursor: pointer;
}
.grid-table tbody .slot.reserved.is-own:hover {
    background-color: #f7bfd2;
}
.slot.reserved.is-other {
    background-color: #e2e8f0;
    color: #2c333d;
    cursor: pointer;
}
/* Pre-booked / shim_failed: same color as pending but a tiny visual nudge */
.slot.reserved.is-pre-booked { box-shadow: inset 0 0 0 1px rgba(192, 39, 96, 0.55); }
.slot.reserved.is-shim-failed { box-shadow: inset 0 0 0 1px rgba(192, 39, 96, 0.35); }

/* Slate outline on every booking, rendered as overlay so it's
   never eaten by border-collapse mechanics */
.slot.booked::after,
.slot.training::after,
.slot.tournament::after,
.slot.match::after,
.slot.blocked::after,
.slot.reserved::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid rgba(15, 23, 42, 0.55);
    pointer-events: none;
    z-index: 1;
}
/* Pink border on everyone's reservations; thicker on others so own-pink-fill
   stays the dominant signal for the creator. */
.slot.reserved.is-own::after  { border-color: rgba(192, 39, 96, 0.55); }
.slot.reserved.is-other::after { border-color: rgba(192, 39, 96, 0.85); border-width: 1.5px; }

/* Completed reservation booked through our tool: keep the regular booked look
   but add a 4px pink left-edge stripe so it's distinguishable from plain
   courtbooking.de direct bookings. */
.slot.booked.from-reservation::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background-color: #c02760;
    z-index: 2;
    pointer-events: none;
}

/* Booking label — single centered text per booking */
.booking-label {
    display: block;
    padding: 8px 12px;
    font-family: "Inter Tight", sans-serif;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: -0.005em;
    text-align: center;
    word-break: break-word;
    color: var(--ink-soft);
    position: relative;
    z-index: 2;
}
.booking-label__short { display: none; }
.court-head__short { display: none; }

/* ============================================================
   Booking modal
   ============================================================ */
.bk-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: bk-fade .18s ease-out;
}
.bk-overlay[hidden] { display: none; }
body.bk-open { overflow: hidden; }

@keyframes bk-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes bk-rise {
    from { opacity: 0; transform: translateY(8px) scale(0.985); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.bk-modal {
    position: relative;
    width: min(560px, 100%);
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 24px;
    padding: 32px 36px 28px;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.06),
        0 30px 80px -20px rgba(15, 23, 42, 0.35);
    animation: bk-rise .22s cubic-bezier(.2,.8,.2,1);
}

/* Header */
.bk-header {
    text-align: center;
    margin-bottom: 22px;
}
.bk-court {
    font-family: "Fraunces", "Inter Tight", serif;
    font-weight: 600;
    font-size: 26px;
    letter-spacing: -0.015em;
    margin: 0 0 4px;
    color: var(--ink);
}
.bk-date {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
    letter-spacing: -0.005em;
}

/* Time row */
.bk-time-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}
.bk-time-field {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}
.bk-time-label, .bk-time-sep {
    font-size: 13px;
    color: var(--muted);
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: lowercase;
}

/* Pill-style selects (and the disabled self input) */
.bk-select {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid var(--line);
    background-color: #f5f6f8;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%235b6776' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px 8px;
    border-radius: 999px;
    color: var(--ink);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 500;
    padding: 10px 38px 10px 18px;
    min-width: 0;
    line-height: 1.2;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.bk-select:hover {
    border-color: rgba(15, 23, 42, 0.18);
}
.bk-select:focus-visible {
    outline: none;
    border-color: rgba(15, 23, 42, 0.55);
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.1);
}
.bk-select:disabled {
    cursor: default;
    color: var(--ink);
    opacity: 1;
}
.bk-self {
    background-image: none;
    padding-right: 18px;
}
.bk-guest-name {
    background-image: none;
    padding-right: 18px;
    cursor: text;
}
/* Custom time dropdown (replaces native <select>) */
.bk-cs {
    position: relative;
    display: inline-block;
}
.bk-cs-trigger {
    appearance: none;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: #ffffff
        url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%231b2230' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
        no-repeat right 16px center / 12px 8px;
    border-radius: 999px;
    color: var(--ink);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    padding: 12px 40px 12px 20px;
    min-width: 132px;
    line-height: 1.2;
    text-align: left;
    cursor: pointer;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.6) inset,
        0 1px 2px rgba(15, 23, 42, 0.05),
        0 6px 18px -12px rgba(15, 23, 42, 0.2);
    transition: border-color .15s ease, box-shadow .15s ease, transform .1s ease;
}
.bk-cs-trigger:hover {
    border-color: rgba(15, 23, 42, 0.28);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.6) inset,
        0 2px 4px rgba(15, 23, 42, 0.06),
        0 10px 24px -14px rgba(15, 23, 42, 0.28);
}
.bk-cs-trigger.is-open,
.bk-cs-trigger:focus-visible {
    outline: none;
    border-color: rgba(15, 23, 42, 0.55);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.6) inset,
        0 0 0 3px rgba(15, 23, 42, 0.12);
}
.bk-cs-trigger:active {
    transform: translateY(1px);
}
.bk-cs[data-id="bkEnd"] .bk-cs-trigger {
    background-image: none;
    padding-right: 20px;
    pointer-events: none;
    cursor: default;
}
.bk-cs-text {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bk-cs-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 20;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 14px;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 18px 40px -16px rgba(15, 23, 42, 0.28);
    padding: 6px;
    max-height: 280px;
    overflow-y: auto;
}
.bk-cs-panel[hidden] { display: none; }

.bk-cs-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.bk-cs-item {
    padding: 9px 14px;
    border-radius: 10px;
    font-size: 14.5px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    color: var(--ink);
    cursor: pointer;
    transition: background-color .12s ease, color .12s ease;
}
.bk-cs-item:hover {
    background: rgba(15, 23, 42, 0.06);
}
.bk-cs-item.is-selected {
    background: #1b2230;
    color: #ffffff;
}
.bk-cs-item.is-selected:hover {
    background: #2a3344;
}

/* Player rows */
.bk-player-row {
    margin-bottom: 12px;
}
.bk-player-row .bk-select {
    width: 100%;
}

/* Action buttons */
.bk-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
}
.bk-actions #bkClose {
    margin-right: auto;
}
.bk-btn {
    appearance: none;
    border: 1.5px solid;
    background: #ffffff;
    border-radius: 999px;
    padding: 9px 22px;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: -0.005em;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .1s ease;
}
.bk-btn:active { transform: translateY(1px); }

.bk-btn--close {
    color: #b03a4c;
    border-color: #f4c2cb;
    background: #fde7eb;
}
.bk-btn--close:hover {
    background: #f9d3da;
    border-color: #ec9fae;
}

.bk-btn--book {
    color: #2f7a47;
    border-color: #b8dec3;
    background: #e3f2e8;
}
.bk-btn--book:hover:not(:disabled) {
    background: #cfe7d7;
    border-color: #97cba7;
}
.bk-btn--book:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    color: #6b8775;
}

.bk-btn--delete {
    color: #a31a26;
    border-color: #f1bcc3;
    background: #fce6ea;
}
.bk-btn--delete:hover:not(:disabled) {
    background: #f6cdd3;
    border-color: #e3a0aa;
}
.bk-btn--delete:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

/* Orange for reservation actions (new Reservieren button, delete-reservation) */
.bk-btn--reserve {
    color: #8a4a08;
    border-color: #f4c898;
    background: #fdebd2;
}
.bk-btn--reserve:hover:not(:disabled) {
    background: #f9d6a8;
    border-color: #eaae6e;
}
.bk-btn--reserve:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    color: #8a6f50;
}

/* Reservation-flow delete button: orange instead of the red booking-flow delete */
.bk-btn--delete.is-reserve-delete {
    color: #8a4a08;
    border-color: #f4c898;
    background: #fdebd2;
}
.bk-btn--delete.is-reserve-delete:hover:not(:disabled) {
    background: #f9d6a8;
    border-color: #eaae6e;
}

/* Modal mobile tweaks */
@media (max-width: 560px) {
    .bk-modal { padding: 28px 22px 22px; border-radius: 20px; }
    .bk-court { font-size: 22px; }
    .bk-time-row { gap: 10px; }
    .bk-cs-trigger { min-width: 118px; padding: 11px 36px 11px 16px; font-size: 14.5px; }
}

/* ============================================================
   Partner picker (custom dropdown w/ favorites)
   ============================================================ */
.bk-partner {
    position: relative;
    width: 100%;
}
.bk-partner-trigger {
    width: 100%;
    text-align: left;
    cursor: pointer;
}
.bk-partner-trigger.is-placeholder .bk-partner-text {
    color: var(--muted);
    font-weight: 500;
}
.bk-partner-trigger.is-open {
    border-color: rgba(15, 23, 42, 0.55);
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.1);
}
.bk-partner-text {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 18px;
}

.bk-partner-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 10;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 14px;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 18px 40px -16px rgba(15, 23, 42, 0.28);
    padding: 10px;
    max-height: 320px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.bk-partner-panel[hidden] { display: none; }

.bk-partner-search {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    border: 1px solid var(--line);
    background: #f5f6f8;
    border-radius: 999px;
    color: var(--ink);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    padding: 9px 16px;
    line-height: 1.2;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.bk-partner-search:focus-visible {
    outline: none;
    border-color: rgba(15, 23, 42, 0.55);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
}

.bk-partner-list {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    max-height: 240px;
}
.bk-partner-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color .12s ease;
}
.bk-partner-item:hover {
    background: rgba(15, 23, 42, 0.05);
}
.bk-partner-name {
    flex: 1;
    font-size: 13.5px;
    color: var(--ink-soft);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bk-partner-empty {
    padding: 14px 10px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}
.bk-partner-section {
    list-style: none;
    padding: 8px 10px 4px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    pointer-events: none;
}
.bk-partner-divider {
    list-style: none;
    height: 1px;
    margin: 6px 8px;
    background: rgba(15, 23, 42, 0.08);
    pointer-events: none;
}

.bk-partner-star {
    appearance: none;
    border: 0;
    background: transparent;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #b6bdc7;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color .12s ease, color .12s ease, transform .1s ease;
}
.bk-partner-star:hover {
    background: rgba(15, 23, 42, 0.06);
    color: #8a93a0;
}
.bk-partner-star.is-active {
    color: #f5b301;
}
.bk-partner-star.is-active:hover {
    background: rgba(245, 179, 1, 0.12);
    color: #d99a00;
}
.bk-partner-star:active {
    transform: scale(0.92);
}
.bk-partner-star i {
    font-size: 15px;
    line-height: 1;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
    .topbar__row { padding: 0 16px; gap: 12px; }
    .user-chip__name { display: none; }
    .user-chip { padding: 4px; }
}

@media (max-width: 700px) {
    .topbar__row {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        height: auto;
        gap: 8px;
        padding: 8px 12px;
    }
    .topbar__user {
        align-self: flex-end;
        order: 1;
    }
    #dayPicker.day-picker {
        position: static;
        transform: none;
        order: 2;
        width: 100%;
        gap: 2px;
        padding: 3px;
        border-radius: 12px;
        justify-content: space-between;
    }
    .day-picker .day-btn {
        min-width: 0;
        flex: 1 1 0;
        padding: 5px 4px;
        border-radius: 9px;
    }
    .day-picker .day-btn .dow { font-size: 10px; letter-spacing: 0.06em; }
    .day-picker .day-btn .date { font-size: 12.5px; }
    .page { padding: 12px; }
}

@media (max-width: 600px) {
    .legend { gap: 6px 10px; }
    .legend-chip { font-size: 11px; gap: 5px; }
    .legend--below { padding: 10px 12px; gap: 6px 12px; }

    .booking-label__full  { display: none; }
    .booking-label__short { display: inline; }
    .booking-label { padding: 6px 6px; font-size: 11.5px; }

    .court-head__full  { display: none; }
    .court-head__short { display: inline; }
    .grid-table thead th { padding: 10px 2px; font-size: 13px; }
    .grid-table thead th.time-col { padding: 10px 6px; width: 56px; font-size: 9.5px; }
    .grid-table tbody td.time-col { padding-left: 6px; width: 56px; font-size: 11px; }
}
