:root {
    /**************************************************************
     * Brand Colors
     *
     * Primary application colors used for buttons, active states,
     * links, and other UI elements that represent the club's
     * identity.
     **************************************************************/

    --app-primary: #2F5D3A;
    --app-primary-hover: #3E724A;
    --app-primary-soft: #DCEBDD;
    /**************************************************************
     * Surface Colors
     *
     * General page backgrounds and panel/card backgrounds.
     **************************************************************/

    --app-bg: #F5F6F3;
    --app-surface: #FFFFFF;
    /**************************************************************
     * Borders
     *
     * Standard border color used throughout the application.
     **************************************************************/

    --app-border: #D8DDD8;
    /**************************************************************
     * Text Colors
     *
     * Primary and secondary text colors.
     **************************************************************/

    --app-text: #2F2F2F;
    --app-muted: #6B7280;
    /**************************************************************
     * Navigation
     *
     * Colors specific to the left navigation panel.
     **************************************************************/

    --app-nav-bg: #263238;
    --app-nav-header-bg: #1E272C;
    --app-nav-hover-bg: #34474F;
    --app-nav-text: #E8ECEA;
    --app-nav-muted: #AEB7B2;
    /**************************************************************
     * Corner Radius
     *
     * Standard rounded corner sizes used by controls.
     **************************************************************/

    --app-radius-sm: 4px;
    --app-radius-md: 8px;
    --app-radius-lg: 12px;
    /**************************************************************
     * Shadows
     *
     * Standard elevation shadows.
     **************************************************************/

    --app-shadow-sm: 0 1px 2px rgba(0,0,0,.08);
    --app-shadow-md: 0 2px 6px rgba(0,0,0,.12);
    /**************************************************************
        * Data Grid
     **************************************************************/

    --app-grid-header-bg: var(--app-surface);
    --app-grid-hover: var(--app-primary-soft);
    --app-grid-selected: var(--app-primary-soft);


    /**************************************************************
    * Status Colors
    *
    * Used to indicate success, warnings, errors, and inactive
    * states throughout the application.
 **************************************************************/

    --app-success: #2F8F4E;
    --app-warning: #C28A00;
    --app-danger: #B3261E;
    --app-inactive: #8A9097;
}


/* Form Panels */

.app-form {
    max-width: 960px;
}

.app-form-card {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-lg);
    box-shadow: var(--app-shadow-sm);
    margin-bottom: 1.25rem;
    overflow: hidden;
}

.app-form-card-header {
    background: var(--app-primary-soft);
    border-bottom: 1px solid var(--app-border);
    padding: .75rem 1rem;
}

.app-form-card-title {
    color: var(--app-primary);
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

.app-form-card-body {
    padding: 1rem;
}

.app-form-help {
    color: var(--app-muted);
    font-size: .875rem;
    margin-bottom: 1rem;
}

.app-hole-card {
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-md);
    background: var(--app-bg);
    padding: .6rem;
    height: 100%;
}

    .app-hole-card label {
        color: var(--app-text);
        font-weight: 600;
    }

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

.tournament-slots-header {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-lg);
    box-shadow: var(--app-shadow-sm);
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
    gap: 1rem;
    align-items: stretch;
}

.tournament-slots-info {
    min-width: 0;
}

.tournament-slots-title {
    color: var(--app-text);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 .35rem 0;
}

.tournament-slots-meta {
    color: var(--app-muted);
    display: flex;
    flex-wrap: wrap;
    gap: .4rem .75rem;
    font-size: .95rem;
    margin-bottom: .5rem;
}

    .tournament-slots-meta span:not(:last-child)::after {
        content: "•";
        margin-left: .75rem;
        color: var(--app-border);
    }

.tournament-status-badge {
    display: inline-block;
    background: var(--app-primary-soft);
    color: var(--app-primary);
    border: 1px solid var(--app-border);
    border-radius: 999px;
    padding: .3rem .75rem;
    font-size: .85rem;
    font-weight: 700;
    white-space: nowrap;
}

.my-registration-panel {
    background: var(--app-primary-soft);
    border: 1px solid var(--app-border);
    border-left: 5px solid var(--app-primary);
    border-radius: var(--app-radius-md);
    padding: .85rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.my-registration-label {
    color: var(--app-primary);
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.my-registration-detail {
    color: var(--app-text);
    font-weight: 600;
}

@media (max-width: 768px) {
    .tournament-slots-header {
        grid-template-columns: 1fr;
    }
}

.slot-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.625rem;
    align-items: stretch;
}

.slot-card {
    width: 150px;
    flex: 0 0 150px;
}

.slot-group {
    width: fit-content;
    max-width: 100%;
}













.slot-header {
    font-size: 0.75rem;
    font-weight: 700;
    color: #6c757d;
    letter-spacing: 0.03em;
}

.group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.35rem;
}

