/* ════════════════════════════════════════════════════════════
   Palkko Tesela — Etiquetado en vivo
   ════════════════════════════════════════════════════════════

   Oscuro a propósito: esto se usa a pie de pista, en un pabellón,
   cuarenta minutos seguidos. El blanco de la marca Palkko es para
   vender; aquí manda no deslumbrar y no gastar batería.

   El rojo de la placa Tesela NO entra en la interfaz: dentro ya
   significa tarjeta roja y gol del rival. El acento es índigo,
   igual que en Titán.
   ════════════════════════════════════════════════════════════ */

/* ─── Tipografía local (funciona sin cobertura) ─── */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('assets/inter-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                   U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                   U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('assets/inter-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                   U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
                   U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
                   U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ─── Reset ─── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* ─── Design Tokens ─── */
:root {
    /* Superficies — escala construida sobre el tinta de Palkko (#14141B) */
    --bg-deep: #0A0A0E;
    --bg-base: #0F0F15;
    --bg-raised: #14141B;
    --bg-card: #1A1A23;
    --bg-card-hover: #21212B;
    --bg-elevated: #292934;

    /* Borders */
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-default: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(255, 255, 255, 0.16);

    /* Text */
    --text-primary: #f0f0f5;
    --text-secondary: #8a8a9a;
    --text-tertiary: #55556a;
    --text-inverse: #0A0A0E;

    /* Acento — índigo Palkko. Sobre fondo casi negro el #4B4BE8 puro queda
       corto de contraste para texto, así que se aclara; el puro se reserva
       para rellenos grandes (botones, degradados). */
    --acento: #6D6DF2;
    --acento-puro: #4B4BE8;
    --acento-dim: rgba(109, 109, 242, 0.15);
    --acento-glow: rgba(109, 109, 242, 0.25);
    --acento-2: #9B9BFF;
    --acento-2-dim: rgba(155, 155, 255, 0.15);

    /* Semantic */
    --green: #22c55e;
    --green-bg: rgba(34, 197, 94, 0.12);
    --green-border: rgba(34, 197, 94, 0.3);
    --blue: #3b82f6;
    --blue-bg: rgba(59, 130, 246, 0.12);
    --blue-border: rgba(59, 130, 246, 0.3);
    --sky: #38bdf8;
    --sky-bg: rgba(56, 189, 248, 0.12);
    --sky-border: rgba(56, 189, 248, 0.3);
    --amber: #f59e0b;
    --amber-bg: rgba(245, 158, 11, 0.12);
    --amber-border: rgba(245, 158, 11, 0.35);
    --orange: #f97316;
    --orange-bg: rgba(249, 115, 22, 0.12);
    --orange-border: rgba(249, 115, 22, 0.3);
    --red: #ef4444;
    --red-bg: rgba(239, 68, 68, 0.12);
    --red-border: rgba(239, 68, 68, 0.3);
    --rose: #f43f5e;
    --rose-bg: rgba(244, 63, 94, 0.1);

    /* Layout */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --btn-min: 48px;

    /* Typography */
    --font-display: 'Inter', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 14px rgba(0,0,0,0.4), 0 2px 6px rgba(0,0,0,0.3);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.5), 0 4px 12px rgba(0,0,0,0.3);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.6), 0 8px 20px rgba(0,0,0,0.4);
    --shadow-glow-acento: 0 0 20px rgba(109, 109, 242, 0.2), 0 0 60px rgba(109, 109, 242, 0.08);
    --shadow-glow-red: 0 0 20px rgba(239, 68, 68, 0.2);

    /* Glass effect */
    --glass-bg: rgba(20, 20, 27, 0.72);
    --glass-border: rgba(255, 255, 255, 0.08);
}

html, body {
    font-family: var(--font-body);
    background: var(--bg-deep);
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.4;
    height: 100%;
    overflow-x: hidden;
    user-select: none;
    -webkit-user-select: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Noise texture overlay for depth */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 128px 128px;
}

.screen {
    min-height: 100vh;
    min-height: 100dvh;
}

.hidden {
    display: none !important;
}

/* ════════════════════════════════════════
   BUTTONS — Base
   ════════════════════════════════════════ */
button {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    min-height: var(--btn-min);
    padding: 10px 16px;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: var(--text-primary);
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

button:active {
    transform: scale(0.96);
    transition-duration: 0.08s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--acento), var(--acento-2));
    color: var(--text-inverse);
    font-weight: 700;
    box-shadow: var(--shadow-glow-acento);
}

.btn-primary:active {
    box-shadow: 0 0 30px rgba(109, 109, 242, 0.35);
}

.btn-ghost {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    color: var(--text-secondary);
}

.btn-ghost:active {
    background: var(--bg-elevated);
}


/* ════════════════════════════════════════
   SETUP SCREEN
   ════════════════════════════════════════ */
#setup-screen {
    padding: 0;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(109, 109, 242, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(14, 165, 233, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(109, 109, 242, 0.02) 0%, transparent 80%),
        var(--bg-deep);
    animation: setupBgShift 8s ease-in-out infinite alternate;
}

@keyframes setupBgShift {
    0% {
        background-position: 0% 0%, 100% 100%, 50% 50%;
    }
    100% {
        background-position: 10% 5%, 90% 95%, 45% 55%;
    }
}

.setup-container {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px 16px 40px;
}

/* Brand */
.brand-header {
    text-align: center;
    padding: 24px 0 20px;
}

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

.brand-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    filter: drop-shadow(0 0 12px rgba(109, 109, 242, 0.3));
}

.brand-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.brand-name {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--acento), var(--acento-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-sub {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-tertiary);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Config cards */
.config-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-md);
}

.config-teams {
    display: flex;
    align-items: stretch;
    gap: 12px;
}

.team-config {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.team-config-crest {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, var(--bg-elevated), var(--bg-card));
    border: 2px solid var(--border-default);
    overflow: hidden;
    box-shadow: var(--shadow-md), 0 0 20px rgba(109, 109, 242, 0.08);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s;
}

.team-config-crest:hover {
    transform: scale(1.05);
}

.crest-img {
    width: 52px;
    height: 52px;
    object-fit: contain;
}

.rival-crest {
    border-style: dashed;
    box-shadow: var(--shadow-md), 0 0 20px rgba(244, 63, 94, 0.08);
    cursor: pointer;
    overflow: hidden;
}

.rival-icon {
    width: 32px;
    height: 32px;
    color: var(--text-tertiary);
}

.vs-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.vs-badge {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 800;
    color: var(--text-tertiary);
    letter-spacing: 3px;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
    background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.03) 100%);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255,255,255,0.06);
}

