/* ============================================================
   AMS Deportivo — Design System
   Paleta, tipografía, layout y componentes base.
   Nunca usar colores hardcodeados en views — siempre variables.
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
    --color-bg:              #F1F5F9;
    --color-surface:         #FFFFFF;
    --color-sidebar:         #0F172A;
    --color-sidebar-hover:   #1E293B;
    --color-sidebar-active:  #1E293B;
    --color-sidebar-text:    #94A3B8;
    --color-sidebar-text-active: #FFFFFF;
    --color-primary:         #3B82F6;
    --color-primary-dark:    #2563EB;
    --color-text:            #0F172A;
    --color-text-muted:      #64748B;
    --color-border:          #E2E8F0;
    --color-success:         #10B981;
    --color-warning:         #F59E0B;
    --color-danger:          #EF4444;

    --sidebar-width:         240px;
    --topbar-height:         56px;
    --border-radius:         8px;
    --shadow-sm:             0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md:             0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.04);
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { font-size: 15px; height: 100%; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    margin: 0;
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* ── Shell Layout ───────────────────────────────────────────── */
.ams-shell {
    display: flex;
    min-height: 100vh;
}

/* ── Sidebar ────────────────────────────────────────────────── */
.ams-sidebar {
    width: var(--sidebar-width);
    background-color: var(--color-sidebar);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    overflow-y: auto;
    transition: transform 0.25s ease;
    scrollbar-width: none;
}
.ams-sidebar::-webkit-scrollbar { display: none; }

.ams-sidebar-brand {
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}

.ams-brand-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #FFFFFF;
    letter-spacing: -0.01em;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}
