:root {
    --augusta-green: #006747;
    --augusta-dark: #003d2a;
    --augusta-gold: #C8A951;
    --augusta-cream: #FFF8E7;
    --augusta-white: #FFFFFF;
    --over-par: #C41E3A;
    --under-par: #00a86b;
    --text-primary: #1a1a1a;
    --text-light: #FFF8E7;
    --panel-bg: rgba(0, 30, 20, 0.75);
    --panel-border: rgba(200, 169, 81, 0.4);
    --cell-bg: rgba(0, 30, 20, 0.7);
    --cell-bg-alt: rgba(0, 40, 28, 0.7);
    --grid-line: rgba(200, 169, 81, 0.3);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    min-height: 100%;
    background-color: var(--augusta-dark);
}

body {
    font-family: 'Libre Baskerville', Georgia, serif;
    color: var(--text-light);
    min-height: 100vh;
    position: relative;
}

.bg-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -2;
}

.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
}


/* ── Navigation ── */

.main-nav {
    background: rgba(0, 61, 42, 0.85);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--panel-border);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
}

.nav-brand {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    color: var(--augusta-gold);
    text-decoration: none;
    font-size: 1.3rem;
    letter-spacing: 0.2em;

    padding: 1rem 0;
    white-space: nowrap;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--augusta-gold);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0;
}

.nav-links li a {
    display: block;
    color: var(--augusta-cream);
    text-decoration: none;
    padding: 1rem 1.25rem;
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    transition: color 0.2s;
}

.nav-links li a:hover {
    color: var(--augusta-gold);
}

.nav-logout {
    margin-left: auto;
}


/* ── Content ── */

.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.page-container {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    padding: 2rem;
}

.page-container h1 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    color: var(--augusta-gold);
    font-size: 1.75rem;
    letter-spacing: 0.2em;

    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--panel-border);
    padding-bottom: 0.75rem;
}

.page-container h2 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    color: var(--augusta-gold);
    font-size: 1.25rem;
    letter-spacing: 0.15em;

    margin-bottom: 1rem;
}

.page-container h3 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 500;
    color: var(--augusta-cream);
    font-size: 1rem;
    letter-spacing: 0.1em;
    margin: 1.5rem 0 0.5rem;
}


/* ── Tables (scoreboard aesthetic) ── */

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.data-table thead th {
    background: var(--augusta-green);
    color: var(--augusta-cream);
    padding: 0.625rem 0.75rem;
    text-align: left;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.1em;

    border: 1px solid var(--grid-line);
}

.leaderboard-table thead th {
    text-transform: uppercase;
}

.data-table tbody td {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--grid-line);
    background: var(--cell-bg);
    color: var(--augusta-cream);
}

.data-table tbody tr:nth-child(even) td {
    background: var(--cell-bg-alt);
}

.score-over {
    color: var(--over-par);
    font-weight: 700;
}

.score-under {
    color: var(--under-par);
    font-weight: 700;
}

.empty-state {
    text-align: center;
    color: rgba(255, 248, 231, 0.6);
    padding: 2rem;
    font-style: italic;
}


/* ── Forms (general) ── */

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.1em;

    margin-bottom: 0.4rem;
    color: var(--augusta-gold);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.6rem 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--augusta-gold);
    color: var(--augusta-cream);
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input::placeholder {
    color: rgba(255, 248, 231, 0.4);
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px rgba(0, 20, 12, 0.95) inset !important;
    -webkit-text-fill-color: var(--augusta-cream) !important;
    border-bottom-color: var(--augusta-gold) !important;
    transition: background-color 5000s ease-in-out 0s;
}

.form-group input:focus,
.form-group select:focus {
    border-bottom-color: var(--augusta-cream);
}

.form-group select {
    cursor: pointer;
}

.form-group select option {
    background: #002a1a;
    color: var(--augusta-cream);
}

