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

:root {
    --primary:       #1f6f42;
    --primary-light: #2d9f5f;
    --primary-faint: #f0f8f4;
    --accent:        #f4a460;
    --bg:            #fafaf8;
    --card:          #ffffff;
    --card-alt:      #f8f6f3;
    --border:        #e8e6e1;
    --text:          #2d2d2a;
    --text-light:    #6b6a67;
    --success:       #28a745;
    --danger:        #dc3545;
    --info:          #17a2b8;
    --radius-sm:     4px;
    --radius:        6px;
    --radius-lg:     8px;
}

/* ── Base ─────────────────────────────────────────────────────────────────── */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

h1, h2, h3, h4 { color: var(--text); }

a { color: var(--primary); }

/* ── Navigation ───────────────────────────────────────────────────────────── */
.navbar {
    background: var(--primary);
    color: white;
    padding: 0.85rem 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .nav-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.25rem;
}

.navbar .logo {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    letter-spacing: -0.01em;
}

.navbar .nav-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.navbar .nav-links a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: opacity 0.15s;
}

.navbar .nav-links a:hover { opacity: 0.7; }

.nav-admin { opacity: 0.6; }
.nav-admin-active { opacity: 1; font-weight: 700; }

/* ── Layout ───────────────────────────────────────────────────────────────── */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.25rem 3rem;
}

.grid {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }

/* ── Cards ────────────────────────────────────────────────────────────────── */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.card h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1rem;
}

/* ── Forms ────────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.35rem;
    color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text);
    background: var(--card);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(31,111,66,0.1);
}

.form-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: 1.25rem;
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
    display: inline-block;
    padding: 0.55rem 1.1rem;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;
    text-decoration: none;
    transition: background 0.15s, opacity 0.15s;
}

.btn-sm { padding: 0.3rem 0.65rem; font-size: 0.8rem; }

.btn-primary  { background: var(--primary); color: white; }
.btn-primary:hover  { background: var(--primary-light); }

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

.btn-danger  { background: var(--danger); color: white; }
.btn-danger:hover  { background: #c82333; }

/* ── Alerts ───────────────────────────────────────────────────────────────── */
.alert {
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
    border-radius: var(--radius-sm);
    border-left: 4px solid;
    font-size: 0.92rem;
}

.alert-success { background: #d4edda; border-color: var(--success); color: #155724; }
.alert-info    { background: #d1ecf1; border-color: var(--info);    color: #0c5460; }
.alert-danger  { background: #f8d7da; border-color: var(--danger);  color: #721c24; }

/* ── Hero (home page) ─────────────────────────────────────────────────────── */
.hero {
    text-align: center;
    margin-bottom: 2rem;
}

.hero h1 { font-size: 2.25rem; margin-bottom: 0.4rem; }
.hero p  { font-size: 1rem; color: var(--text-light); }

/* ── Golfer list ──────────────────────────────────────────────────────────── */
.golfer-list { list-style: none; }

.golfer-list li {
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border);
}

.golfer-list li:last-child { border-bottom: none; }

.golfer-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.golfer-link:hover { text-decoration: underline; }

/* ── Dashboard header ─────────────────────────────────────────────────────── */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 2px solid var(--border);
}

.dashboard-header h1 { font-size: 1.9rem; }
.dashboard-header .member-since { color: var(--text-light); font-size: 0.875rem; margin-top: 0.2rem; }

.handicap-display { text-align: right; }

.handicap-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--primary);
    color: white;
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-lg);
    min-width: 140px;
}

.handicap-box .label  { font-size: 0.75rem; opacity: 0.85; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.25rem; }
.handicap-box .value  { font-size: 2.4rem; font-weight: 700; line-height: 1; margin-bottom: 0.2rem; }
.handicap-box .rounds { font-size: 0.75rem; opacity: 0.75; }

/* ── Handicap stats (Low HI, Cap, Uncapped) ──────────────────────────────── */
.handicap-stats {
    text-align: right;
    min-width: 130px;
}