.btn-home-away {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: linear-gradient(180deg, rgba(109, 109, 242, 0.12) 0%, rgba(109, 109, 242, 0.04) 100%);
    border: 1px solid rgba(109, 109, 242, 0.2);
    border-radius: var(--radius-sm);
    padding: 6px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-home-away .ha-label {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 800;
    color: var(--acento);
    letter-spacing: 1px;
}

.btn-home-away .ha-arrows {
    color: var(--text-tertiary);
    opacity: 0.5;
}

.btn-home-away:active {
    transform: scale(0.95);
}

.btn-home-away.away {
    background: linear-gradient(180deg, rgba(244, 63, 94, 0.12) 0%, rgba(244, 63, 94, 0.04) 100%);
    border-color: rgba(244, 63, 94, 0.25);
}

.btn-home-away.away .ha-label {
    color: var(--rose);
}

/* Fields */
.field-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
    text-align: center;
}

.field-input {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-raised);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 500;
    transition: border-color 0.2s, box-shadow 0.2s;
    text-align: center;
}

.field-input:focus {
    outline: none;
    border-color: var(--acento);
    box-shadow: 0 0 0 3px var(--acento-dim), 0 0 20px rgba(109, 109, 242, 0.1);
}

.field-input::placeholder {
    color: var(--text-tertiary);
}

.field-input-sm {
    max-width: 100px;
    text-align: center;
    margin: 0 auto;
    display: block;
}

/* Card headers */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

.card-title svg {
    color: var(--acento);
    opacity: 0.7;
}

.btn-add {
    background: var(--acento-dim);
    color: var(--acento);
    font-size: 13px;
    font-weight: 700;
    min-height: 36px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(109, 109, 242, 0.15);
}

.btn-add:active {
    background: var(--acento-glow);
}

.starter-badge {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    color: var(--acento);
    background: var(--acento-dim);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(109, 109, 242, 0.15);
}

/* Player list */
.player-list {
    max-height: 260px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.player-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-raised);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    transition: background 0.2s, transform 0.15s;
    border: 1px solid transparent;
}

.player-item:active {
    background: var(--bg-elevated);
    transform: scale(0.99);
}

.player-item .player-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.player-item .player-info-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.player-item .dorsal {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 14px;
    background: linear-gradient(135deg, var(--acento-dim), var(--acento-2-dim));
    color: var(--acento);
    border: 1px solid rgba(109, 109, 242, 0.2);
}

.player-item .player-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.player-item .player-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(109, 109, 242, 0.25);
    flex-shrink: 0;
}

.player-item .dorsal-badge-sm {
    position: absolute;
    bottom: -3px;
    right: -5px;
    background: linear-gradient(135deg, var(--acento), var(--acento-2));
    color: var(--text-inverse);
    font-family: var(--font-display);
    font-size: 9px;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.5);
    border: 1.5px solid var(--bg-raised);
}

.player-item .player-name {
    font-weight: 600;
    font-size: 14px;
}

.player-item .gk-badge {
    background: var(--orange-bg);
    color: var(--orange);
    font-size: 10px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    border: 1px solid var(--orange-border);
}

.player-item-actions {
    display: flex;
    gap: 4px;
}

.player-item-actions button {
    min-height: 32px;
    min-width: 32px;
    font-size: 14px;
    padding: 4px;
    background: var(--bg-card);
    border-radius: 8px;
    color: var(--text-tertiary);
}

.player-item-actions .btn-delete {
    color: var(--red);
}

/* Starter grid */
.starter-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.starter-chip {
    display: flex;
    align-items: center;
    gap: 7px;
    background: var(--bg-raised);
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    cursor: pointer;
    min-height: 44px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.starter-chip.selected {
    border-color: var(--acento);
    background: var(--acento-dim);
    box-shadow: 0 0 16px rgba(109, 109, 242, 0.18), inset 0 1px 0 rgba(109, 109, 242, 0.15);
    transform: scale(1.02);
}

.starter-chip .starter-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.starter-chip .starter-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1.5px solid rgba(109, 109, 242, 0.25);
}

.starter-chip .dorsal-badge-xs {
    position: absolute;
    bottom: -2px;
    right: -4px;
    background: linear-gradient(135deg, var(--acento), var(--acento-2));
    color: var(--text-inverse);
    font-family: var(--font-display);
    font-size: 8px;
    font-weight: 800;
    min-width: 15px;
    height: 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.5);
    border: 1px solid var(--bg-raised);
}

.starter-chip .dorsal-sm {
    font-family: var(--font-display);
    font-weight: 800;
    color: var(--acento);
    font-size: 13px;
}

.starter-chip .gk-tag {
    font-size: 9px;
    color: var(--orange);
    font-weight: 800;
    letter-spacing: 0.5px;
}

