/* ═══════════════════════════════════════════════════════════
   PITAZO — UI Components
   components.css  ·  reusable pieces used across all pages
   ═══════════════════════════════════════════════════════════ */


/* ────────────────────────────────────────────────────────────
   FORM WRAP  —  centers right-panel content at max 420px
   ──────────────────────────────────────────────────────────── */
.form-wrap { width: 100%; max-width: 500px; }


/* ────────────────────────────────────────────────────────────
   STEP WIZARD
   ──────────────────────────────────────────────────────────── */
.stepper {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 28px;
    flex-wrap: nowrap;
}
.step-item  { display: flex; align-items: center; gap: 5px; }
.step-arrow { color: var(--clr-border); font-size: 13px; flex-shrink: 0; }

.step-circle {
    width: 26px; height: 26px;
    border-radius: 50%;
    background: var(--clr-border);
    color: var(--clr-muted);
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background var(--t-base), color var(--t-base);
}
.step-circle.active { background: var(--accent);  color: white; }
.step-circle.done   { background: #16A34A;         color: white; }

.step-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--clr-faint);
    white-space: nowrap;
    transition: color var(--t-base);
}
.step-item.active .step-label { color: var(--clr-text); }
.step-item.done   .step-label { color: var(--clr-muted); }

.step-panel { display: block; }
.step-panel[hidden] { display: none; }

/* Back link & login link inside wizard */
.step-back, .login-link {
    display: block;
    text-align: center;
    font-size: 13px;
    color: var(--accent);
    text-decoration: none;
    margin-top: 12px;
    cursor: pointer;
    font-weight: 600;
}
.step-back:hover, .login-link a:hover { text-decoration: underline; }
.login-link { color: var(--clr-muted); font-weight: 400; }
.login-link a { color: var(--accent); font-weight: 600; text-decoration: none; }


/* ────────────────────────────────────────────────────────────
   PLAN CONFIGURATOR  (step 3)
   ──────────────────────────────────────────────────────────── */

