@import url('https://fonts.googleapis.com/css2?family=Archivo:ital,wdth,wght@0,62..125,400..900;1,62..125,400..900&display=swap');

/* =================================
   TOKENS — verde y blanco FERGOM
================================= */

:root {
    --ink: #06130c;          /* fondo profundo */
    --panel: #0b2016;        /* paneles */
    --panel-2: #113022;      /* paneles elevados / hover */
    --court: #17804a;        /* verde pista */
    --accent: #3fd07a;       /* verde FERGOM */
    --white: #ffffff;
    --soft: #9fb8a8;         /* texto secundario */
    --line: rgba(159, 184, 168, 0.18);
    --loss: #ff6b6b;

    /* compatibilidad */
    --green: var(--accent);
    --muted: var(--soft);
    --border: var(--line);

    --font: 'Archivo', system-ui, -apple-system, sans-serif;
}

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

/* Lo marcado como oculto se oculta siempre (ventana de acceso, avisos, formularios) */
[hidden] {
    display: none !important;
}

body {
    background:
        radial-gradient(1200px 500px at 85% -10%, rgba(23, 128, 74, 0.35), transparent 60%),
        var(--ink);
    color: var(--white);
    font-family: var(--font);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* =================================
   CABECERA
================================= */

.header {
    position: sticky;
    top: 0;
    z-index: 10;
    height: 72px;
    padding: 0 7%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(6, 19, 12, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.logo {
    display: flex;
    flex-direction: column;
    font-size: 26px;
    font-weight: 900;
    font-style: italic;
    font-variation-settings: "wdth" 75;
    line-height: 0.9;
    letter-spacing: 0.5px;
}

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

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 2px rgba(63, 208, 122, 0.35);
}

.logo small {
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    font-style: normal;
    font-variation-settings: "wdth" 110;
    letter-spacing: 3px;
    margin-top: 3px;
}

.season {
    color: var(--white);
    background: var(--court);
    padding: 7px 12px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    transform: skewX(-10deg);
}

/* =================================
   CONTENEDOR + HERO
================================= */

.container {
    max-width: 1150px;
    width: 90%;
    margin: auto;
}

.hero {
    position: relative;
    padding: 70px 0 60px;
    min-height: 430px;
}

.eyebrow {
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.hero h1 {
    position: relative;
    z-index: 1;
    max-width: 640px;
    font-size: clamp(54px, 9vw, 112px);
    font-weight: 900;
    font-style: italic;
    font-variation-settings: "wdth" 62;
    line-height: 0.86;
    letter-spacing: -1px;
    text-transform: uppercase;
}

.hero h1 span {
    display: block;
    color: var(--accent);
}

.hero > p:not(.eyebrow) {
    position: relative;
    z-index: 1;
    color: var(--soft);
    margin-top: 18px;
    font-size: 16px;
    max-width: 38ch;
}

/* Pista animada + escudo del club */
.hero-visual {
    position: absolute;
    right: 0;
    top: 58%;
    width: min(46%, 470px);
    transform: translateY(-30%);
}

.court {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 1;
    transform: perspective(900px) rotateX(48deg) rotateZ(-8deg);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 45%),
        var(--court);
    border: 3px solid rgba(255, 255, 255, 0.92);
    border-radius: 4px;
    box-shadow:
        0 0 0 10px rgba(63, 208, 122, 0.18),
        0 40px 80px rgba(0, 0, 0, 0.55);
    overflow: hidden;
}

.court span {
    position: absolute;
    display: block;
}

.court-net {
    left: 50%;
    top: -2%;
    bottom: -2%;
    width: 4px;
    margin-left: -2px;
    background: var(--white);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
}

.court-service {
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(255, 255, 255, 0.85);
}

.court-service-top { left: 20%; }
.court-service-bottom { right: 20%; }

.court-center {
    left: 20%;
    right: 20%;
    top: 50%;
    height: 2px;
    margin-top: -1px;
    background: rgba(255, 255, 255, 0.85);
}

.court-ball {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #f2ffb0;
    box-shadow: 0 0 18px rgba(242, 255, 176, 0.9);
    left: 28%;
    top: 30%;
    animation: rally 3.2s cubic-bezier(.45, 0, .55, 1) infinite alternate;
}

@keyframes rally {
    0%   { left: 10%; top: 70%; }
    50%  { left: 50%; top: 22%; }
    100% { left: 84%; top: 62%; }
}

@media (prefers-reduced-motion: reduce) {
    .court-ball { animation: none; }
}

/* escudo como insignia sobre la pista */
.hero-badge {
    position: absolute;
    left: 50%;
    top: -50%;
    width: 44%;
    height: auto;
    aspect-ratio: 1;
    margin-left: -22%;
    border-radius: 50%;
    object-fit: cover;
    transform: rotate(-4deg);
    box-shadow:
        0 0 0 6px rgba(63, 208, 122, 0.14),
        0 0 60px rgba(63, 208, 122, 0.25),
        0 24px 50px rgba(0, 0, 0, 0.6);
}

/* =================================
   NAVEGACIÓN
================================= */

.navigation {
    display: flex;
    gap: 4px;
    padding: 5px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-bottom: 40px;
    overflow-x: auto;
}

.navigation button {
    flex: 1 0 auto;
    background: transparent;
    border: none;
    border-radius: 5px;
    color: var(--soft);
    padding: 13px 20px;
    cursor: pointer;
    font-family: var(--font);
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}

.navigation button:hover {
    color: var(--white);
    background: var(--panel-2);
}

.navigation button.active {
    color: var(--ink);
    background: var(--accent);
}

/* =================================
   SECCIONES
================================= */

.section {
    display: none;
    padding-bottom: 70px;
}

.section.active-section {
    display: block;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 24px;
}

.section-heading h2 {
    font-size: 44px;
    font-weight: 900;
    font-style: italic;
    font-variation-settings: "wdth" 66;
    line-height: 0.95;
    text-transform: uppercase;
}

.badge {
    background: var(--court);
    color: var(--white);
    padding: 9px 14px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    white-space: nowrap;
    transform: skewX(-10deg);
}

/* =================================
   TABLA DE RANKING
================================= */

.table-container {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow-x: auto;
}

table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

thead {
    background: var(--ink);
}

th {
    color: var(--soft);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 16px 12px;
}

th:last-child {
    color: var(--accent);
}

td {
    padding: 18px 12px;
    border-top: 1px solid var(--line);
    font-size: 14px;
    font-weight: 600;
    color: #dbe8df;
}

td:nth-child(2),
th:nth-child(2) {
    text-align: left;
}

td:nth-child(2) {
    color: var(--white);
    font-weight: 800;
    font-size: 15px;
}

/* número de ranking grande, en cursiva */
td:first-child {
    width: 64px;
    font-size: 26px;
    font-weight: 900;
    font-style: italic;
    font-variation-settings: "wdth" 70;
    color: var(--soft);
}

/* puntos destacados */
td:last-child {
    font-size: 20px;
    font-weight: 900;
    color: var(--white);
}

tbody tr {
    transition: background 0.15s;
}

tbody tr:hover {
    background: var(--panel-2);
}

/* líder */
tbody tr:first-child {
    background: linear-gradient(90deg, rgba(63, 208, 122, 0.2), rgba(63, 208, 122, 0) 60%);
    box-shadow: inset 4px 0 0 var(--accent);
}

tbody tr:first-child td:first-child,
tbody tr:first-child td:last-child {
    color: var(--accent);
}

tbody tr:first-child td:first-child {
    font-size: 32px;
}

/* 2º y 3º */
tbody tr:nth-child(2),
tbody tr:nth-child(3) {
    box-shadow: inset 4px 0 0 rgba(255, 255, 255, 0.7);
}

tbody tr:nth-child(2) td:first-child,
tbody tr:nth-child(3) td:first-child {
    color: var(--white);
}

/* Leyenda de columnas */
.legend {
    margin-top: 20px;
    padding: 20px 22px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 10px;
}

.legend h3 {
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 14px;
}

.legend dl {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 10px 20px;
}

.legend dl div {
    display: flex;
    align-items: center;
    gap: 10px;
}

.legend dt {
    flex: 0 0 44px;
    text-align: center;
    padding: 4px 0;
    border-radius: 4px;
    background: var(--ink);
    border: 1px solid var(--line);
    color: var(--accent);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.5px;
}

.legend dd {
    color: var(--soft);
    font-size: 14px;
}

/* colores de diferencia (vienen en línea desde el script) */
td[style*="39c46a"] { color: var(--accent) !important; }
td[style*="ff6565"] { color: var(--loss) !important; }

/* =================================
   TARJETAS (jornadas, resultados, parejas)
================================= */

#fixtures,
#results,
#teams {
    display: grid;
    gap: 16px;
}

#fixtures {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

#results,
#teams {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.card {
    background: var(--panel);
    border: 1px solid var(--line);
    padding: 22px;
    border-radius: 10px;
}