/* Start button */
.btn-start {
    width: 100%;
    min-height: 56px;
    margin-top: 20px;
    background: linear-gradient(135deg, var(--acento), var(--acento-2));
    color: var(--text-inverse);
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-glow-acento), var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-start:disabled {
    opacity: 0.25;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn-start:not(:disabled):active {
    box-shadow: 0 0 40px rgba(109, 109, 242, 0.4);
}


/* ════════════════════════════════════════
   MODALS
   ════════════════════════════════════════ */
.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 16px;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.modal-content {
    position: relative;
    background: linear-gradient(180deg, rgba(20, 20, 30, 0.95), rgba(14, 14, 22, 0.98));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 24px;
    width: 100%;
    max-width: 380px;
    box-shadow: var(--shadow-xl);
    animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.92) translateY(15px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-content h3 {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
}

.form-row {
    margin-bottom: 14px;
}

.form-row .field-label {
    text-align: left;
}

/* Toggle switch */
.toggle-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

.toggle-switch {
    position: relative;
    width: 48px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-track {
    position: absolute;
    inset: 0;
    background: var(--bg-elevated);
    border-radius: 14px;
    border: 1px solid var(--border-default);
    transition: all 0.25s;
    cursor: pointer;
}

.toggle-track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--text-secondary);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toggle-switch input:checked + .toggle-track {
    background: var(--orange);
    border-color: var(--orange);
}

.toggle-switch input:checked + .toggle-track::after {
    transform: translateX(20px);
    background: white;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.modal-buttons button {
    flex: 1;
}


/* ════════════════════════════════════════
   REPORTS HISTORY
   ════════════════════════════════════════ */

.reports-card {
    margin-top: 24px;
}

.reports-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.reports-empty {
    color: var(--text-tertiary);
    font-size: 13px;
    text-align: center;
    padding: 16px 0;
}

.report-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-raised);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 4px;
    transition: border-color 0.2s, background 0.2s;
}

.report-item:hover {
    border-color: var(--border-default);
    background: var(--bg-card);
}

.report-main {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    min-width: 0;
}

.report-result {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 800;
}

.result-win {
    background: var(--green-bg);
    color: var(--green);
    border: 1px solid var(--green-border);
}

.result-loss {
    background: var(--red-bg);
    color: var(--red);
    border: 1px solid var(--red-border);
}

.result-draw {
    background: var(--amber-bg);
    color: var(--amber);
    border: 1px solid var(--amber-border);
}

.report-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.report-score {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.report-score strong {
    color: var(--acento);
    font-weight: 700;
}

.report-date {
    font-size: 11px;
    color: var(--text-tertiary);
}

.btn-delete-report {
    flex-shrink: 0;
    min-height: 32px;
    min-width: 32px;
    padding: 4px;
    border-radius: 6px;
    color: var(--text-tertiary);
    background: transparent;
}

.btn-delete-report:hover {
    color: var(--red);
    background: var(--red-bg);
}


/* ════════════════════════════════════════
   MATCH SCREEN
   ════════════════════════════════════════ */
#match-screen {
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background: var(--bg-deep);
}

/* ─── Panel wrappers (transparent in portrait, active in landscape) ─── */
.landscape-left-panel,
.landscape-right-panel {
    display: contents;
}

/* In portrait mode, fix order so rival-actions stays above court */
#match-header   { order: 1; }
#rival-actions   { order: 2; }
#court-area      { order: 3; }
#action-bar      { order: 4; }
#bench-area      { order: 5; }
#history-area    { order: 6; }
#match-controls  { order: 7; }

/* ─── A) Scoreboard — TV Broadcast Style ─── */
#match-header {
    background:
        linear-gradient(180deg, rgba(10, 10, 18, 0.98) 0%, rgba(10, 10, 18, 0.95) 100%);
    padding: 10px 12px 0;
    flex-shrink: 0;
    position: relative;
}

.scoreboard {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 500px;
    margin: 0 auto;
    background: linear-gradient(135deg, rgba(20, 20, 32, 0.9), rgba(16, 16, 26, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: 8px 14px;
    box-shadow: var(--shadow-lg), 0 0 30px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.sb-team {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.sb-team-home {
    justify-content: flex-start;
}

.sb-team-away {
    justify-content: flex-end;
}

/* Away mode: swap team positions and score order */
.scoreboard.away-mode .sb-team-home {
    order: 3;
    justify-content: flex-end;
}

.scoreboard.away-mode .sb-center {
    order: 2;
}

.scoreboard.away-mode .sb-team-away {
    order: 1;
    justify-content: flex-start;
}

.scoreboard.away-mode .sb-scores {
    flex-direction: row-reverse;
}

.sb-crest {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.sb-crest-rival {
    width: 32px;
    height: 32px;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sb-crest-rival svg {
    width: 100%;
    height: 100%;
}

.sb-name {
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.sb-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    padding: 0 16px;
}

.sb-scores {
    display: flex;
    align-items: center;
    gap: 4px;
}

.sb-score {
    font-family: var(--font-display);
    font-size: 38px;
    font-weight: 800;
    min-width: 42px;
    text-align: center;
    line-height: 1;
    letter-spacing: -1px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.sb-dash {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 300;
    color: var(--text-tertiary);
    opacity: 0.5;
}

.sb-clock-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.sb-clock {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
    letter-spacing: 1.5px;
    transition: color 0.3s, text-shadow 0.3s;
}

.sb-clock.running {
    color: var(--acento);
    text-shadow: 0 0 12px rgba(109, 109, 242, 0.5), 0 0 30px rgba(109, 109, 242, 0.2);
}

.btn-clock {
    width: 48px;
    height: 48px;
    min-height: 48px;
    padding: 0;
    background: var(--bg-card);
    border: 2px solid var(--border-default);
    border-radius: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-clock.active {
    background: var(--green-bg);
    border-color: var(--green-border);
    color: var(--green);
    box-shadow: 0 0 16px rgba(34, 197, 94, 0.25);
}

.btn-period-tag {
    min-height: 28px;
    min-width: 32px;
    padding: 4px 8px;
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 800;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: 6px;
    color: var(--text-tertiary);
    letter-spacing: 1px;
}

/* Gradient bar under scoreboard */
.sb-gradient-bar {
    height: 3px;
    margin-top: 10px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(109, 109, 242, 0.15) 15%,
        var(--acento) 30%,
        var(--acento-2) 70%,
        rgba(14, 165, 233, 0.15) 85%,
        transparent 100%
    );
    border-radius: 2px;
    opacity: 0.6;
}


/* ─── B) Rival actions ─── */
#rival-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 6px 8px 5px;
    background: linear-gradient(180deg, rgba(244, 63, 94, 0.04) 0%, var(--bg-base) 100%);
    flex-shrink: 0;
    border-bottom: 1px solid rgba(244, 63, 94, 0.1);
}

.rival-label-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 4px 2px;
}

.rival-tag {
    font-family: var(--font-display);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--bg-deep);
    background: var(--rose);
    padding: 2px 8px;
    border-radius: 4px;
    line-height: 1.4;
}

.rival-team-tag {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    color: var(--rose);
    opacity: 0.7;
    letter-spacing: 0.5px;
}

.rival-buttons-row {
    display: flex;
    gap: 5px;
}

.btn-rival {
    flex: 1;
    background: linear-gradient(180deg, rgba(244, 63, 94, 0.12), rgba(244, 63, 94, 0.06));
    border: 1px solid rgba(244, 63, 94, 0.2);
    color: var(--rose);
    font-size: 12px;
    font-weight: 700;
    min-height: 40px;
    border-radius: var(--radius-sm);
    padding: 6px 4px;
    letter-spacing: 0.3px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(244, 63, 94, 0.08);
}

.btn-rival:active {
    background: rgba(244, 63, 94, 0.28);
    border-color: var(--rose);
    box-shadow: var(--shadow-glow-red), 0 0 30px rgba(244, 63, 94, 0.15);
}


/* ─── C) Court ─── */
#court-area {
    flex: 1;
    padding: 8px;
    overflow-y: auto;
    display: flex;
    align-items: flex-start;
    position: relative;
    background:
        radial-gradient(ellipse at 50% 50%, rgba(109, 109, 242, 0.03) 0%, transparent 70%),
        var(--bg-deep);
}

/* Futsal court pattern */
.court-lines {
    position: absolute;
    inset: 8px;
    pointer-events: none;
    z-index: 0;
    border: 1px solid rgba(109, 109, 242, 0.06);
    border-radius: var(--radius-md);
}

.court-center-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(109, 109, 242, 0.06);
}

.court-center-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border: 1px solid rgba(109, 109, 242, 0.06);
    border-radius: 50%;
}

.court-penalty-left {
    position: absolute;
    left: -1px;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 100px;
    border: 1px solid rgba(109, 109, 242, 0.05);
    border-left: none;
    border-radius: 0 8px 8px 0;
}

.court-penalty-right {
    position: absolute;
    right: -1px;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 100px;
    border: 1px solid rgba(109, 109, 242, 0.05);
    border-right: none;
    border-radius: 8px 0 0 8px;
}

.court-goal-left {
    position: absolute;
    left: -1px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 40px;
    border: 1px solid rgba(109, 109, 242, 0.08);
    border-left: none;
    border-radius: 0 3px 3px 0;
    background: rgba(109, 109, 242, 0.02);
}

.court-goal-right {
    position: absolute;
    right: -1px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 40px;
    border: 1px solid rgba(109, 109, 242, 0.08);
    border-right: none;
    border-radius: 3px 0 0 3px;
    background: rgba(109, 109, 242, 0.02);
}

.court-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    width: 100%;
    align-content: start;
    position: relative;
    z-index: 1;
}