/* Plan base box */
.plan-base {
    background: #EFF6FF;
    border: 1.5px solid #BFDBFE;
    border-radius: var(--r-lg);
    padding: 14px 16px;
    margin-bottom: 4px;
}
.plan-base-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.plan-base-title { font-size: 13px; font-weight: 700; color: #1D4ED8; }
.plan-base-check { font-size: 14px; margin-right: 4px; }
.plan-base-price {
    font-size: 20px;
    font-weight: 800;
    color: var(--clr-text);
}
.plan-base-price small { font-size: 12px; font-weight: 500; color: var(--clr-muted); }
.plan-base-detail { font-size: 12px; color: #3B82F6; font-weight: 500; }

/* Section titles inside plan */
.addon-section-title {
    font-size: 10px;
    font-weight: 700;
    color: var(--clr-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 14px 0 6px;
}

/* Addon row */
.addon-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--clr-border);
    gap: 12px;
}
.addon-info { flex: 1; }
.addon-info strong { display: block; font-size: 13px; color: var(--clr-text); font-weight: 600; }
.addon-info span   { font-size: 11px; color: var(--clr-muted); }

/* Counter +/- */
.counter {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.counter-btn {
    width: 28px; height: 28px;
    border-radius: var(--r-sm);
    border: 1.5px solid var(--clr-border);
    background: var(--clr-surface);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    transition: border-color var(--t-fast), background var(--t-fast);
    line-height: 1;
    font-family: var(--font);
}
.counter-btn:hover { border-color: var(--accent); background: #F0F7FF; }
.counter-val {
    width: 20px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--clr-text);
}

/* Toggle (pure CSS via checkbox) */
.toggle-wrap {
    display: flex !important;   /* override .form-group label { display:block } */
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
}
.toggle-cb { display: none; }
.toggle-visual {
    width: 42px; height: 23px;
    background: var(--clr-border);
    border-radius: 11.5px;
    position: relative;
    transition: background var(--t-base);
    flex-shrink: 0;
}
.toggle-visual::after {
    content: '';
    width: 17px; height: 17px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 3px; left: 3px;
    transition: left var(--t-base);
    box-shadow: var(--shadow-sm);
}
.toggle-cb:checked ~ .toggle-visual { background: var(--accent); }
.toggle-cb:checked ~ .toggle-visual::after { left: 22px; }
.toggle-cb:disabled ~ .toggle-visual { opacity: .45; cursor: wait; }

/* Plan total box */
.plan-total-box {
    background: var(--clr-subtle);
    border: 1px solid var(--clr-border);
    border-radius: var(--r-lg);
    padding: 16px;
    text-align: center;
    margin: 16px 0;
}
.plan-total-label { font-size: 10px; font-weight: 700; color: var(--clr-muted); text-transform: uppercase; letter-spacing: 1px; }
.plan-total-value { font-size: 28px; font-weight: 800; color: var(--clr-text); margin: 4px 0; }
.plan-total-sub   { font-size: 12px; color: #16A34A; font-weight: 600; }


/* ────────────────────────────────────────────────────────────
   PAYMENT STEP  (step 4)
   ──────────────────────────────────────────────────────────── */
.trial-info-box {
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    border-radius: var(--r-lg);
    padding: 14px 16px;
    margin-bottom: 16px;
}
.trial-info-title { font-size: 13px; font-weight: 700; color: #15803D; margin-bottom: 8px; }
.trial-info-box ul { padding-left: 16px; }
.trial-info-box li { font-size: 12px; color: #166534; line-height: 1.6; }

.plan-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--r-lg);
    padding: 14px 16px;
    margin-bottom: 16px;
    gap: 12px;
}
.plan-summary-label { font-size: 11px; color: var(--clr-muted); display: block; }
.plan-summary-name  { font-size: 14px; font-weight: 700; color: var(--clr-text); }
.plan-price-today   { font-size: 14px; font-weight: 700; color: #16A34A; text-align: right; }
.plan-price-after   { font-size: 12px; color: var(--clr-muted); text-align: right; }

.payment-note {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: var(--clr-subtle);
    border: 1px solid var(--clr-border);
    border-radius: var(--r-md);
    padding: 12px 14px;
    font-size: 12px;
    color: var(--clr-muted);
    line-height: 1.5;
    margin-bottom: 20px;
}

/* Green variant for "Empezar gratis" button */
.btn-success {
    background: #16A34A !important;
}
.btn-success:hover { background: #15803D !important; }


/* ────────────────────────────────────────────────────────────
   SIDEBAR — logo, tenant, nav, user, logout
   ──────────────────────────────────────────────────────────── */

/* Logo + nombre de cancha */
.sidebar-logo        { font-size: 22px; font-weight: 900; color: white; letter-spacing: -0.5px; line-height: 1; }
.sidebar-logo span   { color: #60B4FF; }
.sidebar-tenant      { font-size: 11px; color: rgba(255,255,255,0.48); margin-top: 5px;
                        white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Grupos de navegación */
.nav-group {
    font-size: 10px;
    font-weight: 700;
    color: rgba(255,255,255,0.28);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 14px 20px 4px;
    user-select: none;
}

/* Items de nav */
.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 20px;
    color: rgba(255,255,255,0.68);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: background var(--t-fast), color var(--t-fast);
}
.nav-item:hover  { background: rgba(255,255,255,0.09); color: white; }
.nav-item.active {
    background: rgba(255,255,255,0.16);
    color: white;
    font-weight: 600;
    border-right: 3px solid rgba(255,255,255,0.6);
}
.nav-icon { font-size: 15px; width: 20px; text-align: center; flex-shrink: 0; }

/* Selector de equipo activo (portal Manager) */
.mgr-team-switch  { padding: 0 20px 14px; }
.mgr-team-label   {
    display: block; font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1.5px; color: rgba(255,255,255,0.4); margin-bottom: 6px;
}
.mgr-team-select {
    width: 100%;
    background: rgba(255,255,255,0.08);
    border: 1.5px solid rgba(255,255,255,0.16);
    color: #fff;
    border-radius: var(--r-md);
    padding: 9px 30px 9px 12px;
    font-size: 13px;
    font-weight: 600;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='14' height='14'%3E%3Cpath fill='%23ffffff' fill-opacity='.6' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    transition: background-color var(--t-fast), border-color var(--t-fast);
}
.mgr-team-select:hover, .mgr-team-select:focus {
    background-color: rgba(255,255,255,0.14);
    border-color: rgba(255,255,255,0.3);
    outline: none;
}
.mgr-team-select option { color: var(--clr-text); }

.mgr-team-current {
    display: flex; align-items: center; gap: 8px;
    padding: 0 20px 14px;
}
.mgr-team-current img {
    width: 28px; height: 28px; border-radius: 50%; object-fit: cover;
    border: 1.5px solid rgba(255,255,255,0.2);
}
.mgr-team-current-icon {
    width: 28px; height: 28px; border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; flex-shrink: 0;
}
.mgr-team-current-name {
    font-size: 13px; font-weight: 700; color: #fff;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.nav-badge {
    margin-left: auto;
    background: #DC2626;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    animation: nav-badge-pulse 1.4s ease-in-out infinite;
}
@keyframes nav-badge-pulse { 0%,100% { opacity:1; } 50% { opacity:.5; } }

/* Avatar con iniciales */
.user-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    min-width: 0;
}
.user-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    color: white;
    font-size: 12px;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    letter-spacing: 0.5px;
    border: 1.5px solid rgba(255,255,255,0.25);
}
.user-details  { min-width: 0; }
.user-name     { font-size: 13px; font-weight: 600; color: white;
                  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role     { font-size: 10.5px; color: rgba(255,255,255,0.42); margin-top: 1px;
                  text-transform: uppercase; letter-spacing: 0.5px; }

/* ────────────────────────────────────────────────────────────
   MODAL DE LOGOUT
   ──────────────────────────────────────────────────────────── */
.logout-modal {
    position: fixed; inset: 0;
    background: rgba(15,23,42,0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity 0.2s ease;
}
.logout-modal.visible   { opacity: 1; pointer-events: all; }

.logout-card {
    background: var(--clr-surface);
    border-radius: 20px;
    padding: 36px 32px 28px;
    text-align: center;
    width: 320px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.22);
    transform: scale(0.94) translateY(8px);
    transition: transform 0.22s ease;
}
.logout-modal.visible .logout-card { transform: scale(1) translateY(0); }

.logout-icon  { font-size: 44px; margin-bottom: 14px; line-height: 1; }
.logout-title { font-size: 20px; font-weight: 800; color: var(--clr-text); margin-bottom: 8px; }
.logout-sub   { font-size: 14px; color: var(--clr-muted); line-height: 1.55; margin-bottom: 28px; }

.logout-actions { display: flex; gap: 10px; }
.btn-cancel-modal {
    flex: 1; padding: 12px 0;
    border: 1.5px solid var(--clr-border);
    border-radius: var(--r-md);
    background: white;
    color: var(--clr-text);
    font-size: 14px; font-weight: 600;
    cursor: pointer;
    font-family: var(--font);
    transition: background var(--t-fast);
}
.btn-cancel-modal:hover { background: var(--clr-subtle); }

.btn-confirm-logout {
    flex: 1; padding: 12px 0;
    border: none; border-radius: var(--r-md);
    background: #DC2626; color: white;
    font-size: 14px; font-weight: 700;
    cursor: pointer; width: 100%;
    font-family: var(--font);
    transition: background var(--t-fast);
}
.btn-confirm-logout:hover { background: #B91C1C; }


/* ────────────────────────────────────────────────────────────
   MODAL DE CONFIRMACIÓN GENÉRICO (pitazo.confirm)
   ──────────────────────────────────────────────────────────── */
.pcm-overlay {
    position: fixed; inset: 0;
    background: rgba(15,23,42,0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 2100;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity 0.2s ease;
}
.pcm-overlay.visible { opacity: 1; pointer-events: all; }

.pcm-card {
    background: var(--clr-surface);
    border-radius: 20px;
    padding: 36px 32px 28px;
    text-align: center;
    width: 340px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.22);
    transform: scale(0.94) translateY(8px);
    transition: transform 0.22s ease;
}
.pcm-overlay.visible .pcm-card { transform: scale(1) translateY(0); }

.pcm-icon  { font-size: 44px; margin-bottom: 14px; line-height: 1; }
.pcm-title { font-size: 18px; font-weight: 800; color: var(--clr-text); margin-bottom: 8px; }
.pcm-msg   { font-size: 14px; color: var(--clr-muted); line-height: 1.55; margin-bottom: 28px; }
.pcm-actions { display: flex; gap: 10px; }

.pcm-btn-danger {
    flex: 1; padding: 12px 0;
    border: none; border-radius: var(--r-md);
    background: #DC2626; color: white;
    font-size: 14px; font-weight: 700;
    cursor: pointer; font-family: var(--font);
    transition: background var(--t-fast);
}
.pcm-btn-danger:hover { background: #B91C1C; }

.pcm-btn-primary {
    flex: 1; padding: 12px 0;
    border: none; border-radius: var(--r-md);
    background: var(--accent); color: white;
    font-size: 14px; font-weight: 700;
    cursor: pointer; font-family: var(--font);
    transition: filter var(--t-fast);
}
.pcm-btn-primary:hover { filter: brightness(1.1); }


/* ────────────────────────────────────────────────────────────
   GATE — bloqueo de Estadísticas Avanzadas (blur + candado)
   ──────────────────────────────────────────────────────────── */
.gate-wrap { position: relative; }

.gate-blur {
    filter: blur(4px);
    pointer-events: none;
    user-select: none;
    border-radius: var(--r-md);
    overflow: hidden;
}

.gate-overlay {
    position: absolute; inset: 0; z-index: 2;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; gap: 6px; padding: 16px;
    background: rgba(255,255,255,.6);
    border-radius: var(--r-md);
    cursor: pointer;
}
.gate-lock { font-size: 26px; }
.gate-msg  { font-size: 13px; font-weight: 800; color: var(--clr-text); max-width: 240px; }
.gate-sub  { font-size: 11px; color: var(--clr-muted); max-width: 240px; }
.gate-cta {
    margin-top: 2px; padding: 7px 16px; border-radius: var(--r-sm); border: none;
    background: var(--accent); color: #fff; font-size: 12px; font-weight: 700;
    cursor: pointer; text-decoration: none; display: inline-block; font-family: var(--font);
    transition: filter var(--t-fast);
}
.gate-cta:hover { filter: brightness(1.1); }

/* ────────────────────────────────────────────────────────────
   MODAL DE VISTA PREVIA — Estadísticas Avanzadas (demo)
   ──────────────────────────────────────────────────────────── */
.pcm-card-wide { width: 480px; max-width: 92vw; text-align: left; }
.demo-stats-badge {
    display: inline-block; font-size: 11px; font-weight: 800; color: var(--accent);
    background: var(--clr-subtle); padding: 4px 10px; border-radius: 99px;
}
.demo-stats-close {
    background: none; border: none; font-size: 18px; cursor: pointer; color: var(--clr-muted);
}
.demo-stats-foot { margin-top: 16px; font-size: 11px; color: var(--clr-muted); text-align: center; }


/* ────────────────────────────────────────────────────────────
   TOPBAR CONTENT
   ──────────────────────────────────────────────────────────── */
.page-title    { font-size: 20px; font-weight: 800; color: var(--clr-text); }
.page-subtitle { font-size: 13px; color: var(--clr-muted); margin-top: 2px; }

.section-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--clr-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 14px;
}


/* ────────────────────────────────────────────────────────────
   BUTTONS
   ──────────────────────────────────────────────────────────── */

/* Primary — accent fill, used for main actions */
.btn-primary {
    display: block;
    width: 100%;
    max-width: 500px;
    padding: 14px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--r-md);
    font-size: 15px;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background var(--t-base);
    line-height: 1;
    margin-bottom: 24px;
}
.btn-primary:hover              { background: var(--accent-hover); }
.btn-primary:disabled           { opacity: 0.72; cursor: not-allowed; }
.btn-primary.btn-loading        { pointer-events: none; opacity: 0.80; }

/* Spinner inline dentro de botón */
.btn-spinner {
    display: inline-block;
    width: 15px;
    height: 15px;
    border: 2px solid rgba(255,255,255,0.30);
    border-top-color: white;
    border-radius: 50%;
    animation: btn-spin 0.65s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
    flex-shrink: 0;
}
@keyframes btn-spin {
    to { transform: rotate(360deg); }
}

/* Logout — ghost white, only used inside dark sidebar */
.btn-logout {
    width: 100%;
    padding: 8px 12px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: var(--r-md);
    color: rgba(255,255,255,0.80);
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    text-align: left;
    transition: background var(--t-fast), color var(--t-fast);
}
.btn-logout:hover { background: rgba(255,255,255,0.16); color: white; }


/* ────────────────────────────────────────────────────────────
   FORMS
   ──────────────────────────────────────────────────────────── */
.form-title { font-size: 28px; font-weight: 800; color: var(--clr-text); margin-bottom: 6px; }
.form-sub   { font-size: 14px; color: var(--clr-muted); margin-bottom: 32px; }

.form-group         { margin-bottom: 20px; }
.form-group label   {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--clr-text);
    margin-bottom: 7px;
}

.input-wrap { position: relative; }
.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    color: var(--clr-faint);
    pointer-events: none;
    line-height: 1;
}

input[type="email"],
input[type="password"],
input[type="text"],
input[type="search"],
input[type="number"],
input[type="url"],
input[type="date"],
input[type="time"]:not(.sched-apertura):not(.sched-cierre) {
    width: 100%;
    padding: 12px 14px;          /* sin ícono por defecto */
    border: 1.5px solid var(--clr-border);
    border-radius: var(--r-md);
    font-size: 14px;
    font-family: var(--font);
    color: var(--clr-text);
    background: var(--clr-surface);
    outline: none;
    transition: border-color var(--t-base);
}
/* Con ícono — solo cuando el input está dentro de .input-wrap */
.input-wrap input { padding-left: 42px; }

input:focus        { border-color: var(--accent); }
input::placeholder { color: var(--clr-faint); }

textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--clr-border);
    border-radius: var(--r-md);
    font-size: 14px;
    font-family: var(--font);
    color: var(--clr-text);
    background: var(--clr-surface);
    outline: none;
    transition: border-color var(--t-base);
    resize: vertical;
    line-height: 1.5;
}
textarea:focus        { border-color: var(--accent); }
textarea::placeholder { color: var(--clr-faint); }

/* Validation error state */
input.field-error, textarea.field-error, select.field-error {
    border-color: #DC2626 !important;
}

/* ── Phone wrap — código de país + número ─────────────────── */
.phone-wrap {
    display: flex;
    align-items: stretch;
    border: 1.5px solid var(--clr-border);
    border-radius: var(--r-md);
    overflow: hidden;
    background: var(--clr-surface);
    transition: border-color var(--t-base);
}
.phone-wrap:focus-within { border-color: var(--accent); }

.phone-code {
    flex-shrink: 0;
    border: none;
    border-right: 1.5px solid var(--clr-border);
    border-radius: 0;
    background: var(--clr-subtle);
    padding: 0 6px 0 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--clr-text);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    width: auto;
    min-width: 74px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2394A3B8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 22px;
    font-family: var(--font);
}
.phone-code:focus { background-color: #EEF2F7; }

.phone-wrap input[type="text"] {
    border: none !important;
    border-radius: 0 !important;
    padding: 12px 14px !important;
    flex: 1;
    min-width: 0;
    background: transparent;
    box-shadow: none !important;
}
.phone-wrap input[type="text"]:focus { border: none !important; }

/* Select */
select {
    width: 100%;
    padding: 12px 36px 12px 14px;
    border: 1.5px solid var(--clr-border);
    border-radius: var(--r-md);
    font-size: 14px;
    font-family: var(--font);
    color: var(--clr-text);
    background-color: var(--clr-surface);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='16' height='16'%3E%3Cpath fill='%2394A3B8' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    cursor: pointer;
    transition: border-color var(--t-base);
}
select:focus { border-color: var(--accent); }

/* Hint dentro del label */
.label-hint { font-weight: 400; color: var(--clr-faint); font-size: 12px; }

/* Dos campos en una misma fila */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}
.form-row > .form-group { margin-bottom: 0; }

