/* GMZ Â· BASE: normalizaciÃ³n, estructura y estilos base.
 * Las personalizaciones y componentes estÃ¡n en components.css.
 * Orden de carga: app.css, components.css.
 */
/* ============================================================
   GOLFMATCHZONE
   Estilos principales
   ============================================================ */


/* ============================================================
   1. VARIABLES DE IDENTIDAD
   ============================================================ */

:root {
    --alava: #b0004b;
    --alava-dark: #7f0037;

    --golf: #1f6b2d;
    --golf-dark: #123d20;
    --grass: #2e7d32;

    --bg: #f4f7f4;
    --ink: #1e2a24;
    --muted: #68766e;

    --card: #ffffff;
    --line: #dfe8e1;

    --shadow: 0 10px 30px rgba(18, 61, 32, 0.12);
}


/* ============================================================
   2. RESET Y ESTILOS GENERALES
   ============================================================ */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--ink);
}

body {
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

.muted {
    color: var(--muted);
}

.no-margin {
    margin: 0;
}


/* ============================================================
   3. CABECERA SUPERIOR
   ============================================================ */

.topbar {
    height: 68px;
    padding: 0 24px;

    position: sticky;
    top: 0;
    z-index: 20;

    display: flex;
    align-items: center;
    justify-content: space-between;

    color: #ffffff;

    background: linear-gradient(
        90deg,
        var(--alava-dark),
        var(--alava)
    );

    box-shadow: 0 3px 16px rgba(0, 0, 0, 0.18);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;

    font-weight: 800;
    letter-spacing: 0.5px;
}

.brand-mark {
    width: 38px;
    height: 38px;

    display: grid;
    place-items: center;

    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;

    background: linear-gradient(
        145deg,
        #3e8e42,
        #174c26
    );

    font-size: 20px;
}

.season-chip {
    padding: 9px 13px;

    border-radius: 999px;

    background: rgba(255, 255, 255, 0.14);

    font-weight: 700;
}


/* ============================================================
   4. LAYOUT PRINCIPAL
   ============================================================ */

.layout {
    min-height: calc(100vh - 68px);

    display: grid;
    grid-template-columns: 235px 1fr;
}

.sidebar {
    padding: 22px 14px;

    color: #e9f3ed;

    background: linear-gradient(
        180deg,
        #183127,
        #10241c
    );
}

.userbox {
    padding: 8px 12px 20px;
    margin-bottom: 16px;

    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.userbox b {
    display: block;
    color: #ffffff;
}

.nav a {
    margin: 5px 0;
    padding: 12px 14px;

    display: flex;
    align-items: center;
    gap: 10px;

    border-radius: 10px;

    color: #dce9e0;
}

.nav a:hover,
.nav a.active {
    color: #ffffff;

    background: linear-gradient(
        90deg,
        var(--golf),
        #31913f
    );
}

.content {
    min-width: 0;
    padding: 26px;
}


/* ============================================================
   5. HERO
   ============================================================ */

.hero {
    padding: 34px;

    position: relative;
    overflow: hidden;

    border-radius: 18px;

    color: #ffffff;

    background:
        linear-gradient(
            120deg,
            rgba(18, 61, 32, 0.92),
            rgba(31, 107, 45, 0.78)
        ),
        radial-gradient(
            circle at 70% 10%,
            rgba(255, 255, 255, 0.18),
            transparent 35%
        );

    box-shadow: var(--shadow);
}

.hero::after {
    content: "â›³";

    position: absolute;
    right: 34px;
    bottom: 8px;

    font-size: 110px;
    opacity: 0.12;
}

.hero h1 {
    margin: 0 0 8px;
    font-size: clamp(28px, 4vw, 46px);
}

.hero p {
    margin: 0;
    color: #e2f0e5;
}

.hero-compact {
    padding: 26px 30px;
}


/* ============================================================
   6. GRID
   ============================================================ */

.grid {
    margin-top: 20px;

    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 18px;
}

.span-3 {
    grid-column: span 3;
}

.span-4 {
    grid-column: span 4;
}

.span-5 {
    grid-column: span 5;
}

.span-6 {
    grid-column: span 6;
}

.span-7 {
    grid-column: span 7;
}

.span-8 {
    grid-column: span 8;
}

.span-9 {
    grid-column: span 9;
}

.span-12 {
    grid-column: span 12;
}


/* ============================================================
   7. TARJETAS
   ============================================================ */

.card {
    padding: 20px;

    border: 1px solid var(--line);
    border-radius: 16px;

    background: var(--card);

    box-shadow: var(--shadow);
}

.card h2,
.card h3 {
    margin-top: 0;
}

.accent-title {
    color: var(--alava);
    font-weight: 800;
}


/* ============================================================
   8. CLASIFICACIÃ“N
   ============================================================ */

.standings {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.standing {
    padding: 14px 16px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-left: 6px solid var(--golf);
    border-radius: 12px;

    background: #f7faf7;
}

.standing strong {
    font-size: 22px;
}


/* ============================================================
   9. BOTONES
   ============================================================ */

.btn {
    padding: 11px 16px;

    display: inline-block;

    border: 0;
    border-radius: 10px;

    font-weight: 700;
    cursor: pointer;

    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        opacity 0.15s ease;
}

.btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    color: #ffffff;
    background: var(--golf);
}

.btn-alava {
    color: #ffffff;
    background: var(--alava);
}

.btn-light {
    color: var(--ink);
    background: #ffffff;
    border: 1px solid var(--line);
}

.toolbar {
    margin-bottom: 16px;

    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}


/* ============================================================
   10. TABLAS
   ============================================================ */

.table-wrap {
    overflow: auto;

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

table {
    width: 100%;
    min-width: 760px;

    border-collapse: collapse;

    background: #ffffff;
}

th {
    padding: 12px;

    color: #ffffff;
    text-align: left;

    background: linear-gradient(
        180deg,
        #246f31,
        #1d5f29
    );
}

td {
    padding: 11px 12px;
    border-bottom: 1px solid var(--line);
}

tr:hover td {
    background: #f8fbf8;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.table-actions form {
    margin: 0;
}


/* ============================================================
   11. BADGES
   ============================================================ */

.badge {
    padding: 5px 9px;

    display: inline-block;

    border-radius: 999px;

    font-size: 12px;
    font-weight: 800;
}

.badge-green {
    color: #1d6b2a;
    background: #dff2e3;
}

.badge-alava {
    color: #8e003d;
    background: #f7dbe7;
}

.badge-gray {
    color: #536057;
    background: #e8ece9;
}


/* ============================================================
   12. FORMULARIOS
   ============================================================ */

.form-row {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 12px;
}

.field {
    grid-column: span 6;
}

.field.small {
    grid-column: span 3;
}

.field label {
    margin: 0 0 6px;

    display: block;

    font-size: 13px;
    font-weight: 700;
}

.field input,
.field select {
    width: 100%;
    padding: 11px;

    border: 1px solid #cdd9d0;
    border-radius: 9px;

    background: #ffffff;

    color: var(--ink);
    font: inherit;
}

.field input:focus,
.field select:focus {
    outline: none;
    border-color: var(--golf);
    box-shadow: 0 0 0 3px rgba(31, 107, 45, 0.12);
}

.create-tournament-button {
    margin-top: 18px;
}

.small-note {
    margin-top: 18px;
    font-size: 12px;
    line-height: 1.5;
}


/* ============================================================
   13. LOGIN
   ============================================================ */

.login-page {
    min-height: 100vh;
    padding: 28px 16px;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        radial-gradient(
            circle at top right,
            rgba(255, 255, 255, 0.08),
            transparent 30%
        ),
        linear-gradient(
            135deg,
            #173f24 0%,
            #285f37 55%,
            #1d4d2c 100%
        );
}

.login-card {
    width: min(440px, 94vw);
    padding: 30px 34px 24px;

    border-top: 7px solid var(--alava);
    border-radius: 22px;

    background: #ffffff;

    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.login-logo {
    min-height: 122px;
    margin-bottom: 10px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.login-logo-img {
    width: 118px;
    max-width: 42vw;
    height: auto;
    max-height: 118px;

    display: block;

    object-fit: contain;
}

.login-heading {
    margin-bottom: 20px;
    text-align: center;
}

.login-heading h1 {
    margin: 0 0 7px;

    color: var(--golf-dark);

    font-size: 28px;
    line-height: 1.15;
}

.login-heading p {
    margin: 0;

    color: var(--muted);

    font-size: 13px;
    line-height: 1.45;
}

.login-tournament {
    margin-bottom: 20px;
    padding: 12px 14px;

    border: 1px solid #dbe7dd;
    border-left: 5px solid var(--alava);
    border-radius: 12px;

    background: #f7faf7;
}

.login-tournament-disabled {
    border-left-color: #a9b5ad;
    background: #f2f4f2;
}

.login-tournament-label {
    margin-bottom: 6px;

    display: block;

    color: var(--muted);

    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.login-tournament-content {
    display: flex;
    align-items: center;
    gap: 9px;
}

.login-tournament-code {
    flex: 0 0 auto;

    padding: 5px 8px;

    border-radius: 8px;

    color: #ffffff;
    background: var(--alava);

    font-size: 13px;
    letter-spacing: 0.7px;
}

.login-tournament-name {
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
}

.login-form .field {
    margin-bottom: 14px;
    grid-column: span 12;
}

.login-form .field label {
    margin-bottom: 7px;
    font-size: 13px;
}

.login-form .field input {
    min-height: 45px;
    padding: 11px 13px;

    border-color: #cad8cd;
    border-radius: 10px;
}

.login-submit {
    width: 100%;
    min-height: 44px;
    margin-top: 4px;

    box-shadow: 0 8px 18px rgba(176, 0, 75, 0.18);
}

.login-footer {
    margin-top: 20px;
    padding-top: 16px;

    border-top: 1px solid #e5ece7;

    color: #78867d;
    text-align: center;

    font-size: 11px;
    letter-spacing: 0.4px;
}

.error {
    margin-bottom: 16px;
    padding: 11px 12px;

    border: 1px solid #f0c2c2;
    border-radius: 9px;

    color: #8b1f1f;
    background: #fde7e7;

    font-size: 13px;
    line-height: 1.4;
}


/* ============================================================
   14. RESULTADOS / SCORE
   ============================================================ */

.score-table input[type="number"] {
    width: 64px;
    padding: 7px;
}

.score-summary {
    color: var(--golf);

    font-size: 36px;
    font-weight: 900;
    text-align: center;
}


/* ============================================================
   15. IDENTIDAD MULTITORNEO
   ============================================================ */

.tournament-code {
    margin-bottom: 10px;
    padding: 7px 14px;

    display: inline-block;

    border-radius: 999px;

    color: #ffffff;
    background: rgba(189, 0, 80, 0.92);

    font-weight: 900;
    letter-spacing: 1.5px;

    box-shadow: 0 8px 20px rgba(74, 0, 32, 0.22);
}

.tournament-badge {
    min-width: 68px;
    padding: 7px 10px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;

    color: #ffffff;

    background: linear-gradient(
        135deg,
        var(--golf),
        var(--grass)
    );

    font-weight: 900;
    letter-spacing: 1px;

    box-shadow: 0 5px 12px rgba(31, 107, 45, 0.22);
}

.active-tournament-note {
    margin-top: 16px;
    padding: 12px 14px;

    border-left: 5px solid var(--alava);
    border-radius: 10px;

    background: #f8f1f4;

    color: #5f203b;

    font-size: 13px;
}

.active-tournament-note span {
    margin-left: 5px;
    font-weight: 900;
}


/* ============================================================
   16. MARCADOR TV
   ============================================================ */

.tv-body {
    color: #ffffff;
    background: #101d17;
}

.tv-top {
    padding: 20px 30px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    background: linear-gradient(
        90deg,
        var(--alava-dark),
        var(--alava)
    );
}

.tv-grid {
    padding: 26px;

    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 22px;
}

.tv-panel {
    padding: 22px;

    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;

    background: linear-gradient(
        160deg,
        #193027,
        #12221b
    );
}

.tv-standing {
    margin: 12px 0;
    padding: 20px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-left: 10px solid var(--golf);
    border-radius: 12px;

    background: #20392d;
}

.tv-standing strong {
    font-size: 40px;
}

.live-match {
    margin: 10px 0;
    padding: 14px;

    display: flex;
    justify-content: space-between;
    gap: 20px;

    border-radius: 12px;

    color: #1f2b24;
    background: #ffffff;
}

.live-result {
    color: var(--golf);
    font-size: 20px;
    font-weight: 900;
}


/* ============================================================
   17. FOOTER Y AVISO LEGAL
   ============================================================ */

.app-footer {
    padding: 0 26px 24px;
}

.app-footer-card {
    width: min(1180px, 100%);
    margin: 0 auto;
    padding: 16px 18px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;

    border: 1px solid var(--line);
    border-left: 5px solid var(--alava);
    border-radius: 16px;

    background: linear-gradient(135deg, #ffffff, #f8fbf8);
    box-shadow: 0 8px 24px rgba(18, 61, 32, 0.08);
}

.app-footer-main {
    min-width: 0;

    display: flex;
    align-items: center;
    gap: 12px;
}

.app-footer-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    color: #ffffff;
    background: linear-gradient(145deg, var(--golf), var(--golf-dark));

    font-size: 20px;
}

.app-footer-copy {
    min-width: 0;
}

.app-footer-copy strong,
.app-footer-copy span {
    display: block;
}

.app-footer-copy strong {
    margin-bottom: 3px;
    color: var(--golf-dark);
    font-size: 14px;
}

.app-footer-copy span {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.app-footer-actions {
    flex: 0 0 auto;

    display: flex;
    align-items: center;
    gap: 12px;
}

.app-footer-legal {
    padding: 8px 12px;

    border: 1px solid rgba(176, 0, 75, 0.18);
    border-radius: 999px;

    color: var(--alava-dark);
    background: rgba(176, 0, 75, 0.06);

    font-size: 12px;
    font-weight: 800;

    transition: 0.18s ease;
}

.app-footer-legal:hover {
    color: #ffffff;
    background: var(--alava);
    border-color: var(--alava);
}

.app-footer-year {
    color: #7a867f;
    font-size: 12px;
    white-space: nowrap;
}

.app-footer-tech {
    width: min(1180px, 100%);
    margin: 8px auto 0;

    color: #8a958e;
    text-align: center;
    font-size: 10px;
    line-height: 1.5;
}

.login-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
}

.login-legal-link {
    color: var(--alava-dark);
    font-weight: 800;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.login-legal-link:hover {
    color: var(--alava);
}

/* ------------------------------------------------------------
   PÃ¡gina de aviso legal
   ------------------------------------------------------------ */

.legal-page-body {
    min-height: 100vh;

    background:
        radial-gradient(
            circle at top right,
            rgba(176, 0, 75, 0.06),
            transparent 28%
        ),
        linear-gradient(180deg, #eef5ef 0%, var(--bg) 280px);
}

.legal-page-header {
    min-height: 88px;
    padding: 16px clamp(18px, 4vw, 42px);

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;

    color: #ffffff;
    background: linear-gradient(100deg, var(--golf-dark), var(--golf) 58%, var(--alava-dark));

    box-shadow: 0 4px 20px rgba(14, 45, 24, 0.22);
}

.legal-page-brand {
    min-width: 0;

    display: flex;
    align-items: center;
    gap: 16px;
}

.legal-page-logo {
    width: 68px;
    height: 68px;
    padding: 5px;

    flex: 0 0 68px;

    border-radius: 14px;

    background: #ffffff;
    object-fit: contain;
}

.legal-page-kicker {
    margin-bottom: 4px;

    color: rgba(255, 255, 255, 0.78);

    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1.6px;
}

.legal-page-header h1 {
    margin: 0;
    font-size: clamp(20px, 3vw, 31px);
    line-height: 1.12;
}

.legal-header-button {
    flex: 0 0 auto;
}

.legal-wrap {
    width: min(1040px, calc(100% - 28px));
    margin: 34px auto 50px;
}

.legal-card {
    padding: clamp(22px, 4vw, 44px);

    border: 1px solid #dce7de;
    border-top: 7px solid var(--alava);
    border-radius: 24px;

    background: #ffffff;
    box-shadow: 0 24px 60px rgba(18, 61, 32, 0.12);
}

.legal-top {
    margin-bottom: 24px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.legal-badge {
    padding: 8px 12px;

    border-radius: 999px;

    color: #ffffff;
    background: var(--alava);

    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.7px;
    text-transform: uppercase;
}

.legal-meta {
    color: var(--muted);
    font-size: 12px;
}

.legal-meta strong {
    color: var(--ink);
}

.legal-intro {
    margin-bottom: 28px;
    padding: 18px 20px;

    display: flex;
    align-items: flex-start;
    gap: 14px;

    border: 1px solid #d9e8dc;
    border-left: 5px solid var(--golf);
    border-radius: 14px;

    background: #f5faf6;
}

.legal-intro-icon {
    font-size: 26px;
    line-height: 1;
}

.legal-intro strong {
    color: var(--golf-dark);
    font-size: 15px;
}

.legal-intro p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.legal-section {
    margin-top: 26px;
    padding-top: 26px;

    border-top: 1px solid #e4ebe6;
}

.legal-section h2 {
    margin: 0 0 13px;
    padding-left: 13px;

    position: relative;

    color: var(--golf-dark);
    font-size: 19px;
    line-height: 1.25;
}

.legal-section h2::before {
    content: "";

    width: 5px;
    height: 100%;

    position: absolute;
    left: 0;
    top: 0;

    border-radius: 6px;
    background: var(--alava);
}

.legal-section p,
.legal-section li {
    color: #3f4e45;
    font-size: 14px;
    line-height: 1.75;
}

.legal-section p {
    margin: 0 0 12px;
    text-align: justify;
}

.legal-section ul {
    margin: 10px 0 0;
    padding-left: 22px;
}

.legal-section li {
    margin-bottom: 8px;
}

.legal-section-warning {
    margin-top: 30px;
    padding: 24px;

    border: 1px solid #ead4dd;
    border-left: 5px solid var(--alava);
    border-radius: 16px;

    background: #fcf7f9;
}

.legal-section-warning h2 {
    color: var(--alava-dark);
}

.legal-section-warning h2::before {
    display: none;
}

.legal-section-warning h2 {
    padding-left: 0;
}

.legal-contact {
    overflow: hidden;

    border: 1px solid #dde8df;
    border-radius: 14px;

    background: #f8fbf8;
}

.legal-contact-row {
    padding: 15px 17px;

    display: flex;
    justify-content: space-between;
    gap: 20px;

    border-bottom: 1px solid #dde8df;
}

.legal-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.legal-value {
    color: var(--golf-dark);
    text-align: right;
}

.legal-note {
    padding: 15px 17px;

    color: #556259;
    font-size: 13px;
    line-height: 1.65;
}

.legal-actions {
    margin-top: 32px;

    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.legal-disclaimer-bottom {
    margin-top: 30px;
    padding: 17px;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;

    border-radius: 14px;

    color: #ffffff;
    background: linear-gradient(105deg, var(--golf-dark), var(--golf));

    text-align: center;
}

.legal-disclaimer-bottom strong {
    font-size: 13px;
}

.legal-disclaimer-bottom span {
    color: rgba(255, 255, 255, 0.78);
    font-size: 11px;
}

.mobile-toggle {
    display: none;
}


/* ============================================================
   18. RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {

    .layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }

    .content {
        padding: 14px;
    }

    .span-3,
    .span-4,
    .span-5,
    .span-6,
    .span-7,
    .span-8,
    .span-9 {
        grid-column: span 12;
    }

    .topbar {
        padding: 0 12px;
    }

    .brand small {
        display: none;
    }

    .form-row {
        display: block;
    }

    .field,
    .field.small {
        margin-bottom: 12px;
    }

    .tv-grid {
        grid-template-columns: 1fr;
    }

    .tv-top {
        padding: 14px;
    }

    .hero {
        padding: 24px;
    }

    .season-chip {
        font-size: 13px;
    }

    .hide-mobile {
        display: none;
    }

    .app-footer {
        padding: 0 14px 18px;
    }

    .app-footer-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .app-footer-actions {
        width: 100%;
        justify-content: space-between;
    }

    .legal-page-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .legal-header-button {
        align-self: flex-end;
    }
}


@media (max-width: 520px) {

    .login-page {
        padding: 18px 10px;
        align-items: flex-start;
    }

    .login-card {
        margin-top: 22px;
        padding: 24px 20px 20px;
        border-radius: 18px;
    }

    .login-logo {
        min-height: 102px;
    }

    .login-logo-img {
        width: 100px;
        max-height: 100px;
    }

    .login-heading h1 {
        font-size: 24px;
    }

    .login-tournament-content {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .app-footer-main {
        align-items: flex-start;
    }

    .app-footer-actions {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .legal-page-header {
        padding: 14px;
    }

    .legal-page-brand {
        align-items: flex-start;
    }

    .legal-page-logo {
        width: 54px;
        height: 54px;
        flex-basis: 54px;
    }

    .legal-wrap {
        width: calc(100% - 18px);
        margin: 18px auto 30px;
    }

    .legal-card {
        padding: 20px 17px;
        border-radius: 18px;
    }

    .legal-top,
    .legal-contact-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .legal-value {
        text-align: left;
    }

    .legal-section p {
        text-align: left;
    }
}


/* ============================================================
   19. TEMA VISUAL FEDERACIÃ“N ALAVESA DE GOLF
   ------------------------------------------------------------
   AdaptaciÃ³n original inspirada en la identidad visual pÃºblica
   de la identidad visual original: blanco, negro/antracita,
   verde natural, verde lima y oliva.

   Se mantiene la estructura funcional de la aplicaciÃ³n y se
   modifica Ãºnicamente su lenguaje visual.
   ============================================================ */

:root {
    --alava: #89bd24;
    --alava-dark: #5c9424;

    --golf: #5c9424;
    --golf-dark: #20211e;
    --grass: #89bd24;

    --fede-lime: #89bd24;
    --fede-green: #5c9424;
    --fede-olive: #929000;
    --fede-red: #e42313;
    --fede-charcoal: #20211e;
    --fede-soft: #f3f5ee;

    --bg: #f5f6f2;
    --ink: #252722;
    --muted: #6d7168;

    --card: #ffffff;
    --line: #e0e4d9;

    --shadow: 0 10px 28px rgba(32, 33, 30, 0.08);
}

html,
body {
    background: var(--bg);
    color: var(--ink);
}

/* ------------------------------------------------------------
   CABECERA: mÃ¡s institucional y cercana a la web federativa
   ------------------------------------------------------------ */

.topbar {
    height: 78px;
    padding: 0 26px;

    color: var(--fede-charcoal);
    background: #ffffff;

    border-bottom: 4px solid var(--fede-lime);
    box-shadow: 0 4px 16px rgba(32, 33, 30, 0.08);
}

.brand {
    gap: 14px;
    color: var(--fede-charcoal);
    letter-spacing: 0.3px;
}

.brand-mark {
    width: 52px;
    height: 52px;

    flex: 0 0 52px;

    border: 0;
    border-radius: 50%;

    background-color: #ffffff;
    background-image: url("../img/golfmatchzone-icon.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;

    box-shadow: none;

    font-size: 0;
    overflow: hidden;
}

.brand > div:last-child {
    font-size: 17px;
    font-weight: 900;
    line-height: 1.08;
}

.brand small {
    display: block;
    margin-top: 3px;

    color: var(--fede-green);

    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.4px;
}

.season-chip {
    padding: 9px 14px;

    color: #40521f;
    background: #f1f5e8;

    border: 1px solid #dbe5c6;
    border-radius: 6px;

    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.4px;
}

/* ------------------------------------------------------------
   NAVEGACIÃ“N LATERAL
   ------------------------------------------------------------ */

.layout {
    min-height: calc(100vh - 78px);
}

.sidebar {
    padding: 24px 14px;

    color: var(--fede-charcoal);
    background: #ffffff;

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

.userbox {
    padding: 10px 12px 20px;
    margin-bottom: 16px;

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

.userbox .muted {
    color: #7b8077;

    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.userbox b {
    margin: 5px 0 3px;

    color: var(--fede-charcoal);

    font-size: 13px;
    line-height: 1.35;
}

.userbox small {
    color: var(--muted);
    font-size: 11px;
}

.nav a {
    margin: 3px 0;
    padding: 12px 13px;

    color: #454941;
    background: transparent;

    border-left: 4px solid transparent;
    border-radius: 4px;

    font-size: 13px;
    font-weight: 700;
}

.nav a:hover,
.nav a.active {
    color: #426b1a;

    background: #f1f5e9;
    border-left-color: var(--fede-lime);
}

.content {
    padding: 30px;
}

/* ------------------------------------------------------------
   HERO / PORTADA DE TORNEO
   ------------------------------------------------------------ */

.hero {
    padding: 34px 36px;

    color: var(--fede-charcoal);

    border: 1px solid #dfe4d7;
    border-left: 8px solid var(--fede-lime);
    border-radius: 8px;

    background:
        linear-gradient(110deg, #ffffff 0%, #fbfcf8 62%, #eef4df 100%);

    box-shadow: var(--shadow);
}

.hero::after {
    content: "//";

    right: 30px;
    bottom: 0;

    color: var(--fede-lime);

    font-size: 112px;
    font-weight: 900;
    letter-spacing: -14px;
    opacity: 0.12;
}

.hero h1 {
    color: var(--fede-charcoal);

    font-size: clamp(27px, 4vw, 44px);
    font-weight: 900;
    letter-spacing: -0.7px;
}

.hero p {
    color: #666b62;
    font-weight: 600;
}

.tournament-code {
    margin-bottom: 12px;
    padding: 6px 10px;

    color: #ffffff;
    background: var(--fede-charcoal);

    border-left: 5px solid var(--fede-lime);
    border-radius: 3px;

    box-shadow: none;

    font-size: 12px;
    letter-spacing: 1.4px;
}

/* ------------------------------------------------------------
   TARJETAS Y TÃ�TULOS
   ------------------------------------------------------------ */

.card {
    padding: 21px;

    border: 1px solid var(--line);
    border-radius: 7px;

    background: #ffffff;

    box-shadow: 0 8px 22px rgba(32, 33, 30, 0.06);
}

.card:hover {
    border-color: #d3dcc5;
}

.accent-title {
    color: var(--fede-charcoal);
    font-weight: 900;
}

.accent-title::before {
    content: "// ";
    color: var(--fede-lime);
}

/* ------------------------------------------------------------
   CLASIFICACIÃ“N
   ------------------------------------------------------------ */

.standings {
    gap: 8px;
}

.standing {
    padding: 13px 15px;

    border-left-width: 5px;
    border-radius: 4px;

    background: #f8f9f5;
}

.standing:hover {
    background: #f2f5ea;
}

.standing small {
    color: #7b8077;

    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.8px;
}

.standing strong {
    color: var(--fede-charcoal);
}

/* ------------------------------------------------------------
   BOTONES
   ------------------------------------------------------------ */

.btn {
    padding: 10px 15px;

    border-radius: 4px;

    font-size: 13px;
    font-weight: 900;
}

.btn-primary,
.btn-alava {
    color: #ffffff;
    background: var(--fede-green);

    box-shadow: none;
}

.btn-primary:hover:not(:disabled),
.btn-alava:hover:not(:disabled) {
    background: #4e7d1f;
}

.btn-light {
    color: var(--fede-charcoal);
    background: #ffffff;
    border: 1px solid #cfd4ca;
}

.btn-light:hover:not(:disabled) {
    color: #426b1a;
    border-color: var(--fede-lime);
    background: #f6f8f1;
}

/* ------------------------------------------------------------
   TABLAS
   ------------------------------------------------------------ */

.table-wrap {
    border-radius: 5px;
    border-color: #dfe3da;
}

table {
    background: #ffffff;
}

th {
    padding: 12px;

    color: #ffffff;
    background: var(--fede-charcoal);

    border-bottom: 4px solid var(--fede-lime);

    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.45px;
    text-transform: uppercase;
}

td {
    border-bottom-color: #e7e9e3;
}

tr:hover td {
    background: #f5f7f0;
}

/* ------------------------------------------------------------
   BADGES
   ------------------------------------------------------------ */

.badge {
    border-radius: 4px;
    letter-spacing: 0.3px;
}

.badge-green {
    color: #355812;
    background: #e6f1d5;
}

.badge-alava {
    color: #ffffff;
    background: var(--fede-olive);
}

.badge-gray {
    color: #555950;
    background: #e9ebe6;
}

/* ------------------------------------------------------------
   FORMULARIOS
   ------------------------------------------------------------ */

.field label {
    color: #444840;
    font-weight: 800;
}

.field input,
.field select {
    border-color: #cfd4ca;
    border-radius: 4px;
}

.field input:focus,
.field select:focus {
    border-color: var(--fede-green);
    box-shadow: 0 0 0 3px rgba(137, 189, 36, 0.16);
}

/* ------------------------------------------------------------
   LOGIN
   ------------------------------------------------------------ */

.login-page {
    background:
        linear-gradient(rgba(245, 246, 242, 0.92), rgba(245, 246, 242, 0.96)),
        radial-gradient(circle at 20% 15%, rgba(137, 189, 36, 0.25), transparent 30%),
        radial-gradient(circle at 82% 85%, rgba(146, 144, 0, 0.16), transparent 28%);
}

.login-card {
    width: min(450px, 94vw);

    border: 1px solid #dfe3da;
    border-top: 8px solid var(--fede-lime);
    border-radius: 8px;

    box-shadow: 0 22px 55px rgba(32, 33, 30, 0.18);
}

.login-logo-img {
    width: 124px;
}

.login-heading h1 {
    color: var(--fede-charcoal);
    font-weight: 900;
    letter-spacing: -0.45px;
}

.login-heading p {
    color: #6c7167;
    font-weight: 600;
}

.login-tournament {
    border: 1px solid #dce3d2;
    border-left: 5px solid var(--fede-lime);
    border-radius: 5px;

    background: #f5f8ef;
}

.login-tournament-label {
    color: #6d7467;
}

.login-tournament-code {
    border-radius: 3px;

    color: #ffffff;
    background: var(--fede-charcoal);
}

.login-form .field input {
    border-radius: 4px;
}

.login-submit {
    background: var(--fede-green);
    box-shadow: none;
}

.login-footer {
    border-top-color: #e3e6df;
}

.login-legal-link {
    color: #4f7f1f;
}

.login-legal-link:hover {
    color: var(--fede-olive);
}

/* ------------------------------------------------------------
   MULTITORNEO
   ------------------------------------------------------------ */

.tournament-badge {
    border-radius: 4px;

    color: #ffffff;
    background: var(--fede-green);

    box-shadow: none;
}

.active-tournament-note {
    border-left-color: var(--fede-lime);
    border-radius: 4px;

    color: #43512f;
    background: #f2f6e9;
}

/* ------------------------------------------------------------
   MARCADOR TV
   ------------------------------------------------------------ */

.tv-body {
    background: #171815;
}

.tv-top {
    color: #ffffff;
    background: var(--fede-charcoal);
    border-bottom: 6px solid var(--fede-lime);
}

.tv-panel {
    border-color: rgba(255, 255, 255, 0.1);
    border-radius: 7px;

    background: #20221e;
}

.tv-standing {
    border-radius: 4px;
    background: #2a2d27;
}

.live-match {
    border-radius: 4px;
}

.live-result {
    color: var(--fede-green);
}

/* ------------------------------------------------------------
   FOOTER
   ------------------------------------------------------------ */

.app-footer-card {
    border: 1px solid var(--line);
    border-left: 6px solid var(--fede-lime);
    border-radius: 6px;

    background: #ffffff;
    box-shadow: 0 6px 18px rgba(32, 33, 30, 0.06);
}

.app-footer-icon {
    width: 48px;
    height: 48px;
    flex-basis: 48px;

    border-radius: 50%;

    background-color: #ffffff;
    background-image: url("../img/golfmatchzone-icon.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;

    color: transparent;
    font-size: 0;
}

.app-footer-copy strong {
    color: var(--fede-charcoal);
}

.app-footer-legal {
    color: #426b1a;
    background: #f4f7ed;

    border-color: #d6e1c5;
    border-radius: 4px;
}

.app-footer-legal:hover {
    color: #ffffff;
    background: var(--fede-green);
    border-color: var(--fede-green);
}

/* ------------------------------------------------------------
   AVISO LEGAL
   ------------------------------------------------------------ */

.legal-page-body {
    background:
        linear-gradient(180deg, #f0f3e9 0%, var(--bg) 260px);
}

.legal-page-header {
    color: var(--fede-charcoal);
    background: #ffffff;

    border-bottom: 5px solid var(--fede-lime);
    box-shadow: 0 4px 18px rgba(32, 33, 30, 0.09);
}

.legal-page-logo {
    border: 0;
    border-radius: 50%;
    background: #ffffff;
}

.legal-page-kicker {
    color: var(--fede-green);
}

.legal-page-header h1 {
    color: var(--fede-charcoal);
}

.legal-card {
    border-color: #dde2d7;
    border-top-color: var(--fede-lime);
    border-radius: 8px;

    box-shadow: 0 18px 46px rgba(32, 33, 30, 0.09);
}

.legal-badge {
    border-radius: 4px;
    background: var(--fede-charcoal);
}

.legal-intro {
    border-color: #dae4ca;
    border-left-color: var(--fede-lime);
    border-radius: 5px;

    background: #f5f8ee;
}

.legal-intro strong {
    color: #426b1a;
}

.legal-section h2 {
    color: var(--fede-charcoal);
}

.legal-section h2::before {
    width: 6px;
    border-radius: 0;
    background: var(--fede-lime);
}

.legal-section-warning {
    border-color: #eadfbd;
    border-left-color: var(--fede-olive);
    border-radius: 5px;

    background: #fbfaf3;
}

.legal-section-warning h2 {
    color: #686700;
}

.legal-contact {
    border-color: #dde2d7;
    border-radius: 5px;
    background: #f8f9f5;
}

.legal-value {
    color: #426b1a;
}

.legal-disclaimer-bottom {
    border-radius: 5px;

    color: #ffffff;
    background: var(--fede-charcoal);

    border-bottom: 5px solid var(--fede-lime);
}

/* ------------------------------------------------------------
   DETALLES DE IDENTIDAD
   ------------------------------------------------------------ */

::selection {
    color: #ffffff;
    background: var(--fede-green);
}

hr {
    border: 0;
    border-top: 1px solid var(--line);
}

/* ------------------------------------------------------------
   RESPONSIVE DEL TEMA
   ------------------------------------------------------------ */

@media (max-width: 900px) {

    .topbar {
        height: 70px;
    }

    .layout {
        min-height: calc(100vh - 70px);
    }

    .brand-mark {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
    }

    .content {
        padding: 16px;
    }
}

@media (max-width: 520px) {

    .login-card {
        border-radius: 6px;
    }

    .hero,
    .card,
    .app-footer-card,
    .legal-card {
        border-radius: 5px;
    }

    .season-chip {
        padding: 7px 9px;
        font-size: 10px;
    }
}

/* ============================================================
   GESTIÃ“N DE CLUBES, JUGADORES E IMÃ�GENES
   ============================================================ */

.page-heading {
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 18px;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 5px;
    color: var(--fede-green, #5c9424);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
}

.flash {
    margin: 0 0 18px;
    padding: 13px 16px;
    border: 1px solid;
    border-radius: 6px;
    font-weight: 700;
}

.flash-success {
    color: #315f12;
    background: #f2f8e8;
    border-color: #cfe1b4;
}

.flash-error {
    color: #8a1d25;
    background: #fff2f3;
    border-color: #efc9cd;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.mini-stat {
    padding: 14px 16px;
    background: #fff;
    border: 1px solid var(--line, #dde2d7);
    border-top: 3px solid var(--fede-lime, #89bd24);
    border-radius: 6px;
}

.mini-stat span {
    display: block;
    margin-bottom: 4px;
    color: var(--muted, #6e756b);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.mini-stat strong {
    color: var(--fede-charcoal, #252822);
    font-size: 24px;
}

.filter-card {
    margin-bottom: 18px;
}

.filter-grid {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.4fr) minmax(180px, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.filter-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    padding-bottom: 1px;
}

.management-grid {
    align-items: start;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 12px;
}

.management-table td {
    vertical-align: middle;
}

.actions-col {
    min-width: 178px;
}

.person-cell {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 220px;
}

.person-cell b,
.profile-preview b {
    display: block;
    color: var(--fede-charcoal, #252822);
}

.person-cell small,
.profile-preview small {
    display: block;
    margin-top: 2px;
    color: var(--muted, #6e756b);
    font-size: 11px;
}

.avatar-wrap {
    position: relative;
    display: flex;
    width: 42px;
    height: 42px;
    min-width: 42px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 50%;
    background: #eef3e7;
    border: 2px solid #dce7cc;
}

.avatar-large {
    width: 74px;
    height: 74px;
    min-width: 74px;
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #426b1a;
    font-size: 17px;
    font-weight: 900;
    background: linear-gradient(145deg, #f6f9f0, #e5eed8);
}

.avatar-large .avatar-fallback {
    font-size: 25px;
}

.club-code {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 4px;
    color: #3d551f;
    background: #f0f5e8;
    border: 1px solid #dbe5cc;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .04em;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 5px;
    border-radius: 50%;
    vertical-align: 1px;
}

.status-dot.is-active {
    background: #5c9424;
    box-shadow: 0 0 0 3px rgba(92, 148, 36, .12);
}

.status-dot.is-inactive {
    background: #a4a8a0;
}

.row-actions,
.club-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.inline-form {
    display: inline;
    margin: 0;
}

.btn-small {
    min-height: 32px;
    padding: 6px 10px;
    font-size: 11px;
}

.btn-danger-soft {
    color: #9a2630;
    background: #fff6f6;
    border: 1px solid #efcdd0;
}

.btn-danger-soft:hover {
    color: #fff;
    background: #a92e38;
    border-color: #a92e38;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.empty-cell,
.empty-card {
    padding: 26px !important;
    text-align: center;
    color: var(--muted, #6e756b);
}

.sticky-form {
    position: sticky;
    top: 92px;
}

.editor-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.editor-head h2 {
    margin: 0;
    color: var(--fede-charcoal, #252822);
}

.editor-close {
    display: flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border: 1px solid #dde2d7;
    border-radius: 50%;
    color: #5c625a;
    background: #fff;
    font-size: 23px;
    line-height: 1;
}

.editor-close:hover {
    color: #fff;
    background: var(--fede-green, #5c9424);
    border-color: var(--fede-green, #5c9424);
}

.profile-preview {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 16px;
    padding: 13px;
    background: #f6f8f3;
    border: 1px solid #e0e6d9;
    border-radius: 6px;
}

.editor-form {
    display: grid;
    gap: 13px;
}

.editor-form .field {
    margin: 0;
}

.editor-form .field small,
.color-input-row span {
    display: block;
    margin-top: 5px;
    color: var(--muted, #6e756b);
    font-size: 11px;
    line-height: 1.4;
}

.check-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
}

.check-card {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 11px;
    border: 1px solid #dde3d5;
    border-radius: 6px;
    background: #fafbf8;
    cursor: pointer;
}

.check-card input {
    margin-top: 3px;
}

.check-card b,
.check-card small {
    display: block;
}

.check-card small {
    margin-top: 2px;
    color: var(--muted, #6e756b);
    font-size: 10px;
    line-height: 1.35;
}

.secondary-action-form {
    margin-top: 10px;
}

.info-panel p {
    line-height: 1.7;
}

/* Clubes */

.club-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.club-admin-card {
    position: relative;
    overflow: hidden;
    margin: 0;
    border-top: 4px solid var(--club-color, var(--fede-lime, #89bd24));
}

.club-admin-card::after {
    content: "";
    position: absolute;
    right: -35px;
    top: -35px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--club-color, #89bd24);
    opacity: .06;
    pointer-events: none;
}

.club-card-top {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 14px;
    align-items: center;
}

.club-logo-wrap {
    position: relative;
    display: flex;
    width: 70px;
    height: 70px;
    min-width: 70px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #e0e4db;
    border-radius: 9px;
    background: #fff;
}

.club-logo-large {
    width: 84px;
    height: 84px;
    min-width: 84px;
}

.club-logo-img {
    width: 86%;
    height: 86%;
    object-fit: contain;
}

.club-logo-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #426b1a;
    background: linear-gradient(145deg, #f7f9f3, #e7efdc);
    font-size: 25px;
    font-weight: 900;
}

.club-card-title h2 {
    margin: 6px 0 2px;
    color: var(--fede-charcoal, #252822);
    font-size: 19px;
}

.club-card-title p {
    margin: 0;
    color: var(--muted, #6e756b);
    font-size: 12px;
}

.club-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 16px 0;
}

.club-meta-grid > div {
    padding: 9px;
    border: 1px solid #e5e9df;
    border-radius: 5px;
    background: #fafbf8;
}

.club-meta-grid span,
.club-meta-grid strong {
    display: block;
}

.club-meta-grid span {
    margin-bottom: 4px;
    color: var(--muted, #6e756b);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.club-meta-grid strong {
    color: var(--fede-charcoal, #252822);
    font-size: 15px;
}

.color-value {
    display: flex !important;
    gap: 5px;
    align-items: center;
    font-size: 11px !important;
}

.color-value i {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 2px;
    border: 1px solid rgba(0,0,0,.12);
}

.color-input-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.color-input-row input[type="color"] {
    width: 58px;
    height: 42px;
    padding: 3px;
    border-radius: 5px;
    cursor: pointer;
}

/* Logos en clasificaciÃ³n */

.standing-with-logo {
    gap: 12px;
}

.standing-club {
    display: flex;
    align-items: center;
    gap: 10px;
}

.standing-logo-wrap {
    display: flex;
    width: 42px;
    height: 42px;
    min-width: 42px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 6px;
    background: #fff;
    border: 1px solid #e1e6dc;
}

.standing-logo {
    width: 84%;
    height: 84%;
    object-fit: contain;
}

.standing-logo-fallback {
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    background: #f2f6eb;
    color: #4b7125;
    font-weight: 900;
}

@media (max-width: 1080px) {
    .filter-grid {
        grid-template-columns: 1fr 1fr;
    }

    .filter-actions {
        align-self: end;
    }

    .club-card-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .stats-row,
    .filter-grid,
    .check-grid,
    .club-meta-grid {
        grid-template-columns: 1fr;
    }

    .page-heading {
        align-items: flex-start;
    }

    .page-heading .btn {
        width: 100%;
        justify-content: center;
    }

    .sticky-form {
        position: static;
    }

    .filter-actions {
        width: 100%;
    }

    .filter-actions .btn {
        flex: 1;
        justify-content: center;
    }

    .club-card-actions .btn,
    .club-card-actions .inline-form,
    .club-card-actions .inline-form button {
        width: 100%;
        justify-content: center;
    }
}

.tv-standing-logo {
    align-items: center;
}

.tv-club-identity {
    display: flex;
    align-items: center;
    gap: 14px;
}

.tv-club-logo-wrap {
    display: flex;
    width: 62px;
    height: 62px;
    min-width: 62px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px;
    background: #fff;
    border: 1px solid rgba(255,255,255,.35);
}

.tv-club-logo {
    width: 88%;
    height: 88%;
    object-fit: contain;
}

.tv-club-logo-fallback {
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 900;
    color: #426b1a;
    background: #f2f6eb;
}

/* ============================================================
   GESTIÃ“N DE TORNEOS, PARTIDOS Y PERFIL DE JUGADOR
   ============================================================ */

.page-heading-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
}

.tournament-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tournament-cell > div,
.tournament-cell small,
.table-subline,
.session-managing {
    display: block;
}

.tournament-cell small,
.table-subline,
.session-managing {
    margin-top: 3px;
    color: var(--muted, #6e756b);
    font-size: 10px;
}

.session-managing {
    color: var(--fede-green, #5c9424);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.tournament-actions {
    min-width: 190px;
}

.edit-warning {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 15px;
    padding: 11px 12px;
    border-left: 4px solid #c89d16;
    border-radius: 5px;
    background: #fff9e8;
    color: #5f501e;
    font-size: 12px;
    line-height: 1.45;
}

.readonly-id {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid #e1e6da;
    border-radius: 5px;
    background: #f7f9f4;
}

.readonly-id span {
    color: var(--muted, #6e756b);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.readonly-id strong {
    color: var(--fede-charcoal, #252822);
}

.match-management-table .actions-col,
.tournament-management-table .actions-col {
    min-width: 190px;
}

.match-order {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    background: var(--fede-charcoal, #252822);
    font-weight: 900;
}

.club-versus {
    display: flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

.club-versus span,
.match-vs {
    color: var(--muted, #6e756b);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.lineup-mini {
    display: grid;
    gap: 4px;
    min-width: 210px;
    font-size: 11px;
    line-height: 1.35;
}

.my-match-row td {
    background: #f6faef;
}

.my-match-row td:first-child {
    box-shadow: inset 4px 0 0 var(--fede-lime, #89bd24);
}

.match-side-box {
    padding: 12px;
    border: 1px solid #e0e5d9;
    border-radius: 6px;
    background: #fafbf8;
}

.match-side-box h3 {
    margin: 0 0 10px;
    color: var(--fede-charcoal, #252822);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.match-side-box .field + .field {
    margin-top: 10px;
}

.match-lineup-banner {
    display: grid;
    grid-template-columns: 1fr minmax(190px, .65fr) 1fr;
    margin: 16px 0 20px;
    overflow: hidden;
    border: 1px solid #dfe5d8;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(40, 50, 35, .07);
}

.match-team,
.match-current-score {
    padding: 20px;
    text-align: center;
}

.match-team > span,
.match-current-score > span {
    color: var(--muted, #6e756b);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .08em;
}

.match-team h2 {
    margin: 5px 0 7px;
    color: var(--fede-charcoal, #252822);
}

.match-team p {
    margin: 0;
    font-size: 12px;
    line-height: 1.55;
}

.match-current-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--fede-charcoal, #252822);
    border-bottom: 5px solid var(--fede-lime, #89bd24);
}

.match-current-score > span,
.match-current-score small {
    color: rgba(255,255,255,.72);
}

.match-current-score strong {
    margin: 4px 0;
    font-size: 36px;
    line-height: 1;
}

.match-current-score small {
    font-size: 10px;
}

.result-entry-table input[type="number"] {
    width: 72px;
    min-height: 36px;
    text-align: center;
}

.result-entry-table input:disabled {
    color: #656b64;
    background: #f1f3ef;
}

.score-form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
}

.score-form-actions .muted {
    font-size: 11px;
}

.match-summary-card .score-summary {
    margin: 20px 0 4px;
}

.score-progress {
    text-align: center;
    color: var(--muted, #6e756b);
    font-size: 12px;
}

.soft-rule {
    margin: 18px 0;
    border: 0;
    border-top: 1px solid #e0e5dc;
}

.final-result-callout,
.permission-note {
    margin-top: 14px;
    padding: 13px;
    border-radius: 6px;
}

.final-result-callout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #fff;
    background: var(--fede-charcoal, #252822);
    border-left: 5px solid var(--fede-lime, #89bd24);
}

.final-result-callout span {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.final-result-callout strong {
    font-size: 20px;
}

.permission-note {
    display: grid;
    gap: 4px;
    color: #39551f;
    background: #f2f8e9;
    border: 1px solid #d8e8c7;
    font-size: 12px;
    line-height: 1.45;
}

.player-dashboard-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 18px;
    padding: 18px 20px;
    border: 1px solid #dde5d6;
    border-left: 6px solid var(--fede-lime, #89bd24);
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(40, 50, 35, .06);
}

.player-dashboard-strip h2,
.player-dashboard-strip p {
    margin: 3px 0 0;
}

.player-dashboard-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.profile-grid {
    align-items: start;
}

.player-profile-card {
    overflow: hidden;
}

.profile-hero {
    text-align: center;
}

.avatar-profile {
    width: 118px;
    height: 118px;
    margin: 0 auto 12px;
    border: 4px solid #fff;
    box-shadow: 0 0 0 1px #dce3d6, 0 8px 22px rgba(40,50,35,.1);
}

.profile-hero h2 {
    margin: 0 0 4px;
    color: var(--fede-charcoal, #252822);
}

.profile-hero p {
    margin: 0;
    color: var(--muted, #6e756b);
}

.profile-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.player-match-list {
    display: grid;
    gap: 11px;
}

.player-match-card {
    display: grid;
    grid-template-columns: 54px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid #e0e5da;
    border-left: 5px solid var(--fede-lime, #89bd24);
    border-radius: 7px;
    background: #fff;
}

.player-match-card.is-finished {
    border-left-color: var(--fede-green, #5c9424);
    background: #fafcf8;
}

.player-match-order {
    display: flex;
    width: 46px;
    height: 46px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    background: var(--fede-charcoal, #252822);
    font-weight: 900;
}

.player-match-meta {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.player-match-main h3 {
    margin: 7px 0 4px;
    color: var(--fede-charcoal, #252822);
}

.player-match-main h3 span {
    color: var(--muted, #6e756b);
    font-size: 11px;
}

.player-match-main p {
    margin: 0;
    color: #555e55;
    font-size: 11px;
    line-height: 1.5;
}

.player-match-result {
    display: grid;
    justify-items: end;
    gap: 7px;
}

.player-match-result > strong {
    color: var(--fede-green, #5c9424);
    font-size: 22px;
}

.compact-empty {
    padding: 18px !important;
}

@media (max-width: 980px) {
    .match-lineup-banner {
        grid-template-columns: 1fr;
    }

    .match-current-score {
        order: -1;
    }

    .player-match-card {
        grid-template-columns: 46px 1fr;
    }

    .player-match-result {
        grid-column: 1 / -1;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
}

@media (max-width: 720px) {
    .page-heading-actions,
    .player-dashboard-strip,
    .player-dashboard-actions,
    .score-form-actions {
        width: 100%;
    }

    .page-heading-actions .btn,
    .player-dashboard-actions .btn,
    .score-form-actions .btn {
        flex: 1;
        text-align: center;
    }

    .player-dashboard-strip {
        align-items: stretch;
        flex-direction: column;
    }

    .player-match-card {
        grid-template-columns: 1fr;
    }

    .player-match-order {
        width: 40px;
        height: 40px;
    }

    .player-match-result {
        grid-column: auto;
    }
}

.player-access-box {
    display: grid;
    gap: 11px;
    padding: 13px;
    border: 1px solid #dce5d5;
    border-left: 4px solid var(--fede-lime, #89bd24);
    border-radius: 6px;
    background: #f8faf5;
}

.player-access-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.player-access-head h3 {
    margin: 2px 0 0;
    color: var(--fede-charcoal, #252822);
}

.access-help {
    margin: 0;
    font-size: 11px;
    line-height: 1.45;
}

.access-active-check {
    margin-top: 2px;
}


/* ============================================================
   RECORRIDOS / CONFIGURACIÃ“N DE CAMPO
   ============================================================ */

.course-club-selector {
    margin-bottom: 18px;
}

.course-selector-form {
    display: flex;
    align-items: end;
    gap: 14px;
}

.course-selector-form .field {
    flex: 1 1 360px;
    margin: 0;
}

.course-selector-summary {
    min-width: 110px;
    padding: 10px 13px;
    border: 1px solid #e0e6d9;
    border-radius: 6px;
    background: #f8faf5;
}

.course-selector-summary span,
.course-selector-summary strong {
    display: block;
}

.course-selector-summary span {
    color: var(--muted, #6e756b);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.course-selector-summary strong {
    margin-top: 3px;
    color: var(--fede-charcoal, #252822);
    font-size: 18px;
}

.course-page-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(480px, 560px);
    gap: 18px;
    align-items: start;
}

.course-list-panel {
    min-width: 0;
}

.course-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.course-card {
    margin: 0;
    border-top: 4px solid #d5ddcb;
}

.course-card.is-complete {
    border-top-color: var(--fede-green, #5c9424);
}

.course-card.is-incomplete {
    border-top-color: #a7aaa3;
}

.course-card-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.course-card-head h3 {
    margin: 7px 0 0;
    color: var(--fede-charcoal, #252822);
    font-size: 18px;
}

.course-code {
    display: inline-flex;
    padding: 3px 7px;
    border-radius: 4px;
    background: #edf4e5;
    color: #466c20;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .06em;
}

.course-rating-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 15px 0;
}

.course-rating-grid > div {
    padding: 10px;
    border: 1px solid #e3e8dd;
    border-radius: 6px;
    background: #fafbf8;
}

.course-rating-grid span,
.course-rating-grid strong,
.course-rating-grid small {
    display: block;
}

.course-rating-grid span {
    color: var(--muted, #6e756b);
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.course-rating-grid strong {
    margin-top: 4px;
    color: var(--fede-charcoal, #252822);
    font-size: 14px;
}

.course-rating-grid small {
    margin-top: 2px;
    color: var(--muted, #6e756b);
}

.selected-course-note {
    margin: 0 0 13px;
    padding: 8px 10px;
    border-left: 4px solid var(--fede-lime, #89bd24);
    background: #f2f7ea;
    color: #3f5f20;
    font-size: 11px;
    font-weight: 800;
}

.course-editor {
    min-width: 0;
}

.course-editor-form,
.course-editor-form * {
    box-sizing: border-box;
}

.course-main-fields {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
    gap: 10px;
}

.course-rating-editor-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.course-gender-box {
    padding: 12px;
    border: 1px solid #dfe6d8;
    border-radius: 6px;
    background: #f8faf5;
}

.course-holes-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 14px;
    margin-top: 4px;
}

.course-holes-head h3 {
    margin: 3px 0 0;
    color: var(--fede-charcoal, #252822);
}

.course-par-total {
    min-width: 95px;
    padding: 8px 12px;
    border-radius: 6px;
    background: var(--fede-charcoal, #252822);
    color: #fff;
    text-align: center;
}

.course-par-total span,
.course-par-total strong {
    display: block;
}

.course-par-total span {
    color: #dfe9d6;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .06em;
}

.course-par-total strong {
    margin-top: 2px;
    font-size: 21px;
}

.course-holes-wrap {
    max-height: none;
    overflow-x: auto;
    border: 1px solid #e1e6dc;
    border-radius: 6px;
}

.course-holes-table {
    width: 100%;
    min-width: 430px;
    border-collapse: collapse;
}

.course-holes-table th,
.course-holes-table td {
    padding: 7px 8px;
    text-align: center;
    border-bottom: 1px solid #e8ece4;
}

.course-holes-table th {
    color: #fff;
    background: var(--fede-charcoal, #252822);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.course-holes-table tbody tr:nth-child(9) td {
    border-bottom: 3px solid var(--fede-lime, #89bd24);
}

.course-holes-table input {
    width: 74px;
    min-width: 0;
    padding: 7px 5px;
    text-align: center;
}

.course-holes-table tfoot td {
    color: #43503b;
    background: #f1f5ec;
    font-size: 11px;
    font-weight: 900;
}

.course-form-note,
.course-assignment-note {
    display: grid;
    gap: 3px;
    padding: 11px 12px;
    border-left: 4px solid var(--fede-lime, #89bd24);
    border-radius: 4px;
    background: #f5f8f0;
}

.course-form-note b,
.course-assignment-note b {
    color: var(--fede-charcoal, #252822);
    font-size: 12px;
}

.course-form-note span,
.course-assignment-note span {
    color: var(--muted, #6e756b);
    font-size: 11px;
    line-height: 1.45;
}

.tournament-course-config {
    display: grid;
    gap: 11px;
    padding: 13px;
    border: 1px solid #dce5d5;
    border-left: 4px solid var(--fede-lime, #89bd24);
    border-radius: 6px;
    background: #f8faf5;
}

.course-table-name,
.course-pending {
    display: block;
    margin-top: 6px;
}

.course-pending {
    color: #9b6424;
    font-size: 11px;
    font-weight: 800;
}

@media (max-width: 1280px) {
    .course-page-grid {
        grid-template-columns: 1fr;
    }

    .course-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .course-selector-form,
    .course-holes-head {
        align-items: stretch;
        flex-direction: column;
    }

    .course-selector-summary {
        min-width: 0;
    }

    .course-card-grid,
    .course-main-fields,
    .course-rating-editor-grid {
        grid-template-columns: 1fr;
    }

    .course-rating-grid {
        grid-template-columns: 1fr;
    }

    .course-par-total {
        width: 100%;
    }
}

.course-hole-meta {
    min-width: 54px;
    color: #466c20;
    background: #f5f8f0;
    font-weight: 900;
}

.handicap-pending-note {
    margin-bottom: 14px;
    line-height: 1.5;
}

/* ============================================================
   AJUSTES RESPONSIVE 2026-08-27
   - Editores de Jugadores y Recorridos sin scroll horizontal.
   - Recorrido simplificado a HOYO + PAR + HCP.
   ============================================================ */

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

.content,
.card,
.editor-form,
.editor-form .field,
.check-card,
.check-card span,
.player-access-box,
.course-editor,
.course-editor-form,
.course-list-panel {
    min-width: 0;
    max-width: 100%;
}

.editor-form .field input,
.editor-form .field select,
.editor-form .field textarea,
.course-editor-form input,
.course-editor-form select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.editor-form input[type="file"] {
    overflow: hidden;
}

/* ------------------------------------------------------------
   Jugadores: listado + editor con anchura Ãºtil real
   ------------------------------------------------------------ */

.players-management-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(370px, .72fr);
    gap: 18px;
    align-items: start;
    margin-top: 20px;
}

.players-list-panel,
.player-editor-panel {
    min-width: 0;
}

.players-table-wrap {
    overflow: visible;
    max-width: 100%;
}

.players-management-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
}

.players-management-table th:nth-child(1),
.players-management-table td:nth-child(1) {
    width: 34%;
}

.players-management-table th:nth-child(2),
.players-management-table td:nth-child(2) {
    width: 16%;
}

.players-management-table th:nth-child(3),
.players-management-table td:nth-child(3) {
    width: 15%;
}

.players-management-table th:nth-child(4),
.players-management-table td:nth-child(4) {
    width: 14%;
}

.players-management-table th:nth-child(5),
.players-management-table td:nth-child(5) {
    width: 21%;
}

.players-management-table td,
.players-management-table th {
    overflow-wrap: anywhere;
}

.players-management-table .person-cell {
    min-width: 0;
}

.players-management-table .person-cell > div:last-child {
    min-width: 0;
}

.players-management-table .person-cell b {
    overflow-wrap: anywhere;
}

.player-editor-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 13px;
}

.player-editor-panel .check-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.player-editor-panel .player-access-box {
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
}

.player-editor-panel .player-access-head {
    min-width: 0;
    flex-wrap: wrap;
}

.player-editor-panel .btn-block {
    max-width: 100%;
    white-space: normal;
}

/* ------------------------------------------------------------
   Recorridos: editor compacto sin tabla horizontal
   ------------------------------------------------------------ */

.course-page-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(390px, 470px);
    gap: 18px;
    align-items: start;
}

.course-main-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
}

.course-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 15px 0;
}

.course-summary-grid > div {
    min-width: 0;
    padding: 10px;
    border: 1px solid #e3e8dd;
    border-radius: 6px;
    background: #fafbf8;
}

.course-summary-grid span,
.course-summary-grid strong {
    display: block;
}

.course-summary-grid span {
    color: var(--muted, #6e756b);
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.course-summary-grid strong {
    margin-top: 4px;
    color: var(--fede-charcoal, #252822);
    font-size: 16px;
}

.course-holes-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}

.course-hole-editor {
    display: grid;
    grid-template-columns: 54px repeat(3, minmax(0, 1fr));
    gap: 8px;
    align-items: end;
    min-width: 0;
    padding: 8px;
    border: 1px solid #e2e7de;
    border-radius: 6px;
    background: #fbfcf9;
}

.course-hole-editor.back-nine-start {
    border-top: 3px solid var(--fede-lime, #89bd24);
}

.course-hole-number {
    display: flex;
    min-height: 51px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    color: #fff;
    background: var(--fede-charcoal, #252822);
}

.course-hole-number span {
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .05em;
}

.course-hole-number strong {
    margin-top: 1px;
    font-size: 20px;
}

.course-hole-editor .compact-field {
    margin: 0;
    min-width: 0;
}

.course-hole-editor .compact-field label {
    margin-bottom: 3px;
    font-size: 10px;
}

.course-hole-editor input {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding: 8px 5px;
    text-align: center;
}

.course-holes-head {
    margin-top: 4px;
}

.course-editor .course-form-note {
    margin-top: 2px;
}

/* La antigua tabla de hoyos queda neutralizada por compatibilidad
   con cualquier vista cacheada durante un redeploy. */
.course-holes-wrap {
    max-width: 100%;
    overflow-x: hidden;
}

.course-holes-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
}

.course-holes-table input {
    width: 100%;
    max-width: 72px;
}

/* ------------------------------------------------------------
   AdaptaciÃ³n por anchura: antes de comprimir, apilamos paneles.
   ------------------------------------------------------------ */

@media (max-width: 1420px) {
    .course-page-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .course-editor {
        position: static;
        width: 100%;
    }

    .course-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 1280px) {
    .players-management-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .player-editor-panel {
        position: static;
        width: 100%;
    }

    .player-editor-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .player-editor-form > .player-access-box,
    .player-editor-form > .check-grid,
    .player-editor-form > .btn-block {
        grid-column: 1 / -1;
    }
}

@media (max-width: 900px) {
    .course-card-grid,
    .course-holes-grid,
    .course-summary-grid,
    .player-editor-form,
    .player-editor-panel .check-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .course-selector-form {
        flex-wrap: wrap;
    }

    .course-selector-form .field,
    .course-selector-summary {
        flex: 1 1 100%;
        width: 100%;
    }

    .players-management-table,
    .players-management-table tbody,
    .players-management-table tr,
    .players-management-table td {
        display: block;
        width: 100%;
    }

    .players-management-table thead {
        display: none;
    }

    .players-management-table tr {
        margin-bottom: 10px;
        padding: 6px 10px;
        border: 1px solid #e2e6dd;
        border-radius: 7px;
        background: #fff;
    }

    .players-management-table td {
        display: grid;
        grid-template-columns: 108px minmax(0, 1fr);
        gap: 10px;
        align-items: center;
        padding: 9px 4px;
        border-bottom: 1px solid #edf0e9;
    }

    .players-management-table td:last-child {
        border-bottom: 0;
    }

    .players-management-table td::before {
        color: #6d7569;
        font-size: 9px;
        font-weight: 900;
        text-transform: uppercase;
        letter-spacing: .05em;
    }

    .players-management-table td:nth-child(1)::before { content: "Jugador/a"; }
    .players-management-table td:nth-child(2)::before { content: "Club"; }
    .players-management-table td:nth-child(3)::before { content: "CondiciÃ³n"; }
    .players-management-table td:nth-child(4)::before { content: "Estado"; }
    .players-management-table td:nth-child(5)::before { content: "Acciones"; }

    .players-management-table th:nth-child(n),
    .players-management-table td:nth-child(n) {
        width: 100%;
    }
}

@media (max-width: 560px) {
    .content {
        padding-left: 14px;
        padding-right: 14px;
    }

    .course-hole-editor {
        grid-template-columns: 48px repeat(3, minmax(0, 1fr));
        gap: 6px;
        padding: 7px;
    }

    .players-management-table td {
        grid-template-columns: 84px minmax(0, 1fr);
    }

    .player-editor-panel .row-actions,
    .player-editor-panel .club-card-actions {
        width: 100%;
    }
}


/* ============================================================
   ESTILOS CENTRALIZADOS DESDE LAS JSP
   Todas las reglas estÃ¡ticas de las vistas viven en app.css.
   ============================================================ */


/* ---------------- MATCH ---------------- */
/* ========================================================
           CLUB
           ======================================================== */

        .match-club-heading {
            display: flex;
            align-items: center;
            justify-content: center;

            gap: 10px;

            margin: 6px 0 8px;
        }

        .match-club-heading h2 {
            margin: 0;
        }

        .match-club-logo-wrap {
            width: 48px;
            height: 48px;

            min-width: 48px;

            border-radius: 10px;

            display: flex;
            align-items: center;
            justify-content: center;

            background: #fff;

            border: 1px solid #e1e7dc;

            overflow: hidden;
        }

        .match-club-logo {
            width: 100%;
            height: 100%;

            object-fit: contain;

            padding: 4px;

            box-sizing: border-box;
        }

        .match-club-logo-fallback {
            width: 100%;
            height: 100%;

            display: flex;
            align-items: center;
            justify-content: center;

            font-size: 18px;
            font-weight: 900;

            color: #5c9424;
        }


        /* ========================================================
           JUGADORES
           ======================================================== */

        .match-player-list {
            display: flex;
            flex-direction: column;

            gap: 8px;

            margin-top: 10px;
        }

        .match-player {
            display: flex;
            align-items: center;

            gap: 8px;

            min-width: 0;
        }

        .match-player-avatar-wrap {
            width: 34px;
            height: 34px;

            min-width: 34px;

            border-radius: 50%;

            overflow: hidden;

            display: flex;
            align-items: center;
            justify-content: center;

            background: #edf3e8;

            border: 2px solid rgba(255,255,255,.75);
        }

        .match-player-avatar {
            width: 100%;
            height: 100%;

            object-fit: cover;
        }

        .match-player-avatar-fallback {
            width: 100%;
            height: 100%;

            display: flex;
            align-items: center;
            justify-content: center;

            font-size: 13px;
            font-weight: 900;

            color: #5c9424;

            background: #edf3e8;
        }

        .match-player-name {
            min-width: 0;

            font-weight: 800;

            overflow-wrap: anywhere;
        }

        .match-player-hcp {
            flex: 0 0 auto;
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 3px 7px;
            border-radius: 999px;
            background: #20251f;
            color: #fff;
            font-size: 10px;
            font-weight: 900;
            white-space: nowrap;
        }

        .match-player-hcp em {
            font-style: normal;
            font-size: 8px;
            opacity: .72;
            letter-spacing: .06em;
        }


        /* ========================================================
           CLUBES EN RESULTADO FINAL
           ======================================================== */

        .match-final-standing {
            display: flex;
            align-items: center;
            justify-content: space-between;

            gap: 12px;
        }

        .match-final-club {
            display: flex;
            align-items: center;

            gap: 9px;

            min-width: 0;
        }

        .match-final-club .match-club-logo-wrap {
            width: 34px;
            height: 34px;

            min-width: 34px;

            border-radius: 7px;
        }


        /* ========================================================
           RESPONSIVE
           ======================================================== */

        @media (max-width: 800px) {

            .match-club-heading {
                flex-direction: column;
            }

            .match-club-logo-wrap {
                width: 42px;
                height: 42px;

                min-width: 42px;
            }

        }


/* ---------------- PLAYERS ---------------- */
/* ========================================================
           DISTRIBUCIÃ“N PRINCIPAL
           ======================================================== */

        .players-management-grid {
            display: grid;

            grid-template-columns:
                minmax(0, 1fr)
                minmax(370px, 440px);

            gap: 18px;

            align-items: start;

            width: 100%;
            max-width: 100%;
            min-width: 0;

            margin-top: 20px;
        }


        .players-list-panel,
        .player-editor-panel {
            width: 100%;
            max-width: 100%;
            min-width: 0;

            box-sizing: border-box;
        }


        /* ========================================================
           TABLA DE JUGADORES

           IMPORTANTE:
           reservamos espacio real para la columna de acciones.
           ======================================================== */

        .players-table-wrap {
            width: 100%;
            max-width: 100%;
            min-width: 0;

            overflow: hidden;
        }


        .players-management-table {
            width: 100%;
            max-width: 100%;

            table-layout: fixed;

            border-collapse: collapse;
        }


        /*
         * Anchuras de las columnas.
         *
         * La columna Acciones dispone ahora de espacio suficiente
         * para que Editar / Eliminar nunca salgan fuera del marco.
         */

        .players-management-table th:nth-child(1),
        .players-management-table td:nth-child(1) {
            width: 33%;
        }


        .players-management-table th:nth-child(2),
        .players-management-table td:nth-child(2) {
            width: 12%;
        }


        .players-management-table th:nth-child(3),
        .players-management-table td:nth-child(3) {
            width: 8%;
        }


        .players-management-table th:nth-child(4),
        .players-management-table td:nth-child(4) {
            width: 13%;
        }


        .players-management-table th:nth-child(5),
        .players-management-table td:nth-child(5) {
            width: 13%;
        }


        .players-management-table th:nth-child(6),
        .players-management-table td:nth-child(6) {
            width: 21%;
        }


        .players-management-table th,
        .players-management-table td {
            min-width: 0;

            box-sizing: border-box;

            vertical-align: middle;
        }


        /* ========================================================
           NOMBRE DEL JUGADOR
           ======================================================== */

        .players-management-table .person-cell {
            display: flex;

            align-items: center;

            gap: 10px;

            width: 100%;
            min-width: 0;
        }


        .players-management-table .person-cell > div:last-child {
            min-width: 0;

            flex: 1;
        }


        .players-management-table .person-cell b {
            display: block;

            max-width: 100%;

            overflow-wrap: anywhere;
            word-break: normal;
        }


        /* ========================================================
           ACCIONES

           Los botones permanecen DENTRO de la celda.
           ======================================================== */

        .players-management-table .actions-col {
            min-width: 130px;
        }


        .players-management-table td:last-child {
            min-width: 130px;

            padding-left: 10px;
            padding-right: 10px;
        }


        .players-management-table .row-actions {
            display: flex;

            flex-direction: column;

            align-items: stretch;

            gap: 6px;

            width: 100%;
            max-width: 140px;
            min-width: 0;

            margin: 0 auto;
        }


        .players-management-table .row-actions > a,
        .players-management-table .row-actions > form {
            display: block;

            width: 100%;
            max-width: 100%;

            margin: 0;

            box-sizing: border-box;
        }


        .players-management-table .row-actions .inline-form {
            width: 100%;
        }


        .players-management-table .row-actions .btn,
        .players-management-table .row-actions button {
            display: block;

            width: 100%;
            max-width: 100%;

            min-width: 0;

            padding-left: 8px;
            padding-right: 8px;

            white-space: nowrap;

            box-sizing: border-box;

            text-align: center;
        }


        /* ========================================================
           PANEL DE EDICIÃ“N
           ======================================================== */

        .player-editor-panel {
            position: static !important;

            overflow: hidden;

            align-self: start;
        }


        .player-editor-panel .editor-head {
            display: flex;

            justify-content: space-between;
            align-items: flex-start;

            gap: 12px;

            width: 100%;
            min-width: 0;
        }


        .player-editor-panel .editor-head > div {
            min-width: 0;
        }


        .player-editor-panel .editor-head h2 {
            overflow-wrap: anywhere;
        }


        /* ========================================================
           PREVISUALIZACIÃ“N
           ======================================================== */

        .player-editor-panel .profile-preview {
            display: flex;

            align-items: center;

            gap: 12px;

            width: 100%;
            min-width: 0;

            padding: 12px;

            margin-bottom: 14px;

            box-sizing: border-box;
        }


        .player-editor-panel .profile-preview > div:last-child {
            display: flex;
            flex-direction: column;

            min-width: 0;
        }


        .player-editor-panel .profile-preview b,
        .player-editor-panel .profile-preview small {
            max-width: 100%;

            overflow-wrap: anywhere;
        }


        /* ========================================================
           FORMULARIO VERTICAL
           ======================================================== */

        .player-editor-form {
            display: flex !important;

            flex-direction: column !important;

            gap: 14px;

            width: 100%;
            max-width: 100%;
            min-width: 0;

            box-sizing: border-box;
        }


        .player-editor-form .field {
            display: flex !important;

            flex-direction: column;

            gap: 5px;

            width: 100% !important;
            max-width: 100%;
            min-width: 0;

            grid-column: auto !important;

            margin: 0;

            box-sizing: border-box;
        }


        .player-editor-form .field label {
            display: block;

            margin: 0;

            font-weight: 800;
        }


        .player-editor-form .field input,
        .player-editor-form .field select,
        .player-editor-form .field textarea {
            display: block;

            width: 100% !important;
            max-width: 100%;
            min-width: 0;

            box-sizing: border-box;
        }


        .player-editor-form input[type="file"] {
            width: 100%;
            max-width: 100%;
            min-width: 0;

            overflow: hidden;

            box-sizing: border-box;
        }


        .player-editor-form .field small {
            display: block;

            width: 100%;
            max-width: 100%;

            line-height: 1.4;

            overflow-wrap: anywhere;
        }


        /* ========================================================
           SUPLENTE / ACTIVO
           ======================================================== */

        .player-editor-form .check-grid {
            display: flex !important;

            flex-direction: column !important;

            gap: 10px;

            width: 100%;
            min-width: 0;

            grid-template-columns: none !important;
        }


        .player-editor-form .check-card {
            display: flex;

            align-items: flex-start;

            gap: 10px;

            width: 100%;
            max-width: 100%;
            min-width: 0;

            padding: 12px;

            box-sizing: border-box;
        }


        .player-editor-form .check-card input[type="checkbox"] {
            flex: 0 0 auto;

            width: auto !important;

            margin-top: 2px;
        }


        .player-editor-form .check-card span {
            display: flex;

            flex-direction: column;

            min-width: 0;
        }


        .player-editor-form .check-card small {
            max-width: 100%;

            line-height: 1.35;

            overflow-wrap: anywhere;
        }


        /* ========================================================
           ACCESO WEB
           ======================================================== */

        .player-access-box {
            display: flex !important;

            flex-direction: column !important;

            gap: 12px;

            width: 100%;
            max-width: 100%;
            min-width: 0;

            padding: 14px;

            border: 1px solid #dfe6d8;
            border-left: 4px solid var(--fede-lime, #89bd24);

            border-radius: 6px;

            background: #fafbf8;

            box-sizing: border-box;

            overflow: hidden;
        }


        .player-access-head {
            display: flex;

            justify-content: space-between;
            align-items: flex-start;

            gap: 10px;

            width: 100%;
            min-width: 0;
        }


        .player-access-head > div {
            min-width: 0;
        }


        .player-access-head h3 {
            margin: 2px 0 0;

            font-size: 15px;

            overflow-wrap: anywhere;
        }


        .player-access-box .access-help {
            width: 100%;

            margin: 0;

            font-size: 11px;
            line-height: 1.45;

            overflow-wrap: anywhere;
        }


        .player-access-box .field {
            width: 100% !important;

            max-width: 100%;

            margin: 0;
        }


        .player-access-box input[type="text"],
        .player-access-box input[type="password"],
        .player-access-box input:not([type]) {
            width: 100% !important;

            max-width: 100%;
            min-width: 0;

            box-sizing: border-box;
        }


        .player-access-box .access-active-check {
            width: 100%;
            max-width: 100%;

            margin: 0;
        }


        /* ========================================================
           BOTONES DEL EDITOR
           ======================================================== */

        .player-editor-form > .btn-block,
        .player-editor-panel .secondary-action-form .btn-block {
            display: block;

            width: 100%;
            max-width: 100%;

            white-space: normal;

            box-sizing: border-box;
        }


        .player-editor-panel .secondary-action-form {
            width: 100%;

            margin-top: 10px;

            box-sizing: border-box;
        }


        /* ========================================================
           RESPONSIVE

           Antes de que tabla + editor se compriman demasiado,
           el editor baja debajo.
           ======================================================== */

        @media (max-width: 1450px) {

            .players-management-grid {
                grid-template-columns: minmax(0, 1fr);
            }


            .player-editor-panel {
                width: 100%;
                max-width: 760px;

                justify-self: center;
            }

        }


        /*
         * En pantallas mÃ¡s pequeÃ±as dejamos de intentar representar
         * seis columnas.
         *
         * Cada jugador se convierte visualmente en una ficha.
         */

        @media (max-width: 850px) {

            .players-table-wrap {
                overflow: visible;
            }


            .players-management-table {
                display: block;

                width: 100%;

                table-layout: auto;
            }


            .players-management-table thead {
                display: none;
            }


            .players-management-table tbody {
                display: flex;

                flex-direction: column;

                gap: 12px;

                width: 100%;
            }


            .players-management-table tr {
                display: block;

                width: 100%;

                padding: 12px;

                border: 1px solid #dfe5d8;
                border-left: 4px solid var(--fede-lime, #89bd24);

                border-radius: 7px;

                background: #fff;

                box-sizing: border-box;
            }


            .players-management-table td {
                display: grid;

                grid-template-columns:
                    minmax(105px, 34%)
                    minmax(0, 1fr);

                gap: 10px;

                align-items: center;

                width: 100% !important;

                min-width: 0 !important;

                padding: 8px 0;

                border: 0;

                box-sizing: border-box;
            }


            .players-management-table td::before {
                color: #66705f;

                font-size: 10px;
                font-weight: 900;

                text-transform: uppercase;
                letter-spacing: .05em;
            }


            .players-management-table td:nth-child(1)::before {
                content: "Jugador/a";
            }


            .players-management-table td:nth-child(2)::before {
                content: "Club";
            }


            .players-management-table td:nth-child(3)::before {
                content: "HCP";
            }


            .players-management-table td:nth-child(4)::before {
                content: "CondiciÃ³n";
            }


            .players-management-table td:nth-child(5)::before {
                content: "Estado";
            }


            .players-management-table td:nth-child(6)::before {
                content: "Acciones";
            }


            .players-management-table td:last-child {
                width: 100% !important;

                min-width: 0;
            }


            .players-management-table .row-actions {
                width: 100%;
                max-width: 220px;

                margin: 0;
            }


            .player-access-head {
                flex-direction: column;
            }


            .player-access-head .badge {
                align-self: flex-start;
            }

        }


        @media (max-width: 550px) {

            .players-management-table td {
                grid-template-columns: 1fr;

                gap: 5px;
            }


            .players-management-table .row-actions {
                max-width: 100%;
            }


            .player-editor-panel {
                padding-left: 12px;
                padding-right: 12px;
            }


            .player-access-box {
                padding: 12px;
            }

        }


/* ---------------- PROFILE ---------------- */
.profile-role-strip{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-bottom:18px;padding:16px 18px;border-left:5px solid var(--fede-lime,#89bd24)}
        .profile-role-strip .club-logo-wrap{width:58px;height:58px;min-width:58px}
        .profile-role-main{min-width:0;flex:1}.profile-role-main h2{margin:2px 0 3px}.profile-role-main p{margin:0}
        .profile-role-tags{display:flex;gap:7px;flex-wrap:wrap;align-items:center}
        .profile-hcp{display:inline-flex;align-items:center;gap:5px;padding:5px 9px;border-radius:999px;background:#20251f;color:#fff;font-weight:900;font-size:12px}
        .profile-hcp small{font-size:9px;letter-spacing:.08em;opacity:.72}
        .profile-player-info{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:14px}
        .profile-info-box{padding:11px;border:1px solid #e1e7dc;border-radius:6px;background:#fafbf8;min-width:0}
        .profile-info-box span{display:block;color:var(--muted,#6e756b);font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.06em}
        .profile-info-box strong{display:block;margin-top:3px;overflow-wrap:anywhere}
        .captain-roster{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:12px}
        .captain-roster-player{display:flex;align-items:center;gap:8px;padding:8px;border:1px solid #e5eadf;border-radius:6px;background:#fff;min-width:0}
        .captain-roster-player .avatar-wrap{width:34px;height:34px;min-width:34px}.captain-roster-player>div:last-child{min-width:0}.captain-roster-player b{display:block;overflow-wrap:anywhere}.captain-roster-player small{display:block;color:var(--muted,#6e756b)}
        .profile-match-badges{display:flex;gap:5px;flex-wrap:wrap;align-items:center}

        /* GestiÃ³n de plantilla del capitÃ¡n */
        .captain-management-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-top:2px}
        .captain-management-head h3{margin:3px 0 2px}
        .captain-management-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
        .captain-team-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:12px 0}
        .captain-team-stat{padding:10px 12px;border:1px solid #e1e7dc;border-radius:6px;background:#fafbf8;min-width:0}
        .captain-team-stat span{display:block;color:var(--muted,#6e756b);font-size:9px;font-weight:900;text-transform:uppercase;letter-spacing:.06em}
        .captain-team-stat strong{display:block;margin-top:2px;font-size:20px;color:var(--fede-charcoal,#252822)}
        .captain-roster-player{align-items:flex-start;flex-wrap:wrap}
        .captain-roster-player-main{display:flex;align-items:center;gap:8px;flex:1 1 190px;min-width:0}
        .captain-roster-player-info{min-width:0;flex:1}
        .captain-roster-player-info b{display:block;overflow-wrap:anywhere}
        .captain-roster-player-info small{display:block;color:var(--muted,#6e756b);line-height:1.4}
        .captain-player-tags{display:flex;gap:4px;flex-wrap:wrap;margin-top:4px}
        .captain-player-actions{display:flex;gap:5px;flex-wrap:wrap;width:100%;padding-top:7px;margin-top:2px;border-top:1px solid #eef1ea}
        .captain-player-actions .btn,.captain-player-actions form{margin:0}
        .captain-player-actions form{display:inline-flex}
        .captain-permission-note{margin:10px 0 0;padding:10px 12px;border-left:4px solid var(--fede-lime,#89bd24);border-radius:4px;background:#f2f7eb;color:var(--muted,#6e756b);font-size:11px;line-height:1.5}

        @media(max-width:900px){
            .profile-player-info,.captain-roster{grid-template-columns:1fr}
            .captain-team-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
        }
        @media(max-width:520px){
            .captain-team-stats{grid-template-columns:1fr 1fr}
            .captain-management-actions{width:100%}
            .captain-management-actions .btn{flex:1 1 auto;text-align:center}
        }


/* ---------------- TOURNAMENTS ---------------- */
.tournaments-page-grid{
            display:grid;
            grid-template-columns:minmax(0,1.55fr) minmax(390px,.78fr);
            gap:18px;
            align-items:start;
            width:100%;
            max-width:100%;
            margin-top:20px;
        }
        .tournament-list-panel,.tournament-editor-panel{min-width:0;max-width:100%}
        .tournament-editor-panel{position:sticky;top:92px;overflow:hidden}
        .tournament-editor-form{display:flex;flex-direction:column;gap:14px;width:100%;min-width:0}
        .tournament-editor-form .field{display:block;width:100%;min-width:0;max-width:100%;grid-column:auto;margin:0}
        .tournament-editor-form .field input,
        .tournament-editor-form .field select,
        .tournament-editor-form .field textarea{display:block;width:100%;min-width:0;max-width:100%;box-sizing:border-box}
        .tournament-id-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;width:100%;min-width:0}
        .tournament-form-section{display:flex;flex-direction:column;gap:12px;width:100%;min-width:0;padding:14px;border:1px solid #dfe6d8;border-left:4px solid var(--fede-lime,#89bd24);border-radius:6px;background:#fafbf8;box-sizing:border-box}
        .tournament-form-section-header{display:flex;flex-direction:column;gap:2px;margin-bottom:2px}
        .tournament-form-section-header .eyebrow{margin:0}
        .tournament-form-section-header h3{margin:0;color:var(--fede-charcoal,#252822);font-size:15px;font-weight:900}
        .tournament-form-section-header p{margin:2px 0 0;color:var(--muted,#6e756b);font-size:11px;line-height:1.45}
        .tournament-number-list{display:flex;flex-direction:column;gap:11px;width:100%}
        .tournament-number-field{display:grid;grid-template-columns:minmax(150px,1fr) minmax(90px,125px);gap:12px;align-items:center;width:100%;min-width:0}
        .tournament-number-field label{margin:0;color:var(--fede-charcoal,#252822);font-size:13px;font-weight:800}
        .tournament-number-field input{width:100%;min-width:0;max-width:100%;box-sizing:border-box}
        .participant-grid{display:grid;grid-template-columns:repeat(1,minmax(0,1fr));gap:8px;width:100%}
        .participant-card{display:flex;align-items:center;gap:10px;min-width:0;padding:10px 11px;border:1px solid #dfe6d8;border-radius:6px;background:#fff;cursor:pointer;box-sizing:border-box}
        .participant-card input{width:auto!important;flex:0 0 auto;margin:0}
        .participant-card span{display:flex;flex-direction:column;min-width:0}
        .participant-card b{font-size:12px;line-height:1.25}
        .participant-card small{font-size:10px;color:var(--muted,#6e756b);white-space:normal;overflow-wrap:anywhere}
        .venue-summary{display:grid;grid-template-columns:1fr;gap:9px;padding:11px;border-radius:5px;background:#f2f7eb;border-left:4px solid var(--fede-lime,#89bd24)}
        .venue-summary span{font-size:10px;color:var(--muted,#6e756b)}
        .venue-summary strong{font-size:12px;color:var(--fede-charcoal,#252822)}
        .course-option-help{display:block;margin-top:5px;font-size:10px;color:var(--muted,#6e756b);line-height:1.4}
        .tournament-save-button{width:100%;margin-top:2px}
        .tournament-list-panel .table-wrap{max-width:100%}
        .tournament-management-table{width:100%}
        .tournament-management-table td{min-width:0}
        .host-table-name,.course-table-name{display:block;margin-top:5px}
        .participants-table{display:flex;flex-wrap:wrap;gap:4px;margin-top:5px}
        .participant-mini{display:inline-flex;padding:2px 6px;border-radius:999px;background:#edf4e4;border:1px solid #d7e5c7;font-size:9px;font-weight:800;color:#4c6b2a}
        @media(max-width:1380px){
            .tournaments-page-grid{grid-template-columns:minmax(0,1fr)}
            .tournament-editor-panel{position:static;width:100%}
        }
        @media(max-width:700px){
            .tournament-id-grid{grid-template-columns:minmax(0,1fr)}
            .tournament-number-field{grid-template-columns:minmax(0,1fr);gap:5px}
        }

/* ============================================================
   CONSOLIDACIÃ“N RESPONSIVE / NAVEGACIÃ“N MÃ“VIL / TV PÃšBLICA
   Ãšltima capa de estilos. Mantener las vistas JSP sin <style>.
   ============================================================ */

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

img,
svg,
video,
canvas {
    max-width: 100%;
}

.content,
.card,
.grid,
.management-grid,
.table-wrap,
.toolbar,
.page-heading,
.section-head,
.editor-form,
.filter-grid,
.form-row {
    min-width: 0;
}

.table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

input,
select,
textarea,
button {
    max-width: 100%;
}

/* Valores de color dinÃ¡micos. El valor llega mediante data-* y app.js. */
.club-admin-card,
.standing[data-club-color],
.tv-standing[data-club-color] {
    --club-color: var(--fede-green, #5c9424);
}

.standing[data-club-color],
.tv-standing[data-club-color] {
    border-left-color: var(--club-color) !important;
}

.club-color-swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 6px;
    vertical-align: -2px;
    border: 1px solid rgba(0,0,0,.12);
    border-radius: 50%;
}

/* ------------------------------------------------------------
   Topbar y navegaciÃ³n mÃ³vil
   ------------------------------------------------------------ */

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 9px;
    border: 1px solid #dbe5c6;
    border-radius: 6px;
    background: #f7f9f3;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
}

.mobile-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: var(--fede-charcoal, #20211e);
}

.sidebar-backdrop {
    display: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(20, 25, 18, .42);
}

/* ------------------------------------------------------------
   TV
   ------------------------------------------------------------ */

.tv-tournament-meta {
    text-align: right;
}

.tv-tournament-code {
    font-size: 24px;
}

.tv-club-name {
    font-size: 24px;
    font-weight: 800;
}

.tv-body {
    min-width: 0;
}

.tv-top,
.tv-grid,
.tv-panel,
.tv-standing,
.live-match {
    min-width: 0;
}

/* ------------------------------------------------------------
   Utilidad para elementos ocultos por fallback de imagen
   ------------------------------------------------------------ */

[hidden] {
    display: none !important;
}

/* ------------------------------------------------------------
   Tablet
   ------------------------------------------------------------ */

@media (max-width: 1100px) {
    .management-grid,
    .profile-grid {
        grid-template-columns: repeat(12, minmax(0, 1fr));
    }

    .management-grid > .span-8,
    .management-grid > .span-4,
    .profile-grid > .span-8,
    .profile-grid > .span-4 {
        grid-column: 1 / -1;
    }

    .sticky-form {
        position: static !important;
    }

    .filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filter-actions {
        grid-column: 1 / -1;
    }
}

/* ------------------------------------------------------------
   MÃ³vil / menÃº lateral tipo drawer
   ------------------------------------------------------------ */

@media (max-width: 900px) {
    .topbar {
        height: 68px;
        padding: 0 12px;
        z-index: 1100;
    }

    .brand-mark {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
    }

    .brand > div:last-child {
        font-size: 14px;
    }

    .brand small {
        display: block;
        font-size: 9px;
    }

    .season-chip {
        padding: 7px 9px;
        font-size: 9px;
    }

    .mobile-toggle {
        display: inline-flex;
    }

    .layout {
        display: block;
        min-height: calc(100vh - 68px);
    }

    .sidebar {
        display: block !important;
        position: fixed;
        z-index: 1200;
        top: 68px;
        left: 0;
        bottom: 0;
        width: min(82vw, 310px);
        max-width: 310px;
        padding: 18px 14px 30px;
        overflow-y: auto;
        transform: translateX(-105%);
        transition: transform .22s ease;
        box-shadow: 12px 0 30px rgba(0,0,0,.16);
    }

    body.nav-open .sidebar {
        transform: translateX(0);
    }

    .sidebar-backdrop {
        position: fixed;
        z-index: 1150;
        top: 68px;
        right: 0;
        bottom: 0;
        left: 0;
    }

    body.nav-open .sidebar-backdrop {
        display: block;
    }

    body.nav-open {
        overflow: hidden;
    }

    .content {
        width: 100%;
        padding: 14px;
    }

    .page-heading,
    .toolbar.page-heading,
    .section-head,
    .toolbar:not(.topbar) {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
    }

    .page-heading-actions,
    .player-dashboard-actions,
    .club-card-actions,
    .row-actions,
    .filter-actions,
    .score-form-actions,
    .legal-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .page-heading-actions .btn,
    .player-dashboard-actions .btn,
    .filter-actions .btn,
    .filter-actions a,
    .score-form-actions .btn {
        flex: 1 1 150px;
        justify-content: center;
        text-align: center;
    }

    .grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .grid > .span-4,
    .grid > .span-5,
    .grid > .span-6,
    .grid > .span-7,
    .grid > .span-8,
    .grid > .span-12 {
        grid-column: 1;
    }

    .card {
        padding: 16px;
    }

    .hero {
        padding: 22px 20px;
    }

    .hero h1 {
        font-size: clamp(23px, 7vw, 34px);
    }

    .stats-row,
    .filter-grid,
    .check-grid,
    .club-meta-grid,
    .course-summary-grid,
    .captain-team-stats {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    /* Los formularios de gestiÃ³n pasan debajo y ocupan toda la anchura. */
    .players-management-grid,
    .tournaments-page-grid,
    .course-page-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .player-editor-panel,
    .tournament-editor-panel,
    .course-editor {
        position: static !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .tournament-id-grid,
    .tournament-number-field,
    .course-main-fields {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .participant-grid,
    .course-card-grid,
    .course-holes-grid,
    .captain-roster {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    /* Match */
    .match-lineup-banner {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 12px;
    }

    .match-current-score {
        order: -1;
    }

    .match-team {
        min-width: 0;
    }

    .result-entry-table {
        min-width: 680px;
    }

    /* Marcador TV tambiÃ©n es usable desde un mÃ³vil/tablet, aunque su destino sea TV. */
    .tv-top {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
        padding: 14px;
    }

    .tv-tournament-meta {
        text-align: left;
    }

    .tv-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 12px;
        padding: 12px;
    }

    .tv-panel {
        padding: 14px;
    }

    .tv-standing,
    .live-match {
        gap: 10px;
    }

    .tv-club-name {
        font-size: 18px;
    }

    .tv-standing strong,
    .live-result {
        font-size: 22px;
    }
}

@media (max-width: 600px) {
    .topbar-actions {
        gap: 6px;
    }

    .season-chip {
        max-width: 92px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .card,
    .hero,
    .app-footer-card,
    .legal-card {
        border-radius: 6px;
    }

    .content {
        padding: 10px;
    }

    .card {
        padding: 13px;
    }

    .filter-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .filter-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .player-dashboard-actions,
    .page-heading-actions,
    .score-form-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .player-dashboard-actions .btn,
    .page-heading-actions .btn,
    .score-form-actions .btn {
        width: 100%;
    }

    .profile-player-info {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .profile-role-strip,
    .player-dashboard-strip {
        align-items: stretch;
        flex-direction: column;
    }

    .app-footer-card,
    .app-footer-main,
    .app-footer-actions {
        width: 100%;
    }

    .app-footer-actions {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .legal-contact-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .legal-value {
        text-align: left;
    }

    .tv-tournament-code {
        font-size: 20px;
    }

    .tv-standing {
        align-items: flex-start;
    }
}

/* Fallbacks de imagen: visibles cuando no existe logo/avatar o falla la carga. */
.standing-logo-fallback,
.tv-club-logo-fallback,
.club-logo-fallback,
.avatar-fallback,
.match-club-logo-fallback,
.match-player-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========================================================================== */
/* MARCADOR TV V2                                                             */
/* Tema blanco por defecto + tema negro + ficha rotatoria de partidos         */
/* ========================================================================== */

.tv-body {
    --tv-bg: #eef2ec;
    --tv-surface: #ffffff;
    --tv-surface-soft: #f7f9f5;
    --tv-text: #182018;
    --tv-muted: #6d756c;
    --tv-line: #dfe5dc;
    --tv-shadow: 0 12px 32px rgba(26, 42, 22, .10);
    --tv-accent: #5c9424;
    --tv-accent-2: #89bd24;
    margin: 0;
    min-height: 100vh;
    background: var(--tv-bg);
    color: var(--tv-text);
    font-family: Inter, Arial, Helvetica, sans-serif;
    transition: background .25s ease, color .25s ease;
}

.tv-body.tv-theme-dark {
    --tv-bg: #090c09;
    --tv-surface: #121712;
    --tv-surface-soft: #181e18;
    --tv-text: #f4f7f1;
    --tv-muted: #aab3a7;
    --tv-line: #2b342a;
    --tv-shadow: 0 12px 32px rgba(0, 0, 0, .42);
    --tv-accent: #89bd24;
    --tv-accent-2: #a6d94a;
}

.tv-scoreboard-shell {
    width: 100%;
    min-height: 100vh;
    padding: clamp(12px, 1.25vw, 24px);
    display: flex;
    flex-direction: column;
    gap: clamp(10px, 1vw, 18px);
    box-sizing: border-box;
}

.tv-v2-header {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) auto minmax(260px, 1fr);
    align-items: center;
    gap: 18px;
    padding: 10px 14px;
    min-height: 72px;
    border: 1px solid var(--tv-line);
    border-radius: 16px;
    background: var(--tv-surface);
    box-shadow: var(--tv-shadow);
}

.tv-v2-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.tv-v2-brand img {
    width: 58px;
    height: 58px;
    object-fit: contain;
    flex: 0 0 auto;
}

.tv-v2-brand div {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.tv-v2-brand span {
    color: var(--tv-muted);
    font-size: clamp(10px, .8vw, 13px);
    font-weight: 900;
    letter-spacing: .11em;
}

.tv-v2-brand strong {
    overflow: hidden;
    color: var(--tv-text);
    font-size: clamp(17px, 1.45vw, 27px);
    line-height: 1.08;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tv-v2-header-center {
    display: grid;
    grid-template-columns: auto auto;
    align-items: center;
    justify-content: center;
    column-gap: 8px;
    color: var(--tv-text);
    font-size: clamp(11px, .8vw, 14px);
    font-weight: 900;
    letter-spacing: .08em;
}

.tv-v2-header-center small {
    grid-column: 1 / -1;
    margin-top: 2px;
    color: var(--tv-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0;
    text-align: center;
}

.tv-v2-live-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #e33d3d;
    box-shadow: 0 0 0 5px rgba(227, 61, 61, .12);
    animation: tvLivePulse 1.8s infinite;
}

@keyframes tvLivePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .45; }
}

.tv-theme-switch {
    justify-self: end;
    display: flex;
    gap: 6px;
    padding: 4px;
    border: 1px solid var(--tv-line);
    border-radius: 999px;
    background: var(--tv-surface-soft);
}

.tv-theme-btn {
    border: 0;
    border-radius: 999px;
    padding: 8px 12px;
    background: transparent;
    color: var(--tv-muted);
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.tv-theme-btn.is-active {
    background: var(--tv-text);
    color: var(--tv-surface);
}

.tv-overview {
    display: grid;
    grid-template-columns: minmax(300px, .72fr) minmax(0, 1.7fr);
    gap: clamp(10px, 1vw, 18px);
    align-items: stretch;
}

.tv-v2-panel {
    min-width: 0;
    border: 1px solid var(--tv-line);
    border-radius: 16px;
    background: var(--tv-surface);
    box-shadow: var(--tv-shadow);
}

.tv-standings-panel,
.tv-results-panel {
    padding: clamp(12px, 1vw, 18px);
}

.tv-v2-panel-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 10px;
}

.tv-v2-panel-head h1,
.tv-detail-stage-head h2 {
    margin: 2px 0 0;
    color: var(--tv-text);
    font-size: clamp(18px, 1.45vw, 27px);
    line-height: 1.08;
}

.tv-v2-panel-head > small,
.tv-detail-stage-head small {
    color: var(--tv-muted);
    font-size: 11px;
    white-space: nowrap;
}

.tv-v2-kicker {
    color: var(--tv-accent);
    font-size: clamp(9px, .65vw, 11px);
    font-weight: 950;
    letter-spacing: .12em;
}

.tv-v2-standings-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.tv-v2-standing {
    --club-color: var(--tv-accent);
    display: grid;
    grid-template-columns: 32px 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border: 1px solid var(--tv-line);
    border-left: 5px solid var(--club-color);
    border-radius: 10px;
    background: var(--tv-surface-soft);
}

.tv-v2-position {
    color: var(--tv-muted);
    font-size: 14px;
    font-weight: 950;
    text-align: center;
}

.tv-v2-standing .tv-club-logo-wrap {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border: 1px solid var(--tv-line);
    border-radius: 8px;
    background: #fff;
}

.tv-v2-standing-name {
    min-width: 0;
}

.tv-v2-standing-name strong,
.tv-v2-standing-name small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tv-v2-standing-name strong {
    color: var(--tv-text);
    font-size: clamp(13px, 1vw, 17px);
}

.tv-v2-standing-name small {
    margin-top: 2px;
    color: var(--tv-muted);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .07em;
}

.tv-v2-standing-points {
    min-width: 50px;
    color: var(--tv-text);
    font-size: clamp(22px, 1.7vw, 31px);
    font-weight: 950;
    text-align: right;
}

.tv-live-results-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
}

.tv-live-result-card {
    --club-color: transparent;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid var(--tv-line);
    border-radius: 10px;
    background: var(--tv-surface-soft);
    transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

/* Si el partido tiene ganador o lÃ­der provisional, toda la ficha toma
   suavemente el color del club. El texto sigue usando los colores del tema. */
.tv-live-result-card[data-club-color]:not([data-club-color=""]) {
    border-color: var(--club-color);
    border-left: 6px solid var(--club-color);
    background: color-mix(in srgb, var(--club-color) 15%, var(--tv-surface));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--club-color) 24%, transparent);
}

.tv-live-result-card.is-provisional[data-club-color]:not([data-club-color=""]) {
    background: color-mix(in srgb, var(--club-color) 11%, var(--tv-surface));
}

.tv-live-result-card.is-provisional:not([data-club-color]),
.tv-live-result-card.is-provisional[data-club-color=""] {
    border-left: 4px solid #d99a1f;
}

.tv-live-result-card.is-final:not([data-club-color]),
.tv-live-result-card.is-final[data-club-color=""] {
    border-left: 4px solid var(--tv-accent);
}

.tv-live-result-meta,
.tv-live-result-clubs {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.tv-live-result-meta span,
.tv-live-result-meta b {
    font-size: 9px;
    font-weight: 950;
    letter-spacing: .06em;
}

.tv-live-result-meta span {
    color: var(--tv-muted);
}

.tv-live-result-card.is-provisional .tv-live-result-meta b {
    color: #c78300;
}

.tv-live-result-card.is-final .tv-live-result-meta b {
    color: var(--tv-accent);
}

.tv-live-result-clubs {
    justify-content: flex-start;
    margin-top: 4px;
    color: var(--tv-text);
    font-size: clamp(11px, .85vw, 14px);
    font-weight: 900;
}

.tv-live-result-clubs small {
    color: var(--tv-muted);
    font-size: 9px;
}

.tv-live-result-value {
    display: block;
    margin-top: 3px;
    overflow: hidden;
    color: var(--tv-text);
    font-size: clamp(15px, 1.1vw, 20px);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tv-results-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 96px;
    padding: 18px;
    border: 1px dashed var(--tv-line);
    border-radius: 12px;
    color: var(--tv-muted);
    text-align: center;
}

.tv-results-empty strong {
    color: var(--tv-text);
    font-size: 18px;
}

.tv-detail-stage {
    flex: 1 1 auto;
    min-height: 0;
    padding: clamp(12px, 1vw, 18px);
}

.tv-detail-stage-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 10px;
}

.tv-rotation-status {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tv-rotation-counter {
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--tv-surface-soft);
    color: var(--tv-text);
    font-size: 12px;
    font-weight: 900;
}

.tv-carousel {
    min-height: 0;
}

.tv-match-detail {
    --club-color: transparent;
    display: none;
    min-width: 0;
    border: 2px solid var(--tv-line);
    border-radius: 14px;
    background: var(--tv-surface-soft);
    overflow: hidden;
}

.tv-match-detail.is-active {
    display: block;
    animation: tvCardIn .35s ease both;
}

/* Tanto el ganador final como el lÃ­der provisional colorean la ficha.
   En empate o partido pendiente no hay color dominante. */
.tv-match-detail[data-club-color]:not([data-club-color=""]) {
    border-color: var(--club-color);
    background: color-mix(in srgb, var(--club-color) 8%, var(--tv-surface-soft));
    box-shadow: inset 0 7px 0 var(--club-color);
}

.tv-match-detail.is-progress[data-club-color]:not([data-club-color=""]) {
    box-shadow: inset 0 5px 0 var(--club-color);
}

.tv-match-detail[data-club-color]:not([data-club-color=""]) .tv-match-score-center {
    background: color-mix(in srgb, var(--club-color) 13%, var(--tv-surface));
}

.tv-match-detail[data-club-color]:not([data-club-color=""]) .tv-match-number {
    background: color-mix(in srgb, var(--club-color) 8%, var(--tv-surface));
}

@keyframes tvCardIn {
    from { opacity: .3; transform: translateY(7px); }
    to { opacity: 1; transform: translateY(0); }
}

.tv-match-detail-top {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) minmax(210px, .62fr) minmax(0, 1fr);
    align-items: stretch;
    min-width: 0;
}

.tv-match-number {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 12px 8px;
    border-right: 1px solid var(--tv-line);
    background: var(--tv-surface);
}

.tv-match-number span,
.tv-match-number small {
    color: var(--tv-muted);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .08em;
}

.tv-match-number strong {
    color: var(--tv-text);
    font-size: clamp(32px, 2.7vw, 48px);
    line-height: 1;
}

.tv-match-side {
    --club-color: var(--tv-accent);
    padding: 10px 14px;
    min-width: 0;
    border-top: 4px solid var(--club-color);
    background: var(--tv-surface-soft);
}

.tv-match-side-a {
    border-right: 1px solid var(--tv-line);
}

.tv-match-side-b {
    border-left: 1px solid var(--tv-line);
}

.tv-match-club-title {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    margin-bottom: 8px;
}

.tv-match-club-logo {
    width: 72px;
    height: 72px;
    min-width: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--tv-line);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

.tv-match-club-logo img {
    width: 100%;
    height: 100%;
    padding: 4px;
    object-fit: contain;
    box-sizing: border-box;
}

.tv-match-club-logo span {
    color: #5c9424;
    font-size: 18px;
    font-weight: 950;
}

.tv-match-club-title > div:last-child {
    min-width: 0;
}

.tv-match-club-title small {
    color: var(--tv-muted);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .08em;
}

.tv-match-club-title h3 {
    margin: 1px 0 0;
    overflow: hidden;
    color: var(--tv-text);
    font-size: clamp(17px, 1.3vw, 24px);
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tv-match-player-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tv-match-player {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.tv-player-avatar {
    width: 54px;
    height: 54px;
    min-width: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--club-color);
    border-radius: 50%;
    background: var(--tv-surface);
    overflow: hidden;
}

.tv-player-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tv-player-avatar span {
    color: var(--tv-text);
    font-size: 13px;
    font-weight: 950;
}

.tv-match-player > div:last-child {
    min-width: 0;
}

.tv-match-player strong,
.tv-match-player small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tv-match-player strong {
    color: var(--tv-text);
    font-size: clamp(14px, 1.05vw, 19px);
}

.tv-match-player small {
    margin-top: 1px;
    color: var(--tv-muted);
    font-size: 10px;
    font-weight: 850;
}

.tv-match-score-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px;
    background: var(--tv-surface);
    text-align: center;
}

.tv-match-status-label {
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 950;
    letter-spacing: .09em;
}

.tv-match-status-label.is-final {
    background: rgba(92, 148, 36, .13);
    color: var(--tv-accent);
}

.tv-match-status-label.is-provisional {
    background: rgba(217, 154, 31, .15);
    color: #bd7c00;
}

.tv-match-status-label.is-pending {
    background: var(--tv-surface-soft);
    color: var(--tv-muted);
}

.tv-match-score-center > strong {
    color: var(--tv-text);
    font-size: clamp(23px, 2vw, 36px);
    line-height: 1;
}

.tv-match-score-center > small {
    color: var(--tv-muted);
    font-size: 9px;
}

.tv-hole-board {
    padding: 9px 11px 11px;
    border-top: 1px solid var(--tv-line);
    background: var(--tv-surface);
}

.tv-hole-board-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 7px;
}

.tv-hole-board-head > span {
    color: var(--tv-text);
    font-size: 10px;
    font-weight: 950;
    letter-spacing: .08em;
}

.tv-hole-board-head small {
    color: var(--tv-muted);
    font-size: 9px;
}

.tv-hole-legend-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin: 0 3px;
    border-radius: 50%;
    vertical-align: middle;
}

.tv-hole-legend-dot.is-winner {
    background: var(--tv-accent);
}

.tv-hole-legend-dot.is-tied {
    background: #9ca49a;
}

.tv-hole-grid {
    display: grid;
    grid-template-columns: repeat(18, minmax(0, 1fr));
    gap: 4px;
}

.tv-hole-cell {
    --club-color: var(--tv-accent);
    min-width: 0;
    padding: 5px 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border: 1px solid var(--tv-line);
    border-radius: 7px;
    background: var(--tv-surface-soft);
    text-align: center;
}

.tv-hole-cell > span {
    color: var(--tv-muted);
    font-size: 8px;
    font-weight: 950;
}

.tv-hole-cell > strong {
    color: var(--tv-text);
    font-size: clamp(10px, .72vw, 13px);
    line-height: 1;
    white-space: nowrap;
}

.tv-hole-cell > small {
    width: 100%;
    overflow: hidden;
    color: var(--tv-muted);
    font-size: 7px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tv-hole-cell.is-won {
    border-color: var(--club-color);
    background: var(--tv-surface);
    box-shadow: inset 0 3px 0 var(--club-color);
}

.tv-hole-cell.is-won > small {
    color: var(--club-color);
}

.tv-hole-cell.is-tied {
    border-color: #aab1a8;
    background: var(--tv-surface-soft);
}

.tv-hole-cell.is-partial {
    border-style: dashed;
}

.tv-v2-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 4px;
    color: var(--tv-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .04em;
}

@media (max-width: 1500px) {
    .tv-live-results-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tv-hole-grid {
        grid-template-columns: repeat(9, minmax(0, 1fr));
    }
}

@media (max-width: 1050px) {
    .tv-v2-header {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .tv-v2-header-center {
        display: none;
    }

    .tv-overview {
        grid-template-columns: 1fr;
    }

    .tv-match-detail-top {
        grid-template-columns: 76px minmax(0, 1fr) minmax(170px, .55fr) minmax(0, 1fr);
    }
}

@media (max-width: 760px) {
    .tv-body {
        overflow: auto;
    }

    .tv-scoreboard-shell {
        padding: 8px;
    }

    .tv-v2-header {
        grid-template-columns: 1fr;
        border-radius: 12px;
    }

    .tv-theme-switch {
        justify-self: stretch;
        justify-content: center;
    }

    .tv-v2-brand strong {
        white-space: normal;
    }

    .tv-live-results-grid {
        grid-template-columns: 1fr;
    }

    .tv-detail-stage-head,
    .tv-v2-panel-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .tv-match-detail-top {
        grid-template-columns: 1fr;
    }

    .tv-match-number,
    .tv-match-side-a,
    .tv-match-side-b {
        border: 0;
        border-bottom: 1px solid var(--tv-line);
    }

    .tv-match-number {
        flex-direction: row;
        gap: 7px;
    }

    .tv-match-number strong {
        font-size: 28px;
    }

    .tv-match-club-logo {
        width: 60px;
        height: 60px;
        min-width: 60px;
    }

    .tv-player-avatar {
        width: 48px;
        height: 48px;
        min-width: 48px;
    }

    .tv-hole-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .tv-hole-board-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .tv-v2-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* =============================================================
   IDIOMAS / I18N
   ============================================================= */
.language-switch{display:inline-flex;align-items:center;gap:3px;padding:3px;border:1px solid rgba(92,148,36,.28);border-radius:999px;background:rgba(255,255,255,.72);white-space:nowrap}
.language-switch a{display:flex;align-items:center;justify-content:center;min-width:34px;height:28px;padding:0 8px;border-radius:999px;color:inherit;text-decoration:none;font-size:11px;font-weight:900;letter-spacing:.05em;transition:.15s ease}
.language-switch a:hover{background:rgba(137,189,36,.12)}
.language-switch a.is-active{background:var(--fede-green,#5c9424);color:#fff}
.language-switch-login{position:absolute;top:14px;right:14px;z-index:2}
.public-language-switch{position:fixed;top:14px;right:14px;z-index:1000;box-shadow:0 4px 18px rgba(0,0,0,.08)}
.tv-page.theme-dark .language-switch{background:rgba(20,20,20,.78);border-color:rgba(255,255,255,.2)}
.tv-page.theme-dark .language-switch a{color:#fff}
@media(max-width:700px){.topbar-actions .language-switch{order:1}.season-chip{display:none}.language-switch-login{top:10px;right:10px}.public-language-switch{top:8px;right:8px}.language-switch a{min-width:32px;height:27px}}

/* =============================================================
   FLUJO DE TORNEO / ALINEACIONES PRIVADAS / DATOS DE SALIDA
   ============================================================= */
.privacy-banner{display:flex;align-items:flex-start;gap:12px;margin:14px 0;padding:13px 15px;border:1px solid #dfe6d8;border-left:4px solid var(--fede-lime,#89bd24);border-radius:8px;background:#fafcf7;box-sizing:border-box}.privacy-banner.is-public{border-left-color:var(--fede-green,#5c9424)}.privacy-banner>div{display:flex;flex-direction:column;gap:3px;min-width:0}.privacy-banner span:not(.badge){font-size:12px;color:#677064;line-height:1.45}.private-lineup{display:inline-block;font-style:normal;font-size:11px;font-weight:800;color:#7b8176;background:#f0f2ed;border:1px dashed #cbd2c4;border-radius:5px;padding:3px 6px}.match-start-mini{display:flex;flex-direction:column;gap:2px;white-space:nowrap}.match-start-mini small,.match-start-line{color:#687064;font-size:11px}.lineup-match-summary{padding:12px;margin-bottom:14px;border:1px solid #dfe6d8;border-radius:7px;background:#fafbf8}.lineup-match-summary h3{margin:8px 0 4px}.lineup-match-summary p{margin:4px 0}.pair-only.is-hidden{display:none!important}.player-license{display:block;margin-top:2px;color:#737a70;font-size:10px}.profile-license{font-size:15px;overflow-wrap:anywhere}.match-start-summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;margin:10px 0;border-radius:7px;background:#f6f8f3}.match-start-summary span{font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:#687064;font-weight:800}.match-start-summary strong{font-size:13px}.tv-match-start{display:block;margin-top:4px!important;white-space:nowrap}.tv-lineups-private{display:flex;flex-direction:column;justify-content:center;gap:5px;min-height:92px;padding:12px;border:1px dashed currentColor;border-radius:10px;opacity:.75}.tv-lineups-private strong{font-size:14px;text-transform:uppercase}.tv-lineups-private small{font-size:11px;line-height:1.35}.tournament-numbers-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.match-management-table{min-width:980px}

@media(max-width:1100px){.tournament-numbers-grid{grid-template-columns:1fr 1fr}.match-management-table{min-width:900px}}
@media(max-width:700px){.privacy-banner{flex-direction:column}.tournament-numbers-grid{grid-template-columns:1fr}.match-start-summary{align-items:flex-start;flex-direction:column}.tv-lineups-private{min-height:70px}.tv-match-start{white-space:normal}}

/* ============================================================
   IMPORTACIÃ“N MASIVA DE JUGADORES
   ============================================================ */
.player-import-card {
    margin-top: 18px;
}

.player-import-form {
    display: grid;
    grid-template-columns: minmax(180px, .8fr) minmax(260px, 1.25fr) minmax(220px, .95fr);
    gap: 14px;
    align-items: end;
}

.player-import-form .field {
    min-width: 0;
}

.player-import-form input,
.player-import-form select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.player-import-form input[type="file"] {
    overflow: hidden;
}

.player-import-actions {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 14px;
}

.player-import-actions .muted {
    font-size: 12px;
}

.player-import-result {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(240px, .6fr);
    gap: 18px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #e0e6da;
}

.player-import-result h3 {
    margin: 0 0 9px;
    font-size: 14px;
}

.import-credentials-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.import-credential-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid #e1e7db;
    border-radius: 5px;
    background: #fafcf8;
}

.import-credential-row span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.import-credential-row strong {
    flex: 0 0 auto;
    color: var(--fede-green, #5c9424);
}

.import-skipped {
    padding: 10px 12px;
    border: 1px solid #eaded4;
    border-radius: 6px;
    background: #fffaf6;
}

.import-skipped > div {
    padding: 3px 0;
    font-size: 12px;
    color: var(--muted, #6e756b);
}

@media (max-width: 1050px) {
    .player-import-form {
        grid-template-columns: 1fr 1fr;
    }

    .player-import-form .field:nth-of-type(2) {
        grid-column: 1 / -1;
    }

    .player-import-result {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .player-import-form,
    .import-credentials-grid {
        grid-template-columns: 1fr;
    }

    .player-import-form .field:nth-of-type(2) {
        grid-column: auto;
    }

    .player-import-actions .btn {
        width: 100%;
    }
}

/* ============================================================
   SUITE FEDERATIVA - FLUJO OFICIAL / DASHBOARD / PÃšBLICO
   ============================================================ */

.badge-warning {
    background: #fff3c4;
    color: #765b00;
    border-color: #e6cc63;
}

.privacy-banner.is-closed {
    border-left-color: #c6a000;
    background: #fffcf0;
}

/* ---- Control de alineaciones y generador de programa ---- */
.admin-lineup-control {
    margin: 16px 0;
    padding: 18px;
}

.lineup-control-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.lineup-control-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lineup-control-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    padding: 13px 14px;
    overflow: hidden;
    border: 1px solid #dfe6d9;
    border-left: 5px solid var(--club-color, var(--fede-lime, #89bd24));
    border-radius: 8px;
    background: #fff;
}

.lineup-control-card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, color-mix(in srgb, var(--club-color, #89bd24) 10%, transparent), transparent 55%);
}

.lineup-control-card > * {
    position: relative;
    z-index: 1;
}

.lineup-control-card > div {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.lineup-control-card b {
    overflow-wrap: anywhere;
    font-size: 14px;
}

.lineup-control-card span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
}

.lineup-control-card > strong {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    border-radius: 50%;
    font-size: 14px;
}

.lineup-control-card.is-complete > strong {
    color: #fff;
    background: var(--fede-green, #5c9424);
}

.lineup-control-card.is-pending > strong {
    color: #6d5700;
    background: #fff0a8;
}

.program-generator-form {
    display: grid;
    grid-template-columns: minmax(150px, .8fr) minmax(140px, .7fr) minmax(120px, .6fr) minmax(210px, 1fr);
    gap: 12px;
    align-items: end;
    margin-top: 14px;
}

.program-generator-form .field,
.program-generator-form .check-card {
    min-width: 0;
    margin: 0;
}

.program-generator-form .btn-block {
    grid-column: 1 / -1;
}

/* ---- Dashboard ADMIN del dÃ­a de torneo ---- */
.admin-day-dashboard {
    margin: 20px 0;
    padding: 20px;
    border: 1px solid #dce5d6;
    border-top: 4px solid var(--fede-green, #5c9424);
    border-radius: 10px;
    background: linear-gradient(180deg, #fff, #fbfdf9);
    box-shadow: 0 8px 28px rgba(32, 66, 28, .07);
}

.admin-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 16px 0;
}

.admin-kpi {
    padding: 13px 15px;
    border: 1px solid #dfe6da;
    border-radius: 8px;
    background: #fff;
}

.admin-kpi span {
    display: block;
    color: var(--muted);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .07em;
}

.admin-kpi strong {
    display: block;
    margin-top: 4px;
    font-size: 27px;
    line-height: 1;
}

.admin-kpi.is-live {
    border-color: #d7c4cf;
    background: #fff9fc;
}

.admin-kpi.is-live strong {
    color: var(--alava, #b0004b);
}

.admin-kpi.is-finished {
    border-color: #d4e3c8;
    background: #f8fcf4;
}

.admin-kpi.is-finished strong {
    color: var(--fede-green, #5c9424);
}

.admin-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
}

.admin-dashboard-grid > .card {
    margin: 0;
    box-shadow: none;
}

.audit-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.audit-item {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid #edf0ea;
}

.audit-item:last-child {
    border-bottom: 0;
}

.audit-item time {
    color: var(--muted);
    font-size: 10px;
    font-variant-numeric: tabular-nums;
}

.audit-item > div {
    min-width: 0;
}

.audit-item b,
.audit-item span {
    display: block;
    overflow-wrap: anywhere;
}

.audit-item b {
    font-size: 12px;
}

.audit-item span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
}

.live-standings-card {
    background: linear-gradient(145deg, #fff, #f8fbf5);
}

.live-ranking-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.live-ranking-item {
    display: grid;
    grid-template-columns: 30px 40px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid #dfe6da;
    border-top: 4px solid var(--club-color, var(--fede-lime, #89bd24));
    border-radius: 8px;
    background: #fff;
}

.live-ranking-item > span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
}

.live-ranking-item img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.live-ranking-item b {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 12px;
}

.live-ranking-item strong {
    font-size: 20px;
}

.dashboard-match-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.dashboard-match-card {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto 56px;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid #e0e7db;
    border-radius: 8px;
    background: #fff;
    transition: border-color .15s ease, transform .15s ease;
}

.dashboard-match-card:hover {
    border-color: #c7d8b9;
    transform: translateY(-1px);
}

.dashboard-match-card > div {
    min-width: 0;
}

.dashboard-match-card small,
.dashboard-match-card b {
    display: block;
    overflow-wrap: anywhere;
}

.dashboard-match-card small {
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 10px;
}

.dashboard-match-card b {
    font-size: 12px;
}

.dashboard-match-card > strong {
    text-align: right;
}

/* ---- AuditorÃ­a completa ---- */
.audit-full-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.audit-full-item {
    display: grid;
    grid-template-columns: 155px minmax(160px, .75fr) minmax(135px, .55fr) minmax(0, 1.7fr);
    gap: 14px;
    align-items: start;
    padding: 14px 4px;
    border-bottom: 1px solid #e7ece3;
}

.audit-full-item:last-child {
    border-bottom: 0;
}

.audit-full-item time {
    color: var(--muted);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

.audit-full-item b,
.audit-full-item strong,
.audit-full-item small {
    display: block;
}

.audit-full-item small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
}

.audit-full-item p {
    margin: 0;
    color: #4f5951;
    font-size: 12px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

/* ---- PÃ¡gina pÃºblica ---- */
.public-tournament-body {
    min-height: 100vh;
    background: #f3f6f1;
}

.public-shell {
    width: min(1420px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
}

.public-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 22px;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(115deg, #13291d, #2e6d35 70%, #5c9424);
}

.public-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.public-brand img {
    width: 70px;
    height: 70px;
    flex: 0 0 70px;
    padding: 5px;
    object-fit: contain;
    border-radius: 9px;
    background: #fff;
}

.public-brand > div {
    min-width: 0;
}

.public-brand span {
    display: block;
    margin-bottom: 4px;
    color: #cce8aa;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .09em;
}

.public-brand h1,
.public-brand p {
    margin: 0;
}

.public-brand h1 {
    font-size: clamp(23px, 3vw, 38px);
    overflow-wrap: anywhere;
}

.public-brand p {
    margin-top: 5px;
    color: #e3eee0;
}

.public-top-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.public-live-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 14px 0;
}

.public-panel {
    min-width: 0;
    padding: 18px;
    border: 1px solid #dfe6da;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 5px 20px rgba(35, 61, 29, .05);
}

.public-panel h2 {
    margin: 5px 0 10px;
}

.public-live-panel {
    border-top: 4px solid var(--alava, #b0004b);
}

.public-standings {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.public-standing {
    display: grid;
    grid-template-columns: 28px 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid #e2e8de;
    border-left: 4px solid var(--club-color, #89bd24);
    border-radius: 7px;
}

.public-standing img {
    width: 38px;
    height: 38px;
    object-fit: contain;
}

.public-standing b {
    min-width: 0;
    overflow-wrap: anywhere;
}

.public-standing strong {
    font-size: 20px;
}

.public-match-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.public-match-card {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) minmax(100px, auto);
    gap: 14px;
    align-items: center;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid #dfe6da;
    border-left: 4px solid #cfd7c9;
    border-radius: 8px;
    background: #fff;
}

.public-match-card.is-live {
    border-left-color: var(--alava, #b0004b);
    background: #fffafd;
}

.public-match-time {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-right: 10px;
    border-right: 1px solid #e5e9e1;
}

.public-match-time b {
    font-size: 17px;
}

.public-match-time small {
    margin-top: 3px;
    color: var(--muted);
}

.public-match-copy {
    min-width: 0;
}

.public-match-copy h3,
.public-match-copy p {
    margin: 5px 0 0;
    overflow-wrap: anywhere;
}

.public-match-copy h3 span,
.public-match-copy p span {
    color: var(--muted);
    font-weight: 400;
}

.public-match-result {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 7px;
}

.public-match-result > strong {
    font-size: 20px;
}

.public-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 15px;
    padding: 14px 4px;
    color: var(--muted);
    font-size: 11px;
}

/* ---- Starting List oficial / imprimible ---- */
.starting-list-body {
    background: #eef2ec;
}

.starting-shell {
    width: min(1200px, calc(100% - 32px));
    margin: 20px auto;
    padding: 24px;
    border: 1px solid #d9e1d4;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 8px 28px rgba(23, 53, 22, .08);
}

.starting-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 16px;
    border-bottom: 3px solid var(--fede-green, #5c9424);
}

.starting-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.starting-brand img {
    width: 72px;
    height: 72px;
    flex: 0 0 72px;
    object-fit: contain;
}

.starting-brand span {
    color: var(--fede-green, #5c9424);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .09em;
}

.starting-brand h1,
.starting-brand p {
    margin: 3px 0 0;
}

.starting-actions {
    display: flex;
    align-items: center;
    gap: 9px;
}

.starting-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    padding: 14px 2px;
    color: #4e5b51;
    font-size: 12px;
}

.starting-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.starting-table th,
.starting-table td {
    padding: 10px 9px;
    border-bottom: 1px solid #e1e7dd;
    text-align: left;
    vertical-align: top;
}

.starting-table th {
    color: #fff;
    background: #1c2a20;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .05em;
}

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

.starting-footer {
    margin-top: 18px;
    padding-top: 10px;
    border-top: 1px solid #dfe5da;
    color: var(--muted);
    text-align: center;
    font-size: 10px;
}

/* ---- TV: clasificaciÃ³n virtual mÃ¡s visible ---- */
.tv-live-projection {
    display: grid;
    grid-template-columns: minmax(260px, .45fr) minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    margin: 14px 0;
    padding: 15px 18px;
    border: 1px solid var(--tv-border, #dbe2d7);
    border-left: 6px solid var(--alava, #b0004b);
    border-radius: 12px;
    background: var(--tv-panel, #fff);
}

.tv-live-projection-title {
    min-width: 0;
}

.tv-live-projection-title strong,
.tv-live-projection-title span,
.tv-live-projection-help {
    display: block;
}

.tv-live-projection-title span {
    color: var(--alava, #b0004b);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .1em;
}

.tv-live-projection-title strong {
    margin-top: 4px;
    font-size: clamp(20px, 2.4vw, 34px);
}

.tv-live-projection-help {
    margin-top: 4px;
    color: var(--tv-muted, #6c746c);
    font-size: 11px;
}

.tv-live-projection-ranking {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.tv-live-rank {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 9px 11px;
    border: 1px solid var(--tv-border, #dbe2d7);
    border-top: 4px solid var(--club-color, #89bd24);
    border-radius: 8px;
}

.tv-live-rank b {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 12px;
}

.tv-live-rank strong {
    font-size: 22px;
}

.tv-theme-dark .tv-live-projection {
    --tv-panel: #171b18;
    --tv-border: #343c35;
    --tv-muted: #adb6ae;
}

/* ---- Responsive suite federativa ---- */
@media (max-width: 1100px) {
    .lineup-control-grid,
    .live-ranking-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-dashboard-grid,
    .public-live-grid {
        grid-template-columns: 1fr;
    }

    .program-generator-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-match-grid {
        grid-template-columns: 1fr;
    }

    .audit-full-item {
        grid-template-columns: 135px minmax(0, .8fr) minmax(0, 1.3fr);
    }

    .audit-full-item p {
        grid-column: 2 / -1;
    }

    .tv-live-projection {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .admin-day-dashboard,
    .public-panel,
    .starting-shell {
        padding: 14px;
    }

    .admin-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lineup-control-grid,
    .lineup-control-grid.compact,
    .live-ranking-grid,
    .tv-live-projection-ranking {
        grid-template-columns: 1fr;
    }

    .program-generator-form {
        grid-template-columns: 1fr;
    }

    .public-shell,
    .starting-shell {
        width: min(100% - 16px, 100%);
        margin-top: 8px;
    }

    .public-hero,
    .starting-head {
        flex-direction: column;
        align-items: stretch;
    }

    .public-top-actions,
    .starting-actions {
        justify-content: flex-start;
    }

    .public-brand img,
    .starting-brand img {
        width: 56px;
        height: 56px;
        flex-basis: 56px;
    }

    .public-match-card {
        grid-template-columns: 58px minmax(0, 1fr);
    }

    .public-match-result {
        grid-column: 1 / -1;
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;
    }

    .audit-item,
    .audit-full-item {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .audit-full-item p {
        grid-column: auto;
    }

    .dashboard-match-card {
        grid-template-columns: 38px minmax(0, 1fr) auto;
    }

    .dashboard-match-card > strong {
        grid-column: 2 / -1;
        text-align: left;
    }

    .starting-shell {
        overflow-x: auto;
    }

    .starting-table {
        min-width: 760px;
    }
}

@media print {
    .starting-list-body {
        background: #fff !important;
    }

    .starting-shell {
        width: 100%;
        margin: 0;
        padding: 0;
        border: 0;
        box-shadow: none;
    }

    .no-print,
    .language-switch {
        display: none !important;
    }

    .starting-table {
        font-size: 10px;
    }

    .starting-table th {
        color: #000 !important;
        background: #e8ece5 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* ==========================================================================
   21. MARCADOR TV V5 - RESPONSIVE FINAL
   ==========================================================================
   Esta es la capa autoritativa de tv.jsp.

   Reglas de diseÃ±o:
   - >= 1101 px: modo marcador/TV a pantalla completa, SIN scroll.
   - <= 1100 px: modo tablet/mÃ³vil, layout fluido con scroll vertical.
   - No hay estilos embebidos en tv.jsp.
   - Los colores de club llegan mediante data-club-color y app.js establece
     la variable CSS --club-color.
   ========================================================================== */

.tv-body {
    width: 100%;
    min-width: 0;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
}

.tv-scoreboard-shell,
.tv-v2-header,
.tv-overview,
.tv-v2-panel,
.tv-standings-panel,
.tv-results-panel,
.tv-detail-stage,
.tv-carousel,
.tv-match-detail,
.tv-match-detail-top,
.tv-match-side,
.tv-standings-fusion,
.tv-standing-fusion-row,
.tv-standing-club,
.tv-standing-club-name,
.tv-live-results-grid,
.tv-live-result-card {
    min-width: 0;
}

/* El selector de idioma forma parte visualmente de la cabecera, pero no
   altera la rejilla principal. */
.tv-scoreboard-shell {
    position: relative;
}

.tv-scoreboard-shell > .public-language-switch {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 30;
}

/* --------------------------------------------------------------------------
   CLASIFICACIÃ“N FUSIONADA
   Un solo club por fila: posiciÃ³n proyectada + oficial + proyecciÃ³n.
   -------------------------------------------------------------------------- */

.tv-standings-panel {
    display: flex;
    flex-direction: column;
}

.tv-standings-fusion {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 7px;
    min-height: 0;
    overflow: hidden;
}

.tv-standings-fusion-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 74px 112px;
    gap: 8px;
    align-items: end;
    flex: 0 0 auto;
    padding: 0 8px 3px;
    color: var(--tv-muted);
    font-size: 9px;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.tv-standings-fusion-head span:nth-child(2),
.tv-standings-fusion-head span:nth-child(3) {
    text-align: center;
}

.tv-standing-fusion-row {
    --club-color: var(--tv-accent);
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 74px 112px;
    gap: 8px;
    align-items: center;
    flex: 1 1 0;
    min-height: 0;
    padding: 7px 8px;
    overflow: hidden;
    border: 1px solid var(--tv-line);
    border-left: 5px solid var(--club-color);
    border-radius: 10px;
    background: var(--tv-surface-soft);
}

.tv-standing-fusion-row::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .07;
    background: linear-gradient(
        90deg,
        var(--club-color) 0,
        transparent 42%
    );
}

.tv-standing-club {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 30px 54px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
}

.tv-standing-live-pos {
    color: var(--tv-text);
    font-size: 15px;
    font-weight: 950;
    text-align: center;
    white-space: nowrap;
}

.tv-standing-club .tv-match-club-logo {
    width: 54px;
    height: 42px;
    min-width: 54px;
    border-radius: 8px;
}

.tv-standing-club .tv-match-club-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.tv-standing-club-name {
    display: flex;
    flex-direction: column;
}

.tv-standing-club-name strong,
.tv-standing-club-name small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tv-standing-club-name strong {
    color: var(--tv-text);
    font-size: 14px;
    line-height: 1.05;
}

.tv-standing-club-name small {
    margin-top: 3px;
    color: var(--tv-muted);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .05em;
}

.tv-standing-metric {
    position: relative;
    z-index: 1;
    display: flex;
    min-width: 0;
    height: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    text-align: center;
}

.tv-standing-metric small {
    color: var(--tv-muted);
    font-size: 8px;
    font-weight: 900;
    line-height: 1;
}

.tv-standing-metric strong {
    margin-top: 3px;
    color: var(--tv-text);
    font-size: 19px;
    line-height: 1;
}

.tv-standing-metric.is-live {
    border: 1px solid color-mix(in srgb, var(--tv-accent) 35%, var(--tv-line));
    background: color-mix(in srgb, var(--tv-accent) 10%, var(--tv-surface));
}

.tv-standing-metric.is-live small {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--tv-accent);
}

.tv-standing-metric .tv-v2-live-dot {
    width: 6px;
    height: 6px;
    min-width: 6px;
    box-shadow: 0 0 0 3px rgba(227, 61, 61, .10);
}

/* --------------------------------------------------------------------------
   RESULTADOS RESUMIDOS
   -------------------------------------------------------------------------- */

.tv-results-panel {
    display: flex;
    flex-direction: column;
}

.tv-live-results-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(0, 1fr));
    flex: 1 1 auto;
    gap: 7px;
    min-height: 0;
    overflow: hidden;
}

.tv-live-result-card {
    display: flex;
    min-height: 0;
    flex-direction: column;
    justify-content: center;
    padding: 7px 10px;
    overflow: hidden;
}

.tv-live-result-meta {
    margin-bottom: 3px;
}

.tv-live-result-meta span,
.tv-live-result-meta b {
    font-size: 9px;
}

.tv-live-result-clubs {
    gap: 5px;
    min-width: 0;
    line-height: 1;
}

.tv-live-result-clubs span {
    min-width: 0;
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tv-live-result-clubs small {
    flex: 0 0 auto;
    font-size: 8px;
}

.tv-live-result-value {
    display: block;
    margin-top: 4px;
    overflow: hidden;
    font-size: 16px;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --------------------------------------------------------------------------
   DETALLE DE PARTIDO
   -------------------------------------------------------------------------- */

.tv-detail-stage {
    display: flex;
    flex-direction: column;
}

.tv-detail-stage-head {
    flex: 0 0 auto;
}

.tv-carousel {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.tv-match-detail {
    height: 100%;
    max-height: 100%;
    min-height: 0;
    overflow: hidden;
}

.tv-match-detail.is-active {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
}

.tv-match-detail-top {
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.tv-hole-board {
    flex: 0 0 auto;
}

.tv-hole-grid {
    grid-template-columns: repeat(9, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(46px, 1fr));
    gap: 5px;
}

.tv-hole-cell {
    min-height: 46px;
    padding: 5px 4px;
}

.tv-hole-cell > span {
    font-size: 8px;
}

.tv-hole-cell > strong {
    font-size: 12px;
}

.tv-hole-cell > small {
    font-size: 8px;
}

/* ==========================================================================
   MODO TV / ESCRITORIO GRANDE
   Sin scroll de pÃ¡gina.
   ========================================================================== */

@media (min-width: 1101px) {

    html:has(body.tv-body),
    body.tv-body {
        width: 100%;
        height: 100%;
        overflow: hidden;
    }

    body.tv-body {
        min-height: 0;
    }

    .tv-scoreboard-shell {
        width: 100%;
        height: 100vh;
        height: 100dvh;
        max-height: 100vh;
        max-height: 100dvh;
        padding: clamp(9px, .85vw, 16px);
        display: grid;
        grid-template-rows:
            auto
            minmax(0, 31%)
            minmax(0, 1fr)
            auto;
        gap: clamp(8px, .7vw, 13px);
        overflow: hidden;
    }

    .tv-v2-header {
        grid-row: 1;
        min-height: 0;
    }

    .tv-overview {
        grid-row: 2;
        display: grid;
        grid-template-columns: minmax(370px, 30%) minmax(0, 1fr);
        gap: 12px;
        min-height: 0;
        overflow: hidden;
    }

    .tv-overview > .tv-v2-panel {
        min-height: 0;
        overflow: hidden;
    }

    .tv-detail-stage {
        grid-row: 3;
        min-height: 0;
        overflow: hidden;
    }

    .tv-v2-footer {
        grid-row: 4;
        min-height: 0;
    }

    .tv-v2-panel-head {
        flex: 0 0 auto;
        margin-bottom: 7px;
    }
}

/* ==========================================================================
   PORTÃ�TIL / TV MEDIANA
   ========================================================================== */

@media (min-width: 1101px) and (max-width: 1500px) {

    .tv-scoreboard-shell {
        grid-template-rows:
            auto
            minmax(0, 34%)
            minmax(0, 1fr)
            auto;
    }

    .tv-overview {
        grid-template-columns: minmax(340px, 32%) minmax(0, 1fr);
    }

    .tv-live-results-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-template-rows: repeat(4, minmax(0, 1fr));
        gap: 5px;
    }

    .tv-live-result-card {
        padding: 5px 8px;
    }

    .tv-standing-fusion-row,
    .tv-standings-fusion-head {
        grid-template-columns: minmax(0, 1fr) 64px 88px;
    }

    .tv-standing-club {
        grid-template-columns: 25px 44px minmax(0, 1fr);
        gap: 6px;
    }

    .tv-standing-club .tv-match-club-logo {
        width: 44px;
        height: 34px;
        min-width: 44px;
    }

    .tv-standing-club-name strong {
        font-size: 12px;
    }

    .tv-standing-metric strong {
        font-size: 16px;
    }

    .tv-match-detail-top {
        grid-template-columns: 82px minmax(0, 1fr) minmax(180px, .58fr) minmax(0, 1fr);
    }

    .tv-match-club-logo {
        width: 58px;
        height: 58px;
        min-width: 58px;
    }

    .tv-player-avatar {
        width: 46px;
        height: 46px;
        min-width: 46px;
    }
}

/* Pantallas de poca altura: 1366x768, portÃ¡tiles, TV con navegador visible. */
@media (min-width: 1101px) and (max-height: 850px) {

    .tv-scoreboard-shell {
        padding: 7px 10px;
        grid-template-rows:
            auto
            minmax(0, 35%)
            minmax(0, 1fr)
            auto;
        gap: 7px;
    }

    .tv-v2-header {
        min-height: 58px;
        padding-top: 6px;
        padding-bottom: 6px;
    }

    .tv-v2-brand img {
        width: 44px;
        height: 44px;
    }

    .tv-standings-panel,
    .tv-results-panel,
    .tv-detail-stage {
        padding: 9px 11px;
    }

    .tv-v2-panel-head,
    .tv-detail-stage-head {
        margin-bottom: 5px;
    }

    .tv-v2-panel-head h1,
    .tv-detail-stage-head h2 {
        font-size: 18px;
    }

    .tv-standings-fusion {
        gap: 4px;
    }

    .tv-standing-fusion-row {
        padding: 4px 6px;
    }

    .tv-standing-club .tv-match-club-logo {
        height: 31px;
    }

    .tv-standing-metric strong {
        font-size: 15px;
    }

    .tv-live-result-card {
        padding: 4px 7px;
    }

    .tv-live-result-value {
        margin-top: 2px;
        font-size: 14px;
    }

    .tv-match-side {
        padding-top: 7px;
        padding-bottom: 7px;
    }

    .tv-match-club-title {
        margin-bottom: 5px;
    }

    .tv-match-club-logo {
        width: 48px;
        height: 48px;
        min-width: 48px;
    }

    .tv-player-avatar {
        width: 40px;
        height: 40px;
        min-width: 40px;
    }

    .tv-match-player-list {
        gap: 5px;
    }

    .tv-hole-board {
        padding: 6px 8px 8px;
    }

    .tv-hole-board-head {
        margin-bottom: 4px;
    }

    .tv-hole-grid {
        grid-template-rows: repeat(2, minmax(36px, 1fr));
        gap: 3px;
    }

    .tv-hole-cell {
        min-height: 36px;
        padding: 3px;
    }
}

/* Muy poca altura: prioridad absoluta a que no aparezca scroll. */
@media (min-width: 1101px) and (max-height: 700px) {

    .tv-scoreboard-shell {
        grid-template-rows:
            auto
            minmax(0, 38%)
            minmax(0, 1fr)
            auto;
    }

    .tv-v2-header-center small,
    .tv-standing-club-name small,
    .tv-hole-board-head small {
        display: none;
    }

    .tv-v2-brand img {
        width: 38px;
        height: 38px;
    }

    .tv-v2-header {
        min-height: 48px;
    }

    .tv-match-club-logo {
        width: 42px;
        height: 42px;
        min-width: 42px;
    }

    .tv-player-avatar {
        width: 34px;
        height: 34px;
        min-width: 34px;
    }

    .tv-match-player strong {
        font-size: 12px;
    }

    .tv-match-player small {
        font-size: 8px;
    }

    .tv-hole-grid {
        grid-template-rows: repeat(2, minmax(30px, 1fr));
    }

    .tv-hole-cell {
        min-height: 30px;
    }
}

/* ==========================================================================
   TABLET
   A partir de aquÃ­ dejamos de forzar 100vh: el contenido debe reordenarse
   y puede crecer verticalmente.
   ========================================================================== */

@media (max-width: 1100px) {

    html:has(body.tv-body),
    body.tv-body {
        height: auto;
        min-height: 100%;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .tv-scoreboard-shell {
        width: 100%;
        min-height: 100vh;
        min-height: 100dvh;
        height: auto;
        max-height: none;
        padding: 10px;
        display: flex;
        flex-direction: column;
        gap: 10px;
        overflow: visible;
    }

    .tv-v2-header {
        grid-template-columns: minmax(0, 1fr) auto;
        min-height: 68px;
        padding-right: 105px;
    }

    .tv-v2-header-center {
        display: none;
    }

    .tv-theme-switch {
        justify-self: end;
    }

    .tv-overview {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
        overflow: visible;
    }

    .tv-standings-panel,
    .tv-results-panel,
    .tv-detail-stage {
        overflow: visible;
    }

    .tv-standings-fusion {
        overflow: visible;
    }

    .tv-standing-fusion-row {
        min-height: 64px;
        flex: 0 0 auto;
    }

    .tv-live-results-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: none;
        overflow: visible;
    }

    .tv-live-result-card {
        min-height: 78px;
    }

    .tv-detail-stage {
        min-height: 0;
    }

    .tv-carousel {
        overflow: visible;
    }

    .tv-match-detail {
        height: auto;
        max-height: none;
        overflow: visible;
    }

    .tv-match-detail.is-active {
        display: block;
    }

    /* En tablet: clubes arriba y marcador debajo ocupando todo el ancho. */
    .tv-match-detail-top {
        display: grid;
        grid-template-columns: 72px minmax(0, 1fr) minmax(0, 1fr);
        height: auto;
        overflow: visible;
    }

    .tv-match-number {
        grid-column: 1;
        grid-row: 1 / 3;
    }

    .tv-match-side-a {
        grid-column: 2;
        grid-row: 1;
    }

    .tv-match-side-b {
        grid-column: 3;
        grid-row: 1;
    }

    .tv-match-score-center {
        grid-column: 2 / 4;
        grid-row: 2;
        min-height: 100px;
        border-top: 1px solid var(--tv-line);
    }

    .tv-hole-grid {
        grid-template-columns: repeat(9, minmax(0, 1fr));
        grid-template-rows: repeat(2, minmax(46px, auto));
    }
}

/* ==========================================================================
   MÃ“VIL / TABLET ESTRECHA
   ========================================================================== */

@media (max-width: 760px) {

    .tv-scoreboard-shell {
        padding: 8px;
        gap: 8px;
    }

    .tv-scoreboard-shell > .public-language-switch {
        top: 7px;
        right: 7px;
    }

    .tv-v2-header {
        grid-template-columns: minmax(0, 1fr);
        gap: 9px;
        min-height: 0;
        padding: 12px;
        padding-top: 42px;
        border-radius: 11px;
    }

    .tv-v2-brand {
        align-items: flex-start;
    }

    .tv-v2-brand img {
        width: 48px;
        height: 48px;
    }

    .tv-v2-brand strong {
        overflow: visible;
        font-size: 18px;
        text-overflow: clip;
        white-space: normal;
    }

    .tv-theme-switch {
        width: 100%;
        justify-self: stretch;
        justify-content: center;
    }

    .tv-theme-btn {
        flex: 1 1 0;
    }

    .tv-standings-panel,
    .tv-results-panel,
    .tv-detail-stage {
        padding: 12px;
        border-radius: 11px;
    }

    .tv-v2-panel-head,
    .tv-detail-stage-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .tv-v2-panel-head > small,
    .tv-detail-stage-head small {
        white-space: normal;
    }

    .tv-standing-fusion-row,
    .tv-standings-fusion-head {
        grid-template-columns: minmax(0, 1fr) 58px 78px;
    }

    .tv-standing-club {
        grid-template-columns: 24px 44px minmax(0, 1fr);
        gap: 6px;
    }

    .tv-standing-club .tv-match-club-logo {
        width: 44px;
        height: 36px;
        min-width: 44px;
    }

    .tv-standing-club-name strong {
        font-size: 12px;
    }

    .tv-standing-metric strong {
        font-size: 16px;
    }

    .tv-live-results-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .tv-live-result-card {
        min-height: 72px;
    }

    .tv-match-detail-top {
        display: flex;
        flex-direction: column;
    }

    .tv-match-number {
        order: 1;
        min-height: 58px;
        flex-direction: row;
        gap: 8px;
        border-right: 0;
        border-bottom: 1px solid var(--tv-line);
    }

    .tv-match-number strong {
        font-size: 27px;
    }

    .tv-match-score-center {
        order: 2;
        min-height: 100px;
        border-bottom: 1px solid var(--tv-line);
    }

    .tv-match-side-a {
        order: 3;
    }

    .tv-match-side-b {
        order: 4;
    }

    .tv-match-side-a,
    .tv-match-side-b {
        border-right: 0;
        border-left: 0;
        border-bottom: 1px solid var(--tv-line);
    }

    .tv-match-club-title h3 {
        overflow: visible;
        font-size: 18px;
        text-overflow: clip;
        white-space: normal;
    }

    .tv-match-player strong {
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
    }

    .tv-hole-board-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .tv-hole-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        grid-template-rows: none;
    }

    .tv-v2-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }
}

/* ==========================================================================
   MÃ“VIL PEQUEÃ‘O
   ========================================================================== */

@media (max-width: 520px) {

    .tv-standing-fusion-row {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        grid-template-areas:
            "club club"
            "official live";
        gap: 7px;
        min-height: 0;
        padding: 8px;
    }

    .tv-standings-fusion-head {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        padding-left: 4px;
        padding-right: 4px;
    }

    .tv-standings-fusion-head span:first-child {
        display: none;
    }

    .tv-standing-club {
        grid-area: club;
        grid-template-columns: 26px 50px minmax(0, 1fr);
        padding-bottom: 5px;
        border-bottom: 1px solid var(--tv-line);
    }

    .tv-standing-club .tv-match-club-logo {
        width: 50px;
        height: 40px;
        min-width: 50px;
    }

    .tv-standing-club-name strong {
        font-size: 14px;
    }

    .tv-standing-metric:not(.is-live) {
        grid-area: official;
        min-height: 46px;
        border: 1px solid var(--tv-line);
        background: var(--tv-surface);
    }

    .tv-standing-metric.is-live {
        grid-area: live;
        min-height: 46px;
    }

    .tv-standing-metric strong {
        font-size: 18px;
    }

    .tv-match-club-title {
        align-items: flex-start;
    }

    .tv-match-club-logo {
        width: 54px;
        height: 54px;
        min-width: 54px;
    }

    .tv-player-avatar {
        width: 44px;
        height: 44px;
        min-width: 44px;
    }

    .tv-hole-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .tv-hole-cell {
        min-height: 50px;
    }

    .tv-rotation-status {
        width: 100%;
        justify-content: space-between;
    }
}

/* Reducir movimiento cuando el sistema asÃ­ lo solicita. */
@media (prefers-reduced-motion: reduce) {
    .tv-v2-live-dot,
    .tv-match-detail.is-active {
        animation: none !important;
    }
}


/* V4 - AutogestiÃ³n de cuenta en perfil */
.profile-account-form{margin-top:14px}.profile-account-form .field{margin-bottom:12px}.compact-section-head{margin-bottom:6px}.profile-account-form input[type="text"],.profile-account-form input[type="password"]{width:100%}@media(max-width:720px){.profile-account-form{margin-top:10px}.player-profile-card .profile-player-info{grid-template-columns:1fr}.player-profile-card .profile-info-box{min-height:auto}}

/* ==========================================================================
   TV V6 - Ajuste final de resultados y carrusel (02/09/2026)
   ========================================================================== */
.tv-detail-stage-title {
    min-width: 0;
}

.tv-detail-stage-title h2 {
    margin: 2px 0 0;
}

.tv-live-results-grid {
    grid-template-rows: none;
    grid-auto-rows: minmax(62px, auto);
    align-content: start;
    overflow: hidden;
}

.tv-live-result-card {
    min-height: 62px;
    border: 1px solid var(--tv-line);
    border-left: 5px solid var(--club-color, var(--tv-accent));
    border-radius: 9px;
    background: var(--tv-surface-soft);
}

.tv-live-result-card.is-final {
    background: var(--tv-surface);
}

.tv-live-result-card.is-provisional {
    background: color-mix(in srgb, var(--club-color, var(--tv-accent)) 8%, var(--tv-surface-soft));
}

.tv-carousel {
    position: relative;
    width: 100%;
}

.tv-match-detail.is-active {
    width: 100%;
}

@media (min-width: 1101px) {
    .tv-scoreboard-shell {
        grid-template-rows:
            auto
            auto
            minmax(0, 31%)
            minmax(0, 1fr)
            auto;
    }

    .tv-v2-header { grid-row: 1; }

    .tv-live-projection {
        grid-row: 2;
        margin: 0;
        padding: 7px 14px;
        min-height: 56px;
        grid-template-columns: minmax(220px, .36fr) minmax(0, 1fr);
        gap: 10px;
        overflow: hidden;
    }

    .tv-live-projection-title strong {
        margin-top: 1px;
        font-size: clamp(16px, 1.35vw, 23px);
    }

    .tv-live-projection-ranking {
        gap: 7px;
    }

    .tv-live-rank {
        min-height: 42px;
        padding: 4px 8px;
    }

    .tv-live-rank .tv-match-club-logo {
        width: 36px;
        height: 32px;
        min-width: 36px;
    }

    .tv-live-rank strong {
        font-size: 18px;
    }

    .tv-overview {
        grid-row: 3;
    }

    .tv-detail-stage {
        grid-row: 4;
        display: flex;
        flex-direction: column;
    }

    .tv-v2-footer {
        grid-row: 5;
    }

    .tv-detail-stage-head {
        align-items: center;
        margin-bottom: 7px;
    }

    .tv-carousel {
        flex: 1 1 auto;
        min-height: 0;
    }

    .tv-match-detail {
        height: 100%;
        min-height: 0;
    }

    .tv-match-detail.is-active {
        display: grid;
        grid-template-rows: minmax(0, 1fr) auto;
    }

    .tv-match-detail-top {
        min-height: 0;
    }
}

@media (min-width: 1101px) and (max-height: 760px) {
    .tv-scoreboard-shell {
        grid-template-rows:
            auto
            auto
            minmax(0, 30%)
            minmax(0, 1fr)
            auto;
    }

    .tv-live-projection {
        min-height: 48px;
        padding-top: 4px;
        padding-bottom: 4px;
    }

    .tv-live-rank {
        min-height: 36px;
    }

    .tv-live-result-card {
        min-height: 50px;
        padding-top: 4px;
        padding-bottom: 4px;
    }

    .tv-live-results-grid {
        grid-auto-rows: minmax(50px, auto);
    }

    .tv-detail-stage {
        padding-top: 9px;
        padding-bottom: 9px;
    }
}

@media (max-width: 1100px) {
    .tv-live-results-grid {
        grid-auto-rows: auto;
    }

    .tv-live-result-card {
        min-height: 76px;
    }

    .tv-detail-stage-head {
        align-items: center;
    }
}

@media (max-width: 760px) {
    .tv-detail-stage-head {
        align-items: flex-start;
    }

    .tv-rotation-status {
        width: 100%;
        justify-content: space-between;
    }
}

/* ============================================================
   MenÃº unificado de acciones - Matches / Tournaments / Players / Clubs
   ============================================================ */
.action-menu-cell,
.management-table .action-menu-cell {
    width: 118px;
    min-width: 118px;
    vertical-align: top;
}

.actions-col,
.match-management-table .actions-col,
.tournament-management-table .actions-col,
.players-management-table .actions-col {
    width: 118px;
    min-width: 118px;
}

.action-menu {
    display: block;
    width: 100%;
    max-width: 190px;
}

.action-menu > summary {
    list-style: none;
}

.action-menu > summary::-webkit-details-marker {
    display: none;
}

.action-menu-trigger {
    display: inline-flex;
    width: 100%;
    min-width: 104px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.action-menu-icon {
    font-size: 14px;
    line-height: 1;
    transform: translateY(-1px);
}

.action-menu[open] .action-menu-trigger {
    color: #fff;
    background: var(--fede-charcoal, #252822);
    border-color: var(--fede-charcoal, #252822);
}

.action-menu-items {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 150px;
    margin-top: 6px;
    overflow: hidden;
    border: 1px solid #d9dfd3;
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(31, 38, 27, .10);
}

.action-menu-item,
.action-menu-button,
.action-menu-note {
    display: block;
    width: 100%;
    min-height: 36px;
    padding: 9px 11px;
    border: 0;
    border-bottom: 1px solid #edf0e9;
    border-radius: 0;
    color: var(--fede-charcoal, #252822);
    background: #fff;
    font: inherit;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.25;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    white-space: normal;
}

.action-menu-item:last-child,
.action-menu-form:last-child .action-menu-item,
.action-menu-note:last-child {
    border-bottom: 0;
}

.action-menu-item:hover,
.action-menu-button:hover {
    color: #395d18;
    background: #f2f6ec;
}

.action-menu-item.is-primary,
.action-menu-button.is-primary {
    color: #355b16;
    background: #f0f7e7;
}

.action-menu-item.is-danger,
.action-menu-button.is-danger {
    color: #a32631;
    background: #fff7f7;
}

.action-menu-item.is-danger:hover,
.action-menu-button.is-danger:hover {
    color: #fff;
    background: #a92e38;
}

.action-menu-form {
    display: block;
    width: 100%;
    margin: 0;
}

.action-menu-note {
    color: var(--muted, #6e756b);
    cursor: default;
    font-weight: 600;
}

.tournament-actions,
.tournament-action-menu {
    min-width: 0;
}

.club-card-actions {
    justify-content: flex-end;
}

.club-action-menu {
    width: 150px;
}

/* Las acciones ya no fuerzan el ancho de las tablas de administraciÃ³n. */
.match-management-table,
.tournament-management-table {
    width: 100%;
}

@media (max-width: 900px) {
    .action-menu-cell,
    .management-table .action-menu-cell,
    .actions-col,
    .match-management-table .actions-col,
    .tournament-management-table .actions-col,
    .players-management-table .actions-col {
        width: 108px;
        min-width: 108px;
    }

    .action-menu-trigger {
        min-width: 96px;
        padding-left: 8px;
        padding-right: 8px;
    }
}

/* ============================================================
   Matches - tabla compacta
   Salida, Tipo y Estado ocupan solo el ancho necesario.
   La alineaciÃ³n absorbe el espacio disponible.
   ============================================================ */
.match-management-table {
    width: 100%;
    min-width: 760px;
    table-layout: auto;
}

.match-management-table th,
.match-management-table td {
    padding-left: 8px;
    padding-right: 8px;
}

/* NÂº */
.match-management-table th:nth-child(1),
.match-management-table td:nth-child(1) {
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    text-align: center;
}

/* Tipo */
.match-management-table th:nth-child(2),
.match-management-table td:nth-child(2) {
    width: 76px;
    min-width: 76px;
    max-width: 90px;
    white-space: nowrap;
}

.match-management-table td:nth-child(2) .badge {
    padding: 5px 7px;
    font-size: 10px;
    letter-spacing: 0;
}

/* Enfrentamiento */
.match-management-table th:nth-child(3),
.match-management-table td:nth-child(3) {
    width: 130px;
    min-width: 115px;
}

.match-management-table .club-versus {
    gap: 4px;
    white-space: normal;
    line-height: 1.15;
}

/* Salida */
.match-management-table th:nth-child(4),
.match-management-table td:nth-child(4) {
    width: 64px;
    min-width: 64px;
    max-width: 70px;
    text-align: center;
}

.match-management-table .match-start-mini {
    align-items: center;
    gap: 0;
    line-height: 1.1;
}

.match-management-table .match-start-mini b {
    font-size: 13px;
}

.match-management-table .match-start-mini small {
    margin-top: 2px;
    font-size: 9px;
}

/* AlineaciÃ³n: columna principal y flexible */
.match-management-table th:nth-child(5),
.match-management-table td:nth-child(5) {
    min-width: 240px;
}

/* Estado */
.match-management-table th:nth-child(6),
.match-management-table td:nth-child(6) {
    width: 82px;
    min-width: 82px;
    max-width: 92px;
    text-align: center;
}

.match-management-table td:nth-child(6) .badge {
    padding: 5px 7px;
    font-size: 10px;
    white-space: nowrap;
}

/* Resultado */
.match-management-table th:nth-child(7),
.match-management-table td:nth-child(7) {
    width: 58px;
    min-width: 58px;
    max-width: 68px;
    text-align: center;
}

/* Acciones */
.match-management-table th:nth-child(8),
.match-management-table td:nth-child(8),
.match-management-table .actions-col,
.match-management-table .action-menu-cell {
    width: 108px;
    min-width: 108px;
}

.match-management-table .action-menu-trigger {
    min-width: 92px;
    padding-left: 7px;
    padding-right: 7px;
}

@media (max-width: 900px) {
    .match-management-table {
        min-width: 700px;
    }

    .match-management-table th:nth-child(3),
    .match-management-table td:nth-child(3) {
        width: 112px;
        min-width: 100px;
    }

    .match-management-table th:nth-child(5),
    .match-management-table td:nth-child(5) {
        min-width: 205px;
    }
}


/* ============================================================
   Matches - layout responsive real
   En resoluciones medias el editor baja debajo del programa para
   que la tabla disponga del ancho completo. En escritorio amplio
   se mantiene la distribuciÃ³n 9/3.
   ============================================================ */
.matches-management-grid .match-program-panel {
    min-width: 0;
}

.matches-management-grid .match-editor-panel {
    min-width: 0;
}

/* El menÃº de acciones de Matches es un botÃ³n hamburguesa compacto. */
.match-management-table th:nth-child(8),
.match-management-table td:nth-child(8),
.match-management-table .actions-col,
.match-management-table .action-menu-cell {
    width: 54px;
    min-width: 54px;
    max-width: 54px;
}

.match-management-table .match-action-trigger {
    width: 40px;
    min-width: 40px;
    height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.match-management-table .match-action-trigger .action-menu-icon {
    margin: 0;
    font-size: 17px;
    line-height: 1;
}

.match-management-table .match-action-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Con Acciones compactas ya no hace falta reservar tanto ancho. */
.match-management-table {
    min-width: 690px;
}

.match-management-table th:nth-child(5),
.match-management-table td:nth-child(5) {
    min-width: 190px;
}

@media (max-width: 1180px) {
    .matches-management-grid {
        grid-template-columns: 1fr;
    }

    .matches-management-grid > .match-program-panel,
    .matches-management-grid > .match-editor-panel {
        grid-column: 1 / -1 !important;
        width: 100%;
    }

    .matches-management-grid .match-editor-panel {
        position: static;
    }

    .match-management-table {
        min-width: 0;
        width: 100%;
    }

    .match-management-table th:nth-child(3),
    .match-management-table td:nth-child(3) {
        width: 105px;
        min-width: 90px;
    }

    .match-management-table th:nth-child(5),
    .match-management-table td:nth-child(5) {
        min-width: 170px;
    }
}

@media (max-width: 760px) {
    .match-management-table {
        min-width: 650px;
    }
}

/* ============================================================
   Matches: menÃº de acciones flotante hacia la izquierda
   Evita que el panel editor lateral recorte las opciones.
   ============================================================ */
.match-management-table .action-menu-cell {
    position: relative;
    overflow: visible;
}

.match-management-table .action-menu {
    position: relative;
    width: 40px;
    min-width: 40px;
    margin-left: auto;
    overflow: visible;
}

.match-management-table .action-menu-trigger {
    width: 40px;
    min-width: 40px;
    height: 34px;
    padding: 0;
}

.match-management-table .match-action-label {
    display: none;
}

.match-management-table .action-menu-items {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    z-index: 1200;
    width: 155px;
    min-width: 155px;
    margin-top: 0;
    overflow: visible;
}

.match-management-table tbody tr,
.match-management-table tbody td {
    overflow: visible;
}

.match-management-table details[open] {
    z-index: 1199;
}

/* El contenedor puede seguir gestionando el ancho de la tabla, pero no debe
   cortar verticalmente el menÃº desplegado. */
.matches-program-card,
.matches-program-card .table-responsive,
.matches-program-card .table-wrap {
    overflow-y: visible;
}


/* ============================================================
   LOGIN - ACCESO PÃšBLICO TV
   ============================================================ */
.login-public-actions {
    margin-top: 10px;
}

.login-public-live {
    width: 100%;
    min-height: 44px;
    padding: 10px 13px;
    display: grid;
    grid-template-columns: 18px 1fr 18px;
    align-items: center;
    gap: 8px;
    border: 1px solid #d7e1d2;
    border-radius: 5px;
    color: #355c1b;
    background: #f5f8ef;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    text-align: left;
    text-decoration: none;
    transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.login-public-live:hover {
    border-color: #b8ccaa;
    color: #274713;
    background: #edf4e4;
    transform: translateY(-1px);
}

.login-public-live-icon {
    color: #e34242;
    font-size: 11px;
    text-align: center;
}

.login-public-live-arrow {
    color: #6b7d61;
    font-size: 20px;
    font-weight: 700;
    text-align: right;
}

.login-footer .login-legal-link {
    margin-top: 5px;
    display: inline-block;
    font-weight: 800;
    text-decoration: none;
}

/* Profile personal: cuenta arriba y partido asignado debajo */
.profile-account-card{padding:20px}
.profile-account-layout{display:grid;grid-template-columns:minmax(250px,.85fr) minmax(250px,1fr) minmax(250px,1fr);gap:22px;align-items:start}
.profile-account-identity{display:flex;flex-direction:column;align-items:center;text-align:center;gap:10px;padding-right:20px;border-right:1px solid #e2e7de;min-width:0}
.profile-account-identity .avatar-profile{width:118px;height:118px;min-width:118px}
.profile-account-name h2{margin:2px 0 3px}.profile-account-name p{margin:0}.profile-account-name .profile-badges{justify-content:center;margin-top:10px}
.profile-account-panel{min-width:0;padding:2px 2px 0}.profile-account-panel h3{margin:2px 0 4px}.profile-account-panel .section-head{margin-bottom:12px}
.profile-photo-form{width:100%;margin-top:6px}.profile-photo-form .field{text-align:left}
.profile-matches-card{margin-top:18px}.profile-matches-card .player-match-list{max-width:none}
.profile-matches-card .player-match-card{grid-template-columns:56px minmax(0,1fr) auto}
@media(max-width:1050px){.profile-account-layout{grid-template-columns:1fr 1fr}.profile-account-identity{grid-column:1/-1;border-right:0;border-bottom:1px solid #e2e7de;padding:0 0 18px}}
@media(max-width:700px){.profile-account-layout{grid-template-columns:1fr;gap:16px}.profile-account-identity{grid-column:auto}.profile-account-card{padding:16px}.profile-matches-card .player-match-card{grid-template-columns:44px minmax(0,1fr)}.profile-matches-card .player-match-result{grid-column:2;justify-self:start}}

.login-tournament-select,.public-tournament-picker select,.tv-tournament-picker select{width:100%;max-width:420px;border:1px solid #ccd5c7;border-radius:8px;background:#fff;padding:9px 11px;font:inherit}.login-tournament-label{display:block;margin-bottom:6px;font-weight:700}.public-tournament-picker,.tv-tournament-picker{margin:0}.public-top-actions{flex-wrap:wrap}.tv-tournament-picker select{max-width:360px;font-size:12px;padding:6px 8px}@media(max-width:700px){.public-tournament-picker,.public-tournament-picker select,.tv-tournament-picker,.tv-tournament-picker select{width:100%;max-width:none}}


/* V21.1 - login multitorneo: mÃ¡s ancho para nombres completos */
.login-card { width: min(560px, 94vw); }
.login-tournament-select { width: 100%; min-width: 0; font-size: 15px; }
@media (max-width: 620px) { .login-card { width: min(94vw, 560px); } }

/* V22 - gestion de capitanes */
.captain-card-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.captain-admin-card{padding:18px}.captain-admin-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.captain-admin-head h2{margin:4px 0 0;font-size:18px}.captain-summary{display:grid;gap:5px;margin-top:16px}.captain-summary small{color:var(--muted,#667066)}.captain-plays-toggle span{display:grid;gap:2px}.captain-plays-toggle small{font-weight:400;color:var(--muted,#667066)}@media(max-width:900px){.captain-card-grid{grid-template-columns:1fr}}


/* V22.2 - Cabecera multi-torneo: mostrar nombre completo del torneo */
.topbar .season-chip {
    max-width: min(42vw, 520px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* V22.3 - Tarjetas visuales de capitanes */
.captain-admin-card{position:relative;overflow:hidden;padding:0;background:#fff}
.captain-club-strip{height:6px;background:var(--captain-club-color,#5a9720)}
.captain-admin-card .captain-admin-head{padding:16px 18px 10px}
.captain-club-identity{display:flex;align-items:center;gap:12px;min-width:0}
.captain-club-identity>div:last-child{min-width:0}
.captain-club-logo{width:52px;height:52px;min-width:52px;border-radius:12px;background:#fff;border:1px solid #e2e8de;display:flex;align-items:center;justify-content:center;overflow:hidden;box-shadow:0 3px 12px rgba(26,37,24,.07)}
.captain-club-logo img{display:block;width:100%;height:100%;object-fit:contain;padding:4px;box-sizing:border-box}
.captain-club-logo span{font-size:10px;font-weight:900;color:var(--captain-club-color,#5a9720);text-align:center;padding:4px}
.captain-admin-card .club-code{color:var(--captain-club-color,#5a9720);font-weight:900;letter-spacing:.08em}
.captain-admin-card .captain-admin-head h2{white-space:normal;line-height:1.15}
.captain-summary-rich{display:flex;align-items:center;gap:14px;margin:4px 18px 18px;padding:14px;border-radius:12px;background:linear-gradient(135deg,#fafcf8 0%,#f4f7f1 100%);border-left:4px solid var(--captain-club-color,#5a9720)}
.captain-avatar{width:66px;height:66px;min-width:66px;border-radius:50%;overflow:hidden;display:flex;align-items:center;justify-content:center;background:var(--captain-club-color,#5a9720);color:#fff;font-size:25px;font-weight:900;border:3px solid #fff;box-shadow:0 2px 10px rgba(22,33,19,.14)}
.captain-avatar img{width:100%;height:100%;object-fit:cover;display:block}
.captain-summary-main{display:grid;gap:4px;min-width:0}
.captain-summary-main strong{font-size:16px;line-height:1.2;overflow-wrap:anywhere}
.captain-summary-main small{color:var(--muted,#667066)}
.captain-badges{display:flex;gap:5px;flex-wrap:wrap;margin-top:3px}
.captain-empty-state{display:flex;align-items:center;gap:12px;margin:4px 18px 18px;padding:14px;border-radius:12px;background:#fafbf8;border:1px dashed #dce4d7}
.captain-empty-state .captain-avatar{width:50px;height:50px;min-width:50px;font-size:19px;opacity:.55}
.captain-empty-state p{margin:0}
@media(max-width:620px){.captain-admin-card .captain-admin-head{align-items:center}.captain-club-logo{width:44px;height:44px;min-width:44px}.captain-summary-rich{margin-left:12px;margin-right:12px}.captain-avatar{width:58px;height:58px;min-width:58px}}


/* ============================================================
   V10.4.3 Â· Identidad visual del torneo + vistas previas
   ============================================================ */
.tournament-editor-panel .tournament-palette-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(140px,1fr));
    gap:10px;
    width:100%;
    min-width:0;
    max-width:100%;
}
.tournament-editor-panel .tournament-palette-grid label{
    min-width:0;
    max-width:100%;
    box-sizing:border-box;
    padding:10px 11px;
    gap:8px;
}
.tournament-editor-panel .tournament-palette-grid label span{
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
}
.tournament-editor-panel .tournament-palette-grid input[type=color]{
    flex:0 0 46px;
    width:46px;
    height:34px;
    min-width:46px;
}
.tournament-theme-preview{
    --preview-primary:#24B94F;
    --preview-secondary:#063443;
    --preview-accent:#63DB48;
    --preview-background:#F3F6F7;
    --preview-surface:#FFFFFF;
    --preview-text:#102A31;
    overflow:hidden;
    width:100%;
    min-width:0;
    border:1px solid color-mix(in srgb,var(--preview-text) 15%,transparent);
    border-radius:12px;
    background:var(--preview-background);
    color:var(--preview-text);
    box-sizing:border-box;
    box-shadow:0 5px 18px rgba(4,43,55,.07);
}
.tournament-theme-preview-head{
    display:flex;
    flex-direction:column;
    gap:2px;
    padding:13px 14px;
    background:linear-gradient(125deg,var(--preview-secondary),color-mix(in srgb,var(--preview-secondary) 72%,var(--preview-primary)));
    color:#fff;
}
.tournament-theme-preview-head span{font-size:9px;font-weight:900;letter-spacing:.12em;text-transform:uppercase;opacity:.78}
.tournament-theme-preview-head strong{font-size:16px;line-height:1.2;overflow-wrap:anywhere}
.tournament-theme-preview-body{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px;align-items:center;padding:12px;background:var(--preview-background)}
.tournament-theme-preview-card{position:relative;min-width:0;padding:10px 48px 10px 11px;border-radius:9px;background:var(--preview-surface);border-left:4px solid var(--preview-primary);color:var(--preview-text);box-shadow:0 2px 8px rgba(4,43,55,.06)}
.tournament-theme-preview-card small{display:block;margin-bottom:2px;font-size:8px;font-weight:900;letter-spacing:.08em;text-transform:uppercase;opacity:.58}
.tournament-theme-preview-card b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:11px}
.tournament-theme-preview-score{position:absolute;right:11px;top:50%;transform:translateY(-50%);font-size:18px;font-weight:950;color:var(--preview-primary)}
.tournament-theme-preview-line{display:flex;align-items:center;gap:6px;grid-column:1/-1;font-size:9px;font-weight:800;color:var(--preview-text);opacity:.72}
.tournament-theme-preview-line i{width:8px;height:8px;border-radius:50%;background:var(--preview-accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--preview-accent) 20%,transparent)}
.tournament-theme-preview-button{display:inline-flex;align-items:center;justify-content:center;justify-self:end;padding:7px 10px;border-radius:999px;background:var(--preview-primary);color:#fff;font-size:9px;font-weight:900}
.tournament-preview-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:100%;min-width:0}
.tournament-preview-actions .tournament-preview-open{display:flex;align-items:center;justify-content:center;min-width:0;text-align:center;white-space:normal}
.tournament-preview-help{margin:0!important;line-height:1.45}
.admin-preview-badge{position:fixed;z-index:9999;top:12px;right:12px;display:flex;flex-direction:column;gap:1px;max-width:min(310px,calc(100vw - 24px));padding:8px 11px;border:1px solid rgba(255,255,255,.24);border-radius:10px;background:rgba(6,52,67,.94);color:#fff;box-shadow:0 6px 20px rgba(0,0,0,.18);backdrop-filter:blur(8px);font-size:10px;line-height:1.25}
.admin-preview-badge b{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:#63DB48}
.admin-preview-badge span{opacity:.84}
.admin-preview-badge-tv{top:58px}
@media(max-width:520px){
    .tournament-editor-panel .tournament-palette-grid{grid-template-columns:1fr}
    .tournament-preview-actions{grid-template-columns:1fr}
    .tournament-theme-preview-body{grid-template-columns:1fr}
    .tournament-theme-preview-button{justify-self:start}
}

/* V10.5.3 - recuperaciÃ³n de contraseÃ±a responsive */
.login-forgot-password{margin-top:10px;text-align:center}.login-forgot-password a,.password-reset-back a{font-weight:700;text-decoration:none}.login-forgot-password a:hover,.password-reset-back a:hover{text-decoration:underline}.password-reset-card{max-width:520px}.password-reset-back{margin-top:18px;text-align:center}.password-reset-card .flash,.password-reset-card .error{margin:14px 0}.password-reset-card .btn-block{width:100%;box-sizing:border-box}@media(max-width:620px){.password-reset-card{width:min(94vw,520px);padding-left:18px;padding-right:18px}.password-reset-card .login-heading h1{font-size:26px}}

/* ========================================================================== */
/* Legal / privacy / third-party notices - V10.11.1                          */
/* ========================================================================== */
.legal-section-privacy {
    border-color: rgba(36, 185, 79, 0.25);
    background: linear-gradient(180deg, rgba(36, 185, 79, 0.055), rgba(255, 255, 255, 0));
}

.legal-privacy-highlight {
    display: grid;
    gap: 4px;
    margin: 14px 0 16px;
    padding: 14px 16px;
    border: 1px solid rgba(36, 185, 79, 0.24);
    border-radius: 14px;
    background: rgba(36, 185, 79, 0.07);
}

.legal-privacy-highlight strong {
    color: #063443;
}

.legal-privacy-highlight span {
    color: #334155;
    line-height: 1.5;
}

.legal-service-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.legal-service-card {
    min-width: 0;
    padding: 16px;
    border: 1px solid #dbe5e8;
    border-radius: 16px;
    background: #fbfdfd;
    box-shadow: 0 8px 24px rgba(6, 52, 67, 0.05);
}

.legal-service-card p {
    margin: 10px 0;
}

.legal-service-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.legal-service-head strong {
    color: #063443;
    font-size: 15px;
    line-height: 1.35;
}

.legal-chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #eaf6ee;
    color: #16763a;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .02em;
}

.legal-service-meta {
    display: grid;
    gap: 8px;
    margin: 12px 0;
}

.legal-service-meta > div {
    display: grid;
    gap: 2px;
}

.legal-service-meta dt {
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .045em;
}

.legal-service-meta dd {
    margin: 0;
    color: #334155;
    font-size: 13px;
    line-height: 1.45;
}

.legal-attribution {
    padding-top: 8px;
    border-top: 1px dashed #d7e1e4;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
}

.legal-link-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
}

.legal-external-link {
    color: #0b6f39;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.legal-external-link:hover,
.legal-external-link:focus-visible {
    color: #063443;
}

.legal-third-party-list {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.legal-third-party-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border: 1px solid #dbe5e8;
    border-radius: 14px;
    background: #fff;
}

.legal-third-party-item > div:first-child {
    display: grid;
    gap: 3px;
}

.legal-third-party-item strong {
    color: #063443;
}

.legal-third-party-item span {
    color: #52616b;
    font-size: 13px;
}

.legal-third-party-license {
    padding: 4px 9px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.legal-note-spaced {
    margin-top: 16px;
}

@media (max-width: 760px) {
    .legal-service-grid {
        grid-template-columns: 1fr;
    }

    .legal-third-party-item {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .legal-third-party-license {
        justify-self: start;
    }
}

/* V10.13 - MyGame AI y cierre oficial de Match. */
.mygame-ai-card{margin-top:1rem}
.mygame-ai-consent-row{display:flex;gap:.75rem;align-items:flex-start;padding:.85rem;border:1px solid #d9e4df;border-radius:12px;background:#f8fbf9}
.mygame-ai-consent-row input{width:22px;height:22px;margin-top:.15rem;flex:0 0 auto}
.mygame-ai-privacy{max-width:75rem}
.friend-match-decision-banner,.friend-match-official-result{display:flex;align-items:center;justify-content:center;gap:.75rem;flex-wrap:wrap;margin-top:.75rem}
.gmz-modal-backdrop{position:fixed;inset:0;z-index:1200;background:rgba(3,31,38,.52);display:flex;align-items:center;justify-content:center;padding:1rem}
.gmz-modal-backdrop[hidden]{display:none}
.gmz-modal-card{width:min(560px,100%);margin:0;box-shadow:0 24px 70px rgba(0,0,0,.28)}
.gmz-modal-actions{display:flex;gap:.75rem;flex-wrap:wrap;margin-top:1rem}
@media(max-width:640px){.gmz-modal-actions .btn{flex:1 1 100%}.friend-match-decision-banner{align-items:stretch}.friend-match-decision-banner .btn{width:100%}}
/* V10.14 - MyGame AI Coach. */
.mygame-ai-coach-card{display:grid;gap:1rem}
.mygame-ai-coach-trends,.mygame-ai-coach-recommendations{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:.75rem}
.mygame-ai-coach-trend,.mygame-ai-coach-recommendation{display:grid;gap:.4rem;padding:.85rem;border:1px solid #d9e4df;border-radius:12px;background:#f8fbf9}
.mygame-ai-coach-trend>span:not(.badge){font-size:1.25rem;font-weight:700}
.mygame-ai-coach-recommendation p{margin:0}


/* V11.0 - MyGame AI / OpenAI real analysis. */
.mygame-ai-provider-status{display:flex;align-items:center;gap:.55rem;flex-wrap:wrap;margin:.65rem 0 .9rem;padding:.65rem .75rem;border:1px solid #d9e4df;border-radius:10px;background:#f8fbf9}
.mygame-ai-provider-status.is-pending{background:#fffaf0}
.mygame-ai-result{margin-top:.9rem}
.mygame-ai-analysis{display:grid;gap:1rem;padding-top:.2rem}
.mygame-ai-result-summary{padding:.9rem;border-left:4px solid var(--brand-primary,#24b94f);background:#f8fbf9;border-radius:8px}
.mygame-ai-result-summary h3,.mygame-ai-result-summary p,.mygame-ai-result-section h4{margin-top:0}
.mygame-ai-result-summary p{margin-bottom:0;line-height:1.55}
.mygame-ai-result-section ul{margin:.4rem 0 0;padding-left:1.25rem;display:grid;gap:.45rem}
.mygame-ai-analysis-recommendations{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:.75rem}
.mygame-ai-analysis-recommendation{display:grid;gap:.45rem;padding:.85rem;border:1px solid #d9e4df;border-radius:12px;background:#f8fbf9}
.mygame-ai-analysis-recommendation p{margin:0;line-height:1.45}
.mygame-ai-result-label{font-weight:700;color:#063443}
.mygame-ai-result-meta{margin:0;font-size:.85rem}
@media(max-width:600px){.mygame-ai-provider-status{align-items:flex-start}.mygame-ai-analysis-recommendations{grid-template-columns:1fr}}

/* ============================================================
   STROKES GAINED Â· FASE 4 Â· EDITOR COMPACTO DE RECORRIDOS
   - Matriz Ãºnica por hoyo.
   - Par/HCP del recorrido en ediciÃ³n.
   - Metros de todas las barras disponibles del club.
   - En mÃ³vil cada fila se transforma en una tarjeta compacta.
   ============================================================ */

@media (min-width: 1421px) {
    .course-page-grid {
        grid-template-columns: minmax(300px, .68fr) minmax(700px, 1.32fr);
    }
}

.course-holes-head-compact {
    align-items: center;
    margin-top: 8px;
}

.course-structure-context {
    display: block;
    margin-top: 4px;
    color: var(--muted, #6e756b);
    font-size: 10px;
    font-weight: 800;
}

.course-hole-matrix-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    border: 1px solid #e1e6dc;
    border-radius: 7px;
    background: #fff;
    -webkit-overflow-scrolling: touch;
}

.course-hole-matrix {
    width: 100%;
    min-width: 540px;
    border-collapse: collapse;
    table-layout: auto;
}

.course-hole-matrix th,
.course-hole-matrix td {
    padding: 5px 6px;
    border-bottom: 1px solid #e8ece4;
    text-align: center;
    vertical-align: middle;
}

.course-hole-matrix th {
    position: sticky;
    top: 0;
    z-index: 2;
    color: #fff;
    background: var(--fede-charcoal, #252822);
    font-size: 9px;
    font-weight: 900;
    line-height: 1.15;
    text-transform: uppercase;
    letter-spacing: .04em;
    white-space: nowrap;
}

.course-hole-matrix th small {
    display: block;
    margin-top: 2px;
    color: #dfe9d6;
    font-size: 8px;
    font-weight: 800;
    text-transform: none;
    letter-spacing: 0;
}

.course-hole-matrix tbody tr:nth-child(9) td {
    border-bottom: 3px solid var(--fede-lime, #89bd24);
}

.course-hole-matrix tbody tr.back-nine-start td {
    border-top: 3px solid var(--fede-lime, #89bd24);
}

.course-hole-matrix .course-hole-col {
    width: 54px;
    min-width: 54px;
    font-weight: 900;
}

.course-hole-matrix td.course-hole-col {
    color: #fff;
    background: var(--fede-charcoal, #252822);
    font-size: 15px;
}

.course-hole-matrix td:not(.course-hole-col) {
    min-width: 72px;
}

.course-hole-matrix input {
    width: 64px;
    max-width: 100%;
    min-width: 0;
    padding: 6px 4px;
    border-radius: 5px;
    text-align: center;
}

.course-tee-distance-head {
    border-top: 3px solid #9ba7ad;
}

.course-tee-distance-head.tee-YELLOW { border-top-color: #d6af00; }
.course-tee-distance-head.tee-WHITE  { border-top-color: #f4f4f4; }
.course-tee-distance-head.tee-RED    { border-top-color: #dc3f3f; }
.course-tee-distance-head.tee-BLUE   { border-top-color: #3d82d4; }
.course-tee-distance-head.tee-BLACK  { border-top-color: #111; }
.course-tee-distance-head.tee-GREEN  { border-top-color: #54a866; }
.course-tee-distance-head.tee-PINK   { border-top-color: #db6a9a; }
.course-tee-distance-head.is-new-tee { border-top-color: var(--fede-lime, #89bd24); }

.course-hole-cell-label {
    display: none;
}

@media (max-width: 700px) {
    .course-hole-matrix-wrap {
        overflow: visible;
        border: 0;
        background: transparent;
    }

    .course-hole-matrix,
    .course-hole-matrix tbody {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .course-hole-matrix thead {
        display: none;
    }

    .course-hole-matrix tbody {
        display: grid;
        gap: 7px;
    }

    .course-hole-matrix tr {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
        padding: 7px;
        border: 1px solid #e2e7de;
        border-radius: 7px;
        background: #fbfcf9;
    }

    .course-hole-matrix tbody tr:nth-child(9) td,
    .course-hole-matrix tbody tr.back-nine-start td {
        border: 0;
    }

    .course-hole-matrix tbody tr.back-nine-start {
        border-top: 3px solid var(--fede-lime, #89bd24);
    }

    .course-hole-matrix td,
    .course-hole-matrix td:not(.course-hole-col) {
        display: grid;
        min-width: 0;
        padding: 0;
        border: 0;
        text-align: left;
    }

    .course-hole-matrix td.course-hole-col {
        grid-column: 1 / -1;
        display: flex;
        width: auto;
        min-width: 0;
        min-height: 29px;
        align-items: center;
        justify-content: center;
        border-radius: 5px;
        font-size: 16px;
    }

    .course-hole-cell-label {
        display: block;
        margin: 0 0 2px;
        overflow: hidden;
        color: var(--muted, #6e756b);
        font-size: 8px;
        font-weight: 900;
        text-overflow: ellipsis;
        text-transform: uppercase;
        letter-spacing: .04em;
        white-space: nowrap;
    }

    .course-hole-matrix input {
        width: 100%;
        min-height: 35px;
        padding: 6px;
        text-align: center;
    }
}

/* ============================================================
   STROKES GAINED Â· FASE 4 Â· IMPORTACIÃ“N MAESTRA POR EXCEL
   ============================================================ */
.course-catalog-import {
    display: grid;
    grid-template-columns: minmax(220px, .75fr) minmax(420px, 1.25fr);
    gap: 16px;
    align-items: center;
    margin-bottom: 14px;
}

.course-catalog-import-copy h2 {
    display: flex;
    gap: 6px;
    align-items: center;
    margin: 2px 0 5px;
}

.course-catalog-import-copy small {
    display: block;
    color: var(--muted, #6e756b);
    line-height: 1.35;
}

.course-catalog-import-actions {
    display: flex;
    gap: 10px;
    align-items: end;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.course-catalog-import-form {
    display: flex;
    gap: 8px;
    align-items: end;
    flex: 1 1 390px;
    justify-content: flex-end;
}

.course-import-file {
    display: grid;
    gap: 4px;
    flex: 1 1 250px;
    min-width: 0;
    color: var(--muted, #6e756b);
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.course-import-file input[type="file"] {
    width: 100%;
    min-height: 39px;
    padding: 6px;
    border: 1px solid #dce3d8;
    border-radius: 6px;
    background: #fff;
    color: var(--text, #252822);
    font-size: 12px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
}

@media (max-width: 820px) {
    .course-catalog-import {
        grid-template-columns: 1fr;
    }

    .course-catalog-import-actions,
    .course-catalog-import-form {
        align-items: stretch;
        justify-content: stretch;
    }

    .course-catalog-import-actions > .btn,
    .course-catalog-import-form .btn {
        flex: 1 1 auto;
    }
}

@media (max-width: 560px) {
    .course-catalog-import-actions,
    .course-catalog-import-form {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .course-import-file {
        width: 100%;
    }
}

/* ============================================================
   V11.3.0 Â· COURSES Â· LISTADO SUPERIOR + EDITOR INFERIOR
   ============================================================ */
.course-list-card {
    margin: 14px 0;
    overflow: hidden;
}
.course-list-header {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
}
.course-list-header h2 {
    margin: 2px 0 4px;
}
.course-list-header small,
.course-editor-head-full small {
    display: block;
    color: var(--muted, #6e756b);
    line-height: 1.35;
}
.course-list-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.course-list-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #e3e8df;
    border-radius: 8px;
    background: #fff;
    -webkit-overflow-scrolling: touch;
}
.course-list-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 850px;
}
.course-list-table th,
.course-list-table td {
    padding: 9px 10px;
    border-bottom: 1px solid #edf0e9;
    vertical-align: middle;
    text-align: left;
}
.course-list-table th {
    color: #fff;
    background: var(--fede-charcoal, #252822);
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
    white-space: nowrap;
}
.course-list-table tbody tr:last-child td { border-bottom: 0; }
.course-list-table tbody tr:hover td { background: #f8faf6; }
.course-list-table tbody tr.is-editing td { background: #f4faeb; }
.course-list-table td strong { display: block; }
.course-list-table td small {
    display: block;
    margin-top: 2px;
    color: var(--muted, #6e756b);
    font-size: 9px;
    font-weight: 700;
}
.course-list-actions-col { text-align: right !important; }
.course-list-row-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: flex-end;
    white-space: nowrap;
}
.course-tee-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 24px;
    padding: 3px 8px;
    border: 1px solid #dfe5da;
    border-left: 5px solid #9ba7ad;
    border-radius: 999px;
    background: #fff;
    font-size: 10px;
    font-weight: 900;
}
.course-tee-pill.tee-YELLOW { border-left-color:#d6af00; }
.course-tee-pill.tee-WHITE  { border-left-color:#cbd3d7; }
.course-tee-pill.tee-RED    { border-left-color:#dc3f3f; }
.course-tee-pill.tee-BLUE   { border-left-color:#3d82d4; }
.course-tee-pill.tee-BLACK  { border-left-color:#111; }
.course-tee-pill.tee-GREEN  { border-left-color:#54a866; }
.course-tee-pill.tee-PINK   { border-left-color:#db6a9a; }

.course-editor-full {
    width: 100%;
    margin: 14px 0;
}
.course-editor-head-full {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 14px;
}
.course-editor-form-full { width: 100%; }
.course-main-fields-wide {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 10px;
}
.course-hole-single-wrap {
    max-width: 760px;
    margin: 0 auto;
}
.course-hole-single {
    min-width: 480px;
    table-layout: fixed;
}
.course-hole-single th,
.course-hole-single td { width: 25%; }
.course-hole-single .course-hole-col { width: 70px; }
.course-hole-single input { width: 100%; max-width: 110px; }
.course-editor-savebar {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}
.course-editor-savebar .btn { min-width: 180px; }
.course-catalog-import-bottom { margin-top: 14px; }
.course-list-empty { margin: 0; }

@media (max-width: 980px) {
    .course-main-fields-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .course-list-header { align-items: stretch; }
}

@media (max-width: 700px) {
    .course-list-header,
    .course-editor-head-full {
        display: grid;
        grid-template-columns: 1fr;
    }
    .course-list-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }
    .course-list-actions .btn { width: 100%; }
    .course-list-table-wrap {
        overflow: visible;
        border: 0;
        background: transparent;
    }
    .course-list-table,
    .course-list-table tbody {
        display: block;
        min-width: 0;
        width: 100%;
    }
    .course-list-table thead { display: none; }
    .course-list-table tbody { display: grid; gap: 8px; }
    .course-list-table tr {
        display: grid;
        grid-template-columns: repeat(2, minmax(0,1fr));
        gap: 6px 10px;
        padding: 10px;
        border: 1px solid #e3e8df;
        border-radius: 8px;
        background: #fff;
    }
    .course-list-table tbody tr.is-editing { border-color: var(--fede-lime, #89bd24); }
    .course-list-table td {
        display: grid;
        gap: 2px;
        padding: 0;
        border: 0;
        background: transparent !important;
    }
    .course-list-table td:before {
        content: attr(data-label);
        color: var(--muted, #6e756b);
        font-size: 8px;
        font-weight: 900;
        text-transform: uppercase;
        letter-spacing: .04em;
    }
    .course-list-table td:first-child,
    .course-list-row-actions {
        grid-column: 1 / -1;
    }
    .course-list-row-actions {
        display: flex !important;
        justify-content: flex-start;
        margin-top: 3px;
    }
    .course-main-fields-wide { grid-template-columns: 1fr; }
    .course-hole-single-wrap { max-width: 100%; }
    .course-hole-single { min-width: 0; }
    .course-hole-single tr { grid-template-columns: repeat(3, minmax(0,1fr)); }
    .course-hole-single td.course-hole-col { grid-column: 1 / -1; }
    .course-editor-savebar .btn { width: 100%; }
}

@media (max-width: 420px) {
    .course-list-actions { grid-template-columns: 1fr; }
}

/* V11.5.0 - Coach AI bajo demanda. El panel no altera ni envÃ­a el formulario PAD. */
.mygame-coach-open{margin:.5rem 0;}
.mygame-coach-overlay[hidden]{display:none!important;}
.mygame-coach-overlay{position:fixed;inset:0;z-index:1200;background:rgba(6,52,67,.38);display:flex;align-items:flex-end;justify-content:center;padding:0;}
.mygame-coach-panel{width:100%;max-height:88vh;overflow:auto;background:#fff;border-radius:18px 18px 0 0;padding:1rem;box-shadow:0 -10px 35px rgba(0,0,0,.18);}
.mygame-coach-header{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start;margin-bottom:.75rem;}
.mygame-coach-header strong,.mygame-coach-header small{display:block;}
.mygame-coach-close{border:0;background:transparent;font-size:1.7rem;line-height:1;cursor:pointer;padding:.15rem .4rem;}
.mygame-coach-panel label{display:block;margin:.7rem 0;}
.mygame-coach-panel textarea{width:100%;min-height:4.5rem;resize:vertical;}
.mygame-coach-status{min-height:1.4rem;margin-top:.5rem;}
.mygame-coach-response{margin-top:.75rem;border-top:1px solid #dce5e8;padding-top:.75rem;}
.mygame-coach-answer{font-weight:600;white-space:pre-wrap;}
.mygame-coach-response ul{margin:.35rem 0 .8rem 1.25rem;padding:0;}
@media (min-width:760px){.mygame-coach-overlay{align-items:center;padding:1.25rem}.mygame-coach-panel{max-width:720px;border-radius:18px;max-height:82vh;}}

/* V11.6 Â· ImportaciÃ³n RFEG */
.rfeg-import-box{margin:0 0 1rem;padding:1rem;border:1px solid var(--line,#dbe4e7);border-radius:14px;background:#f8fbfb;display:grid;gap:.65rem}
.rfeg-import-box .field{margin:0}.rfeg-course-import{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap}.rfeg-course-import input{min-width:230px;max-width:360px}
@media(max-width:720px){.rfeg-course-import{width:100%;display:grid;grid-template-columns:1fr}.rfeg-course-import input,.rfeg-course-import .btn{width:100%;max-width:none}.course-list-actions{width:100%}}

/* V11.7.0 - Caddie Virtual */
.mygame-caddie-open{margin-right:.4rem}.mygame-caddie-result{margin:1rem 0;padding:1rem;border:1px solid var(--border,#d8e1e5);border-radius:12px;background:var(--surface,#fff)}.mygame-caddie-club{font-size:1.35rem}.mygame-caddie-result p{margin:.35rem 0}

/* V11.8.1 Â· DiÃ¡logos GMZ responsive: sustituyen alert/confirm/prompt nativos. */
body.gmz-dialog-open{overflow:hidden}
.gmz-dialog-backdrop{position:fixed;inset:0;z-index:20000;display:flex;align-items:center;justify-content:center;padding:18px;background:rgba(35,42,38,.62);opacity:0;transition:opacity .12s ease;box-sizing:border-box}
.gmz-dialog-backdrop.is-open{opacity:1}.gmz-dialog-backdrop.is-closing{opacity:0}
.gmz-dialog{width:min(520px,100%);max-height:calc(100dvh - 36px);overflow:auto;background:#fff;border:1px solid rgba(6,52,67,.12);border-radius:16px;box-shadow:0 24px 70px rgba(0,0,0,.28);transform:translateY(8px) scale(.985);transition:transform .12s ease;box-sizing:border-box}
.gmz-dialog-backdrop.is-open .gmz-dialog{transform:translateY(0) scale(1)}
.gmz-dialog-head{padding:20px 22px 8px}.gmz-dialog-head h2{margin:0;color:var(--brand-secondary,#063443);font-size:1.15rem;line-height:1.25}
.gmz-dialog-body{padding:8px 22px 18px}.gmz-dialog-message{margin:0;white-space:pre-line;line-height:1.55;color:#27332d;overflow-wrap:anywhere}
.gmz-dialog-input{display:block;width:100%;margin-top:16px;box-sizing:border-box}
.gmz-dialog-actions{display:flex;justify-content:flex-end;gap:10px;padding:14px 22px 20px;border-top:1px solid #e4e9e5;background:#fafcfb;border-radius:0 0 16px 16px}
.gmz-dialog-actions .btn{min-width:108px}
@media(max-width:600px){.gmz-dialog-backdrop{align-items:flex-end;padding:0}.gmz-dialog{width:100%;max-height:88dvh;border-radius:18px 18px 0 0;border-left:0;border-right:0;border-bottom:0}.gmz-dialog-head{padding:18px 18px 8px}.gmz-dialog-body{padding:8px 18px 16px}.gmz-dialog-actions{display:grid;grid-template-columns:1fr 1fr;padding:12px 18px max(18px,env(safe-area-inset-bottom));border-radius:0}.gmz-dialog-actions .btn{width:100%;min-width:0}.gmz-dialog-actions .gmz-dialog-primary:only-child{grid-column:1/-1}}

/* V11.8.1 Â· Perfil: personales / deportivos / contraseÃ±a. */
.profile-account-layout{grid-template-columns:minmax(260px,.95fr) minmax(320px,1.25fr) minmax(250px,.9fr)}
.profile-personal-panel{align-items:stretch;text-align:left}
.profile-personal-heading{width:100%;margin-bottom:2px}
.profile-personal-panel>.avatar-profile{align-self:center}
.profile-personal-panel .profile-account-name{text-align:center}
.profile-personal-panel .profile-badges{justify-content:center}
.profile-personal-fields{width:100%;display:grid;gap:12px;margin-top:4px}
.profile-personal-fields .field{margin:0}
.profile-sport-core{display:grid;grid-template-columns:minmax(0,1fr) minmax(105px,.45fr);gap:12px;align-items:start}
.profile-rfeg-block{display:grid;gap:10px;margin:4px 0 14px;padding:12px;border:1px solid #dfe7e1;border-radius:12px;background:#f8fbf9}
.profile-rfeg-block .check-card{margin:0}
.profile-default-course{padding-top:2px}
@media(max-width:1050px){.profile-account-layout{grid-template-columns:1fr 1fr}.profile-account-identity{grid-column:1/-1}.profile-personal-panel{display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:18px}.profile-personal-heading,.profile-personal-fields,.profile-photo-form,.profile-personal-panel>.secondary-action-form{grid-column:1/-1}.profile-personal-panel>.avatar-profile{grid-column:1;grid-row:2}.profile-personal-panel>.profile-account-name{grid-column:2;grid-row:2;text-align:left;align-self:center}.profile-personal-panel .profile-badges{justify-content:flex-start}}
@media(max-width:700px){.profile-account-layout{grid-template-columns:1fr}.profile-personal-panel{display:flex;flex-direction:column;align-items:stretch}.profile-personal-panel>.avatar-profile{align-self:center}.profile-personal-panel>.profile-account-name{text-align:center}.profile-personal-panel .profile-badges{justify-content:center}.profile-sport-core{grid-template-columns:1fr}.profile-rfeg-block{padding:10px}.profile-account-panel{padding-top:8px}}

/* V11.9.0: nombre/apellidos separados en altas de jugador. */
.friends-guest-name-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.45fr);gap:14px}
@media(max-width:680px){.friends-guest-name-grid{grid-template-columns:1fr;gap:0}}

/* V11.9.0 Â· Identidad visual en previsiones de Match Play */
.match-progress-probability-side{display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:.35rem;min-width:0}
.match-progress-probability-identity{display:flex;align-items:center;justify-content:center;min-height:42px}
.match-progress-probability-avatar{width:42px;height:42px;border-radius:50%;overflow:hidden;display:inline-flex;align-items:center;justify-content:center;background:#e8eff1;border:2px solid #fff;box-shadow:0 1px 5px rgba(6,52,67,.16);font-weight:800;color:#063443;flex:0 0 42px}
.match-progress-probability-avatar+ .match-progress-probability-avatar{margin-left:-10px}
.match-progress-probability-avatar img{width:100%;height:100%;object-fit:cover;display:block}
.match-progress-probability-initials{font-size:.78rem;line-height:1;text-align:center;padding:0 2px;white-space:nowrap}
.match-progress-probability-draw-mark{width:42px;height:42px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:#f0f3f4;border:1px solid #dbe3e6;font-weight:800;color:#52656d}
@media(max-width:600px){
  .match-progress-probability-avatar,.match-progress-probability-draw-mark{width:38px;height:38px;flex-basis:38px}
  .match-progress-probability-initials{font-size:.7rem}
  .match-progress-probability-grid>span{min-width:0}
}

/* V11.11.0 Â· selector de contexto JUGADOR / ADMINISTRADOR */
.work-context-switcher{display:flex;align-items:flex-end;gap:.55rem;flex-wrap:wrap;margin:0}
.work-context-switcher label{display:flex;flex-direction:column;gap:.18rem;font-size:.68rem;font-weight:800;text-transform:uppercase;letter-spacing:.04em;color:var(--muted,#60717b)}
.work-context-switcher select{min-width:135px;max-width:280px;height:36px;border:1px solid #d5e0e4;border-radius:10px;background:#fff;padding:0 2rem 0 .7rem;font:inherit;font-size:.82rem;font-weight:700;color:#123342}
.work-context-switcher label+label select{min-width:220px}
@media(max-width:900px){.work-context-switcher{width:100%;order:5}.work-context-switcher label{flex:1 1 140px}.work-context-switcher select,.work-context-switcher label+label select{width:100%;max-width:none;min-width:0}}
.work-context-switcher [hidden]{display:none!important}.work-context-apply{height:36px;padding:.4rem .8rem;white-space:nowrap}

/* V11.15.0 Â· Fourball + correcciones PWA de cabecera y torneos */
.fourball-summary{display:flex;justify-content:center;margin-bottom:10px}
.fourball-summary>div{display:flex;flex-direction:column;align-items:center;gap:3px;min-width:min(100%,280px);padding:12px 16px;border:1px solid #dce7d7;border-radius:10px;background:#f7fbf3}
.fourball-summary strong{font-size:1.65rem;line-height:1}
.fourball-summary small{color:var(--muted,#60717b);text-align:center}
.fourball-pair-row th,.fourball-pair-row td{background:#f5f9ef;font-weight:800}
.fourball-pair-score strong{display:block;font-size:1rem}
.fourball-pair-score small{display:block;color:var(--muted,#60717b)}
.tournaments-page-grid,.tournament-list-panel,.tournament-editor-panel,.tournament-editor-form,.tournament-form-section{min-width:0;max-width:100%;box-sizing:border-box}
.tournament-management-table{max-width:100%}

@media(max-width:900px){
  .topbar.has-work-context{height:126px;min-height:126px;padding-bottom:58px;box-sizing:border-box}
  .topbar.has-work-context .work-context-switcher{position:absolute;left:10px;right:10px;bottom:8px;width:auto;display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.35fr) auto;gap:6px;align-items:end;margin:0}
  .topbar.has-work-context .work-context-switcher label{min-width:0}
  .topbar.has-work-context .work-context-switcher select,.topbar.has-work-context .work-context-switcher label+label select{width:100%;min-width:0;max-width:100%;height:34px;font-size:.76rem}
  .topbar.has-work-context .work-context-apply{height:34px;padding:.35rem .65rem}
  .topbar.has-work-context + .layout{min-height:calc(100vh - 126px)}
  .topbar.has-work-context + .layout .sidebar{top:126px}
  .tournament-editor-panel{overflow:visible!important}
  .tournament-list-panel .table-wrap{width:100%;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
}
@media(max-width:560px){
  .topbar.has-work-context{height:166px;min-height:166px;padding-bottom:98px}
  .topbar.has-work-context .work-context-switcher{grid-template-columns:minmax(0,1fr) minmax(0,1fr);bottom:8px}
  .topbar.has-work-context .work-context-apply{grid-column:1/-1;width:100%}
  .topbar.has-work-context + .layout{min-height:calc(100vh - 166px)}
  .topbar.has-work-context + .layout .sidebar{top:166px}
  .fourball-individual-totals{grid-template-columns:1fr 1fr}
}
@media(max-width:900px){.topbar.has-work-context + .layout .sidebar-backdrop{top:126px}}
@media(max-width:560px){.topbar.has-work-context + .layout .sidebar-backdrop{top:166px}}

/* V11.21.0 - Tee Sets: FASES 5-7 */
.course-tee-active-field .checkbox-line{min-height:42px;display:flex;align-items:center;gap:8px;padding:8px 0}
.course-tee-active-field .checkbox-line input{width:auto;min-width:18px;height:18px}
@media (max-width:700px){.course-selector-form{grid-template-columns:1fr}.course-tee-active-field .checkbox-line{min-height:38px}}

/* ============================================================
   V11.24.0 Â· COURSES Â· MANTENIMIENTO DEL RECORRIDO FÃ�SICO
   ============================================================ */
.course-master-list-card { margin: 14px 0; }
.course-master-table { min-width: 720px; }
.course-master-editor { border-top: 4px solid var(--fede-lime, #89bd24); }
.course-master-fields { grid-template-columns: minmax(180px, .7fr) minmax(260px, 1.8fr); }
.course-master-name-field { min-width: 0; }
.course-master-holes { min-width: 420px; }
.course-master-holes:not(.course-hole-horizontal) th,
.course-master-holes:not(.course-hole-horizontal) td { width: 40%; }
.course-master-holes .course-hole-col { width: 20%; }
.inline-form { display: inline-flex; margin: 0; }
@media (max-width:700px){
    .course-master-fields { grid-template-columns: 1fr; }
    .course-master-table { min-width: 0; }
    .course-master-holes { min-width: 360px; }
}
/* V11.25.0: tactical field controls, shared button language with MyGame. */
[data-mygame-caddie-panel] .mygame-coach-panel{max-height:94vh;max-height:94dvh;padding-bottom:max(.6rem,env(safe-area-inset-bottom));overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.caddie-context fieldset{border:0;padding:0;margin:.35rem 0;min-width:0}.caddie-context legend{font-weight:650;font-size:.9rem;margin-bottom:.25rem}
.caddie-options{display:flex;gap:.3rem}.caddie-options .caddie-choice{flex:1;min-width:0}
.caddie-choice{min-height:44px;padding:.35rem .5rem;border:1px solid #b8c9ce;border-radius:10px;background:#fff;color:#173c46;font:inherit;font-size:.88rem;touch-action:manipulation;cursor:pointer}
.caddie-choice span{display:block;font-size:1.1rem;line-height:1.1}.caddie-choice[aria-pressed=true]{background:#e0f5e6;border:2px solid #13853f;color:#0b4924;font-weight:700}.caddie-choice:focus-visible{outline:3px solid #2469dd;outline-offset:2px}
.caddie-secondary{margin-top:.25rem}.caddie-secondary .caddie-choice{font-size:.8rem}.caddie-tactics{display:grid;grid-template-columns:1fr;gap:.7rem}
.caddie-wind-options{display:grid;grid-template-columns:1fr 1fr;gap:.5rem;margin-bottom:.5rem}.caddie-wind-help{font-size:.9rem;line-height:1.45;margin:.2rem 0 .6rem}.caddie-wind-options .caddie-choice{min-height:58px;display:flex;align-items:center;justify-content:center;gap:.5rem}.caddie-wind-options .caddie-choice span{font-size:1.6rem}
.caddie-rose{display:grid;grid-template-columns:repeat(3,minmax(44px,1fr));grid-template-rows:repeat(3,44px);gap:3px;max-width:230px}.caddie-compass{grid-area:2/2;place-self:center;font-size:1.6rem}.caddie-dir-0{grid-area:1/2}.caddie-dir-45{grid-area:1/3}.caddie-dir-90{grid-area:2/3}.caddie-dir-135{grid-area:3/3}.caddie-dir-180{grid-area:3/2}.caddie-dir-225{grid-area:3/1}.caddie-dir-270{grid-area:2/1}.caddie-dir-315{grid-area:1/1}
.caddie-green{border-radius:48%;background:#d3ebbc;padding:.15rem 1rem;display:flex;flex-direction:column;gap:2px}.caddie-green .caddie-choice{min-height:44px;padding:.1rem}.caddie-green .caddie-choice span{display:inline;margin-right:.3rem}.caddie-green+.caddie-choice{width:100%;margin-top:3px}
.caddie-distance{display:flex!important;align-items:center;gap:.5rem;flex-wrap:wrap;margin:.4rem 0!important}.caddie-distance input{width:6rem;font-size:16px;min-height:44px}.caddie-distance small{font-size:.75rem;flex:1}.caddie-heading{margin:.3rem 0}.caddie-heading summary{min-height:44px;display:flex;align-items:center;cursor:pointer}.caddie-heading small{display:block;margin-bottom:.3rem}
.caddie-actions{position:sticky;bottom:0;background:#fff;padding:.5rem 0;display:flex;gap:.5rem}.caddie-actions button{flex:1;min-height:48px}.caddie-context[hidden]{display:none!important}
[data-mygame-caddie-panel] .mygame-coach-header small{font-size:.8rem}[data-mygame-caddie-panel] .muted{font-size:.75rem}[data-mygame-caddie-panel] .mygame-caddie-result{margin:.6rem 0}
@media(max-width:380px){[data-mygame-caddie-panel] .mygame-coach-panel{padding:.65rem}.caddie-choice{font-size:.8rem;padding:.25rem}.caddie-tactics{gap:.4rem}}
[data-mygame-caddie-panel] .mygame-coach-close{min-width:44px;min-height:44px}

/* V11.25.5 Â· HCP exacto y HCP de juego en Starting List y tarjeta oficial */
.starting-player-hcp {
    display: inline-flex;
    align-items: center;
    margin: 3px 0 0 7px;
    padding: 2px 6px;
    border-radius: 999px;
    background: #eef3ec;
    color: #33483a;
    font-size: 9px;
    font-weight: 800;
    white-space: nowrap;
}
.starting-player-playing-hcp {
    background: #20251f;
    color: #fff;
}
.starting-hcp-help,
.match-player-hcp-help {
    display: none;
}
.match-player-playing-hcp {
    background: #0b6574;
}
.match-player-list .gmz-info-wrap {
    flex: 0 0 auto;
}
@media print {
    .starting-shell .gmz-info-wrap { display: none !important; }
    .starting-player-hcp { border: 1px solid #cfd8cc; }
    .starting-player-playing-hcp { background: #fff; color: #111; }
}


/* V11.25.7 Â· Starting List mÃ¡s limpia en pantalla e impresiÃ³n */
.starting-table th,
.starting-table td {
    border-bottom: 0;
}
.starting-table tbody tr {
    border-bottom: 0;
}
.starting-table tbody tr + tr td {
    padding-top: 14px;
}
.starting-table tbody tr:nth-child(even) {
    background: #fbfcfa;
}
.starting-player-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 8px;
    margin-top: 5px;
    line-height: 1.25;
}
.starting-player-name {
    font-weight: 500;
}
.starting-player-meta {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    color: #536057;
    font-size: 10px;
    white-space: nowrap;
}
.starting-player-hcp,
.starting-player-playing-hcp {
    display: inline;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    font-size: inherit;
    font-weight: 700;
}
.starting-player-playing-hcp {
    color: #1d3f2c;
}
.starting-player-meta-sep {
    color: #9aa49d;
}
.starting-list-body .starting-hcp-help,
.starting-list-body .gmz-info-wrap {
    display: none !important;
}
@media print {
    .starting-table th,
    .starting-table td {
        border: 0 !important;
    }
    .starting-table tbody tr:nth-child(even) {
        background: transparent !important;
    }
    .starting-table tbody tr + tr td {
        padding-top: 8px !important;
    }
    .starting-player-row {
        margin-top: 2px;
        gap: 1px 5px;
    }
    .starting-player-meta {
        font-size: 8.5pt;
    }
    .starting-player-hcp,
    .starting-player-playing-hcp {
        border: 0 !important;
        background: transparent !important;
        color: #222 !important;
        padding: 0 !important;
    }
}

/* V11.25.8 Â· El aviso legal aprovecha todo el ancho Ãºtil de la pÃ¡gina. */
.legal-wrap {
    width: calc(100% - clamp(28px, 5vw, 72px));
    max-width: none;
}

/* V11.25.11 Â· Controles de rotaciÃ³n del marcador TV */
.tv-rotation-status {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    flex-wrap: wrap;
}
.tv-rotation-summary {
    display: grid;
    gap: 2px;
    text-align: right;
}
.tv-rotation-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.tv-rotation-actions .btn {
    min-height: 40px;
    padding: 8px 12px;
}
.tv-rotation-pause.is-active {
    box-shadow: 0 0 0 2px var(--gmz-accent, #72c51c) inset;
}
.tv-rotation-seconds {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}
.tv-rotation-seconds input {
    width: 68px;
    min-height: 40px;
    padding: 6px 8px;
    text-align: center;
}
@media (max-width: 760px) {
    .tv-rotation-status,
    .tv-rotation-actions {
        justify-content: flex-start;
    }
    .tv-rotation-summary {
        text-align: left;
        width: 100%;
    }
}


/* ============================================================
   V11.29.5 - ReorganizaciÃ³n visual de gestiÃ³n
   Listados arriba, ediciÃ³n debajo, footer a ancho Ãºtil completo.
   ============================================================ */

/* GestiÃ³n: una sola columna en escritorio y mÃ³vil. */
.tournaments-page-grid,
.players-management-grid,
.matches-management-grid,
.management-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100%;
    max-width: 100%;
    align-items: start;
}
.tournaments-page-grid > *,
.players-management-grid > *,
.matches-management-grid > *,
.management-grid > * {
    grid-column: 1 / -1 !important;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}
.tournament-editor-panel,
.player-editor-panel,
.matches-management-grid .match-editor-panel,
.management-grid .sticky-form {
    position: static !important;
    top: auto !important;
}

/* Teams: listado y editor a ancho completo. */
body .grid > .team-card-grid,
body .grid > section.span-7,
body .grid > section.span-5#team-form {
    grid-column: 1 / -1;
}

/* Sponsors: listado primero visualmente, editor debajo. */
body .grid > .sponsor-list-panel {
    grid-column: 1 / -1 !important;
    order: 1;
}
body .grid > section.span-4:has(form[action*="sponsors"]),
body .grid > section.span-4:first-child {
    grid-column: 1 / -1 !important;
    order: 2;
}

/* Captains: cards arriba, editor debajo. */
.management-grid > .captain-card-grid,
.management-grid > #captain-form {
    grid-column: 1 / -1 !important;
}

/* Matches: programa/listado antes de cualquier editor. */
.matches-management-grid > .player-my-matches { order: 0; }
.matches-management-grid > .match-program-panel { order: 1; }
.matches-management-grid > .match-editor-panel { order: 2; }

/* Footer / disclaimer: ocupa todo el ancho Ãºtil del contenido. */
.app-footer {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}
.app-footer-card,
.app-footer-tech {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}
.app-footer-card {
    margin-left: 0;
    margin-right: 0;
}

/* MyGame Bag: lista compacta responsive. */
.bag-list-wrap {
    width: 100%;
    overflow-x: auto;
    margin-top: 14px;
    border: 1px solid var(--line, #dfe6e1);
    border-radius: 10px;
}
.bag-list-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}
.bag-list-table th,
.bag-list-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line, #e5ebe7);
    text-align: left;
    vertical-align: middle;
}
.bag-list-table th {
    background: var(--golf-dark, #063443);
    color: #fff;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.bag-list-table tbody tr:last-child td { border-bottom: 0; }
.bag-list-table .bag-actions { white-space: nowrap; text-align: right; }
.bag-list-table .bag-actions form { display: inline-flex; gap: 6px; align-items: center; margin: 0; }

/* Courses: matriz horizontal hoyos 1..18. */
.course-hole-horizontal-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #e1e6dc;
    border-radius: 8px;
    background: #fff;
}
.course-hole-horizontal {
    width: 100%;
    min-width: 1244px;
    border-collapse: collapse;
    table-layout: fixed;
}
.course-hole-horizontal th,
.course-hole-horizontal td {
    width: 64px;
    min-width: 64px;
    padding: 7px 5px;
    text-align: center;
    border-right: 1px solid #e8ece4;
    border-bottom: 1px solid #e8ece4;
}
.course-hole-horizontal th:first-child,
.course-hole-horizontal td:first-child {
    width: 92px;
    position: sticky;
    left: 0;
    z-index: 2;
    min-width: 92px;
    background: var(--fede-charcoal, #252822);
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.course-hole-horizontal thead th {
    background: var(--fede-charcoal, #252822);
    color: #fff;
    font-size: 10px;
}
.course-hole-horizontal input {
    width: 54px;
    min-width: 54px;
    padding: 7px 3px;
    text-align: center;
    box-sizing: border-box;
}
.course-hole-horizontal .back-nine-col {
    border-left: 3px solid var(--fede-lime, #89bd24);
}
.course-hole-horizontal tr:last-child td,
.course-hole-horizontal tr:last-child th { border-bottom: 0; }

@media (max-width: 700px) {
    .app-footer { padding-left: 12px; padding-right: 12px; }
    .app-footer-card { align-items: flex-start; }
}


/* V11.29.5 - Sponsors y GalerÃ­a con patrÃ³n lista arriba / ediciÃ³n debajo */
body .grid > .sponsor-editor-panel {
    grid-column: 1 / -1 !important;
    order: 2;
}
body .grid > .sponsor-list-panel {
    grid-column: 1 / -1 !important;
    order: 1;
}

.gallery-admin-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 18px;
}
.gallery-admin-layout > * {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}
.gallery-albums {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.gallery-albums > h2 { order: 0; }
.gallery-albums > .album-list { order: 1; }
.gallery-albums > .gallery-album-create-form { order: 2; }
.gallery-albums > form:not(.gallery-album-create-form) { order: 3; }

.gallery-admin-content {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.gallery-admin-content > .gallery-grid-admin { order: 1; }
.gallery-admin-content > .gallery-album-editor,
.gallery-admin-content > .empty-state { order: 2; }
.gallery-admin-content > .gallery-upload-card { order: 3; }

/* La lista de fotos aprovecha el ancho completo antes de los formularios. */
.gallery-grid-admin {
    width: 100%;
    max-width: 100%;
}

/* V11.29.6 - Usuarios globales unificados */
.global-users-unified-layout{grid-template-columns:minmax(0,1fr)!important;width:100%;}
.global-users-master-card{grid-column:1/-1!important;width:100%;max-width:none;}
.global-users-master-table{min-width:1180px;}
.global-users-master-filters{grid-template-columns:repeat(auto-fit,minmax(180px,1fr));align-items:end;}
.global-users-master-filters .form-actions{grid-column:1/-1;}


/* V11.29.9 - Clubes: filtro > listado > ediciÃ³n */
.venue-management-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 18px;
    width: 100%;
    max-width: 100%;
}
.venue-management-layout > .venue-list-panel,
.venue-management-layout > .venue-editor-panel {
    grid-column: 1 / -1 !important;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}
.venue-management-layout > .venue-list-panel { order: 1; }
.venue-management-layout > .venue-editor-panel {
    order: 2;
    position: static !important;
    top: auto !important;
}

/* V11.30.0 - contexto visible de la ronda Strokes Gained */
.mygame-sg-round-context{margin:.35rem 0 0;font-size:.95rem;}

/* ========================================================================== */
/* V12.0.0 - UX transversal: toasts, validacion recuperable y Matches fluidos */
/* ========================================================================== */
.gmz-toast-stack{position:fixed;top:18px;right:18px;z-index:10050;display:flex;flex-direction:column;gap:10px;width:min(430px,calc(100vw - 28px));pointer-events:none}
.gmz-toast{pointer-events:auto;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:start;gap:10px;padding:13px 14px;border:1px solid rgba(255,255,255,.55);border-radius:14px;box-shadow:0 14px 42px rgba(6,52,67,.18);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);color:#0b3540;background:rgba(255,255,255,.88);animation:gmzToastIn .2s ease-out}
.gmz-toast.is-success{background:rgba(232,249,237,.91);border-color:rgba(52,168,83,.32)}
.gmz-toast.is-error{background:rgba(255,236,236,.94);border-color:rgba(202,53,53,.34)}
.gmz-toast.is-warning{background:rgba(255,247,224,.94);border-color:rgba(207,151,25,.36)}
.gmz-toast.is-info{background:rgba(235,247,250,.93);border-color:rgba(22,151,179,.30)}
.gmz-toast-icon{font-weight:900;line-height:1.25}.gmz-toast-message{font-size:13px;font-weight:700;line-height:1.45;overflow-wrap:anywhere}.gmz-toast-close{border:0;background:transparent;color:inherit;font-size:19px;line-height:1;cursor:pointer;padding:0 2px;opacity:.65}.gmz-toast-close:hover{opacity:1}
@keyframes gmzToastIn{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:none}}
.gmz-field-invalid,input.gmz-field-invalid,select.gmz-field-invalid,textarea.gmz-field-invalid{border-color:#c93636!important;box-shadow:0 0 0 3px rgba(201,54,54,.10)!important;background-color:#fffafa!important}
.gmz-field-error{display:block;margin-top:5px;color:#a92727;font-size:11px;font-weight:700;line-height:1.35}
.gmz-draft-restored{outline:2px solid rgba(22,151,179,.16);outline-offset:4px;border-radius:8px}
@media(min-width:701px){
  .match-program-panel .table-wrap{overflow-x:visible!important}
  .match-management-table{width:100%!important;min-width:0!important;table-layout:fixed}
  .match-management-table th:nth-child(1),.match-management-table td:nth-child(1){width:34px}
  .match-management-table th:nth-child(2),.match-management-table td:nth-child(2){width:76px}
  .match-management-table th:nth-child(3),.match-management-table td:nth-child(3){width:205px}
  .match-management-table th:nth-child(4),.match-management-table td:nth-child(4){width:58px}
  .match-management-table th:nth-child(5),.match-management-table td:nth-child(5){width:31%}
  .match-management-table th:nth-child(6),.match-management-table td:nth-child(6){width:82px}
  .match-management-table th:nth-child(7),.match-management-table td:nth-child(7){width:62px}
  .match-management-table th:nth-child(8),.match-management-table td:nth-child(8){width:52px}
  .match-management-table th,.match-management-table td{padding-left:7px!important;padding-right:7px!important;min-width:0!important}
  .match-management-table .lineup-mini{min-width:0;max-width:100%;font-size:10px;line-height:1.25}
  .match-management-table .lineup-mini span{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .match-management-table .management-team-faceoff{min-width:0;gap:5px}
  .match-management-table .management-team-token{min-width:0;max-width:88px}
  .match-management-table .management-team-token b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
}
@media(max-width:700px){.gmz-toast-stack{top:10px;right:10px;width:calc(100vw - 20px)}}

/* V12.0.1 - Importaciones Excel en capa comÃºn */
body.gmz-import-open{overflow:hidden}
.gmz-import-launchbar{display:flex;justify-content:flex-end;gap:.65rem;margin:0 0 14px}
.gmz-import-overlay{position:fixed;inset:0;z-index:19000;display:flex;align-items:center;justify-content:center;padding:22px;background:rgba(4,31,38,.46);backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px)}
.gmz-import-overlay[hidden]{display:none}
.gmz-import-sheet{width:min(760px,100%);max-height:calc(100dvh - 44px);overflow:auto;background:rgba(255,255,255,.97);border:1px solid rgba(6,52,67,.13);border-radius:20px;box-shadow:0 28px 90px rgba(0,0,0,.3);padding:22px;box-sizing:border-box}
.gmz-import-sheet-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:12px}.gmz-import-sheet-head h2{margin:.15rem 0 0}.gmz-import-close{border:0;background:rgba(6,52,67,.07);color:var(--brand-secondary,#063443);width:40px;height:40px;border-radius:12px;font-size:28px;line-height:1;cursor:pointer;flex:0 0 auto}.gmz-import-close:hover{background:rgba(6,52,67,.13)}
.gmz-import-sheet .player-import-card,.gmz-import-sheet .card{box-shadow:none;border:0;padding:0;margin:0;background:transparent}.gmz-import-sheet .player-import-card>.section-head{display:none}.gmz-import-template-action{display:flex;justify-content:flex-end;margin:12px 0 18px}.gmz-import-sheet-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}
@media(max-width:640px){.gmz-import-overlay{align-items:flex-end;padding:0}.gmz-import-sheet{width:100%;max-height:92dvh;border-radius:20px 20px 0 0;padding:18px}.gmz-import-template-action,.gmz-import-sheet-actions{justify-content:stretch}.gmz-import-template-action .btn,.gmz-import-sheet-actions .btn{width:100%}}

/* V12.0.2 - Gallery Admin: filtros > registros > ediciÃ³n */
.gallery-admin-v1202{display:flex;flex-direction:column;gap:18px;width:100%;min-width:0}
.gallery-admin-filters,.gallery-admin-records,.gallery-admin-editors>.card{width:100%;min-width:0}
.gallery-filter-grid{display:grid;grid-template-columns:minmax(170px,.8fr) minmax(240px,1.5fr) minmax(150px,.7fr) auto;gap:12px;align-items:end}
.gallery-filter-grid label{display:flex;flex-direction:column;gap:6px;font-weight:700;font-size:12px}
.gallery-filter-grid .form-actions{margin:0;align-self:end}
.gallery-album-records{display:flex;flex-direction:column;border:1px solid var(--border,#dbe5e8);border-radius:12px;overflow:hidden}
.gallery-album-record{display:grid;grid-template-columns:minmax(0,1fr) auto 52px;gap:12px;align-items:center;padding:12px 14px;color:inherit;text-decoration:none;border-bottom:1px solid var(--border,#dbe5e8);background:#fff}
.gallery-album-record:last-child{border-bottom:0}.gallery-album-record:hover{background:#f7fbfc}.gallery-album-record.is-selected{background:#eef8f9;box-shadow:inset 4px 0 0 var(--primary,#0b8391)}
.gallery-album-record-main{display:flex;flex-direction:column;min-width:0}.gallery-album-record-main small{color:var(--muted,#6c7f85);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gallery-album-record-order{text-align:right;color:var(--muted,#6c7f85);font-size:12px}
.gallery-record-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(270px,1fr));gap:14px}.gallery-record{min-width:0;overflow:hidden;border:1px solid var(--border,#dbe5e8);border-radius:14px;background:#fff}.gallery-record>img{width:100%;aspect-ratio:16/10;object-fit:cover}.gallery-record .gallery-photo-body{padding:12px}.gallery-record[hidden]{display:none!important}
.gallery-comments-admin{margin-top:10px;border-top:1px solid var(--border,#dbe5e8);padding-top:9px}.gallery-comments-admin summary{cursor:pointer;font-weight:800;font-size:12px}
.gallery-admin-editors{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;align-items:start}.gallery-admin-editors>#galleryPhotoCreate{grid-column:1/-1}.gallery-editor-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.gallery-editor-form label{display:flex;flex-direction:column;gap:6px}.gallery-editor-form label:has(textarea),.gallery-editor-form .form-actions{grid-column:1/-1}.gallery-editor-form .check-row{flex-direction:row;align-items:center}.gallery-delete-form{margin-top:12px;padding-top:12px;border-top:1px solid var(--border,#dbe5e8)}
@media(max-width:800px){.gallery-filter-grid,.gallery-admin-editors,.gallery-editor-form{grid-template-columns:1fr}.gallery-admin-editors>#galleryPhotoCreate,.gallery-editor-form label:has(textarea),.gallery-editor-form .form-actions{grid-column:auto}.gallery-album-record{grid-template-columns:minmax(0,1fr) auto}.gallery-album-record-order{display:none}.gallery-record-grid{grid-template-columns:1fr}}

/* V12.0.3 - condiciÃ³n de plantilla y sustituciones */
.badge-orange{color:#8a4300;background:#ffe2bd;border:1px solid #f2bd79}
body.gmz-modal-open{overflow:hidden}
[data-substitution-modal] .field{margin-top:.85rem}
[data-substitution-modal] select option[data-substitute="1"]{font-weight:700}
/* V12.0.7 - ComunicaciÃ³n de usuarios */
.gmz-access-note{display:flex;align-items:center;gap:10px;padding:9px 12px;margin:8px 0;border:1px solid var(--border,#dce3df);border-radius:10px;background:rgba(255,255,255,.72);font-size:13px}.status-pill{display:inline-flex;align-items:center;justify-content:center;min-width:82px;padding:4px 9px;border-radius:999px;font-size:11px;font-weight:800;letter-spacing:.04em}.status-pill--active{background:#dff4e5;color:#176b35}.status-pill--pending{background:#fff0d8;color:#a85a00}.gmz-choice-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:7px}.gmz-choice-card{display:flex!important;align-items:flex-start;gap:10px;padding:13px;border:1px solid var(--border,#dce3df);border-radius:12px;background:#fff;cursor:pointer}.gmz-choice-card:has(input:checked){border-color:#20844b;box-shadow:0 0 0 2px rgba(32,132,75,.10);background:#f7fcf8}.gmz-choice-card input{width:18px!important;height:18px!important;min-width:18px;margin:2px 0 0}.gmz-choice-card span{display:flex;flex-direction:column;gap:3px}.gmz-choice-card strong{font-size:14px}.gmz-choice-card small{font-size:12px;color:var(--muted,#66736c);font-weight:400}@media(max-width:700px){.gmz-choice-grid{grid-template-columns:1fr}.gmz-access-note{align-items:flex-start}}

/* V12.0.12 - retorno de contexto torneo -> Jugador GMZ */
.nav .nav-work-context-return { margin: 5px 0; }
.nav .nav-link-button {
    width: 100%; margin: 0; padding: 12px 14px; display: flex; align-items: center; gap: 10px;
    border: 0; border-radius: 10px; color: #dce9e0; background: transparent;
    font: inherit; text-align: left; cursor: pointer;
}
.nav .nav-link-button:hover, .nav .nav-link-button:focus-visible {
    color: #ffffff; background: linear-gradient(90deg,var(--golf),#31913f);
}

/* ---- V12.0.17 Resultados finales HTML / imprimible ---- */
.final-results-shell .final-results-section {
    margin-top: 18px;
}

.final-results-shell .final-results-section h2 {
    margin: 0 0 8px;
    color: #063443;
    font-size: 17px;
}

.final-results-winner {
    display: grid;
    justify-items: center;
    gap: 3px;
    margin: 4px 0 18px;
    padding: 14px 18px;
    border: 1px solid #93c59f;
    border-left: 5px solid var(--fede-green, #5c9424);
    border-radius: 10px;
    background: #f1f8f1;
    text-align: center;
}

.final-results-winner span {
    color: var(--fede-green, #5c9424);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .1em;
}

.final-results-winner strong {
    color: #063443;
    font-size: clamp(22px, 3vw, 34px);
}

.final-results-winner small {
    color: #53665b;
    font-size: 13px;
    font-weight: 800;
}

.final-results-winner.is-tied {
    border-color: #d7c58a;
    border-left-color: #b3932b;
    background: #fffaf0;
}

.final-standings-table {
    max-width: 640px;
}

.final-standings-table th:first-child,
.final-standings-table td:first-child {
    width: 70px;
    text-align: center;
}

.final-standings-table th:last-child,
.final-standings-table td:last-child {
    width: 120px;
    text-align: center;
}

.final-standings-table tr.is-leader td {
    background: #f1f8f1;
}

.final-results-table th:nth-child(1) { width: 4%; }
.final-results-table th:nth-child(2) { width: 7%; }
.final-results-table th:nth-child(3) { width: 5%; }
.final-results-table th:nth-child(4) { width: 9%; }
.final-results-table th:nth-child(5),
.final-results-table th:nth-child(6) { width: 25%; }
.final-results-table th:nth-child(7) { width: 11%; }
.final-results-table th:nth-child(8) { width: 9%; }

.final-results-table .starting-player-hcp {
    white-space: nowrap;
    color: #53665b;
    font-size: 10px;
}

@media (max-width: 760px) {
    .final-results-table {
        min-width: 980px;
    }
}

@media print {
    .final-results-body .final-results-winner,
    .final-results-body .final-standings-table tr.is-leader td {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .final-results-body .final-results-section {
        break-inside: avoid;
    }

    .final-results-body .final-results-table {
        font-size: 9px;
    }
}


/* GMZ TV 13.1.5 â€” tarjetas Ryder y adaptaciÃ³n responsive.
   Estas reglas se sitÃºan al final para prevalecer sobre versiones anteriores. */
.tv-live-result-card .tv-live-result-value {
    overflow: visible;
    white-space: normal;
    text-overflow: clip;
    overflow-wrap: anywhere;
    line-height: 1.12;
}
.tv-live-result-card .tv-live-result-winner {
    display: block;
    margin-top: 3px;
    font-size: clamp(10px, .75vw, 13px);
    font-weight: 900;
    line-height: 1.1;
}
.tv-live-result-card .tv-live-result-value {
    font-size: clamp(18px, 1.5vw, 26px);
    font-weight: 950;
}
@media (min-width: 1101px) {
    /* Los 12 resultados deben caber sin cortar la Ãºltima lÃ­nea. */
    .tv-scoreboard-shell .tv-live-results-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        grid-template-rows: repeat(3, minmax(0, 1fr));
        min-height: 0;
        overflow: visible;
        gap: 5px;
    }
    .tv-scoreboard-shell .tv-live-result-card {
        min-height: 0;
        padding: 4px 8px;
        overflow: hidden;
    }
    .tv-scoreboard-shell .tv-live-result-meta { margin-bottom: 1px; }
    .tv-scoreboard-shell .tv-live-result-clubs { margin-top: 1px; }
    .tv-scoreboard-shell .tv-live-result-value { margin-top: 2px; font-size: clamp(16px, 1.3vw, 23px); }
    .tv-scoreboard-shell .tv-live-result-winner { margin-top: 1px; font-size: 10px; }
}
@media (max-width: 1100px) {
    .tv-scoreboard-shell,
    .tv-scoreboard-shell .tv-overview,
    .tv-scoreboard-shell .tv-results-panel,
    .tv-scoreboard-shell .tv-detail-stage,
    .tv-scoreboard-shell .tv-carousel,
    .tv-scoreboard-shell .tv-match-detail,
    .tv-scoreboard-shell .tv-match-detail-top {
        height: auto;
        max-height: none;
        min-height: 0;
        overflow: visible;
    }
    .tv-scoreboard-shell .tv-live-results-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: none;
        grid-auto-rows: auto;
        overflow: visible;
    }
    .tv-scoreboard-shell .tv-live-result-card { min-height: 76px; overflow: visible; }
    .tv-scoreboard-shell .tv-match-detail.is-active {
        display: flex;
        flex-direction: column;
        height: auto;
        max-height: none;
        overflow: visible;
    }
    .tv-scoreboard-shell .tv-match-detail-top {
        display: flex;
        flex-direction: column;
        overflow: visible;
    }
    .tv-scoreboard-shell .tv-hole-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-template-rows: none;
        gap: 5px;
    }
    .tv-scoreboard-shell .tv-hole-cell {
        min-width: 0;
        min-height: 55px;
    }
}
@media (max-width: 600px) {
    .tv-scoreboard-shell .tv-live-results-grid { grid-template-columns: minmax(0, 1fr); }
    .tv-scoreboard-shell .tv-live-result-card { min-height: 72px; }
    .tv-scoreboard-shell .tv-match-score-center { min-height: 85px; }
    .tv-scoreboard-shell .tv-hole-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* TV 13.1.6 â€” tabla RyderCup; no alterar resumen mÃ³vil */
.tv-scoreboard-shell .tv-ryder-board { min-width:0; background:#0e1119; border:1px solid #262b36; border-radius:12px; padding:9px 12px; color:#e9edf6; }
.tv-scoreboard-shell .tv-ryder-board .tv-hole-board-head { color:#f2f5fd; }
.tv-scoreboard-shell .tv-ryder-scroll { overflow-x:auto; overflow-y:hidden; max-width:100%; width:100%; scrollbar-width:thin; -webkit-overflow-scrolling:touch; }
.tv-scoreboard-shell .tv-ryder-table { width:100%; border-collapse:collapse; table-layout:fixed; min-width:760px; font-size:12px; text-align:center; color:#e4e9f5; }
.tv-scoreboard-shell .tv-ryder-table th,.tv-scoreboard-shell .tv-ryder-table td { border:1px solid #272c36; padding:7px 2px; text-align:center; white-space:nowrap; line-height:1.2; }
.tv-scoreboard-shell .tv-ryder-table tr>:first-child { position:sticky; left:0; z-index:2; background:#11151f; width:152px; min-width:152px; max-width:152px; overflow:hidden; text-overflow:ellipsis; font-weight:800; }
.tv-scoreboard-shell .tv-ryder-table thead tr:first-child th { color:#e4f5ff; font-weight:800; }
.tv-scoreboard-shell .tv-ryder-table .tv-ryder-course-row { color:#b0bedc; }
.tv-scoreboard-shell .tv-ryder-table .tv-ryder-player th { color:var(--ryder-side-color, #ecf1ff); }
.tv-scoreboard-shell .tv-ryder-table .tv-ryder-player td span { display:inline-flex; align-items:center; justify-content:center; min-width:24px; height:24px; font-weight:750; }
.tv-scoreboard-shell .tv-ryder-table .tv-ryder-player td.is-hole-winner span { border-radius:50%; background:var(--ryder-side-color, #2779c4); color:white; box-shadow:0 0 0 3px #303746; }
.tv-scoreboard-shell .tv-ryder-swipe-hint { display:none; font-size:10px; color:#a2aec5; margin-top:5px; }
@media(min-width:1101px) {
 .tv-scoreboard-shell .tv-live-results-grid { grid-template-rows:repeat(3,minmax(0,1fr)); grid-auto-rows:minmax(0,1fr); gap:5px; overflow:hidden; }
 .tv-scoreboard-shell .tv-live-result-card { padding:3px 8px; justify-content:center; min-height:0; }
 .tv-scoreboard-shell .tv-live-result-meta { margin-bottom:1px; line-height:1; }
 .tv-scoreboard-shell .tv-live-result-clubs { line-height:1; }
 .tv-scoreboard-shell .tv-live-result-value { font-size:clamp(14px,1.25vw,19px); line-height:1; margin-top:2px; white-space:nowrap; overflow:hidden; }
 .tv-scoreboard-shell .tv-ryder-table { font-size:clamp(9px,.68vw,12px); }
 .tv-scoreboard-shell .tv-ryder-table th,.tv-scoreboard-shell .tv-ryder-table td { padding:5px 2px; }
}
@media(max-width:1100px) {
 .tv-scoreboard-shell .tv-ryder-board { padding:9px 6px; }
 .tv-scoreboard-shell .tv-ryder-table { width:max-content; min-width:980px; }
 .tv-scoreboard-shell .tv-ryder-swipe-hint { display:block; }
}


/* ===========================================================
   GMZ TV 13.1.7 â€” tabla Ryder Cup: contraste PC y mÃ³vil
   EXCLUSIVAMENTE .tv-ryder-board, sin modificar tarjetas resumen.
   Los colores y el resaltado se basan en las clases actuales JSP.
   =========================================================== */
.tv-scoreboard-shell .tv-ryder-board {
    background: #14212d;
    border-color: #31475a;
    color: #f5f8fc;
}
.tv-scoreboard-shell .tv-ryder-board .tv-hole-board-head,
.tv-scoreboard-shell .tv-ryder-board .tv-hole-board-head span {
    color: #f7fbff;
}
.tv-scoreboard-shell .tv-ryder-board .tv-hole-board-head small,
.tv-scoreboard-shell .tv-ryder-board .tv-ryder-swipe-hint {
    color: #c0d1df;
}
.tv-scoreboard-shell .tv-ryder-board .tv-ryder-table {
    background: #1f3040;
    color: #f2f7fc;
    border-collapse: collapse;
}
.tv-scoreboard-shell .tv-ryder-board .tv-ryder-table tr > th,
.tv-scoreboard-shell .tv-ryder-board .tv-ryder-table tr > td {
    background: #1f3040 !important;
    border: 1px solid #405368;
    color: #f1f6fc !important;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.tv-scoreboard-shell .tv-ryder-board .tv-ryder-table thead tr:first-child > th {
    background: #263b4e !important;
    color: #ffffff !important;
    font-weight: 900;
}
.tv-scoreboard-shell .tv-ryder-board .tv-ryder-table .tv-ryder-course-row > th,
.tv-scoreboard-shell .tv-ryder-board .tv-ryder-table .tv-ryder-course-row > td {
    background: #243647 !important;
    color: #c8d8e8 !important;
    font-weight: 600;
}
.tv-scoreboard-shell .tv-ryder-board .tv-ryder-table tr > :first-child {
    background: #162533 !important;
    color: #f2f8ff !important;
    z-index: 3;
}
.tv-scoreboard-shell .tv-ryder-board .tv-ryder-table .tv-ryder-player > th {
    color: var(--ryder-side-color, #f2f8ff) !important;
    font-weight: 900;
    text-align: left;
    padding-left: 10px;
    text-overflow: ellipsis;
}
.tv-scoreboard-shell .tv-ryder-board .tv-ryder-table .tv-ryder-player > td {
    background: #213445 !important;
    color: #ffffff !important;
}
.tv-scoreboard-shell .tv-ryder-board .tv-ryder-table .tv-ryder-player > td > span {
    color: #ffffff !important;
    font-weight: 800;
    min-width: 25px;
    height: 25px;
}
.tv-scoreboard-shell .tv-ryder-board .tv-ryder-table .tv-ryder-player > td.is-hole-winner > span {
    background: var(--ryder-side-color, #2474b2) !important;
    color: #ffffff !important;
    border-radius: 50%;
    box-shadow: 0 0 0 2px #50667b;
}
/* La tabla conserva el scroll horizontal en mÃ³vil y el ancho en TV. */
@media (max-width: 1100px) {
    .tv-scoreboard-shell .tv-ryder-board .tv-ryder-table tr > :first-child {
        width: 152px;
        min-width: 152px;
        max-width: 152px;
    }
}


/* =============================================================
   GMZ 13.1.8 â€” Botones de acciÃ³n: sistema visual verde unificado.
   Todas las variantes .btn (principal, light, secondary, danger,
   alava...) comparten apariencia sin alterar su comportamiento.
   Los estados deshabilitados mantienen una distinciÃ³n accesible.
   ============================================================= */
html body :is(a.btn, button.btn, input.btn, .btn),
html body :is(a.btn, button.btn, input.btn, .btn):link,
html body :is(a.btn, button.btn, input.btn, .btn):visited {
    color: #ffffff !important;
    background: linear-gradient(135deg, #24b94f 0%, #159b3e 100%) !important;
    border: 1px solid #148c37 !important;
    border-radius: 11px;
    font-family: inherit;
    font-weight: 800;
    line-height: 1.3;
    text-decoration: none;
    box-shadow: 0 3px 10px rgba(20, 130, 57, .16);
    transition: background .18s ease, box-shadow .18s ease, transform .18s ease;
}
html body :is(a.btn, button.btn, input.btn, .btn):is(:hover, :focus-visible):not(:disabled):not([aria-disabled="true"]) {
    color: #ffffff !important;
    background: linear-gradient(135deg, #189c40 0%, #10792f 100%) !important;
    border-color: #0e742d !important;
    box-shadow: 0 5px 16px rgba(20, 130, 57, .25);
}
html body :is(a.btn, button.btn, input.btn, .btn):focus-visible {
    outline: 3px solid #073d1d;
    outline-offset: 3px;
}
html body :is(a.btn, button.btn, input.btn, .btn):is(:disabled,[aria-disabled="true"]) {
    opacity: .52;
    cursor: not-allowed;
    box-shadow: none;
}
/* Acciones reales tambiÃ©n aparecen como opciones dentro de menÃºs JSP. */
html body :is(a.action-menu-item,button.action-menu-item,.action-menu-button):not(.action-menu-note) {
    background: #1b9d46 !important;
    border: 1px solid #137c36 !important;
    border-radius: 8px;
    color: #ffffff !important;
    font-weight: 800;
    box-shadow: none;
    text-decoration: none;
}
html body :is(a.action-menu-item,button.action-menu-item,.action-menu-button):is(:hover,:focus-visible):not(:disabled) {
    background: #127d36 !important;
    border-color: #0d642a !important;
    color: #ffffff !important;
}
html body .action-menu-items { gap: 4px; }
html body .action-menu-items .action-menu-item { margin: 2px 0; }
/* No convertimos en acciones primarias los toggles, chips, nÃºmeros de hoyo,
   botones informativos o controles de navegaciÃ³n con estado propio. */

/* Acciones iconogrÃ¡ficas: misma identidad, sin perder su tamaÃ±o propio. */
html body :is(.gmz-import-close,.gmz-info-button,.mygame-info-button,.mobile-toggle,.nav-logout-button) {
    background: #1aa247 !important;
    color: #fff !important;
    border-color: #12803a !important;
}
html body :is(.gmz-import-close,.gmz-info-button,.mygame-info-button,.mobile-toggle,.nav-logout-button):is(:hover,:focus-visible):not(:disabled) {
    background: #117b34 !important;
    color: #fff !important;
    border-color: #0b6528 !important;
}

/* GMZ 13.5.24 - Editor de barras: 4 campos por fila en escritorio.
   Clase exclusiva de esta pantalla; no altera otros formularios. */
@media (min-width: 1051px) {
    .course-main-fields.course-tee-fields-compact {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        align-items: start;
        gap: 12px 14px;
    }
}
@media (min-width: 701px) and (max-width: 1050px) {
    .course-main-fields.course-tee-fields-compact {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}
@media (max-width: 700px) {
    .course-main-fields.course-tee-fields-compact {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}
.course-main-fields.course-tee-fields-compact > .field { min-width: 0; }
.course-main-fields.course-tee-fields-compact .course-tee-active-field .checkbox-line {
    min-height: 38px;
    display: flex;
    align-items: center;
}

/* Compact flag choices beside the shot-relative wind controls. */
[data-mygame-caddie-panel] .caddie-green{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.35rem;background:none;border-radius:0;padding:0;margin-bottom:.4rem;max-width:none}

/* MyGame Voice 15.0.0 */
.mygame-voice{margin:1rem 0;padding:1rem;border:1px solid var(--border-color,#ccd3dc);border-radius:12px}.mygame-voice-actions{display:flex;align-items:center;flex-wrap:wrap;gap:.5rem;margin:.6rem 0}.mygame-voice-actions select{min-width:3.5rem;min-height:42px}.mygame-voice [data-voice-status]{min-height:1.5em}.mygame-voice [data-voice-list]{margin-top:.5rem}