/* Jornadas */
#fixtures .card h3 {
    display: inline-block;
    background: var(--court);
    color: var(--white);
    padding: 6px 12px;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 900;
    font-style: italic;
    letter-spacing: 1px;
    transform: skewX(-10deg);
    margin-bottom: 4px;
}

.jornada-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
}

#fixtures .jornada-head h3 {
    margin-bottom: 0;
}

.jornada-fecha {
    font-size: 14px;
    font-weight: 800;
    color: var(--white);
    text-transform: capitalize;
}

.jornada-fecha.pending {
    color: var(--soft);
    font-weight: 600;
    text-transform: none;
}

.fecha-edit {
    margin-left: auto;
    background: transparent;
    border: none;
    color: var(--accent);
    font-family: var(--font);
    font-size: 12px;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    padding: 4px 0;
}

.fecha-edit:hover {
    color: var(--white);
}

.fecha-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 12px;
    padding: 14px;
    background: var(--ink);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.fecha-form[hidden] {
    display: none;
}

.fecha-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fecha-form label span {
    color: var(--soft);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.fecha-form input {
    width: 100%;
    min-width: 0;
    background: var(--panel);
    border: 1px solid rgba(159, 184, 168, 0.35);
    border-radius: 6px;
    padding: 10px;
    color: var(--white);
    font-family: var(--font);
    font-size: 15px;
    font-weight: 700;
    color-scheme: dark;
}

.fecha-form input:focus {
    outline: none;
    border-color: var(--accent);
}

.fecha-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.fecha-actions .match-save,
.fecha-actions .match-cancel {
    margin-top: 0;
}

.match {
    padding: 16px 0;
}

.match + .match {
    border-top: 1px solid var(--line);
}

.match:last-child {
    padding-bottom: 0;
}

.match-teams {
    font-size: 14px;
    line-height: 1.5;
    color: var(--white);
}

.match-teams strong {
    font-weight: 800;
}

.match-teams .vs {
    color: var(--soft);
    margin: 0 4px;
}

.match-score {
    margin-top: 4px;
    font-weight: 900;
    font-size: 16px;
    letter-spacing: 1px;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}

.match-score.pending {
    color: var(--soft);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0;
}

.match-edit,
.match-cancel {
    margin-top: 10px;
    background: transparent;
    color: var(--white);
    border: 1px solid rgba(159, 184, 168, 0.4);
    border-radius: 5px;
    font-family: var(--font);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 8px 14px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.match-edit:hover,
.match-cancel:hover {
    background: var(--panel-2);
    border-color: var(--accent);
}

.match-msg {
    font-size: 13px;
    font-weight: 700;
}

.match-msg:empty {
    display: none;
}

.match-msg.ok {
    margin-top: 8px;
    color: var(--accent);
}

.match-msg.error {
    margin-top: 10px;
    color: var(--loss);
}

.match-form {
    margin-top: 14px;
    padding: 14px;
    background: var(--ink);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.match-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
    gap: 8px;
    align-items: center;
}

.set-label {
    text-align: center;
    color: var(--soft);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.team-label {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
}

.match-grid input {
    width: 100%;
    min-width: 0;
    background: var(--panel);
    border: 1px solid rgba(159, 184, 168, 0.35);
    border-radius: 6px;
    padding: 10px 2px;
    color: var(--white);
    font-family: var(--font);
    font-size: 20px;
    font-weight: 900;
    text-align: center;
    font-variant-numeric: tabular-nums;
    -moz-appearance: textfield;
}

.match-grid input::-webkit-outer-spin-button,
.match-grid input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.match-grid input:focus {
    outline: none;
    border-color: var(--accent);
}

.match-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.match-save {
    flex: 1;
    margin-top: 10px;
    background: var(--accent);
    color: var(--ink);
    border: none;
    border-radius: 6px;
    padding: 11px 14px;
    font-family: var(--font);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: filter 0.15s;
}

.match-save:hover {
    filter: brightness(1.08);
}

/* Resultados */
#results .card {
    border-left: 4px solid var(--accent);
}

#results .card > strong {
    color: var(--soft);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

#results .card p:first-of-type {
    color: var(--white);
    font-weight: 700;
    font-size: 15px;
}

#results .card p:last-of-type {
    color: var(--accent) !important;
    font-size: 22px;
    font-weight: 900;
    font-style: italic;
    letter-spacing: 1px;
    font-variant-numeric: tabular-nums;
}

