/* =============================================
   ADMIN SHELL / LAYOUT (Premium Fluent Glassmorphism)
   ============================================= */

.admin-shell {
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    background: linear-gradient(135deg, #0F0E2A 0%, #1E1B4B 40%, #312E81 70%, #1e3a5f 100%);
    position: relative;
}

/* Floating background orbs matching login page exactly */
.admin-shell::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.18) 0%, transparent 70%);
    top: -200px;
    right: -100px;
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

.admin-shell::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.12) 0%, transparent 70%);
    bottom: -100px;
    left: -100px;
    border-radius: 50%;
    animation: float 10s ease-in-out infinite reverse;
    pointer-events: none;
    z-index: 1;
}

/* ── SIDEBAR ──────────────────────────────────── */
.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: relative;
    z-index: 100;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.2);
}

.sidebar.collapsed {
    width: 76px;
    min-width: 76px;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 18px;
    border-bottom: 1px solid var(--border);
    min-height: 68px;
    overflow: hidden;
}

.sidebar-logo-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
    flex-shrink: 0;
    color: #FFFFFF;
}

.sidebar-logo-icon svg {
    width: 22px;
    height: 22px;
    stroke: #FFFFFF;
    stroke-width: 2.2px;
    fill: none;
}

.sidebar-brand {
    overflow: hidden;
    transition: opacity 0.2s ease, width 0.3s ease;
    white-space: nowrap;
}

.sidebar.collapsed .sidebar-brand {
    opacity: 0;
    width: 0;
    pointer-events: none;
}

.sidebar-brand-name {
    display: block;
    font-size: 16px;
    font-weight: 800;
    color: #FFFFFF;
    letter-spacing: -0.3px;
    background: linear-gradient(to right, #FFF, #CBD5E1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-brand-sub {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    padding: 16px 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}
.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
}

.nav-section-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.2);
    text-transform: uppercase;
    padding: 18px 24px 8px;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.sidebar.collapsed .nav-section-label {
    opacity: 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    margin: 3px 12px;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    position: relative;
    border: 1px solid transparent;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #FFFFFF;
    text-decoration: none;
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
    font-weight: 600;
    box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.05);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 18px;
    background: linear-gradient(to bottom, var(--primary), var(--accent));
    border-radius: 0 4px 4px 0;
}

.nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: currentColor;
    flex-shrink: 0;
    transition: var(--transition);
}

.nav-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    stroke-width: 2.2px;
}

.nav-item:hover .nav-icon {
    transform: scale(1.08);
}

.nav-label {
    transition: opacity 0.2s, transform 0.2s;
    white-space: nowrap;
}

.sidebar.collapsed .nav-label {
    opacity: 0;
    width: 0;
    overflow: hidden;
    transform: translateX(-10px);
}

/* Sidebar Footer & User Profile */
.sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.12);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.sidebar-user:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
}

.user-avatar-sidebar {
    width: 36px;
    height: 36px;
    min-width: 36px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.sidebar-user-info {
    overflow: hidden;
    transition: opacity 0.2s;
}

.sidebar.collapsed .sidebar-user-info {
    opacity: 0;
    width: 0;
}

.sidebar-user-name {
    font-size: 13.5px;
    font-weight: 600;
    color: #FFFFFF;
    white-space: nowrap;
}

.sidebar-user-role {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    margin-top: 1px;
}

/* Logout Button */
.btn-logout {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 11px 14px;
    margin-top: 8px;
    background: rgba(239, 68, 68, 0.04);
    border: 1px solid rgba(239, 68, 68, 0.1);
    border-radius: 12px;
    color: #FCA5A5;
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    overflow: hidden;
    text-decoration: none;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.16);
    border-color: rgba(239, 68, 68, 0.25);
    color: #FFFFFF;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.15);
    text-decoration: none;
}

.logout-icon {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logout-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    stroke-width: 2.2px;
    fill: none;
}

/* ── TOP BAR ──────────────────────────────────── */
.topbar {
    height: 68px;
    min-height: 68px;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 28px;
    gap: 16px;
    z-index: 50;
    position: relative;
}

.btn-toggle {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition);
    flex-shrink: 0;
}

.btn-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: #FFFFFF;
}

.btn-toggle svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2.2px;
}