.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}
.form-row-3 > .form-group { margin-bottom: 0; }

.form-row-4 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}
.form-row-4 > .form-group { margin-bottom: 0; }

/* Separador visual entre secciones del formulario */
.form-divider {
    font-size: 11px;
    font-weight: 700;
    color: var(--clr-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--clr-border);
    margin: 4px 0 20px;
}

/* Error message */
.error-msg {
    background: var(--clr-error-bg);
    color: var(--clr-error-text);
    border: 1px solid var(--clr-error-border);
    border-radius: var(--r-md);
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 20px;
    max-width: 500px;
}


/* ────────────────────────────────────────────────────────────
   TABS  (login / register switcher)
   ──────────────────────────────────────────────────────────── */
.tabs {
    display: flex;
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--r-lg);
    padding: 4px;
    margin-bottom: 36px;
    max-width: 500px;
}
.tab {
    flex: 1;
    padding: 10px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    border-radius: 9px;
    color: var(--clr-muted);
    text-decoration: none;
    transition: background var(--t-base), color var(--t-base);
}
.tab.active { background: #0F172A; color: white; }


/* ────────────────────────────────────────────────────────────
   CARDS
   ──────────────────────────────────────────────────────────── */
.card {
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--r-lg);
    padding: 24px;
}

/* Feature card — used in placeholder dashboards */
.feature-card {
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--r-lg);
    padding: 20px 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.fc-icon  { font-size: 26px; margin-bottom: 4px; }
