@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring-subtle: cubic-bezier(0.34, 1.25, 0.64, 1);
}

h1, h2, h3, h4, .quick-link-title, .modal-header-title {
    font-family: 'Outfit', sans-serif !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em !important;
}

.hidden {
    display: none !important;
}

.app-container {
    display: flex !important;
    flex-direction: column !important;
    width: 100vw !important;
    height: 100vh !important;
    overflow: hidden !important;
}

.main-wrapper {
    flex: 1 !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    overflow-y: auto !important;
    height: calc(100vh - 60px) !important;
    padding: 24px 32px 40px !important;
    margin: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* --- Quick Links Grid --- */
.quick-links-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
    margin-bottom: 20px !important;
    width: 100% !important;
}

.quick-link-anchor {
    text-decoration: none;
}

.quick-link-card {
    cursor: pointer;
    border: 1px solid var(--border-color, oklch(89% 0.015 250));
    border-top: 3.5px solid var(--primary-blue, oklch(50% 0.22 260));
    background: var(--card-bg, #ffffff);
    border-radius: 14px;
    box-shadow: 0 4px 16px -4px rgba(15, 23, 42, 0.05);
    transition: transform 220ms var(--ease-out-quint), box-shadow 220ms var(--ease-out-quint), border-color 220ms var(--ease-out-quint) !important;
    height: 100%;
    position: relative;
    user-select: none;
}

.quick-link-card:nth-child(1) {
    border-top-color: var(--primary-blue, oklch(52% 0.20 260));
}
.quick-link-card:nth-child(2) {
    border-top-color: var(--accent-gold, oklch(68% 0.16 75));
}
.quick-link-card:nth-child(3) {
    border-top-color: var(--color-success, oklch(52% 0.17 155));
}
.quick-link-card:nth-child(4) {
    border-top-color: var(--color-purple, oklch(50% 0.18 300));
}

.quick-link-card:hover {
    transform: translateY(-4px) !important;
}
.quick-link-card:active {
    transform: translateY(-1px) scale(0.985) !important;
    transition-duration: 90ms !important;
}

.quick-link-card:nth-child(1):hover {
    box-shadow: 0 14px 28px -6px rgba(37, 99, 235, 0.22) !important;
}
.quick-link-card:nth-child(2):hover {
    box-shadow: 0 14px 28px -6px rgba(234, 179, 8, 0.22) !important;
}
.quick-link-card:nth-child(3):hover {
    box-shadow: 0 14px 28px -6px rgba(16, 185, 129, 0.22) !important;
}
.quick-link-card:nth-child(4):hover {
    box-shadow: 0 14px 28px -6px rgba(168, 85, 247, 0.22) !important;
}

.quick-link-card .quick-link-icon-container,
.quick-link-card svg {
    transition: transform 220ms var(--ease-spring-subtle) !important;
}
.quick-link-card:hover .quick-link-icon-container,
.quick-link-card:hover svg {
    transform: scale(1.1) rotate(4deg) !important;
}

/* --- Search Bar Container --- */
.search-wrapper {
    display: flex;
    gap: 10px;
    width: 100%;
}

.search-input-code {
    flex: 1;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 1px;
    margin: 0;
    height: 48px;
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    background: var(--input-bg);
    transition: border-color 0.2s var(--ease-out-quint), box-shadow 0.2s var(--ease-out-quint), transform 0.2s var(--ease-out-quint);
}

.search-input-code:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3.5px rgba(30, 94, 255, 0.18);
    outline: none;
    transform: translateY(-1px);
}

.search-btn-custom {
    width: 100px;
    font-weight: 700;
    font-size: 15px;
    margin: 0;
    height: 48px;
    flex-shrink: 0;
    background: var(--primary-blue);
    color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 12px var(--primary-blue-glow);
}

.error-box {
    padding: 14px 16px;
    background: var(--color-danger-bg);
    color: var(--color-danger);
    border: 1px solid var(--color-danger-border);
    border-radius: 10px;
    font-size: 14px;
    margin-top: 16px;
    text-align: center;
    font-weight: 600;
}

.success-box {
    padding: 14px 16px;
    background: var(--color-success-bg);
    color: var(--color-success);
    border: 1px solid var(--color-success-border);
    border-radius: 10px;
    font-size: 14px;
    margin-top: 16px;
    text-align: center;
    font-weight: 600;
}

.warning-box {
    padding: 14px 16px;
    background: var(--color-warning-bg);
    color: var(--color-warning);
    border: 1px solid var(--color-warning-border);
    border-radius: 10px;
    font-size: 14px;
    margin-top: 16px;
    text-align: center;
    font-weight: 600;
}

/* --- Hero Profile & Behavior Banner --- */
.hero-point-card {
    background: linear-gradient(135deg, oklch(35% 0.13 255) 0%, oklch(22% 0.06 250) 65%, oklch(30% 0.11 45) 100%);
    color: white;
    border-radius: 18px;
    padding: 24px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    box-shadow: 0 14px 32px -4px rgba(15, 23, 42, 0.22), 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
    width: 100% !important;
    box-sizing: border-box !important;
    position: relative;
    overflow: hidden;
}

.hero-point-card::after {
    content: '';
    position: absolute;
    top: -40%;
    right: -15%;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(217, 119, 6, 0.28) 0%, rgba(217, 119, 6, 0) 70%);
    pointer-events: none;
}

.hero-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent-gold);
    font-weight: 800;
}