.ams-brand-name:hover { color: #FFFFFF; text-decoration: none; }

.ams-brand-icon {
    width: 32px;
    height: 32px;
    background: var(--color-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    color: white;
    flex-shrink: 0;
}

.ams-sidebar-section {
    padding: 16px 12px 4px;
}

.ams-sidebar-label {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #475569;
    padding: 0 8px;
    margin-bottom: 4px;
}

.ams-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-radius: 6px;
    color: var(--color-sidebar-text);
    text-decoration: none;
    font-size: 0.855rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
    margin-bottom: 1px;
}
.ams-nav-item:hover { background: var(--color-sidebar-hover); color: #FFFFFF; text-decoration: none; }
.ams-nav-item.active { background: var(--color-sidebar-active); color: var(--color-sidebar-text-active); }
.ams-nav-item.active .ams-nav-icon { color: var(--color-primary); }

.ams-nav-icon { font-size: 0.95rem; width: 18px; text-align: center; flex-shrink: 0; }

/* ── Main Area ──────────────────────────────────────────────── */
.ams-main {
    margin-left: var(--sidebar-width);
    flex: 1;
    /* Flex children con contenido ancho (tablas de 18+ columnas, pre largos, etc.) necesitan
       min-width: 0 para que el flex parent NO se expanda junto al contenido. Sin esto,
       el overflow-x:auto del .ams-table-wrapper no activa scroll horizontal — el card crece
       tanto como la tabla y rompe el layout. Fix canónico de overflow en flexbox. */
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* .ams-content es flex child de .ams-main — misma lógica, mismo fix. */
.ams-content { min-width: 0; }

/* ── Top Bar ────────────────────────────────────────────────── */
.ams-topbar {
    height: var(--topbar-height);
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.ams-topbar-context {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    flex: 1;
}
.ams-topbar-workspace {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
}
.ams-topbar-sep {
    color: var(--color-border);
    font-size: 0.875rem;
    flex-shrink: 0;
}
.ams-topbar-detail {
    font-size: 0.825rem;
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ams-topbar-club-logo {
    height: 24px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.ams-topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

.ams-topbar-user {
    font-size: 0.835rem;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}
.ams-topbar-logout {
    color: var(--color-text-muted);
    font-size: 1rem;
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: color 0.15s;
}
.ams-topbar-logout:hover { color: var(--color-danger); }

.ams-sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    line-height: 1;
    margin-right: 8px;
}
.ams-sidebar-toggle:hover { background: var(--color-bg); color: var(--color-text); }

/* ── Content ────────────────────────────────────────────────── */
.ams-content { padding: 24px; flex: 1; }

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

.ams-page-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 4px 0;
    letter-spacing: -0.01em;
}

.ams-breadcrumb {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    margin: 0;
}
.ams-breadcrumb a { color: var(--color-text-muted); text-decoration: none; }
.ams-breadcrumb a:hover { color: var(--color-primary); }

/* ── Cards ──────────────────────────────────────────────────── */
.ams-card {
    background: var(--color-surface);
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    padding: 20px;
}

.ams-card-title {
    font-size: 0.855rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-border);
}

/* ── Tables ─────────────────────────────────────────────────── */
/*
 * table-layout: auto (browser default) → columnas se ajustan al contenido.
 * Las <th> ya tienen white-space: nowrap, lo que ancla los headers a su
 * ancho mínimo y deja que las columnas de datos ocupen el espacio restante.
 */
/* La tabla nunca rebalsa el contenedor: usa todo el ancho disponible y
   reparte columnas según contenido. Tablas data-densas (.match-table) tienen
   sus propios overrides para forzar fit en pantallas chicas. */
.ams-table { width: 100%; max-width: 100%; border-collapse: collapse; font-size: 0.855rem; table-layout: auto; }

/* TODAS las celdas (th + td) centradas, sin excepción.
   !important para vencer:
     - styles inline (style="text-align: ...")
     - Bootstrap (.text-start / .text-end / .text-center)
     - reglas de clases más específicas (.match-table, etc.) */
.ams-table th,
.ams-table td {
    text-align: center !important;
}

/* Los d-flex dentro de celdas (típicamente foto + nombre de jugador) también
   deben quedar centrados como bloque inline, para matchear el text-align. */
.ams-table td > .d-flex,
.ams-table th > .d-flex {
    justify-content: center;
}

.ams-table th {
    padding: 10px 14px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
}

.ams-table td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text);
    vertical-align: middle;
    white-space: nowrap;
}

.ams-table tbody tr:last-child td { border-bottom: none; }
.ams-table tbody tr:hover td { background-color: #F8FAFC; }

/*
 * Clases de control de ancho. Alineación SIEMPRE a la izquierda (regla global arriba).
 *
 * .ams-col-shrink → columna se encoge al mínimo (acciones, badges).
 * .ams-col-expand → columna principal: permite wrap del contenido en varias líneas.
 * .ams-truncate   → recorta texto largo con "…" y tooltip al hover.
 */
.ams-table th.ams-col-shrink,
.ams-table td.ams-col-shrink {
    width: 1%;
    white-space: nowrap;
}

.ams-table td.ams-col-expand { white-space: normal; }

/* num / ams-col-num / ams-col-center: legacy. Mantenemos las clases para no romper
   markup existente — alineación forzada a izquierda por la regla global. */
.ams-table th.num, .ams-table td.num,
.ams-table th.ams-col-num, .ams-table td.ams-col-num,
.ams-table th.ams-col-center, .ams-table td.ams-col-center {
    white-space: nowrap;
}

.ams-table td.ams-truncate {
    max-width: 260px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: default;
}

/* Columnas de métricas GPS en listados densos (muchas columnas).
   Padding reducido y fuente monoespaciada para alinear números.
   Uso: th.gps-col en header; td.gps-cell en data. */
.ams-table th.gps-col,
.ams-table td.gps-cell {
    padding-left: 8px;
    padding-right: 8px;
    font-size: 0.78rem;
}
.ams-table td.gps-cell {
    font-variant-numeric: tabular-nums;
    color: var(--color-text-muted);
    text-align: right !important;
}
.ams-table th.gps-col {
    text-align: right !important;
}
.ams-table th.gps-col .gps-col-unit {
    display: block;
    font-size: 0.65rem;
    opacity: 0.6;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}

/* ── Match-table responsive (data-densa: 8-12 columnas de métricas) ────────────
   Estas tablas viven en el módulo GPS (Análisis de Partido, Microciclo, etc).
   Estrategia: NUNCA scroll horizontal — ocupar 100% del ancho del card,
   font chico, padding mínimo, headers que envuelven en varias líneas. */
.ams-table-wrapper { width: 100%; overflow: hidden; }
.match-table {
    width: 100% !important;
    max-width: 100% !important;
    table-layout: fixed !important;
    font-size: 12px !important;
}
.match-table th,
.match-table td {
    padding: 6px 6px !important;
    white-space: normal !important;       /* permite wrap en cualquier celda */
    overflow-wrap: break-word;
    word-break: normal;
    vertical-align: middle;
}
.match-table thead th {
    font-size: 10.5px !important;
    line-height: 1.2;
    letter-spacing: 0.02em !important;
}
/* primera columna (jugador) — ancho reducido, el nombre envuelve si hace falta */
.match-table thead th:first-child,
.match-table tbody td:first-child,
.match-table tfoot td:first-child { width: 10%; min-width: 80px; }

.match-table .player-cell { gap: 6px !important; min-width: 0 !important; flex-wrap: nowrap; }
.match-table .player-cell .name { white-space: normal !important; line-height: 1.15; font-size: 12px; }
.match-table .player-cell .avatar { width: 22px !important; height: 22px !important; }

@media (max-width: 1024px) {
    .match-table { font-size: 11px !important; }
    .match-table th, .match-table td { padding: 5px 4px !important; }
    .match-table .player-cell .avatar { display: none; }
}
@media (max-width: 640px) {
    .match-table { font-size: 10.5px !important; }
    .match-table th, .match-table td { padding: 4px 3px !important; }
}

/* ── Sortable columns ─────────────────────────────────────────────────────── */
.ams-table thead th.ams-sortable {
    cursor: pointer;
    user-select: none;
}
.ams-table thead th.ams-sortable:hover {
    color: var(--color-primary);
    background: color-mix(in srgb, var(--color-primary) 6%, var(--color-bg));
}
.ams-table thead th .ams-sort-icon {
    display: inline-block;
    margin-left: 5px;
    opacity: 0.3;
    font-size: 9px;
    vertical-align: middle;
    line-height: 1;
    transition: opacity .15s;
}
.ams-table thead th.ams-sortable:hover .ams-sort-icon { opacity: 0.6; }
.ams-table thead th.ams-sort-asc  .ams-sort-icon,
.ams-table thead th.ams-sort-desc .ams-sort-icon {
    opacity: 1;
    color: var(--color-primary);
}

/*
 * El wrapper ahora hace scroll horizontal en pantallas chicas en lugar de
 * cortar el contenido. border-radius se aplica sobre el wrapper mismo.
 */
.ams-table-wrapper {
    background: var(--color-surface);
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ── Responsive: pantallas ≤ 768px ─────────────────────────────────────────── */
@media (max-width: 768px) {
    .ams-table { font-size: 0.8rem; }
    .ams-table th { padding: 8px 10px; font-size: 0.68rem; }
    .ams-table td { padding: 9px 10px; }
    .ams-table td.ams-truncate { max-width: 160px; }
    /* Padding interno del sort-link coherente con el TH mobile */
    .ams-sort-link { padding: 8px 10px; }
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn-ams-primary {
    background-color: var(--color-primary);
    border: 1px solid var(--color-primary);
    color: #FFFFFF;
    font-size: 0.855rem;
    font-weight: 500;
    padding: 7px 16px;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s, border-color 0.15s;
    line-height: 1.4;
}
.btn-ams-primary:hover, .btn-ams-primary:focus {
    background-color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    color: #FFFFFF;
    text-decoration: none;
}

.btn-ams-secondary {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    font-size: 0.855rem;
    font-weight: 500;
    padding: 7px 16px;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s;
    line-height: 1.4;
}
.btn-ams-secondary:hover { background-color: var(--color-bg); color: var(--color-text); text-decoration: none; }

.btn-ams-danger {
    background-color: var(--color-danger);
    border: 1px solid var(--color-danger);
    color: #FFFFFF;
    font-size: 0.855rem;
    font-weight: 500;
    padding: 7px 16px;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s, border-color 0.15s;
    line-height: 1.4;
}
.btn-ams-danger:hover, .btn-ams-danger:focus {
    background-color: #DC2626;
    border-color: #DC2626;
    color: #FFFFFF;
    text-decoration: none;
}

/* ── Radio cards (para selectores de variante) ──────────────── */
.ams-radio-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
@media (max-width: 640px) {
    .ams-radio-group { grid-template-columns: 1fr; }
}
.ams-radio-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: var(--color-surface);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    margin: 0;
}
.ams-radio-card:hover {
    border-color: var(--color-primary);
    background: var(--color-bg);
}
.ams-radio-card input[type="radio"] {
    margin-top: 3px;
    flex-shrink: 0;
}
.ams-radio-card:has(input[type="radio"]:checked) {
    border-color: var(--color-primary);
    background: rgba(59, 130, 246, 0.06);
}
.ams-radio-title {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--color-text);
    margin-bottom: 2px;
}
.ams-radio-desc {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    line-height: 1.35;
}

/* ── Sortable table headers ─────────────────────────────────────
   El link de sort cubre TODA la celda del <th>. Enfoque limpio (sin
   tricks de margin negativo): el <th> que contiene un sort-link pierde
   su padding y el padding vive dentro del <a>, que pasa a ser block-level.
   Así clickear en cualquier píxel de la celda navega al mismo URL. */
.ams-table th:has(> .ams-sort-link) { padding: 0; }

.ams-sort-link {
    color: inherit;
    text-decoration: none;
    display: flex;
    flex-direction: row;       /* texto + ícono SIEMPRE en una fila */
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px 14px;
    font-weight: inherit;
    line-height: 1.2;          /* evita altura extra por line-height default */
    white-space: nowrap;       /* nunca wrappear texto e ícono */
    cursor: pointer;
    transition: color 0.15s;
}
.ams-sort-link:hover { color: var(--color-primary); text-decoration: none; }
.ams-sort-link i {
    font-size: 0.75rem;
    line-height: 1;            /* el icono no aporta altura vertical extra */
    color: var(--color-text-muted);
    flex-shrink: 0;
    display: inline-block;     /* Bootstrap Icons son pseudo-elementos: fijamos el box */
    vertical-align: middle;
}
.ams-sort-link:hover i { color: var(--color-primary); }

/* ── Pagination ─────────────────────────────────────────────── */
.ams-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    background: var(--color-surface);
    color: var(--color-text);
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    user-select: none;
}
.ams-page-link:hover {
    background: var(--color-bg);
    color: var(--color-primary);
    border-color: var(--color-primary);
    text-decoration: none;
}
.ams-page-link.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #FFFFFF;
    cursor: default;
}
.ams-page-link.disabled {
    color: var(--color-text-muted);
    background: var(--color-bg);
    cursor: not-allowed;
    opacity: 0.6;
}
.ams-page-ellipsis {
    display: inline-flex;
    align-items: center;
    padding: 0 4px;
    color: var(--color-text-muted);
    font-size: 0.82rem;
}

