/* =============================================================================
   DASHBOARD HOME REDESIGN (MODERN, CLEAN, HIGH UX, NO NESTED CARDS)
   ============================================================================= */

/* 1. HERO HEADER V2 */
.home-hero-v2 {
    background: linear-gradient(135deg, var(--sb-neutral-900) 0%, var(--sb-neutral-800) 100%);
    border-radius: 18px;
    padding: 20px 26px;
    color: var(--sb-neutral-0);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
}

.home-hero-v2::after {
    content: "";
    position: absolute;
    top: -50%;
    right: -10%;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(200, 40, 0, 0.22) 0%, transparent 70%);
    pointer-events: none;
}

.home-hero-v2-main {
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
    z-index: var(--sb-z-base);
}

.home-hero-v2-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.home-hero-v2-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 4px 10px;
    border-radius: 999px;
    backdrop-filter: blur(8px);
}

.home-hero-v2-pill i {
    color: var(--sb-brand-accent);
}

.home-hero-v2-title {
    font-size: 1.65rem;
    font-weight: 800;
    margin: 4px 0 2px;
    color: var(--sb-neutral-0);
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.home-hero-v2-user {
    color: #facc15;
}

.home-hero-v2-sub {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.home-hero-v2-sub strong {
    color: var(--sb-neutral-0);
}

.home-hero-v2-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: var(--sb-z-base);
    flex-shrink: 0;
}

.home-hero-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--sb-neutral-0);
    padding: 10px 18px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.15s ease;
}

.home-hero-action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-1px);
}

.home-hero-action-btn i {
    color: var(--sb-brand-accent);
}

/* 2. SUMMARY KPI GRID V2 */
.home-summary-grid-v2 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    width: 100%;
}

@media (max-width: 1200px) {
    .home-summary-grid-v2 {
        grid-template-columns: repeat(3, 1fr);
    }}

@media (max-width: 768px) {
    .home-summary-grid-v2 {
        grid-template-columns: repeat(2, 1fr);
    }}

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

.home-summary-card-v2 {
    background: var(--sb-neutral-0);
    border: 1px solid var(--sb-neutral-200);
    border-radius: 16px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    position: relative;
    overflow: hidden;
}

.home-summary-card-v2:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07);
    border-color: var(--sb-neutral-300);
}

/* La tarjeta es un enlace: sin el subrayado global de a:hover (base.css). */
.home-summary-card-v2:hover,
.home-summary-card-v2:hover * {
    text-decoration: none;
}