.btn {
    display: inline-block;
    padding: 0.7rem 2rem;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.15em;

    cursor: pointer;
    border: none;
    transition: background 0.2s;
}

.btn-primary {
    background: var(--augusta-green);
    color: var(--augusta-cream);
}

.btn-primary:hover {
    background: var(--augusta-dark);
}

.btn-small {
    padding: 0.3rem 0.75rem;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.btn-danger {
    background: var(--over-par);
    color: var(--augusta-cream);
}

.btn-danger:hover {
    background: #a3162e;
}


/* ── Auth pages (login/register) ── */

.auth-container {
    max-width: 400px;
    margin: 6rem auto;
    background: var(--panel-bg);
    border: 1px solid var(--augusta-gold);
    padding: 2.5rem 2rem;
}

.auth-container h1 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    color: var(--augusta-gold);
    text-align: center;
    font-size: 1.75rem;
    letter-spacing: 0.2em;

    margin-bottom: 2rem;
    border-bottom: 1px solid var(--panel-border);
    padding-bottom: 0.75rem;
}



.auth-link {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--augusta-cream);
}

.auth-link a {
    color: var(--augusta-gold);
    text-decoration: none;
    font-weight: 700;
}

.auth-link a:hover {
    text-decoration: underline;
}

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    flex: 1;
    padding-right: 40px;
}

.toggle-password {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    opacity: 0.7;
}

.toggle-password:hover {
    opacity: 1;
}

.auth-container input::placeholder {
    font-size: 0.75rem;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: rgba(0, 30, 20, 0.95);
    border: 1px solid var(--augusta-gold);
    padding: 2rem;
    max-width: 400px;
    width: 90%;
}

.modal-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.modal-content h2 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    color: var(--augusta-gold);
    font-size: 1.25rem;
    letter-spacing: 0.15em;
    margin-bottom: 1.5rem;
    text-align: center;
}

.error-message {
    color: #ff8a9a;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.btn-secondary {
    background: transparent;
    color: var(--augusta-cream);
    border: 1px solid var(--augusta-cream);
    padding: 0.65rem 1.5rem;
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 0.85rem;
    cursor: pointer;
    margin-left: 0.5rem;
}

.btn-secondary:hover {
    background: rgba(255, 248, 231, 0.1);
}


/* ── Picks page ── */

.pick-tier {
    margin-bottom: 1.25rem;
}

.pick-tier label {
    display: block;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.1em;

    margin-bottom: 0.4rem;
    color: var(--augusta-gold);
}

.pick-tier select {
    width: 100%;
    padding: 0.6rem 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--augusta-gold);
    color: var(--augusta-cream);
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
}

.pick-tier select option {
    background: #002a1a;
    color: var(--augusta-cream);
}

.locked-notice {
    background: rgba(196, 30, 58, 0.8);
    color: var(--augusta-cream);
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    text-align: center;
    border: 1px solid rgba(196, 30, 58, 0.5);
}


/* ── Admin page ── */

.admin-section {
    margin-bottom: 2rem;
}

.admin-form {
    max-width: 500px;
}

.inline-form {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.inline-form input,
.inline-form select {
    padding: 0.25rem 0.4rem;
    font-size: 0.8rem;
    background: transparent;
    border: 1px solid var(--grid-line);
    color: var(--augusta-cream);
    font-family: 'Libre Baskerville', Georgia, serif;
}

.inline-form select option {
    background: #002a1a;
    color: var(--augusta-cream);
}

.actions {
    white-space: nowrap;
}



/* ── Flash messages ── */

.flash-messages {
    margin-bottom: 1rem;
}

.flash {
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    border: 1px solid;
}

/* ── Squad cards ── */

.squad-header {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.squad-header h1 {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.squad-total {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    font-size: 1.75rem;
    color: var(--augusta-gold);
}

.payment-status {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--augusta-gold);
    text-decoration: none;
    display: block;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: none;
}

.payment-status.paid {
    display: block;
    width: fit-content;
    border-bottom: 2px solid var(--augusta-gold);
}

.squad-cards {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.squad-card {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    padding: 1rem 1.25rem;
}

.squad-card.counting {
    border-left: 3px solid var(--augusta-gold);
}

.sc-tier {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--augusta-gold);
    letter-spacing: 0.1em;
    margin-bottom: 0.375rem;
}

.sc-main {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 0.375rem;
}

.sc-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--augusta-cream);
}