/* ── Badges ─────────────────────────────────────────────────── */
.ams-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 99px;
    font-size: 0.72rem;
    font-weight: 600;
}
.ams-badge-success { background: #D1FAE5; color: #065F46; }
.ams-badge-warning { background: #FEF3C7; color: #92400E; }
.ams-badge-danger  { background: #FEE2E2; color: #991B1B; }
.ams-badge-neutral { background: var(--color-bg); color: var(--color-text-muted); }
.ams-badge-primary { background: #DBEAFE; color: #1E40AF; }

/* ── Forms ──────────────────────────────────────────────────── */
.form-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 5px;
    display: block;
}

.form-control, .form-select {
    font-size: 0.855rem;
    border-color: var(--color-border);
    border-radius: 6px;
    padding: 8px 12px;
    color: var(--color-text);
    background: var(--color-surface);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
    outline: none;
}
.form-control::placeholder { color: #CBD5E1; }
.invalid-feedback { font-size: 0.78rem; }

/* ── Alerts ─────────────────────────────────────────────────── */
/* ── Toast notifications ─────────────────────────────────────────────────── */
@keyframes toast-in {
    from { opacity: 0; transform: translateX(24px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes toast-out {
    from { opacity: 1; transform: translateX(0);    max-height: 80px; margin-bottom: 0; }
    to   { opacity: 0; transform: translateX(24px); max-height: 0;    margin-bottom: -10px; }
}

.ams-toast-container {
    position: fixed;
    top: 72px;
    right: 24px;
    z-index: 1055;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 380px;
    width: calc(100vw - 48px);
    pointer-events: none;
}

.ams-toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 16px;
    border-radius: 8px;
    font-size: 0.855rem;
    font-weight: 500;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12), 0 1px 4px rgba(0,0,0,0.08);
    border-left: 4px solid transparent;
    background: var(--color-surface);
    pointer-events: all;
    animation: toast-in .25s ease forwards;
    overflow: hidden;
}
.ams-toast.toast-hiding {
    animation: toast-out .3s ease forwards;
}
.ams-toast i.toast-icon { font-size: 1rem; margin-top: 1px; flex-shrink: 0; }
.ams-toast .toast-msg   { flex: 1; line-height: 1.45; }

.ams-toast-success { border-left-color: var(--color-success); color: #065F46; }
.ams-toast-success i.toast-icon { color: var(--color-success); }

.ams-toast-error   { border-left-color: var(--color-danger); color: #991B1B; }
.ams-toast-error i.toast-icon { color: var(--color-danger); }

.ams-toast-dismiss {
    margin-left: auto;
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    opacity: 0.5;
    padding: 0;
    line-height: 1;
    font-size: 1rem;
}
.ams-toast-dismiss:hover { opacity: 1; }

/* ── Empty State ────────────────────────────────────────────── */
.ams-empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--color-text-muted);
}
.ams-empty-state-icon  { font-size: 2.25rem; margin-bottom: 12px; opacity: 0.35; display: block; }
.ams-empty-state-title { font-size: 0.9rem; font-weight: 600; color: var(--color-text); margin-bottom: 5px; }
.ams-empty-state-text  { font-size: 0.82rem; margin-bottom: 20px; }

/* ── Action links (table row actions) ──────────────────────── */
.ams-action-link {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    text-decoration: none;
    padding: 3px 6px;
    border-radius: 4px;
    transition: background 0.12s, color 0.12s;
}
.ams-action-link:hover       { background: var(--color-bg); color: var(--color-primary); }
.ams-action-link.danger:hover { background: #FEE2E2; color: var(--color-danger); }

/* ── Stat Cards ─────────────────────────────────────────────── */
.ams-stat {
    background: var(--color-surface);
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    padding: 20px;
}
.ams-stat-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}
.ams-stat-value {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--color-text);
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 4px;
}
.ams-stat-sub { font-size: 0.78rem; color: var(--color-text-muted); }

/* ── Login Layout (sin sidebar) ─────────────────────────────── */
.ams-login-body {
    background: var(--color-bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ams-login-card {
    background: var(--color-surface);
    border-radius: 12px;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    padding: 40px;
    width: 100%;
    max-width: 380px;
}
.ams-login-wrap { width: 100%; max-width: 420px; padding: 16px; }
.ams-login-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text);
}
.ams-login-brand i {
    font-size: 1.4rem;
    color: var(--color-primary);
}
.ams-login-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 24px;
}
.ams-form-group { margin-bottom: 16px; }
.ams-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 6px;
}
.ams-input {
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.9rem;
    color: var(--color-text);
    background: var(--color-surface);
    transition: border-color 0.15s;
}
.ams-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}
/* ── Selector de horario custom (HH + MM) ─────────────────────
   Reemplaza al <input type="time"> nativo, que en Windows/Chrome tiene
   un spinner con bugs al scroll y visualmente no combina con el resto. */
.ams-time-input {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: var(--color-surface);
    transition: border-color 0.15s, box-shadow 0.15s;
    overflow: hidden;
}
.ams-time-input:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}
.ams-time-input.is-invalid {
    border-color: var(--color-danger);
    box-shadow: 0 0 0 3px rgba(239,68,68,0.15);
}
.ams-time-input .ams-time-part {
    border: none;
    border-radius: 0;
    padding: 8px 6px 8px 10px;
    font-size: 0.95rem;
    font-variant-numeric: tabular-nums;
    background: transparent;
    text-align: center;
    min-width: 56px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: none;
}
.ams-time-input .ams-time-part:focus {
    outline: none;
    box-shadow: none;
    background: rgba(59,130,246,0.04);
}
.ams-time-input .ams-time-sep {
    display: inline-flex;
    align-items: center;
    padding: 0 2px;
    color: var(--color-text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    user-select: none;
}

/* ── Botón de favorito (estrella clickeable) ──────────────────
   Se usa en tablas de perfiles para marcar/desmarcar un favorito.
   Un solo favorito por workspace; el flag llega al server via form POST. */
.ams-fav-btn {
    background: none;
    border: none;
    padding: 3px 6px;
    cursor: pointer;
    color: var(--color-text-muted);
    font-size: 1rem;
    line-height: 1;
    transition: color .15s, transform .15s;
}
.ams-fav-btn:hover {
    color: var(--color-warning);
    transform: scale(1.12);
}
.ams-fav-btn.is-fav {
    color: var(--color-warning);
}
/* hint al hover del favorito actual: "si lo clickeás, lo desmarcás" */
.ams-fav-btn.is-fav:hover {
    color: var(--color-text-muted);
    transform: scale(1.05);
}
/* Resalte sutil de la fila cuyo perfil es el favorito */
.ams-table tr.is-favorite-row td {
    background: rgba(245, 158, 11, 0.04);
}

/* Marca de "favorito" en selectores/checklists (estrella chica al lado del nombre) */
.ms-fav-mark {
    color: var(--color-warning);
    font-size: .72rem;
    margin-left: 4px;
}

/* Select bloqueado: visual de "fijado" cuando una opción es la única válida */
.ams-input-locked {
    background: var(--color-bg) !important;
    color: var(--color-text-muted);
    cursor: not-allowed;
}
.ams-input-locked:focus { box-shadow: none; }

/* ── Sidebar Mobile Overlay ─────────────────────────────────── */
.ams-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 999;
}
.ams-sidebar-overlay.active { display: block; }