.fc-title { font-size: 15px; font-weight: 700; color: var(--clr-text); }
.fc-desc  { font-size: 13px; color: var(--clr-muted); line-height: 1.55; flex: 1; }


/* ────────────────────────────────────────────────────────────
   TOPBAR ACTION BUTTONS  —  compact CTAs in the header bar
   ──────────────────────────────────────────────────────────── */
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--r-md);
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    transition: background var(--t-base);
}
.btn-action:hover { background: var(--accent-hover); }

.btn-action-ghost {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: transparent;
    color: var(--clr-text);
    border: 1.5px solid var(--clr-border);
    border-radius: var(--r-md);
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    transition: background var(--t-fast), border-color var(--t-fast);
}
.btn-action-ghost:hover { background: var(--clr-subtle); border-color: #94A3B8; }


/* ────────────────────────────────────────────────────────────
   PANEL CARD  —  list panels (partidos, actividad reciente)
   ──────────────────────────────────────────────────────────── */
.panel-card {
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--r-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--clr-border);
    flex-shrink: 0;
}
.panel-title { font-size: 14px; font-weight: 700; color: var(--clr-text); }
.panel-link  { font-size: 12px; color: var(--accent); text-decoration: none; font-weight: 600; }
.panel-link:hover { text-decoration: underline; }
.panel-body  { flex: 1; padding: 20px; }

.panel-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 44px 20px;
    gap: 10px;
    color: var(--clr-faint);
    font-size: 13px;
    text-align: center;
}
.panel-empty-icon { font-size: 30px; line-height: 1; opacity: 0.45; }

/* Match row (Próximos Partidos) */
.match-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--clr-border);
}
.match-row:last-child { border-bottom: none; }
.match-teams { flex: 1; font-size: 13px; font-weight: 600; color: var(--clr-text); }
.match-meta  { font-size: 11px; color: var(--clr-muted); white-space: nowrap; }

/* Activity row (Actividades Recientes) */
.activity-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--clr-border);
}
.activity-row:last-child { border-bottom: none; }
.activity-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
    margin-top: 5px;
}
.activity-content { flex: 1; min-width: 0; }
.activity-text { font-size: 13px; color: var(--clr-text); line-height: 1.45; }
.activity-time { font-size: 11px; color: var(--clr-faint); margin-top: 2px; }


/* ────────────────────────────────────────────────────────────
   DATA TABLE  —  tabular data with header and rows
   ──────────────────────────────────────────────────────────── */
.table-wrap {
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--r-lg);
    overflow: hidden;
    margin-bottom: 32px;
}
.table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--clr-border);
}
.table-title { font-size: 14px; font-weight: 700; color: var(--clr-text); }

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}
.data-table thead th {
    background: var(--clr-subtle);
    padding: 11px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    color: var(--clr-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    border-bottom: 1px solid var(--clr-border);
    white-space: nowrap;
}
.data-table tbody td {
    padding: 13px 16px;
    color: var(--clr-text);
    border-bottom: 1px solid var(--clr-border);
    vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td     { background: var(--clr-subtle); }
.data-table .td-muted              { color: var(--clr-muted); font-size: 13px; }

.table-empty td {
    text-align: center;
    color: var(--clr-faint);
    padding: 44px 16px !important;
    font-size: 13px;
}

/* Status badges inside tables and panels */
.badge-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--r-pill);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}
.badge-active   { background: #DCFCE7; color: #15803D; }
.badge-inactive { background: var(--clr-subtle); color: var(--clr-faint); }
.badge-draft    { background: #FEF9C3; color: #92400E; }


/* ────────────────────────────────────────────────────────────
   STAT CARD  —  quick metrics on dashboards
   ──────────────────────────────────────────────────────────── */
.stat-card {
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--r-lg);
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--accent);
    border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.sc-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--clr-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}
.sc-value {
    font-size: 30px;
    font-weight: 800;
    color: var(--clr-text);
    line-height: 1.1;
}
.sc-sub {
    font-size: 12px;
    color: var(--clr-faint);
    margin-top: 2px;
}
.sc-icon {
    position: absolute;
    top: 18px; right: 18px;
    font-size: 26px;
    opacity: 0.12;
}


/* ────────────────────────────────────────────────────────────
   BADGES
   ──────────────────────────────────────────────────────────── */
.badge-soon {
    align-self: flex-start;
    background: var(--clr-subtle);
    color: var(--clr-faint);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--r-pill);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 8px;
}


/* ────────────────────────────────────────────────────────────
   APP DOWNLOAD BANNER  (login page footer)
   ──────────────────────────────────────────────────────────── */
.divider {
    max-width: 500px;
    text-align: center;
    font-size: 12px;
    color: var(--clr-faint);
    margin-bottom: 16px;
}