.court-card {
    background: linear-gradient(180deg, rgba(20, 20, 30, 0.85), rgba(14, 14, 22, 0.9));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1.5px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    padding: 10px 8px 8px;
    text-align: center;
    cursor: pointer;
    position: relative;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    min-height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.court-card:active {
    transform: scale(0.97);
    transition-duration: 0.08s;
}

.court-card.selected {
    border-color: var(--acento);
    background: linear-gradient(180deg, rgba(109, 109, 242, 0.12) 0%, rgba(14, 14, 22, 0.9) 100%);
    box-shadow: 0 0 24px rgba(109, 109, 242, 0.18), 0 0 8px rgba(109, 109, 242, 0.12), inset 0 1px 0 rgba(109, 109, 242, 0.2);
}

/* Court card avatar + dorsal composition */
.court-card .court-avatar-wrap {
    position: relative;
    display: inline-flex;
}

.court-card .court-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: border-color 0.25s, box-shadow 0.25s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.court-card.selected .court-avatar {
    border-color: var(--acento);
    box-shadow: 0 0 12px rgba(109, 109, 242, 0.3), 0 2px 8px rgba(0,0,0,0.4);
}

.court-card .court-dorsal-badge {
    position: absolute;
    bottom: -3px;
    right: -6px;
    background: linear-gradient(135deg, var(--acento), var(--acento-2));
    color: var(--text-inverse);
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 800;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.5);
    border: 2px solid rgba(14, 14, 22, 0.9);
    line-height: 1;
}

.court-card .card-dorsal {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--acento), var(--acento-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.court-card .card-name {
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    color: var(--text-primary);
}

.court-card .card-time {
    font-family: var(--font-display);
    font-size: 10px;
    color: var(--text-tertiary);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.5px;
}

.court-card .card-gk {
    position: absolute;
    top: 4px;
    left: 4px;
    background: var(--orange);
    color: white;
    font-family: var(--font-display);
    font-size: 8px;
    font-weight: 800;
    padding: 2px 5px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.court-card .btn-sub {
    position: absolute;
    top: 3px;
    right: 3px;
    background: rgba(30, 30, 46, 0.8);
    border: 1px solid var(--border-subtle);
    color: var(--text-tertiary);
    font-size: 14px;
    width: 26px;
    height: 26px;
    min-height: 26px;
    border-radius: 6px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.court-card .btn-sub:active {
    background: var(--bg-card-hover);
    color: var(--acento);
}

/* Card stats */
.card-stats {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 3px;
}

.mini-stat {
    font-family: var(--font-display);
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    line-height: 1.3;
    letter-spacing: 0.3px;
}

.mini-stat.goals { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-border); }
.mini-stat.assists { background: var(--blue-bg); color: var(--blue); border: 1px solid var(--blue-border); }
.mini-stat.yellows { background: var(--amber-bg); color: var(--amber); border: 1px solid var(--amber-border); }
.mini-stat.reds { background: var(--red-bg); color: var(--red); border: 1px solid var(--red-border); }
.mini-stat.saves { background: var(--orange-bg); color: var(--orange); border: 1px solid var(--orange-border); }

/* Flash animations */
.court-card.flash {
    animation: cardFlash 0.5s ease;
}

@keyframes cardFlash {
    0% { background: rgba(34, 197, 94, 0.3); border-color: var(--green); box-shadow: 0 0 30px rgba(34, 197, 94, 0.3); }
    100% { background: linear-gradient(180deg, rgba(20, 20, 30, 0.85), rgba(14, 14, 22, 0.9)); border-color: rgba(255, 255, 255, 0.06); box-shadow: var(--shadow-sm); }
}

.court-card.flash-red {
    animation: cardFlashRed 0.5s ease;
}

@keyframes cardFlashRed {
    0% { background: rgba(239, 68, 68, 0.3); border-color: var(--red); box-shadow: 0 0 30px rgba(239, 68, 68, 0.3); }
    100% { background: linear-gradient(180deg, rgba(20, 20, 30, 0.85), rgba(14, 14, 22, 0.9)); border-color: rgba(255, 255, 255, 0.06); box-shadow: var(--shadow-sm); }
}


/* ─── Huecos vacíos (sanción / pendiente reentrada) ─── */
.court-card.court-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: default;
    min-height: 110px;
    border-style: dashed;
}
.court-card.court-empty-locked {
    background: linear-gradient(180deg, rgba(30, 14, 14, 0.55), rgba(20, 8, 8, 0.6));
    border-color: rgba(239, 68, 68, 0.35);
    color: var(--red);
}
.court-card.court-empty-locked .empty-lock-icon {
    opacity: 0.9;
}
.court-card.court-empty-locked .empty-countdown {
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 700;
    font-size: 22px;
    letter-spacing: 1px;
    color: var(--red);
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
    font-variant-numeric: tabular-nums;
}
.court-card.court-empty-locked .empty-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    opacity: 0.75;
}
.court-card.court-empty-ready {
    background: linear-gradient(180deg, rgba(109, 109, 242, 0.1), rgba(109, 109, 242, 0.04));
    border-color: rgba(109, 109, 242, 0.55);
    color: var(--acento);
    cursor: pointer;
    animation: emptyReadyPulse 1.4s ease-in-out infinite;
}
.court-card.court-empty-ready:active {
    transform: scale(0.97);
}
.court-card.court-empty-ready .empty-plus {
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 800;
    font-size: 36px;
    line-height: 1;
    color: var(--acento);
    text-shadow: 0 0 14px rgba(109, 109, 242, 0.45);
}
.court-card.court-empty-ready .empty-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
@keyframes emptyReadyPulse {
    0%, 100% { box-shadow: 0 0 0 rgba(109, 109, 242, 0); border-color: rgba(109, 109, 242, 0.55); }
    50%      { box-shadow: 0 0 18px rgba(109, 109, 242, 0.35); border-color: rgba(109, 109, 242, 0.9); }
}