.stat-item {
    margin-bottom: 0.4rem;
}

.stat-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-light);
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
}

.capped-value {
    color: var(--danger);
}

/* ── Toggle group (18/9, Front/Back) ─────────────────────────────────────── */
.toggle-group {
    display: flex;
    gap: 0.5rem;
}

.toggle-option {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.88rem;
    transition: background 0.15s, border-color 0.15s;
}

.toggle-option:has(input:checked) {
    background: var(--primary-faint);
    border-color: var(--primary);
    font-weight: 600;
}

.toggle-option input[type="radio"] {
    margin: 0;
}

/* ── Nine badge ──────────────────────────────────────────────────────────── */
.nine-badge {
    display: inline-block;
    background: #e3f2fd;
    color: #1565c0;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ── ESC adjusted indicator on holes ─────────────────────────────────────── */
.esc-adjusted {
    font-size: 0.7rem;
    color: var(--danger);
    font-weight: 600;
    margin-top: 0.15rem;
}

/* ── Adjusted running total ──────────────────────────────────────────────── */
.adjusted-total {
    color: var(--danger);
    margin-left: 1rem;
    font-size: 0.9rem;
}

/* ── 9-hole grid (3 columns) ─────────────────────────────────────────────── */
.holes-grid-9 {
    grid-template-columns: repeat(3, 1fr) !important;
    max-width: 320px;
}

/* ── Form note ───────────────────────────────────────────────────────────── */
.form-note {
    font-size: 0.8rem;
    color: var(--text-light);
    margin: 0.5rem 0 1rem;
    font-style: italic;
}

/* ── Handicap snapshots ───────────────────────────────────────────────────── */
.snapshot-history {
    margin-top: 0.75rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.65rem 0.75rem;
    font-size: 0.82rem;
    text-align: left;
}

.snapshot-label {
    display: block;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 0.35rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.snapshot-row {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.15rem 0;
    color: var(--text-light);
}

.snapshot-improved { color: var(--success); }
.snapshot-wentup   { color: var(--danger); }

.snapshot-arrow {
    font-size: 0.65rem;
    line-height: 1;
}
.snapshot-down { color: var(--success); }
.snapshot-up   { color: var(--danger); }

/* ── Sparkline chart ─────────────────────────────────────────────────────── */
.handicap-chart {
    position: relative;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem 0.6rem;
    margin-bottom: 1.5rem;
}

.sparkline {
    width: 100%;
    height: 100px;
    display: block;
}

.sparkline-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.68rem;
    color: var(--text-light);
    margin-top: 0.3rem;
    padding: 0 0.2rem;
}

.sparkline-date {
    flex: 1;
    text-align: center;
    white-space: nowrap;
}

.sparkline-range {
    position: absolute;
    top: 1.8rem;
    right: 0.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100px;
    font-size: 0.68rem;
    color: var(--text-light);
    text-align: right;
    pointer-events: none;
}

/* ── Rounds section ───────────────────────────────────────────────────────── */
.rounds-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.rounds-header h2 { margin: 0; }

.sort-controls {
    display: flex;
    gap: 0.35rem;
    align-items: center;
    font-size: 0.82rem;
}

.sort-controls .sort-label { color: var(--text-light); }

.sort-btn { background: var(--card); color: var(--text-light); border: 1px solid var(--border); }
.sort-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--card); }
.sort-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