.sc-name .sc-own {
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--augusta-gold);
    margin-left: 0.375rem;
}

.sc-score {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--augusta-gold) !important;
}

.sc-details {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: rgba(255, 248, 231, 0.6);
    margin-bottom: 0.5rem;
}

.sc-pos {
    font-weight: 700;
    color: var(--augusta-cream);
}

.sc-rounds {
    display: flex;
    gap: 1.25rem;
    font-size: 0.75rem;
    color: rgba(255, 248, 231, 0.6);
}

.sc-rounds span {
    white-space: nowrap;
}

#my-team-tab,
#vs-tab,
.team-viewer-dropdown .custom-dropdown-trigger {
    padding-left: 0.4rem;
    padding-right: 0.4rem;
}

/* ── Team viewer dropdown-as-filter-btn ── */

.custom-dropdown.team-viewer-dropdown {
    position: relative;
    width: auto;
}

.team-viewer-dropdown .custom-dropdown-trigger {
    width: auto;
    display: inline-block;
    justify-content: initial;
    border-bottom: none;
}

.team-viewer-dropdown .custom-dropdown-trigger:hover {
    border-bottom: none;
    background: var(--augusta-dark);
}

.team-viewer-dropdown .custom-dropdown-trigger.active {
    background: var(--augusta-gold);
    color: var(--augusta-dark);
}

.team-viewer-dropdown .custom-dropdown-options {
    left: 0;
    right: auto;
    min-width: 220px;
    max-height: 280px;
    border-top: none;
}

/* ── Side-by-side comparison ── */


.sbs-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sbs-row {
    display: flex;
    gap: 0.5rem;
}

.sbs-card {
    flex: 1;
    background: rgba(0, 50, 30, 0.5);
    border: 1px solid var(--augusta-gold);
    border-radius: 6px;
    padding: 0.5rem;
}

.sbs-card.counting {
    border-left: 3px solid var(--augusta-gold);
}

.sbs-card .sc-name {
    font-family: 'Libre Baskerville', serif;
    font-size: 0.95rem;
    color: var(--augusta-cream);
}

.sbs-card .sc-score {
    font-size: 1.1rem;
    color: var(--augusta-gold);
    text-align: right;
}

.sbs-card .sc-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ── Rules page ── */

.rules-section {
    margin-bottom: 1.75rem;
}

.rules-heading {
    font-family: 'Cormorant Garamond', Georgia, serif;
    color: var(--augusta-gold);
    font-size: 1rem;
    font-weight: 600;
    border-bottom: 1px solid var(--augusta-gold);
    padding-bottom: 0.3rem;
    margin-bottom: 0.75rem;
    margin-top: 0;
    letter-spacing: 0.05em;
}

.rules-section p {
    color: var(--augusta-cream);
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 0.8rem;
    line-height: 1.6;
    margin-bottom: 0.6rem;
    margin-top: 0;
}

.rules-tab-name {
    color: var(--augusta-gold);
}

.payout-line {
    color: var(--augusta-cream);
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.payout-value {
    color: var(--augusta-gold);
}

.payout-spacer {
    height: 0.75rem;
}


.flash-error {
    background: rgba(196, 30, 58, 0.2);
    color: #ff8a9a;
    border-color: rgba(196, 30, 58, 0.5);
}

.flash-success {
    background: rgba(0, 103, 71, 0.2);
    color: var(--under-par);
    border-color: rgba(0, 103, 71, 0.5);
}


/* ── Custom dropdowns ── */

.custom-dropdown {
    position: relative;
    width: 100%;
}

.custom-dropdown-trigger {
    width: 100%;
    padding: 0.6rem 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--augusta-gold);
    color: var(--augusta-cream);
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color 0.2s;
}

