@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --blue: #1769ff;
    --blue-2: #0b55d9;
    --green: #059669;
    --teal: #0f766e;
    --orange: #f59e0b;
    --purple: #6d5dfc;
    --red: #ef4444;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --bg: #f3f7fb;
    --card: #ffffff;
    --shadow: 0 16px 40px rgba(15, 23, 42, .08);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    min-height: 100%;
    font-family: Inter, Arial, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(23, 105, 255, .13), transparent 32%),
        radial-gradient(circle at bottom right, rgba(5, 150, 105, .12), transparent 34%),
        var(--bg);
    color: var(--ink);
}

a {
    color: inherit;
    text-decoration: none;
}

button, input {
    font-family: inherit;
}

.app {
    display: grid;
    grid-template-columns: 290px 1fr;
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 24px;
    background: linear-gradient(180deg, #063b8e 0%, #0b5bd3 55%, #087f77 100%);
    color: white;
    overflow-y: auto;
}

.side-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.side-logo {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    font-size: 28px;
    background: rgba(255,255,255,.16);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.16);
}

.side-brand h2 {
    margin: 0;
    font-size: 22px;
}

.side-brand p {
    margin: 4px 0 0;
    opacity: .82;
    font-size: 13px;
}

.user-mini {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-radius: 20px;
    background: rgba(255,255,255,.13);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
    margin-bottom: 22px;
}

.avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fff, #dbeafe);
    color: #075985;
    display: grid;
    place-items: center;
    font-size: 24px;
    font-weight: 800;
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-mini b {
    display: block;
    font-size: 15px;
}

.user-mini span {
    font-size: 13px;
    opacity: .85;
}

.side-nav {
    display: grid;
    gap: 10px;
}

.side-nav a {
    padding: 13px 14px;
    border-radius: 16px;
    background: rgba(255,255,255,.08);
    color: white;
    font-weight: 600;
    transition: .18s;
}

.side-nav a:hover,
.side-nav a.active {
    background: rgba(255,255,255,.22);
    transform: translateX(4px);
}

.side-footer {
    margin-top: 28px;
    opacity: .8;
    font-size: 13px;
}

.main {
    padding: 24px 28px;
    min-width: 0;
}

.topbar {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.search-box {
    flex: 1;
    max-width: 680px;
    height: 52px;
    border-radius: 18px;
    background: white;
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 18px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .05);
}

.search-box input {
    border: 0;
    outline: none;
    width: 100%;
    font-size: 15px;
    color: var(--ink);
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.circle-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid #cbd5e1;
    background: white;
    cursor: pointer;
    font-size: 18px;
}

