/* ═══════════════════════════════════════════════════════════════════
   SportProgressHub — Design System v2
   SaaS Premium · Deportivo · Mobile-First · Minimalista
   ═══════════════════════════════════════════════════════════════════ */

/* ── Design Tokens ─────────────────────────────────────────────── */
:root {
    /* Sidebar — Near-black */
    --sidebar-bg: #12181f;
    --sidebar-hover-bg: rgba(255, 255, 255, 0.08);
    --sidebar-active-bg: rgba(29, 158, 117, 0.12);
    --sidebar-text: #c4c9d1;
    --sidebar-text-hover: #ffffff;
    --sidebar-text-active: #ffffff;
    --sidebar-text-secondary: #7a8290;
    --sidebar-accent: #1D9E75;
    --sidebar-border: rgba(255, 255, 255, 0.1);
    --sidebar-width: 256px;

    /* Primary — Azul confianza */
    --primary-50: #EFF6FF;
    --primary-100: #DBEAFE;
    --primary-500: #3B82F6;
    --primary-600: #2563EB;
    --primary-700: #1D4ED8;

    /* Accent — Verde energía */
    --accent-50: #ECFDF5;
    --accent-400: #27C28A;
    --accent-500: #1D9E75;
    --accent-600: #168A65;

    /* Amber — Calidez/Atención */
    --amber-50: #FFFBEB;
    --amber-400: #FBBF24;
    --amber-500: #F59E0B;
    --amber-600: #D97706;

    /* Violet */
    --violet-50: #F5F3FF;
    --violet-400: #A78BFA;
    --violet-500: #8B5CF6;

    /* Danger */
    --danger-500: #EF4444;

    /* Neutrals */
    --neutral-0: #FFFFFF;
    --neutral-50: #F8FAFC;
    --neutral-100: #F1F5F9;
    --neutral-200: #E2E8F0;
    --neutral-300: #CBD5E1;
    --neutral-400: #94A3B8;
    --neutral-500: #64748B;
    --neutral-600: #475569;
    --neutral-700: #334155;
    --neutral-800: #1E293B;
    --neutral-900: #0F172A;

    /* Surfaces */
    --bg-body: #F1F5F9;
    --bg-card: #FFFFFF;
    --bg-topbar: #FFFFFF;

    /* Typography */
    --ff: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --fs-2xs: 0.6875rem;
    --fs-xs: 0.75rem;
    --fs-sm: 0.8125rem;
    --fs-base: 0.875rem;
    --fs-md: 1rem;
    --fs-lg: 1.125rem;
    --fs-xl: 1.25rem;
    --fs-2xl: 1.5rem;
    --fs-3xl: 2rem;
    --fs-4xl: 2.5rem;

    /* Spacing scale */
    --s1: 0.25rem;
    --s2: 0.5rem;
    --s3: 0.75rem;
    --s4: 1rem;
    --s5: 1.25rem;
    --s6: 1.5rem;
    --s8: 2rem;
    --s10: 2.5rem;
    --s12: 3rem;

    /* Radii */
    --r-sm: 6px;
    --r-md: 8px;
    --r-lg: 12px;
    --r-xl: 16px;
    --r-2xl: 20px;
    --r-full: 9999px;

    /* Shadows */
    --sh-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --sh-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --sh-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
    --sh-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.07), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --sh-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.07), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
    --sh-card-hover: 0 12px 28px -6px rgba(0, 0, 0, 0.12);

    /* Transitions */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --t-fast: 150ms var(--ease);
    --t-base: 250ms var(--ease);
    --t-slow: 400ms var(--ease);

    /* Layout */
    --topbar-h: 60px;
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--ff);
    font-size: var(--fs-base);
    color: var(--neutral-800);
    background: var(--bg-body);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.25;
    color: var(--neutral-900);
}

a {
    color: var(--primary-500);
    text-decoration: none;
}

a:hover {
    color: var(--primary-700);
}

/* Sidebar links — global override to guarantee color/padding
   regardless of Blazor CSS isolation scope propagation         */
.sb-link,
.sb-link:visited {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    margin: 0 8px;
    border-radius: 8px;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 500;
    position: relative;
    cursor: pointer;
    transition: background 200ms ease, color 200ms ease;
}

.sb-link:hover {
    background: var(--sidebar-hover-bg);
    color: var(--sidebar-text-hover);
}

.sb-link.active {
    background: var(--sidebar-active-bg);
    color: var(--sidebar-text-active);
}

img {
    max-width: 100%;
    display: block;
}

button {
    font-family: var(--ff);
}

/* ════════════════════════════════════════════════════════════════════
   METRIC CARD — Ícono arriba · Número grande al centro · Label abajo
   ════════════════════════════════════════════════════════════════════ */
.metric-card {
    background: var(--bg-card);
    border-radius: var(--r-xl);
    padding: var(--s8) var(--s6);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--s4);
    border: 1px solid var(--neutral-200);
    box-shadow: var(--sh-sm);
    position: relative;
    overflow: hidden;
    transition: transform var(--t-base), box-shadow var(--t-base);
    cursor: default;
}

.metric-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--sh-card-hover);
}

/* Glowing top border */
.metric-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    transition: height var(--t-base);
}

.metric-card:hover::after {
    height: 4px;
}

/* Color variants */
.metric-card--blue::after {
    background: linear-gradient(90deg, var(--primary-500), var(--primary-600));
}

.metric-card--green::after {
    background: linear-gradient(90deg, var(--accent-500), var(--accent-400));
}

.metric-card--amber::after {
    background: linear-gradient(90deg, var(--amber-500), var(--amber-400));
}

.metric-card--violet::after {
    background: linear-gradient(90deg, var(--violet-500), var(--violet-400));
}

/* ── Icon circle (grande, arriba) ── */
.metric-card__icon {
    width: 64px;
    height: 64px;
    border-radius: var(--r-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.65rem;
    transition: transform var(--t-base);
}

.metric-card:hover .metric-card__icon {
    transform: scale(1.08);
}

.metric-card--blue .metric-card__icon {
    background: var(--primary-50);
    color: var(--primary-500);
}

.metric-card--green .metric-card__icon {
    background: var(--accent-50);
    color: var(--accent-500);
}

.metric-card--amber .metric-card__icon {
    background: var(--amber-50);
    color: var(--amber-500);
}

.metric-card--violet .metric-card__icon {
    background: var(--violet-50);
    color: var(--violet-500);
}

/* ── Number (grande, centro) ── */
.metric-card__value {
    font-size: var(--fs-4xl);
    font-weight: 800;
    line-height: 1;
    color: var(--neutral-900);
    letter-spacing: -0.02em;
}

/* ── Label (abajo) ── */
.metric-card__label {
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--neutral-500);
    letter-spacing: 0.01em;
}

/* ── Optional trend badge ── */
.metric-card__trend {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: var(--fs-xs);
    font-weight: 600;
    padding: 2px 10px;
    border-radius: var(--r-full);
    margin-top: calc(-1 * var(--s2));
}

.metric-card__trend--up {
    background: var(--accent-50);
    color: var(--accent-600);
}

.metric-card__trend--neutral {
    background: var(--primary-50);
    color: var(--primary-600);
}

/* ════════════════════════════════════════════════════════════════════
   DASHBOARD GRID
   ════════════════════════════════════════════════════════════════════ */
.dashboard-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s5);
}

@media (min-width: 480px) {
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1100px) {
    .dashboard-stats {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ════════════════════════════════════════════════════════════════════
   PAGE HEADER
   ════════════════════════════════════════════════════════════════════ */
.page-header {
    margin-bottom: var(--s8);
}

.page-header__title {
    font-size: var(--fs-2xl);
    font-weight: 800;
    color: var(--neutral-900);
    line-height: 1.2;
}

.page-header__subtitle {
    font-size: var(--fs-base);
    color: var(--neutral-500);
    margin-top: var(--s1);
}

/* ════════════════════════════════════════════════════════════════════
   WELCOME BANNER
   ════════════════════════════════════════════════════════════════════ */
.welcome-banner {
    background: linear-gradient(135deg, #0B1F3A 0%, #143055 40%, #0E6B55 100%);
    border-radius: var(--r-2xl);
    padding: var(--s8);
    color: white;
    position: relative;
    overflow: hidden;
    margin-bottom: var(--s8);
}

/* Decorative shapes */
.welcome-banner::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -10%;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.welcome-banner::after {
    content: '';
    position: absolute;
    bottom: -25%;
    left: 5%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(45, 212, 160, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.welcome-banner__inner {
    position: relative;
    z-index: 1;
}

.welcome-banner__eyebrow {
    font-size: var(--fs-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    opacity: 0.65;
    margin-bottom: var(--s2);
}

.welcome-banner__title {
    font-size: var(--fs-2xl);
    font-weight: 800;
    color: white;
    margin-bottom: var(--s2);
}

.welcome-banner__desc {
    font-size: var(--fs-base);
    opacity: 0.78;
    max-width: 520px;
    line-height: 1.6;
}

@media (min-width: 768px) {
    .welcome-banner {
        padding: var(--s10) var(--s12);
    }

    .welcome-banner__title {
        font-size: var(--fs-3xl);
    }
}

/* ════════════════════════════════════════════════════════════════════
   SECTION CARD (for panels below the stats)
   ════════════════════════════════════════════════════════════════════ */
.section-card {
    background: var(--bg-card);
    border-radius: var(--r-xl);
    border: 1px solid var(--neutral-200);
    box-shadow: var(--sh-xs);
    padding: var(--s6);
}

.section-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--s5);
}

.section-card__title {
    font-size: var(--fs-lg);
    font-weight: 700;
    color: var(--neutral-900);
}

.section-card__action {
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--primary-500);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    transition: color var(--t-fast);
}

.section-card__action:hover {
    color: var(--primary-700);
}

/* ════════════════════════════════════════════════════════════════════
   QUICK ACTIONS ROW
   ════════════════════════════════════════════════════════════════════ */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--s3);
    margin-bottom: var(--s8);
}

@media (min-width: 640px) {
    .quick-actions {
        grid-template-columns: repeat(4, 1fr);
    }
}

.qa-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--s2);
    padding: var(--s5) var(--s4);
    background: var(--bg-card);
    border: 1px solid var(--neutral-200);
    border-radius: var(--r-lg);
    cursor: pointer;
    transition: all var(--t-base);
    text-align: center;
}

.qa-btn:hover {
    border-color: var(--primary-500);
    box-shadow: var(--sh-md), 0 0 0 3px rgba(59, 130, 246, 0.08);
    transform: translateY(-2px);
}

.qa-btn__icon {
    width: 44px;
    height: 44px;
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    background: var(--neutral-100);
    color: var(--primary-500);
    transition: background var(--t-fast);
}

.qa-btn:hover .qa-btn__icon {
    background: var(--primary-50);
}

.qa-btn__label {
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--neutral-700);
}

/* ════════════════════════════════════════════════════════════════════
   CONTENT 2-COL GRID
   ════════════════════════════════════════════════════════════════════ */
.content-cols {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s6);
}

@media (min-width: 1024px) {
    .content-cols {
        grid-template-columns: 3fr 2fr;
    }
}

/* ════════════════════════════════════════════════════════════════════
   ACTIVITY LIST
   ════════════════════════════════════════════════════════════════════ */