.home-summary-icon-v2 {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.home-summary-icon-v2.alumnos { background: var(--sb-blue-50); color: var(--sb-blue-600); }
.home-summary-icon-v2.profesores { background: #f5f3ff; color: #7c3aed; }
.home-summary-icon-v2.cursos { background: var(--sb-green-50); color: #059669; }
.home-summary-icon-v2.horarios { background: var(--sb-amber-50); color: var(--sb-amber-600); }
.home-summary-icon-v2.salas { background: #fff1ee; color: var(--sb-brand); }

.home-summary-info-v2 {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.home-summary-label-v2 {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--sb-neutral-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.home-summary-val-v2 {
    font-size: 1.45rem;
    font-weight: 900;
    color: var(--sb-neutral-900);
    line-height: 1.1;
}

.home-summary-badge-v2 {
    font-size: 0.68rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    position: absolute;
    top: 12px;
    right: 12px;
}

.home-summary-badge-v2.alumnos { background: var(--sb-blue-50); color: var(--sb-blue-600); }
.home-summary-badge-v2.profesores { background: #f5f3ff; color: #7c3aed; }
.home-summary-badge-v2.cursos { background: var(--sb-green-50); color: #059669; }
.home-summary-badge-v2.horarios { background: var(--sb-amber-50); color: var(--sb-amber-600); }
.home-summary-badge-v2.salas { background: #fff1ee; color: var(--sb-brand); }

/* 3. SCHEDULE CARD & TOOLBAR V2 (Single-layer card, zero nested boxes) */
.home-schedule-section {
    width: 100%;
}

.home-schedule-card {
    background: var(--sb-neutral-0);
    border: 1px solid var(--sb-neutral-200);
    border-radius: 18px;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
    overflow: hidden;
    width: 100%;
}

.home-schedule-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 22px;
    border-bottom: 1px solid var(--sb-neutral-100);
    flex-wrap: wrap;
    background: var(--sb-neutral-0);
}

.home-schedule-title-area {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.home-schedule-heading {
    display: flex;
    align-items: center;
    gap: 10px;
}

.home-schedule-heading h2 {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--sb-neutral-900);
    margin: 0;
    letter-spacing: -0.3px;
}

.home-schedule-count-pill {
    background: var(--sb-neutral-100);
    color: var(--sb-neutral-600);
    font-size: 0.74rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid var(--sb-neutral-200);
}

/* --------------------------------------------- Recordatorio a los pendientes del día --- */
.home-day-reminder-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--sb-space-2);
    min-height: var(--sb-control-height);
    padding: 0 var(--sb-space-4);
    border-radius: var(--sb-radius-md);
    border: 1px solid var(--sb-amber-500);
    background: var(--sb-amber-500);
    color: var(--sb-neutral-900);
    font-family: inherit;
    font-size: var(--sb-text-sm);
    font-weight: var(--sb-weight-black);
    cursor: pointer;
    transition: filter var(--sb-duration-fast) var(--sb-ease), transform var(--sb-duration-fast) var(--sb-ease);
}

.home-day-reminder-btn:hover:not(:disabled) {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.home-day-reminder-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.home-day-reminder-groups {
    display: flex;
    flex-direction: column;
    gap: var(--sb-space-3);
    max-height: 40vh;
    overflow-y: auto;
}

.home-day-reminder-group__title {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--sb-space-2);
    margin: 0 0 var(--sb-space-1);
    font-size: var(--sb-text-sm);
    color: var(--sb-text-muted);
}

.home-day-reminder-group__title strong {
    color: var(--sb-text);
}

.home-schedule-date-nav {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--sb-neutral-50);
    border: 1px solid var(--sb-neutral-200);
    border-radius: 12px;
    padding: 3px 4px;
}

.home-date-nav-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--sb-neutral-500);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.15s ease;
}

.home-date-nav-btn:hover:not(:disabled) {
    background: var(--sb-neutral-0);
    color: var(--sb-neutral-900);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.home-date-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.home-date-nav-pill {
    border: none;
    background: transparent;
    padding: 4px 10px;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--sb-neutral-900);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 8px;
    transition: background 0.15s ease;
}

.home-date-nav-pill:hover {
    background: var(--sb-neutral-0);
    color: var(--sb-brand);
}

.home-date-nav-pill i {
    color: var(--sb-brand);
    font-size: 0.85rem;
}

/* Level filter pills in top toolbar */
.home-level-filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.home-level-filter-label {
    font-size: 0.76rem;
    font-weight: 800;
    color: var(--sb-neutral-400);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.home-lvl-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid var(--sb-neutral-200);
    background: var(--sb-neutral-50);
    color: var(--sb-neutral-500);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.home-lvl-pill:hover {
    background: var(--sb-neutral-0);
    color: var(--sb-neutral-900);
    border-color: var(--sb-neutral-300);
}

.home-lvl-pill.is-active {
    background: var(--sb-neutral-900);
    color: var(--sb-neutral-0);
    border-color: var(--sb-neutral-900);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15);
}

.home-lvl-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

/* 4. CLASSES GRID & CARDS */
.home-schedule-body {
    padding: 20px;
    background: var(--sb-neutral-0);
}

.home-classes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    width: 100%;
}

.home-class-card {
    background: var(--sb-neutral-0);
    border: 1px solid var(--sb-neutral-200);
    border-left: 5px solid var(--lvl-color, var(--sb-blue-500));
    border-radius: 14px;
    padding: 16px 18px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    text-align: left;
    appearance: none;
    box-sizing: border-box;
}

.home-class-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    border-color: var(--sb-neutral-300);
}

.home-class-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
}

.home-class-time {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--sb-neutral-900);
    color: var(--sb-neutral-0);
    font-size: 0.8rem;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 7px;
    letter-spacing: 0.3px;
}