.logout-btn {
    padding: 13px 18px;
    border-radius: 999px;
    color: white;
    background: linear-gradient(135deg, #ef4444, #f97316);
    font-weight: 700;
    box-shadow: 0 12px 22px rgba(239, 68, 68, .22);
}

.hero {
    border-radius: 30px;
    color: white;
    padding: 32px;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 28px;
    box-shadow: var(--shadow);
    overflow: hidden;
    position: relative;
}

.hero::after {
    content: "";
    position: absolute;
    right: -80px;
    top: -120px;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: rgba(255,255,255,.16);
}

.hero-admin {
    background: linear-gradient(135deg, #0b5bd3, #4f46e5);
}

.hero-leader {
    background: linear-gradient(135deg, #075985, #0f766e);
}

.hero-teacher {
    background: linear-gradient(135deg, #1769ff, #0891b2);
}

.hero-student {
    background: linear-gradient(135deg, #059669, #0ea5e9);
}

.hero-default {
    background: linear-gradient(135deg, #2563eb, #0f766e);
}

.school-name {
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: 13px;
    font-weight: 800;
    opacity: .9;
}

.hero h1 {
    margin: 10px 0 10px;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.05;
}

.hero p {
    margin: 0;
    max-width: 760px;
    font-size: 16px;
    line-height: 1.7;
    opacity: .92;
}

.role-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.role-pills span {
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.2);
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.hero-card {
    min-width: 245px;
    position: relative;
    z-index: 1;
    border-radius: 24px;
    padding: 22px;
    background: rgba(255,255,255,.16);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.22);
    backdrop-filter: blur(10px);
}

.hero-card b {
    display: block;
    font-size: 18px;
    margin-top: 14px;
}

.hero-card p {
    font-size: 13px;
    margin-top: 8px;
}

.hero-date {
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    background: white;
    color: #0b5bd3;
    font-weight: 800;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin: 22px 0;
}

.stat-card {
    background: white;
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 22px;
    display: flex;
    gap: 16px;
    align-items: center;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
}

.stat-icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    color: white;
    font-size: 26px;
}

.stat-blue .stat-icon {
    background: linear-gradient(135deg, #1769ff, #0891b2);
}

.stat-green .stat-icon {
    background: linear-gradient(135deg, #059669, #0f766e);
}

.stat-orange .stat-icon {
    background: linear-gradient(135deg, #f59e0b, #f97316);
}

.stat-purple .stat-icon {
    background: linear-gradient(135deg, #6366f1, #9333ea);
}

.stat-value {
    font-size: 30px;
    font-weight: 800;
}

.stat-label {
    color: var(--muted);
    font-weight: 600;
}

.section-title {
    margin: 30px 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: end;
}

.section-title h2 {
    margin: 0;
    font-size: 25px;
}

.section-title p {
    margin: 6px 0 0;
    color: var(--muted);
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.module-card {
    position: relative;
    background: white;
    border-radius: 26px;
    padding: 22px;
    min-height: 230px;
    border: 1px solid #e5edf8;
    box-shadow: 0 16px 40px rgba(15, 23, 42, .07);
    overflow: hidden;
    transition: .2s;
}

.module-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #1769ff, #0f766e);
}

.module-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 48px rgba(15, 23, 42, .12);
}

.module-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.module-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    color: white;
    font-size: 25px;
    background: linear-gradient(135deg, #1769ff, #0f766e);
    box-shadow: 0 12px 26px rgba(23, 105, 255, .22);
}

.module-code {
    padding: 8px 14px;
    border-radius: 999px;
    color: #1d4ed8;
    background: #eef4ff;
    border: 1px solid #c9dcff;
    font-weight: 800;
    font-size: 13px;
}

.module-card h3 {
    margin: 20px 0 12px;
    font-size: 18px;
}

.module-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
    min-height: 76px;
    font-size: 14px;
}

.module-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
}

.module-bottom span {
    color: #0f766e;
    font-size: 13px;
    font-weight: 800;
}

.module-bottom a {
    padding: 11px 18px;
    border-radius: 999px;
    color: white;
    background: linear-gradient(135deg, #1769ff, #0f766e);
    font-weight: 800;
    box-shadow: 0 12px 22px rgba(23, 105, 255, .22);
}

.empty-box {
    grid-column: 1 / -1;
    background: white;
    border: 1px dashed #94a3b8;
    border-radius: 24px;
    padding: 28px;
    text-align: center;
}

.page-footer {
    margin: 30px 0 8px;
    color: var(--muted);
    text-align: center;
    font-size: 14px;
}

/* LOGIN */
.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px;
    background:
        radial-gradient(circle at top left, rgba(23,105,255,.18), transparent 36%),
        radial-gradient(circle at bottom right, rgba(5,150,105,.18), transparent 34%),
        #f3f7fb;
}

.login-shell {
    width: min(1120px, 100%);
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 28px;
}

.login-hero {
    padding: 44px;
    border-radius: 34px;
    color: white;
    background: linear-gradient(135deg, #0b5bd3, #0f766e);
    box-shadow: var(--shadow);
    overflow: hidden;
    position: relative;
}

.login-hero::after {
    content: "";
    position: absolute;
    right: -80px;
    bottom: -100px;
    width: 340px;
    height: 340px;
    background: rgba(255,255,255,.14);
    border-radius: 50%;
}

.brand-mark {
    width: 74px;
    height: 74px;
    border-radius: 24px;
    display: grid;
    place-items: center;
    font-size: 38px;
    background: rgba(255,255,255,.16);
    margin-bottom: 24px;
}

.login-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.05;
}

.login-hero p {
    font-size: 17px;
    line-height: 1.7;
    opacity: .93;
    max-width: 680px;
}

.login-points {
    margin-top: 28px;
    display: grid;
    gap: 12px;
}

.login-points div {
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255,255,255,.13);
    font-weight: 700;
}

.login-card {
    border-radius: 34px;
    background: white;
    padding: 34px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.login-title {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 24px;
}

.login-title span {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #1769ff, #0f766e);
    color: white;
    font-size: 24px;
}

.login-title h2 {
    margin: 0;
    font-size: 25px;
}

.login-title p {
    margin: 4px 0 0;
    color: var(--muted);
}

.login-card label {
    display: block;
    margin: 16px 0 8px;
    font-weight: 800;
}

.login-card input {
    width: 100%;
    height: 52px;
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    padding: 0 15px;
    outline: none;
    font-size: 15px;
}

.login-card input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(23,105,255,.12);
}

.btn-login {
    width: 100%;
    margin-top: 22px;
    height: 54px;
    border: 0;
    border-radius: 18px;
    color: white;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    background: linear-gradient(135deg, #1769ff, #0f766e);
    box-shadow: 0 14px 28px rgba(23,105,255,.25);
}

.alert-error {
    padding: 14px 16px;
    border-radius: 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-weight: 700;
    margin-bottom: 14px;
}

.login-note {
    margin-top: 18px;
    color: var(--muted);
    line-height: 1.6;
    font-size: 14px;
}

/* RESPONSIVE */
@media (max-width: 1180px) {
    .module-grid,
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .app {
        grid-template-columns: 250px 1fr;
    }
}

@media (max-width: 860px) {
    .app {
        display: block;
    }

    .sidebar {
        position: relative;
        height: auto;
        border-radius: 0 0 28px 28px;
    }

    .main {
        padding: 18px;
    }

    .topbar {
        height: auto;
        display: grid;
    }

    .hero {
        display: block;
        padding: 24px;
    }

    .hero-card {
        margin-top: 20px;
    }

    .module-grid,
    .stats-grid,
    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-hero {
        padding: 30px;
    }
}

@media (max-width: 520px) {
    .module-grid,
    .stats-grid {
        gap: 14px;
    }

    .module-card {
        min-height: auto;
    }

    .top-actions {
        justify-content: space-between;
    }

    .logout-btn {
        padding: 12px 14px;
    }
}
/* ================= HOME PUBLIC ================= */

.home-body {
    background:
        radial-gradient(circle at top left, rgba(23,105,255,.16), transparent 34%),
        radial-gradient(circle at bottom right, rgba(5,150,105,.16), transparent 34%),
        #f3f7fb;
}

.home-header {
    max-width: 1220px;
    margin: 24px auto 0;
    padding: 18px 22px;
    border-radius: 26px;
    background: rgba(255,255,255,.86);
    backdrop-filter: blur(14px);
    border: 1px solid #e2e8f0;
    box-shadow: 0 16px 40px rgba(15,23,42,.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}

.home-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.home-logo {
    width: 58px;
    height: 58px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    color: white;
    font-size: 30px;
    background: linear-gradient(135deg, #1769ff, #0f766e);
}

.home-brand h1 {
    margin: 0;
    font-size: 24px;
}

.home-brand p {
    margin: 4px 0 0;
    color: #64748b;
    font-weight: 600;
}

.home-actions {
    display: flex;
    gap: 10px;
}

.home-btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 18px;
    border-radius: 999px;
    font-weight: 800;
}

.home-btn.light {
    background: #eef4ff;
    color: #0b55d9;
}

.home-btn.danger {
    background: #ef4444;
    color: white;
}

.home-main {
    max-width: 1220px;
    margin: 24px auto;
}

.home-hero {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 24px;
    align-items: stretch;
}

.home-hero-content {
    border-radius: 34px;
    padding: 42px;
    color: white;
    background: linear-gradient(135deg, #0b5bd3, #0f766e);
    box-shadow: 0 20px 50px rgba(15,23,42,.14);
}

.home-badge {
    display: inline-flex;
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,.18);
    font-weight: 800;
    margin-bottom: 20px;
}

.home-hero h2 {
    margin: 0;
    font-size: clamp(32px, 5vw, 54px);
    line-height: 1.05;
}

.home-hero p {
    font-size: 17px;
    line-height: 1.8;
    opacity: .94;
}

.home-hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.home-primary,
.home-secondary {
    padding: 14px 22px;
    border-radius: 999px;
    font-weight: 900;
}

.home-primary {
    background: #fff;
    color: #0b55d9;
}

.home-secondary {
    background: rgba(255,255,255,.16);
    color: #fff;
    border: 1px solid rgba(255,255,255,.22);
}

.home-hero-panel {
    border-radius: 34px;
    background: white;
    padding: 30px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 20px 50px rgba(15,23,42,.08);
}

.panel-title {
    font-size: 22px;
    font-weight: 900;
    margin-bottom: 18px;
}

.home-role-list {
    display: grid;
    gap: 14px;
}

.home-role-list div {
    padding: 16px;
    border-radius: 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.home-role-list b {
    display: block;
    color: #0b55d9;
    margin-bottom: 6px;
}

.home-role-list span {
    color: #64748b;
    line-height: 1.6;
}

.home-stats {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 18px;
    margin: 24px 0;
}

.home-stat {
    background: white;
    border-radius: 26px;
    padding: 24px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 14px 34px rgba(15,23,42,.07);
}

.home-stat span {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 18px;
    color: white;
    font-size: 26px;
    background: linear-gradient(135deg, #1769ff, #0f766e);
    margin-bottom: 14px;
}

.home-stat b {
    display: block;
    font-size: 32px;
}

.home-stat p {
    margin: 4px 0 0;
    color: #64748b;
    font-weight: 700;
}

.home-section {
    margin-top: 28px;
}

.home-section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 18px;
    margin-bottom: 16px;
}

.home-section-head h2 {
    margin: 0;
    font-size: 28px;
}

.home-section-head p {
    color: #64748b;
    margin: 6px 0 0;
}

.home-section-head a {
    color: #0b55d9;
    font-weight: 900;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 18px;
}

.news-card {
    background: white;
    border-radius: 26px;
    padding: 24px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 14px 34px rgba(15,23,42,.07);
}

.news-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.news-top span {
    padding: 7px 12px;
    border-radius: 999px;
    background: #eef4ff;
    color: #0b55d9;
    font-weight: 900;
    font-size: 13px;
}

.news-top b {
    color: #f59e0b;
}

.news-card h3 {
    margin: 18px 0 10px;
}

.news-card p {
    color: #64748b;
    line-height: 1.7;
}

.news-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 18px;
}

.news-footer small {
    color: #64748b;
}

.news-footer a {
    color: #0f766e;
    font-weight: 900;
}

.home-empty {
    background: white;
    border: 1px dashed #94a3b8;
    border-radius: 26px;
    padding: 30px;
    text-align: center;
}

.home-feature-section {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 18px;
    margin-top: 28px;
}

.feature-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 26px;
    padding: 24px;
    box-shadow: 0 14px 34px rgba(15,23,42,.07);
}

.feature-card div {
    font-size: 36px;
}

.feature-card h3 {
    margin: 16px 0 8px;
}

.feature-card p {
    color: #64748b;
    line-height: 1.7;
}

.home-footer {
    max-width: 1220px;
    margin: 26px auto;
    color: #64748b;
    text-align: center;
    display: grid;
    gap: 6px;
}

/* ================= ROLE DASHBOARDS ================= */

.dash-body {
    background: #f3f7fb;
    padding: 24px;
}

.dash-header {
    max-width: 1220px;
    margin: 0 auto 24px;
    padding: 26px;
    border-radius: 28px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    box-shadow: 0 18px 44px rgba(15,23,42,.14);
}

.dash-header h1 {
    margin: 0;
    font-size: 30px;
}

.dash-header p {
    margin: 8px 0 0;
    opacity: .92;
}

.admin-head {
    background: linear-gradient(135deg, #1769ff, #4f46e5);
}

.leader-head {
    background: linear-gradient(135deg, #075985, #0f766e);
}

.teacher-head {
    background: linear-gradient(135deg, #1769ff, #0891b2);
}

.student-head {
    background: linear-gradient(135deg, #059669, #0ea5e9);
}

.dash-btn {
    padding: 12px 18px;
    border-radius: 999px;
    display: inline-flex;
    font-weight: 900;
    margin-left: 8px;
}

.dash-btn.light {
    background: white;
    color: #0b55d9;
}

.dash-btn.danger {
    background: #ef4444;
    color: white;
}

.dash-main {
    max-width: 1220px;
    margin: 0 auto;
}

.dash-grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 20px;
}

.dash-card {
    background: white;
    border-radius: 26px;
    padding: 28px;
    min-height: 190px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 14px 34px rgba(15,23,42,.07);
    text-align: center;
    transition: .2s;
}

.dash-card:hover {
    transform: translateY(-6px);
}

.dash-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 18px;
    border-radius: 22px;
    background: linear-gradient(135deg, #1769ff, #0f766e);
    color: white;
    display: grid;
    place-items: center;
    font-size: 32px;
}

.dash-card h3 {
    margin: 0 0 10px;
}

.dash-card b {
    display: block;
    font-size: 32px;
    color: #0b55d9;
}

.dash-card span {
    display: block;
    margin-top: 8px;
    color: #64748b;
    font-weight: 700;
}

.teacher-layout,
.student-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
}

.profile-card,
.student-profile {
    background: white;
    border-radius: 28px;
    padding: 26px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 14px 34px rgba(15,23,42,.07);
    align-self: start;
    text-align: center;
}

.profile-avatar {
    width: 112px;
    height: 112px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    margin: 0 auto 18px;
    color: white;
    font-size: 44px;
    font-weight: 900;
    background: linear-gradient(135deg, #1769ff, #0f766e);
    overflow: hidden;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-card h2,
.student-profile h2 {
    margin: 0;
}

.profile-card p,
.student-profile p {
    color: #64748b;
}

.profile-btn {
    margin-top: 18px;
    display: block;
    padding: 13px;
    border-radius: 16px;
    color: white;
    background: linear-gradient(135deg, #1769ff, #0f766e);
    font-weight: 900;
}

.teacher-modules,
.student-modules {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 18px;
}

.teacher-module-card,
.student-module-card {
    background: white;
    border-radius: 26px;
    padding: 24px;
    border: 1px solid #e2e8f0;
    display: flex;
    gap: 18px;
    align-items: flex-start;
    box-shadow: 0 14px 34px rgba(15,23,42,.07);
    transition: .2s;
}

.teacher-module-card:hover,
.student-module-card:hover {
    transform: translateY(-5px);
}

.teacher-module-card > div,
.student-module-card > div {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    border-radius: 18px;
    color: white;
    display: grid;
    place-items: center;
    font-size: 28px;
    background: linear-gradient(135deg, #1769ff, #0f766e);
}

.teacher-module-card h3,
.student-module-card h3 {
    margin: 0 0 6px;
}

.teacher-module-card p,
.student-module-card p {
    margin: 0;
    color: #64748b;
    line-height: 1.5;
}

.teacher-module-card span,
.student-module-card span {
    display: inline-flex;
    margin-top: 14px;
    padding: 9px 18px;
    border-radius: 999px;
    color: white;
    background: #1769ff;
    font-weight: 900;
}

.student-info-box {
    margin-top: 22px;
    padding: 16px;
    text-align: left;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.student-info-box b {
    display: block;
    margin-bottom: 6px;
}

.student-info-box span {
    color: #64748b;
    line-height: 1.5;
}

@media (max-width: 980px) {
    .home-hero,
    .home-stats,
    .home-feature-section,
    .news-grid,
    .dash-grid,
    .teacher-layout,
    .student-layout {
        grid-template-columns: 1fr;
    }

    .teacher-modules,
    .student-modules {
        grid-template-columns: 1fr;
    }

    .home-header,
    .dash-header {
        display: grid;
    }
}
/* ================= ADMIN REFINED ================= */

.admin-note {
    background: #ffffff;
    border: 1px solid #dbeafe;
    border-left: 6px solid #1769ff;
    border-radius: 24px;
    padding: 22px;
    display: flex;
    gap: 18px;
    align-items: flex-start;
    box-shadow: 0 14px 34px rgba(15,23,42,.06);
    margin-bottom: 22px;
}

.admin-note-icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: linear-gradient(135deg, #1769ff, #0f766e);
    color: white;
    display: grid;
    place-items: center;
    font-size: 28px;
    flex: 0 0 58px;
}

.admin-note h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

.admin-note p {
    margin: 0;
    color: #475569;
    line-height: 1.7;
}

.admin-card-count {
    margin-top: 14px;
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    padding: 9px 13px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #0f172a;
}

.admin-card-count b {
    font-size: 20px;
    color: #0b55d9;
}

.admin-card-count span {
    color: #64748b;
    font-weight: 700;
    font-size: 13px;
}

.admin-flow {
    margin-top: 30px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 28px;
    padding: 26px;
    box-shadow: 0 14px 34px rgba(15,23,42,.06);
}

.admin-flow h2 {
    margin: 0 0 18px;
}

.flow-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.flow-grid div {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    padding: 18px;
}

.flow-grid span {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: white;
    background: linear-gradient(135deg, #1769ff, #0f766e);
    font-weight: 900;
    margin-bottom: 12px;
}

.flow-grid b {
    display: block;
    margin-bottom: 8px;
}

.flow-grid p {
    margin: 0;
    color: #64748b;
    line-height: 1.6;
    font-size: 14px;
}

@media (max-width: 980px) {
    .flow-grid {
        grid-template-columns: 1fr;
    }

    .admin-note {
        display: block;
    }

    .admin-note-icon {
        margin-bottom: 14px;
    }
}