.activity-list {
    list-style: none;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: var(--s3);
    padding: var(--s3) 0;
    border-bottom: 1px solid var(--neutral-100);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item__dot {
    width: 36px;
    height: 36px;
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.activity-item__dot--blue {
    background: var(--primary-50);
    color: var(--primary-500);
}

.activity-item__dot--green {
    background: var(--accent-50);
    color: var(--accent-500);
}

.activity-item__dot--amber {
    background: var(--amber-50);
    color: var(--amber-500);
}

.activity-item__dot--violet {
    background: var(--violet-50);
    color: var(--violet-500);
}

.activity-item__body {
    flex: 1;
    min-width: 0;
}

.activity-item__title {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--neutral-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-item__sub {
    font-size: var(--fs-xs);
    color: var(--neutral-400);
}

.activity-item__time {
    font-size: var(--fs-xs);
    color: var(--neutral-400);
    white-space: nowrap;
    flex-shrink: 0;
}

/* ════════════════════════════════════════════════════════════════════
   CATEGORY ROW
   ════════════════════════════════════════════════════════════════════ */
.cat-row {
    display: flex;
    align-items: center;
    gap: var(--s3);
    padding: var(--s3) 0;
}

.cat-row+.cat-row {
    border-top: 1px solid var(--neutral-100);
}

.cat-row__name {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--neutral-800);
    min-width: 52px;
}

.cat-row__bar-wrap {
    flex: 1;
    height: 6px;
    background: var(--neutral-100);
    border-radius: var(--r-full);
    overflow: hidden;
}

.cat-row__bar {
    height: 100%;
    border-radius: var(--r-full);
    transition: width 0.8s var(--ease);
}

.cat-row__bar--blue {
    background: var(--primary-500);
}

.cat-row__bar--green {
    background: var(--accent-500);
}

.cat-row__bar--amber {
    background: var(--amber-500);
}

.cat-row__bar--violet {
    background: var(--violet-500);
}

.cat-row__count {
    font-size: var(--fs-xs);
    color: var(--neutral-400);
    min-width: 60px;
    text-align: right;
}

/* ════════════════════════════════════════════════════════════════════
   PROGRESS BAR (generic)
   ════════════════════════════════════════════════════════════════════ */
.progress-track {
    height: 6px;
    background: var(--neutral-100);
    border-radius: var(--r-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: var(--r-full);
    transition: width 1s var(--ease);
}

.progress-fill--blue {
    background: linear-gradient(90deg, var(--primary-500), var(--primary-600));
}

.progress-fill--green {
    background: linear-gradient(90deg, var(--accent-500), var(--accent-400));
}

.progress-fill--amber {
    background: linear-gradient(90deg, var(--amber-500), var(--amber-400));
}

/* ════════════════════════════════════════════════════════════════════
   ANIMATIONS
   ════════════════════════════════════════════════════════════════════ */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.anim-up {
    animation: fadeUp 0.45s ease-out both;
}

.anim-fade {
    animation: fadeIn 0.35s ease-out both;
}

.d1 {
    animation-delay: 0.06s;
}

.d2 {
    animation-delay: 0.12s;
}

.d3 {
    animation-delay: 0.18s;
}

.d4 {
    animation-delay: 0.24s;
}

.d5 {
    animation-delay: 0.30s;
}

.d6 {
    animation-delay: 0.36s;
}

/* ════════════════════════════════════════════════════════════════════
   ERROR HANDLING
   ════════════════════════════════════════════════════════════════════ */
.blazor-error-boundary {
    background: var(--danger-500);
    padding: var(--s4) var(--s6);
    color: white;
    border-radius: var(--r-md);
    margin: var(--s4);
}

.blazor-error-boundary::after {
    content: "Ha ocurrido un error.";
}

#blazor-error-ui {
    background: #FEF3C7;
    bottom: 0;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
    display: none;
    left: 0;
    padding: var(--s3) var(--s6);
    position: fixed;
    width: 100%;
    z-index: 1000;
    font-size: var(--fs-sm);
    color: #92400E;
    border-top: 2px solid var(--amber-500);
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: var(--s4);
    top: var(--s2);
}

/* ════════════════════════════════════════════════════════════════════
   FORM BASICS
   ════════════════════════════════════════════════════════════════════ */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--accent-500);
}

.invalid {
    outline: 1px solid var(--danger-500);
}

.validation-message {
    color: var(--danger-500);
    font-size: var(--fs-xs);
    margin-top: var(--s1);
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--neutral-300);
    border-radius: var(--r-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--neutral-400);
}

/* ════════════════════════════════════════════════════════════════════
   LOGIN PAGE
   ════════════════════════════════════════════════════════════════════ */
.login-page {
    width: 100%;
    max-width: 420px;
    animation: fadeUp 0.5s ease-out both;
}

.login-card {
    background: rgba(255, 255, 255, 0.97);
    border-radius: 16px;
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.04),
        0 20px 50px rgba(0, 0, 0, 0.12);
    padding: 40px 36px 32px;
    backdrop-filter: blur(10px);
}

/* ── Brand ── */
.login-brand {
    text-align: center;
    margin-bottom: 32px;
}

.login-brand__logo {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent-500), #0B1F3A);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-bottom: 16px;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.25);
}

.login-brand__title {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--neutral-800);
    margin: 0 0 4px;
    letter-spacing: -0.02em;
}

.login-brand__title strong {
    font-weight: 700;
}

.login-brand__sub {
    font-size: 0.8125rem;
    color: var(--neutral-400);
    margin: 0;
}

/* ── Alert ── */
.login-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #B91C1C;
    font-size: 0.8125rem;
    line-height: 1.45;
    margin-bottom: 24px;
    animation: fadeIn 0.3s ease-out;
}

.login-alert i {
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ── Fields ── */
.login-field {
    margin-bottom: 20px;
}

.login-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--neutral-700);
    margin-bottom: 6px;
}

.login-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--neutral-200);
    border-radius: 10px;
    padding: 0 14px;
    height: 46px;
    background: var(--neutral-50);
    transition: all 200ms ease;
}

.login-input-wrap:focus-within {
    border-color: var(--primary-500);
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.login-input-wrap i {
    color: var(--neutral-400);
    font-size: 1rem;
    flex-shrink: 0;
}

.login-input-wrap:focus-within i {
    color: var(--primary-500);
}

.login-input-wrap input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-family: var(--ff);
    font-size: 0.875rem;
    color: var(--neutral-800);
    height: 100%;
}

.login-input-wrap input::placeholder {
    color: var(--neutral-400);
}

/* ── Options ── */
.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.login-remember {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    color: var(--neutral-500);
    cursor: pointer;
}

.login-remember input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-500);
    cursor: pointer;
}

/* ── Button ── */
.login-btn {
    width: 100%;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--primary-500), #2563EB);
    color: white;
    border: none;
    border-radius: 10px;
    font-family: var(--ff);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 200ms ease;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

.login-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #2563EB, #1D4ED8);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.35);
    transform: translateY(-1px);
}

.login-btn:active:not(:disabled) {
    transform: translateY(0);
}

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

/* ── Spinner ── */
.login-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ── Footer ── */
.login-footer {
    text-align: center;
    font-size: 0.6875rem;
    color: var(--neutral-400);
    margin: 24px 0 0;
}

/* ── Access Denied page ── */
.access-denied {
    max-width: 420px;
    text-align: center;
    animation: fadeUp 0.5s ease-out both;
}

.access-denied__icon {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    background: rgba(239, 68, 68, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #EF4444;
    margin-bottom: 20px;
}

.access-denied__title {
    font-size: 1.375rem;
    font-weight: 800;
    color: white;
    margin: 0 0 8px;
}

.access-denied__desc {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 28px;
    line-height: 1.5;
}

.access-denied__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.12);
    color: white;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 200ms ease;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.access-denied__link:hover {
    background: rgba(255, 255, 255, 0.18);
}

/* ════════════════════════════════════════════════════════════════════
   ADMIN PANEL
   ════════════════════════════════════════════════════════════════════ */

/* ── Header ── */
.admin-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.admin-header__title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--neutral-900);
    margin: 0;
    letter-spacing: -0.02em;
}

.admin-header__sub {
    font-size: 0.875rem;
    color: var(--neutral-500);
    margin: 4px 0 0;
}

.admin-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    color: var(--primary-500);
    text-decoration: none;
    margin-bottom: 8px;
    font-weight: 500;
    transition: color 200ms;
}

.admin-back:hover {
    color: var(--primary-700);
}

/* ── Buttons ── */
.admin-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    font-family: var(--ff);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all 200ms ease;
    white-space: nowrap;
}

.admin-btn--primary {
    background: linear-gradient(135deg, var(--accent-500), var(--accent-600));
    color: white;
    box-shadow: 0 2px 8px rgba(29, 158, 117, 0.2);
}

.admin-btn--primary:hover {
    box-shadow: 0 4px 16px rgba(29, 158, 117, 0.3);
    transform: translateY(-1px);
}

.admin-btn--ghost {
    background: transparent;
    color: var(--neutral-600);
    border: 1px solid var(--neutral-200);
}

.admin-btn--ghost:hover {
    background: var(--neutral-50);
    border-color: var(--neutral-300);
}

.admin-btn--danger {
    background: #EF4444;
    color: white;
}

.admin-btn--danger:hover {
    background: #DC2626;
}

/* ── Card ── */
.admin-card {
    background: white;
    border-radius: 14px;
    border: 1px solid var(--neutral-200);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.admin-card--form {
    max-width: 720px;
    padding: 32px;
}

.admin-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid var(--neutral-100);
}

.admin-card__count {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--neutral-500);
}

/* ── Table ── */
.admin-table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.admin-table thead {
    position: sticky;
    top: 0;
    z-index: 2;
}

.admin-table th {
    padding: 12px 24px;
    text-align: left;
    font-weight: 600;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--neutral-500);
    background: var(--neutral-50);
    border-bottom: 1px solid var(--neutral-200);
    white-space: nowrap;
}

.admin-table td {
    padding: 14px 24px;
    color: var(--neutral-700);
    border-bottom: 1px solid var(--neutral-100);
    vertical-align: middle;
}

.admin-table tbody tr {
    transition: background 150ms;
}

.admin-table tbody tr:hover {
    background: var(--neutral-50);
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

/* ── User cell ── */
.admin-user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--r-full);
    background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.admin-user-name {
    font-weight: 600;
    color: var(--neutral-800);
    white-space: nowrap;
}

.admin-email {
    color: var(--neutral-500);
}

.admin-date {
    font-size: 0.75rem;
    color: var(--neutral-400);
    white-space: nowrap;
}

/* ── Role badges ── */
.admin-roles {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.admin-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 100px;
    font-size: 0.6875rem;
    font-weight: 600;
    white-space: nowrap;
}

.admin-badge--admin {
    background: rgba(59, 130, 246, 0.1);
    color: #2563EB;
}

.admin-badge--profesor {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.admin-badge--padre {
    background: rgba(245, 158, 11, 0.1);
    color: #D97706;
}

.admin-badge--jugador {
    background: rgba(139, 92, 246, 0.1);
    color: #7C3AED;
}

/* ── Status ── */
.admin-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
}

.admin-status__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.admin-status--active .admin-status__dot {
    background: var(--accent-500);
}

.admin-status--active {
    color: var(--accent-600);
}

.admin-status--inactive .admin-status__dot {
    background: var(--neutral-400);
}

.admin-status--inactive {
    color: var(--neutral-500);
}

/* ── Action buttons ── */
.admin-actions {
    display: flex;
    gap: 4px;
}

.admin-action-btn {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid var(--neutral-200);
    background: white;
    color: var(--neutral-500);
    font-size: 0.875rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 150ms;
}

.admin-action-btn:hover {
    background: var(--neutral-50);
    border-color: var(--neutral-300);
    color: var(--neutral-700);
}

.admin-action-btn--danger:hover {
    background: #FEF2F2;
    border-color: #FECACA;
    color: #DC2626;
}

.admin-action-btn--success:hover {
    background: var(--accent-50);
    border-color: var(--accent-400);
    color: var(--accent-600);
}

/* ── Alerts ── */
.admin-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.8125rem;
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease-out;
}

.admin-alert--success {
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    color: #166534;
}

.admin-alert--error {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #B91C1C;
}

.admin-alert__close {
    margin-left: auto;
    background: none;
    border: none;
    color: inherit;
    opacity: 0.5;
    cursor: pointer;
    font-size: 0.75rem;
    padding: 4px;
}

.admin-alert__close:hover {
    opacity: 1;
}

/* ── Loading ── */
.admin-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 60px 20px;
    color: var(--neutral-400);
    font-size: 0.875rem;
}

.admin-loading__spinner {
    width: 28px;
    height: 28px;
    border: 3px solid var(--neutral-200);
    border-top-color: var(--primary-500);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

/* ── Form fields ── */
.admin-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

@media (min-width: 640px) {
    .admin-form-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.admin-field {
    margin-bottom: 16px;
}

.admin-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--neutral-700);
    margin-bottom: 6px;
}

.admin-req {
    color: #EF4444;
}

.admin-input {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    border: 1px solid var(--neutral-200);
    border-radius: 10px;
    font-family: var(--ff);
    font-size: 0.875rem;
    color: var(--neutral-800);
    background: var(--neutral-50);
    transition: all 200ms ease;
    box-sizing: border-box;
}