.student-name-heading {
    margin: 4px 0 2px 0;
    font-size: clamp(18px, 5vw, 24px);
    font-weight: 800;
    word-break: break-word;
}

.student-class-badge {
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(4px);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    display: inline-block;
    margin-top: 6px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    letter-spacing: 0.3px;
}

.hero-point-badge {
    font-size: clamp(2.2rem, 7vw, 3rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -1px;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* --- Dashboard Grid & Cards --- */
.box {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    /* Clips wide children inside card */
    padding: 20px !important;
    margin-bottom: 20px !important;
}

.profile-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 16px !important;
    width: 100% !important;
}

/* --- Table Overrides (Fixes 550px Min-Width Bug) --- */
.table-responsive {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    min-height: 0 !important;
    border-radius: 8px !important;
    -webkit-overflow-scrolling: touch !important;
    display: block !important;
}

.table-responsive table {
    width: 100% !important;
    min-width: 0 !important;
    /* CRITICAL FIX: Removes admin.css 550px min-width */
    table-layout: auto !important;
    white-space: normal !important;
}

th,
td {
    padding: 10px 12px !important;
    font-size: 13px !important;
    word-break: break-word !important;
}

.live-updates-tag {
    background: #eef2ff;
    color: var(--primary-blue);
    font-size: 12px;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
}

/* ======================================================
   MOBILE & TABLET RESPONSIVE BREAKPOINTS (iPhone 13 / iPads)
   ====================================================== */
@media screen and (max-width: 992px) {
    .dashboard-grid {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: 1fr !important;
        gap: 18px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .dashboard-left-col,
    .dashboard-grid > div,
    .dashboard-grid > .box,
    #newsTicker {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }
}

@media screen and (max-width: 768px) {
    .main-wrapper {
        padding: 12px 12px 32px !important;
    }

    .student-header {
        padding: 12px 16px !important;
    }

    .quick-links-grid,
    .profile-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .hero-point-card {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
        padding: 16px !important;
    }

    .hero-point-card>div:last-child {
        text-align: left !important;
    }

    .hero-point-badge {
        text-align: left !important;
    }

    .box {
        padding: 14px !important;
    }

    .search-wrapper {
        flex-direction: row !important;
        gap: 8px !important;
    }

    .search-input-code {
        height: 44px !important;
        font-size: 14px !important;
    }

    .search-btn-custom {
        height: 44px !important;
        width: 80px !important;
        font-size: 14px !important;
    }
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    /* Space between dark mode and teacher button */
}

/* Styling for the For Teacher button */
.teacher-btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: #2b6cb0;
    color: #ffffff;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.teacher-btn:hover {
    background-color: #2c5282;
}

/* ======================================================
   REDESIGNED SCHOOL NOTICES CARD LAYOUT
   ====================================================== */

.notice-card {
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.notice-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
}

/* Header Row: Title on Left, Small Date Tag on Right */
.notice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--border-color, #e2e8f0);
}

.notice-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-blue, #1e5eff);
    line-height: 1.3;
}

/* Small, subtle date badge */
.notice-date-tag {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-gray, #707eae);
    background: var(--bg-body, #f4f7fe);
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid var(--border-color, #e2e8f0);
    white-space: nowrap;
}

/* Notice Content Body - Prominent & Easy to Read */
.notice-body {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-dark, #2b3674);
    white-space: pre-wrap;
    word-break: break-word;
    font-weight: 400;
}

/* ==========================================================================
   LOGO & ICON SIZING FIXES
   ========================================================================== */

/* 1. Header Layout & Yellow Logo Box Fix */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 2px;
}

/* Enforce sleek, proportional dimensions on the brand logo box */
.brand-badge,
.brand-logo-container,
.brand>div:first-child {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    background-color: #ffffff !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 4px !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12) !important;
}

/* Force the logo image to scale down inside the box */
.brand-badge-img,
.brand-logo-container img,
.brand>div:first-child img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    display: block !important;
}

/* 2. Topbar Action Buttons & Icons Fix */
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-toggle-btn,
.teacher-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 8px 16px !important;
    height: 42px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    cursor: pointer;
    box-sizing: border-box;
}

/* Restrict topbar button icons */
.btn-icon {
    width: 20px !important;
    height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    object-fit: contain !important;
    flex-shrink: 0 !important;
    display: inline-block;
}

