/* Tournament styles */
.tournament-container {
    max-width: 1100px;
    margin: 20px auto;
    padding: 20px;
}

/* Mobile: when a discipline (e.g. Americano draw) is open, hide the global
   tab bar and event-context header to maximise screen space */
@media (max-width: 768px) {
    .discipline-focused #global-tabs,
    .discipline-focused #event-context-section {
        display: none;
    }
    .tournament-container {
        padding: 10px;
        margin: 8px auto;
    }

    #main-header .header-content {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 6px 8px;
    }
    #main-header .header-content h1 {
        flex: 1 1 100%;
        font-size: 1rem;
    }
    #main-header .user-info {
        width: 100%;
        justify-content: flex-end;
        flex-wrap: wrap;
        gap: 6px;
        border-left: 0;
        padding-left: 0;
    }
    #main-header .user-info > span {
        margin-right: auto;
        max-width: 34%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    #main-header .user-info .nav-btn,
    #main-header .user-info .btn {
        padding: 6px 9px;
        font-size: 0.78rem;
        white-space: nowrap;
    }
    .t-tabs {
        gap: 2px;
        margin-bottom: 12px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    .t-standings-table-wrap,
    .schedule-table-scroll {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .t-tabs-icons {
        flex-wrap: nowrap;
        overflow-x: auto;
    }
    .t-tab-btn {
        flex: 0 0 auto;
        padding: 7px 10px;
        font-size: 12px;
        white-space: nowrap;
    }
    .t-tab-btn.t-tab-icon {
        min-width: 42px;
        min-height: 42px;
        padding: 8px;
        font-size: 1.3rem;
    }
    .t-event-card {
        padding: 11px;
        margin-bottom: 8px;
    }
    .t-event-card h3 {
        font-size: 1rem;
        line-height: 1.25;
    }
    .t-event-card .t-event-meta {
        font-size: 12px;
        line-height: 1.35;
    }
    .t-discipline-row,
    .t-list-item {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 6px;
        padding: 7px 0;
    }
    .t-discipline-name,
    .t-list-item > span:first-child {
        flex: 1 1 100%;
        min-width: 0;
    }
    .t-discipline-row .t-btn,
    .t-list-item .t-btn {
        padding: 6px 9px;
        font-size: 12px;
    }
    .t-panel {
        padding: 12px;
        margin-bottom: 10px;
    }
    .t-panel h3 {
        font-size: 1rem;
    }
    /* Keep real table display — display:block on <table> collapses rows in Safari iOS.
       Horizontal scroll lives on .schedule-table-scroll / parent wrappers. */
    .t-standings-table,
    .t-games-table {
        white-space: nowrap;
    }
    .t-standings-table th,
    .t-standings-table td,
    .t-games-table th,
    .t-games-table td {
        padding: 6px 7px;
        font-size: 12px;
    }
}

/* Portrait phone: singles standings show last name only to fit without overflow */
@media (max-width: 768px) and (orientation: portrait) {
    .t-standings-lastname-portrait .standings-firstname {
        display: none;
    }
    .t-standings-lastname-portrait th,
    .t-standings-lastname-portrait td {
        padding: 6px 5px;
    }
}

/* Tabs */
.t-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid #4CAF50;
    margin-bottom: 20px;
}
.t-tabs-icons {
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}
.overview-mode-toggle {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 14px;
}
.overview-mode-toggle .t-btn.active {
    background: #4CAF50;
    border-color: #4CAF50;
    color: #fff;
}
.overview-own-section {
    margin-top: 18px;
}
.overview-own-section:first-child {
    margin-top: 0;
}
.overview-own-section h3 {
    margin: 0 0 10px;
    font-size: 1.05rem;
}
.t-standings-table tr.standings-self td {
    background: #e8f5e9;
    font-weight: 600;
}
.overview-own-games-table {
    min-width: 0;
    width: 100%;
}
.overview-own-games-table th,
.overview-own-games-table td {
    padding: 6px 8px;
    font-size: 13px;
    white-space: nowrap;
}
.overview-own-games-table td:nth-child(3) {
    white-space: normal;
}
.t-tab-btn.t-tab-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 8px 10px;
    font-size: 1.35rem;
    line-height: 1;
}
.t-section-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: #333;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.player-result-button,
.schedule-result-value {
    display: inline-flex;
    min-width: 52px;
    min-height: 30px;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 600;
}
.assign-slot-btn { white-space: nowrap; }
.replace-player-btn { background: none; border: none; padding: 0; color: #0066cc; text-decoration: underline dotted; cursor: pointer; font: inherit; }
.assign-game-options { display: grid; gap: 8px; max-height: 60vh; overflow-y: auto; }
.assign-game-option {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    padding: 10px;
    border: 1px solid #bbb;
    border-radius: 4px;
    background: #f5f5f5;
    cursor: pointer;
    text-align: left;
}
.assign-game-option:hover { background: #e5f2e7; }
.assign-game-option.has-absence {
    background: #f8d7da;
    border-color: #dc3545;
    color: #7b1f27;
}
.assign-game-option.has-absence:hover { background: #f1aeb5; }
.match-overview-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}
.match-overview-table { border-collapse: collapse; font-size: 12px; }
.match-overview-table th, .match-overview-table td { border: 1px solid #aaa; padding: 4px 7px; text-align: center; white-space: nowrap; }
.match-overview-table th { background: #d5d5d5; font-weight: 600; }
.match-overview-table td { background: #dcf7df; width: 48px; min-width: 48px; max-width: 48px; }
.match-overview-table th.match-overview-col { width: 48px; min-width: 48px; max-width: 48px; padding: 6px 0; vertical-align: bottom; }
/* Avoid rotate()+writing-mode combo — Safari iOS often clips or zero-heights the header */
.match-overview-vertical {
    display: inline-block;
    writing-mode: vertical-rl;
    -webkit-writing-mode: vertical-rl;
    text-orientation: mixed;
    white-space: nowrap;
    max-height: 7.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
}
.match-overview-table .match-overview-diagonal { background: #bdbdbd; }
.match-overview-table .match-overview-pending { background: #f5b7b1; color: #8b1a10; font-weight: 700; }
.match-overview-table .match-overview-own { background: #dcf7df; }
.match-overview-result { border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; width: 100%; }
.singles-progress-title { margin-top: 24px; }
.singles-progress-table tbody th { min-width: 100px; text-align: left; white-space: nowrap; }
.singles-progress-table td { background: #eef5eb; font-weight: 600; }
.singles-progress-table td.singles-progress-absent {
    background: #f8d7da;
    color: #7b1f27;
    border-color: #d55a62;
}
.player-result-button {
    border: 1px solid #91c995;
    background: #dcf7df;
    color: #245b2a;
    cursor: pointer;
}
.player-result-button:hover {
    background: #bcecc2;
}
.schedule-result-value {
    background: #f3f3f3;
    color: #555;
}
.t-tab-btn {
    padding: 8px 18px;
    border: none;
    background: #f0f0f0;
    cursor: pointer;
    border-radius: 4px 4px 0 0;
    font-size: 14px;
}
.t-tab-btn.active {
    background: #4CAF50;
    color: #fff;
    font-weight: bold;
}

/* Icon-only action buttons – equal size, centred glyph */
.t-btn-icon {
    width: 32px;
    height: 32px;
    min-width: unset;
    padding: 0;
    font-size: 16px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Action cell in schedule table – tight gap between icon buttons */
.schedule-action-cell {
    white-space: nowrap;
    display: flex;
    gap: 4px;
    align-items: center;
    justify-content: center;
}

/* Event cards */
.t-event-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 14px;
    background: #fafafa;
    cursor: pointer;
    transition: box-shadow 0.2s;
}
.t-event-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.t-event-card h3 { margin: 0 0 6px; }
.t-event-card .t-event-meta { color: #666; font-size: 13px; }
.t-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-left: 6px;
}
.t-badge-open  { background: #c8e6c9; color: #2e7d32; }
.t-badge-closed { background: #ffcdd2; color: #c62828; }
.t-badge-running { background: #fff9c4; color: #f57f17; }
.t-badge-finished { background: #e0e0e0; color: #424242; }
.t-badge-signed { background: #bbdefb; color: #1565c0; }

/* Discipline list */
.t-discipline-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}
.t-discipline-row:last-child { border-bottom: none; }
.t-discipline-name { flex: 1; font-weight: 500; }

/* Group standings */
.t-group-title { margin: 20px 0 8px; font-weight: bold; color: #4CAF50; }
.t-standings-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.t-standings-table th, .t-standings-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 13px;
}
.t-standings-table th { background: #f5f5f5; font-weight: 600; }

/* Games table */
.t-games-table { width: 100%; border-collapse: collapse; }
.t-games-table th, .t-games-table td {
    padding: 7px 10px;
    border-bottom: 1px solid #eee;
    font-size: 13px;
}
.t-games-table th { background: #f5f5f5; font-weight: 600; }

.player-schedule-day + .player-schedule-day {
    margin-top: 22px;
}
.player-schedule-day h4 {
    margin: 0;
    padding: 9px 12px;
    border: 1px solid #d7ddd8;
    border-bottom: 0;
    background: #eef2ef;
    color: #26382b;
    font-size: 14px;
    font-weight: 700;
}
.schedule-table-scroll {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.schedule-table {
    display: table;
    width: 100%;
    min-width: 650px;
    table-layout: fixed;
    border: 1px solid #d7ddd8;
    overflow: visible;
    white-space: normal;
}
.schedule-table.has-actions {
    min-width: 750px;
}
.schedule-table .schedule-col-time { width: 72px; }
.schedule-table .schedule-col-court { width: 62px; }
.schedule-table .schedule-col-game { width: 62px; }
.schedule-table .schedule-col-result { width: 82px; }
.schedule-table .schedule-col-actions { width: 120px; }
.schedule-table th,
.schedule-table td {
    text-align: left;
    vertical-align: middle;
}
.schedule-table th:nth-child(-n+3),
.schedule-table td:nth-child(-n+3),
.schedule-table th:nth-child(6),
.schedule-table td:nth-child(6),
.schedule-table th:nth-child(7),
.schedule-table td:nth-child(7) {
    text-align: center;
}
.schedule-table tr.schedule-game-conflict td {
    background: #fff0d6;
    border-bottom-color: #dd9c38;
}
.schedule-game-conflict td:nth-child(3) span {
    color: #9b4700;
    font-size: 16px;
    font-weight: 700;
}
.schedule-player-absence {
    display: inline-block;
    padding: 3px 7px;
    border: 1px solid #d55a62;
    border-radius: 3px;
    background: #f8d7da;
    color: #7b1f27;
    font-weight: 700;
}
.assign-game-option .schedule-player-absence {
    padding: 1px 6px;
    border-color: #b02a37;
    background: #c82333;
    color: #fff;
}
.assign-game-option .schedule-player-absence::before {
    content: "\26A0\FE0E  ";
}
.assign-absence-hint {
    font-size: 12px;
    font-weight: 600;
}
.day-available-players {
    display: block;
    margin-top: 3px;
    color: #4a5d4f;
    font-size: 12px;
    font-weight: 400;
}

.absence-day + .absence-day {
    margin-top: 18px;
}
.absence-day h4 {
    margin: 0;
    padding: 9px 12px;
    border: 1px solid #d7ddd8;
    background: #eef2ef;
    color: #26382b;
    font-size: 14px;
}
.absence-player-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin: 0;
    padding: 12px 16px 12px 32px;
    border: 1px solid #d7ddd8;
    border-top: 0;
}
.absence-player-list li {
    min-width: 140px;
}

/* Admin panels */
.t-panel {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}
.t-panel h3 { margin-top: 0; border-bottom: 1px solid #eee; padding-bottom: 10px; }
.t-form-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.t-form-group { flex: 1; min-width: 160px; }
.t-form-group label { display: block; font-size: 13px; color: #555; margin-bottom: 4px; }
.t-form-group input, .t-form-group select, .t-form-group textarea {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
    box-sizing: border-box;
}
.t-form-group.t-checkbox-group {
    display: flex;
    align-items: flex-end;
}
.t-form-group.t-checkbox-group label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 33px;
    margin: 0;
    cursor: pointer;
}
.t-form-group.t-checkbox-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    padding: 0;
    accent-color: #4CAF50;
}
.t-assignment-row {
    flex-wrap: nowrap;
    align-items: flex-end;
}
.t-assignment-row .t-form-group:first-child {
    flex: 1 1 auto;
}
.t-assignment-row .t-checkbox-group {
    flex: 0 0 auto;
    min-width: 0;
}
.t-assignment-action {
    flex: 0 0 auto;
}
@media (max-width: 560px) {
    .t-assignment-row {
        flex-wrap: wrap;
    }
}
.t-btn { padding: 7px 16px; border: none; border-radius: 4px; cursor: pointer; font-size: 13px; }
.t-btn-primary { background: #4CAF50; color: #fff; }
.t-btn-danger  { background: #f44336; color: #fff; }
.t-btn-secondary { background: #607d8b; color: #fff; }
.t-btn-warning  { background: #ff9800; color: #fff; }
.t-msg { padding: 8px; border-radius: 4px; margin-top: 8px; font-size: 13px; }
.t-msg-ok  { background: #e8f5e9; color: #2e7d32; }
.t-msg-err { background: #ffebee; color: #c62828; }
.t-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}
.t-list-item:last-child { border-bottom: none; }
.t-list-item span { flex: 1; }

/* t-btn-info for info/manage buttons */
.t-btn-info { background: #2196F3; color: #fff; }
.t-btn-success {
    background: #e65100;
    color: #fff;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,.18);
    letter-spacing: .02em;
}
.t-btn-success:hover { background: #bf360c; }

/* Modal styles */
.modal {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.result-entry-modal { padding: 16px; box-sizing: border-box; }
.result-entry-content { width: min(100%, 480px); max-height: calc(100vh - 32px); box-sizing: border-box; padding: 24px; }
.result-entry-content h3 { margin: 0 40px 8px 0; font-size: 1.15rem; }
.result-entry-close { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border: 0; background: transparent; font-size: 28px; cursor: pointer; }
.result-entry-match { margin-bottom: 18px; font-size: 0.95rem; overflow-wrap: anywhere; }
.result-entry-row { display: grid; grid-template-columns: 62px minmax(0, 1fr) minmax(0, 1fr); align-items: end; gap: 12px; margin-bottom: 14px; }
.result-entry-set { align-self: center; font-weight: 600; }
.result-entry-row label { display: grid; gap: 6px; font-size: 0.85rem; font-weight: 600; }
.result-entry-row input { width: 100%; min-width: 0; height: 48px; box-sizing: border-box; border: 1px solid #aab5ad; border-radius: 4px; padding: 6px 10px; font-size: 18px; text-align: center; }
.result-entry-row input:focus-visible, .result-entry-modal button:focus-visible { outline: 2px solid #245b2a; outline-offset: 2px; }
.result-entry-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.result-entry-actions button { min-height: 44px; }
.result-entry-actions button:disabled { opacity: 0.55; cursor: wait; }
@media (max-width: 560px) {
    .result-entry-content { padding: 20px 16px; }
    .result-entry-row { grid-template-columns: 50px minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
    .result-entry-actions button { flex: 1; padding: 8px; }
}

.t-btn-compact { padding: 4px 10px; font-size: 0.85rem; min-height: 36px; }
.reschedule-modal-content { width: min(100%, 560px); max-height: calc(100vh - 32px); overflow: auto; }
.reschedule-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; }
.reschedule-option { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid #e4e8e5; }
.reschedule-option-meta { font-size: 0.85rem; color: #566; margin-top: 2px; }
.reschedule-empty { color: #666; font-size: 0.9rem; }
.reschedule-inbox-item { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid #e4e8e5; }
.reschedule-inbox-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.t-tab-btn.has-inbox-badge { position: relative; }
.t-tab-btn.has-inbox-badge::after {
    content: attr(data-badge);
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: #b33;
    color: #fff;
    font-size: 11px;
    line-height: 16px;
    text-align: center;
}

.close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
    line-height: 1;
}

.close:hover {
    color: #000;
}

/* Form styles in modal */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #495057;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* Message styles in modal */
.modal-message {
    display: none;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.modal-message.success-message {
    display: block;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.modal-message.error-message {
    display: block;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Button styles for modals */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-primary {
    background-color: #4CAF50;
    color: white;
}

.btn-primary:hover {
    background-color: #45a049;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.85rem;
}

/* Americano Court Status — card style */
.court-free,
.court-busy {
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 8px;
    border: 2px solid;
    border-bottom: 2px solid !important; /* override t-list-item */
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
}
.court-free {
    background-color: #e8f5e9;
    border-color: #4CAF50;
}
.court-busy {
    background-color: #fff3e0;
    border-color: #FF9800;
}
.court-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.court-card-names {
    font-size: 0.9rem;
    color: #333;
}


/* ============================================================
   Responsive Card-Layout für Spielplan (nur User-Ansicht)
   Auf schmalen Bildschirmen (Hochformat Smartphone) wird die
   Tabelle in Karten umgewandelt – kein horizontales Scrollen.
   ============================================================ */
@media (max-width: 600px) {
    .player-schedule-day .schedule-table-scroll {
        overflow-x: visible;
    }

    .player-schedule-day .schedule-table {
        display: block;
        width: 100%;
        min-width: 0 !important;
        border: 0;
    }

    .player-schedule-day .schedule-table colgroup,
    .player-schedule-day .schedule-table thead,
    .player-schedule-day .schedule-table td.schedule-cell-game {
        display: none !important;
    }

    .player-schedule-day .schedule-table tbody {
        display: block;
        width: 100%;
    }

    /* Kompakte Karte: Zeit|Platz, Heim|Gast, Ergebnis */
    .player-schedule-day .schedule-table tr {
        display: grid;
        grid-template-columns: 1fr 1fr;
        border: 1px solid #c8d5ca;
        border-radius: 6px;
        margin-bottom: 8px;
        padding: 0;
        background: #fff;
        box-shadow: 0 1px 3px rgba(0,0,0,0.06);
        overflow: hidden;
    }

    .player-schedule-day .schedule-table tr.schedule-game-conflict {
        border-color: #dd9c38;
        background: #fff0d6;
    }

    .player-schedule-day .schedule-table td {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 2px;
        width: auto;
        min-width: 0;
        padding: 6px 10px;
        border: none;
        border-bottom: 1px solid #eef2ef;
        font-size: 13px;
        text-align: left;
        box-sizing: border-box;
        overflow-wrap: anywhere;
    }

    .player-schedule-day .schedule-table td.schedule-cell-time,
    .player-schedule-day .schedule-table td.schedule-cell-home {
        border-right: 1px solid #eef2ef;
    }

    .player-schedule-day .schedule-table td.schedule-cell-result,
    .player-schedule-day .schedule-table td.schedule-action-cell {
        grid-column: 1 / -1;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .player-schedule-day .schedule-table td.schedule-action-cell {
        justify-content: flex-end;
        gap: 6px;
        flex-wrap: wrap;
    }

    .player-schedule-day .schedule-table td:last-child {
        border-bottom: none;
    }

    .player-schedule-day .schedule-table td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 11px;
        color: #666;
        text-align: left;
        white-space: nowrap;
        margin-right: 0;
    }

    .player-schedule-day .schedule-table td.schedule-action-cell::before {
        content: none;
    }

    .player-schedule-day .schedule-table td:nth-child(-n+3),
    .player-schedule-day .schedule-table td:nth-child(6),
    .player-schedule-day .schedule-table td:nth-child(7) {
        text-align: left;
    }
}

/* Waiting queue — full-width clickable row */
.queue-assign-btn {
    display: block;
    width: 100%;
    text-align: left;
    background: #e3f2fd;
    border: 2px solid #90caf9;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: inherit;
    transition: background .15s, border-color .15s;
}
.queue-assign-btn:hover {
    background: #bbdefb;
    border-color: #42a5f5;
}

.idle-player-chip {
    display: inline-block;
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
    border-radius: 16px;
    padding: 3px 10px;
    font-size: 0.85rem;
    margin: 2px 3px;
}
.idle-player-chip.idle-needs-game {
    background: #fff8e1;
    color: #6d4c00;
    border-color: #ffd54f;
}