.rounds-legend {
    font-size: 0.78rem;
    color: var(--text-light);
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* ── Round cards ──────────────────────────────────────────────────────────── */
.round-item {
    padding: 0.85rem 1rem;
    margin-bottom: 0.6rem;
    background: var(--card-alt);
    border: 1px solid transparent;
    border-radius: var(--radius);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.round-item--used {
    border-left: 3px solid var(--primary);
    background: var(--primary-faint);
}

.round-info strong { font-size: 0.95rem; }

.round-details {
    display: flex;
    gap: 0.75rem;
    font-size: 0.82rem;
    margin-top: 0.3rem;
    flex-wrap: wrap;
    color: var(--text-light);
}

.round-actions {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
    align-items: flex-start;
}

.weather { font-style: italic; }

/* ESC label in round details */
.esc-label {
    color: var(--danger);
    font-weight: 600;
}

/* Exceptional reduction badge in round details */
.reduction-badge {
    background: #fff3cd;
    color: #856404;
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.1rem 0.45rem;
    border-radius: 8px;
    white-space: nowrap;
}

/* ── Badges ───────────────────────────────────────────────────────────────── */
.badge {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 0.15rem 0.55rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.tee-badge {
    display: inline-block;
    background: var(--info);
    color: white;
    padding: 0.15rem 0.55rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    margin-left: 0.4rem;
    vertical-align: middle;
}

.used-badge {
    display: inline-block;
    background: var(--primary);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 1px 5px;
    border-radius: 3px;
    vertical-align: middle;
    margin-left: 0.3rem;
}

/* ── Hole score entry grid ────────────────────────────────────────────────── */
.holes-section {
    margin-bottom: 0.75rem;
    padding: 1rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.holes-section h4 {
    font-size: 0.95rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.score-display {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.esc-info {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
    font-style: italic;
}

.holes-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.hole-input {
    background: var(--card-alt);
    padding: 0.6rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    text-align: center;
}

.hole-input label {
    display: block;
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.hole-par {
    font-size: 0.7rem;
    color: var(--text-light);
    margin-bottom: 0.3rem;
}

.hole-input-field {
    width: 100%;
    padding: 0.4rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    background: var(--card);
    color: var(--text);
}

.hole-input-field:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(31,111,66,0.1);
}

/* ── Courses page ─────────────────────────────────────────────────────────── */
.courses-list { list-style: none; }

.course-item {
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

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

.courses-detailed {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.course-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    background: var(--card-alt);
}

.course-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.course-header h3 { color: var(--primary); font-size: 1rem; }

.tee-list { }
.tee-list h4 { font-size: 0.8rem; color: var(--text-light); margin-bottom: 0.5rem; text-transform: uppercase; letter-spacing: 0.04em; }

.tee-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.6rem 0.75rem;
    background: var(--card);
    border-radius: var(--radius-sm);
    margin-bottom: 0.4rem;
    flex-wrap: wrap;
}

.tee-details {
    display: flex;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 0.2rem;
    flex-wrap: wrap;
}

.tee-actions {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    flex-shrink: 0;
}

/* ── Holes edit page ──────────────────────────────────────────────────────── */
.page-back {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
}

.page-back:hover { text-decoration: underline; }

.holes-edit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.hole-edit-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem;
    background: var(--card-alt);
}

.hole-edit-card h4 {
    font-size: 0.85rem;
    color: var(--primary);
    margin-bottom: 0.6rem;
}

.hole-edit-card .form-group { margin-bottom: 0.5rem; }
.hole-edit-card .form-group:last-child { margin-bottom: 0; }

.hole-edit-card label { font-size: 0.78rem; }

.hole-edit-card select {
    width: 100%;
    padding: 0.35rem 0.5rem;
    font-size: 0.82rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card);
    color: var(--text);
    font-family: inherit;
}

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

/* ── Misc ─────────────────────────────────────────────────────────────────── */
.text-muted { color: var(--text-light); }

.footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-light);
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
    margin-top: 3rem;
}

/* ── Scorecard ────────────────────────────────────────────────────────────── */
.scorecard-wrap {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    max-width: 900px;
}

.scorecard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary);
    flex-wrap: wrap;
}

.scorecard-course {
    font-size: 1.4rem;
    color: var(--primary);
    margin-bottom: 0.15rem;
}

.scorecard-location {
    font-size: 0.85rem;
    color: var(--text-light);
}

