/* ═══════════════════════════════════════════════════════
   CLUB MANAGER — Bootstrap puro + paleta pastel
   Sólo se definen variables de color y override mínimos.
   ═══════════════════════════════════════════════════════

   Paleta:
     Primario (botones, links):  #5f8fc4   (azul pastel oscuro)
     Acento2  (CTA, naranja):    #e8956a   (naranja suave)
     Éxito:                      Bootstrap green
     Peligro:                    Bootstrap red
     Fondo general:              #f8fafc
     Header/navbar:              #ffffff
*/

:root {
    --cm-accent:  #5f8fc4;
    --cm-accent2: #e8956a;
    --cm-bg:      #f8fafc;
    --cm-text:    #334155;
    --cm-muted:   #6c757d;
    --cm-border:  #e8edf2;
    --cm-radius:  12px;

    /* Sobreescribir colores Bootstrap via custom properties */
    --bs-primary:            #5f8fc4;
    --bs-primary-rgb:        95,143,196;
    --bs-link-color:         #5f8fc4;
    --bs-link-hover-color:   #4a77a8;
    --bs-body-bg:            #f8fafc;
}

/* ── Espaciado consistente del contenido del plugin ─────── */
/* El breadcrumb va pegado al título — sin margin propio */
.cm-breadcrumb + h1,
.cm-breadcrumb + h2,
.cm-breadcrumb + .cm-ins-page-title,
.cm-breadcrumb + .entry-title {
    margin-top: .1rem;
}

/* ── Empty state ────────────────────────────────────────── */
.cm-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    border: 1px solid var(--cm-border);
    border-radius: var(--cm-radius);
    background: #fff;
    text-align: center;
    gap: .5rem;
}
.cm-empty-state-icon {
    font-size: 3rem;
    color: #e2e8f0;
    margin-bottom: .25rem;
}
.cm-empty-state-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #334155;
    margin: 0;
}
.cm-empty-state-desc {
    font-size: .82rem;
    color: #94a3b8;
    margin: 0 0 .5rem;
}


/* ── Botones primarios ────────────────────────────────── */
.btn-primary {
    background-color: var(--cm-accent) !important;
    border-color:     var(--cm-accent) !important;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: #4a77a8 !important;
    border-color:     #4a77a8 !important;
}
.btn-outline-primary {
    color:        var(--cm-accent) !important;
    border-color: var(--cm-accent) !important;
}
.btn-outline-primary:hover {
    background-color: var(--cm-accent) !important;
    color: #fff !important;
}

/* ── Formulario — bordes focus en azul pastel ─────────── */
.form-control:focus,
.form-select:focus {
    border-color: var(--cm-accent);
    box-shadow: 0 0 0 .2rem rgba(95,143,196,.25);
}
.form-check-input:checked {
    background-color: var(--cm-accent);
    border-color:     var(--cm-accent);
}

/* ── Card headers ────────────────────────────────────── */
/* Los card-header de Bootstrap quedan en blanco (#fff) */
.card-header {
    background-color: #fff !important;
    border-bottom: 1px solid #dee2e6 !important;
    color: var(--cm-text) !important;
}
/* Color del texto dentro del header */
.card-header h5,
.card-header .fw-bold,
.card-header strong { color: var(--cm-text) !important; }
.card-header small,
.card-header .small,
.card-header p,
.card-header .text-white { color: var(--cm-muted) !important; }
.card-header .bi-chevron-down { color: var(--cm-muted) !important; }

/* ── Categorías (formulario selección) ──────────────── */
.cm-cat-item.selected {
    border-color: var(--cm-accent) !important;
    background-color: rgba(95,143,196,.08) !important;
}
.cm-cat-item:hover:not([style*="not-allowed"]) {
    border-color: var(--cm-accent) !important;
    background-color: rgba(95,143,196,.04) !important;
}

/* ── Bienvenida (logged-in bar) ─────────────────────── */
.cm-welcome-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 420px;
    margin: auto;
}

