/* ============================================================
   ESCUELITA FC — PORTAL DEL CLIENTE / ALUMNO
   Diseño limpio, moderno y mobile-first
   ============================================================ */

:root {
    --cp-primary:      #F07228;
    --cp-primary-dark: #C45015;
    --cp-primary-light:#FF9A5C;
    --cp-accent:       #F07228;
    --cp-success:      #16a34a;
    --cp-warning:      #d97706;
    --cp-danger:       #dc2626;
    --cp-info:         #0284c7;
    --cp-light:        #f8fafc;
    --cp-border:       #e2e8f0;
    --cp-gray:         #64748b;
    --cp-dark:         #1e293b;
    --cp-nav-bg:       #0F1020;
    --cp-white:        #ffffff;
    --cp-shadow:       0 4px 20px rgba(0,0,0,.10);
    --cp-shadow-sm:    0 2px 8px rgba(0,0,0,.07);
    --cp-radius:       14px;
    --cp-radius-sm:    8px;
}

*, *::before, *::after { box-sizing: border-box; }

body.cp-body {
    background: #F1F3F7;
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: .9375rem;
    color: var(--cp-dark);
    margin: 0;
}

/* ── NAV ── */
.cp-nav {
    background: var(--cp-nav-bg);
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 58px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0,0,0,.35);
    border-bottom: 2px solid var(--cp-primary);
}
.cp-nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    text-decoration: none;
    font-weight: 800;
    font-size: 1rem;
}
.cp-nav-brand img { height: 36px; width: auto; }
.cp-nav-brand i { color: var(--cp-primary); font-size: 1.2rem; }
.cp-nav-right  { display: flex; align-items: center; gap: 8px; }
.cp-nav-avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: rgba(255,255,255,.2);
    color: white; font-weight: 700; font-size: .85rem;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid rgba(255,255,255,.3);
    cursor: pointer;
}
.cp-nav-menu-btn {
    background: none; border: none; color: rgba(255,255,255,.8);
    font-size: 1.1rem; cursor: pointer; padding: 4px 6px;
}

/* ── BOTTOM NAV (mobile) ── */
.cp-bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: white;
    border-top: 1px solid var(--cp-border);
    display: flex; z-index: 100;
    box-shadow: 0 -2px 12px rgba(0,0,0,.08);
    padding-bottom: env(safe-area-inset-bottom, 0);
}
.cp-bottom-nav a {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    padding: 10px 4px; color: var(--cp-gray); text-decoration: none;
    font-size: .62rem; font-weight: 600; text-transform: uppercase; letter-spacing: .4px;
    transition: color .2s;
}
.cp-bottom-nav a i   { font-size: 1.15rem; margin-bottom: 3px; }
.cp-bottom-nav a.active { color: var(--cp-primary); }
.cp-bottom-nav a.active i { color: var(--cp-primary); }

/* ── SIDEBAR (tablet+) ── */
.cp-layout { display: flex; min-height: calc(100vh - 58px); }
.cp-sidebar {
    width: 230px; flex-shrink: 0;
    background: white;
    border-right: 1px solid var(--cp-border);
    padding: 24px 16px;
    display: none; /* shown via media query */
}
@media (min-width: 768px) {
    .cp-sidebar { display: block; }
    .cp-bottom-nav { display: none; }
}
.cp-sidebar-user {
    text-align: center; padding: 20px 0 24px;
    border-bottom: 1px solid var(--cp-border); margin-bottom: 20px;
}
.cp-sidebar-avatar {
    width: 70px; height: 70px; border-radius: 50%;
    background: linear-gradient(135deg, var(--cp-primary), var(--cp-primary-dark));
    color: white; font-size: 2rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 12px;
    border: 3px solid var(--cp-border);
}
.cp-sidebar-name { font-weight: 700; font-size: .9rem; color: var(--cp-dark); }
.cp-sidebar-filial { font-size: .78rem; color: var(--cp-gray); margin-top: 2px; }
.cp-sidebar-cat {
    display: inline-block; margin-top: 6px;
    background: var(--cp-primary); color: white;
    font-size: .72rem; font-weight: 700; padding: 2px 10px; border-radius: 20px;
}
.cp-sidebar-nav a {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: var(--cp-radius-sm);
    color: var(--cp-gray); text-decoration: none; font-size: .88rem; font-weight: 500;
    transition: all .2s; margin-bottom: 2px;
}
.cp-sidebar-nav a:hover { background: var(--cp-light); color: var(--cp-primary); }
.cp-sidebar-nav a.active { background: rgba(26,58,110,.08); color: var(--cp-primary); font-weight: 700; }
.cp-sidebar-nav a i { width: 18px; text-align: center; font-size: .95rem; }
.cp-sidebar-logout { color: var(--cp-danger) !important; margin-top: 12px; }