.custom-dropdown-trigger:hover {
    border-bottom-color: var(--augusta-cream);
}

.custom-dropdown-trigger .dd-arrow {
    color: var(--augusta-gold);
    font-size: 0.6rem;
    margin-left: 0.5rem;
    transition: transform 0.2s;
}

.custom-dropdown.open .dd-arrow {
    transform: rotate(180deg);
}

.custom-dropdown-trigger .dd-placeholder {
    color: rgba(255, 248, 231, 0.4);
}

.custom-dropdown-options {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(0, 20, 12, 0.92);
    border: 1px solid var(--grid-line);
    border-top: none;
    max-height: 240px;
    overflow-y: auto;
    z-index: 100;
}

.custom-dropdown.open .custom-dropdown-options {
    display: block;
}

.custom-dropdown-option {
    padding: 0.5rem 0.6rem;
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 0.9rem;
    color: var(--augusta-cream);
    cursor: pointer;
    transition: background 0.15s;
}

.custom-dropdown-option:hover {
    background: rgba(0, 61, 42, 0.92);
}

.custom-dropdown-option.selected {
    background: rgba(0, 61, 42, 0.92);
}

.custom-dropdown-options::-webkit-scrollbar {
    width: 6px;
}

.custom-dropdown-options::-webkit-scrollbar-track {
    background: #002a1a;
}

.custom-dropdown-options::-webkit-scrollbar-thumb {
    background: var(--grid-line);
}


/* ── Leaderboard grid ── */

.leaderboard-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

#leaderboard {
    border-right: 1px solid var(--grid-line);
}

.sticky-col {
    position: sticky;
    left: 0;
    z-index: 10;
    background: var(--cell-bg);
    width: 70px;
    min-width: 70px;
    border-right: none;
}

thead .sticky-col {
    background: var(--augusta-green);
    z-index: 11;
}

tbody tr:nth-child(even) .sticky-col {
    background: var(--cell-bg-alt);
}

.sticky-col-narrow {
    position: sticky;
    left: 0;
    z-index: 10;
    background: var(--cell-bg);
    width: 40px;
    min-width: 40px;
}

thead .sticky-col-narrow {
    z-index: 11;
    background: var(--augusta-green);
}

tbody tr:nth-child(even) .sticky-col-narrow {
    background: var(--cell-bg-alt);
}

.sticky-col-2 {
    position: sticky;
    left: 70px;
    z-index: 10;
    background: var(--cell-bg);
    border-right: none;
}

#leaderboard .sticky-col-2 {
    width: 65px;
    min-width: 65px;
    max-width: 65px;
    margin-right: -1px;
    padding-right: calc(0.625rem + 1px);
}

thead .sticky-col-2 {
    background: var(--augusta-green);
    z-index: 11;
}

tbody tr:nth-child(even) .sticky-col-2 {
    background: var(--cell-bg-alt);
}

#scores-table .sticky-col-2 {
    left: 40px;
}

.sticky-col-2 + td,
.sticky-col-2 + th {
    border-left: 1px solid var(--cell-bg);
}
thead .sticky-col-2 + th {
    border-left: 1px solid var(--augusta-green);
}
tbody tr:nth-child(even) .sticky-col-2 + td {
    border-left: 1px solid var(--cell-bg-alt);
}