.admin-input:focus {
    outline: none;
    border-color: var(--primary-500);
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.admin-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.admin-hint {
    display: block;
    font-size: 0.6875rem;
    color: var(--neutral-400);
    margin-top: 4px;
}

.admin-section-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--neutral-400);
}

.admin-section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--neutral-200);
}

/* ── Role checkboxes ── */
.admin-role-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-role-check {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.admin-role-check input {
    display: none;
}

.admin-role-check__box {
    width: 20px;
    height: 20px;
    border: 2px solid var(--neutral-300);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: transparent;
    transition: all 150ms;
    flex-shrink: 0;
}

.admin-role-check input:checked~.admin-role-check__box {
    background: var(--primary-500);
    border-color: var(--primary-500);
    color: white;
}

/* ── Toggle switch ── */
.admin-toggle-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.admin-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    cursor: pointer;
}

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

.admin-toggle__slider {
    position: absolute;
    inset: 0;
    background: var(--neutral-300);
    border-radius: 100px;
    transition: all 200ms;
}

.admin-toggle__slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    top: 3px;
    left: 3px;
    transition: transform 200ms;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.admin-toggle input:checked+.admin-toggle__slider {
    background: var(--accent-500);
}

.admin-toggle input:checked+.admin-toggle__slider::before {
    transform: translateX(20px);
}

/* ── Form footer ── */
.admin-form-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--neutral-100);
}

/* ── Modal ── */
.admin-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(3px);
    animation: fadeIn 0.2s ease-out;
}

.admin-modal {
    background: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: fadeUp 0.3s ease-out;
}

.admin-modal__icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: #FEF3C7;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #D97706;
    margin-bottom: 16px;
}

.admin-modal__title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--neutral-900);
    margin: 0 0 8px;
}

.admin-modal__desc {
    font-size: 0.875rem;
    color: var(--neutral-500);
    margin: 0 0 24px;
    line-height: 1.5;
}

.admin-modal__actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.admin-modal__actions .admin-btn {
    flex: 1;
    justify-content: center;
}

/* ── Role Badges ── */
.admin-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.admin-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.6;
    white-space: nowrap;
    border: 1px solid transparent;
}

.admin-badge--platformadmin {
    background: linear-gradient(135deg, #FEF3C7, #FDE68A);
    border-color: #F59E0B;
    color: #92400E;
}

.admin-badge--admin {
    background: #F3E8FF;
    border-color: #C084FC;
    color: #7C3AED;
}

.admin-badge--profesor {
    background: #DBEAFE;
    border-color: #93C5FD;
    color: #2563EB;
}

.admin-badge--padre {
    background: #CCFBF1;
    border-color: #5EEAD4;
    color: #0D9488;
}

.admin-badge--jugador {
    background: #DCFCE7;
    border-color: #86EFAC;
    color: #16A34A;
}

/* ════════════════════════════════════════════════════════════════════
   SIDEBAR NAV — layout vertical explícito
   Garantiza que los links se apilen en columna independientemente
   de si el CSS isolation (scope attributes) está activo.
   ════════════════════════════════════════════════════════════════════ */
.sb-section {
    display: flex;
    flex-direction: column;
}

/* ════════════════════════════════════════════════════════════════════
   PAGE HEADER (extended — sub alias)
   ════════════════════════════════════════════════════════════════════ */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--s4);
    margin-bottom: var(--s8);
    flex-wrap: wrap;
}

.page-header__sub {
    font-size: var(--fs-sm);
    color: var(--neutral-500);
    margin-top: var(--s1);
}

/* ════════════════════════════════════════════════════════════════════
   GENERIC BUTTONS  (.btn)
   ════════════════════════════════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--s2);
    padding: 10px 18px;
    border-radius: var(--r-md);
    font-family: var(--ff);
    font-size: var(--fs-sm);
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all var(--t-base);
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.btn--primary {
    background: linear-gradient(135deg, var(--accent-500), var(--accent-600));
    color: white;
    box-shadow: 0 2px 8px rgba(29, 158, 117, 0.2);
}

.btn--primary:hover:not(:disabled) {
    box-shadow: 0 4px 16px rgba(29, 158, 117, 0.32);
    transform: translateY(-1px);
}

.btn--ghost {
    background: transparent;
    color: var(--neutral-600);
    border: 1px solid var(--neutral-200);
}

.btn--ghost:hover:not(:disabled) {
    background: var(--neutral-50);
    border-color: var(--neutral-300);
}

/* ════════════════════════════════════════════════════════════════════
   ICON BUTTONS  (.btn-icon)
   ════════════════════════════════════════════════════════════════════ */
.btn-icon {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-sm);
    border: 1px solid var(--neutral-200);
    background: white;
    color: var(--neutral-500);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--t-fast);
}

.btn-icon--edit:hover {
    background: var(--primary-50);
    border-color: var(--primary-500);
    color: var(--primary-600);
}

.btn-icon--warn:hover {
    background: var(--amber-50);
    border-color: var(--amber-500);
    color: var(--amber-600);
}

.btn-icon--success:hover {
    background: var(--accent-50);
    border-color: var(--accent-500);
    color: var(--accent-600);
}

/* ════════════════════════════════════════════════════════════════════
   GENERIC BADGES  (.badge)
   ════════════════════════════════════════════════════════════════════ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: var(--r-full);
    font-size: var(--fs-xs);
    font-weight: 600;
    white-space: nowrap;
}

.badge--active {
    background: var(--accent-50);
    color: var(--accent-600);
    border: 1px solid #A7F3D0;
}

.badge--inactive {
    background: var(--neutral-100);
    color: var(--neutral-500);
    border: 1px solid var(--neutral-200);
}

.badge--position {
    background: var(--primary-50);
    color: var(--primary-600);
    border: 1px solid var(--primary-100);
}

/* ════════════════════════════════════════════════════════════════════
   GENERIC ALERTS  (.alert)
   ════════════════════════════════════════════════════════════════════ */
.alert {
    display: flex;
    align-items: center;
    gap: var(--s2);
    padding: 12px 16px;
    border-radius: var(--r-md);
    font-size: var(--fs-sm);
    margin-bottom: var(--s5);
    animation: fadeIn 0.25s ease-out;
}

.alert--danger {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #B91C1C;
}

.alert--success {
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    color: #166534;
}

/* ════════════════════════════════════════════════════════════════════
   BADGE COLOR VARIANTS
   ════════════════════════════════════════════════════════════════════ */
.badge--green {
    background: #F0FDF4;
    color: #166534;
    border: 1px solid #BBF7D0;
}

.badge--red {
    background: #FEF2F2;
    color: #B91C1C;
    border: 1px solid #FECACA;
}

.badge--blue {
    background: var(--primary-50);
    color: var(--primary-700);
    border: 1px solid var(--primary-100);
}

.badge--gray {
    background: var(--neutral-100);
    color: var(--neutral-500);
    border: 1px solid var(--neutral-200);
}

/* ════════════════════════════════════════════════════════════════════
   BUTTON SIZE & STYLE VARIANTS
   ════════════════════════════════════════════════════════════════════ */
.btn--sm {
    height: 30px;
    padding: 0 10px;
    font-size: var(--fs-xs);
    gap: 4px;
}

.btn--outline {
    background: transparent;
    color: var(--primary-600);
    border: 1px solid var(--primary-300);
}

.btn--outline:hover:not(:disabled) {
    background: var(--primary-50);
    border-color: var(--primary-500);
}

.btn--danger {
    background: #DC2626;
    color: white;
    border: 1px solid #DC2626;
}

.btn--danger:hover:not(:disabled) {
    background: #B91C1C;
    border-color: #B91C1C;
}

.btn--danger-outline {
    background: transparent;
    color: #DC2626;
    border: 1px solid #FECACA;
}

.btn--danger-outline:hover:not(:disabled) {
    background: #FEF2F2;
    border-color: #DC2626;
}

/* ════════════════════════════════════════════════════════════════════
   ATTENDANCE BUTTONS
   ════════════════════════════════════════════════════════════════════ */
.attendance-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.attendance-btn:hover {
    border-color: var(--text-muted);
    background: var(--bg-subtle);
}
/* Present — green */
.attendance-btn--present.attendance-btn--active {
    border-color: #16a34a;
    background: #DCFCE7;
    color: #16a34a;
}
/* Absent — red */
.attendance-btn--absent.attendance-btn--active {
    border-color: #dc2626;
    background: #FEE2E2;
    color: #dc2626;
}
/* Late — amber */
.attendance-btn--late.attendance-btn--active {
    border-color: #d97706;
    background: #FEF3C7;
    color: #d97706;
}
/* Justified — slate/blue */
.attendance-btn--justified.attendance-btn--active {
    border-color: #2563eb;
    background: #DBEAFE;
    color: #2563eb;
}

/* ════════════════════════════════════════════════════════════════════
   FILTER BAR
   ════════════════════════════════════════════════════════════════════ */
.filter-bar {
    display: flex;
    align-items: center;
    gap: var(--s3);
    flex-wrap: wrap;
    margin-bottom: var(--s5);
}

.filter-bar__search {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.filter-bar__search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--neutral-400);
    font-size: 0.85rem;
    pointer-events: none;
}

.filter-bar__input {
    width: 100%;
    height: 40px;
    padding: 0 14px 0 36px;
    border: 1px solid var(--neutral-200);
    border-radius: var(--r-md);
    font-family: var(--ff);
    font-size: var(--fs-sm);
    color: var(--neutral-800);
    background: white;
    transition: all var(--t-fast);
}

.filter-bar__input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-bar__select {
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--neutral-200);
    border-radius: var(--r-md);
    font-family: var(--ff);
    font-size: var(--fs-sm);
    color: var(--neutral-700);
    background: white;
    cursor: pointer;
    transition: all var(--t-fast);
    min-width: 180px;
}

.filter-bar__select:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-bar__toggle {
    display: flex;
    align-items: center;
    gap: var(--s2);
    font-size: var(--fs-sm);
    color: var(--neutral-600);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.filter-bar__toggle input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-500);
    cursor: pointer;
}

@media (max-width: 480px) {
    .filter-bar__search { min-width: 0; width: 100%; }
    .filter-bar__select { min-width: 0; width: 100%; }
}

/* ════════════════════════════════════════════════════════════════════
   TABLE CARD + DATA TABLE
   ════════════════════════════════════════════════════════════════════ */
.table-card {
    background: white;
    border-radius: var(--r-xl);
    border: 1px solid var(--neutral-200);
    box-shadow: var(--sh-xs);
    overflow: hidden;
}

.table-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--s3);
    padding: 60px 20px;
    color: var(--neutral-400);
    font-size: var(--fs-sm);
}

.table-empty i {
    font-size: 2.5rem;
    opacity: 0.4;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--fs-sm);
}

.data-table thead {
    position: sticky;
    top: 0;
    z-index: 2;
}

.data-table th {
    padding: 12px 20px;
    text-align: left;
    font-weight: 600;
    font-size: var(--fs-2xs);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--neutral-500);
    background: var(--neutral-50);
    border-bottom: 1px solid var(--neutral-200);
    white-space: nowrap;
}

.data-table td {
    padding: 13px 20px;
    color: var(--neutral-700);
    border-bottom: 1px solid var(--neutral-100);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: background var(--t-fast);
}

.data-table tbody tr:hover {
    background: var(--neutral-50);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr.row--inactive {
    opacity: 0.55;
}

.data-table tbody tr.row--inactive:hover {
    opacity: 0.75;
}

@media (max-width: 640px) {
    .table-card       { overflow-x: auto; }
    .data-table       { min-width: 560px; }
    .data-table thead { position: static; }
}

.td--muted {
    color: var(--neutral-400);
    font-size: var(--fs-xs);
}

.td--center {
    text-align: center;
}

.td--actions {
    white-space: nowrap;
}

.td--actions {
    display: flex;
    gap: var(--s1);
    align-items: center;
}

.player-name {
    font-weight: 600;
    color: var(--neutral-800);
}

/* ════════════════════════════════════════════════════════════════════
   MODAL (form modal — create/edit)
   ════════════════════════════════════════════════════════════════════ */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.48);
    z-index: 1000;
    backdrop-filter: blur(2px);
    animation: fadeIn 0.2s ease-out;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001;
    background: white;
    border-radius: var(--r-xl);
    width: calc(100% - 2rem);
    max-width: 580px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--sh-xl);
    animation: fadeUp 0.25s ease-out;
    overflow: hidden;
}