/* ── CONTENT ── */
.cp-content {
    flex: 1; padding: 20px 16px 90px; /* bottom padding for bottom nav */
    max-width: 900px;
}
@media (min-width: 768px) { .cp-content { padding: 28px 28px 28px; } }

/* ── WELCOME CARD ── */
.cp-welcome {
    background: linear-gradient(135deg, #0F1020 0%, #1C1C30 50%, #2A1008 100%);
    border-radius: var(--cp-radius);
    padding: 24px 22px;
    color: white;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    border-left: 4px solid var(--cp-primary);
    box-shadow: 0 8px 28px rgba(240,114,40,.2);
}
.cp-welcome::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 90% 50%, rgba(240,114,40,.15) 0%, transparent 60%);
    pointer-events: none;
}
.cp-welcome::after {
    content: '\f1e3'; /* fa-futbol */
    font-family: 'Font Awesome 6 Free'; font-weight: 900;
    position: absolute; right: -20px; bottom: -20px;
    font-size: 7rem; opacity: .06; color: white;
}
.cp-welcome-greeting { font-size: .78rem; opacity: .7; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }
.cp-welcome-name { font-size: 1.45rem; font-weight: 800; margin: 4px 0; }
.cp-welcome-meta { font-size: .82rem; opacity: .75; }
.cp-welcome-badge {
    display: inline-flex; align-items: center; gap: 4px;
    background: rgba(255,255,255,.15); border-radius: 20px;
    padding: 3px 10px; font-size: .75rem; font-weight: 600;
}

/* ── STATS GRID ── */
.cp-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 20px; }
@media (min-width: 480px) { .cp-stats { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .cp-stats { grid-template-columns: repeat(4, 1fr); } }
.cp-stat {
    background: white; border-radius: var(--cp-radius-sm);
    padding: 16px; box-shadow: var(--cp-shadow-sm);
    border-top: 3px solid var(--cp-primary);
    transition: transform .2s, box-shadow .2s;
}
.cp-stat:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,.1); }
.cp-stat.green  { border-color: var(--cp-success); }
.cp-stat.amber  { border-color: var(--cp-warning); }
.cp-stat.blue   { border-color: var(--cp-info); }
.cp-stat.red    { border-color: var(--cp-danger); }
.cp-stat-label  { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--cp-gray); margin-bottom: 6px; }
.cp-stat-value  { font-size: 1.55rem; font-weight: 800; color: var(--cp-dark); line-height: 1; }
.cp-stat-sub    { font-size: .72rem; color: var(--cp-gray); margin-top: 4px; }

/* ── CARD ── */
.cp-card {
    background: white; border-radius: var(--cp-radius);
    box-shadow: var(--cp-shadow-sm); overflow: hidden; margin-bottom: 16px;
}
.cp-card-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--cp-border);
    display: flex; align-items: center; justify-content: space-between;
}
.cp-card-title { font-weight: 700; font-size: .9rem; color: var(--cp-dark); }
.cp-card-title i { color: var(--cp-primary); margin-right: 6px; }
.cp-card-body { padding: 16px 18px; }

/* ── HORARIO ITEM ── */
.cp-horario {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 14px 0; border-bottom: 1px solid var(--cp-border);
}
.cp-horario:last-child { border-bottom: none; padding-bottom: 0; }
.cp-horario-dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--cp-primary); flex-shrink: 0; margin-top: 5px;
}
.cp-horario-cat   { font-weight: 700; font-size: .9rem; color: var(--cp-primary); }
.cp-horario-time  { font-size: .82rem; color: var(--cp-dark); font-weight: 600; }
.cp-horario-dias  { font-size: .78rem; color: var(--cp-gray); }
.cp-horario-prof  { font-size: .78rem; color: var(--cp-gray); }