/* 3. Quick Link Cards & Icon Containers Fix */
.quick-link-card {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Fixed container box for Quiz & Timeline icons */
.stat-icon {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    border-radius: 10px;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
}

/* Restrict card icons */
.stat-icon-img {
    width: 26px !important;
    height: 26px !important;
    max-width: 26px !important;
    max-height: 26px !important;
    object-fit: contain !important;
    display: block;
}

/* ======================================================
   REDESIGNED STUDENT PORTAL SIDEBAR & HERO BANNER
   ====================================================== */
.sidebar,
.student-sidebar {
    width: 100vw !important;
    height: 60px !important;
    min-height: 60px !important;
    max-height: 60px !important;
    background: var(--sidebar-bg, #0b1437) !important;
    color: white !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 24px !important;
    box-sizing: border-box !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    z-index: 1000 !important;
    position: relative !important;
    flex-shrink: 0 !important;
}

.student-greeting-banner {
    background-color: #ffffff;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 20px;
    padding: 32px 36px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
    min-height: 160px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
}

.dark-theme .student-greeting-banner {
    background-color: #0f172a;
    border-color: #1e293b;
}

/* Birthday Celebratory Banner State */
.student-greeting-banner.birthday-active {
    background: linear-gradient(135deg, #eff6ff 0%, #fdf2f8 50%, #fef3c7 100%) !important;
    border: 1.5px solid #f472b6 !important;
    box-shadow: 0 10px 25px -5px rgba(244, 114, 182, 0.25) !important;
}

body.dark-theme .student-greeting-banner.birthday-active,
body.dark-mode .student-greeting-banner.birthday-active {
    background: linear-gradient(135deg, #1e1b4b 0%, #311042 50%, #451a03 100%) !important;
    border: 1.5px solid #ec4899 !important;
    box-shadow: 0 10px 25px -5px rgba(236, 72, 153, 0.3) !important;
}

.student-greeting-banner.birthday-active .greeting-title {
    background: linear-gradient(135deg, #1e40af, #db2777, #d97706);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.dark-theme .student-greeting-banner.birthday-active .greeting-title,
body.dark-mode .student-greeting-banner.birthday-active .greeting-title {
    background: linear-gradient(135deg, #93c5fd, #f472b6, #fde047);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.student-greeting-banner.birthday-active .greeting-subtitle {
    color: #db2777 !important;
    font-weight: 600 !important;
}

body.dark-theme .student-greeting-banner.birthday-active .greeting-subtitle,
body.dark-mode .student-greeting-banner.birthday-active .greeting-subtitle {
    color: #f9a8d4 !important;
}

.greeting-text-container {
    z-index: 2;
    max-width: 55%;
    position: relative;
}

.greeting-title {
    margin: 0 0 6px 0;
    font-size: 26px;
    font-weight: 800;
    color: var(--text-dark, #0f172a);
    letter-spacing: -0.5px;
}

.dark-theme .greeting-title {
    color: #ffffff;
}

.greeting-subtitle {
    margin: 0;
    font-size: 15px;
    color: var(--text-gray, #64748b);
    font-weight: 500;
}

.school-building-img-wrapper {
    position: absolute;
    right: 0;
    bottom: 0;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.school-building-img,
.school-building-video {
    position: absolute;
    right: 0;
    top: 0;
    width: 60%;
    height: 100%;
    object-fit: cover;
    object-position: center right;
    -webkit-mask-image: linear-gradient(to left, rgba(0, 0, 0, 1) 40%, rgba(0, 0, 0, 0) 100%);
    mask-image: linear-gradient(to left, rgba(0, 0, 0, 1) 40%, rgba(0, 0, 0, 0) 100%);
}

/* Dashboard Grid Structure */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1.1fr;
    gap: 24px;
    margin-top: 24px;
    margin-bottom: 24px;
    width: 100%;
    box-sizing: border-box;
    align-items: start;
}

.dashboard-left-col {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

#newsTicker {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

/* Quick Cards Row */
.quick-cards-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.quick-card-box {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 22px;
    border-radius: 16px;
    text-decoration: none;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid transparent;
}

.quick-card-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.blue-card {
    background: #eff6ff;
    border-color: #dbeafe;
}

.dark-theme .blue-card {
    background: #172554;
    border-color: #1e40af;
}

.green-card {
    background: #f0fdf4;
    border-color: #dcfce7;
}

.dark-theme .green-card {
    background: #052e16;
    border-color: #166534;
}

.quick-card-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.blue-icon {
    background: #2563eb;
    color: #ffffff;
}

.green-icon {
    background: #16a34a;
    color: #ffffff;
}

.quick-card-title {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 700;
}

.blue-title {
    color: #1d4ed8;
}

.dark-theme .blue-title {
    color: #60a5fa;
}

.green-title {
    color: #15803d;
}

.dark-theme .green-title {
    color: #4ade80;
}

.quick-card-desc {
    margin: 0;
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.dark-theme .quick-card-desc {
    color: #94a3b8;
}

.quick-card-arrow {
    margin-left: auto;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.quick-card-box:hover .quick-card-arrow {
    transform: translateX(4px);
}

.blue-arrow {
    color: #2563eb;
}

.green-arrow {
    color: #16a34a;
}

/* ======================================================
   BEHAVIOR ACTIVITY FEED CARDS
   ====================================================== */
.behavior-activity-item {
    background: var(--card-bg, #ffffff) !important;
    border: 1px solid var(--border-color, #e2e8f0) !important;
    border-radius: 12px !important;
    padding: 10px 14px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}

.behavior-activity-item:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
}

.behavior-item-left {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
}

.behavior-item-icon {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

.behavior-item-details {
    min-width: 0 !important;
    flex: 1 1 auto !important;
}

.behavior-item-title {
    margin: 0 !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    color: var(--text-dark, #0f172a) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

body.dark-theme .behavior-item-title,
body.dark-mode .behavior-item-title {
    color: #f8fafc !important;
}

.behavior-item-date {
    margin: 2px 0 0 0 !important;
    font-size: 11.5px !important;
    color: var(--text-gray, #64748b) !important;
}

.behavior-item-badge {
    font-size: 13.5px !important;
    font-weight: 800 !important;
    padding: 3px 10px !important;
    border-radius: 8px !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* ======================================================
   BUTTON STYLING SYSTEM (FLAT & MODERN)
   ====================================================== */
.btn-pill:not(.btn-circle):not(.db-page-btn),
#studentLoginBtn,
#verifyBtn,
#startSelectedQuizBtn,
#submitQuizBtn,
#loginBtn {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 10px 20px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    box-shadow: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.btn-pill:not(.btn-circle):not(.db-page-btn):hover,
#studentLoginBtn:hover,
#verifyBtn:hover,
#startSelectedQuizBtn:hover,
#submitQuizBtn:hover,
#loginBtn:hover {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

.btn-pill:not(.btn-circle):not(.db-page-btn):active {
    transform: translateY(0) scale(0.97) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

/* Dark Theme Button Overrides */
.dark-theme .btn-pill:not(.btn-circle):not(.db-page-btn),
.dark-theme #studentLoginBtn,
.dark-theme #verifyBtn,
.dark-theme #startSelectedQuizBtn,
.dark-theme #submitQuizBtn,
.dark-theme #loginBtn {
    background: #1e293b !important;
    color: #f8fafc !important;
    border-color: #334155 !important;
    box-shadow: none !important;
}

.dark-theme .btn-pill:not(.btn-circle):not(.db-page-btn):hover,
.dark-theme #studentLoginBtn:hover,
.dark-theme #verifyBtn:hover,
.dark-theme #startSelectedQuizBtn:hover,
.dark-theme #submitQuizBtn:hover,
.dark-theme #loginBtn:hover {
    background: #334155 !important;
    border-color: #475569 !important;
}

/* Danger / Logout Button Pill Variant */
#studentLogoutBtn:not(.btn-circle),
#logoutBtn:not(.btn-circle) {
    background: #fef2f2 !important;
    color: #ef4444 !important;
    border-color: #fca5a5 !important;
}

.dark-theme #studentLogoutBtn:not(.btn-circle),
.dark-theme #logoutBtn:not(.btn-circle) {
    background: #450a0a !important;
    color: #fca5a5 !important;
    border-color: #7f1d1d !important;
}

/* ======================================================
   MOBILE & TABLET RESPONSIVE ENHANCEMENTS (IPHONE & IPAD)
   ====================================================== */

/* ======================================================
   COMPREHENSIVE DARK THEME SYSTEM FOR STUDENT PORTAL
   ====================================================== */
body.dark-theme,
body.dark-mode {
    --bg-body: #0b1437 !important;
    --card-bg: #111c44 !important;
    --text-dark: #f4f7fe !important;
    --text-gray: #a3aed1 !important;
    --border-color: #1b254b !important;
    --sidebar-bg: #080f28 !important;
    --sidebar-hover: #152046 !important;
    background: #0b1437 !important;
    color: #f4f7fe !important;
}

body.dark-theme .app-container,
body.dark-mode .app-container,
body.dark-theme .main-wrapper,
body.dark-mode .main-wrapper {
    background: #0b1437 !important;
    color: #f4f7fe !important;
}

body.dark-theme .box,
body.dark-mode .box,
body.dark-theme #newsTicker,
body.dark-mode #newsTicker,
body.dark-theme .stat-card,
body.dark-mode .stat-card {
    background: #111c44 !important;
    border: 1px solid #1b254b !important;
    color: #f4f7fe !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25) !important;
}

body.dark-theme .box h3,
body.dark-mode .box h3,
body.dark-theme h1,
body.dark-theme h2,
body.dark-theme h3,
body.dark-theme h4,
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4 {
    color: #f4f7fe !important;
}

body.dark-theme p,
body.dark-mode p {
    color: #a3aed1;
}

body.dark-theme .sidebar,
body.dark-mode .sidebar,
body.dark-theme .student-sidebar,
body.dark-mode .student-sidebar {
    background: #080f28 !important;
    border-bottom: 1px solid #1b254b !important;
}

body.dark-theme .student-greeting-banner,
body.dark-mode .student-greeting-banner {
    background-color: #0f172a !important;
    border-color: #1e293b !important;
}

body.dark-theme .behavior-activity-item,
body.dark-mode .behavior-activity-item {
    background: #0b1437 !important;
    border-color: #1b254b !important;
}

/* iPad & Medium Tablet Breakpoint (<= 1024px) */
/* ======================================================
   RESPONSIVE MEDIA QUERIES (IPAD & IPHONE OPTIMIZATION)
   ====================================================== */

/* iPad & Tablet Breakpoint (<= 1024px) */
@media screen and (max-width: 1024px) {
    .main-wrapper {
        padding: 16px 20px 32px !important;
        width: 100% !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
    }

    .dashboard-grid {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .dashboard-left-col,
    .dashboard-grid > div,
    .dashboard-grid > .box,
    #newsTicker {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 14px !important;
    }

    .dashboard-overview-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Mobile & iPhone Breakpoint (<= 768px) */
@media screen and (max-width: 768px) {

    body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }

    .app-container {
        width: 100% !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    .sidebar,
    .student-sidebar {
        padding: 0 16px !important;
        height: 56px !important;
        min-height: 56px !important;
        width: 100% !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
    }

    .brand {
        gap: 10px !important;
        margin-left: 4px !important;
    }

    .brand p {
        display: none !important;
    }

    .brand h2 {
        font-size: 13.5px !important;
    }

    .menu-bar {
        gap: 4px !important;
    }

    .menu-btn {
        width: 40px !important;
        height: 40px !important;
        border-radius: 8px !important;
    }

    .menu-icon {
        width: 20px !important;
        height: 20px !important;
    }

    .user-profile-bottom {
        gap: 6px !important;
    }

    .theme-toggle-btn,
    .teacher-btn {
        padding: 5px 8px !important;
        font-size: 12px !important;
        height: 34px !important;
    }

    .main-wrapper {
        padding: 14px 14px 32px !important;
        width: 100% !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
        height: calc(100vh - 56px) !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .dashboard-grid {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: 1fr !important;
        gap: 16px !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-top: 16px !important;
        box-sizing: border-box !important;
    }

    .dashboard-left-col,
    .dashboard-grid > div,
    .dashboard-grid > .box,
    #newsTicker {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    .quick-links-grid,
    .quick-cards-row,
    .stats-grid {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: 1fr !important;
        gap: 12px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .quick-card-box {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 16px 18px !important;
    }

    .student-greeting-banner {
        padding: 20px 18px !important;
        min-height: 120px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .greeting-title {
        font-size: 20px !important;
    }

    .school-building-img,
    .school-building-video {
        width: 45% !important;
        opacity: 0.2 !important;
    }

    .hero-point-card {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
        padding: 18px 16px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .hero-point-badge {
        font-size: 2.2rem !important;
    }

    .box {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 18px 16px !important;
    }

    .att-student-status-grid {
        grid-template-columns: 1fr !important;
    }

    #spotlightHeroCard {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 24px !important;
    }

    #spotlightHeroCard>div {
        max-width: 100% !important;
    }

    .post-box {
        padding: 14px !important;
    }

    .post-options-row {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }

    #submitPostBtn {
        width: 100% !important;
    }

    /* Input & Button touch targets for iPhone & iPad */
    input,
    select,
    textarea,
    button {
        font-size: 16px !important;
        /* Prevents auto-zoom on iOS Safari */
    }
}

/* Small iPhone Breakpoint (<= 480px) */
@media screen and (max-width: 480px) {
    .brand div:nth-child(2) {
        display: none !important;
        /* Hide brand text on tiny screens, show logo badge */
    }

    .sidebar,
    .student-sidebar {
        padding: 0 14px !important;
    }

    .brand {
        margin-left: 2px !important;
    }

    .menu-bar {
        gap: 2px !important;
    }

    .menu-btn {
        width: 36px !important;
        height: 36px !important;
    }

    .teacher-btn span {
        display: none !important;
        /* Icon-only teacher button on tiny mobile */
    }

    .teacher-btn {
        padding: 6px !important;
        width: 34px !important;
        height: 34px !important;
        border-radius: 50% !important;
    }

    #mainThemeText,
    #themeToggleText {
        display: none !important;
        /* Icon-only theme button on tiny mobile */
    }

    .theme-toggle-btn {
        padding: 6px !important;
        width: 34px !important;
        height: 34px !important;
        border-radius: 50% !important;
    }

    .main-wrapper {
        padding: 12px 10px 24px !important;
    }
}

/* ======================================================
   MOBILE KEBAB TOPBAR NAVIGATION SYSTEM (<= 768px)
   ====================================================== */

.sidebar,
.student-sidebar {
    overflow: visible !important;
}

.mobile-kebab-container {
    display: none;
    position: relative;
    z-index: 999999;
}

button.mobile-kebab-btn,
.mobile-kebab-btn,
#mobileTopbarKebabBtn {
    background: #1e5eff !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    border-radius: 10px !important;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    cursor: pointer !important;
    box-shadow: 0 3px 10px rgba(30, 94, 255, 0.45) !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

button.mobile-kebab-btn:hover,
.mobile-kebab-btn:hover,
#mobileTopbarKebabBtn:hover {
    background: #2563eb !important;
    border-color: rgba(255, 255, 255, 0.7) !important;
    transform: scale(1.05) !important;
}

button.mobile-kebab-btn:active,
.mobile-kebab-btn:active,
#mobileTopbarKebabBtn:active {
    transform: scale(0.92) !important;
    background: #1d4ed8 !important;
}

button.mobile-kebab-btn svg,
.mobile-kebab-btn svg,
#mobileTopbarKebabBtn svg {
    width: 20px !important;
    height: 20px !important;
    stroke: #ffffff !important;
    fill: none !important;
    stroke-width: 2.2 !important;
    color: #ffffff !important;
    pointer-events: none !important;
    display: block !important;
}

/* Dark mode override for mobile kebab button */
body.dark-theme button.mobile-kebab-btn,
body.dark-mode button.mobile-kebab-btn,
body.dark-theme #mobileTopbarKebabBtn,
body.dark-mode #mobileTopbarKebabBtn {
    background: #2563eb !important;
    border: 1px solid rgba(147, 197, 253, 0.6) !important;
    color: #ffffff !important;
    box-shadow: 0 0 14px rgba(37, 99, 235, 0.6) !important;
}

body.dark-theme button.mobile-kebab-btn:hover,
body.dark-mode button.mobile-kebab-btn:hover,
body.dark-theme #mobileTopbarKebabBtn:hover,
body.dark-mode #mobileTopbarKebabBtn:hover {
    background: #3b82f6 !important;
    border-color: #93c5fd !important;
}

body.dark-theme button.mobile-kebab-btn svg,
body.dark-mode button.mobile-kebab-btn svg,
body.dark-theme #mobileTopbarKebabBtn svg,
body.dark-mode #mobileTopbarKebabBtn svg {
    stroke: #ffffff !important;
    fill: none !important;
    color: #ffffff !important;
}

.mobile-topbar-dropdown {
    position: fixed !important;
    top: calc(56px + env(safe-area-inset-top, 0px)) !important;
    right: max(12px, env(safe-area-inset-right, 0px)) !important;
    width: 250px !important;
    max-width: calc(100vw - 24px) !important;
    background: var(--card-bg, #ffffff) !important;
    border: 1px solid var(--border-color, #e2e8f0) !important;
    border-radius: 16px !important;
    padding: 10px !important;
    box-shadow: 0 20px 45px -5px rgba(0, 0, 0, 0.45) !important;
    z-index: 999999 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    animation: kebabDropdownFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

@keyframes kebabDropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.mobile-topbar-dropdown.hidden {
    display: none !important;
}

.kebab-group-label {
    font-size: 10px !important;
    font-weight: 800 !important;
    letter-spacing: 1px !important;
    color: var(--text-gray, #64748b) !important;
    padding: 6px 10px 4px !important;
    text-transform: uppercase !important;
}

.kebab-item {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 10px 12px !important;
    min-height: 44px !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: var(--text-dark, #0f172a) !important;
    text-decoration: none !important;
    background: transparent !important;
    border: none !important;
    width: 100% !important;
    text-align: left !important;
    cursor: pointer !important;
    transition: background 0.15s, color 0.15s !important;
    box-sizing: border-box !important;
}

.kebab-item:hover,
.kebab-item.active {
    background: var(--input-bg, #f1f5f9) !important;
    color: var(--primary-blue, #1e5eff) !important;
}

.kebab-item.active {
    font-weight: 700 !important;
}

.kebab-divider {
    height: 1px !important;
    background: var(--border-color, #e2e8f0) !important;
    margin: 4px 0 !important;
}

.kebab-btn-danger {
    color: #ef4444 !important;
}

.kebab-btn-danger:hover {
    background: rgba(239, 68, 68, 0.1) !important;
}

/* RESPONSIVE HIDING/SHOWING OF TOPBAR ON MOBILE (<= 768px) */
@media screen and (max-width: 768px) {
    .brand>div:first-child,
    .brand-badge,
    .brand-logo-container {
        width: 30px !important;
        height: 30px !important;
        min-width: 30px !important;
        min-height: 30px !important;
        padding: 3px !important;
        border-radius: 7px !important;
    }

    .brand h2 {
        font-size: 13px !important;
    }

    .brand p {
        font-size: 10px !important;
    }

    .desktop-menu-bar,
    .desktop-user-actions {
        display: none !important;
    }

    .mobile-kebab-container {
        display: block !important;
    }

    .main-wrapper {
        padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px)) !important;
    }
}

/* --- Profile Photo Edit Modal --- */
#photoEditModal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.65) !important;
    z-index: 10000 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    backdrop-filter: blur(4px) !important;
    padding: 16px !important;
    box-sizing: border-box !important;
}

#photoEditModal.hidden {
    display: none !important;
}

.photo-modal-card {
    width: 100% !important;
    max-width: 400px !important;
    margin: auto !important;
    position: relative !important;
    text-align: center !important;
    padding: 28px 24px !important;
    border-radius: 20px !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35) !important;
    background: var(--card-bg, #ffffff) !important;
    border: 1px solid var(--border-color, #e2e8f0) !important;
    box-sizing: border-box !important;
}

body.dark-theme .photo-modal-card,
body.dark-mode .photo-modal-card {
    background: #1e293b !important;
    border-color: #334155 !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6) !important;
}

/* =========================================================
   STUDENT ASSIGNMENT REMINDER CARD & MULTI-TIER ANIMATIONS
   ========================================================= */

.student-reminder-card-box {
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

body.dark-theme .student-reminder-card-box,
body.dark-mode .student-reminder-card-box {
    background: #1e293b !important;
    border-color: #334155 !important;
    box-shadow: 0 4px 24px -2px rgba(0, 0, 0, 0.45);
}

.student-reminder-icon-badge {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.student-reminder-count-pill {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    font-size: 11.5px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid rgba(239, 68, 68, 0.3);
    letter-spacing: 0.3px;
}

.student-reminder-card-box {
    margin-bottom: 20px;
    border-radius: 16px;
}

#studentReminderListContainer {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 440px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 2px 4px;
}

.student-reminder-item {
    padding: 14px 16px;
    border-radius: 13px;
    border: 1.5px solid var(--border-color, #e2e8f0);
    background: var(--bg-hover, #f8fafc);
    position: relative;
    box-sizing: border-box;
    transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

body.dark-theme .student-reminder-item,
body.dark-mode .student-reminder-item {
    background: #0f172a;
    border-color: #334155;
}

.reminder-subject-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(30, 94, 255, 0.1);
    color: var(--primary-blue, #1e5eff);
    border: 1px solid rgba(30, 94, 255, 0.2);
}

.reminder-assignment-title {
    margin: 4px 0 6px 0;
    font-size: 14.5px;
    font-weight: 800;
    color: var(--text-dark, #0f172a);
    line-height: 1.35;
}

body.dark-theme .reminder-assignment-title,
body.dark-mode .reminder-assignment-title {
    color: #f8fafc;
}

.reminder-due-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-gray, #64748b);
}

.reminder-notes-text {
    margin-top: 6px;
    font-size: 11.5px;
    color: var(--text-gray, #64748b);
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 6px;
    font-style: italic;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    line-height: 1.4;
}

body.dark-theme .reminder-notes-text,
body.dark-mode .reminder-notes-text {
    background: rgba(255, 255, 255, 0.05);
    color: #94a3b8;
}

/* --- TIER 0: UPCOMING / DUE TODAY --- */
.student-reminder-item.reminder-due-future {
    border-color: rgba(30, 94, 255, 0.3);
}

.reminder-badge-future {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    background: rgba(30, 94, 255, 0.08);
    color: var(--primary-blue, #1e5eff);
    border: 1px solid rgba(30, 94, 255, 0.2);
}

.student-reminder-item.reminder-due-today {
    border-color: #f59e0b;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.06) 0%, rgba(245, 158, 11, 0.02) 100%);
}

.reminder-badge-today {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

/* --- TIER 1: LATE BY 1 DAY (MILD ANIMATION & SUBTLE COLOR CHANGE) --- */
.student-reminder-item.reminder-late-1day {
    border-color: #f97316;
    border-width: 1.5px;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.08) 0%, rgba(245, 158, 11, 0.03) 100%);
    box-shadow: 0 2px 10px rgba(249, 115, 22, 0.12);
}

.reminder-badge-1day {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 800;
    background: #ea580c;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(234, 88, 12, 0.35);
    animation: gentle-amber-pulse 2.2s ease-in-out infinite;
}

@keyframes gentle-amber-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(234, 88, 12, 0.35);
    }
    50% {
        transform: scale(1.04);
        box-shadow: 0 4px 14px rgba(234, 88, 12, 0.6);
    }
}

/* --- TIER 2: LATE BY 2 DAYS (MORE ENERGETIC & ACTIVE ANIMATION) --- */
.student-reminder-item.reminder-late-2days {
    border-color: #ef4444;
    border-width: 2px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12) 0%, rgba(220, 38, 38, 0.05) 100%);
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.25);
    animation: reminder-box-wiggle 3.2s ease-in-out infinite;
}

.reminder-badge-2days {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 7px;
    font-size: 11.5px;
    font-weight: 900;
    background: #ef4444;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
    letter-spacing: 0.5px;
}

.reminder-badge-2days .reminder-late-text-animated {
    display: inline-block;
    animation: text-vibrate 1.2s ease-in-out infinite;
}

@keyframes reminder-box-wiggle {
    0%, 78%, 100% {
        transform: translateX(0);
    }
    81% {
        transform: translateX(-2px);
    }
    85% {
        transform: translateX(2px);
    }
    89% {
        transform: translateX(-1.5px);
    }
    93% {
        transform: translateX(1.5px);
    }
    97% {
        transform: translateX(-0.5px);
    }
}

@keyframes text-vibrate {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.08);
        text-shadow: 0 0 8px rgba(255, 255, 255, 0.9);
    }
}

/* --- TIER 3: LATE BY 3+ DAYS (AGGRESSIVE NEON GLOW, SHAKING, FLASHING TEXT) --- */
.student-reminder-item.reminder-late-critical {
    border-width: 2.5px !important;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.16) 0%, rgba(185, 28, 28, 0.08) 100%);
    animation: aggressive-neon-glow 1.4s ease-in-out infinite, reminder-box-shake 2.5s infinite !important;
}

.reminder-badge-critical {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 900;
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: #ffffff;
    box-shadow: 0 0 14px rgba(220, 38, 38, 0.8), inset 0 0 6px rgba(255, 255, 255, 0.3);
    letter-spacing: 0.6px;
    border: 1px solid #ff4444;
}

.reminder-badge-critical .reminder-badge-fire {
    display: inline-block;
    animation: fire-bounce 0.6s infinite alternate ease-in-out;
}

.reminder-badge-critical .reminder-late-text-animated {
    display: inline-block;
    animation: critical-text-flash 0.8s ease-in-out infinite alternate;
}

@keyframes aggressive-neon-glow {
    0%, 100% {
        border-color: #ef4444;
        box-shadow: 0 0 8px rgba(239, 68, 68, 0.4), inset 0 0 4px rgba(239, 68, 68, 0.12);
    }
    50% {
        border-color: #ff0033;
        box-shadow: 0 0 16px rgba(255, 0, 51, 0.7), inset 0 0 8px rgba(255, 0, 51, 0.25);
    }
}

@keyframes reminder-box-shake {
    0%, 72%, 100% {
        transform: translateX(0);
    }
    75% {
        transform: translateX(-3px);
    }
    78% {
        transform: translateX(3px);
    }
    81% {
        transform: translateX(-2.5px);
    }
    84% {
        transform: translateX(2.5px);
    }
    87% {
        transform: translateX(-1.5px);
    }
    90% {
        transform: translateX(1.5px);
    }
    93% {
        transform: translateX(-0.5px);
    }
    96% {
        transform: translateX(0.5px);
    }
}

@keyframes critical-text-flash {
    0% {
        color: #ffffff;
        text-shadow: 0 0 4px rgba(255, 255, 255, 0.8), 0 0 10px rgba(255, 50, 50, 0.9);
        transform: scale(1);
    }
    100% {
        color: #fff1f2;
        text-shadow: 0 0 10px rgba(255, 255, 255, 1), 0 0 18px rgba(255, 0, 0, 1);
        transform: scale(1.06);
    }
}

@keyframes fire-bounce {
    0% {
        transform: scale(1) translateY(0);
    }
    100% {
        transform: scale(1.3) translateY(-2px);
    }
}

/* ======================================================
   PURPOSEFUL MICRO-INTERACTIONS & MOTION ENHANCEMENTS
   ====================================================== */

/* KPI & Stat Cards Subtle Lift */
.stat-grid-4 > div,
.stat-card,
.analytics-card,
.dashboard-left-col > div {
    transition: transform 220ms var(--ease-out-quint), box-shadow 220ms var(--ease-out-quint), border-color 220ms var(--ease-out-quint);
}

.stat-grid-4 > div:hover,
.stat-card:hover,
.analytics-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px -4px rgba(15, 23, 42, 0.08) !important;
}

#statAverageCard:active {
    transform: translateY(-1px) scale(0.985);
}

#statAverageCard:hover svg {
    transform: rotate(180deg);
    transition: transform 0.4s var(--ease-out-quint);
}

#statAverageCard svg {
    transition: transform 0.3s var(--ease-out-quint);
}

/* Progress Bar Smooth Fill Transitions */
.progress-fill,
.score-progress-bar,
.bar-fill,
.score-meter-fill {
    transition: width 0.75s var(--ease-out-expo) !important;
    will-change: width;
}

/* Attendance Call Breathing Pulse */
@keyframes pulseGlowSoft {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(30, 94, 255, 0.35);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(30, 94, 255, 0);
    }
}

.active-attendance-prompt,
#studentActiveAttBanner,
.live-pulse-badge {
    animation: pulseGlowSoft 2.6s infinite ease-in-out;
}

/* Accessibility: Respect Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

/* ======================================================
   CIRCULAR ACTION BUTTONS IN DESKTOP NAVBAR (STUDENT)
   ====================================================== */
.desktop-user-actions button,
.desktop-user-actions .btn-circle,
.desktop-user-actions #themeToggleBtn,
.desktop-user-actions #darkModeToggle,
.desktop-user-actions .theme-toggle-btn,
.desktop-user-actions .teacher-btn,
.desktop-user-actions #studentLogoutBtn,
.desktop-user-actions #logoutBtn,
.desktop-user-actions .logout-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    max-width: 36px !important;
    max-height: 36px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    margin: 0 !important;
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
    box-shadow: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: none !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

/* Bulletproof SVG Icon Visibility & Sizing */
.desktop-user-actions button svg,
.desktop-user-actions .btn-circle svg {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    max-width: 18px !important;
    max-height: 18px !important;
    fill: none !important;
    stroke: #ffffff !important;
    stroke-width: 2.2 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    flex-shrink: 0 !important;
    pointer-events: none !important;
    transition: stroke 0.2s ease !important;
}

/* Light / Dark Mode Icon Swap for Student Portal: Light Mode -> Moon visible, Sun hidden; Dark Mode -> Sun visible, Moon hidden */
.theme-icon-sun,
svg.theme-icon-sun,
.desktop-user-actions .theme-icon-sun,
.desktop-user-actions svg.theme-icon-sun {
    display: none !important;
}

.theme-icon-moon,
svg.theme-icon-moon,
.desktop-user-actions .theme-icon-moon,
.desktop-user-actions svg.theme-icon-moon {
    display: inline-block !important;
}

body.dark-theme .theme-icon-sun,
body.dark-theme svg.theme-icon-sun,
body.dark-theme .desktop-user-actions .theme-icon-sun,
body.dark-theme .desktop-user-actions svg.theme-icon-sun,
body.dark-mode .theme-icon-sun,
body.dark-mode svg.theme-icon-sun,
body.dark-mode .desktop-user-actions .theme-icon-sun,
body.dark-mode .desktop-user-actions svg.theme-icon-sun {
    display: inline-block !important;
}

body.dark-theme .theme-icon-moon,
body.dark-theme svg.theme-icon-moon,
body.dark-theme .desktop-user-actions .theme-icon-moon,
body.dark-theme .desktop-user-actions svg.theme-icon-moon,
body.dark-mode .theme-icon-moon,
body.dark-mode svg.theme-icon-moon,
body.dark-mode .desktop-user-actions .theme-icon-moon,
body.dark-mode .desktop-user-actions svg.theme-icon-moon {
    display: none !important;
}

/* Hover effects for circular action buttons */
.desktop-user-actions .btn-circle:hover,
.desktop-user-actions #themeToggleBtn:hover,
.desktop-user-actions #darkModeToggle:hover,
.desktop-user-actions .theme-toggle-btn:hover,
.desktop-user-actions .teacher-btn:hover {
    background: rgba(255, 255, 255, 0.22) !important;
    border-color: rgba(255, 255, 255, 0.45) !important;
    transform: translateY(-1px) scale(1.05) !important;
}

.desktop-user-actions #studentLogoutBtn,
.desktop-user-actions #logoutBtn,
.desktop-user-actions .logout-btn {
    background: rgba(239, 68, 68, 0.18) !important;
    border: 1.5px solid rgba(239, 68, 68, 0.45) !important;
    color: #f87171 !important;
}

.desktop-user-actions #studentLogoutBtn svg,
.desktop-user-actions #logoutBtn svg,
.desktop-user-actions .logout-btn svg {
    stroke: #f87171 !important;
}

.desktop-user-actions #studentLogoutBtn:hover,
.desktop-user-actions #logoutBtn:hover,
.desktop-user-actions .logout-btn:hover {
    background: rgba(239, 68, 68, 0.35) !important;
    border-color: rgba(239, 68, 68, 0.7) !important;
    color: #ffffff !important;
    transform: translateY(-1px) scale(1.05) !important;
}

.desktop-user-actions #studentLogoutBtn:hover svg,
.desktop-user-actions #logoutBtn:hover svg,
.desktop-user-actions .logout-btn:hover svg {
    stroke: #ffffff !important;
}

/* ======================================================
   DASHBOARD LAYOUT: BANNER & CONTENT SAME SIZE
   ====================================================== */
.main-wrapper .student-greeting-banner,
.student-greeting-banner {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
}

.main-wrapper .dashboard-grid,
.dashboard-grid {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
}