.modal--wide {
    max-width: 800px;
}

.modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--s5) var(--s6);
    border-bottom: 1px solid var(--neutral-100);
    flex-shrink: 0;
}

.modal__title {
    font-size: var(--fs-lg);
    font-weight: 700;
    color: var(--neutral-900);
}

.modal__close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-sm);
    border: none;
    background: transparent;
    color: var(--neutral-400);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--t-fast);
}

.modal__close:hover {
    background: var(--neutral-100);
    color: var(--neutral-700);
}

.modal__body {
    padding: var(--s6);
    overflow-y: auto;
    flex: 1;
}

.modal__footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--s3);
    padding: var(--s4) var(--s6);
    border-top: 1px solid var(--neutral-100);
    flex-shrink: 0;
}

/* ════════════════════════════════════════════════════════════════════
   FORM GRID (modal forms)
   ════════════════════════════════════════════════════════════════════ */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--s4) var(--s5);
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--s1);
}

.form-group--full {
    grid-column: 1 / -1;
}

/* Pill que aparece junto al label cuando una categoría fue auto-sugerida */
.form-hint-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.625rem;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: var(--r-full);
    background: rgba(29, 158, 117, 0.1);
    color: var(--sidebar-accent);
    margin-left: 6px;
    vertical-align: middle;
    letter-spacing: 0.02em;
    user-select: none;
}

.form-label {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--neutral-700);
}

.required {
    color: var(--danger-500);
}

.form-input {
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--neutral-200);
    border-radius: var(--r-md);
    font-family: var(--ff);
    font-size: var(--fs-sm);
    color: var(--neutral-800);
    background: var(--neutral-50);
    transition: all var(--t-fast);
    width: 100%;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-500);
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-textarea {
    height: auto;
    padding: 10px 12px;
    resize: vertical;
    line-height: 1.5;
}

.alert--error {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #B91C1C;
}

/* ════════════════════════════════════════════════════════════════════
   SECTION CARD — badge variant
   ════════════════════════════════════════════════════════════════════ */
.section-card__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 22px;
    padding: 0 8px;
    border-radius: var(--r-full);
    background: var(--neutral-100);
    color: var(--neutral-600);
    font-size: var(--fs-xs);
    font-weight: 700;
}

/* ════════════════════════════════════════════════════════════════════
   BTN — full width modifier
   ════════════════════════════════════════════════════════════════════ */
.btn--full {
    width: 100%;
    justify-content: center;
    margin-top: var(--s4);
}

/* ════════════════════════════════════════════════════════════════════
   ENTRENAMIENTOS — layout y componentes específicos
   ════════════════════════════════════════════════════════════════════ */
.training-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s6);
    align-items: start;
}

@media (min-width: 900px) {
    .training-layout {
        grid-template-columns: 380px 1fr;
    }
}

.training-col-form,
.training-col-stats {
    display: flex;
    flex-direction: column;
    gap: var(--s5);
}

/* ── Inputs numéricos con botones +/- ── */
.training-inputs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--s4);
    margin-bottom: var(--s4);
}

@media (max-width: 420px) {
    .training-inputs {
        grid-template-columns: 1fr;
    }
}

.num-input-wrap {
    display: flex;
    align-items: center;
    border: 1px solid var(--neutral-200);
    border-radius: var(--r-md);
    overflow: hidden;
    background: white;
    height: 40px;
    min-width: 0;
    width: 100%;
}

.num-btn {
    width: 32px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--neutral-50);
    border: none;
    color: var(--neutral-600);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--t-fast), color var(--t-fast);
    flex-shrink: 0;
    line-height: 1;
}

.num-btn:hover {
    background: var(--primary-50);
    color: var(--primary-600);
}

.num-btn:active {
    background: var(--primary-100);
}

.num-input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: none;
    text-align: center;
    font-family: var(--ff);
    font-size: var(--fs-sm);
    font-weight: 700;
    color: var(--neutral-800);
    background: transparent;
    outline: none;
    padding: 0 2px;
    -moz-appearance: textfield;
}

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

/* ── Metric pills (tabla de estadísticas) ── */
.metric-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    padding: 2px 8px;
    border-radius: var(--r-full);
    font-size: var(--fs-xs);
    font-weight: 700;
}

.metric-pill--blue {
    background: var(--primary-50);
    color: var(--primary-600);
}

.metric-pill--green {
    background: var(--accent-50);
    color: var(--accent-600);
}

.metric-pill--amber {
    background: var(--amber-50);
    color: var(--amber-600);
}

/* ════════════════════════════════════════════════════════════════════
   PARTIDOS — Match cards & grid  ·  Sofascore-inspired
   ════════════════════════════════════════════════════════════════════ */

/* ── Grid responsivo ── */
.matches-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s5);
}

@media (min-width: 640px) {
    .matches-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    .matches-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ── Tarjeta de partido ── */
.match-card {
    background: var(--bg-card);
    border-radius: var(--r-xl);
    border: 1px solid var(--neutral-200);
    box-shadow: var(--sh-sm);
    overflow: hidden;
    position: relative;
    transition: transform var(--t-base), box-shadow var(--t-base);
    display: flex;
    flex-direction: column;
}

.match-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--sh-card-hover);
}

/* Top accent bar — resultado */
.match-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.match-card--win::before {
    background: linear-gradient(90deg, var(--accent-500), var(--accent-400));
}

.match-card--loss::before {
    background: linear-gradient(90deg, #EF4444, #F87171);
}

.match-card--draw::before {
    background: linear-gradient(90deg, var(--amber-500), var(--amber-400));
}

.match-card--pending::before {
    background: linear-gradient(90deg, var(--neutral-300), var(--neutral-200));
}

/* ── Header: badges + fecha ── */
.match-card__header {
    padding: var(--s5) var(--s5) 0;
    padding-top: calc(var(--s5) + 4px); /* compensa top bar */
    display: flex;
    align-items: center;
    gap: var(--s2);
    flex-wrap: wrap;
    min-height: 48px;
}

.match-card__date {
    margin-left: auto;
    font-size: var(--fs-xs);
    color: var(--neutral-400);
    font-weight: 500;
    white-space: nowrap;
}

/* ── Body: equipos + score ── */
.match-card__body {
    padding: var(--s5);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: var(--s3);
    flex: 1;
}

.match-card__team {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--neutral-500);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.match-card__team--us {
    text-align: right;
    color: var(--neutral-900);
    font-weight: 700;
}

.match-card__team--rival {
    text-align: left;
    color: var(--neutral-700);
}

.match-card__score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--s2);
    min-width: 90px;
}

.match-card__score-num {
    font-size: var(--fs-2xl);
    font-weight: 800;
    color: var(--neutral-900);
    line-height: 1;
    min-width: 28px;
    text-align: center;
    letter-spacing: -0.02em;
}

.match-card__score-sep {
    color: var(--neutral-300);
    font-weight: 300;
    font-size: var(--fs-xl);
    line-height: 1;
}

.match-card__score-pending {
    font-size: var(--fs-sm);
    font-weight: 700;
    color: var(--neutral-400);
    padding: var(--s2) var(--s5);
    background: var(--neutral-100);
    border-radius: var(--r-md);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ── Footer: convocados + acciones ── */
.match-card__footer {
    border-top: 1px solid var(--neutral-100);
    padding: var(--s3) var(--s5);
    display: flex;
    align-items: center;
    gap: var(--s3);
    flex-wrap: wrap;
}

.match-card__convocados {
    font-size: var(--fs-xs);
    color: var(--neutral-400);
    display: flex;
    align-items: center;
    gap: var(--s1);
}

.match-card__actions {
    display: flex;
    align-items: center;
    gap: var(--s2);
    margin-left: auto;
}

/* ── Badges de resultado ── */
.result-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--r-full);
    font-size: var(--fs-2xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    white-space: nowrap;
}

.result-badge--win {
    background: #DCFCE7;
    color: #15803D;
}

.result-badge--loss {
    background: #FEE2E2;
    color: #DC2626;
}

.result-badge--draw {
    background: #FEF3C7;
    color: #D97706;
}

.result-badge--pending {
    background: var(--neutral-100);
    color: var(--neutral-500);
}

/* ── Match card: team sub-elements ── */
.match-card__team {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.match-card__team-label {
    font-size: var(--fs-2xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--neutral-400);
}

.match-card__category {
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--primary-600);
    background: var(--primary-50);
    border-radius: var(--r-sm);
    padding: 1px 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.match-card__rival-name {
    font-size: var(--fs-sm);
    font-weight: 700;
    color: var(--neutral-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* ── Filter pills ── */
.filter-bar__pills {
    display: flex;
    align-items: center;
    gap: var(--s2);
    flex-wrap: wrap;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: var(--s1);
    padding: 5px 14px;
    border-radius: var(--r-full);
    font-size: var(--fs-xs);
    font-weight: 600;
    border: 1.5px solid var(--neutral-200);
    background: white;
    color: var(--neutral-500);
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.filter-pill:hover {
    border-color: var(--neutral-400);
    color: var(--neutral-700);
}

.filter-pill--active,
.filter-pill--active:hover {
    background: var(--neutral-900);
    border-color: var(--neutral-900);
    color: white;
}

.filter-pill--win.filter-pill--active {
    background: #15803D;
    border-color: #15803D;
}

.filter-pill--loss.filter-pill--active {
    background: #DC2626;
    border-color: #DC2626;
}

.filter-pill--draw.filter-pill--active {
    background: #D97706;
    border-color: #D97706;
}

.filter-pill--pending.filter-pill--active {
    background: var(--neutral-500);
    border-color: var(--neutral-500);
}

/* ── Match modal ── */
.match-modal {
    width: min(520px, calc(100vw - 2rem));
}

.match-modal__toggle {
    display: flex;
    align-items: center;
    gap: var(--s3);
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--neutral-700);
    cursor: pointer;
    user-select: none;
}

.match-modal__toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-600);
    cursor: pointer;
}

.match-modal__score-inputs {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: end;
    gap: var(--s3);
    margin-bottom: var(--s4);
    padding: var(--s4);
    background: var(--neutral-50);
    border-radius: var(--r-lg);
    border: 1px solid var(--neutral-100);
}

.match-modal__score-field {
    display: flex;
    flex-direction: column;
    gap: var(--s2);
}

.match-modal__score-sep-label {
    font-size: var(--fs-2xl);
    font-weight: 300;
    color: var(--neutral-300);
    padding-bottom: var(--s2);
    text-align: center;
}

/* ════════════════════════════════════════════════════════════════════
   PARTIDO STATS — /partidos/{id}
   ════════════════════════════════════════════════════════════════════ */

/* ── Layout principal: 2 columnas en desktop ── */
.pstats-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s5);
}

@media (min-width: 1024px) {
    .pstats-layout {
        grid-template-columns: 300px 1fr;
        align-items: start;
    }
}

/* ── Panel resumen (columna izquierda) ── */
.pstats-summary {
    position: sticky;
    top: var(--s5);
}

@media (max-width: 1023px) {
    .pstats-summary {
        position: static;
    }
}

.pstats-summary__score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--s3);
    padding: var(--s5) 0 var(--s4);
}

.pstats-summary__score-num {
    font-size: 3rem;
    font-weight: 800;
    color: var(--neutral-900);
    line-height: 1;
    min-width: 40px;
    text-align: center;
    letter-spacing: -0.03em;
}

.pstats-summary__score-sep {
    font-size: 2rem;
    font-weight: 300;
    color: var(--neutral-300);
    line-height: 1;
}

