body {
    background-color: #f4f6f8;
}

.par-grid .form-label {
    font-size: 0.7rem;
}

.par-grid-single-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.35rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
}

.par-grid-single-row .par-cell {
    flex: 0 0 auto;
    min-width: 2.6rem;
}

.par-grid-single-row .form-control {
    padding-left: 0.35rem;
    padding-right: 0.35rem;
    text-align: center;
}

.player-summary-unpaid {
    opacity: 0.42;
}

.player-summary-unpaid .player-name-cell {
    font-style: italic;
}

#player-summary-table .paid-toggle {
    min-width: 4.5rem;
}

#player-summary-table .player-summary-total-row td {
    border-top-width: 2px;
}

#player-summary-body.player-summary-recalculating {
    opacity: 0.55;
    pointer-events: none;
}

.hole-verification-row.status-winner {
    background-color: #d1e7dd;
}

.hole-verification-row.status-tied {
    background-color: #fff3cd;
}

.hole-verification-row.status-carried {
    background-color: #ffe5d0;
}

.hole-verification-row.status-tied_winner {
    background-color: #cfe2ff;
}

.hole-verification-row.status-no_winner {
    background-color: #e9ecef;
    color: #495057;
}

.status-badge {
    display: inline-block;
    padding: 0.2em 0.55em;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 0.25rem;
    text-transform: lowercase;
}

.status-badge-winner {
    background-color: #198754;
    color: #fff;
}

.status-badge-tied {
    background-color: #ffc107;
    color: #212529;
}

.status-badge-carried {
    background-color: #fd7e14;
    color: #fff;
}

.status-badge-tied_winner {
    background-color: #0d6efd;
    color: #fff;
}

.status-badge-no_winner {
    background-color: #6c757d;
    color: #fff;
}

.hole-status-filter-th {
    white-space: nowrap;
}

.hole-status-filter-th > span {
    vertical-align: middle;
}

.hole-status-filter-wrap {
    display: inline-block;
    position: relative;
    vertical-align: middle;
    margin-left: 0.15rem;
}

.hole-status-filter-btn {
    line-height: 1;
    color: #495057;
    vertical-align: middle;
}

.hole-status-filter-btn:hover,
.hole-status-filter-btn.is-active {
    color: #0d6efd;
}

.hole-status-filter-popup {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 1100;
    min-width: 11rem;
    margin-top: 0.25rem;
    padding: 0.5rem 0.65rem;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.12);
}

.hole-status-filter-actions {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid #eee;
}

.hole-status-filter-option {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0.25rem 0;
    cursor: pointer;
    font-size: 0.85rem;
}

.hole-verification-row.hole-row-hidden {
    display: none;
}

.hole-winner-cell,
.hole-tied-cell {
    min-width: 7rem;
}

.player-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.player-chip {
    display: inline-block;
    padding: 0.22em 0.65em;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.35;
    border-radius: 999px;
    border: 1px solid transparent;
    white-space: nowrap;
}

.player-chip-0 {
    background-color: #e3f2fd;
    color: #0d47a1;
    border-color: #90caf9;
}

.player-chip-1 {
    background-color: #f3e5f5;
    color: #6a1b9a;
    border-color: #ce93d8;
}

.player-chip-2 {
    background-color: #e8f5e9;
    color: #2e7d32;
    border-color: #a5d6a7;
}

.player-chip-3 {
    background-color: #fff3e0;
    color: #e65100;
    border-color: #ffcc80;
}

.player-chip-4 {
    background-color: #fce4ec;
    color: #ad1457;
    border-color: #f48fb1;
}

.player-chip-5 {
    background-color: #e0f7fa;
    color: #00695c;
    border-color: #80deea;
}

.card {
    border: none;
}

.course-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1050;
    margin-top: 2px;
    max-height: 280px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.course-search-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
    text-align: left;
    font-size: 0.9rem;
}