/* Expulsados en banquillo */
.bench-chip.bench-chip-expelled {
    background: linear-gradient(180deg, rgba(40, 14, 14, 0.6), rgba(28, 8, 8, 0.65));
    border-color: rgba(239, 68, 68, 0.45);
    cursor: not-allowed;
    opacity: 0.75;
    pointer-events: none;
}
.bench-chip.bench-chip-expelled .bench-avatar,
.bench-chip.bench-chip-expelled .dorsal-sm {
    filter: grayscale(0.6);
}
.bench-chip .expelled-tag {
    background: var(--red-bg);
    color: var(--red);
    border: 1px solid var(--red-border);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: auto;
}

/* ─── D) Action bar ─── */
#action-bar {
    background: linear-gradient(180deg, rgba(10, 10, 18, 0.98), var(--bg-base));
    border-top: 2px solid var(--acento);
    padding: 8px 8px 10px;
    flex-shrink: 0;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

#action-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--acento), transparent);
    opacity: 0.5;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

#selected-player-label {
    text-align: center;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    color: var(--acento);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
    text-shadow: 0 0 10px rgba(109, 109, 242, 0.3);
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
}

.btn-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 9px;
    min-height: 52px;
    padding: 6px 2px;
    border-radius: var(--radius-sm);
    border: 1px solid;
    transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.btn-action .action-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
}

.btn-action .action-text {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.3px;
}

/* Attack actions (green-ish) */
.btn-action.btn-goal       { background: linear-gradient(180deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.06)); border-color: var(--green-border); color: var(--green); }
.btn-action.btn-assist      { background: linear-gradient(180deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.06)); border-color: var(--blue-border); color: var(--blue); }
.btn-action.btn-keypass     { background: linear-gradient(180deg, rgba(56, 189, 248, 0.15), rgba(56, 189, 248, 0.06)); border-color: var(--sky-border); color: var(--sky); }
.btn-action.btn-shot-on     { background: linear-gradient(180deg, rgba(34, 197, 94, 0.08), rgba(34, 197, 94, 0.03)); border-color: rgba(34, 197, 94, 0.2); color: var(--green); }
.btn-action.btn-shot-off    { background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02)); border-color: var(--border-default); color: var(--text-secondary); }

/* Defense actions (red-ish) */
.btn-action.btn-save        { background: linear-gradient(180deg, rgba(249, 115, 22, 0.15), rgba(249, 115, 22, 0.06)); border-color: var(--orange-border); color: var(--orange); }
.btn-action.btn-foul-c      { background: linear-gradient(180deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.06)); border-color: var(--red-border); color: var(--red); }
.btn-action.btn-foul-r      { background: linear-gradient(180deg, rgba(239, 68, 68, 0.08), rgba(239, 68, 68, 0.03)); border-color: rgba(239, 68, 68, 0.2); color: var(--red); }

/* Card actions (yellow/red) */
.btn-action.btn-yellow      { background: linear-gradient(180deg, rgba(245, 158, 11, 0.18), rgba(245, 158, 11, 0.06)); border-color: var(--amber-border); color: var(--amber); }
.btn-action.btn-red          { background: linear-gradient(180deg, rgba(239, 68, 68, 0.18), rgba(239, 68, 68, 0.06)); border-color: var(--red-border); color: var(--red); }

.btn-action.btn-goal .action-icon       { background: rgba(34, 197, 94, 0.15); }
.btn-action.btn-assist .action-icon      { background: rgba(59, 130, 246, 0.15); }
.btn-action.btn-keypass .action-icon     { background: rgba(56, 189, 248, 0.15); }
.btn-action.btn-shot-on .action-icon     { background: rgba(34, 197, 94, 0.1); }
.btn-action.btn-save .action-icon        { background: rgba(249, 115, 22, 0.15); }
.btn-action.btn-foul-c .action-icon      { background: rgba(239, 68, 68, 0.15); }
.btn-action.btn-foul-r .action-icon      { background: rgba(239, 68, 68, 0.1); }
.btn-action.btn-yellow .action-icon      { background: rgba(245, 158, 11, 0.15); }
.btn-action.btn-red .action-icon          { background: rgba(239, 68, 68, 0.15); }

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

.btn-action:active:not(:disabled) {
    transform: scale(0.9);
    filter: brightness(1.4);
    transition-duration: 0.08s;
}


/* ─── E) Bench ─── */
#bench-area {
    background: var(--bg-base);
    flex-shrink: 0;
    padding: 0 8px;
}

.btn-bench-toggle {
    width: 100%;
    background: linear-gradient(180deg, var(--bg-card), rgba(20, 20, 30, 0.8));
    min-height: 36px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-tertiary);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    border: 1px solid var(--border-subtle);
    border-bottom: none;
    gap: 6px;
}

.bench-chevron {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-bench-toggle.open .bench-chevron {
    transform: rotate(180deg);
}

.bench-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 8px 0;
    max-height: 140px;
    overflow-y: auto;
}

.bench-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(180deg, rgba(20, 20, 30, 0.8), rgba(14, 14, 22, 0.9));
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    min-height: 40px;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: var(--shadow-sm);
}

.bench-chip:active {
    background: var(--acento-dim);
    border-color: var(--acento);
    transform: scale(0.97);
    box-shadow: 0 0 12px rgba(109, 109, 242, 0.15);
}

.bench-chip .bench-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.bench-chip .bench-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1.5px solid rgba(109, 109, 242, 0.2);
}

.bench-chip .dorsal-badge-xs {
    position: absolute;
    bottom: -2px;
    right: -4px;
    background: linear-gradient(135deg, var(--acento), var(--acento-2));
    color: var(--text-inverse);
    font-family: var(--font-display);
    font-size: 8px;
    font-weight: 800;
    min-width: 15px;
    height: 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.5);
    border: 1px solid var(--bg-card);
}