/* Parejas: número de cabeza de serie */
#teams {
    counter-reset: seed;
}

#teams .card {
    counter-increment: seed;
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 92px;
    background: linear-gradient(135deg, var(--panel-2), var(--panel) 70%);
}

#teams .card::before {
    content: counter(seed);
    font-size: 46px;
    font-weight: 900;
    font-style: italic;
    font-variation-settings: "wdth" 62;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1.5px var(--accent);
    min-width: 34px;
}

#teams .card strong {
    font-size: 18px;
    font-weight: 800;
    line-height: 1.2;
}

/* =================================
   PIE
================================= */

footer {
    border-top: 1px solid var(--line);
    padding: 34px 5%;
    text-align: center;
    color: var(--soft);
    font-size: 12px;
    background: var(--ink);
}

footer small {
    display: block;
    color: var(--accent);
    margin-top: 8px;
    font-weight: 800;
    letter-spacing: 3px;
}

/* =================================
   MÓVIL
================================= */

@media (max-width: 820px) {
    .navigation button {
        padding: 12px 12px;
        font-size: 12px;
    }

    .hero {
        min-height: 0;
        padding-bottom: 40px;
    }

    .hero-visual {
        position: relative;
        top: auto;
        right: auto;
        width: 100%;
        max-width: 420px;
        margin: 150px auto 0;
        transform: none;
    }

    .court {
        transform: perspective(900px) rotateX(45deg);
    }
}