.group-status {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

    .group-status.open {
        color: #1f6f3d;
        background: #eaf6ee;
        border: 1px solid #c7e4cf;
    }

    .group-status.full {
        color: #555;
        background: #eeeeee;
        border: 1px solid #d6d6d6;
    }

.tournament-slots-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: #fff;
    padding: 0.75rem 0 1rem 0;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid #d0d0d0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    padding: 0.75rem 1rem;
}

.tournament-slots-page {
    padding: 0.5rem;
}

.tournament-slots-header {
    overflow: hidden;
}

.tournament-slots-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background-color: #fff;
    border: 1px solid #e3e3e3;
    border-radius: 0.5rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 0.75rem;
}

.tournament-slots-body {
    padding: .5rem;
}

.tournament-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(700px, 1fr));
    gap: 0.75rem;
}

.my-slot-pill {
    font-size: 0.7rem;
    font-weight: 600;
    align-self: flex-start;
    padding: 0.15rem 0.4rem;
    border-radius: 999px;
    background: #e7f1ff;
    color: #0d6efd;
}

.my-slot-indicator {
    height: 1.4rem;
    display: flex;
    align-items: center;
    margin: 0.2rem 0;
}


:root {
    --slot-card-width: 150px;
    --slot-gap: 10px;
}

.slot-card {
    width: 150px;
    flex: 0 0 150px;
    min-height: 135px;
    display: flex;
    flex-direction: column;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 0.4rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.slot-name {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 500;
    margin: 0.35rem 0;
}

.slot-footer {
    min-height: 32px;
    margin-top: auto;
}

.slot-card button {
    margin-top: auto;
}

.slot-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.10);
}

.slot-card.mine:hover {
    box-shadow: 0 3px 12px rgba(13, 110, 253, 0.18);
}

.slot-row {
    display: grid;
    grid-template-columns: repeat(4, 150px);
    gap: 10px;
}

.slot-card.empty {
    background: #fbfdff;
    border-style: dashed;
}

.slot-card.filled {
    background: #f8f9fa;
}

.slot-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.625rem;
    align-items: stretch;
}

.hole-card {
    border: 1px solid #e3e3e3;
    border-radius: 0.5rem;
    padding: 0.75rem;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.hole-header {
    margin-bottom: 0.85rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eeeeee;
}

.hole-number-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: #f4f7f3;
    border: 1px solid #d8ded9;
}

    .hole-number-badge i {
        color: #2e7d32; /* Golf green */
        font-size: 1rem;
    }

.hole-number {
    color: #212529;
    font-weight: 700;
    font-size: 1.05rem;
}

.hole-flag {
    font-size: 1rem;
    line-height: 1;
}

.hole-number {
    font-size: 1.05rem;
}

.empty-slot-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    flex: 1;
}

.empty-slot-icon {
    font-size: 1.1rem;
    line-height: 1;
    color: #9aa3a0;
}

.hole-card.my-hole-card {
    border-color: #8bb9ff;
    background: #f7fbff;
    box-shadow: 0 2px 10px rgba(13, 110, 253, 0.12);
}

.my-registration-detail {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: 0.35rem;
}

.registration-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: #f2f4f5;
    border: 1px solid #d8d8d8;
    font-size: 0.8rem;
    font-weight: 600;
}

.my-registration-panel {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
}

.my-registration-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.multi-enroll-toggle {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e5e7eb;
}

.multi-enroll-help-text {
    font-size: 0.8rem;
    color: #6b7280;
    text-align: right;
}

.registration-panel {
    min-width: 320px;
    max-width: 380px;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.registration-mode-toggle {
    display: flex;
    justify-content: flex-end;
    padding-bottom: 0.5rem;
    margin-bottom: 0.6rem;
    border-bottom: 1px solid #e5e7eb;
}

.my-registration-panel-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.register-others-panel {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

    .register-others-panel select {
        margin-top: 0.25rem;
    }

.group-registration-panel {
    gap: 0.35rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid #d7e2dc;
    border-left: 4px solid var(--app-primary);
    border-radius: 0.55rem;
    background: var(--app-primary-soft);
}

.group-registration-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
}

.group-registration-heading .help-icon__button {
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.9rem;
}

.group-registration-panel .multi-enroll-help-text {
    margin: 0.05rem 0 0.15rem;
    text-align: left;
}

.group-registration-panel > .form-select {
    margin-top: 0;
}

.tee-selection-panel {
    margin-top: 0.85rem;
    margin-bottom: 0.85rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
}

.tee-selection-panel > .form-select {
    margin-bottom: 0;
}

.tee-eligibility-message {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    align-self: stretch;
    gap: 0.15rem;
    min-height: 1.35rem;
    margin-top: -0.2rem;
    color: #6b7280;
    font-size: 0.8rem;
    line-height: 1.2;
    text-align: right;
}

.tee-eligibility-message .help-icon__button {
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.9rem;
}

.slot-tee-indicator,
.tee-box-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: #6b4f00;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.15;
}