/* ── Mobile-first form components (player-facing) ───────────── */
/*
 * Estos estilos están diseñados para vistas que llenan los jugadores en celular:
 * Wellness Matutino, Checklist Diario, Feedback de Sesión.
 * Targets touch grandes (≥44px), ranges anchos, botones full-width en mobile.
 */
.ams-mobile-form { max-width: 600px; }

/* Filas tipo "checkbox + label" pensadas para tap (≥48px de alto) */
.ams-touch-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 4px;
    border-bottom: 1px solid var(--color-border);
    cursor: pointer;
    margin: 0;
    user-select: none;
    min-height: 48px;
}
.ams-touch-row:last-child { border-bottom: none; }
.ams-touch-row:active { background: var(--color-bg); }
.ams-touch-checkbox { width: 22px !important; height: 22px !important; flex-shrink: 0; cursor: pointer; }
.ams-touch-label { font-size: 0.95rem; line-height: 1.3; color: var(--color-text); flex: 1; }

/* Range slider con track más grueso y thumb más grande para tap */
.ams-range-group { margin-bottom: 24px; }
.ams-range-help { font-size: 0.82rem; color: var(--color-text-muted); margin: 0.2rem 0 0.5rem; }
.ams-range-row { display: flex; align-items: center; gap: 14px; }
.ams-range { height: 28px; }
.ams-range::-webkit-slider-thumb { width: 26px; height: 26px; }
.ams-range::-moz-range-thumb { width: 26px; height: 26px; }
.ams-range-value {
    min-width: 38px;
    text-align: center;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--color-primary);
    background: rgba(59, 130, 246, .08);
    border-radius: 8px;
    padding: 4px 8px;
}
.ams-range-bounds { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--color-text-muted); margin-top: 4px; }