.home-class-time i {
    color: var(--sb-brand-accent);
    font-size: 0.78rem;
}

.home-class-level {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.home-class-level-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.home-class-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.home-class-info {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--sb-neutral-400, #94a3b8);
    font-size: 1rem;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
}

.home-class-info:hover,
.home-class-info:focus-visible {
    color: var(--lvl-color, var(--sb-blue-600));
    background: var(--sb-neutral-100, #f1f5f9);
}

/* ------------------------------ Diálogo de confirmados por rol (ccd-) */
.ccd-dialog { width: min(560px, calc(100vw - 2 * var(--sb-space-4, 16px))); }
.ccd-header { display: grid; gap: 2px; min-width: 0; }
.ccd-header h3 { margin: 0; }
.ccd-subtitulo { font-size: var(--sb-text-sm, 0.85rem); color: var(--sb-text-muted, #64748b); }
.ccd-body { display: grid; gap: var(--sb-space-4, 16px); }

.ccd-estado { display: flex; align-items: center; gap: 10px; padding: 16px; border-radius: 12px; background: var(--sb-neutral-50, #f8fafc); color: var(--sb-text-muted, #64748b); }
.ccd-estado.error { background: var(--sb-danger-surface, #fef2f2); color: var(--sb-danger-text, #b91c1c); }

.ccd-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ccd-tile { display: grid; gap: 2px; padding: 12px; border-radius: 12px; border: 1px solid transparent; }
.ccd-tile b { font-size: 1.5rem; font-weight: 800; line-height: 1.1; color: var(--sb-neutral-900); }
.ccd-tile b small { font-size: 0.8rem; font-weight: 600; color: var(--sb-text-muted, #64748b); }
.ccd-tile span { font-size: 0.75rem; font-weight: 600; color: var(--sb-text-muted, #64748b); }
.ccd-tile.total { background: var(--sb-green-50); border-color: #bbf7d0; }
.ccd-tile.lideres { background: var(--sb-blue-50); border-color: var(--sb-blue-100); }
.ccd-tile.lideres i { color: var(--sb-blue-600); }
.ccd-tile.followers { background: #fdf2f8; border-color: #fce7f3; }
.ccd-tile.followers i { color: var(--sb-role-follower); }
.ccd-tile.sin-rol { background: var(--sb-slate-50, #f8fafc); border-color: var(--sb-slate-200, #e2e8f0); }
.ccd-tile.sin-rol i { color: var(--sb-slate-500, #64748b); }

@media (max-width: 480px) {
    .ccd-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.ccd-vacio { margin: 0; font-size: 0.9rem; color: var(--sb-text-muted, #64748b); }

.ccd-grupos { display: grid; gap: 14px; max-height: 45vh; overflow-y: auto; }
.ccd-grupo__titulo { margin: 0 0 6px; display: flex; align-items: center; gap: 6px; font-size: 0.85rem; font-weight: 700; color: var(--sb-neutral-900); }
.ccd-grupo__titulo span { font-weight: 600; color: var(--sb-text-muted, #64748b); }
.ccd-grupo.lideres .ccd-grupo__titulo i { color: var(--sb-blue-600); }
.ccd-grupo.followers .ccd-grupo__titulo i { color: var(--sb-role-follower); }
.ccd-grupo.sin-rol .ccd-grupo__titulo i { color: var(--sb-slate-500, #64748b); }
.ccd-grupo ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ccd-grupo li { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; background: var(--sb-neutral-50, #f8fafc); }
.ccd-grupo li b { flex: 1; min-width: 0; font-size: 0.88rem; font-weight: 600; color: var(--sb-neutral-900); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ccd-avatar { width: 28px; height: 28px; flex-shrink: 0; border-radius: 50%; object-fit: cover; display: inline-flex; align-items: center; justify-content: center; font-size: 0.68rem; font-weight: 700; background: var(--sb-neutral-200, #e2e8f0); color: var(--sb-neutral-700, #334155); }
.ccd-marca { flex-shrink: 0; font-size: 0.7rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.ccd-marca.llego { background: var(--sb-green-50); color: var(--sb-green-600, #16a34a); }
.ccd-marca.confirma { background: var(--sb-blue-50); color: var(--sb-blue-600); }

.home-class-title {
    margin: 0;
    font-size: 1.12rem;
    font-weight: 800;
    color: var(--sb-neutral-900);
    letter-spacing: -0.3px;
    line-height: 1.25;
}

.home-class-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding-top: 4px;
    width: 100%;
}

.home-stat-chip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 4px 6px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid var(--sb-neutral-200);
    white-space: nowrap;
    background: var(--sb-neutral-50);
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
}

.home-stat-chip .lbl {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--sb-neutral-600);
    overflow: hidden;
    text-overflow: ellipsis;
}

.home-stat-chip .val {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--sb-neutral-900);
    flex-shrink: 0;
}

.home-stat-chip.total { background: var(--sb-blue-50); border-color: var(--sb-blue-200); }
.home-stat-chip.confirmados { background: var(--sb-green-50); border-color: #bbf7d0; }
.home-stat-chip.no-van { background: var(--sb-red-50); border-color: var(--sb-red-200); }
.home-stat-chip.pendientes { background: var(--sb-amber-50); border-color: var(--sb-amber-200); }
.home-stat-chip.lideres { background: var(--sb-blue-50); border-color: var(--sb-blue-100); }
.home-stat-chip.followers { background: #fdf2f8; border-color: #fce7f3; }
.home-stat-chip.sin-rol { background: var(--sb-slate-50, #f8fafc); border-color: var(--sb-slate-200, #e2e8f0); }

.home-stat-chip.lideres i { color: var(--sb-blue-600); font-size: 0.68rem; }
.home-stat-chip.followers i { color: var(--sb-role-follower); font-size: 0.68rem; }
.home-stat-chip.sin-rol i { color: var(--sb-slate-500, #64748b); font-size: 0.68rem; }

.home-class-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
    padding-top: 8px;
    margin-top: auto;
    border-top: 1px solid var(--sb-neutral-100);
    color: var(--sb-neutral-600);
    font-weight: 600;
}

.home-class-teacher,
.home-class-room {
    display: flex;
    align-items: center;
    gap: 6px;
}

.home-class-teacher i,
.home-class-room i {
    color: var(--sb-neutral-400);
}

.home-empty-classes {
    padding: 48px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--sb-neutral-500);
}

.home-empty-classes i {
    font-size: 2.5rem;
    color: var(--sb-neutral-300);
}

.home-empty-classes h4 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--sb-neutral-900);
    margin: 0;
}

.home-empty-classes p {
    font-size: 0.88rem;
    color: var(--sb-neutral-500);
    margin: 0 0 8px;
}

.slider-btn.prev {
    left: -5px;
}

.slider-btn.next {
    right: -5px;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--sb-neutral-200);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    width: 12px;
    border-radius: 4px;
    background: #3182ce;
}

.sch-day-name {
    font-size: 0.95rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--sb-brand);
    margin-bottom: 0.8rem;
}

.sch-course-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sch-item-row {
    display: grid !important;
    grid-auto-flow: column !important;
    grid-auto-columns: 1fr !important;
    gap: 12px !important;
    width: 100% !important;
    margin-bottom: 0;
}

.sch-item-row .sch-item {
    width: 100% !important;
    margin-bottom: 0 !important;
}

@media (max-width: 768px) {
    .sch-item-row {
        grid-auto-flow: row !important;
    }}

.sch-item {
    background: var(--sb-neutral-50);
    border-radius: 16px;
    padding: 16px;
    border: 1px solid rgba(16, 24, 40, 0.08);
    position: relative;
    overflow: hidden;
    border-left: 5px solid var(--lvl-color, var(--sb-neutral-400));
    transition: all 0.2s ease;
    cursor: pointer;
}

.sch-item.sch-item-link {
    width: 100%;
    text-align: left;
    appearance: none;
}

.sch-item:hover {
    background: var(--sb-blue-50);
    border-color: var(--sb-blue-200);
    transform: scale(1.02);
}

.sch-item-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 8px;
    gap: 10px;
}

.sch-time-badge {
    background: var(--lvl-color);
    color: white;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 0.75rem;
}

.sch-level-text {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--lvl-color);
    letter-spacing: 0.05em;
}

.sch-title {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 4px;
    line-height: 1.2;
    color: #101828;
}

.sch-teacher {
    font-size: 0.75rem;
    color: var(--sb-neutral-500);
    display: flex;
    align-items: center;
    gap: 6px;
}

.sch-footer {
    margin-top: 0.6rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sch-legend {
    background: var(--sb-neutral-0);
    padding: 16px;
    border-radius: 18px;
    border: 1px solid var(--sb-neutral-200);
    box-shadow: 0 6px 18px -12px rgba(15, 23, 42, 0.28);
    width: 100%;
}

.sch-legend-title {
    font-size: 0.82rem;
    font-weight: 900;
    margin-bottom: 12px;
    text-transform: uppercase;
    color: var(--sb-neutral-900);
    letter-spacing: 0.06em;
}

.sch-legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sch-legend-item-v2 {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--sb-neutral-900);
    padding: 8px 12px;
    background: var(--sb-neutral-50);
    border-radius: 10px;
    border: 1px solid var(--sb-neutral-200);
    transition: all 0.2s ease;
    cursor: pointer;
}

.sch-legend-item-v2:hover {
    background: var(--sb-neutral-0);
    border-color: var(--sb-brand);
}

.sch-legend-item-v2.active {
    border-color: var(--sb-brand);
    background: #fff7f3;
}

.sch-lvl-dot-small {
    width: 14px;
    height: 14px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
}

.home-classes-card .sch-day-col {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    transition: none;
}

.home-classes-card .sch-day-col:hover {
    transform: none;
    box-shadow: none;
}

.home-classes-card .sch-course-list {
    gap: 16px;
    width: 100%;
}

.home-classes-card .sch-item-row {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
    grid-auto-flow: row !important;
    column-gap: 18px !important;
    row-gap: 18px !important;
    width: 100% !important;
}

.home-classes-card .sch-item-row .sch-item {
    min-width: 0;
    width: 100% !important;
}

.home-classes-card .sch-item {
    background: var(--sb-neutral-0);
    border-radius: 16px;
    border: 1px solid var(--sb-neutral-200);
    border-left: 5px solid var(--lvl-color, var(--sb-blue-500));
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    text-align: left;
    appearance: none;
}

.home-classes-card .sch-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    border-color: var(--sb-neutral-300);
    background: var(--sb-neutral-0);
}

.home-classes-card .sch-time-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--sb-neutral-900);
    color: var(--sb-neutral-0);
    font-size: 0.82rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 8px;
    letter-spacing: 0.3px;
}

.home-classes-card .sch-time-badge i {
    color: var(--sb-brand-accent);
    font-size: 0.8rem;
}

.home-classes-card .sch-item-body .sch-title {
    margin: 4px 0 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--sb-neutral-900);
    letter-spacing: -0.3px;
    line-height: 1.25;
}

.home-classes-card .sch-mini-chip .label {
    font-size: 0.66rem;
    font-weight: 700;
    color: var(--sb-neutral-600);
}

.home-classes-card .sch-mini-chip .value {
    font-size: 0.76rem;
    font-weight: 800;
    color: var(--sb-neutral-900);
}

.home-classes-card .sch-mini-chip.total {
    background: #eef8ff;
    border-color: var(--sb-blue-200);
}

.home-classes-card .sch-mini-chip.confirmados {
    background: #eefdf3;
    border-color: #bbf7d0;
}

.home-classes-card .sch-mini-chip.no-van {
    background: var(--sb-red-50);
    border-color: var(--sb-red-200);
}

.home-classes-card .sch-mini-chip.pendientes {
    background: var(--sb-amber-50);
    border-color: var(--sb-amber-200);
}

.home-classes-card .sch-mini-chip.lideres,
.home-classes-card .sch-mini-chip.followers {
    background: var(--sb-neutral-50);
}

.home-classes-card .sch-mini-chip.lideres i {
    color: var(--sb-blue-600);
}

.home-classes-card .sch-mini-chip.followers i {
    color: var(--sb-role-follower);
}

.home-classes-card .sch-teacher {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    padding-top: 8px;
    margin-top: auto;
    border-top: 1px solid var(--sb-neutral-100);
    color: var(--sb-neutral-600);
    font-weight: 600;
}

.home-classes-card .sch-teacher i {
    color: var(--sb-neutral-400);
}

@media (max-width: 768px) {
    .home-classes-card .sch-item-row {
        grid-template-columns: 1fr !important;
    }}

.home-classes-card .sch-footer {
    max-width: 100%;
    margin: 28px auto 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.home-classes-card .sch-legend {
    background: var(--sb-neutral-50);
    padding: 24px;
    border-radius: 20px;
    border: 1px solid var(--sb-neutral-200);
    box-shadow: none;
    width: 100%;
    text-align: center;
}

.home-classes-card .sch-legend-title {
    font-size: 1.05rem;
    font-weight: 900;
    margin-bottom: 18px;
    text-transform: uppercase;
    color: var(--sb-neutral-900);
    letter-spacing: 0.5px;
}

.home-classes-card .sch-legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.home-classes-card .sch-legend-item-v2 {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid var(--sb-neutral-200);
    background: var(--sb-neutral-0);
    color: var(--sb-neutral-600);
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.home-classes-card .sch-legend-item-v2:hover {
    border-color: var(--sb-neutral-300);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.home-classes-card .sch-legend-item-v2.active {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
    font-weight: 800;
}

.home-classes-card .sch-legend-items {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.home-classes-card .sch-legend-item-v2 {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--sb-neutral-900);
    padding: 10px 18px;
    background: var(--sb-neutral-50);
    border-radius: 12px;
    border: 1px solid var(--sb-neutral-200);
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.home-classes-card .sch-legend-item-v2:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px -2px rgba(0, 0, 0, 0.08);
    border-color: var(--sb-brand);
}

.home-classes-card .sch-legend-item-v2.active {
    border-color: var(--sb-brand);
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(200, 40, 0, 0.3), 0 0 5px rgba(200, 40, 0, 0.1);
    border-width: 2px;
}

.home-classes-card .sch-lvl-dot-small {
    width: 18px;
    height: 18px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.sch-stat-item .label {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--sb-neutral-400);
    margin-bottom: 4px;
}

.sch-stat-item .value {
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--sb-neutral-800);
    line-height: 1;
}

/* Specific item colors with subtle gradients */
.sch-stat-item.total { 
    background: linear-gradient(135deg, #f0f9ff 0%, var(--sb-blue-100) 100%); 
    border-color: var(--sb-blue-200); 
}
.sch-stat-item.total .label { color: var(--sb-blue-700); }
.sch-stat-item.total .value { color: #0c4a6e; }

.sch-stat-item.confirmados { 
    background: linear-gradient(135deg, #f0fdf4 0%, var(--sb-green-100) 100%); 
    border-color: #bbf7d0; 
}
.sch-stat-item.confirmados .label { color: #15803d; }
.sch-stat-item.confirmados .value { color: #14532d; }

.sch-stat-item.no-van { 
    background: linear-gradient(135deg, var(--sb-red-50) 0%, var(--sb-red-100) 100%); 
    border-color: var(--sb-red-200); 
}
.sch-stat-item.no-van .label { color: #be123c; }
.sch-stat-item.no-van .value { color: #881337; }

.sch-stat-item.pendientes { 
    background: linear-gradient(135deg, var(--sb-amber-50) 0%, var(--sb-amber-100) 100%); 
    border-color: var(--sb-amber-200); 
}
.sch-stat-item.pendientes .label { color: var(--sb-amber-700); }
.sch-stat-item.pendientes .value { color: #78350f; }

.role-item .label {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--sb-neutral-400);
    white-space: nowrap;
}

.role-item .value {
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--sb-neutral-800);
    line-height: 1;
}

.role-item.lideres i { color: var(--sb-blue-500); }
.role-item.followers i { color: var(--sb-role-follower); }