/* ── PAGO ITEM ── */
.cp-pago {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 0; border-bottom: 1px solid var(--cp-border);
}
.cp-pago:last-child { border-bottom: none; }
.cp-pago-mes   { font-weight: 700; font-size: .88rem; color: var(--cp-dark); }
.cp-pago-cat   { font-size: .75rem; color: var(--cp-gray); }
.cp-pago-monto { font-weight: 800; font-size: .95rem; }
.cp-pago-estado {
    display: inline-block; padding: 2px 8px; border-radius: 20px;
    font-size: .72rem; font-weight: 700;
}
.cp-pago-estado.pagado    { background: #dcfce7; color: #166534; }
.cp-pago-estado.pendiente { background: #fef3c7; color: #92400e; }
.cp-pago-estado.vencido   { background: #fee2e2; color: #991b1b; }

/* ── TABLE ── */
.cp-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.cp-table th {
    font-size: .7rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .5px; color: var(--cp-gray);
    padding: .6rem .75rem; border-bottom: 1px solid var(--cp-border);
    background: #f8fafc; white-space: nowrap;
}
.cp-table td { padding: .65rem .75rem; border-bottom: 1px solid var(--cp-border); vertical-align: middle; }
.cp-table tr:last-child td { border-bottom: none; }
.cp-table tr:hover td { background: #f8fafc; }

/* ── NOTA BADGE ── */
.nota-badge {
    display: inline-block; padding: 2px 8px; border-radius: 8px;
    font-size: .8rem; font-weight: 700;
}
.nota-badge.excelente { background: #dcfce7; color: #166534; }
.nota-badge.bueno     { background: #dbeafe; color: #1e40af; }
.nota-badge.regular   { background: #fef3c7; color: #92400e; }
.nota-badge.bajo      { background: #fee2e2; color: #991b1b; }

/* ── LOGIN PAGE ── */
.cp-login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #0F1020 0%, #1C1C30 50%, #2A1008 100%);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    position: relative; overflow: hidden;
}
.cp-login-page::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 50% 50%, rgba(240,114,40,.18) 0%, transparent 65%);
    pointer-events: none;
}
.cp-login-page::after {
    content: '';
    position: absolute; inset: 0;
    background-image: linear-gradient(rgba(240,114,40,.05) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(240,114,40,.05) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}
.cp-login-card {
    background: white; border-radius: 20px;
    box-shadow: 0 30px 80px rgba(0,0,0,.5), 0 0 0 1px rgba(240,114,40,.2);
    width: 100%; max-width: 420px; overflow: hidden;
    position: relative; z-index: 1;
}
.cp-login-hero {
    background: linear-gradient(135deg, #0F1020 0%, #1C1C30 100%);
    padding: 36px 24px 28px; text-align: center; color: white;
    position: relative; overflow: hidden;
    border-bottom: 3px solid var(--cp-primary);
}
.cp-login-hero::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 50% 100%, rgba(240,114,40,.2) 0%, transparent 60%);
    pointer-events: none;
}
.cp-login-hero-shield {
    width: 90px; height: auto; margin-bottom: 14px;
    filter: drop-shadow(0 0 20px rgba(240,114,40,.5));
    animation: loginFloat 3s ease-in-out infinite;
}
@keyframes loginFloat {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-6px); }
}
.cp-login-hero-icon { font-size: 3rem; color: var(--cp-primary); margin-bottom: 12px; }
.cp-login-hero h2 { font-size: 1.2rem; font-weight: 800; margin: 0 0 4px; }
.cp-login-hero p  { font-size: .82rem; opacity: .65; margin: 0; }
.cp-login-body { padding: 28px 28px 24px; }
.cp-login-label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--cp-gray); margin-bottom: 6px; display: block; }
.cp-login-input {
    width: 100%; padding: 12px 14px; border: 1.5px solid var(--cp-border);
    border-radius: var(--cp-radius-sm); font-size: .95rem;
    transition: border-color .2s, box-shadow .2s; outline: none; background: #fafafa;
}
.cp-login-input:focus { border-color: var(--cp-primary); background: white; box-shadow: 0 0 0 3px rgba(240,114,40,.12); }
.cp-login-btn {
    width: 100%; padding: 13px; border: none; border-radius: var(--cp-radius-sm);
    background: linear-gradient(135deg, var(--cp-primary), var(--cp-primary-dark));
    color: white; font-size: 1rem; font-weight: 700;
    cursor: pointer; transition: all .2s; margin-top: 8px;
    box-shadow: 0 6px 20px rgba(240,114,40,.3);
}
.cp-login-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(240,114,40,.4); }
.cp-login-info { background: #fff8f5; border-left: 3px solid var(--cp-primary); border-radius: 0 var(--cp-radius-sm) var(--cp-radius-sm) 0; padding: 12px 14px; margin-top: 16px; font-size: .8rem; color: var(--cp-primary-dark); }

/* ── ALERT ── */
.cp-alert { border-radius: var(--cp-radius-sm); padding: 12px 16px; margin-bottom: 16px; font-size: .88rem; display: flex; align-items: flex-start; gap: 10px; }
.cp-alert.danger  { background: #fee2e2; color: #991b1b; }
.cp-alert.success { background: #dcfce7; color: #166534; }
.cp-alert.warning { background: #fef3c7; color: #92400e; }
.cp-alert.info    { background: #dbeafe; color: #1e40af; }

/* ── PROGRESS BAR ── */
.cp-progress { height: 8px; background: var(--cp-border); border-radius: 4px; overflow: hidden; }
.cp-progress-bar { height: 100%; border-radius: 4px; background: var(--cp-primary); transition: width .5s ease; }

/* ── EVALBAR ── */
.cp-evalbar { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.cp-evalbar-label { width: 70px; font-size: .78rem; color: var(--cp-gray); font-weight: 600; flex-shrink: 0; }
.cp-evalbar-track { flex: 1; height: 6px; background: var(--cp-border); border-radius: 3px; overflow: hidden; }
.cp-evalbar-fill  { height: 100%; border-radius: 3px; background: var(--cp-primary); }
.cp-evalbar-value { width: 24px; font-size: .78rem; font-weight: 700; color: var(--cp-dark); text-align: right; flex-shrink: 0; }

/* ── EMPTY STATE ── */
.cp-empty { text-align: center; padding: 40px 20px; color: var(--cp-gray); }
.cp-empty i { font-size: 2.5rem; opacity: .25; display: block; margin-bottom: 12px; }
.cp-empty p { font-size: .88rem; margin: 0; }

/* ── SELECCIONAR CLIENTE ── */
.cp-select-card {
    background: white; border-radius: var(--cp-radius);
    box-shadow: var(--cp-shadow-sm); padding: 18px;
    margin-bottom: 12px; cursor: pointer;
    border: 2px solid transparent; transition: all .2s;
    display: flex; align-items: center; gap: 14px;
    text-decoration: none; color: var(--cp-dark);
}
.cp-select-card:hover { border-color: var(--cp-primary); background: #f8fafc; }
.cp-select-avatar {
    width: 48px; height: 48px; border-radius: 50%;
    background: var(--cp-primary); color: white;
    font-size: 1.3rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.cp-select-name  { font-weight: 700; font-size: .95rem; }
.cp-select-meta  { font-size: .78rem; color: var(--cp-gray); margin-top: 2px; }

/* ── PERFIL FORM ── */
.cp-form-group { margin-bottom: 18px; }
.cp-form-label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--cp-gray); margin-bottom: 6px; display: block; }
.cp-form-control {
    width: 100%; padding: 11px 13px;
    border: 1.5px solid var(--cp-border); border-radius: var(--cp-radius-sm);
    font-size: .9rem; outline: none; background: white;
    transition: border-color .2s;
}
.cp-form-control:focus { border-color: var(--cp-primary); }
.cp-form-control[readonly] { background: #f8fafc; color: var(--cp-gray); }
.cp-btn-primary {
    padding: 12px 24px; background: var(--cp-primary); color: white;
    border: none; border-radius: var(--cp-radius-sm); font-size: .9rem;
    font-weight: 700; cursor: pointer; transition: all .2s;
}
.cp-btn-primary:hover { background: var(--cp-primary-dark); }
.cp-btn-secondary {
    padding: 12px 24px; background: white; color: var(--cp-gray);
    border: 1.5px solid var(--cp-border); border-radius: var(--cp-radius-sm);
    font-size: .9rem; font-weight: 600; cursor: pointer; text-decoration: none;
    display: inline-block; transition: all .2s;
}
.cp-btn-secondary:hover { background: var(--cp-light); color: var(--cp-dark); }

/* ── RECIBO ── */
.cp-recibo { max-width: 560px; margin: 0 auto; }
.cp-recibo-header {
    background: var(--cp-primary); color: white;
    text-align: center; padding: 28px 20px;
    border-radius: var(--cp-radius) var(--cp-radius) 0 0;
}
.cp-recibo-body { background: white; padding: 24px; border-radius: 0 0 var(--cp-radius) var(--cp-radius); box-shadow: var(--cp-shadow); }
.cp-recibo-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--cp-border); font-size: .88rem; }
.cp-recibo-row:last-child { border-bottom: none; }
.cp-recibo-label { color: var(--cp-gray); }
.cp-recibo-value { font-weight: 600; }
.cp-recibo-total { font-size: 1.1rem; font-weight: 800; color: var(--cp-primary); }