/* Acciones del form: en mobile, full-width verticales y stickies opcionalmente */
.ams-form-actions { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.ams-btn-lg { font-size: 0.95rem; padding: 12px 22px; min-height: 46px; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 991.98px) {
    .ams-sidebar { transform: translateX(-100%); }
    .ams-sidebar.open { transform: translateX(0); }
    .ams-main { margin-left: 0; }
    .ams-content { padding: 16px; }
    .ams-toast-container { top: 16px; right: 16px; }
}

@media (max-width: 640px) {
    .ams-content { padding: 12px; }
    .ams-card { padding: 14px; border-radius: 6px; }

    /* Forms player-facing: ocupan ancho completo, botones full-width */
    .ams-mobile-form { max-width: 100%; }
    .ams-form-actions { flex-direction: column; }
    .ams-form-actions > .btn-ams-primary,
    .ams-form-actions > .btn-ams-secondary,
    .ams-form-actions > .ams-btn-lg { width: 100%; justify-content: center; display: inline-flex; align-items: center; }

    /* Range más grande para tap preciso en pantallas chicas */
    .ams-range-value { font-size: 1.3rem; min-width: 44px; }
    .ams-touch-label { font-size: 1rem; }
    .ams-touch-checkbox { width: 24px !important; height: 24px !important; }

    /* Inputs cómodos en mobile */
    .ams-input, .form-control, .form-select { min-height: 44px; font-size: 16px; /* evita zoom iOS */ }
}

/* ============================================================================
   PLAYER MOBILE — experiencia app-nativa para el rol jugador
   Se activa con body.player-mobile + viewport < 992px
   ============================================================================ */

/* Safety net global: prevenir scroll horizontal accidental en cualquier página */
html, body { overflow-x: hidden; }

/* Bottom nav — oculta por defecto, solo aparece en mobile-jugador */
.ams-bottom-nav { display: none; }

/* Cards/listas para reemplazar tablas en mobile */
.ams-session-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.ams-session-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-surface);
    text-decoration: none;
    color: var(--color-text);
    transition: transform .08s ease, background .12s ease;
}
.ams-session-card:hover { text-decoration: none; color: var(--color-text); }
.ams-session-card:active { background: var(--color-bg); transform: scale(0.99); }
.ams-session-card-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.ams-session-card-date {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
}
.ams-session-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: .78rem;
    color: var(--color-text-muted);
}