.app-banner {
    max-width: 500px;
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--r-lg);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
}
.app-icon { font-size: 28px; flex-shrink: 0; }
.app-text strong { display: block; font-size: 13.5px; color: var(--clr-text); font-weight: 700; }
.app-text span   { font-size: 12px; color: var(--clr-muted); }

.store-badges { margin-left: auto; display: flex; flex-direction: column; gap: 4px; }
.store-badge  {
    background: #0F172A;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--r-sm);
    text-align: center;
    white-space: nowrap;
}


/* ────────────────────────────────────────────────────────────
   ADDON DETAIL PANEL  —  tooltip derecho en configurador
   ──────────────────────────────────────────────────────────── */
.addon-detail-panel {
    position: fixed;
    width: 230px;
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--r-lg);
    padding: 18px 20px;
    box-shadow: var(--shadow-md);
    z-index: 500;
    pointer-events: none;
    opacity: 0;
    transform: translateX(8px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}
.addon-detail-panel.visible {
    opacity: 1;
    transform: translateX(0);
}
.adp-icon  { font-size: 26px; margin-bottom: 10px; display: block; }
.adp-title { font-size: 13.5px; font-weight: 700; color: var(--clr-text); margin-bottom: 6px; }
.adp-desc  { font-size: 12px; color: var(--clr-muted); line-height: 1.6; margin-bottom: 12px; }
.adp-list  { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.adp-list li {
    font-size: 12px; color: var(--clr-text);
    display: flex; align-items: flex-start; gap: 7px;
}
.adp-list li::before {
    content: '✓'; color: #16A34A; font-weight: 800;
    font-size: 11px; flex-shrink: 0; margin-top: 1px;
}

/* ────────────────────────────────────────────────────────────
   CARD VISUAL  —  preview de tarjeta en paso 4
   ──────────────────────────────────────────────────────────── */
.card-visual {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 55%, #0f3460 100%);
    border-radius: 16px;
    padding: 20px 22px 18px;
    margin-bottom: 24px;
    color: white;
    position: relative;
    overflow: hidden;
    user-select: none;
}
.card-visual::before {
    content: '';
    position: absolute;
    top: -50px; right: -50px;
    width: 160px; height: 160px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
    pointer-events: none;
}
.card-visual-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}
.card-visual-chip {
    width: 36px; height: 27px;
    background: linear-gradient(135deg, #c8922a, #f0c96e);
    border-radius: 5px;
}
.card-brand-logo { font-size: 20px; font-weight: 900; letter-spacing: -0.5px; opacity: 0.9; }
.card-visual-number {
    font-family: 'Courier New', monospace;
    font-size: 17px;
    letter-spacing: 3px;
    margin-bottom: 16px;
    color: rgba(255,255,255,0.88);
}
.card-visual-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}
.card-visual-label { font-size: 9px; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,0.45); margin-bottom: 2px; }
.card-visual-value { font-size: 12.5px; font-weight: 600; color: white; letter-spacing: 0.5px; }