.bench-chip .dorsal-sm {
    font-family: var(--font-display);
    font-weight: 800;
    color: var(--acento);
    font-size: 13px;
}

.bench-chip .gk-tag {
    font-size: 9px;
    color: var(--orange);
    font-weight: 800;
    letter-spacing: 0.5px;
}


/* ─── Action History Log ─── */
#history-area {
    background: var(--bg-base);
    flex-shrink: 0;
    padding: 0 8px;
}

.btn-history-toggle {
    width: 100%;
    background: linear-gradient(180deg, var(--bg-card), rgba(20, 20, 30, 0.8));
    min-height: 36px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-tertiary);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    border: 1px solid var(--border-subtle);
    border-bottom: none;
    gap: 6px;
}

.history-badge {
    background: var(--bg-elevated);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    height: 18px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    margin-left: auto;
}

.history-chevron {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-history-toggle.open .history-chevron {
    transform: rotate(180deg);
}

.history-list {
    max-height: 180px;
    overflow-y: auto;
    padding: 6px 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    border: 1px solid var(--border-subtle);
    border-top: none;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    background: var(--bg-card);
}

.history-empty {
    text-align: center;
    color: var(--text-tertiary);
    font-size: 12px;
    padding: 12px 8px;
    opacity: 0.6;
}

.history-entry {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    font-size: 12px;
    border-left: 3px solid var(--acento);
}

.history-entry.history-rival {
    border-left-color: var(--rose);
}

.history-minute {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--text-secondary);
    min-width: 36px;
    font-size: 11px;
}

.history-player {
    color: var(--text-primary);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.history-action {
    color: var(--text-tertiary);
    margin-left: auto;
    white-space: nowrap;
    font-size: 11px;
}

/* ─── Match controls ─── */
#match-controls {
    display: flex;
    gap: 6px;
    padding: 5px 8px 8px;
    background: var(--bg-base);
    flex-shrink: 0;
}

.btn-control {
    flex: 1;
    min-height: 38px;
    font-size: 13px;
    font-weight: 600;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-tertiary);
    gap: 6px;
}

.btn-control:active {
    background: var(--bg-elevated);
}

.btn-control-end {
    color: var(--rose);
    border-color: rgba(244, 63, 94, 0.15);
}


/* Sub modal */
.sub-label {
    font-weight: 700;
    color: var(--acento);
    margin-bottom: 4px;
}

.sub-hint {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-bottom: 10px;
}

.sub-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sub-list button {
    background: var(--bg-raised);
    border: 1px solid var(--border-default);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    min-height: 44px;
}

.sub-list button:active {
    background: var(--acento-dim);
    border-color: var(--acento);
    color: var(--acento);
}


/* ════════════════════════════════════════
   SUMMARY SCREEN
   ════════════════════════════════════════ */
#summary-screen {
    padding: 0;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(109, 109, 242, 0.04) 0%, transparent 50%),
        var(--bg-deep);
}

.summary-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px 16px 40px;
}

.summary-header {
    text-align: center;
    margin-bottom: 20px;
}

.brand-logo-sm {
    justify-content: center;
    margin-bottom: 8px;
}

.brand-logo-sm .brand-name {
    font-size: 18px;
}

.summary-title {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}

.summary-score-card {
    background: linear-gradient(135deg, rgba(20, 20, 30, 0.9), rgba(14, 14, 22, 0.95));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    box-shadow: var(--shadow-lg);
}

.summary-score-card strong {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 4px;
}

.summary-rival-bar {
    text-align: center;
    font-size: 13px;
    color: var(--text-tertiary);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 10px;
    margin-bottom: 16px;
}

.summary-section {
    margin-bottom: 20px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 10px;
    letter-spacing: 0.3px;
}

.section-title svg {
    color: var(--acento);
    opacity: 0.7;
}

/* Stats table */
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-md);
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    min-width: 640px;
}

.stats-table th {
    background: var(--bg-card);
    padding: 10px 6px;
    text-align: center;
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-tertiary);
    border-bottom: 1px solid var(--border-default);
    position: sticky;
    top: 0;
    z-index: 2;
}

.stats-table th:first-child,
.stats-table td:first-child {
    text-align: left;
    padding-left: 12px;
    position: sticky;
    left: 0;
    background: var(--bg-raised);
    z-index: 3;
    font-weight: 700;
}

.stats-table th:first-child {
    background: var(--bg-card);
    z-index: 4;
}

.stats-table td {
    padding: 8px 6px;
    text-align: center;
    border-bottom: 1px solid var(--border-subtle);
    font-variant-numeric: tabular-nums;
    color: var(--text-secondary);
}

.stats-table tr:nth-child(even) td {
    background: rgba(255,255,255,0.015);
}

.stats-table tr:nth-child(even) td:first-child {
    background: var(--bg-raised);
}

.stats-table td.highlight {
    color: var(--acento);
    font-weight: 800;
}

/* Goal log */
.goal-entry {
    background: linear-gradient(135deg, rgba(20, 20, 30, 0.8), rgba(14, 14, 22, 0.9));
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px;
    margin-bottom: 8px;
    font-size: 14px;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: var(--shadow-sm);
}

.goal-entry .goal-minute {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--text-tertiary);
    font-size: 13px;
    letter-spacing: 0.5px;
}

.goal-entry .goal-team-my {
    color: var(--acento);
    font-weight: 700;
}

.goal-entry .goal-team-rival {
    color: var(--rose);
    font-weight: 700;
}

.goal-entry .goal-players {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid var(--border-subtle);
    line-height: 1.5;
}

/* Export buttons */
.export-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 24px;
    padding-bottom: 30px;
}

.btn-export {
    min-height: 52px;
    font-size: 15px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--acento), var(--acento-2));
    color: var(--text-inverse);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-glow-acento), var(--shadow-md);
    gap: 10px;
}

.btn-export:active {
    box-shadow: 0 0 30px rgba(109, 109, 242, 0.35);
}

.btn-new-match {
    min-height: 48px;
    font-size: 14px;
    border: 1px solid var(--border-default);
    box-shadow: none;
}


/* ════════════════════════════════════════
   PLAYER PHOTOS
   ════════════════════════════════════════ */

/* Photo picker in modal */
.form-row-photo {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.photo-picker {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg-raised);
    border: 2px dashed var(--border-strong);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.2s;
    gap: 2px;
}

.photo-picker:active {
    border-color: var(--acento);
    background: var(--acento-dim);
}

.photo-placeholder-icon {
    color: var(--text-tertiary);
}

.photo-hint {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}