.leaderboard-table th[data-sort] {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.leaderboard-table th.sort-asc::after {
    content: " \25B2";
    font-size: 0.6rem;
}

.leaderboard-table th.sort-desc::after {
    content: " \25BC";
    font-size: 0.6rem;
}

.total-col {
    white-space: nowrap;
    color: var(--augusta-gold) !important;
    font-weight: 700;
}

/* Mini player cards in tier cells */

.tier-cell {
    min-width: 120px;
    padding: 0.375rem 0.5rem;
    vertical-align: top;
}

.tier-cell.counting {
    border-left: 3px solid var(--augusta-gold);
}

.tier-cell.bench {
    opacity: 0.55;
}

.mini-card {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    line-height: 1.3;
}

.mc-name {
    font-weight: 700;
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.mc-score {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--augusta-gold) !important;
}

.mc-thru {
    font-size: 0.7rem;
    color: rgba(255, 248, 231, 0.6);
}

.mc-round {
    font-size: 0.7rem;
    color: var(--augusta-cream);
}

.mc-own {
    font-size: 0.65rem;
    color: var(--augusta-gold);
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: rgba(200, 169, 81, 0.3);
}

.mc-own:hover {
    text-decoration-color: var(--augusta-gold);
}

/* ── Ownership popover (scores page) ── */

.owned-cell {
    position: relative;
}

.owned-trigger {
    cursor: pointer;
    color: var(--augusta-gold);
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: rgba(200, 169, 81, 0.3);
}

.owned-trigger:hover {
    text-decoration-color: var(--augusta-gold);
}

.owned-none {
    color: rgba(255, 248, 231, 0.3);
}

/* ── My player highlight ── */

.my-player td {
    border-left-color: var(--augusta-gold);
    background: rgba(200, 169, 81, 0.08);
}

.my-player td:first-child {
    border-left: 3px solid var(--augusta-gold);
}



/* ── Ownership modal ── */

.owner-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 500;
    justify-content: center;
    align-items: center;
}

.owner-modal-overlay.open {
    display: flex;
}

.owner-modal {
    background: rgba(0, 20, 12, 0.92);
    border: 1px solid var(--augusta-gold);
    padding: 1.25rem 1.5rem;
    min-width: 200px;
    max-width: 320px;
    max-height: 80vh;
    overflow-y: auto;
}

.owner-modal-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    font-size: 1rem;
    color: var(--augusta-gold);
    margin-bottom: 0.25rem;
}

.owner-modal-pct {
    font-size: 0.8rem;
    color: rgba(255, 248, 231, 0.6);
    margin-bottom: 0.75rem;
}

.owner-modal-name {
    padding: 0.25rem 0;
    font-size: 0.85rem;
    color: var(--augusta-cream);
}


/* ── Expandable rows ── */

.expandable-row {
    cursor: pointer;
}

.expand-icon {
    font-size: 0.6rem;
    display: inline-block;
    transition: transform 0.15s;
    margin-right: 0.25rem;
    color: var(--augusta-gold);
}

.expandable-row.expanded .expand-icon {
    transform: rotate(90deg);
}

.detail-row td {
    padding: 0;
    border: none;
    background: transparent;
}

.detail-panel-table {
    padding: 0.5rem;
    background: var(--panel-bg);
    border: 1px solid var(--grid-line);
    border-top: none;
    overflow-x: auto;
}

.detail-table {
    font-size: 0.8rem;
    margin-bottom: 0;
}

.detail-table thead th {
    font-size: 0.7rem;
    padding: 0.375rem 0.5rem;
}

.detail-table tbody td {
    padding: 0.375rem 0.5rem;
}


/* ── Tab buttons (text-only tabs) ── */

.tab-btn {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    padding: 0.3rem 0.75rem;
    color: var(--augusta-gold);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
}

.tab-btn.active {
    color: var(--augusta-gold);
    border-bottom: 2px solid var(--augusta-gold);
}

/* ── Filter buttons (solid action buttons) ── */

.filter-btn {
    background: var(--augusta-green);
    color: var(--augusta-cream);
    padding: 8px 16px;
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 0.75rem;
    cursor: pointer;
    border: none;
    outline: none;
    box-shadow: none;
    text-decoration: none;
    display: inline-block;
    transition: background 0.15s, color 0.15s;
}