.pstats-summary__vs {
    font-size: var(--fs-sm);
    font-weight: 700;
    color: var(--neutral-400);
    padding: var(--s2) var(--s5);
    background: var(--neutral-100);
    border-radius: var(--r-md);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.pstats-summary__rival {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding-bottom: var(--s4);
    border-bottom: 1px solid var(--neutral-100);
    margin-bottom: var(--s4);
}

.pstats-summary__rival-label {
    font-size: var(--fs-2xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--neutral-400);
}

.pstats-summary__rival-name {
    font-size: var(--fs-lg);
    font-weight: 700;
    color: var(--neutral-800);
}

.pstats-summary__meta {
    display: flex;
    flex-direction: column;
    gap: var(--s2);
    margin-bottom: var(--s4);
}

.pstats-summary__meta-row {
    display: flex;
    align-items: center;
    gap: var(--s2);
    font-size: var(--fs-sm);
    color: var(--neutral-500);
}

.pstats-summary__meta-row i {
    color: var(--neutral-400);
    font-size: 0.85em;
}

/* Botón guardar: en mobile/tablet aparece en page-header; en desktop en el panel */
.pstats-save-panel   { display: none; }
.pstats-save-desktop { display: inline-flex; }

@media (min-width: 1024px) {
    .pstats-save-panel   { display: flex; }
    .pstats-save-desktop { display: none !important; }
}

/* ── Área de tarjetas (columna derecha) ── */
.pstats-cards-area {
    display: flex;
    flex-direction: column;
    gap: var(--s6);
    min-width: 0;
}

/* ── Barra "cambios sin guardar" (mobile/tablet) ── */
.pstats-dirty-bar {
    display: flex;
    align-items: center;
    gap: var(--s3);
    background: #FEF3C7;
    border: 1px solid #FDE68A;
    border-radius: var(--r-lg);
    padding: var(--s3) var(--s4);
    font-size: var(--fs-sm);
    font-weight: 600;
    color: #92400E;
}

.pstats-dirty-bar .btn {
    margin-left: auto;
}

@media (min-width: 1024px) {
    .pstats-dirty-bar    { display: none; }
    .pstats-alert-mobile { display: none; }
}

/* ── Grupo (Titulares / Suplentes / No convocados) ── */
.pstats-group {
    display: flex;
    flex-direction: column;
    gap: var(--s3);
}

.pstats-group__header {
    display: flex;
    align-items: center;
    gap: var(--s3);
    padding: var(--s2) 0;
    border-bottom: 2px solid var(--neutral-100);
}

.pstats-group__title {
    font-size: var(--fs-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--neutral-600);
    display: flex;
    align-items: center;
    gap: var(--s2);
}

.pstats-group__count {
    background: var(--neutral-100);
    color: var(--neutral-500);
    font-size: var(--fs-xs);
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--r-full);
}

.pstats-group__empty {
    font-size: var(--fs-sm);
    color: var(--neutral-400);
    font-style: italic;
    padding: var(--s3) 0;
}

/* ── Grid de tarjetas ── */
/* auto-fill con mínimo 300px: nunca aprieta, encaja 2-3 cols según espacio */
.pstats-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--s4);
}

/* ── Tarjeta de jugador ── */
.player-stat-card {
    background: white;
    border-radius: var(--r-xl);
    border: 2px solid var(--neutral-100);
    overflow: hidden;
    box-shadow: var(--sh-sm);
    transition: box-shadow 0.2s ease;
}

.player-stat-card:hover {
    box-shadow: var(--sh-md);
}

.player-stat-card--starter {
    border-color: var(--primary-100);
    background: linear-gradient(135deg, #F8FAFF 0%, white 60%);
}

/* ── Header de la tarjeta ── */
.player-stat-card__header {
    display: flex;
    align-items: center;
    gap: var(--s2);
    padding: var(--s3) var(--s4);
    background: var(--neutral-50);
    border-bottom: 1px solid var(--neutral-100);
}

.player-stat-card--starter .player-stat-card__header {
    background: var(--primary-50);
    border-bottom-color: var(--primary-100);
}

.player-stat-card__jersey {
    font-size: var(--fs-sm);
    font-weight: 800;
    color: var(--neutral-400);
    min-width: 28px;
    text-align: center;
}

.player-stat-card--starter .player-stat-card__jersey {
    color: var(--primary-600);
}

.player-stat-card__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.player-stat-card__name {
    font-size: var(--fs-sm);
    font-weight: 700;
    color: var(--neutral-900);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-stat-card__pos {
    font-size: var(--fs-2xs);
    font-weight: 600;
    color: var(--neutral-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Toggle T / S */
.pstats-toggle {
    min-width: 32px;
    min-height: 32px;
    border-radius: var(--r-full);
    font-size: var(--fs-xs);
    font-weight: 800;
    border: 2px solid;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pstats-toggle--starter {
    background: var(--primary-600);
    border-color: var(--primary-600);
    color: white;
}

.pstats-toggle--starter:hover {
    background: var(--primary-700);
    border-color: var(--primary-700);
}

.pstats-toggle--sub {
    background: white;
    border-color: var(--neutral-300);
    color: var(--neutral-500);
}

.pstats-toggle--sub:hover {
    border-color: var(--primary-500);
    color: var(--primary-600);
}

/* Botón quitar de convocatoria */
.pstats-remove {
    min-width: 28px;
    min-height: 28px;
    border-radius: var(--r-full);
    background: transparent;
    border: none;
    color: var(--neutral-300);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    flex-shrink: 0;
    font-size: 1rem;
    padding: 0;
}

.pstats-remove:hover {
    background: #FEE2E2;
    color: #DC2626;
}

/* ── Stats de la tarjeta ── */
.player-stat-card__stats {
    padding: var(--s3) var(--s4) var(--s4);
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--s2) var(--s3);
}

/* Minutos ocupa ancho completo */
.player-stat-card__stats .stat-item:first-child {
    grid-column: 1 / -1;
}

/* ── Ítem de estadística ── */
.stat-item {
    display: flex;
    align-items: center;
    gap: var(--s2);
    background: var(--neutral-50);
    border-radius: var(--r-lg);
    padding: var(--s2) var(--s3);
    min-width: 0;
}

.stat-item__icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    font-size: 1.1rem;
    line-height: 1;
    flex-shrink: 0;
    width: 32px;
    text-align: center;
    cursor: default;
}

.stat-item__label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--neutral-400);
    line-height: 1;
    font-family: inherit;
}

.stat-item__input {
    flex: 1;
    min-width: 48px;
    width: 0; /* permite que flex lo dimensione correctamente */
    text-align: center;
    font-size: 1rem; /* 16px mínimo — evita zoom automático en iOS */
    font-weight: 800;
    color: var(--neutral-900);
    background: transparent;
    border: none;
    outline: none;
    padding: 2px 0;
    font-family: inherit;
    /* ocultar spinners nativos */
    -moz-appearance: textfield;
}

.stat-item__input::-webkit-outer-spin-button,
.stat-item__input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.stat-item__input:focus {
    background: var(--primary-50);
    border-radius: var(--r-sm);
    outline: 2px solid var(--primary-300);
    outline-offset: 1px;
}

/* ── Botón +/− con área táctil mínima 44px ── */
.stat-btn {
    min-width: 44px;
    min-height: 36px;
    border-radius: var(--r-md);
    background: white;
    border: 1.5px solid var(--neutral-200);
    color: var(--neutral-600);
    font-size: var(--fs-lg);
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.12s ease;
    flex-shrink: 0;
    line-height: 1;
    padding: 0;
    touch-action: manipulation;
}

.stat-btn:hover {
    background: var(--primary-50);
    border-color: var(--primary-400);
    color: var(--primary-700);
}

.stat-btn:active {
    background: var(--primary-100);
    transform: scale(0.95);
}

/* ── No convocados — lista compacta ── */
.pstats-group--bench .pstats-group__title {
    color: var(--neutral-400);
}

.pstats-bench-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: var(--neutral-50);
    border-radius: var(--r-lg);
    border: 1px solid var(--neutral-100);
    overflow: hidden;
}

.pstats-bench-item {
    display: flex;
    align-items: center;
    gap: var(--s3);
    padding: var(--s3) var(--s4);
    border-bottom: 1px solid var(--neutral-100);
    background: white;
    transition: background 0.12s ease;
}

.pstats-bench-item:last-child {
    border-bottom: none;
}

.pstats-bench-item:hover {
    background: var(--neutral-50);
}

.pstats-bench-item__jersey {
    font-size: var(--fs-xs);
    font-weight: 700;
    color: var(--neutral-400);
    min-width: 28px;
    text-align: center;
}

.pstats-bench-item__name {
    flex: 1;
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--neutral-600);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pstats-bench-item__pos {
    font-size: var(--fs-2xs);
    font-weight: 600;
    color: var(--neutral-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pstats-bench-item__add {
    margin-left: auto;
    flex-shrink: 0;
    color: var(--accent-600);
    border-color: var(--accent-400);
}

.pstats-bench-item__add:hover {
    background: var(--accent-50);
    border-color: var(--accent-600);
    color: var(--accent-600);
}

/* ════════════════════════════════════════════════════════════════════
   PAGOS — /pagos
   ════════════════════════════════════════════════════════════════════ */

/* ── Selector de mes ── */
.payment-month-nav {
    display: flex;
    align-items: center;
    gap: var(--s2);
    background: white;
    border: 1.5px solid var(--neutral-200);
    border-radius: var(--r-lg);
    padding: var(--s2) var(--s3);
}

.payment-month-nav__label {
    font-size: var(--fs-sm);
    font-weight: 700;
    color: var(--neutral-800);
    min-width: 130px;
    text-align: center;
    white-space: nowrap;
}

/* ── Resumen ── */
.payment-summary {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr;
    gap: var(--s4);
    margin-bottom: var(--s5);
}

@media (max-width: 640px) {
    .payment-summary {
        grid-template-columns: 1fr 1fr;
    }

    .payment-summary__card--rate {
        grid-column: 1 / -1;
    }
}

.payment-summary__card {
    background: white;
    border-radius: var(--r-xl);
    padding: var(--s5);
    display: flex;
    align-items: center;
    gap: var(--s4);
    box-shadow: var(--sh-sm);
    border: 1.5px solid var(--neutral-100);
}

.payment-summary__card--paid {
    border-color: #BBF7D0;
    background: linear-gradient(135deg, #F0FDF4 0%, white 70%);
}

.payment-summary__card--pending {
    border-color: #FECACA;
    background: linear-gradient(135deg, #FFF5F5 0%, white 70%);
}

.payment-summary__card--rate {
    flex-direction: column;
    align-items: stretch;
    gap: var(--s3);
}

.payment-summary__icon {
    font-size: 1.5rem;
    line-height: 1;
    flex-shrink: 0;
}

.payment-summary__value {
    font-size: var(--fs-2xl);
    font-weight: 800;
    color: var(--neutral-900);
    line-height: 1;
}

.payment-summary__label {
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--neutral-500);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.payment-summary__rate-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.payment-summary__rate-label {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--neutral-600);
}

.payment-summary__rate-pct {
    font-size: var(--fs-xl);
    font-weight: 800;
    color: var(--neutral-900);
}

/* ── Barra de tasa de cobro ── */
.payment-rate-bar {
    height: 10px;
    background: var(--neutral-100);
    border-radius: var(--r-full);
    overflow: hidden;
}

.payment-rate-bar__fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-500), var(--accent-400));
    border-radius: var(--r-full);
    transition: width 0.4s ease;
    min-width: 0%;
    max-width: 100%;
}

/* ── Grid de tarjetas de pago ── */
.payment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--s4);
}