/* Grid 2-col para métricas GPS / KPIs */
.ams-metric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
.ams-metric-mini {
    padding: 12px;
    border-radius: 10px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    min-width: 0;
}
.ams-metric-mini .label {
    font-size: 11px;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 500;
}
.ams-metric-mini .value {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.2;
    margin-top: 2px;
    word-break: break-word;
}
.ams-metric-mini .unit {
    font-size: 12px;
    font-weight: 500;
    color: var(--color-text-muted);
    margin-left: 2px;
}

/* Charts responsive con aspect-ratio */
.ams-chart-frame {
    position: relative;
    width: 100%;
    height: 260px;
}

/* Pill chips horizontales para filtros de fecha */
.ams-date-chips {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 4px 0 10px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.ams-date-chips::-webkit-scrollbar { display: none; }
.ams-date-chip {
    flex: 0 0 auto;
    padding: 8px 16px;
    border-radius: 999px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}
.ams-date-chip:hover { text-decoration: none; color: var(--color-text); }
.ams-date-chip.active {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

/* Filtros colapsables con <details> nativo */
.ams-filters-collapse {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 0;
    overflow: hidden;
}
.ams-filters-collapse > summary {
    padding: 12px 14px;
    font-size: .9rem;
    font-weight: 600;
    color: var(--color-text);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.ams-filters-collapse > summary::-webkit-details-marker { display: none; }
.ams-filters-collapse > summary::after {
    content: "›";
    font-size: 1.4rem;
    color: var(--color-text-muted);
    transform: rotate(90deg);
    transition: transform .15s ease;
}
.ams-filters-collapse[open] > summary::after { transform: rotate(-90deg); }
.ams-filters-collapse > div {
    padding: 0 14px 14px;
    border-top: 1px solid var(--color-border);
}

/* ── Reglas específicas para body.player-mobile en viewport móvil ─────────── */
@media (max-width: 991.98px) {

    /* Bottom nav visible */
    body.player-mobile .ams-bottom-nav {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1040;
        background: var(--color-surface);
        border-top: 1px solid var(--color-border);
        padding-bottom: env(safe-area-inset-bottom);
        box-shadow: 0 -2px 12px rgba(15, 23, 42, 0.06);
    }
    body.player-mobile .ams-bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        min-height: 60px;
        padding: 8px 4px;
        text-decoration: none;
        color: var(--color-text-muted);
        font-size: 11px;
        font-weight: 500;
        transition: color .12s ease;
    }
    body.player-mobile .ams-bottom-nav-item i { font-size: 22px; line-height: 1; }
    body.player-mobile .ams-bottom-nav-item span { font-size: 11px; line-height: 1.2; }
    body.player-mobile .ams-bottom-nav-item.active {
        color: var(--color-primary);
    }
    body.player-mobile .ams-bottom-nav-item:active {
        background: var(--color-bg);
    }

    /* Sidebar y hamburguesa ocultos — el jugador usa el bottom nav */
    body.player-mobile .ams-sidebar,
    body.player-mobile .ams-sidebar-overlay,
    body.player-mobile .ams-sidebar-toggle {
        display: none !important;
    }

    /* Topbar compacto: ocultar breadcrumb workspace/club/season */
    body.player-mobile .ams-topbar-context { display: none; }
    body.player-mobile .ams-topbar { padding: 10px 14px; }
    body.player-mobile .ams-topbar-user { font-size: .85rem; }

    /* Main ocupa todo el ancho (no hay sidebar) */
    body.player-mobile .ams-main { margin-left: 0; }

    /* Padding-bottom en content para que el bottom nav no tape contenido */
    body.player-mobile .ams-content { padding-bottom: 90px; }

    /* Charts: altura por aspect-ratio en lugar de fixed */
    body.player-mobile .ams-chart-frame {
        height: auto;
        aspect-ratio: 16 / 10;
    }

    /* Page title compacto */
    body.player-mobile .ams-page-title { font-size: 1.25rem; }
    body.player-mobile .ams-page-header { gap: 8px; margin-bottom: 12px; }
}

/* Más compacto en pantallas chicas (iPhone SE = 375px) */
@media (max-width: 640px) {
    /* Selects y inputs: ancho completo, sin min-width fijo */
    body.player-mobile select.ams-input,
    body.player-mobile select.form-select,
    body.player-mobile input.ams-input,
    body.player-mobile input.form-control {
        min-width: 0 !important;
        width: 100%;
    }

    /* Formularios con d-flex: stack vertical */
    body.player-mobile form.d-flex {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    body.player-mobile form.d-flex > div { width: 100%; }
    body.player-mobile form.d-flex .btn-ams-primary,
    body.player-mobile form.d-flex .btn-ams-secondary {
        width: 100%;
    }

    /* Cards internos más ajustados */
    body.player-mobile .ams-card { padding: 14px; }

    /* Grid de métricas: más chico en 375px, pero sigue 2 cols */
    body.player-mobile .ams-metric-mini { padding: 10px; }
    body.player-mobile .ams-metric-mini .value { font-size: 18px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   OVERFLOW SAFETY NETS — evitar scroll lateral en mobile-jugador
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 991.98px) {
    /* Box-sizing universal dentro del player-mobile */
    body.player-mobile .ams-card,
    body.player-mobile .ams-card * {
        box-sizing: border-box;
    }
    /* Inputs / selects / textarea nunca exceden el contenedor */
    body.player-mobile input,
    body.player-mobile select,
    body.player-mobile textarea {
        max-width: 100%;
    }
    /* Cards del player-mobile contienen su contenido */
    body.player-mobile .ams-card {
        overflow: hidden;
        word-break: break-word;
    }
    /* Tablas residuales dentro del player-mobile: permitir scroll interno
       pero que el wrapper sí tenga scroll en lugar de rebalsar */
    body.player-mobile .ams-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }
    /* Input range flex: asegurarse de que no tenga min-width heredado */
    body.player-mobile input[type="range"] {
        min-width: 0;
        width: 100%;
        flex: 1 1 0;
    }
    /* Badges con texto largo: permitir wrap */
    body.player-mobile .ams-badge {
        white-space: normal;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   APPLE-STYLE MOBILE PATTERNS — Player Home & Session Detail
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Hero greeting (Large Title iOS) ─────────────────────────────────────── */
.ams-hero-greeting { margin: 8px 0 20px 0; }
.ams-hero-greeting-sub {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    font-weight: 400;
    margin-bottom: 2px;
}
.ams-hero-greeting-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-text);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

/* ── Section header (iOS-style uppercase label) ──────────────────────────── */
.ams-section-header {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 24px 0 10px 0;
}
.ams-section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin: 24px 0 10px 0;
}
.ams-section-header-row .ams-section-header { margin: 0; }
.ams-section-link {
    font-size: 0.85rem;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
}
.ams-section-link:hover { text-decoration: underline; }

/* ── Stats grid (Apple Fitness workout summary) ──────────────────────────── */
.ams-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
.ams-stat-card {
    background: var(--color-bg);
    border-radius: 12px;
    padding: 14px 14px 12px;
    min-height: 78px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.ams-stat-label {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1.2;
    margin-bottom: 6px;
    /* Clamp a 2 líneas — evita empujar */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ams-stat-value-row {
    display: flex;
    align-items: baseline;
    gap: 4px;
    min-width: 0;
}
.ams-stat-value {
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--color-text);
    letter-spacing: -0.01em;
    line-height: 1.1;
    /* Si la cifra es larga (ej 11.234,5), no rompa el layout */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ams-stat-unit {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--color-text-muted);
    flex-shrink: 0;
}

/* ── Last session card (hero card con stats embebidas) ───────────────────── */
.ams-last-session-card {
    display: block;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: 16px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.08s ease;
}
.ams-last-session-card:active {
    transform: scale(0.995);
    background: #FAFAFA;
}
.ams-last-session-card:hover { text-decoration: none; color: inherit; }
.ams-last-session-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    align-items: baseline;
}
.ams-last-session-date {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text);
    text-transform: capitalize;
}
.ams-last-session-meta .sep { opacity: 0.5; }

/* ── Inset grouped list (iOS-style table) ────────────────────────────────── */
.ams-inset-list {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    overflow: hidden;
}
.ams-inset-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    min-height: 56px;
    border-bottom: 1px solid var(--color-border);
    text-decoration: none;
    color: inherit;
    transition: background 0.1s ease;
}
.ams-inset-row:last-child { border-bottom: none; }
.ams-inset-row:hover { text-decoration: none; color: inherit; background: var(--color-bg); }
.ams-inset-row:active { background: var(--color-bg); }
.ams-inset-row > .bi:first-child {
    font-size: 1.05rem;
    color: var(--color-primary);
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}
.ams-inset-row-body {
    flex: 1;
    min-width: 0;
}
.ams-inset-row-title {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text);
    text-transform: capitalize;
}
.ams-inset-row-sub {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    margin-top: 2px;
}
.ams-inset-row-badge {
    font-size: 0.72rem;
    color: var(--color-success);
    font-weight: 500;
    flex-shrink: 0;
}
.ams-inset-chevron {
    color: var(--color-text-muted);
    opacity: 0.5;
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* ── Session detail hero (fecha grande + meta chicas) ────────────────────── */
.ams-session-hero {
    margin: 4px 0 18px 0;
}
.ams-session-hero-date {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-text);
    text-transform: capitalize;
    letter-spacing: -0.01em;
    line-height: 1.2;
    margin-bottom: 4px;
}
.ams-session-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}
.ams-session-hero-meta .sep { opacity: 0.5; }
.ams-session-hero-obj {
    margin-top: 8px;
    font-size: 0.82rem;
    color: var(--color-primary);
    font-weight: 500;
}