/* ════════════════════════════════════════
   PRINT STYLES
   ════════════════════════════════════════ */
@media print {
    * {
        overflow: visible !important;
    }

    body {
        background: white;
        color: #1a1a1a;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        height: auto;
        overflow: visible;
    }

    body::after {
        display: none;
    }

    .screen { padding: 10px; min-height: auto; height: auto !important; overflow: visible !important; }

    .export-buttons,
    #match-screen,
    #setup-screen { display: none !important; }

    #summary-screen {
        display: block !important;
        background: white;
        height: auto !important;
        overflow: visible !important;
    }

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

    .table-scroll {
        overflow: visible !important;
    }

    .stats-table {
        page-break-inside: auto;
        font-size: 10px;
    }

    .stats-table tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }

    .stats-table thead {
        display: table-header-group;
    }

    .summary-section {
        page-break-inside: avoid;
    }

    .goal-entry {
        page-break-inside: avoid;
    }

    .brand-name {
        -webkit-text-fill-color: #14141B;
        background: none;
    }

    .summary-title {
        color: #1a1a1a;
    }

    .summary-score-card {
        background: #f5f5f5;
        border-color: #ddd;
        color: #333;
    }

    .summary-score-card strong {
        color: #1a1a1a;
    }

    .summary-rival-bar {
        background: #f8f8f8;
        border-color: #ddd;
        color: #666;
    }

    .section-title {
        color: #333;
    }

    .section-title svg {
        color: #22c55e;
    }

    .table-scroll {
        border-color: #ddd;
    }

    .stats-table th {
        background: #f0f0f0;
        color: #555;
        border-color: #ddd;
    }

    .stats-table th:first-child,
    .stats-table td:first-child {
        background: white;
    }

    .stats-table td {
        border-color: #eee;
        color: #333;
    }

    .stats-table td.highlight {
        color: #16a34a;
    }

    .goal-entry {
        background: #f8f8f8;
        border-color: #ddd;
    }

    .goal-entry .goal-team-my {
        color: #16a34a;
    }

    .goal-entry .goal-team-rival {
        color: #dc2626;
    }

    .goal-entry .goal-players {
        border-color: #eee;
        color: #666;
    }
}


/* ════════════════════════════════════════
   SCROLLBAR
   ════════════════════════════════════════ */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 4px;
}

/* ════════════════════════════════════════
   RESPONSIVE — Larger screens
   ════════════════════════════════════════ */
@media (min-width: 420px) {
    .action-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 5px;
    }

    .btn-action {
        min-height: 56px;
        font-size: 10px;
    }

    .court-card {
        min-height: 90px;
    }

    .court-card .card-dorsal {
        font-size: 28px;
    }
}

@media (min-width: 768px) {
    .setup-container,
    .summary-container {
        max-width: 560px;
    }

    .scoreboard {
        max-width: 600px;
    }
}


/* ════════════════════════════════════════
   TABLET LANDSCAPE — Side-panel layout
   ════════════════════════════════════════ */
@media (min-width: 768px) and (orientation: landscape) {

    /* --- Match screen: 2-panel layout --- */
    #match-screen {
        flex-direction: row;
        overflow: hidden;
    }

    /* Left panel: scoreboard + court */
    .landscape-left-panel {
        flex: 1 1 0%;
        min-width: 0;
        display: flex;
        flex-direction: column;
        height: 100vh;
        height: 100dvh;
        overflow: hidden;
    }

    /* Right panel: rival + actions + bench + controls */
    .landscape-right-panel {
        width: 280px;
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
        height: 100vh;
        height: 100dvh;
        overflow-y: auto;
        overflow-x: hidden;
        background: var(--bg-base);
        border-left: 1px solid var(--border-subtle);
    }

    /* Reset portrait order overrides */
    #match-header, #rival-actions, #court-area,
    #action-bar, #bench-area, #history-area, #match-controls {
        order: 0;
    }

    /* --- Scoreboard: compact in landscape --- */
    #match-header {
        padding: 6px 10px 0;
    }

    .scoreboard {
        max-width: 100%;
        padding: 6px 12px;
    }

    .sb-score {
        font-size: 28px;
        min-width: 32px;
    }

    .sb-dash {
        font-size: 20px;
    }

    .sb-center {
        padding: 0 12px;
    }

    .sb-clock {
        font-size: 14px;
    }

    .sb-crest {
        width: 26px;
        height: 26px;
    }

    .sb-crest-rival {
        width: 26px;
        height: 26px;
    }

    .sb-name {
        font-size: 11px;
    }

    .sb-gradient-bar {
        margin-top: 6px;
    }

    /* --- Court: fills remaining left space, 5 columns --- */
    #court-area {
        flex: 1;
        padding: 6px;
        overflow-y: auto;
        align-items: center;
        justify-content: center;
    }

    .court-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 6px;
        align-content: center;
    }

    .court-card {
        min-height: 70px;
        padding: 8px 4px 6px;
    }

    .court-card .card-dorsal {
        font-size: 22px;
    }

    .court-card .court-avatar {
        width: 36px;
        height: 36px;
    }

    .court-card .card-name {
        font-size: 11px;
    }

    .court-card .card-time {
        font-size: 9px;
    }

    .court-card .card-gk {
        font-size: 7px;
        padding: 1px 4px;
    }

    .court-card .btn-sub {
        width: 22px;
        height: 22px;
        min-height: 22px;
    }

    .court-card .btn-sub svg {
        width: 12px;
        height: 12px;
    }

    .court-card .court-dorsal-badge {
        font-size: 9px;
        min-width: 18px;
        height: 18px;
    }

    /* Mini stats smaller */
    .mini-stat {
        font-size: 8px;
        padding: 1px 4px;
    }

    /* --- Right panel: Rival actions compact --- */
    #rival-actions {
        padding: 6px 8px 5px;
        flex-shrink: 0;
    }

    .rival-buttons-row {
        flex-direction: column;
        gap: 4px;
    }

    .btn-rival {
        min-height: 38px;
        font-size: 11px;
        padding: 5px 8px;
    }

    /* --- Action bar in right panel --- */
    #action-bar {
        padding: 6px 6px 8px;
        border-top: 2px solid var(--acento);
        box-shadow: none;
        flex-shrink: 0;
    }

    #selected-player-label {
        font-size: 12px;
        margin-bottom: 6px;
    }

    .action-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 3px;
    }

    .btn-action {
        min-height: 44px;
        padding: 4px 2px;
        font-size: 8px;
        gap: 2px;
    }

    .btn-action .action-icon {
        width: 22px;
        height: 22px;
    }

    .btn-action .action-icon svg {
        width: 14px;
        height: 14px;
    }

    .btn-action .action-text {
        font-size: 8px;
    }

    /* --- Bench in right panel --- */
    #bench-area {
        padding: 0 6px;
        flex-shrink: 0;
    }

    .btn-bench-toggle {
        min-height: 32px;
        font-size: 12px;
    }

    .bench-grid {
        max-height: 120px;
        gap: 4px;
        padding: 6px 0;
    }

    .bench-chip {
        padding: 6px 8px;
        font-size: 12px;
        min-height: 36px;
        gap: 5px;
    }

    .bench-chip .bench-avatar {
        width: 22px;
        height: 22px;
    }

    /* --- History in right panel --- */
    #history-area {
        padding: 0 6px;
        flex-shrink: 0;
    }

    .btn-history-toggle {
        min-height: 32px;
        font-size: 12px;
    }

    .history-list {
        max-height: 140px;
    }

    /* --- Controls in right panel --- */
    #match-controls {
        padding: 4px 6px 6px;
        gap: 4px;
        flex-shrink: 0;
        margin-top: auto;
    }

    .btn-control {
        min-height: 34px;
        font-size: 12px;
    }

    /* --- Court lines adjustments --- */
    .court-center-circle {
        width: 60px;
        height: 60px;
    }

    .court-penalty-left,
    .court-penalty-right {
        width: 40px;
        height: 80px;
    }
}