/* ── Tarjeta de jugador ── */
.payment-card {
    background: white;
    border-radius: var(--r-xl);
    border: 2px solid var(--neutral-100);
    border-left-width: 5px;
    overflow: hidden;
    box-shadow: var(--sh-sm);
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.payment-card:hover {
    box-shadow: var(--sh-md);
    transform: translateY(-2px);
}

.payment-card--paid {
    border-left-color: #16A34A;
    background: linear-gradient(135deg, #F0FDF4 0%, white 50%);
}

.payment-card--pending {
    border-left-color: #DC2626;
    background: white;
}

/* ── Header de la tarjeta ── */
.payment-card__header {
    display: flex;
    align-items: center;
    gap: var(--s2);
    padding: var(--s4) var(--s4) var(--s2);
}

.payment-card__jersey {
    font-size: var(--fs-xs);
    font-weight: 800;
    color: var(--neutral-400);
    min-width: 28px;
    text-align: center;
    flex-shrink: 0;
}

.payment-card--paid .payment-card__jersey {
    color: #16A34A;
}

.payment-card__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.payment-card__name {
    font-size: var(--fs-sm);
    font-weight: 700;
    color: var(--neutral-900);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.payment-card__group {
    font-size: var(--fs-2xs);
    font-weight: 600;
    color: var(--neutral-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.payment-card__status-icon {
    font-size: 1.25rem;
    line-height: 1;
    flex-shrink: 0;
}

/* ── Fecha de pago ── */
.payment-card__paid-date {
    padding: 0 var(--s4) var(--s2);
    font-size: var(--fs-xs);
    color: #16A34A;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--s1);
}

/* ── Botón toggle ── */
.payment-btn {
    margin: var(--s3) var(--s4) var(--s4);
    border-radius: var(--r-lg);
    padding: var(--s3) var(--s4);
    font-size: var(--fs-sm);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--s2);
    cursor: pointer;
    border: 2px solid;
    transition: all 0.15s ease;
    touch-action: manipulation;
    min-height: 44px;
}

.payment-btn--paid {
    background: #DCFCE7;
    border-color: #86EFAC;
    color: #15803D;
}

.payment-btn--paid:hover:not(:disabled) {
    background: #BBF7D0;
    border-color: #4ADE80;
}

.payment-btn--paid:active:not(:disabled) {
    transform: scale(0.97);
}

.payment-btn--pending {
    background: white;
    border-color: #FECACA;
    color: #DC2626;
}

.payment-btn--pending:hover:not(:disabled) {
    background: #FEF2F2;
    border-color: #FCA5A5;
}

.payment-btn--pending:active:not(:disabled) {
    transform: scale(0.97);
}

.payment-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
/* ════════════════════════════════════════════════════════════════════
   Desarrollo Integral  /desarrollo/{playerId}
   ════════════════════════════════════════════════════════════════════ */

.dev-jersey {
    font-size: var(--fs-sm);
    font-weight: 700;
    color: var(--text-muted);
    margin-right: var(--s2);
}

.desarrollo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--s5);
    margin-bottom: var(--s5);
}

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

.dev-section { min-width: 0; }

@media (max-width: 640px) {
    .dev-section .apexcharts-canvas,
    .dev-section .apexcharts-svg { max-width: 100% !important; }
}

.dev-metric-tiles {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--s3);
    margin-bottom: var(--s4);
}

@media (max-width: 639px) {
    .dev-metric-tiles { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 400px) {
    .dev-metric-tiles { gap: var(--s2); }
    .dev-metric-tile  { padding: var(--s2) var(--s1); }
}

.dev-metric-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--neutral-50);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-md);
    padding: var(--s3) var(--s2);
    text-align: center;
}

.dev-metric-tile__icon  { font-size: 1.25rem; line-height: 1; margin-bottom: 4px; }
.dev-metric-tile__value { font-size: var(--fs-lg); font-weight: 800; color: var(--text-primary); line-height: 1; }
.dev-metric-tile__unit  { font-size: 10px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 1px; }
.dev-metric-tile__label { font-size: var(--fs-xs); color: var(--text-muted); margin-top: 4px; }

.dev-metric-tabs { display: flex; gap: var(--s2); flex-wrap: wrap; margin-bottom: var(--s3); }

.dev-metric-tab {
    padding: var(--s1) var(--s3);
    border-radius: 999px;
    border: 1px solid var(--neutral-200);
    background: white;
    color: var(--text-muted);
    font-size: var(--fs-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.dev-metric-tab:hover           { border-color: var(--primary); color: var(--primary); }
.dev-metric-tab--active         { background: var(--primary); border-color: var(--primary); color: white; }

.dev-delete-btn { color: var(--neutral-400); padding: var(--s1) var(--s2); }
.dev-delete-btn:hover:not(:disabled) { color: #dc2626; background: #fee2e2; border-color: #fecaca; }

.disc-summary {
    display: flex;
    gap: var(--s4);
    flex-wrap: wrap;
    padding: var(--s3) 0;
    border-bottom: 1px solid var(--neutral-100);
    margin-bottom: var(--s4);
}

.disc-summary__item {
    display: flex;
    align-items: center;
    gap: var(--s2);
    background: var(--neutral-50);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-md);
    padding: var(--s2) var(--s3);
}

.disc-summary__icon  { font-size: 1.1rem; line-height: 1; }
.disc-summary__count { font-size: var(--fs-lg); font-weight: 800; color: var(--text-primary); line-height: 1; min-width: 1.5ch; text-align: right; }
.disc-summary__label { font-size: var(--fs-xs); color: var(--text-muted); white-space: nowrap; }

.disc-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; }
.disc-badge--warning    { background: #f3f4f6; color: #374151; }
.disc-badge--yellow     { background: #fef3c7; color: #92400e; }
.disc-badge--red        { background: #fee2e2; color: #991b1b; }
.disc-badge--suspension { background: #ffedd5; color: #9a3412; }
.disc-badge--other      { background: #ede9fe; color: #5b21b6; }

/* ── Badges de sugerencias psicológicas ─────────────────────────────────── */
.psych-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: var(--fs-xs);
    font-weight: 600;
    vertical-align: middle;
    margin-left: var(--s2);
    white-space: nowrap;
    cursor: help;
    transition: opacity 0.15s;
}

.psych-badge--suggested {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.psych-badge--edited {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* ── Badges de categoría de ejercicio ───────────────────────────────────── */
.cat-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: var(--fs-xs);
    font-weight: 600;
    white-space: nowrap;
}
.cat-badge--physical  { background: #dcfce7; color: #166534; }
.cat-badge--technical { background: #dbeafe; color: #1e40af; }
.cat-badge--tactical  { background: #fef3c7; color: #92400e; }
.cat-badge--mental    { background: #ede9fe; color: #5b21b6; }

/* ── Tarjetas de planes de entrenamiento ────────────────────────────────── */
.plan-cards {
    display: flex;
    flex-direction: column;
    gap: var(--s3);
}

.plan-card {
    background: white;
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-md);
    padding: var(--s4);
    transition: box-shadow 0.15s ease;
}
.plan-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.plan-card--active { border-left: 3px solid var(--primary); }

.plan-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--s2);
    margin-bottom: var(--s2);
}
.plan-card__title {
    font-size: var(--fs-base);
    font-weight: 700;
    color: var(--text-primary);
}
.plan-card__actions {
    display: flex;
    gap: var(--s1);
}
.plan-card__meta {
    display: flex;
    gap: var(--s4);
    font-size: var(--fs-sm);
    color: var(--text-muted);
    flex-wrap: wrap;
    margin-bottom: var(--s2);
}
.plan-card__meta i { margin-right: 3px; }
.plan-card__desc {
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    margin: 0;
    white-space: pre-line;
}

/* ── Lista de ejercicios en plan (detalle) ──────────────────────────────── */
.plan-exercise-list {
    display: flex;
    flex-direction: column;
    gap: var(--s2);
    padding-top: var(--s2);
}

.plan-exercise-item {
    display: flex;
    align-items: center;
    gap: var(--s3);
    padding: var(--s3) var(--s3);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-md);
    background: var(--neutral-50);
    transition: background 0.1s ease;
}
.plan-exercise-item:hover { background: white; }

.plan-exercise-item__order {
    min-width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    font-size: var(--fs-xs);
    font-weight: 700;
    flex-shrink: 0;
}
.plan-exercise-item__info {
    flex: 1;
    min-width: 0;
}
.plan-exercise-item__name {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--text-primary);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.plan-exercise-item__reorder {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-shrink: 0;
}
.plan-exercise-item__actions {
    display: flex;
    gap: var(--s1);
    flex-shrink: 0;
}

/* ── Catálogo de ejercicios (cards) ─────────────────────────────────────── */
.exercise-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--s3);
}

.exercise-card {
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-md);
    background: white;
    padding: var(--s4);
    display: flex;
    flex-direction: column;
    gap: var(--s2);
    transition: box-shadow 0.15s ease;
}
.exercise-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.exercise-card--added {
    opacity: 0.6;
    background: var(--neutral-50);
}

.exercise-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--s2);
}
.exercise-card__name {
    font-size: var(--fs-sm);
    font-weight: 700;
    color: var(--text-primary);
    flex: 1;
    line-height: 1.3;
}
.exercise-card__desc {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.exercise-card__yt-btn {
    font-size: var(--fs-xs);
    display: flex;
    align-items: center;
    gap: 4px;
}
.exercise-card__yt-frame {
    position: relative;
    width: 100%;
    padding-top: 56.25%;   /* 16:9 */
    border-radius: var(--radius-md);
    overflow: hidden;
    background: black;
}
.exercise-card__yt-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}
.exercise-card__footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: auto;
}

/* ── Modal ancho para el picker ─────────────────────────────────────────── */
.modal--wide {
    max-width: 780px;
    width: 95vw;
}

@media (max-width: 639px) {
    .exercise-cards { grid-template-columns: 1fr; }
    .plan-exercise-item__reorder { flex-direction: row; }
}

/* ── Reporte de Visoría IA ───────────────────────────────────────────────── */
.scouting-generating {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--s3);
    padding: var(--s5) 0;
    color: var(--text-muted);
}
.scouting-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--neutral-200);
    border-top-color: var(--primary-500);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.scouting-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s4);
    font-size: var(--fs-sm);
    color: var(--text-muted);
    margin-bottom: var(--s3);
}
.scouting-meta__edited {
    color: var(--primary-600);
    font-weight: 500;
}
.scouting-textarea {
    width: 100%;
    padding: var(--s3) var(--s4);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-md);
    background: var(--neutral-50);
    font-size: var(--fs-sm);
    line-height: 1.7;
    color: var(--text-primary);
    resize: vertical;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.15s;
}
.scouting-textarea:focus {
    outline: none;
    border-color: var(--primary-400);
    background: #fff;
}
.scouting-actions {
    display: flex;
    align-items: center;
    gap: var(--s3);
    margin-top: var(--s3);
}

/* ── Animación d4 (visoría) ─────────────────────────────────────────────── */
.d4 { animation-delay: 0.3s; }

/* ── Alert genérico ─────────────────────────────────────────────────────── */
.alert {
    display: flex;
    align-items: center;
    gap: var(--s2);
    padding: var(--s3) var(--s4);
    border-radius: var(--radius-md);
    font-size: var(--fs-sm);
}
.alert--error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

/* ── WhatsApp share button ──────────────────────────────────────────────── */
.scouting-wa-btn {
    color: #25D366;
    border-color: #25D366;
}
.scouting-wa-btn:hover {
    background: #25D366;
    color: #fff;
    border-color: #25D366;
}

/* ── Reporte estructurado IA ────────────────────────────────────────────── */
.scouting-badges {
    display: flex;
    align-items: center;
    gap: var(--s2);
    flex-wrap: wrap;
    margin-bottom: var(--s4);
}