/* Inputs del formulario de pago */
.card-number-group input {
    font-family: 'Courier New', monospace;
    font-size: 15px;
    letter-spacing: 2px;
}
.card-security-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    border-radius: var(--r-md);
    padding: 12px 14px;
    font-size: 12px;
    color: #166534;
    line-height: 1.5;
    margin-bottom: 20px;
}
.card-security-note span:first-child { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.mp-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 11px;
    color: var(--clr-faint);
    margin-bottom: 20px;
}
.mp-badge strong { color: #009EE3; }

/* ────────────────────────────────────────────────────────────
   PLAN USAGE BAR  —  límite de canchas / recursos del plan
   ──────────────────────────────────────────────────────────── */
.plan-usage-bar {
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--r-lg);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.pub-info  { display: flex; flex-direction: column; gap: 1px; flex-shrink: 0; }
.pub-label { font-size: 11px; font-weight: 700; color: var(--clr-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.pub-count { font-size: 15px; font-weight: 800; color: var(--clr-text); }

.pub-track {
    flex: 1;
    max-width: 180px;
    height: 6px;
    background: var(--clr-border);
    border-radius: var(--r-pill);
    overflow: hidden;
}
.pub-fill {
    height: 100%;
    border-radius: var(--r-pill);
    background: var(--accent);
    transition: width 0.4s ease;
}
.pub-fill.pub-warn { background: #D97706; }
.pub-fill.pub-full { background: #DC2626; }

.pub-alert {
    font-size: 12px;
    color: #B45309;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}
.pub-alert.pub-alert-full { color: #DC2626; }


/* ────────────────────────────────────────────────────────────
   CANCHA CARD  —  tarjeta horizontal en lista de canchas
   ──────────────────────────────────────────────────────────── */
.canchas-list { display: flex; flex-direction: column; gap: 12px; }

.cancha-card {
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--r-lg);
    display: flex;
    overflow: hidden;
    transition: box-shadow var(--t-base);
}
.cancha-card:hover { box-shadow: var(--shadow-md); }

.cc-thumb {
    width: 120px;
    flex-shrink: 0;
    background: var(--clr-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    color: var(--clr-faint);
    overflow: hidden;
}
.cc-thumb img { width: 100%; height: 100%; object-fit: cover; }

.cc-body {
    flex: 1;
    padding: 14px 18px;
    min-width: 0;
}
.cc-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}
.cc-nombre { font-size: 15px; font-weight: 700; color: var(--clr-text); }
.cc-clave  {
    font-size: 11px;
    color: var(--clr-muted);
    background: var(--clr-subtle);
    border: 1px solid var(--clr-border);
    padding: 1px 8px;
    border-radius: var(--r-pill);
}
.cc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    font-size: 12px;
    color: var(--clr-muted);
    margin-bottom: 8px;
}
.cc-meta-item { display: flex; align-items: center; gap: 4px; }
.cc-horario   { font-size: 12px; color: var(--clr-faint); }

.cc-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 6px;
    padding: 12px 16px;
    border-left: 1px solid var(--clr-border);
    flex-shrink: 0;
    width: 152px;
}
/* Los <form> dentro de cc-actions deben tener el mismo ancho que el contenedor */
.cc-actions form { width: 100%; margin: 0; padding: 0; }

/* Small action buttons */
.btn-sm {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: var(--r-sm);
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background var(--t-fast), border-color var(--t-fast);
    border: 1.5px solid var(--clr-border);
    background: var(--clr-surface);
    color: var(--clr-text);
    width: 100%;
    box-sizing: border-box;
}
.btn-sm:hover { background: var(--clr-subtle); }
.btn-sm-accent { background: var(--accent); color: white; border-color: var(--accent); }
.btn-sm-accent:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-sm-danger { background: #FEE2E2; color: #DC2626; border-color: #FECACA; }
.btn-sm-danger:hover { background: #FECACA; }

/* Chips de filtro tipo-equipo (buscador de inscripción) */
.tipo-chip-d {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid var(--clr-border);
    background: var(--clr-surface);
    color: var(--clr-muted);
    transition: all var(--t-fast);
    font-family: var(--font);
}
.tipo-chip-d:hover { background: var(--clr-subtle); color: var(--clr-text); }
.active-chip-d { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Estado badge + mantenimiento */
.badge-mantenimiento { background: #FEF3C7; color: #92400E; }


/* ────────────────────────────────────────────────────────────
   SCHEDULE TABLE  —  horarios Lun-Dom en form de cancha
   ──────────────────────────────────────────────────────────── */
/* Two-column layout for step panels */
.step-cols-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.schedule-table {
    border: 1px solid var(--clr-border);
    border-radius: var(--r-lg);
    overflow: hidden;
    margin-bottom: 20px;
}
.schedule-row {
    display: flex;
    align-items: center;
    padding: 9px 14px;
    gap: 14px;
    border-bottom: 1px solid var(--clr-border);
    background: var(--clr-surface);
}
.schedule-row:last-child { border-bottom: none; }
.schedule-row.weekend    { background: var(--clr-subtle); }
.schedule-row.closed .schedule-times { opacity: 0.30; pointer-events: none; }

.schedule-day {
    width: 52px;
    font-size: 13px;
    font-weight: 600;
    color: var(--clr-text);
    flex-shrink: 0;
}
.schedule-times {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    transition: opacity var(--t-base);
}
.schedule-times input[type="time"] {
    width: 100px;
    padding: 6px 10px;
    font-size: 13px;
    font-family: var(--font);
    border: 1.5px solid var(--clr-border);
    border-radius: var(--r-sm);
    background: var(--clr-surface);
    color: var(--clr-text);
    outline: none;
}
.schedule-times input[type="time"]:focus { border-color: var(--accent); }
.schedule-times .sched-sep { font-size: 13px; color: var(--clr-muted); }

.btn-copy-sched {
    font-size: 11px;
    color: var(--accent);
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-family: var(--font);
    padding: 0;
    white-space: nowrap;
    flex-shrink: 0;
}
.btn-copy-sched:hover { text-decoration: underline; }


/* ────────────────────────────────────────────────────────────
   AMENITY GRID  —  servicios e instalaciones (toggles 2 cols)
   ──────────────────────────────────────────────────────────── */
.amenity-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 24px;
    margin-bottom: 20px;
}
.amenity-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--clr-border);
    gap: 12px;
}
.amenity-item:last-child,
.amenity-item:nth-last-child(2):nth-child(odd) { border-bottom: none; }
.amenity-label { font-size: 13px; color: var(--clr-text); font-weight: 500; }
.amenity-sub   { font-size: 11px; color: var(--clr-muted); display: block; margin-top: 1px; }


/* ────────────────────────────────────────────────────────────
   WEEKLY CALENDAR  —  partidos por cancha
   ──────────────────────────────────────────────────────────── */
.cal-wrap {
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--r-lg);
    overflow: hidden;
    margin-bottom: 32px;
}

.cal-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--clr-border);
    gap: 12px;
}
.cal-toolbar-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cal-toolbar-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.cal-title { font-size: 14px; font-weight: 700; color: var(--clr-text); }
.cal-range { font-size: 13px; color: var(--clr-muted); font-weight: 500; }

.cal-nav-btn {
    width: 30px; height: 30px;
    border: 1.5px solid var(--clr-border);
    border-radius: var(--r-sm);
    background: var(--clr-surface);
    color: var(--clr-text);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font);
    transition: background var(--t-fast), border-color var(--t-fast);
}
.cal-nav-btn:hover:not(:disabled) { background: var(--clr-subtle); border-color: #94A3B8; }
.cal-nav-btn:disabled { opacity: 0.30; cursor: not-allowed; }

.btn-cal-today {
    padding: 5px 12px;
    border: 1.5px solid var(--clr-border);
    border-radius: var(--r-sm);
    background: var(--clr-surface);
    color: var(--clr-muted);
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: background var(--t-fast), color var(--t-fast);
}
.btn-cal-today:hover { background: var(--clr-subtle); color: var(--clr-text); }

/* 7-column day grid */
.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.cal-day {
    border-right: 1px solid var(--clr-border);
    display: flex;
    flex-direction: column;
    min-height: 160px;
    background: var(--clr-surface);
}
.cal-day:last-child { border-right: none; }
.cal-day.weekend    { background: var(--clr-subtle); }

.cal-day-head {
    padding: 10px 6px 8px;
    text-align: center;
    border-bottom: 1px solid var(--clr-border);
    flex-shrink: 0;
    background: inherit;
}
.cal-day-name {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--clr-faint);
    margin-bottom: 6px;
}
.cal-day-num {
    width: 28px; height: 28px;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
    color: var(--clr-text);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto;
    transition: background var(--t-fast), color var(--t-fast);
}
.cal-day.today .cal-day-name { color: var(--accent); }
.cal-day.today .cal-day-num  { background: var(--accent); color: white; }

/* Events scrollable area */
.cal-day-body {
    flex: 1;
    padding: 6px 5px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
    max-height: 190px;
}

/* Event pill */
.cal-event {
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    border-left: 3px solid var(--accent);
    border-radius: 5px;
    padding: 5px 6px;
    cursor: default;
    min-width: 0;
    transition: background var(--t-fast);
}
.cal-event:hover { background: #DBEAFE; }

.cal-event-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    margin-bottom: 3px;
}
.cal-event-time {
    font-size: 10px;
    font-weight: 700;
    color: var(--accent);
    white-space: nowrap;
    flex-shrink: 0;
}
.cal-event-court {
    font-size: 9px;
    background: var(--accent);
    color: white;
    padding: 1px 5px;
    border-radius: var(--r-pill);
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 58px;
}
.cal-event-teams {
    font-size: 11px;
    font-weight: 600;
    color: var(--clr-text);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* "+N más" overflow chip */
.cal-more {
    font-size: 10px;
    font-weight: 700;
    color: var(--accent);
    text-align: center;
    padding: 3px 0;
    cursor: pointer;
}
.cal-more:hover { text-decoration: underline; }


/* ────────────────────────────────────────────────────────────
   TOAST NOTIFICATIONS  —  reemplaza alert() nativo
   ──────────────────────────────────────────────────────────── */
#toast-container {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--r-md);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 500;
    min-width: 280px;
    max-width: 440px;
    box-shadow: var(--shadow-md);
    pointer-events: all;
    animation: toast-in 0.25s ease forwards;
}
.toast.toast-hide {
    animation: toast-out 0.25s ease forwards;
}

.toast-error   { background: var(--clr-error-bg);  color: var(--clr-error-text);  border: 1px solid var(--clr-error-border); }
.toast-success { background: #F0FDF4; color: #166534; border: 1px solid #BBF7D0; }
.toast-info    { background: #EFF6FF; color: #1E40AF; border: 1px solid #BFDBFE; }
.toast-warning { background: #FFFBEB; color: #92400E; border: 1px solid #FDE68A; }

.toast-icon  { font-size: 18px; flex-shrink: 0; line-height: 1; }
.toast-msg   { flex: 1; line-height: 1.45; }
.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: currentColor;
    opacity: 0.5;
    padding: 0 0 0 8px;
    flex-shrink: 0;
    line-height: 1;
    font-family: var(--font);
    transition: opacity var(--t-fast);
}
.toast-close:hover { opacity: 1; }

@keyframes toast-in {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes toast-out {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(-12px); }
}


/* ────────────────────────────────────────────────────────────
   UTILITY  —  espaciado y misceláneos
   ──────────────────────────────────────────────────────────── */
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }

/* ────────────────────────────────────────────────────────────
   FORM COMPONENTS  —  cards, steps, nav, helpers
   ──────────────────────────────────────────────────────────── */
.form-card {
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--r-lg);
    overflow: hidden;
    margin-bottom: 20px;
}
.form-card-header {
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 700;
    color: var(--clr-text);
    background: var(--clr-subtle);
    border-bottom: 1px solid var(--clr-border);
}
.form-card-body {
    padding: 20px;
}

/* Multi-step stepper */
.form-stepper {
    display: flex;
    align-items: center;
    gap: 0;
}
.step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    opacity: 0.45;
}
.step.step-active,
.step.step-done  { opacity: 1; }
.step-num {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--clr-subtle);
    border: 2px solid var(--clr-border);
    font-size: 12px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    color: var(--clr-muted);
    flex-shrink: 0;
}
.step-active .step-num {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.step-done .step-num {
    background: #DCFCE7;
    border-color: #86EFAC;
    color: #16A34A;
}
.step-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--clr-text);
    white-space: nowrap;
}
.step-line {
    flex: 1;
    height: 2px;
    background: var(--clr-border);
    margin: 0 12px;
    min-width: 24px;
}