/* ── Player status card (foto + estado + minutos en Detail) ──────────────── */
.ams-player-status-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 4px;
}
.ams-player-avatar {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-border);
    flex-shrink: 0;
}
.ams-player-avatar-placeholder {
    background: var(--color-bg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-size: 1.6rem;
}
.ams-player-status-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ams-player-status-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}
.ams-player-status-minutes {
    text-align: center;
    padding: 4px 10px;
    background: var(--color-bg);
    border-radius: 10px;
    min-width: 58px;
    flex-shrink: 0;
}
.ams-player-status-minutes .value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1;
}
.ams-player-status-minutes .label {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 2px;
}

/* ── Info card genérica (notas, texto) ──────────────────────────────────── */
.ams-info-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 14px;
    font-size: 0.9rem;
    color: var(--color-text);
    line-height: 1.5;
}

/* ── Player home / session container — más padding lateral ───────────────── */
.ams-player-home, .ams-player-session {
    padding: 0;
}

/* ═══ Responsive fine-tuning ═══════════════════════════════════════════════ */
@media (max-width: 420px) {
    .ams-stat-value { font-size: 1.4rem; }
    .ams-stat-card { min-height: 72px; padding: 12px; }
    .ams-hero-greeting-name { font-size: 1.55rem; }
    .ams-session-hero-date { font-size: 1.25rem; }
    .ams-last-session-date { font-size: 0.92rem; }
}