.course-search-item:last-child {
    border-bottom: none;
}

button.course-search-item:hover,
button.course-search-item.active {
    background-color: #e8f4ff;
}

.course-search-status {
    cursor: default;
    color: #6c757d;
}

.course-search-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.course-search-meta {
    flex-shrink: 0;
    font-size: 0.75rem;
    color: #6c757d;
}

.course-search-spinner {
    display: inline-block;
    width: 0.9rem;
    height: 0.9rem;
    margin-right: 0.4rem;
    border: 2px solid #dee2e6;
    border-top-color: #0d6efd;
    border-radius: 50%;
    animation: course-search-spin 0.7s linear infinite;
    vertical-align: middle;
}

@keyframes course-search-spin {
    to {
        transform: rotate(360deg);
    }
}

body.processing-active {
    overflow: hidden;
}

.processing-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(244, 246, 248, 0.92);
    backdrop-filter: blur(2px);
}

.processing-card {
    text-align: center;
    padding: 2rem 2.5rem;
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.12);
    max-width: 22rem;
}

.processing-spinner {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 1.25rem;
    border: 4px solid #dee2e6;
    border-top-color: #0d6efd;
    border-radius: 50%;
    animation: course-search-spin 0.8s linear infinite;
}

.processing-message {
    font-size: 1.1rem;
    font-weight: 600;
    color: #212529;
}

.pdf-extraction-details {
    border: none;
}

.pdf-extraction-details > summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
}

.pdf-extraction-details > summary::-webkit-details-marker {
    display: none;
}