/* Form bottom nav */
.form-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0 24px;
}

/* Misc form helpers */
.form-hint {
    display: block;
    font-size: 11px;
    color: var(--clr-muted);
    margin-top: 4px;
    line-height: 1.4;
}
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--clr-text);
    cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
    width: 16px; height: 16px;
    accent-color: var(--accent);
    cursor: pointer;
}

/* Alert boxes */
.alert-error {
    padding: 12px 16px;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: var(--r-md);
    font-size: 13px;
    color: #DC2626;
    font-weight: 500;
}
.alert-info {
    padding: 12px 16px;
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    border-radius: var(--r-md);
    font-size: 13px;
    color: #1D4ED8;
    font-weight: 500;
}

/* Ghost button */
.btn-ghost {
    padding: 8px 18px;
    border-radius: var(--r-sm);
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    background: none;
    border: 1.5px solid var(--clr-border);
    color: var(--clr-muted);
    transition: background var(--t-fast), color var(--t-fast);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-ghost:hover { background: var(--clr-subtle); color: var(--clr-text); }

/* Primary small button */
.btn-sm-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-sm-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

/* Badge variants */
.badge-borrador { background: #F1F5F9; color: #64748B; }
.badge-warn     { background: #FFFBEB; color: #D97706; border: 1px solid #FDE68A; }
.badge-danger   { background: #FEF2F2; color: #DC2626; }


/* ────────────────────────────────────────────────────────────
   TABS
   ──────────────────────────────────────────────────────────── */
.tab-nav {
    display: flex;
    gap: 2px;
    background: var(--clr-subtle);
    border: 1px solid var(--clr-border);
    border-radius: var(--r-md);
    padding: 4px;
    flex-wrap: wrap;
}
.tab-item {
    padding: 7px 16px;
    border-radius: var(--r-sm);
    font-size: 13px;
    font-weight: 600;
    color: var(--clr-muted);
    text-decoration: none;
    transition: background var(--t-fast), color var(--t-fast);
    white-space: nowrap;
}
.tab-item:hover  { background: var(--clr-surface); color: var(--clr-text); }
.tab-active {
    background: var(--clr-surface);
    color: var(--clr-text);
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}


/* ────────────────────────────────────────────────────────────
   EMPTY STATES
   ──────────────────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 64px 20px;
    color: var(--clr-muted);
    font-size: 14px;
}
.empty-state-sm {
    padding: 24px;
    text-align: center;
    color: var(--clr-muted);
    font-size: 13px;
}


/* ────────────────────────────────────────────────────────────
   LIGAS  —  Index grid + cards
   ──────────────────────────────────────────────────────────── */
.ligas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

.liga-card {
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--r-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: box-shadow var(--t-fast), transform var(--t-fast);
}
.liga-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}
.lc-stripe {
    height: 4px;
    background: var(--liga-color, var(--accent));
}
.lc-body {
    padding: 16px;
    flex: 1;
}
.lc-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}
.lc-logo {
    width: 44px; height: 44px;
    border-radius: var(--r-md);
    background: var(--clr-subtle);
    border: 1px solid var(--clr-border);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; flex-shrink: 0; overflow: hidden;
}
.lc-logo img { width: 44px; height: 44px; object-fit: cover; }
.lc-info { flex: 1; min-width: 0; }
.lc-nombre {
    font-size: 15px;
    font-weight: 800;
    color: var(--clr-text);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lc-meta { display: flex; flex-wrap: wrap; gap: 4px; }
.lc-chip {
    padding: 2px 8px;
    background: var(--clr-subtle);
    border-radius: var(--r-pill);
    font-size: 11px;
    color: var(--clr-muted);
    font-weight: 600;
    border: 1px solid var(--clr-border);
}
.lc-temporada {
    font-size: 12px;
    color: var(--clr-muted);
    margin-bottom: 10px;
}
.lc-stats {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}
.lc-stat { display: flex; flex-direction: column; align-items: center; }
.lc-stat-val { font-size: 20px; font-weight: 800; color: var(--clr-text); line-height: 1; }
.lc-stat-lbl { font-size: 11px; color: var(--clr-muted); margin-top: 2px; }
.lc-actions {
    padding: 12px 16px;
    border-top: 1px solid var(--clr-border);
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.lc-actions form { width: 100%; margin: 0; padding: 0; }


/* ────────────────────────────────────────────────────────────
   LIGA HERO  —  Detalle header
   ──────────────────────────────────────────────────────────── */
.liga-hero {
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--r-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-top: 4px solid var(--liga-color, var(--accent));
}
.lh-left { display: flex; align-items: center; gap: 16px; flex: 1; }
.lh-logo {
    width: 56px; height: 56px;
    border-radius: var(--r-md);
    background: var(--clr-subtle);
    border: 1px solid var(--clr-border);
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; flex-shrink: 0; overflow: hidden;
}
.lh-logo img { width: 56px; height: 56px; object-fit: cover; }
.lh-stats { display: flex; gap: 24px; flex-shrink: 0; }
.lh-stat { display: flex; flex-direction: column; align-items: center; }
.lh-val { font-size: 22px; font-weight: 800; color: var(--clr-text); line-height: 1; }
.lh-lbl { font-size: 11px; color: var(--clr-muted); margin-top: 2px; }


/* ────────────────────────────────────────────────────────────
   TEMPORADAS  —  lista en Detalle
   ──────────────────────────────────────────────────────────── */
.temporada-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--clr-border);
}
.temporada-row:last-child { border-bottom: none; }
.tr-info { flex: 1; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tr-nombre { font-size: 14px; font-weight: 700; color: var(--clr-text); }
.tr-meta   { font-size: 12px; color: var(--clr-muted); }
.tr-stats  { display: flex; gap: 12px; font-size: 12px; color: var(--clr-muted); flex-shrink: 0; }
.tr-actions { display: flex; gap: 6px; flex-shrink: 0; }
.tr-actions form { margin: 0; padding: 0; }


/* ────────────────────────────────────────────────────────────
   PARTIDOS  —  cards y filas compactas
   ──────────────────────────────────────────────────────────── */
.partido-card {
    display: grid;
    grid-template-columns: 80px 1fr auto 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--clr-border);
    font-size: 13px;
}
.partido-card:last-child { border-bottom: none; }
.partido-card:hover { background: var(--clr-subtle); }
.pc-fecha {
    display: flex;
    flex-direction: column;
    font-size: 11px;
    color: var(--clr-muted);
    text-align: center;
}
.pc-equipo { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.pc-local   { justify-content: flex-end; text-align: right; }
.pc-visitante { justify-content: flex-start; }
.pc-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.pc-score  { text-align: center; padding: 0 12px; min-width: 80px; }
.pc-score-val { font-size: 16px; font-weight: 800; color: var(--clr-text); }
.pc-pen    { display: block; font-size: 10px; color: var(--clr-muted); }
.pc-vs     { font-size: 11px; color: var(--clr-faint); font-weight: 700; }
.pc-meta   { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 11px; color: var(--clr-muted); }

/* Partido row — compact (próximos en resumen) */
.partido-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    border-bottom: 1px solid var(--clr-border);
    font-size: 13px;
}
.partido-row:last-child { border-bottom: none; }
.pr-fecha     { font-size: 11px; color: var(--clr-muted); width: 72px; flex-shrink: 0; }
.pr-local     { flex: 1; font-weight: 600; text-align: right; }
.pr-vs        { font-size: 11px; color: var(--clr-faint); font-weight: 700; flex-shrink: 0; }
.pr-visitante { flex: 1; font-weight: 600; }
.pr-cancha    { font-size: 11px; color: var(--clr-muted); flex-shrink: 0; }


/* ────────────────────────────────────────────────────────────
   GOLEADORES
   ──────────────────────────────────────────────────────────── */
.goleador-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    border-bottom: 1px solid var(--clr-border);
    font-size: 13px;
}
.goleador-row:last-child { border-bottom: none; }
.gr-pos    { width: 22px; font-weight: 800; text-align: center; color: var(--clr-muted); flex-shrink: 0; }
.gr-nombre { flex: 1; font-weight: 600; }
.gr-equipo { flex: 1; color: var(--clr-muted); font-size: 12px; }
.gr-goles  { font-weight: 800; font-size: 15px; flex-shrink: 0; }
.gr-asist  { font-size: 12px; color: var(--clr-muted); flex-shrink: 0; }


/* ────────────────────────────────────────────────────────────
   TABLA POSICIONES
   ──────────────────────────────────────────────────────────── */
.tabla-posiciones thead th { font-size: 11px; }
.tabla-posiciones tbody td { font-size: 13px; text-align: center; }
.tabla-posiciones td:nth-child(2) { min-width: 120px; }
.tr-clasifica { background: #F0FDF4 !important; }
.tr-clasifica:hover td { background: #DCFCE7 !important; }


/* ────────────────────────────────────────────────────────────
   STAT CARDS (resumen detalle)
   ──────────────────────────────────────────────────────────── */
.sc-icon { font-size: 24px; margin-bottom: 6px; }
.sc-val  { font-size: 28px; font-weight: 800; color: var(--clr-text); line-height: 1; }
.sc-lbl  { font-size: 12px; color: var(--clr-muted); margin-top: 4px; }


/* ────────────────────────────────────────────────────────────
   FILTER BAR  (buscador + pastillas de estado)
   ──────────────────────────────────────────────────────────── */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* Buscador */
.fb-search {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 320px;
}
.fb-search-icon {
    position: absolute;
    left: 12px; top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    pointer-events: none;
    opacity: .5;
}
.fb-search-input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    border: 1.5px solid var(--clr-border);
    border-radius: var(--r-md);
    background: var(--clr-surface);
    font-size: 13px;
    font-family: var(--font);
    color: var(--clr-text);
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.fb-search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb, 26,107,58), .10);
}
.fb-search-input::placeholder { color: var(--clr-muted); }

/* Pastillas de estado */
.fb-estados {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.fb-btn {
    padding: 6px 13px;
    border: 1.5px solid var(--clr-border);
    border-radius: 999px;
    background: var(--clr-surface);
    color: var(--clr-muted);
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast);
    white-space: nowrap;
}
.fb-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.fb-btn.fb-btn-active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* Contador de resultados */
.fb-counter {
    margin-left: auto;
    font-size: 12px;
    color: var(--clr-muted);
    white-space: nowrap;
    padding: 6px 0;
}

/* Estado vacío de filtro (sin coincidencias) */
.filter-empty {
    display: none;
    text-align: center;
    padding: 48px 20px;
    color: var(--clr-muted);
}
.filter-empty-icon { font-size: 40px; margin-bottom: 12px; }
.filter-empty-title { font-size: 15px; font-weight: 700; color: var(--clr-text); margin-bottom: 6px; }
.filter-empty-sub   { font-size: 13px; }