/* ── Feedback season picker: 320px desktop, full-width mobile ────────────── */
.ams-feedback-season-picker { max-width: 320px; }
@media (max-width: 768px) {
    .ams-feedback-season-picker { max-width: 100%; }
}

/* ── Eval cards (Nutrición / Kinesiología) ───────────────────────────────── */
.ams-eval-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ams-eval-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
}
.ams-eval-card-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
}
.ams-eval-card-icon--nutri {
    background: rgba(16, 185, 129, 0.12);
    color: var(--color-success);
}
.ams-eval-card-icon--kine {
    background: rgba(59, 130, 246, 0.12);
    color: var(--color-primary);
}
.ams-eval-card-area {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.2;
}
.ams-eval-card-meta {
    font-size: 0.9rem;
    color: var(--color-text);
    font-weight: 500;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ams-eval-card-meta .sep {
    color: var(--color-text-muted);
    opacity: 0.6;
    margin: 0 3px;
    font-weight: 400;
}
.ams-eval-values {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: var(--color-bg);
    border-radius: 10px;
    padding: 4px 12px;
}
.ams-eval-value-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 9px 0;
    border-bottom: 1px solid var(--color-border);
    gap: 12px;
    min-width: 0;
}
.ams-eval-value-row:last-child { border-bottom: none; }
.ams-eval-value-row .label {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}
.ams-eval-value-row .value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text);
    flex-shrink: 0;
}
.ams-eval-value-row .unit {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--color-text-muted);
    margin-left: 3px;
}
.ams-eval-notes {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    font-style: italic;
    line-height: 1.4;
    padding-top: 2px;
    border-top: 1px solid var(--color-border);
    padding-top: 10px;
}