.pdf-scores-export-root {
    background: #fff;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.pdf-scores-export-root,
.pdf-scores-export-root * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.pdf-scores-export-title {
    font-size: 0.9rem;
}

.pdf-extraction-toggle {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #0d6efd;
    background: #fff;
    border: 1px solid #0d6efd;
    border-radius: 0.375rem;
}

.pdf-extraction-toggle:hover {
    background: #e8f4ff;
}

.pdf-extraction-table-wrap .hole-col {
    min-width: 2rem;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
}

.pdf-extraction-table thead th {
    font-size: 0.75rem;
    font-weight: 600;
}

.pdf-extraction-table tbody td {
    font-size: 0.8rem;
    transition: box-shadow 0.12s ease;
}

.pdf-extraction-table tbody tr:hover td {
    box-shadow: inset 0 0 0 9999px rgba(13, 110, 253, 0.14);
}

/* Fixed column colors — meta columns */
.pdf-extraction-table .pdf-col-pos {
    background-color: #e9ecef;
}

.pdf-extraction-table .pdf-col-player {
    background-color: #cfe2ff;
}

.pdf-extraction-table .pdf-col-out {
    background-color: #ffe5d0;
}

.pdf-extraction-table .pdf-col-in {
    background-color: #f8d7da;
}

.pdf-extraction-table .pdf-col-total {
    background-color: #d0d4f7;
}

.pdf-extraction-table .pdf-col-net {
    background-color: #b8e9e0;
}

.pdf-extraction-table .pdf-col-hcp {
    background-color: #e2d4f0;
}

.pdf-par-row th {
    font-weight: 700;
    border-top: 2px solid #adb5bd;
}

.pdf-par-row .pdf-col-pos {
    font-style: italic;
}

/* Per-hole column tints (header / par row only) */
.pdf-extraction-table thead .pdf-hole-col-1,
.pdf-extraction-table .pdf-par-row .pdf-hole-col-1 { background-color: #fff8e1; }
.pdf-extraction-table thead .pdf-hole-col-2,
.pdf-extraction-table .pdf-par-row .pdf-hole-col-2 { background-color: #ffecb3; }
.pdf-extraction-table thead .pdf-hole-col-3,
.pdf-extraction-table .pdf-par-row .pdf-hole-col-3 { background-color: #ffe082; }
.pdf-extraction-table thead .pdf-hole-col-4,
.pdf-extraction-table .pdf-par-row .pdf-hole-col-4 { background-color: #ffd54f; }
.pdf-extraction-table thead .pdf-hole-col-5,
.pdf-extraction-table .pdf-par-row .pdf-hole-col-5 { background-color: #ffca28; }
.pdf-extraction-table thead .pdf-hole-col-6,
.pdf-extraction-table .pdf-par-row .pdf-hole-col-6 { background-color: #ffc107; }
.pdf-extraction-table thead .pdf-hole-col-7,
.pdf-extraction-table .pdf-par-row .pdf-hole-col-7 { background-color: #e8f5e9; }
.pdf-extraction-table thead .pdf-hole-col-8,
.pdf-extraction-table .pdf-par-row .pdf-hole-col-8 { background-color: #c8e6c9; }
.pdf-extraction-table thead .pdf-hole-col-9,
.pdf-extraction-table .pdf-par-row .pdf-hole-col-9 { background-color: #a5d6a7; }
.pdf-extraction-table thead .pdf-hole-col-10,
.pdf-extraction-table .pdf-par-row .pdf-hole-col-10 { background-color: #e3f2fd; }
.pdf-extraction-table thead .pdf-hole-col-11,
.pdf-extraction-table .pdf-par-row .pdf-hole-col-11 { background-color: #bbdefb; }
.pdf-extraction-table thead .pdf-hole-col-12,
.pdf-extraction-table .pdf-par-row .pdf-hole-col-12 { background-color: #90caf9; }
.pdf-extraction-table thead .pdf-hole-col-13,
.pdf-extraction-table .pdf-par-row .pdf-hole-col-13 { background-color: #64b5f6; }
.pdf-extraction-table thead .pdf-hole-col-14,
.pdf-extraction-table .pdf-par-row .pdf-hole-col-14 { background-color: #f3e5f5; }
.pdf-extraction-table thead .pdf-hole-col-15,
.pdf-extraction-table .pdf-par-row .pdf-hole-col-15 { background-color: #e1bee7; }
.pdf-extraction-table thead .pdf-hole-col-16,
.pdf-extraction-table .pdf-par-row .pdf-hole-col-16 { background-color: #ce93d8; }
.pdf-extraction-table thead .pdf-hole-col-17,
.pdf-extraction-table .pdf-par-row .pdf-hole-col-17 { background-color: #fce4ec; }
.pdf-extraction-table thead .pdf-hole-col-18,
.pdf-extraction-table .pdf-par-row .pdf-hole-col-18 { background-color: #f8bbd0; }

/* Score vs par (tbody hole cells) */
.pdf-extraction-table tbody .pdf-score-par {
    background-color: transparent;
}

.pdf-extraction-table tbody .pdf-score-birdie {
    background-color: #f8d7da;
    font-weight: 600;
    color: #842029;
}

.pdf-extraction-table tbody .pdf-score-eagle {
    background-color: #ffe5d0;
    font-weight: 600;
    color: #984c0c;
}

.pdf-extraction-table tbody .pdf-score-albatross {
    background-color: #d1e7dd;
    font-weight: 700;
    color: #0f5132;
}

.pdf-extraction-table tbody .pdf-score-over {
    background-color: transparent;
}

.pdf-legend-swatch {
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 0.15rem;
    vertical-align: middle;
    margin-right: 0.25rem;
    border: 1px solid #dee2e6;
}

.pdf-legend-swatch.pdf-score-par {
    background-color: #fff;
}

.pdf-legend-swatch.pdf-score-birdie {
    background-color: #f8d7da;
    border-color: #f1aeb5;
}

.pdf-legend-swatch.pdf-score-eagle {
    background-color: #ffe5d0;
    border-color: #fecba1;
}

.pdf-legend-swatch.pdf-score-albatross {
    background-color: #d1e7dd;
    border-color: #a3cfbb;
}