/* ── Inscripciones: borde izquierdo de estado ────────── */
/* Usa las clases alert de Bootstrap con borde izquierdo */
.cm-ins-row {
    border-left-width: 4px !important;
    border-left-style: solid !important;
    border-radius: .375rem;
    padding: .5rem .75rem;
    margin-bottom: .5rem;
    background: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.cm-ins-aprobada  { border-left-color: #198754 !important; }
.cm-ins-revision  { border-left-color: var(--cm-accent2) !important; }
.cm-ins-pendiente { border-left-color: #ffc107 !important; }
.cm-ins-rechazada { border-left-color: #dc3545 !important; }
.cm-ins-espera    { border-left-color: #6c757d !important; }

/* ── Exportar/importar ──────────────────────────────── */
.cm-export-box {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: .5rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

/* ── Panel admin cards ───────────────────────────────── */
.cm-panel-card {
    display: block;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: .5rem;
    padding: 1.5rem 1rem;
    text-align: center;
    color: var(--cm-text) !important;
    text-decoration: none !important;
    transition: box-shadow .15s, transform .1s;
}
.cm-panel-card:hover {
    box-shadow: 0 .25rem 1rem rgba(95,143,196,.2);
    transform: translateY(-2px);
}
.cm-panel-card .bi {
    font-size: 2rem;
    color: var(--cm-accent);
}
.cm-panel-card .cm-panel-label {
    font-weight: 700;
    font-size: .875rem;
    margin-top: .5rem;
    display: block;
}

/* ── Alerts con ícono: centrado via inline style en cada alert ── */
/* El helper cm_alert() aplica display:flex; align-items:center directamente */

/* ── Alerts estilo borde izquierdo 5px ───────────────────────────────────────
   Fondo muy claro, borde izquierdo grueso con el color del estado.
   Se aplica a cualquier .alert que tenga la clase .cm-alert
   ──────────────────────────────────────────────────────────────────────────── */
.cm-alert {
    border: 1px solid transparent;
    border-left-width: 5px !important;
    border-radius: .375rem;
    padding: .85rem 1rem;
    background-color: #fff;
    display: flex !important;
    align-items: center !important;
    gap: 1rem;
}
.cm-alert .cm-alert-icon {
    font-size: 1.5rem;
    line-height: 1;
    flex-shrink: 0;
}
.cm-alert .cm-alert-body {
    flex: 1;
    line-height: 1.4;
}
.cm-alert .cm-alert-action {
    flex-shrink: 0;
    white-space: nowrap;
}

/* Variantes */
.cm-alert-success {
    background-color: #f0fdf4 !important;
    border-color: #16a34a !important;
    color: #166534;
}
.cm-alert-success a { color: #166534; font-weight: 600; }
.cm-alert-success .cm-alert-action .btn {
    color: #16a34a;
    border-color: #16a34a;
    background: transparent;
}
.cm-alert-success .cm-alert-action .btn:hover {
    background: #16a34a;
    color: #fff;
}

.cm-alert-warning {
    background-color: #fffbeb !important;
    border-color: #d97706 !important;
    color: #92400e;
}
.cm-alert-warning a { color: #92400e; font-weight: 600; }
.cm-alert-warning .cm-alert-action .btn {
    color: #d97706;
    border-color: #d97706;
    background: transparent;
}
.cm-alert-warning .cm-alert-action .btn:hover {
    background: #d97706;
    color: #fff;
}

.cm-alert-danger {
    background-color: #fef2f2 !important;
    border-color: #dc2626 !important;
    color: #991b1b;
}
.cm-alert-danger a { color: #991b1b; font-weight: 600; }
.cm-alert-danger .cm-alert-action .btn {
    color: #dc2626;
    border-color: #dc2626;
    background: transparent;
}
.cm-alert-danger .cm-alert-action .btn:hover {
    background: #dc2626;
    color: #fff;
}

.cm-alert-info {
    background-color: #eff6ff !important;
    border-color: #2563eb !important;
    color: #1e40af;
}
.cm-alert-info a { color: #1e40af; font-weight: 600; }
.cm-alert-info .cm-alert-action .btn {
    color: #2563eb;
    border-color: #2563eb;
    background: transparent;
}
.cm-alert-info .cm-alert-action .btn:hover {
    background: #2563eb;
    color: #fff;
}

.cm-alert-secondary {
    background-color: #f8fafc !important;
    border-color: #64748b !important;
    color: #334155;
}
.cm-alert-secondary a { color: #334155; font-weight: 600; }
.cm-alert-secondary .cm-alert-action .btn {
    color: #64748b;
    border-color: #64748b;
    background: transparent;
}
.cm-alert-secondary .cm-alert-action .btn:hover {
    background: #64748b;
    color: #fff;
}

/* ── Spinner dentro de cm-alert hereda color del borde ── */
.cm-alert-warning .spinner-border { color: #d97706; }
.cm-alert-danger  .spinner-border { color: #dc2626; }
.cm-alert-info    .spinner-border { color: #2563eb; }
.cm-alert-success .spinner-border { color: #16a34a; }

/* ══════════════════════════════════════════
   MIS INSCRIPCIONES — Torneo card accordion
   ══════════════════════════════════════════ */

.cm-torneo-card {
    background: #fff;
    border: 1px solid #e8edf2;
    border-radius: 12px;
    margin-bottom: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
    transition: box-shadow .15s;
}
.cm-torneo-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.cm-torneo-pasado { opacity: .72; }

/* Header */
.cm-torneo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.1rem;
    cursor: pointer;
    user-select: none;
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
    gap: 8px;
    transition: background .12s;
}
.cm-torneo-header:hover { background: #fafbfc; }
.cm-torneo-pasado .cm-torneo-header { background: #f8fafc; }
.cm-torneo-header-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.cm-torneo-nombre {
    font-weight: 700;
    font-size: .95rem;
    color: #1e293b;
    line-height: 1.2;
}
.cm-torneo-pasado .cm-torneo-nombre { color: #64748b; }
.cm-torneo-club {
    font-size: .75rem;
    color: #94a3b8;
}
.cm-badge {
    display: inline-block;
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .06em;
    padding: 2px 7px;
    border-radius: 20px;
    text-transform: uppercase;
}
.cm-badge-gris { background: #f1f5f9; color: #64748b; }
.cm-chevron {
    font-size: .85rem;
    color: #cbd5e1;
    transition: transform .2s ease;
    flex-shrink: 0;
}
.cm-torneo-header[aria-expanded="true"] .cm-chevron { transform: rotate(180deg); }

/* Lista unificada */
.cm-ins-list {
    list-style: none;
    margin: 0;
    padding: .65rem .85rem .4rem;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Fila base */
.cm-ins-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #f1f5f9;
    border-left: 3px solid #e2e8f0;
    border-radius: 8px;
    padding: .6rem .85rem;
    background: #fafbfc;
    gap: 8px;
    transition: background .1s;
}
.cm-ins-row:hover { background: #f8fafc; }
.cm-ins-row--disabled { opacity: .4; pointer-events: none; }

/* Filas de acción (gastronomia / lbf) */
.cm-ins-row--action {
    padding: 0;
    border: 1px solid #f1f5f9;
    border-left: 3px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    background: #fafbfc;
}
.cm-ins-row--action > div,
.cm-ins-row--action > * { width: 100%; }

/* Info inscripción */
.cm-ins-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.25;
}
.cm-ins-cat {
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #334155;
}
.cm-chip {
    display: inline-block;
    font-size: .63rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    letter-spacing: .04em;
    text-transform: uppercase;
    width: fit-content;
}
.cm-ins-sub { font-size: .72rem; margin-top: 1px; }
.cm-ins-icon {
    font-size: 1.05rem;
    flex-shrink: 0;
    line-height: 1;
}
.cm-ins-icon a { text-decoration: none; }

/* Agregar categoría */
.cm-agregar-cat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 4px .85rem 5px;
    padding: .45rem .75rem;
    border: 1px dashed #e2e8f0;
    border-radius: 8px;
    background: #fafbfc;
}
.cm-agregar-cat .btn { font-size: .75rem; padding: .25rem .65rem; }

/* Subir comprobante */
.cm-subir-comp { padding: .6rem .85rem .85rem; }

/* ── Breadcrumb — minimalista, sin fondo, va encima del título ──────────────── */
.cm-breadcrumb {
    margin-bottom: .35rem;
    display: block;
}
.cm-breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: .72rem;
    color: #94a3b8;
}
.cm-breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 0;
}
.cm-breadcrumb-item a {
    color: #94a3b8;
    text-decoration: none;
    font-weight: 500;
    transition: color .15s;
}
.cm-breadcrumb-item a:hover {
    color: var(--cm-accent);
}
.cm-breadcrumb-item.active span {
    color: #64748b;
    font-weight: 600;
}
.cm-breadcrumb-sep {
    font-size: .6rem;
    color: #cbd5e1;
    margin: 0 .3rem;
    display: flex;
    align-items: center;
}

/* ── Menú de navegación — colores unificados ────────────────────────────────── */
/* Activo: color acento, sin fondo llamativo */
.navbar .nav-link.active,
.navbar .nav-item.active > .nav-link,
.navbar .current-menu-item > a,
.navbar .current_page_item > a {
    color: var(--cm-accent) !important;
    font-weight: 600;
}
/* Hover consistente en todos los estados */
.navbar .nav-link:hover,
.navbar .nav-item:hover > .nav-link {
    color: var(--cm-accent) !important;
    opacity: 1;
}
/* Botón Administración en menú */
.menu-item-cm-admin .nav-link,
.menu-item-cm-admin a {
    color: var(--cm-accent2) !important;
    font-weight: 600;
}
.menu-item-cm-admin.active .nav-link,
.menu-item-cm-admin .nav-link.active,
.menu-item-cm-admin:hover .nav-link {
    color: #c97548 !important;
}
.menu-item-cm-admin .nav-link .bi,
.menu-item-cm-admin a .bi {
    font-size: .88em;
    opacity: .9;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DASHBOARD DE TORNEOS (.cm-dashboard)
   ═══════════════════════════════════════════════════════════════════════════ */

.cm-dashboard {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* ── Tarjeta de torneo ─────────────────────────────────────────────────────── */
.cm-dash-card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    overflow: hidden;
    transition: box-shadow .2s;
}
.cm-dash-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.09);
}
.cm-dash-card--finalizado { opacity: .72; }
.cm-dash-card--finalizado .cm-dash-header { background: #f8fafc; }

/* ── Header de tarjeta ─────────────────────────────────────────────────────── */
.cm-dash-header {
    padding: 1rem 1.25rem .75rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.cm-dash-header-left { flex: 1; min-width: 0; }
.cm-dash-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    margin: .3rem 0 .4rem;
    line-height: 1.25;
}
.cm-dash-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem .9rem;
    font-size: .75rem;
    color: #64748b;
}
.cm-dash-meta span { display: flex; align-items: center; gap: .25rem; }
.cm-dash-dias { color: var(--cm-accent); font-weight: 600; }

/* ── Estado badge ──────────────────────────────────────────────────────────── */
.cm-dash-estado {
    display: inline-flex;
    align-items: center;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    padding: 2px 9px;
    border-radius: 20px;
}
.cm-dash-estado--abierto  { background: #dcfce7; color: #15803d; }
.cm-dash-estado--cerrado  { background: #fee2e2; color: #b91c1c; }
.cm-dash-estado--pronto   { background: #e0f2fe; color: #0369a1; }
.cm-dash-estado--finalizado { background: #f1f5f9; color: #64748b; }

/* ── Alerta acción requerida ───────────────────────────────────────────────── */
.cm-dash-alerta {
    display: flex;
    align-items: center;
    gap: .4rem;
    background: #fef3c7;
    color: #92400e;
    font-size: .78rem;
    font-weight: 600;
    padding: .4rem .75rem;
    border-radius: 8px;
    white-space: nowrap;
    align-self: flex-start;
}

/* ── Métricas globales ─────────────────────────────────────────────────────── */
.cm-dash-metricas {
    display: flex;
    padding: .75rem 1.25rem;
    gap: 0;
    border-bottom: 1px solid #f1f5f9;
}
.cm-dash-metrica {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: .35rem .5rem;
    border-right: 1px solid #f1f5f9;
}
.cm-dash-metrica:last-child { border-right: none; }
.cm-dash-metrica-num {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1;
}
.cm-dash-metrica-label {
    font-size: .65rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #94a3b8;
    margin-top: 2px;
}
.cm-dash-metrica--verde  .cm-dash-metrica-num { color: #0D9488; }
.cm-dash-metrica--naranja .cm-dash-metrica-num { color: var(--cm-accent2); }
.cm-dash-metrica--amarillo .cm-dash-metrica-num { color: #d97706; }
.cm-dash-metrica--gris   .cm-dash-metrica-num { color: #94a3b8; }

/* ── Barra de progreso (reutilizada en dashboard y tabla) ──────────────────── */
.cm-dash-progreso {
    display: flex;
    height: 6px;
    border-radius: 4px;
    overflow: hidden;
    background: #f1f5f9;
}
.cm-dash-progreso-bar { height: 100%; transition: width .3s; }
.cm-dash-progreso-bar--verde   { background: #0D9488; }
.cm-dash-progreso-bar--naranja { background: var(--cm-accent2); }
.cm-dash-progreso-bar--amarillo{ background: #d97706; }
.cm-dash-progreso-bar--gris    { background: #e2e8f0; }

/* ── Categorías en dashboard ───────────────────────────────────────────────── */
.cm-dash-cats {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    padding: .75rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
}
.cm-dash-cat {
    flex: 1 1 160px;
    min-width: 130px;
    max-width: 260px;
    background: #f8fafc;
    border-radius: 10px;
    padding: .6rem .8rem;
    border: 1px solid #e2e8f0;
}
.cm-dash-cat-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 4px;
}
.cm-dash-cat-nombre { font-size: .8rem; font-weight: 700; color: #1e293b; }
.cm-dash-cat-cupos  { font-size: .7rem; color: #94a3b8; }
.cm-dash-cat-nums {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
    font-size: .68rem;
    font-weight: 600;
}
.cm-dash-cat-num--verde   { color: #0D9488; }
.cm-dash-cat-num--naranja { color: var(--cm-accent2); }
.cm-dash-cat-num--amarillo{ color: #d97706; }
.cm-dash-cat-num--gris    { color: #94a3b8; }

/* ── Botones de acción del dashboard ───────────────────────────────────────── */
.cm-dash-acciones {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    padding: .75rem 1.25rem;
}
.cm-dash-btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .45rem .9rem;
    border-radius: 8px;
    font-size: .8rem;
    font-weight: 600;
    text-decoration: none !important;
    transition: all .15s;
    white-space: nowrap;
    position: relative;
}
.cm-dash-btn--primary   { background: var(--cm-accent); color: #fff !important; }
.cm-dash-btn--primary:hover { filter: brightness(1.08); }
.cm-dash-btn--warning   { background: #fef3c7; color: #92400e !important; border: 1px solid #fde68a; }
.cm-dash-btn--warning:hover { background: #fde68a; }
.cm-dash-btn--secondary { background: #f1f5f9; color: #475569 !important; border: 1px solid #e2e8f0; }
.cm-dash-btn--secondary:hover { background: #e2e8f0; }
.cm-dash-btn--ghost     { background: transparent; color: #94a3b8 !important; border: 1px solid #e2e8f0; }
.cm-dash-btn--ghost:hover { color: #475569 !important; border-color: #cbd5e1; }
.cm-dash-btn-badge {
    background: #dc2626;
    color: #fff;
    font-size: .6rem;
    font-weight: 700;
    border-radius: 20px;
    padding: 1px 6px;
    min-width: 18px;
    text-align: center;
    line-height: 1.4;
}

/* ── Acciones globales (usuarios, exportar) ────────────────────────────────── */
.cm-dash-global {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    padding: .5rem 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LISTADO DE INSCRIPCIONES (.cm-ins-*)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Page header ───────────────────────────────────────────────────────────── */
.cm-ins-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
}
.cm-ins-page-header-left { display: flex; flex-direction: column; gap: .2rem; }
.cm-ins-back {
    font-size: .72rem;
    color: #94a3b8;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .2rem;
    margin-bottom: .15rem;
    transition: color .15s;
}
.cm-ins-back:hover { color: var(--cm-accent); }
.cm-ins-page-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: .4rem;
}
.cm-ins-page-title .bi { color: var(--cm-accent); }
.cm-ins-page-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

/* ── Grid de categorías ────────────────────────────────────────────────────── */
.cm-ins-cats-grid {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-bottom: 1rem;
}
.cm-ins-cat-card {
    flex: 1 1 150px;
    min-width: 130px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: .65rem .85rem;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
}
.cm-ins-cat-card:hover,
.cm-ins-cat-card.active {
    border-color: var(--cm-accent);
    box-shadow: 0 0 0 3px rgba(95,143,196,.15);
}
.cm-ins-cat-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 4px;
}
.cm-ins-cat-nombre { font-size: .82rem; font-weight: 700; color: #1e293b; }
.cm-ins-cat-cupos-total { font-size: .7rem; color: #94a3b8; font-weight: 600; }
.cm-ins-cat-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 5px;
}
.cm-ins-stat { font-size: .68rem; font-weight: 700; }
.cm-ins-stat--verde    { color: #0D9488; }
.cm-ins-stat--naranja  { color: var(--cm-accent2); }
.cm-ins-stat--amarillo { color: #d97706; }
.cm-ins-stat--gris     { color: #94a3b8; }
.cm-ins-cat-excel {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: .68rem;
    color: #94a3b8;
    text-decoration: none;
    margin-top: 5px;
}
.cm-ins-cat-excel:hover { color: #0D9488; }

/* ── Filtros ───────────────────────────────────────────────────────────────── */
.cm-ins-filtros {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1rem;
    align-items: center;
    margin-bottom: .75rem;
    padding: .65rem .85rem;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}
.cm-ins-filtros-cats,
.cm-ins-filtros-estados {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
}
.cm-ins-filtro-btn {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: .25rem .65rem;
    font-size: .75rem;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    transition: all .15s;
    line-height: 1.4;
}
.cm-ins-filtro-btn:hover { border-color: var(--cm-accent); color: var(--cm-accent); }
.cm-ins-filtro-btn.active {
    background: var(--cm-accent);
    border-color: var(--cm-accent);
    color: #fff;
}
.cm-ins-search-wrap {
    display: flex;
    align-items: center;
    gap: .4rem;
    flex: 1;
    min-width: 180px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: .3rem .7rem;
    color: #94a3b8;
}
.cm-ins-search {
    border: none;
    outline: none;
    font-size: .82rem;
    color: #1e293b;
    width: 100%;
    background: transparent;
}

/* ── Tabla ─────────────────────────────────────────────────────────────────── */
.cm-ins-tabla-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid #e2e8f0; }
.cm-ins-tabla {
    width: 100%;
    border-collapse: collapse;
    font-size: .82rem;
}
.cm-ins-tabla thead tr {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}
.cm-ins-tabla th {
    padding: .65rem .85rem;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #94a3b8;
    text-align: left;
    white-space: nowrap;
}
.cm-ins-th-acciones { text-align: center; }
.cm-ins-tabla td {
    padding: .6rem .85rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}
.cm-ins-tabla tr:last-child td { border-bottom: none; }
.cm-ins-tabla tbody tr:hover { background: #fafbfc; }

/* ── Celdas ────────────────────────────────────────────────────────────────── */
.cm-ins-club   { font-weight: 600; color: #1e293b; font-size: .85rem; line-height: 1.2; }
.cm-ins-persona { font-size: .75rem; color: #64748b; margin-top: 1px; }
.cm-ins-loc    { margin-left: .4rem; color: #94a3b8; }
.cm-ins-contacto { font-size: .7rem; color: #94a3b8; margin-top: 1px; display: flex; flex-wrap: wrap; gap: 0 .6rem; }

.cm-ins-cat-badge {
    background: #f1f5f9;
    color: #475569;
    font-size: .68rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: .04em;
    white-space: nowrap;
}

.cm-ins-estado {
    font-size: .7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
    display: inline-block;
    letter-spacing: .03em;
    text-transform: uppercase;
}
/* Mismos tokens que cm-chip en el frontend */
.cm-ins-estado--publish   { background: #f0fdf4; color: #15803d; }
.cm-ins-estado--pending   { background: #fff7ed; color: #c2410c; }
.cm-ins-estado--esperando { background: #fefce8; color: #a16207; }
.cm-ins-estado--rechazada { background: #fef2f2; color: #b91c1c; }

.cm-ins-comp-link { color: #475569; font-size: 1.1rem; text-decoration: none; }
.cm-ins-comp-link:hover { color: var(--cm-accent); }
.cm-ins-comp-none { color: #e2e8f0; }

.cm-ins-td-fecha { font-size: .75rem; color: #94a3b8; white-space: nowrap; }

/* ── Botones de acción inline ──────────────────────────────────────────────── */
.cm-ins-td-acciones { text-align: center; white-space: nowrap; }
.cm-ins-acciones { display: flex; justify-content: center; gap: .3rem; }
.cm-ins-accion {
    width: 30px; height: 30px;
    border: none; border-radius: 7px;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: .9rem;
    transition: all .15s;
}
.cm-ins-accion--aprobar  { background: #dcfce7; color: #15803d; }
.cm-ins-accion--aprobar:hover  { background: #15803d; color: #fff; }
.cm-ins-accion--rechazar { background: #fee2e2; color: #b91c1c; }
.cm-ins-accion--rechazar:hover { background: #b91c1c; color: #fff; }
.cm-ins-accion--espera   { background: #fef3c7; color: #a16207; }
.cm-ins-accion--espera:hover   { background: #a16207; color: #fff; }
.cm-ins-accion--revertir { background: #f1f5f9; color: #64748b; }
.cm-ins-accion--revertir:hover { background: #64748b; color: #fff; }

/* Flash de confirmación al cambiar estado */
@keyframes cm-row-flash { 0%,100%{background:transparent} 30%{background:#dcfce7} }
.cm-ins-row--updated { animation: cm-row-flash .9s ease; }

/* ═══════════════════════════════════════════════════════════════════════════
   ARCHIVADO Y HISTORIAL
   ═══════════════════════════════════════════════════════════════════════════ */

/* Botón archivar en dashboard */
.cm-dash-btn--archivo {
    background: #fef2f2;
    color: #991b1b !important;
    border: 1px solid #fecaca;
    cursor: pointer;
    font-family: inherit;
}
.cm-dash-btn--archivo:hover { background: #fee2e2; border-color: #fca5a5; }

/* Modal overlay */
.cm-archivo-modal-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(15,23,42,.6);
    display: flex; align-items: center; justify-content: center;
    padding: 1rem;
}
.cm-archivo-modal {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    max-width: 480px; width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.cm-archivo-modal-icon {
    font-size: 2.5rem;
    color: #dc2626;
    margin-bottom: .75rem;
}
.cm-archivo-modal h3 {
    font-size: 1.15rem; font-weight: 700; color: #1e293b; margin: 0 0 .5rem;
}
.cm-archivo-modal p { font-size: .9rem; color: #475569; margin: 0 0 .75rem; }
.cm-archivo-modal-warning {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    padding: .75rem 1rem;
    font-size: .82rem;
    color: #92400e;
    margin-bottom: 1rem;
    display: flex; gap: .5rem; align-items: flex-start;
}
.cm-archivo-confirm-input {
    width: 100%; border: 2px solid #e2e8f0; border-radius: 8px;
    padding: .5rem .85rem; font-size: .9rem; margin-bottom: 1rem;
    outline: none;
}
.cm-archivo-confirm-input:focus { border-color: #dc2626; }
.cm-archivo-modal-btns { display: flex; gap: .5rem; justify-content: flex-end; }
.cm-dash-btn--archivo-confirm {
    background: #dc2626; color: #fff !important; border: none; cursor: pointer;
    font-family: inherit;
}
.cm-dash-btn--archivo-confirm:hover:not(:disabled) { background: #b91c1c; }
.cm-dash-btn--archivo-confirm:disabled { opacity: .4; cursor: not-allowed; }

/* Historial en mis-inscripciones */
.cm-historial-section { margin-top: 2rem; }
.cm-historial-header {
    display: flex; align-items: center; gap: .5rem;
    font-size: .72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .08em; color: #94a3b8;
    margin-bottom: .75rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid #f1f5f9;
}
.cm-historial-extras {
    padding: .6rem 1rem .8rem;
    display: flex; flex-direction: column; gap: .35rem;
    border-top: 1px solid #f8fafc;
}
.cm-historial-extra {
    display: flex; align-items: flex-start; gap: .4rem;
    font-size: .78rem; color: #64748b;
}
.cm-historial-gastro-detalle {
    font-size: .72rem; color: #94a3b8; margin-top: 2px; margin-left: 1.2rem;
}

/* Detalle gastronomía en historial */
.cm-historial-extra--gastro { align-items: flex-start; }
.cm-historial-gastro-detalle {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    margin-top: 3px;
}
.cm-historial-gastro-item {
    font-size: .73rem;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    padding: 2px 7px;
    white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════════════════
   WIZARD DE INSCRIPCIÓN (.cm-wiz-*)
   Shell unificada para los 3 pasos: categorías → acceso → confirmar
   ═══════════════════════════════════════════════════════════════════════════ */

.cm-wiz-shell {
    max-width: 520px;
    margin: 0 auto;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 4px 32px rgba(15,23,42,.10), 0 1px 4px rgba(15,23,42,.06);
    overflow: hidden;
    font-family: inherit;
}
.cm-wiz-shell--empty {
    padding: 3rem 2rem;
    text-align: center;
    background: #f8fafc;
    border: 2px dashed #e2e8f0;
    box-shadow: none;
}
.cm-wiz-empty-icon { font-size: 2.5rem; color: #cbd5e1; margin-bottom: .75rem; }
.cm-wiz-empty-msg  { color: #94a3b8; margin-bottom: 1.25rem; }

/* ── Header del torneo ─────────────────────────────────────────────────────── */
.cm-wiz-header {
    background: linear-gradient(135deg, var(--cm-accent) 0%, #3b6fa0 100%);
    padding: 1.5rem 1.5rem 1.25rem;
    color: #fff;
    position: relative;
}
.cm-wiz-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .5rem;
}
.cm-wiz-label {
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    opacity: .75;
}
.cm-wiz-trophy {
    font-size: 1.1rem;
    opacity: .5;
}
.cm-wiz-torneo-nombre {
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: .5rem;
    letter-spacing: -.01em;
}
.cm-wiz-header-bottom {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}
.cm-wiz-cats-pill {
    display: inline-flex;
    align-items: center;
    background: rgba(255,255,255,.15);
    backdrop-filter: blur(4px);
    border-radius: 20px;
    padding: .2rem .75rem;
    font-size: .72rem;
    font-weight: 600;
    color: rgba(255,255,255,.9);
}
/* Botón "Ver más" en el header */
.cm-wiz-desc-btn {
    display: inline-flex;
    align-items: center;
    background: rgba(255,255,255,.15);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 20px;
    padding: .2rem .75rem;
    font-size: .72rem;
    font-weight: 600;
    color: rgba(255,255,255,.9);
    cursor: pointer;
    transition: background .15s;
}
.cm-wiz-desc-btn:hover { background: rgba(255,255,255,.25); color: #fff; }
/* Modal descripción */
.cm-wiz-modal-header {
    background: linear-gradient(135deg, var(--cm-accent) 0%, #3b6fa0 100%);
    color: #fff;
    padding: 1.25rem 1.5rem .75rem;
    border-radius: .5rem .5rem 0 0;
}
.cm-wiz-modal-header .modal-title { color: #fff; font-size: 1rem; }
.cm-wiz-modal-body {
    padding: 1.25rem 1.5rem;
    font-size: .9rem;
    color: #334155;
    line-height: 1.65;
}

/* ── Barra de pasos ────────────────────────────────────────────────────────── */
.cm-wiz-steps {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    gap: 0;
}
.cm-wiz-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .25rem;
    flex-shrink: 0;
}
.cm-wiz-step span {
    font-size: .65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    white-space: nowrap;
}
.cm-wiz-step-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .78rem;
    font-weight: 700;
    transition: all .25s;
}
.cm-wiz-step--active .cm-wiz-step-dot {
    background: var(--cm-accent);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(95,143,196,.2);
}
.cm-wiz-step--active span { color: var(--cm-accent); }
.cm-wiz-step--done .cm-wiz-step-dot {
    background: #10b981;
    color: #fff;
}
.cm-wiz-step--done span { color: #10b981; }
.cm-wiz-step--pending .cm-wiz-step-dot {
    background: #e2e8f0;
    color: #94a3b8;
}
.cm-wiz-step--pending span { color: #94a3b8; }
.cm-wiz-step-line {
    flex: 1;
    height: 2px;
    background: #e2e8f0;
    margin: 0 .4rem;
    margin-bottom: .9rem; /* align with dots */
    border-radius: 2px;
    transition: background .25s;
}
.cm-wiz-step-line--done { background: #10b981; }

/* ── Cuerpo ────────────────────────────────────────────────────────────────── */
.cm-wiz-body {
    padding: 1.5rem;
}
.cm-wiz-step-title {
    font-size: .95rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: .25rem;
}
.cm-wiz-step-subtitle {
    font-size: .82rem;
    color: #64748b;
    margin-bottom: 1.25rem;
}

/* ── Categorías (paso 1) ───────────────────────────────────────────────────── */
.cm-wiz-cats {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin-bottom: 1.25rem;
}
.cm-wiz-cat {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .85rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all .15s;
    background: #fff;
    position: relative;
}
.cm-wiz-cat:hover:not(.cm-wiz-cat--disabled) {
    border-color: var(--cm-accent);
    background: #f0f6ff;
}
.cm-wiz-cat--selected {
    border-color: var(--cm-accent) !important;
    background: #f0f6ff !important;
}
.cm-wiz-cat--disabled {
    opacity: .65;
    cursor: default;
    background: #f8fafc;
}
.cm-wiz-cat-cb { display: none; }

/* Checkbox visual a la izquierda */
.cm-wiz-cat-cb-box {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 2px solid #cbd5e1;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .72rem;
    color: transparent;
    flex-shrink: 0;
    transition: all .15s;
}
.cm-wiz-cat-cb-box--checked,
.cm-wiz-cat--selected .cm-wiz-cat-cb-box {
    background: var(--cm-accent);
    border-color: var(--cm-accent);
    color: #fff;
}
/* Estado vacío (sin cupo): checkbox vacío marcado como "bloqueado" */
.cm-wiz-cat--sincupo .cm-wiz-cat-cb-box {
    background: #f1f5f9;
    border-color: #e2e8f0;
}

.cm-wiz-cat-name {
    flex: 1;
    font-weight: 600;
    color: #1e293b;
    font-size: .9rem;
}
.cm-wiz-cat-cupo {
    font-size: .72rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: .25rem;
    white-space: nowrap;
}

/* Botón "Lista de espera" dentro de la tarjeta sin cupo */
.cm-wiz-espera-btn {
    display: inline-flex;
    align-items: center;
    padding: .3rem .65rem;
    background: #fff7ed;
    color: #92400e;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    font-size: .72rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: all .15s;
    flex-shrink: 0;
}
.cm-wiz-espera-btn:hover {
    background: #fed7aa;
    color: #78350f;
}

/* ── Acciones: fila volver + continuar ──────────────────────────────────────── */
.cm-wiz-actions {
    display: flex;
    gap: .75rem;
    align-items: center;
    margin-top: .5rem;
}
.cm-wiz-actions .cm-wiz-btn-secondary {
    flex-shrink: 0;
}
.cm-wiz-btn-primary--flex {
    flex: 1;
}
.cm-wiz-back-row {
    margin-top: 1rem;
    display: flex;
}

/* Bloque "sin cupo" eliminado (reemplazado por botón en tarjeta) */

/* ── Tarjeta usuario (paso 3) ──────────────────────────────────────────────── */
.cm-wiz-user-card {
    display: flex;
    align-items: center;
    gap: .85rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: .85rem 1rem;
    margin-bottom: 1.25rem;
}
.cm-wiz-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--cm-accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 800;
    flex-shrink: 0;
}
.cm-wiz-user-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.cm-wiz-user-name  { font-weight: 700; font-size: .88rem; color: #1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-wiz-user-email { font-size: .72rem; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-wiz-user-logout {
    color: #94a3b8;
    text-decoration: none;
    font-size: .9rem;
    padding: .25rem;
    border-radius: 6px;
    transition: color .15s;
    flex-shrink: 0;
}
.cm-wiz-user-logout:hover { color: #475569; }

/* ── Formulario (paso 3) ───────────────────────────────────────────────────── */
.cm-wiz-form { display: flex; flex-direction: column; gap: 1rem; }
.cm-wiz-field { display: flex; flex-direction: column; gap: .35rem; }
.cm-wiz-field-label {
    font-size: .72rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.cm-wiz-field-input {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: .65rem .9rem;
    font-size: .95rem;
    color: #1e293b;
    background: #fff;
    outline: none;
    transition: border-color .15s;
    width: 100%;
    box-sizing: border-box;
}
.cm-wiz-field-input:focus { border-color: var(--cm-accent); }

/* ── Botones compartidos ───────────────────────────────────────────────────── */
.cm-wiz-btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: .85rem 1rem;
    background: var(--cm-accent);
    color: #fff;
    font-weight: 700;
    font-size: .9rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    text-decoration: none;
    transition: all .15s;
    letter-spacing: .02em;
    margin-top: .5rem;
}
.cm-wiz-btn-primary:hover { filter: brightness(1.08); color: #fff; }
.cm-wiz-btn-primary:disabled { opacity: .65; cursor: not-allowed; filter: none; }
.cm-wiz-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .85rem 1.25rem;
    background: #f1f5f9;
    color: #475569;
    font-weight: 600;
    font-size: .9rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    text-decoration: none;
    transition: all .15s;
    cursor: pointer;
    margin-top: .5rem;
}
.cm-wiz-btn-secondary:hover { background: #e2e8f0; color: #1e293b; }

/* ── v5: 2° equipo ─────────────────────────────────────────────────────────── */
.cm-segunda-badge {
    display: inline-block;
    background: #f59e0b;
    color: #fff;
    font-size: 0.7em;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
    letter-spacing: 0.02em;
}

.cm-wiz-cat--segunda {
    border-color: #f59e0b !important;
    background: #fffbf0 !important;
}

.cm-wiz-cat--segunda:hover,
.cm-wiz-cat--segunda.cm-wiz-cat--selected {
    background: #fef3c7 !important;
    border-color: #d97706 !important;
}