/* Large tablet landscape (1024+) — more spacious */
@media (min-width: 1024px) and (orientation: landscape) {

    .landscape-right-panel {
        width: 320px;
    }

    .scoreboard {
        padding: 8px 16px;
    }

    .sb-score {
        font-size: 32px;
        min-width: 36px;
    }

    .sb-clock {
        font-size: 15px;
    }

    .sb-crest {
        width: 30px;
        height: 30px;
    }

    .sb-crest-rival {
        width: 30px;
        height: 30px;
    }

    .sb-name {
        font-size: 12px;
    }

    #court-area {
        padding: 8px;
    }

    .court-grid {
        gap: 8px;
    }

    .court-card {
        min-height: 80px;
        padding: 10px 6px 8px;
    }

    .court-card .card-dorsal {
        font-size: 24px;
    }

    .court-card .court-avatar {
        width: 40px;
        height: 40px;
    }

    .court-card .card-name {
        font-size: 12px;
    }

    .court-card .card-time {
        font-size: 10px;
    }

    .mini-stat {
        font-size: 9px;
    }

    /* Right panel: 3-column action grid on larger tablets */
    .action-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 4px;
    }

    .btn-action {
        min-height: 48px;
        font-size: 9px;
        gap: 2px;
    }

    .btn-action .action-icon {
        width: 24px;
        height: 24px;
    }

    .btn-action .action-icon svg {
        width: 16px;
        height: 16px;
    }

    .btn-action .action-text {
        font-size: 9px;
    }

    .rival-buttons-row {
        flex-direction: row;
    }

    .btn-rival {
        min-height: 40px;
        font-size: 12px;
    }

    .bench-chip {
        padding: 8px 10px;
        font-size: 13px;
        min-height: 38px;
    }

    .btn-control {
        min-height: 36px;
        font-size: 13px;
    }
}

/* ════════════════════════════════════════════════════════════
   Firma del fabricante y estado sin conexión
   ════════════════════════════════════════════════════════════ */

.firma-palkko {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 18px 0 6px;
    text-decoration: none;
    color: var(--text-tertiary);
    font-size: 11px;
    letter-spacing: 0.02em;
    transition: color 0.2s ease;
}

.firma-palkko:hover { color: var(--text-secondary); }
.firma-palkko img { border-radius: 4px; opacity: 0.9; }
.firma-palkko strong { font-weight: 600; }

/* Sin conexión: informa, no alarma — aquí es lo normal, no un fallo */
.offline-pill {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 8px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 9998;
    padding: 7px 14px;
    border-radius: 999px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-default);
    color: var(--text-secondary);
    font-size: 11.5px;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: var(--shadow-md);
}

/* ─── Compartir ─── */
.btn-share {
    background: var(--acento-dim);
    border-color: rgba(109, 109, 242, 0.35);
    color: var(--acento);
}

/* ─── Copia de seguridad ─── */
.copia-zona {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border-subtle);
}

.copia-aviso {
    color: var(--text-tertiary);
    font-size: 11.5px;
    line-height: 1.45;
    margin-bottom: 10px;
}

.copia-botones {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.btn-copia {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    padding: 0 10px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-default);
    background: var(--bg-raised);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.btn-copia:active {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

/* ─── Nota del jugador ─── */
.mini-stat.nota {
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}

.mini-stat.nota.nota-alta {
    background: var(--green-bg);
    color: var(--green);
    border-color: var(--green-border);
}

.mini-stat.nota.nota-media {
    background: var(--acento-dim);
    color: var(--acento);
    border-color: rgba(109, 109, 242, 0.35);
}

.mini-stat.nota.nota-baja {
    background: var(--amber-bg);
    color: var(--amber);
    border-color: var(--amber-border);
}

/* Botones de las acciones nuevas */
.btn-action.btn-recovery { color: var(--green); }
.btn-action.btn-recovery .action-icon { background: var(--green-bg); border-color: var(--green-border); }
.btn-action.btn-loss { color: var(--orange); }
.btn-action.btn-loss .action-icon { background: var(--orange-bg); border-color: var(--orange-border); }

/* Columna de nota en la tabla del resumen */
.nota-celda { font-weight: 800; font-variant-numeric: tabular-nums; }
.nota-celda.nota-alta { color: var(--green); }
.nota-celda.nota-baja { color: var(--amber); }

/* Nota en el chip del banquillo */
.bench-nota {
    margin-left: auto;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    border: 1px solid transparent;
}

.bench-nota.nota-alta  { background: var(--green-bg);  color: var(--green);  border-color: var(--green-border); }
.bench-nota.nota-media { background: var(--acento-dim); color: var(--acento); border-color: rgba(109,109,242,0.35); }
.bench-nota.nota-baja  { background: var(--amber-bg);  color: var(--amber);  border-color: var(--amber-border); }

/* Aún no ha jugado: hay hueco reservado, pero sin número inventado */
.bench-nota-vacia {
    background: transparent;
    color: var(--text-tertiary);
    border-color: var(--border-subtle);
    font-weight: 600;
}

/* Sello de versión, junto a la firma */
.firma-version {
    font-variant-numeric: tabular-nums;
    opacity: 0.45;
    font-size: 10px;
}