.slot-tee-indicator {
    max-width: 100%;
    margin: 0 0 0.35rem;
    padding: 0.2rem 0.4rem;
    border: 1px solid #e4cf8c;
    border-radius: 999px;
    background: #fff8dc;
    overflow-wrap: anywhere;
}

.tee-box-badge {
    padding: 0.18rem 0.45rem;
    border: 1px solid #e4cf8c;
    border-radius: 999px;
    background: #fff8dc;
    white-space: nowrap;
}

.multi-enroll-help-text {
    font-size: 0.8rem;
    color: #6b7280;
    line-height: 1.25;
}

.my-registration-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
}

.my-registration-detail {
    margin-top: 0.35rem;
}
/* ========================================================================== */
/* Tournament Slots: compact phone header                                     */
/*                                                                            */
/* Uses the application's existing phone breakpoint so desktop remains        */
/* unchanged.                                                                 */
/* ========================================================================== */
@media (max-width: 767px) {
    .tournament-slots-header {
        display: grid;
        grid-template-columns: minmax(0, 47%) minmax(0, 53%);
        align-items: stretch;
        gap: .35rem;
        padding: .45rem .5rem;
        margin-bottom: .55rem;
        overflow: visible;
    }

    .tournament-slots-info {
        min-width: 0;
        padding: .05rem 0;
    }

    .tournament-slots-title {
        margin: 0 0 .22rem;
        font-size: 1.05rem;
        line-height: 1.05;
    }

    .tournament-slots-meta {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: .08rem;
        margin-bottom: .3rem;
        font-size: .7rem;
        line-height: 1.12;
    }

    .tournament-slots-meta span {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .tournament-slots-meta span:not(:last-child)::after {
        content: none;
        margin: 0;
    }

    .tournament-status-badge {
        max-width: 100%;
        padding: .2rem .48rem;
        font-size: .68rem;
        line-height: 1.1;
        white-space: normal;
    }

    .registration-panel {
        min-width: 0;
        max-width: none;
        width: 100%;
        padding: .4rem .45rem;
        border-radius: .5rem;
        box-shadow: none;
    }

    .registration-mode-toggle {
        padding-bottom: .35rem;
        margin-bottom: .35rem;
    }

    .registration-mode-toggle .toggle-switch-label,
    .registration-mode-toggle label {
        font-size: .7rem;
        white-space: nowrap;
    }

    .my-registration-panel-content {
        align-items: center;
        gap: .35rem;
    }

    .my-registration-panel-content > div {
        min-width: 0;
    }

    .my-registration-label {
        font-size: .61rem;
        line-height: 1.1;
        letter-spacing: .035em;
    }

    .my-registration-detail {
        gap: .22rem;
        margin-top: .22rem;
    }

    .registration-chip {
        padding: .12rem .35rem;
        font-size: .65rem;
        line-height: 1.15;
    }

    .my-registration-panel-content .btn {
        flex: 0 0 auto;
        padding: .22rem .42rem;
        font-size: .68rem;
        line-height: 1.2;
    }

    .register-others-panel {
        gap: .3rem;
    }

    .tee-selection-panel {
        margin-top: .6rem;
        margin-bottom: .6rem;
        padding-top: .55rem;
    }

    .group-registration-panel {
        gap: .25rem;
        padding: .45rem .5rem;
    }

    .tee-eligibility-message {
        justify-content: flex-end;
        min-height: 1.2rem;
        margin-top: -.15rem;
        font-size: .65rem;
        line-height: 1.15;
        text-align: right;
    }

    .tee-eligibility-message .help-icon__button {
        width: 1.35rem;
        height: 1.35rem;
        font-size: .8rem;
    }

    .slot-tee-indicator {
        margin-bottom: .25rem;
        padding: .12rem .28rem;
        font-size: .58rem;
        line-height: 1.1;
    }

    .tee-box-badge {
        padding: .12rem .3rem;
        font-size: .64rem;
        white-space: normal;
    }

    .multi-enroll-help-text {
        font-size: .65rem;
        line-height: 1.15;
        text-align: left;
    }

    .register-others-panel .form-select {
        min-width: 0;
        padding-top: .2rem;
        padding-bottom: .2rem;
        font-size: .7rem;
    }
}

@media (max-width: 380px) {
    .tournament-slots-header {
        grid-template-columns: minmax(0, 45%) minmax(0, 55%);
        gap: .25rem;
        padding: .4rem;
    }

    .tournament-slots-title {
        font-size: .98rem;
    }

    .tournament-slots-meta {
        font-size: .66rem;
    }

    .registration-panel {
        padding: .35rem;
    }
}

/* ========================================================================== */
/* Tournament Slots: compact phone hole/group layout                          */
/*                                                                            */
/* Desktop slot sizing remains unchanged. On phones, each group uses the full */
/* available width and divides it evenly among its four player positions.     */
/* ========================================================================== */
@media (max-width: 767px) {
    .tournament-slots-page {
        padding: .3rem;
    }

    .tournament-slots-body {
        padding: .2rem 0;
    }

    .tournament-slots-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: .5rem;
    }

    .hole-card {
        min-width: 0;
        padding: .5rem;
    }

    .hole-header {
        margin-bottom: .55rem;
        padding-bottom: .4rem;
    }

    .hole-number-badge {
        padding: .25rem .55rem;
    }

    .hole-number,
    .hole-flag {
        font-size: .9rem;
    }

    .slot-group {
        width: 100%;
        max-width: none;
        min-width: 0;
    }

    .group-header {
        gap: .4rem;
        margin: .35rem 0 .25rem;
        font-size: .78rem;
    }

    .group-status {
        padding: .12rem .38rem;
        font-size: .62rem;
    }

    .slot-row {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: .35rem;
        width: 100%;
        min-width: 0;
    }

    .slot-card {
        width: auto;
        min-width: 0;
        min-height: 118px;
        padding: .35rem;
        flex: none;
    }

    .slot-header {
        font-size: .66rem;
        line-height: 1.1;
    }

    .slot-name {
        min-width: 0;
        margin: .2rem 0;
        font-size: .76rem;
        line-height: 1.15;
        overflow-wrap: anywhere;
    }

    .empty-slot-content {
        gap: .2rem;
    }

    .empty-slot-icon {
        font-size: .85rem;
    }

    .slot-footer {
        min-height: 27px;
    }

    .slot-card .btn {
        width: 100%;
        min-height: 27px;
        padding: .15rem .1rem;
        font-size: .7rem;
        line-height: 1.15;
    }

    .my-slot-indicator {
        height: 1.15rem;
        margin: .1rem 0;
    }

    .my-slot-pill {
        max-width: 100%;
        padding: .1rem .25rem;
        font-size: .58rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

@media (max-width: 380px) {
    .hole-card {
        padding: .42rem;
    }

    .slot-row {
        gap: .28rem;
    }

    .slot-card {
        min-height: 112px;
        padding: .3rem;
    }

    .slot-name {
        font-size: .71rem;
    }

    .slot-card .btn {
        font-size: .66rem;
    }
}


/* ========================================================================== */
/* Tournament Slots: responsive desktop hole grid                             */
/*                                                                            */
/* Scoped to desktop widths and Tournament Slots selectors only. The calendar */
/* and all other application pages remain untouched.                          */
/* ========================================================================== */
@media (min-width: 768px) {
    .tournament-slots-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(430px, 1fr));
        gap: .75rem;
    }

    .tournament-slots-grid .hole-card {
        min-width: 0;
    }

    .tournament-slots-grid .slot-group {
        width: 100%;
        max-width: none;
        min-width: 0;
    }

    .tournament-slots-grid .slot-row {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: .625rem;
        width: 100%;
        min-width: 0;
    }

    .tournament-slots-grid .slot-card {
        width: auto;
        min-width: 0;
        flex: none;
    }

    .tournament-slots-grid .slot-name {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    /* ==========================================================================
   Tournament Slots - Desktop spacing refinement
   Append this block to the END of your current theme.css.
   It only affects desktop (768px+) and leaves mobile unchanged.
   ========================================================================== */

    @media (min-width:768px) {

        .tournament-slots-grid {
            gap: 1.35rem;
            padding: .35rem;
        }

        .hole-card {
            padding: 1rem;
        }

        .group-header {
            margin: .45rem 0 .70rem;
        }

        .slot-row {
            gap: .80rem;
        }

        .hole-card + .hole-card {
            margin-top: .15rem;
        }
    }
}