.topbar-breadcrumb {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.breadcrumb-current {
    font-size: 14.5px;
    font-weight: 700;
    color: #FFFFFF;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-btn {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition);
    position: relative;
}

.topbar-btn:hover {
    border-color: rgba(255, 255, 255, 0.15);
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

.topbar-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2.2px;
}

.notif-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--danger);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 14px 6px 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
}

.topbar-user:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
}

.topbar-avatar {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: white;
}

.topbar-user-name {
    font-size: 13.5px;
    font-weight: 600;
    color: #FFFFFF;
}

.topbar-user-role {
    font-size: 11px;
    color: var(--text-muted);
}

/* ── MAIN CONTENT AREA ────────────────────────── */
.main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    position: relative;
    z-index: 10;
}

.page-content {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
    background: transparent;
}

.page-content::-webkit-scrollbar {
    width: 6px;
}
.page-content::-webkit-scrollbar-track {
    background: transparent;
}
.page-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
}
.page-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* =============================================
   DASHBOARD CARDS & COMPONENTS
   ============================================= */

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 28px;
    animation: fadeInDown 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.page-title {
    font-size: 24px;
    font-weight: 800;
    color: #FFFFFF;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, #FFF, #E2E8F0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.date-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 11px 18px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
    white-space: nowrap;
}

.date-badge svg {
    width: 16px;
    height: 16px;
    stroke: var(--accent);
    stroke-width: 2.2px;
}

/* Stat Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
    animation: fadeInDown 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) 0.1s both;
}

.stat-card {
    background: var(--card-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.stat-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
}

.stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 2px 6px rgba(255, 255, 255, 0.05);
}

.stat-icon.indigo { background: rgba(99, 102, 241, 0.15); color: #818CF8; border: 1px solid rgba(99, 102, 241, 0.25); }
.stat-icon.cyan   { background: rgba(6, 182, 212, 0.15); color: #22D3EE; border: 1px solid rgba(6, 182, 212, 0.25); }
.stat-icon.green  { background: rgba(16, 185, 129, 0.15); color: #34D399; border: 1px solid rgba(16, 185, 129, 0.25); }
.stat-icon.amber  { background: rgba(245, 158, 11, 0.15); color: #FBBF24; border: 1px solid rgba(245, 158, 11, 0.25); }
.stat-icon.red    { background: rgba(239, 68, 68, 0.15); color: #F87171; border: 1px solid rgba(239, 68, 68, 0.25); }
.stat-icon.purple { background: rgba(139, 92, 246, 0.15); color: #A78BFA; border: 1px solid rgba(139, 92, 246, 0.25); }

.stat-icon svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    stroke-width: 2.2px;
    fill: none;
}

.stat-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 8px;
    letter-spacing: 0.2px;
}

.stat-badge.up      { background: rgba(16, 185, 129, 0.12); color: #34D399; border: 1px solid rgba(16, 185, 129, 0.15); }
.stat-badge.down    { background: rgba(239, 68, 68, 0.12);  color: #F87171; border: 1px solid rgba(239, 68, 68, 0.15); }
.stat-badge.neutral { background: rgba(255, 255, 255, 0.06); color: var(--text-secondary); border: 1px solid rgba(255, 255, 255, 0.08); }

.stat-value {
    font-size: 32px;
    font-weight: 800;
    color: #FFFFFF;
    letter-spacing: -1px;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 13.5px;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-card-bg {
    position: absolute;
    bottom: -15px;
    right: -15px;
    width: 90px;
    height: 90px;
    opacity: 0.03;
    pointer-events: none;
    transition: var(--transition);
    color: #FFFFFF;
}

.stat-card-bg svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    stroke-width: 1.5px;
}

.stat-card:hover .stat-card-bg {
    opacity: 0.07;
    transform: scale(1.15) rotate(-5deg);
}

/* Card Module Component */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    border-color: rgba(255, 255, 255, 0.18);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.01);
}

.card-title {
    font-size: 15px;
    font-weight: 700;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title svg {
    width: 18px;
    height: 18px;
    stroke: var(--accent);
    stroke-width: 2.2px;
}

.card-action {
    font-size: 12.5px;
    color: #A5B4FC;
    font-weight: 600;
    cursor: pointer;
    background: none;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-action:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
}

.card-body {
    padding: 20px 24px;
}

/* Dashboard layouts */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
    margin-bottom: 24px;
    animation: fadeInDown 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s both;
}