.scorecard-meta {
    display: flex;
    gap: 1.25rem;
    font-size: 0.85rem;
    flex-wrap: wrap;
    text-align: right;
}

.scorecard-meta > div { line-height: 1.4; }

.scorecard-player {
    font-size: 0.875rem;
    padding: 0.6rem 0;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.meta-label {
    color: var(--text-light);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-right: 0.2rem;
}

.date-blank {
    color: var(--text-light);
    border-bottom: 1px solid var(--text-light);
    display: inline-block;
    min-width: 80px;
}

.scorecard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    table-layout: fixed;
}

.scorecard-table th,
.scorecard-table td {
    border: 1px solid var(--border);
    text-align: center;
    padding: 0.35rem 0.2rem;
    white-space: nowrap;
    overflow: hidden;
}

.scorecard-table th {
    background: var(--primary);
    color: white;
    font-weight: 600;
    font-size: 0.78rem;
}

.scorecard-table td:first-child {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-light);
    background: var(--card-alt);
    text-align: left;
    padding-left: 0.5rem;
}

.row-par td  { background: #f0f8f4; font-weight: 600; }
.row-hcp td  { background: var(--card-alt); color: var(--text-light); font-size: 0.75rem; }
.row-strokes td { background: #fffbf5; font-size: 0.85rem; color: var(--primary); letter-spacing: -0.05em; }
.row-score td { height: 2rem; }
.row-net td   { height: 1.75rem; background: #fafaf8; }
.row-putts td { height: 1.75rem; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        gap: 1rem;
    }

    .dashboard-header h1 { font-size: 1.5rem; }
    .handicap-display { text-align: left; width: 100%; }
    .handicap-box { flex-direction: row; gap: 1rem; padding: 1rem; }
    .handicap-box .value { font-size: 1.8rem; }
    .handicap-stats { text-align: left; width: 100%; display: flex; gap: 1.5rem; flex-wrap: wrap; }
    .dashboard-actions { flex-wrap: wrap; }

    .round-item { flex-direction: column; gap: 0.5rem; }
    .round-actions { flex-direction: row; }

    .holes-grid { grid-template-columns: repeat(3, 1fr); }

    .hero h1 { font-size: 1.75rem; }

    .tee-item { flex-direction: column; align-items: flex-start; }
}

/* ── Print ────────────────────────────────────────────────────────────────── */
/* ── Report Page ──────────────────────────────────────────────────────────── */
.report-page {
    max-width: 960px;
    margin: 0 auto;
}

.report-no-print {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 2px solid var(--border);
}

.report-title h1 {
    font-size: 1.8rem;
    color: var(--primary);
}

.report-subtitle {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 0.2rem;
}

.report-stats {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.report-stat {
    text-align: center;
    min-width: 80px;
}

.report-stat-main {
    background: var(--primary);
    color: white;
    padding: 0.8rem 1.2rem;
    border-radius: var(--radius-lg);
    min-width: 120px;
}

.report-stat-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.85;
    margin-bottom: 0.2rem;
}

.report-stat-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.1;
}

.report-stat:not(.report-stat-main) .report-stat-value {
    color: var(--primary);
    font-size: 1.3rem;
}

.report-stat-note {
    display: block;
    font-size: 0.7rem;
    opacity: 0.75;
    margin-top: 0.15rem;
}

.report-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.report-column h2 {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 0.6rem;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.report-table th {
    background: var(--primary);
    color: white;
    padding: 0.4rem 0.6rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.report-table th:first-child { border-radius: var(--radius) 0 0 0; }
.report-table th:last-child  { border-radius: 0 var(--radius) 0 0; }

.report-table td {
    padding: 0.35rem 0.6rem;
    border-bottom: 1px solid var(--border);
}

.report-table .num {
    text-align: right;
}

.report-used {
    background: #f0f8f4;
    font-weight: 600;
}

.report-table small {
    color: var(--danger);
    font-weight: 600;
}

.report-footer {
    text-align: center;
    color: var(--text-light);
    font-size: 0.8rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}

.report-footer small {
    color: var(--danger);
}

/* ── Print styles ────────────────────────────────────────────────────────── */
@media print {
    .no-print,
    .report-no-print,
    .navbar,
    .footer { display: none !important; }

    body { background: white; color: black; font-size: 11pt; }

    .container { padding: 0; max-width: 100%; }

    /* Report print */
    .report-page { max-width: 100%; }
    .report-header { border-bottom-color: #ccc; }
    .report-stat-main { background: #1f6f42 !important; color: white !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .report-table th { background: #1f6f42 !important; color: white !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .report-used { background: #f0f8f4 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .report-columns { gap: 1rem; }

    /* Scorecard print */
    .scorecard-wrap {
        border: none;
        padding: 0;
        max-width: 100%;
    }

    .scorecard-table th  { background: #1f6f42 !important; color: white !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .row-par td          { background: #f0f8f4 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .scorecard-table td:first-child { background: #f8f6f3 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ── Login Page ────────────────────────────────────────────────────────────── */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50vh;
}

.login-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    padding: 2.5rem;
    width: 100%;
    max-width: 380px;
    text-align: center;
}

.login-card h1 {
    font-size: 1.6rem;
    color: #1f6f42;
    margin-bottom: 0.3rem;
}

.login-card .form-group {
    text-align: left;
    margin-top: 1.2rem;
}

.login-card .btn {
    margin-top: 1.2rem;
}

/* Lock icon on golfer list */
.lock-icon {
    font-size: 0.8rem;
    margin-left: 0.4rem;
    opacity: 0.6;
}

/* Dashboard password actions */
.dashboard-actions {
    margin-top: 0.5rem;
    display: flex;
    gap: 0.5rem;
}

/* Collapsible password card */
.pw-card {
    max-width: 400px;
    margin-bottom: 1.5rem;
}

/* ── WHS Rules Page ────────────────────────────────────────────────────────── */
.rules-page {
    max-width: 780px;
    margin: 0 auto;
}

.rules-page h1 {
    color: #1f6f42;
    margin: 1rem 0 0.5rem;
}

.rules-intro {
    font-size: 1.05rem;
    color: #555;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.rules-section {
    background: white;
    border-radius: 10px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    padding: 1.5rem 1.8rem;
    margin-bottom: 1.2rem;
}

.rules-section h2 {
    color: #1f6f42;
    font-size: 1.15rem;
    margin-bottom: 0.7rem;
    border-bottom: 2px solid #e8f5e9;
    padding-bottom: 0.4rem;
}

.rules-section p {
    line-height: 1.65;
    color: #333;
    margin-bottom: 0.6rem;
}

.rules-formula {
    background: #f0f8f4;
    border-left: 4px solid #1f6f42;
    padding: 0.8rem 1.2rem;
    margin: 0.8rem 0;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    color: #1a5c36;
    border-radius: 0 6px 6px 0;
}

.rules-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.8rem 0;
    font-size: 0.92rem;
}

.rules-table th {
    background: #1f6f42;
    color: white;
    padding: 0.5rem 0.8rem;
    text-align: left;
    font-weight: 600;
}

.rules-table th:first-child { border-radius: 6px 0 0 0; }
.rules-table th:last-child  { border-radius: 0 6px 0 0; }

.rules-table td {
    padding: 0.45rem 0.8rem;
    border-bottom: 1px solid #eee;
}

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

.rules-table tbody tr:last-child td:first-child { border-radius: 0 0 0 6px; }
.rules-table tbody tr:last-child td:last-child  { border-radius: 0 0 6px 0; }

.rules-footer {
    text-align: center;
    margin: 1.5rem 0;
    color: #777;
    font-size: 0.9rem;
}

.rules-footer a {
    color: #1f6f42;
}