.filter-btn:hover {
    background: var(--augusta-dark);
}

.filter-btn.active {
    background: var(--augusta-gold);
    color: var(--augusta-dark);
}

/* ── Toggle row layout ── */

.toggle-row {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}


/* ── Augusta scorecard board ── */

.augusta-board {
    border-collapse: collapse;
    font-size: 0.8rem;
    background: #f5f0e1;
}

.augusta-board thead th {
    background: #f5f0e1;
    color: #333;
    padding: 0.3rem 0.25rem;
    text-align: center;
    font-size: 0.7rem;
    font-weight: 700;
    border: 1px solid #999;
    border-bottom: 2px solid #333;
    white-space: nowrap;
}

.augusta-board .par-row td {
    background: #ece7d5;
    color: #333;
    text-align: center;
    font-weight: 700;
    font-size: 0.75rem;
    padding: 0.25rem;
    border: 1px solid #999;
    border-bottom: 2px solid #333;
}

.augusta-board tbody td {
    padding: 0.3rem 0.25rem;
    border-left: 1px solid #999;
    border-right: 1px solid #999;
    border-bottom: 2px solid #333;
    border-top: none;
    text-align: center;
    color: #333;
    background: #f5f0e1;
    font-size: 0.8rem;
}

.augusta-board tbody tr:nth-child(even) td {
    background: #f5f0e1;
}

.hole-cell {
    min-width: 28px;
    font-weight: 700;
    text-align: center;
}

.hole-header {
    min-width: 28px;
}


.ab-player-name {
    text-align: left !important;
    font-weight: 700;
    white-space: nowrap;
    text-transform: uppercase;
    color: #333 !important;
}

/* Score column: red for under par, green for over par */
.ab-score-under {
    color: #C41E3A !important;
    font-weight: 700;
}

.ab-score-over {
    color: #006747 !important;
    font-weight: 700;
}


/* Sticky columns for augusta board */
.ab-sticky {
    position: sticky;
    z-index: 10;
    background: #f5f0e1;
}

.ab-sticky-score {
    left: 0;
    width: 40px;
    min-width: 40px;
    z-index: 12;
}

.ab-sticky-name {
    left: 40px;
    width: 90px;
    min-width: 90px;
    z-index: 11;
    overflow: hidden;
    text-overflow: ellipsis;
}


.augusta-board thead .ab-sticky {
    z-index: 11;
    background: #f5f0e1;
}

.augusta-board .par-row .ab-sticky {
    background: #ece7d5;
}

.augusta-board tbody .ab-sticky {
    background: #f5f0e1;
}

.augusta-board .my-player td {
    background: #ede8d0;
}

.augusta-board .my-player td:first-child {
    border-left: 3px solid var(--augusta-gold);
}

.augusta-board .my-player .ab-sticky {
    background: #ede8d0;
}

/* Owned trigger in augusta board */
.augusta-board .owned-trigger {
    color: #666;
    text-decoration: none;
    font-weight: 400;
}

.augusta-board .owned-trigger:hover {
    text-decoration: underline;
}


/* ── Mobile ── */