.badge--rec-apto {
    background: #F0FDF4;
    color: #166534;
    border: 1px solid #BBF7D0;
    font-weight: 600;
}
.badge--rec-dev {
    background: #FFFBEB;
    color: #92400E;
    border: 1px solid #FDE68A;
    font-weight: 600;
}
.badge--rec-no {
    background: #FEF2F2;
    color: #B91C1C;
    border: 1px solid #FECACA;
    font-weight: 600;
}
.badge--perfil {
    background: var(--primary-50, #EFF6FF);
    color: var(--primary-700, #1D4ED8);
    border: 1px solid var(--primary-100, #DBEAFE);
}

.scouting-resumen {
    background: var(--neutral-50, #F9FAFB);
    border: 1px solid var(--neutral-200, #E5E7EB);
    border-left: 4px solid var(--primary-500, #3B82F6);
    border-radius: var(--radius-md, 8px);
    padding: var(--s4) var(--s5);
    font-size: var(--fs-sm);
    line-height: 1.75;
    color: var(--text-primary);
    margin-bottom: var(--s4);
    white-space: pre-wrap;
}

.scouting-structured-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--s4);
    margin-bottom: var(--s4);
}

@media (max-width: 639px) {
    .scouting-structured-grid { grid-template-columns: 1fr; }
}

.scouting-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.scouting-list li {
    display: flex;
    align-items: flex-start;
    gap: var(--s2);
    padding: var(--s2) 0;
    border-bottom: 1px solid var(--neutral-100, #F3F4F6);
    font-size: var(--fs-sm);
    color: var(--text-primary);
}
.scouting-list li:last-child { border-bottom: none; }
.scouting-list__icon { flex-shrink: 0; }

.scouting-edit-toggle {
    font-size: var(--fs-sm);
    color: var(--text-muted);
    cursor: pointer;
    margin-top: var(--s2);
}

/* ── Sección de visualizaciones en el card de Visoría IA ─────────── */
.scouting-stats-section {
    border-top: 1px solid var(--neutral-100, #F3F4F6);
    margin-top: var(--s4);
    padding-top: var(--s4);
    display: flex;
    flex-direction: column;
    gap: var(--s5);
}

.scouting-stats-label {
    font-size: var(--fs-xs, 0.75rem);
    font-weight: 600;
    color: var(--text-secondary, #6B7280);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: var(--s3);
}

/* ── Metric tiles (partido + físico) ─────────────────────────────── */
.scouting-metric-tiles {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--s3);
}
@media (max-width: 639px) {
    .scouting-metric-tiles { grid-template-columns: repeat(2, 1fr); }
}
.scouting-metric-tile {
    background: var(--neutral-50, #F9FAFB);
    border: 1px solid var(--neutral-200, #E5E7EB);
    border-radius: var(--radius-md, 8px);
    padding: var(--s3) var(--s4);
    text-align: center;
}
.scouting-metric-tile__value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-600, #2563EB);
    line-height: 1.1;
}
.scouting-metric-tile__unit {
    font-size: var(--fs-xs, 0.75rem);
    color: var(--text-muted);
}
.scouting-metric-tile__label {
    display: block;
    font-size: var(--fs-xs, 0.75rem);
    color: var(--text-secondary, #6B7280);
    margin-top: var(--s1);
}

/* ── Barras psicológicas ─────────────────────────────────────────── */
.scouting-psych-bars {
    display: flex;
    flex-direction: column;
    gap: var(--s2);
}
.scouting-psych-bar-row {
    display: grid;
    grid-template-columns: 110px 1fr 36px;
    align-items: center;
    gap: var(--s3);
}
.scouting-psych-bar-label {
    font-size: var(--fs-sm);
    color: var(--text-secondary, #6B7280);
    white-space: nowrap;
}
.scouting-psych-bar-track {
    height: 8px;
    background: var(--neutral-200, #E5E7EB);
    border-radius: 999px;
    overflow: hidden;
}
.scouting-psych-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: var(--primary-500, #3B82F6);
    transition: width .3s ease;
}
.scouting-psych-bar-fill--high  { background: #16A34A; }
.scouting-psych-bar-fill--mid   { background: #D97706; }
.scouting-psych-bar-fill--low   { background: #DC2626; }
.scouting-psych-bar-value {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--text-primary);
    text-align: right;
}


/* ═══════════════════════════════════════════════════════════════════
   Portal de Padres — Estilos dedicados
   ═══════════════════════════════════════════════════════════════════ */

/* ── Shell ──────────────────────────────────────────────────────── */
.parent-shell {
    min-height: 100vh;
    background: var(--neutral-100);
    display: flex;
    flex-direction: column;
}

/* ── Topbar ─────────────────────────────────────────────────────── */
.parent-topbar {
    background: #0B1F3A;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
    height: 56px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.parent-topbar__brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.parent-topbar__logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--accent-500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #fff;
}

.parent-topbar__app-name {
    font-size: 1rem;
    color: rgba(255,255,255,0.85);
    letter-spacing: -0.02em;
}

.parent-topbar__app-name strong {
    color: #fff;
    font-weight: 700;
}

.parent-topbar__logout {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.8);
    border-radius: 8px;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.15s;
}

.parent-topbar__logout:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

/* ── Content area ───────────────────────────────────────────────── */
.parent-shell__content {
    flex: 1;
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    padding: 1.25rem 1rem 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ── Loading / Empty states ─────────────────────────────────────── */
.pp-loading,
.pp-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 3rem 1rem;
    color: var(--text-muted);
    text-align: center;
}

.pp-loading__icon {
    font-size: 2rem;
    animation: pp-spin 1s linear infinite;
}

@keyframes pp-spin { to { transform: rotate(360deg); } }

.pp-empty__icon {
    font-size: 2.5rem;
    color: var(--neutral-300);
}

/* ── Hero card ──────────────────────────────────────────────────── */
.pp-hero {
    background: #fff;
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.pp-hero__avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-600);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.pp-hero__jersey {
    font-size: 1.1rem;
    font-weight: 700;
}

.pp-hero__info {
    flex: 1;
    min-width: 0;
}

.pp-hero__name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.375rem;
    line-height: 1.2;
}

.pp-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.pp-hero__chip {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.pp-hero__chip--pos    { background: var(--primary-50);  color: var(--primary-700); }
.pp-hero__chip--group  { background: var(--accent-50);   color: var(--accent-600);  }
.pp-hero__chip--age    { background: var(--neutral-100); color: var(--text-muted);  }

/* ── Payment badge ──────────────────────────────────────────────── */
.pp-payment-badge {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.375rem 0.75rem;
    border-radius: 999px;
    flex-shrink: 0;
}

.pp-payment-badge--ok {
    background: var(--accent-50);
    color: var(--accent-600);
    border: 1px solid var(--accent-400);
}

.pp-payment-badge--pending {
    background: var(--amber-50);
    color: var(--amber-600);
    border: 1px solid var(--amber-400);
}

/* ── Generic card ───────────────────────────────────────────────── */
.pp-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}

.pp-card__title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pp-card__title i {
    color: var(--primary-600);
}

.pp-empty-text {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin: 0;
}

/* ── Attendance grid ────────────────────────────────────────────── */
.pp-att-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 0.75rem;
}

.pp-att-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    width: 44px;
    padding: 0.35rem 0.25rem;
    border-radius: 8px;
    font-size: 0.65rem;
    font-weight: 600;
}

.pp-att-slot__date {
    font-size: 0.6rem;
    opacity: 0.75;
}

.pp-att-slot--present   { background: #D1FAE5; color: #065F46; }
.pp-att-slot--absent    { background: #FEE2E2; color: #991B1B; }
.pp-att-slot--late      { background: #FEF3C7; color: #92400E; }
.pp-att-slot--justified { background: #EDE9FE; color: #5B21B6; }
.pp-att-slot--unknown   { background: var(--neutral-100); color: var(--text-muted); }

.pp-att-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.pp-att-legend__item {
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-muted);
}

.pp-att-legend__item i { font-size: 0.55rem; }
.pp-att-legend__item--present   i { color: #10B981; }
.pp-att-legend__item--late      i { color: #F59E0B; }
.pp-att-legend__item--justified i { color: #8B5CF6; }
.pp-att-legend__item--absent    i { color: #EF4444; }

/* ── Evaluation bars ────────────────────────────────────────────── */
.pp-eval-date {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: -0.5rem 0 0.75rem;
}

.pp-eval-bars {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.pp-eval-bar {
    display: grid;
    grid-template-columns: 80px 1fr 28px;
    align-items: center;
    gap: 0.5rem;
}

.pp-eval-bar__label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: right;
}

.pp-eval-bar__track {
    height: 8px;
    background: var(--neutral-100);
    border-radius: 999px;
    overflow: hidden;
}

.pp-eval-bar__fill {
    height: 100%;
    background: var(--primary-600);
    border-radius: 999px;
    transition: width 0.5s ease;
    min-width: 4px;
}

.pp-eval-bar__val {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-primary);
}

.pp-eval-notes {
    font-size: 0.8rem;
    color: var(--text-muted);
    border-left: 3px solid var(--neutral-200);
    padding-left: 0.625rem;
    margin: 0;
}

/* ── Match stats grid ───────────────────────────────────────────── */
.pp-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

@media (min-width: 400px) {
    .pp-stats-grid { grid-template-columns: repeat(4, 1fr); }
}

.pp-stat-tile {
    background: var(--neutral-50);
    border: 1px solid var(--neutral-200);
    border-radius: 12px;
    padding: 0.875rem 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.pp-stat-tile--accent { background: var(--accent-50);  border-color: var(--accent-400); }
.pp-stat-tile--violet { background: var(--violet-50);  border-color: var(--violet-400); }
.pp-stat-tile--amber  { background: var(--amber-50);   border-color: var(--amber-400);  }

.pp-stat-tile__value {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
    color: var(--text-primary);
}

.pp-stat-tile--accent .pp-stat-tile__value { color: var(--accent-600); }
.pp-stat-tile--violet .pp-stat-tile__value { color: var(--violet-500); }
.pp-stat-tile--amber  .pp-stat-tile__value { color: var(--amber-600);  }

.pp-stat-tile__label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── Pitch panel (PartidoStats) ── */
.pstats-pitch-panel {
    padding: var(--s4) 0 0;
}

.pstats-pitch-toolbar {
    display: flex;
    align-items: center;
    gap: var(--s3);
    flex-wrap: wrap;
    margin-bottom: var(--s4);
    padding: 0 var(--s4);
}

.pstats-formation-select {
    width: auto;
    min-width: 110px;
}

.pstats-pitch-hint {
    margin-top: var(--s3);
    padding: 0 var(--s4) var(--s3);
    font-size: var(--fs-sm);
    color: var(--neutral-500);
    display: flex;
    align-items: center;
    gap: var(--s2);
}

/* ── AI Exercise Suggestions ─────────────────────────────────────── */

.ai-suggestions-panel {
    border: 1.5px solid var(--primary-100, #DBEAFE);
    border-radius: 10px;
    background: var(--primary-50, #EFF6FF);
    margin-bottom: var(--s4);
    overflow: hidden;
}

.ai-suggestions-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--primary-100, #DBEAFE);
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--primary-700, #1D4ED8);
    gap: var(--s2);
}

.ai-suggestions-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ai-suggestion-card {
    display: flex;
    flex-direction: column;
    gap: var(--s2, 8px);
    padding: var(--s4, 16px);
    border-bottom: 1px solid var(--primary-100, #DBEAFE);
}

.ai-suggestion-card:last-child {
    border-bottom: none;
}

.ai-suggestion-card__name {
    font-size: var(--fs-base, 0.9rem);
    font-weight: 600;
    color: var(--neutral-900, #111827);
    margin: 0;
    line-height: 1.3;
}

.ai-suggestion-card__meta {
    display: flex;
    align-items: center;
    gap: var(--s3, 12px);
    flex-wrap: wrap;
}

.ai-suggestion-card__dur {
    font-size: var(--fs-xs, 0.75rem);
    color: var(--neutral-500, #6B7280);
    display: flex;
    align-items: center;
    gap: 4px;
}

.ai-suggestion-card__desc {
    font-size: var(--fs-sm, 0.82rem);
    color: var(--neutral-500, #6B7280);
    margin: 0;
    line-height: 1.5;
}

.ai-suggestion-card__razon {
    font-size: var(--fs-sm, 0.82rem);
    color: var(--primary-600, #2563EB);
    font-style: italic;
    margin: 0;
    display: flex;
    align-items: flex-start;
    gap: 5px;
    line-height: 1.4;
}

.ai-suggestion-card__razon i {
    flex-shrink: 0;
    margin-top: 2px;
}

.ai-suggestion-card__preview {
    max-width: 280px;
}

/* ── AI Lineup Suggestion Panel ──────────────────────────────────── */

.lineup-suggestion-panel {
    border: 1.5px solid var(--primary-100, #DBEAFE);
    border-radius: 10px;
    background: var(--primary-50, #EFF6FF);
    margin: var(--s3) 0;
    overflow: hidden;
}

.lineup-suggestion-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--primary-100, #DBEAFE);
    gap: var(--s3);
}

.lineup-suggestion-panel__title {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--primary-700, #1D4ED8);
}

.lineup-suggestion-panel__formation {
    display: inline-block;
    margin-left: var(--s2);
    padding: 1px 8px;
    background: var(--primary-500, #3B82F6);
    color: #fff;
    border-radius: 12px;
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.03em;
}

.lineup-suggestion-panel__razon-form {
    padding: var(--s2) var(--s4);
    font-size: var(--fs-sm);
    color: var(--neutral-600, #4B5563);
    margin: 0;
    border-bottom: 1px solid var(--primary-100, #DBEAFE);
    font-style: italic;
}

.lineup-suggestion-panel__cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding: var(--s3) var(--s4);
}

@media (max-width: 600px) {
    .lineup-suggestion-panel__cols {
        grid-template-columns: 1fr;
    }
}

.lineup-suggestion-panel__col-title {
    font-size: var(--fs-xs);
    font-weight: 700;
    color: var(--neutral-500, #6B7280);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 var(--s2);
    display: flex;
    align-items: center;
    gap: 5px;
}

.lineup-suggestion-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--s2);
}

.lineup-suggestion-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.lineup-suggestion-item__name {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--neutral-900, #111827);
}

.lineup-suggestion-item__pos {
    font-size: var(--fs-xs);
    color: var(--primary-600, #2563EB);
    font-weight: 500;
}

.lineup-suggestion-item__razon {
    font-size: var(--fs-xs);
    color: var(--neutral-500, #6B7280);
    font-style: italic;
}

.lineup-suggestion-panel__notas {
    padding: var(--s2) var(--s4) var(--s3);
    font-size: var(--fs-sm);
    color: var(--primary-700, #1D4ED8);
    font-style: italic;
    margin: 0;
    border-top: 1px solid var(--primary-100, #DBEAFE);
    display: flex;
    gap: 6px;
    align-items: flex-start;
}

.lineup-suggestion-panel__notas i {
    flex-shrink: 0;
    margin-top: 2px;
}

.lineup-suggestion-panel__footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--s2);
    padding: var(--s3) var(--s4);
    border-top: 1px solid var(--primary-100, #DBEAFE);
    background: rgba(255,255,255,0.6);
}

/* ══════════════════════════════════════════════════════════════════
   PLAYER DRAWER  ·  Ficha lateral de jugador
══════════════════════════════════════════════════════════════════ */

/* ── Clickable table rows ── */
.row--clickable {
    cursor: pointer;
}
.row--clickable:hover td {
    background: var(--surface-2, #F8FAFC) !important;
}

/* ── Overlay ── */
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(2px);
    z-index: 300;
    animation: fadeIn 0.18s ease;
}

/* ── Drawer panel ── */
.drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100dvh;
    width: 520px;
    max-width: 96vw;
    background: var(--surface-1, #ffffff);
    border-left: 1px solid var(--border, #E2E8F0);
    box-shadow: -8px 0 32px rgba(0,0,0,0.14);
    z-index: 301;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateX(100%);
    transition: transform 0.22s cubic-bezier(.4,0,.2,1);
}
.drawer--open {
    transform: translateX(0);
}

/* ── Header ── */
.drawer__header {
    display: flex;
    align-items: flex-start;
    gap: var(--s3);
    padding: var(--s4) var(--s4) var(--s3);
    border-bottom: 1px solid var(--border, #E2E8F0);
    flex-shrink: 0;
    background: var(--surface-1, #fff);
}
.drawer__avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent, #22C55E);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}
.drawer__identity {
    flex: 1;
    min-width: 0;
}
.drawer__name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary, #0F172A);
    margin: 0 0 var(--s1) 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.drawer__badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s1);
}
.drawer__close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted, #94A3B8);
    font-size: 1rem;
    padding: var(--s1);
    border-radius: var(--radius-sm, 6px);
    transition: color 0.15s, background 0.15s;
    flex-shrink: 0;
}
.drawer__close:hover {
    color: var(--text-primary, #0F172A);
    background: var(--surface-2, #F8FAFC);
}

/* ── Stat pills ── */
.drawer__pills {
    display: flex;
    gap: var(--s2);
    padding: var(--s3) var(--s4);
    border-bottom: 1px solid var(--border, #E2E8F0);
    flex-shrink: 0;
    overflow-x: auto;
}
.drawer-pill {
    flex: 1;
    min-width: 52px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: var(--surface-2, #F8FAFC);
    border: 1px solid var(--border, #E2E8F0);
    border-radius: var(--radius, 10px);
    padding: var(--s2) var(--s1);
}
.drawer-pill__value {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary, #0F172A);
    line-height: 1;
}
.drawer-pill__label {
    font-size: 0.65rem;
    color: var(--text-muted, #94A3B8);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.drawer-pill--green  { border-color: #86EFAC; background: #F0FDF4; }
.drawer-pill--green  .drawer-pill__value { color: #16A34A; }
.drawer-pill--blue   { border-color: #93C5FD; background: #EFF6FF; }
.drawer-pill--blue   .drawer-pill__value { color: #2563EB; }
.drawer-pill--amber  { border-color: #FCD34D; background: #FFFBEB; }
.drawer-pill--amber  .drawer-pill__value { color: #D97706; }
.drawer-pill--red    { border-color: #FCA5A5; background: #FEF2F2; }
.drawer-pill--red    .drawer-pill__value { color: #DC2626; }

/* ── Tab nav ── */
.drawer-tabs {
    display: flex;
    gap: 0;
    padding: 0 var(--s4);
    border-bottom: 1px solid var(--border, #E2E8F0);
    flex-shrink: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.drawer-tabs::-webkit-scrollbar { display: none; }
.drawer-tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: var(--s2) var(--s3);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted, #64748B);
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s;
    margin-bottom: -1px;
}
.drawer-tab:hover { color: var(--text-primary, #0F172A); }
.drawer-tab--active {
    color: var(--accent, #22C55E);
    border-bottom-color: var(--accent, #22C55E);
    font-weight: 600;
}

/* ── Body / scroll area ── */
.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: var(--s4);
    display: flex;
    flex-direction: column;
    gap: var(--s4);
}

/* ── Sections ── */
.drawer-section {
    background: var(--surface-1, #fff);
    border: 1px solid var(--border, #E2E8F0);
    border-radius: var(--radius, 10px);
    padding: var(--s3) var(--s4);
}
.drawer-section__title {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted, #64748B);
    margin: 0 0 var(--s3) 0;
    display: flex;
    align-items: center;
    gap: var(--s2);
}
.drawer-section__sub {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.75rem;
}
.drawer-notes {
    font-size: 0.82rem;
    color: var(--text-secondary, #475569);
    margin: var(--s2) 0 0;
    line-height: 1.5;
    font-style: italic;
}

/* ── Info grid (2-col key/value pairs) ── */
.drawer-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--s2) var(--s4);
}
.drawer-info-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.drawer-info-item__label {
    font-size: 0.7rem;
    color: var(--text-muted, #94A3B8);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.drawer-info-item__value {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary, #0F172A);
}

/* ── Loading state ── */
.drawer-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--s2);
    padding: var(--s8) 0;
    color: var(--text-muted, #94A3B8);
    font-size: 0.85rem;
}
.drawer-loading i { font-size: 1.4rem; }

/* ── Empty state ── */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--s2);
    padding: var(--s8) var(--s4);
    text-align: center;
    color: var(--text-muted, #94A3B8);
}
.empty-state i { font-size: 2rem; }
.empty-state p { margin: 0; font-size: 0.88rem; font-weight: 500; color: var(--text-secondary, #64748B); }
.empty-state small { font-size: 0.78rem; }

/* ── Drawer table ── */
.drawer-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}
.drawer-table th {
    text-align: left;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted, #94A3B8);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: var(--s1) var(--s2) var(--s2);
    border-bottom: 1px solid var(--border, #E2E8F0);
}
.drawer-table td {
    padding: var(--s2);
    border-bottom: 1px solid var(--border-light, #F1F5F9);
    color: var(--text-primary, #0F172A);
    vertical-align: middle;
}
.drawer-table tbody tr:last-child td { border-bottom: none; }

/* ── Eval bars ── */
.eval-bars { display: flex; flex-direction: column; gap: var(--s2); margin-top: var(--s2); }
.eval-bar {
    display: grid;
    grid-template-columns: 90px 1fr 38px;
    align-items: center;
    gap: var(--s2);
}
.eval-bar__label { font-size: 0.78rem; color: var(--text-secondary, #475569); }
.eval-bar__track {
    height: 8px;
    background: var(--surface-2, #F1F5F9);
    border-radius: 4px;
    overflow: hidden;
}
.eval-bar__fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease;
}
.eval-bar__fill--high  { background: #22C55E; }
.eval-bar__fill--mid   { background: #F59E0B; }
.eval-bar__fill--low   { background: #EF4444; }
.eval-bar__fill--empty { background: #E2E8F0; }
.eval-bar__value {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted, #94A3B8);
    text-align: right;
}

/* ── Overall score badge ── */
.eval-overall {
    display: inline-flex;
    align-items: baseline;
    gap: var(--s1);
    padding: var(--s1) var(--s3);
    border-radius: var(--radius, 10px);
    margin-bottom: var(--s3);
}
.eval-overall__value { font-size: 1.6rem; font-weight: 800; line-height: 1; }
.eval-overall__label { font-size: 0.78rem; font-weight: 500; }
.eval-overall--high  { background: #F0FDF4; color: #16A34A; }
.eval-overall--mid   { background: #FFFBEB; color: #D97706; }
.eval-overall--low   { background: #FEF2F2; color: #DC2626; }

/* ── Match history rows ── */
.drawer-match-list { display: flex; flex-direction: column; gap: var(--s1); }
.match-row {
    display: flex;
    align-items: center;
    gap: var(--s2);
    padding: var(--s2) var(--s3);
    background: var(--surface-2, #F8FAFC);
    border-radius: var(--radius-sm, 6px);
    font-size: 0.8rem;
    flex-wrap: wrap;
}
.match-row__date    { color: var(--text-muted, #94A3B8); min-width: 36px; }
.match-row__opponent { flex: 1; font-weight: 500; color: var(--text-primary, #0F172A); }
.match-row__result  { font-size: 0.72rem; font-weight: 700; padding: 2px 6px; border-radius: 4px; }
.match-row__result--win  { background: #DCFCE7; color: #15803D; }
.match-row__result--loss { background: #FEE2E2; color: #B91C1C; }
.match-row__result--draw { background: #FEF9C3; color: #92400E; }
.match-row__result--pending { color: var(--text-muted, #94A3B8); }
.match-row__role { font-size: 0.68rem; color: var(--text-muted, #94A3B8); min-width: 26px; }
.match-row__mins { color: var(--text-secondary, #475569); min-width: 28px; }
.match-row__stat { font-size: 0.78rem; }
.match-row__card { font-size: 0.75rem; }

/* ── Attendance ── */
.attendance-summary {
    display: flex;
    align-items: center;
    gap: var(--s4);
    margin-bottom: var(--s3);
}
.attendance-pct { display: flex; flex-direction: column; align-items: center; min-width: 52px; }
.attendance-pct__value { font-size: 1.4rem; font-weight: 800; color: var(--text-primary); line-height: 1; }
.attendance-pct__label { font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; }
.attendance-progress { flex: 1; }
.attendance-chips { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s2); }
.att-chip {
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--text-secondary);
}

/* ── Sub-tab nav (Desarrollo) ── */
.drawer-subnav {
    display: flex;
    gap: var(--s1);
    margin-bottom: var(--s3);
    background: var(--surface-2, #F8FAFC);
    border-radius: var(--radius, 10px);
    padding: var(--s1);
}
.drawer-subtab {
    flex: 1;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted, #64748B);
    padding: var(--s1) var(--s2);
    border-radius: var(--radius-sm, 6px);
    transition: background 0.15s, color 0.15s;
}
.drawer-subtab--active {
    background: var(--surface-1, #fff);
    color: var(--accent, #22C55E);
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

/* ── Disciplinary chips ── */
.disc-summary { display: flex; flex-wrap: wrap; gap: var(--s2); }
.disc-chip {
    font-size: 0.78rem;
    font-weight: 600;
    padding: var(--s1) var(--s3);
    border-radius: 999px;
}
.disc-chip--yellow    { background: #FEF9C3; color: #92400E; }
.disc-chip--red       { background: #FEE2E2; color: #B91C1C; }
.disc-chip--suspension{ background: #F3E8FF; color: #7C3AED; }

/* ── Scout IA ── */
.scout-meta    { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s3); align-items: center; }
.scout-resumen { font-size: 0.85rem; line-height: 1.6; color: var(--text-secondary, #475569); margin: 0; }
.scout-list    { margin: 0; padding-left: var(--s4); display: flex; flex-direction: column; gap: var(--s1); }
.scout-list li { font-size: 0.83rem; line-height: 1.5; color: var(--text-secondary, #475569); }
.scout-list--green li::marker { color: #16A34A; }
.scout-list--amber li::marker { color: #D97706; }
.scout-section--fortalezas { color: #16A34A !important; }
.scout-section--mejora     { color: #D97706 !important; }

/* ── Training plans ── */
.plan-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s2);
    margin-bottom: var(--s1);
}
.plan-card__title { font-size: 0.88rem; font-weight: 600; color: var(--text-primary); }
.plan-card__meta  { display: flex; align-items: center; gap: var(--s3); margin-top: var(--s2); font-size: 0.75rem; }

/* ── Responsive ── */
@media (max-width: 540px) {
    .drawer { width: 100vw; }
    .eval-bar { grid-template-columns: 72px 1fr 32px; }
}