.dashboard-grid-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    animation: fadeInDown 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) 0.3s both;
}

@media (max-width: 1100px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .dashboard-grid-bottom {
        grid-template-columns: 1fr;
    }
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .responsive-split {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 560px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Today's Classes List */
.session-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: #E2E8F0;
    font-size: 11px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 8px;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.session-tag svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 2px;
}

.session-divider {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0 12px;
}

.session-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.class-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.class-row:last-child {
    border-bottom: none;
}

.class-grade-badge {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    flex-shrink: 0;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.02);
}

.class-grade-badge.indigo { background: rgba(99, 102, 241, 0.1);  color: #818CF8; border: 1px solid rgba(99, 102, 241, 0.15); }
.class-grade-badge.cyan   { background: rgba(6, 182, 212, 0.1);  color: #22D3EE; border: 1px solid rgba(6, 182, 212, 0.15); }
.class-grade-badge.green  { background: rgba(16, 185, 129, 0.1); color: #34D399; border: 1px solid rgba(16, 185, 129, 0.15); }
.class-grade-badge.purple { background: rgba(139, 92, 246, 0.1); color: #A78BFA; border: 1px solid rgba(139, 92, 246, 0.15); }
.class-grade-badge.amber  { background: rgba(245, 158, 11, 0.1); color: #FBBF24; border: 1px solid rgba(245, 158, 11, 0.15); }

.class-details {
    flex: 1;
    min-width: 0;
}

.class-name {
    font-size: 14px;
    font-weight: 600;
    color: #FFFFFF;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.class-meta {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 3px;
}

.class-status {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

.class-status.ongoing  { background: rgba(16, 185, 129, 0.12); color: #34D399; border: 1px solid rgba(16, 185, 129, 0.15); }
.class-status.upcoming { background: rgba(245, 158, 11, 0.12);  color: #FBBF24; border: 1px solid rgba(245, 158, 11, 0.15); }
.class-status.done     { background: rgba(255, 255, 255, 0.06); color: var(--text-secondary); border: 1px solid rgba(255, 255, 255, 0.08); }

/* Activity Feed */
.activity-feed {
    display: flex;
    flex-direction: column;
}

.activity-item {
    display: flex;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-dot {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.02);
}

.activity-dot.green  { background: rgba(16, 185, 129, 0.12); color: #34D399; border: 1px solid rgba(16, 185, 129, 0.15); }
.activity-dot.indigo { background: rgba(99, 102, 241, 0.12); color: #818CF8; border: 1px solid rgba(99, 102, 241, 0.15); }
.activity-dot.amber  { background: rgba(245, 158, 11, 0.12);  color: #FBBF24; border: 1px solid rgba(245, 158, 11, 0.15); }
.activity-dot.cyan   { background: rgba(6, 182, 212, 0.12);  color: #22D3EE; border: 1px solid rgba(6, 182, 212, 0.15); }
.activity-dot.purple { background: rgba(139, 92, 246, 0.12); color: #A78BFA; border: 1px solid rgba(139, 92, 246, 0.15); }
.activity-dot.red    { background: rgba(239, 68, 68, 0.12);   color: #F87171; border: 1px solid rgba(239, 68, 68, 0.15); }

.activity-dot svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2px;
    fill: none;
}

.activity-text {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    line-height: 1.4;
}

.activity-text strong {
    color: #FFFFFF;
}

.activity-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Attendance Progress Widgets */
.progress-item {
    margin-bottom: 16px;
}

.progress-item:last-child {
    margin-bottom: 0;
}

.progress-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.progress-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 600;
}

.progress-value {
    font-size: 13px;
    font-weight: 700;
    color: #FFFFFF;
}

.progress-bar-wrap {
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.02);
}

.progress-bar-fill {
    height: 100%;
    border-radius: 4px;
    animation: growWidth 1.4s cubic-bezier(0.25, 0.8, 0.25, 1) both;
}

@keyframes growWidth {
    from { width: 0 !important; }
}

.progress-bar-fill.indigo { background: linear-gradient(90deg, #6366F1, #818CF8); box-shadow: 0 0 8px rgba(99, 102, 241, 0.4); }
.progress-bar-fill.green  { background: linear-gradient(90deg, #10B981, #34D399); box-shadow: 0 0 8px rgba(16, 185, 129, 0.4); }
.progress-bar-fill.amber  { background: linear-gradient(90deg, #F59E0B, #FCD34D); box-shadow: 0 0 8px rgba(245, 158, 11, 0.4); }
.progress-bar-fill.cyan   { background: linear-gradient(90deg, #06B6D4, #67E8F9); box-shadow: 0 0 8px rgba(6, 182, 212, 0.4); }

/* Fee Collection Mini Cards */
.fee-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 20px;
}

.fee-mini-card {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.fee-mini-card:hover {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.05);
}

.fee-mini-label {
    font-size: 10.5px;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
}

.fee-mini-value {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.fee-mini-sub {
    font-size: 11.5px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.fee-mini-value.collected { color: #34D399; }
.fee-mini-value.pending   { color: #F87171; }

/* Quick Action Grid Buttons */
.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
    text-align: left;
}

.quick-action-btn:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.quick-action-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.02);
}

.quick-action-icon.indigo { background: rgba(99, 102, 241, 0.12); color: #818CF8; border: 1px solid rgba(99, 102, 241, 0.15); }
.quick-action-icon.green  { background: rgba(16, 185, 129, 0.12); color: #34D399; border: 1px solid rgba(16, 185, 129, 0.15); }
.quick-action-icon.amber  { background: rgba(245, 158, 11, 0.12);  color: #FBBF24; border: 1px solid rgba(245, 158, 11, 0.15); }
.quick-action-icon.red    { background: rgba(239, 68, 68, 0.12);   color: #F87171; border: 1px solid rgba(239, 68, 68, 0.15); }

.quick-action-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2px;
}

.quick-action-info {
    min-width: 0;
}

.quick-action-text {
    font-size: 13px;
    font-weight: 600;
    color: #FFFFFF;
}

.quick-action-sub {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =============================================
   STUDENT MANAGEMENT MODULE CUSTOM STYLES
   ============================================= */

/* Buttons */
.btn-primary-glow {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 10px 20px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

.btn-primary-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.55);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-danger-glow {
    background: linear-gradient(135deg, #EF4444 0%, #B91C1C 100%);
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px 20px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-danger-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.5);
    border-color: rgba(255, 255, 255, 0.25);
}

.btn-secondary-dark {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 20px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary-dark:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
    border-color: rgba(255, 255, 255, 0.15);
}

/* Toolbar & Expandable Filters */
.toolbar-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    animation: fadeInDown 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) 0.1s both;
}

.search-input-wrapper {
    position: relative;
    max-width: 400px;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.search-input-wrapper .form-input-dark {
    padding-left: 42px;
}

.filter-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.filter-toggle-btn.active {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.35);
    color: #FFFFFF;
}

.filters-dropdown-panel {
    margin-bottom: 20px;
    animation: slideDown 0.25s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 16px 20px !important;
}

@media (max-width: 768px) {
    .filters-grid {
        grid-template-columns: 1fr;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Inputs & Form Elements */
.form-input-dark, .form-select-dark {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: #FFFFFF;
    font-size: 13.5px;
    padding: 10px 14px;
    outline: none;
    transition: var(--transition);
    width: 100%;
    font-family: 'Inter', sans-serif;
}

.form-input-dark:focus, .form-select-dark:focus {
    border-color: var(--primary);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.25);
    background: rgba(0, 0, 0, 0.35);
}

.form-select-dark option {
    background: #111026;
    color: #FFFFFF;
}

.form-label-dark {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Table Design */
.table-card {
    animation: fadeInDown 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s both;
    overflow-x: auto;
}

.glass-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    color: #E2E8F0;
    text-align: left;
}

.glass-table th {
    padding: 16px 20px;
    font-weight: 700;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.01);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 1px;
}

.glass-table td {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
}

.glass-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.glass-table tbody tr:last-child td {
    border-bottom: none;
}

/* Chips & Badges */
.student-name-chip {
    display: flex;
    align-items: center;
    gap: 12px;
}

.student-avatar-mini {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #FFFFFF;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.15);
}

.badge-medium {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
}

.badge-medium.english {
    background: rgba(99, 102, 241, 0.12);
    color: #818CF8;
    border: 1px solid rgba(99, 102, 241, 0.15);
}

.badge-medium.gujarati {
    background: rgba(6, 182, 212, 0.12);
    color: #22D3EE;
    border: 1px solid rgba(6, 182, 212, 0.15);
}

.batch-label-text {
    font-weight: 600;
    color: #A5B4FC;
}

.parent-info-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.parent-name {
    font-weight: 600;
    color: #FFFFFF;
}

.parent-phone {
    font-size: 11.5px;
    color: var(--text-secondary);
}

/* Actions */
.actions-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    background: transparent;
}

.action-icon-btn.view {
    color: #34D399; /* Emerald green tint */
}

.action-icon-btn.view:hover {
    background: rgba(52, 211, 153, 0.12);
    border-color: rgba(52, 211, 153, 0.25);
    color: #FFFFFF;
}

.action-icon-btn.edit {
    color: #A5B4FC;
}

.action-icon-btn.edit:hover {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.25);
    color: #FFFFFF;
}

.action-icon-btn.delete {
    color: #F87171;
}

.action-icon-btn.delete:hover {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.25);
    color: #FFFFFF;
}

/* Glass Modal / Slide Drawer Dialogs */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 4, 15, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal-card {
    background: rgba(20, 18, 55, 0.45);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 650px;
    overflow: hidden;
    animation: modalSlideUp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.modal-card.delete-modal {
    max-width: 480px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.01);
}

.modal-title {
    font-size: 17px;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    transition: var(--transition);
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #FFFFFF;
}

.modal-body {
    padding: 24px;
    max-height: 75vh;
    overflow-y: auto;
}

.modal-body::-webkit-scrollbar {
    width: 4px;
}
.modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 16px;
    margin-top: 24px;
    border-top: 1px solid var(--border);
}

/* Form Layout Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.form-group-full {
    grid-column: span 2;
}

.form-group {
    grid-column: span 1;
}

@media (max-width: 580px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    .form-group, .form-group-full {
        grid-column: span 1;
    }
}

/* Floating Success Toast Alert */
.toast-alert {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 12px;
    color: #FFFFFF;
    font-size: 13.5px;
    font-weight: 600;
    z-index: 2000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    animation: toastSlideIn 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.toast-alert.success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    backdrop-filter: blur(12px);
    color: #34D399;
}

.delete-icon-wrap {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.1);
}

/* Spinners */
.spinner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
    color: var(--text-secondary);
}

.spinner-large {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state svg {
    color: rgba(255, 255, 255, 0.15);
    margin-bottom: 16px;
}

.empty-state h3 {
    color: #FFFFFF;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

/* Animations keyframes */
@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ── DETAILED academic PROFILE MODAL ────────────────── */
.detail-view-modal {
    max-width: 850px;
    width: 100%;
}

.student-header-title {
    display: flex;
    align-items: center;
    gap: 16px;
}

.student-avatar-large {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: #FFFFFF;
    box-shadow: 0 6px 15px rgba(99, 102, 241, 0.25);
}

.detail-modal-body {
    padding: 24px;
}

.detail-split-layout {
    display: flex;
    gap: 24px;
}

.detail-left-pane {
    width: 35%;
    display: flex;
    flex-direction: column;
}

.detail-right-pane {
    width: 65%;
    display: flex;
    flex-direction: column;
    min-width: 0; /* Prevents flex items from breaking layouts */
}

@media (max-width: 768px) {
    .detail-split-layout {
        flex-direction: column;
    }
    .detail-left-pane, .detail-right-pane {
        width: 100%;
    }
}

/* Info Cards */
.info-glass-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px;
}

.info-section-title {
    font-size: 13px;
    font-weight: 700;
    color: #FFFFFF;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 8px;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.info-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 14px;
}

.info-row:last-child {
    margin-bottom: 0;
}

.info-label {
    font-size: 10.5px;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 13.5px;
    font-weight: 600;
    color: #FFFFFF;
}

/* Tab Headers */
.detail-tabs-header {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 18px;
    overflow-x: auto;
}

.detail-tabs-header::-webkit-scrollbar {
    height: 3px;
}

.detail-tab-btn {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 10px 16px;
    color: var(--text-secondary);
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
}

.detail-tab-btn:hover {
    color: #FFFFFF;
}

.detail-tab-btn.active {
    color: #FFFFFF;
    font-weight: 700;
    border-bottom-color: var(--primary);
    margin-bottom: -1px;
}

/* Detail Listing Row Items */
.pane-subtitle {
    font-size: 14px;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 16px;
}

.detail-list {
    display: flex;
    flex-direction: column;
    max-height: 360px;
    overflow-y: auto;
    padding-right: 4px;
}

.detail-list::-webkit-scrollbar {
    width: 4px;
}

.detail-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
}

.detail-list-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    margin-bottom: 10px;
    transition: var(--transition);
}

.detail-list-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
    transform: translateX(2px);
}

.item-icon-circle {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.item-icon-circle.indigo { background: rgba(99, 102, 241, 0.12); color: #818CF8; border: 1px solid rgba(99, 102, 241, 0.15); }
.item-icon-circle.green  { background: rgba(16, 185, 129, 0.12); color: #34D399; border: 1px solid rgba(16, 185, 129, 0.15); }
.item-icon-circle.amber  { background: rgba(245, 158, 11, 0.12);  color: #FBBF24; border: 1px solid rgba(245, 158, 11, 0.15); }
.item-icon-circle.red    { background: rgba(239, 68, 68, 0.12);   color: #F87171; border: 1px solid rgba(239, 68, 68, 0.15); }
.item-icon-circle.cyan   { background: rgba(6, 182, 212, 0.12);  color: #22D3EE; border: 1px solid rgba(6, 182, 212, 0.15); }

.item-icon-circle svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

.item-info {
    flex: 1;
    min-width: 0;
}

.item-title {
    font-size: 13.5px;
    font-weight: 600;
    color: #FFFFFF;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-desc {
    font-size: 11.5px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Scores & Status Layout */
.item-score {
    text-align: right;
    font-family: 'Inter', sans-serif;
}

.score-obtained {
    font-size: 15px;
    font-weight: 800;
    color: #FFFFFF;
}

.score-divider {
    color: var(--text-muted);
    margin: 0 1px;
}

.score-total {
    font-size: 12.5px;
    color: var(--text-secondary);
}

.item-status {
    flex-shrink: 0;
}

/* Animations */
.animate-fade {
    animation: fadeIn 0.2s ease-out both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── ATTENDANCE STATUS CAPSULE ───────────────────── */
.status-capsule {
    display: flex;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 30px;
    padding: 3px;
    overflow: hidden;
    width: fit-content;
}

.capsule-btn {
    border: none;
    background: transparent;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
}

.capsule-btn:hover:not(.active) {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.04);
}

.capsule-btn.present.active {
    background: #10B981;
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.capsule-btn.absent.active {
    background: #EF4444;
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.capsule-btn.late.active {
    background: #F59E0B;
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.stats-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.controls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Attendance Metric Cards */
.stats-overview-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

@media (max-width: 992px) {
    .stats-overview-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .stats-overview-grid {
        grid-template-columns: 1fr;
    }
}

.metric-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: var(--transition);
}

.metric-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.metric-value {
    font-size: 26px;
    font-weight: 800;
    color: #FFFFFF;
    line-height: 1.2;
}

.metric-label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-top: 6px;
}

.text-nowrap {
    white-space: nowrap !important;
}

/* Custom File Upload Styling */
.custom-file-upload {
    position: relative;
    width: 100%;
}

.file-input-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.file-upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.file-upload-label:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--primary);
    color: #FFFFFF;
}

/* ── WEEKLY CALENDAR BOARD ───────────────────────── */
.weekly-calendar-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    align-items: start;
    margin-bottom: 30px;
}

@media (max-width: 1400px) {
    .weekly-calendar-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .weekly-calendar-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .weekly-calendar-grid {
        grid-template-columns: 1fr;
    }
}

.calendar-day-column {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    overflow: hidden;
}

.day-column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.day-name-title {
    font-size: 13px;
    font-weight: 700;
    color: #FFFFFF;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.day-slots-count {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 600;
}

.day-empty-state {
    font-size: 12px;
    text-align: center;
    padding: 24px 0;
    color: var(--text-secondary);
    font-style: italic;
    border: 1px dashed rgba(255, 255, 255, 0.04);
    border-radius: 8px;
}

.calendar-slot-chip {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-left: 3px solid var(--primary);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 10px;
    transition: var(--transition);
}

.calendar-slot-chip:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.05);
}

.slot-time-badge {
    font-size: 10.5px;
    font-weight: 700;
    color: #A5B4FC;
    font-family: 'Inter', sans-serif;
}

.slot-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #FFFFFF;
    margin-top: 4px;
}

.slot-batch {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 2px;
}

.slot-teacher {
    font-size: 11.5px;
    color: #93C5FD;
    font-weight: 600;
    margin-top: 6px;
}

.slot-classroom {
    font-size: 10.5px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 2px 6px;
    border-radius: 6px;
    color: #C7D2FE;
    font-weight: 600;
}

.slot-actions {
    display: flex;
    gap: 4px;
}

/* ── ANNOUNCEMENTS BROADCAST FEED ────────────────── */
.announcement-feed-card {
    transition: var(--transition);
}

.announcement-feed-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.04);
}

.btn-attachment-capsule {
    transition: var(--transition);
}

.btn-attachment-capsule:hover {
    background: rgba(129, 140, 248, 0.12) !important;
    border-color: rgba(129, 140, 248, 0.3) !important;
    box-shadow: 0 4px 12px rgba(129, 140, 248, 0.1);
}

/* ── MESSAGING & PROMOTE SYSTEM ──────────────────── */
.messages-three-panel-layout {
    font-family: 'Inter', sans-serif;
}

@media (max-width: 1200px) {
    .messages-three-panel-layout {
        grid-template-columns: 280px 1fr !important;
    }
    .messages-three-panel-layout > div:last-child {
        display: none !important; /* Hide preview on tablets/mobile admin views */
    }
}

@media (max-width: 900px) {
    .messages-three-panel-layout {
        grid-template-columns: 1fr !important;
    }
    .messages-three-panel-layout > div:first-child {
        display: none !important;
    }
}

.inbox-thread-tile {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    align-items: center;
    border: 1px solid transparent;
    margin-bottom: 6px;
}

.inbox-thread-tile:hover {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.04);
}

.inbox-thread-tile.active {
    background: rgba(99, 102, 241, 0.06);
    border-color: rgba(99, 102, 241, 0.15);
}

.chat-avatar-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-weight: 700;
    font-size: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.chat-online-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 10px;
    height: 10px;
    background: #10B981;
    border: 2px solid #0D0E12;
    border-radius: 50%;
}

.thread-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0;
}

.thread-time {
    font-size: 10px;
    color: var(--text-secondary);
}

.thread-subtitle {
    font-size: 11px;
    color: #818CF8;
    font-weight: 600;
    margin-top: 2px;
}

.thread-preview {
    font-size: 11.5px;
    color: var(--text-secondary);
    margin: 4px 0 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.unread-badge {
    background: var(--primary);
    color: #FFFFFF;
    font-size: 10px;
    font-weight: 700;
    border-radius: 20px;
    padding: 2px 6px;
    box-shadow: 0 0 8px var(--primary-glow);
}

/* Bubbles stream rules */
.chat-bubble-wrapper {
    display: flex;
    width: 100%;
}

.chat-bubble-wrapper.outgoing {
    justify-content: flex-end;
}

.chat-bubble-wrapper.incoming {
    justify-content: flex-start;
}

.chat-bubble {
    max-width: 70%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 13px;
    line-height: 1.5;
}

.outgoing .chat-bubble {
    background: linear-gradient(135deg, #6366F1, #4F46E5);
    color: #FFFFFF;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.15);
}

.incoming .chat-bubble {
    background: rgba(255, 255, 255, 0.03);
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom-left-radius: 4px;
}

.bubble-time {
    font-size: 9.5px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 4px;
    text-align: right;
}

.incoming .bubble-time {
    color: var(--text-secondary);
}

/* SMARTPHONE DEVICE PREVIEW FRAME */
.mobile-device-frame {
    width: 100%;
    height: 360px;
    background: #09090B;
    border: 6px solid #27272A;
    border-radius: 28px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.mobile-top-bar {
    height: 24px;
    background: #18181B;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.mobile-time {
    font-size: 9px;
    color: #A1A1AA;
    font-weight: 600;
}

.mobile-app-content {
    flex-grow: 1;
    position: relative;
    background: #0F0F12;
}

/* Spoken English Popup components mockup inside phone */
.mobile-ad-popup-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

.mobile-ad-popup-card {
    background: #18181B;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 16px 12px;
    width: 100%;
    text-align: center;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleIn {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.mobile-ad-popup-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: #71717A;
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.mobile-ad-popup-badge {
    background: rgba(239, 68, 68, 0.08);
    color: #F87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
    font-size: 8px;
    font-weight: 800;
    border-radius: 20px;
    padding: 2px 8px;
    display: inline-block;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.mobile-ad-popup-speaker {
    font-size: 26px;
    margin-bottom: 6px;
}

.mobile-ad-popup-title {
    font-size: 11.5px;
    font-weight: 800;
    color: #FFFFFF;
    margin: 0 0 6px 0;
    letter-spacing: 0.5px;
}

.mobile-ad-popup-msg {
    font-size: 9.5px;
    color: #A1A1AA;
    line-height: 1.4;
    margin: 0 0 12px 0;
}

.mobile-ad-popup-enroll-btn {
    background: linear-gradient(135deg, #6366F1, #4F46E5);
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    width: 100%;
    padding: 8px;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.2);
}

/* =============================================
   MOBILE SHELL — off-canvas sidebar + topbar
   ============================================= */
@media (max-width: 900px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 260px;
        min-width: 260px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 300;
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    /* icon-collapse rail is a desktop-only affordance; on mobile the sidebar is
       either fully hidden or fully open, so ignore the collapsed width shrink */
    .sidebar.collapsed {
        width: 260px;
        min-width: 260px;
    }
    .sidebar.collapsed .sidebar-brand,
    .sidebar.collapsed .nav-section-label,
    .sidebar.collapsed .nav-label,
    .sidebar.collapsed .sidebar-user-info {
        opacity: 1;
        width: auto;
        pointer-events: auto;
    }

    .main-area {
        width: 100%;
    }

    .topbar {
        padding: 0 14px;
        gap: 10px;
    }

    .topbar-breadcrumb {
        gap: 0;
        overflow: hidden;
    }

    .topbar-breadcrumb > span:first-child,
    .topbar-breadcrumb > span:nth-child(2) {
        display: none;
    }

    .breadcrumb-current {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .topbar-right {
        gap: 8px;
    }

    .topbar-btn {
        width: 36px;
        height: 36px;
    }

    .topbar-user {
        padding: 6px;
    }

    .topbar-user-name,
    .topbar-user-role {
        display: none;
    }

    .page-content {
        padding: 16px;
    }
}

/* =============================================
   MOBILE RECORD CARDS — swap-in for data tables
   on small screens. Desktop keeps the glass-table;
   mobile shows .mobile-card-list instead.
   ============================================= */
.mobile-card-list {
    display: none;
}

@media (max-width: 768px) {
    .desktop-table-view {
        display: none;
    }

    .mobile-card-list {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding: 4px;
    }

    .record-card {
        background: var(--card-bg);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        border: 1px solid var(--border);
        border-radius: 16px;
        padding: 16px;
        box-shadow: var(--shadow-sm);
        transition: var(--transition);
    }

    .record-card:active {
        border-color: rgba(255, 255, 255, 0.18);
    }

    .record-card-top {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 10px;
        margin-bottom: 14px;
        padding-bottom: 14px;
        border-bottom: 1px solid var(--border);
    }

    .record-card-identity {
        display: flex;
        align-items: center;
        gap: 12px;
        min-width: 0;
    }

    .record-card-title {
        font-size: 14.5px;
        font-weight: 700;
        color: #FFFFFF;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .record-card-subtitle {
        font-size: 12px;
        color: var(--text-secondary);
        margin-top: 2px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .record-card-fields {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px 16px;
        margin-bottom: 14px;
    }

    .record-card-field {
        display: flex;
        flex-direction: column;
        gap: 3px;
        min-width: 0;
    }

    .record-card-field.full {
        grid-column: 1 / -1;
    }

    .record-card-field .field-label {
        font-size: 10px;
        font-weight: 700;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.35);
    }

    .record-card-field .field-value {
        font-size: 13px;
        font-weight: 600;
        color: #E2E8F0;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .record-card-actions {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 8px;
        padding-top: 12px;
        border-top: 1px solid var(--border);
    }

    .record-card-actions .action-icon-btn {
        width: 36px;
        height: 36px;
    }
}