@media (max-width: 600px) {
    .header {
        height: 62px;
        padding: 0 5%;
    }

    .logo {
        font-size: 22px;
    }

    .logo small {
        font-size: 10px;
        letter-spacing: 2px;
    }

    .season {
        font-size: 9px;
        padding: 6px 9px;
    }

    .container {
        width: 92%;
    }

    .hero {
        padding: 40px 0 24px;
    }

    .hero h1 {
        font-size: 60px;
    }

    .navigation {
        margin-bottom: 28px;
    }

    .navigation button {
        padding: 12px 14px;
        font-size: 11px;
    }

    .section-heading h2 {
        font-size: 34px;
    }

    .badge {
        font-size: 9px;
        padding: 8px 10px;
    }

    table {
        min-width: 600px;
    }

    th,
    td {
        padding: 14px 9px;
    }

    td:first-child {
        font-size: 22px;
    }

    #fixtures {
        grid-template-columns: 1fr;
    }

}

/* =================================
   ACCESO ORGANIZADOR
================================= */

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.login-btn {
    background: transparent;
    color: var(--white);
    border: 1px solid rgba(159, 184, 168, 0.45);
    border-radius: 6px;
    padding: 8px 14px;
    font-family: var(--font);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.login-btn:hover {
    border-color: var(--accent);
    background: var(--panel-2);
}

.admin-pill {
    color: var(--ink);
    background: var(--accent);
    border-radius: 20px;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 900;
}

.aviso {
    margin-bottom: 20px;
    padding: 14px 16px;
    border-radius: 8px;
    border: 1px solid rgba(255, 107, 107, 0.4);
    background: rgba(255, 107, 107, 0.1);
    color: #ffd0d0;
    font-size: 14px;
    font-weight: 600;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(3, 10, 6, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.modal-card {
    width: 100%;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 26px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-top: 4px solid var(--accent);
    border-radius: 12px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.modal-card h3 {
    font-size: 26px;
    font-weight: 900;
    font-style: italic;
    font-variation-settings: "wdth" 70;
    text-transform: uppercase;
}

.modal-card > p:not(.match-msg) {
    color: var(--soft);
    font-size: 14px;
    line-height: 1.45;
}

.modal-card label {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.modal-card label span {
    color: var(--soft);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.modal-card input {
    width: 100%;
    background: var(--ink);
    border: 1px solid rgba(159, 184, 168, 0.35);
    border-radius: 6px;
    padding: 12px;
    color: var(--white);
    font-family: var(--font);
    font-size: 16px;
}

.modal-card input:focus {
    outline: none;
    border-color: var(--accent);
}

.modal-card .match-msg.error {
    margin-top: 0;
}

.modal-card .match-actions {
    margin-top: 0;
}

.modal-card .match-save,
.modal-card .match-cancel {
    margin-top: 0;
}

.fecha-form .match-msg {
    grid-column: 1 / -1;
    margin-top: 0;
}

button:disabled {
    opacity: 0.6;
    cursor: wait;
}

@media (max-width: 600px) {
    .header-right {
        gap: 8px;
    }

    .header-right .season {
        display: none;
    }

    .login-btn {
        padding: 7px 12px;
    }
}

.admin-banner {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 8px;
    border: 1px solid rgba(63, 208, 122, 0.45);
    background: rgba(63, 208, 122, 0.12);
    color: var(--white);
    font-size: 14px;
    line-height: 1.45;
}

.admin-banner strong {
    color: var(--accent);
}

.toast {
    position: fixed;
    left: 50%;
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    z-index: 60;
    width: max-content;
    max-width: calc(100% - 32px);
    padding: 14px 18px;
    border-radius: 10px;
    background: var(--accent);
    color: var(--ink);
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
}

/* Fecha y hora de cada partido */
.match-fecha {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 12px;
    margin-bottom: 6px;
}

.match-fecha .jornada-fecha {
    font-size: 13px;
    color: var(--accent);
}

.match-fecha .jornada-fecha.pending {
    color: var(--soft);
}

.match .fecha-form {
    margin: 4px 0 12px;
}

.match-fecha .jornada-fecha {
    display: inline-block;
    text-transform: none;
}

.match-fecha .jornada-fecha::first-letter {
    text-transform: uppercase;
}

/* Borrar resultado */
.match-borrar {
    background: transparent;
    color: var(--loss);
    border: 1px solid rgba(255, 107, 107, 0.5);
    border-radius: 5px;
    font-family: var(--font);
    font-size: 12px;
    font-weight: 800;
    padding: 8px 14px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.match-borrar:hover,
.match-borrar[data-confirmar="1"] {
    background: var(--loss);
    color: var(--ink);
}

.match-actions {
    flex-wrap: wrap;
}

.match-actions .match-borrar {
    margin-top: 10px;
}

/* =================================
   FOTOS DE JUGADORES
================================= */

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 50%;
    object-fit: cover;
    background: var(--panel-2);
    border: 2px solid var(--panel);
    color: var(--accent);
    font-weight: 900;
}

.avatar-sm {
    width: 30px;
    height: 30px;
    font-size: 13px;
}

.avatar-lg {
    width: 84px;
    height: 84px;
    font-size: 32px;
    border: 3px solid rgba(63, 208, 122, 0.45);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.avatares {
    display: inline-flex;
    flex: 0 0 auto;
}

.avatares .avatar + .avatar {
    margin-left: -10px;
}

.nombre-fotos {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

tbody tr:first-child .avatar-sm {
    border-color: var(--accent);
}

/* Tarjetas de parejas con fotos */
#teams .card {
    flex-wrap: wrap;
    align-items: center;
}

.jugadores {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 4px;
}

.jugador {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 8px;
    border-radius: 8px;
    background: rgba(6, 19, 12, 0.45);
    text-align: center;
}

.jugador-nombre {
    font-size: 15px;
    font-weight: 800;
}

.foto-acciones {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}

.foto-subir,
.foto-quitar {
    background: transparent;
    border: 1px solid rgba(159, 184, 168, 0.4);
    border-radius: 5px;
    color: var(--white);
    font-family: var(--font);
    font-size: 11px;
    font-weight: 800;
    padding: 6px 10px;
    cursor: pointer;
}

.foto-subir:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.foto-quitar {
    color: var(--loss);
    border-color: rgba(255, 107, 107, 0.45);
}

.foto-quitar[data-confirmar="1"] {
    background: var(--loss);
    color: var(--ink);
}

#teams {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

#teams .card > strong {
    flex: 1 1 0;
    min-width: 0;
}

.foto-acciones button {
    white-space: nowrap;
}

/* Pestañas en móvil: 2 × 2, siempre enteras */
@media (max-width: 600px) {
    .navigation {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 4px;
        overflow: visible;
    }

    .navigation button {
        flex: none;
        width: 100%;
        min-width: 0;
        padding: 13px 6px;
        font-size: 12px;
        white-space: normal;
        line-height: 1.2;
    }
}

@media (max-width: 600px) {
    .section-heading {
        flex-wrap: wrap;
        align-items: flex-end;
    }
}