@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background: rgba(0, 61, 42, 0.95);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links li a {
        padding: 0.75rem 1.5rem;
        border-top: 1px solid var(--grid-line);
    }

    .nav-inner {
        flex-wrap: wrap;
    }

    .nav-logout {
        margin-left: 0;
    }

    .page-container {
        padding: 1.25rem;
    }

    .data-table {
        font-size: 0.8rem;
    }

    .data-table thead th,
    .data-table tbody td {
        padding: 0.375rem 0.5rem;
    }

    .inline-form {
        flex-wrap: wrap;
    }

    .auth-container {
        margin: 3rem 1rem;
    }

    .detail-table {
        font-size: 0.7rem;
    }

    body::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-image: url('/static/images/hole12.jpg');
        background-size: cover;
        background-position: center;
        background-color: var(--augusta-dark);
        z-index: -2;
    }

    body::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.55);
        z-index: -1;
    }

    .bg-image,
    .bg-overlay {
        display: none;
    }

    .tier-cell {
        min-width: 100px;
    }

    .mc-name {
        max-width: 100px;
        font-size: 0.7rem;
    }

    .mc-score,
    .mc-thru {
        font-size: 0.65rem;
    }

    .mc-own {
        font-size: 0.6rem;
    }

    /* Augusta board mobile */
    .augusta-board {
        font-size: 0.7rem;
    }

    .augusta-board .ab-sticky-score {
        left: 0;
        width: 40px;
        min-width: 40px;
    }

    .augusta-board .ab-sticky-name {
        left: 40px;
        width: 90px;
        min-width: 90px;
        font-size: 0.7rem;
    }

    .hole-cell {
        min-width: 24px;
        font-size: 0.7rem;
        padding: 0.2rem;
    }

    .hole-header {
        min-width: 24px;
    }
}

/* ── Projections chart ── */

.proj-tabs .filter-btn {
    padding-left: 10px;
    padding-right: 10px;
}

.proj-layout {
    display: flex;
    gap: 1rem;
    margin-top: 0.75rem;
}

.proj-chart-wrap {
    position: relative;
    height: 60vh;
    flex: 3;
    min-width: 0;
}

.proj-chart-wrap canvas {
    background: transparent;
}

.proj-legend {
    flex: 1;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    padding: 0.75rem;
    overflow-y: auto;
    max-height: 60vh;
}

.pl-entry {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.2rem 0;
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 0.7rem;
    color: var(--augusta-cream);
}

.pl-line {
    display: inline-block;
    width: 14px;
    height: 3px;
    flex-shrink: 0;
}

.pl-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pl-me {
    color: var(--augusta-gold);
    font-weight: 700;
}

.pl-col {
    flex-shrink: 0;
    text-align: right;
    color: var(--augusta-cream);
    min-width: 32px;
    font-size: 0.65rem;
}

.pl-col-proj {
    color: var(--augusta-gold);
    font-weight: 700;
}

.pl-header {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0 0 0.3rem;
    margin-bottom: 0.3rem;
    border-bottom: 1px solid var(--panel-border);
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 0.6rem;
    color: var(--augusta-cream);
}

.pl-hdr-name {
    flex: 1;
    cursor: pointer;
    user-select: none;
    padding-left: 17px;
}

.pl-hdr-col {
    flex-shrink: 0;
    text-align: right;
    min-width: 32px;
    cursor: pointer;
    user-select: none;
}

.pl-hdr-name:hover,
.pl-hdr-col:hover {
    color: var(--augusta-gold);
}

.pl-hdr-active {
    color: var(--augusta-gold);
}

.pl-divider {
    height: 1px;
    background: rgba(200, 169, 81, 0.3);
    margin: 0.3rem 0;
}

.chosen-option {
    padding: 0;
}

.chosen-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.6rem;
    cursor: pointer;
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 0.85rem;
    color: var(--augusta-cream);
}

.chosen-label:hover {
    background: rgba(0, 61, 42, 0.92);
}

.chosen-cb {
    accent-color: var(--augusta-gold);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .proj-layout {
        flex-direction: column;
    }

    .proj-chart-wrap {
        height: 85vh;
    }

    .proj-legend {
        max-height: 30vh;
    }
}


@media (orientation: landscape) and (max-height: 500px) {
    .data-table {
        font-size: 0.75rem;
    }

    .data-table thead th,
    .data-table tbody td {
        padding: 0.25rem 0.375rem;
    }

    .tier-cell {
        min-width: 90px;
    }

    .mc-name {
        font-size: 0.65rem;
        max-width: 85px;
    }
}
