@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&family=Baloo+2:wght@600;700;800&display=swap");

:root {
    --accent: #d82e7c;
    --accent-dark: #b81f63;
    --accent-light: #fdeaf2;
    --accent-rgb: 216, 46, 124;
    --orange: #d82e7c;
    --teal: #f0a33c;
    --teal-light: #fdf3e2;
    --blue: #3b1465;
    --blue-light: #f1e9fb;
    --purple: #9b3fa6;
    --purple-light: #f5e9f7;
    --dark: #2d2d2d;
    --text-muted: #8a9099;
    --border: #edeff2;
    --bg: #f6f7f9;
    --danger: #e5484d;
    --success: #1e9e5a;
    --card-bg: #ffffff;
    --radius-lg: 22px;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 12px 32px rgba(45, 45, 45, 0.08);
    --shadow-sm: 0 4px 14px rgba(45, 45, 45, 0.06);
}

body.dark-mode {
    --bg: #14161a;
    --card-bg: #1d2025;
    --border: #2b2f36;
    --dark: #f1f2f4;
    --text-muted: #8d939c;
    --accent-light: rgba(var(--accent-rgb), 0.16);
}

* {
    box-sizing: border-box;
}

body {
    font-family: "Poppins", sans-serif;
    background: var(--bg);
    color: var(--dark);
    -webkit-tap-highlight-color: transparent;
}

a {
    text-decoration: none;
    color: inherit;
}
.brand-font {
    font-family: "Baloo 2", cursive;
}

/* ============ AUTH PAGES ============ */
.auth-shell {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    background: #ffffff;
    display: flex;
    justify-content: center;
    padding: 20px 16px 40px 16px;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    z-index: 0;
}
.blob-teal {
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, #fcebcb 0%, rgba(252, 235, 203, 0) 70%);
    top: -120px;
    right: -100px;
}
.blob-peach {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #fbe1ee 0%, rgba(251, 225, 238, 0) 70%);
    bottom: -100px;
    left: -100px;
}

.auth-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

.auth-logo {
    text-align: center;
    margin: 12px 0 22px 0;
}
.auth-logo img {
    height: 92px;
    margin: 0 auto;
}

.auth-heading {
    text-align: left;
    margin-bottom: 22px;
}
.auth-heading h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 6px;
}
.auth-heading p {
    font-size: 13.5px;
    color: var(--text-muted);
    font-weight: 500;
}

.role-toggle {
    display: flex;
    gap: 8px;
    margin: 18px 0 22px 0;
    background: var(--bg);
    padding: 5px;
    border-radius: 14px;
}
.role-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: none;
    background: transparent;
    padding: 10px 8px;
    border-radius: 10px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-muted);
    font-family: inherit;
    cursor: pointer;
    transition:
        background 0.15s,
        color 0.15s;
}
.role-btn svg {
    width: 16px;
    height: 16px;
}
.role-btn.active {
    background: #fff;
    color: var(--accent);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.field {
    margin-bottom: 16px;
}

.input-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 16px;
    padding: 15px 18px;
    transition:
        border-color 0.15s,
        box-shadow 0.15s;
}
.input-pill:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-light);
}
.input-pill svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}
.input-pill input {
    border: none;
    outline: none;
    flex: 1;
    min-width: 0;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: var(--dark);
    background: transparent;
}
.input-pill input::placeholder {
    color: #a6acb4;
    font-weight: 500;
}
.input-pill .toggle-pass {
    background: none;
    border: none;
    padding: 0;
    display: flex;
    cursor: pointer;
}
.input-pill .toggle-pass svg {
    stroke: #a6acb4;
}

.field-error {
    display: none;
    color: var(--danger);
    font-size: 11px;
    font-weight: 600;
    margin-top: 6px;
    padding-left: 4px;
}
.field.has-error .input-pill {
    border-color: var(--danger);
    background: #fff6f6;
}
.field.has-error .field-error {
    display: block;
}

.row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    font-size: 13px;
    font-weight: 500;
}
.chk-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--dark);
}
.chk-remember input {
    width: 19px;
    height: 19px;
    accent-color: var(--accent);
    border-radius: 5px;
    cursor: pointer;
}
.link-teal {
    color: var(--blue);
    font-weight: 600;
}
.link-orange {
    color: var(--accent);
    font-weight: 700;
}

.btn-brand {
    width: 100%;
    border: none;
    padding: 16px;
    border-radius: 16px;
    background: linear-gradient(
        135deg,
        #f0559a 0%,
        var(--accent) 55%,
        var(--accent-dark) 100%
    );
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.2px;
    box-shadow: 0 10px 24px rgba(var(--accent-rgb), 0.32);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}
.btn-brand .spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
.btn-brand.loading .spinner {
    display: inline-block;
}
.btn-brand:disabled {
    opacity: 0.7;
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.btn-outline-brand {
    width: 100%;
    border: 1.5px solid var(--border);
    background: #fff;
    padding: 14px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.btn-outline-brand img {
    width: 19px;
    height: 19px;
}

.divider-or {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #c3c8ce;
}
.divider-or::before,
.divider-or::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-foot {
    text-align: center;
    margin-top: 26px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
}
.auth-foot .terms {
    display: block;
    margin-top: 8px;
    font-size: 11.5px;
}

.otp-row {
    display: flex;
    gap: 10px;
}
.otp-row input {
    width: 100%;
    text-align: center;
    padding: 14px 0;
    font-size: 20px;
    font-weight: 700;
    border: 1.5px solid var(--border);
    border-radius: 14px;
    background: #fff;
    color: var(--dark);
}
.otp-row input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-light);
}

.pw-strength {
    display: flex;
    gap: 5px;
    margin: 10px 0 4px 0;
}
.pw-strength span {
    height: 5px;
    flex: 1;
    background: var(--border);
    border-radius: 3px;
}
.pw-strength span.on-weak {
    background: var(--danger);
}
.pw-strength span.on-mid {
    background: #f5a623;
}
.pw-strength span.on-strong {
    background: var(--teal);
}

.back-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 1.5px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
    box-shadow: var(--shadow-sm);
}
.back-circle svg {
    width: 18px;
    height: 18px;
}

.alert-banner {
    display: none;
    align-items: center;
    gap: 10px;
    background: #fff0ef;
    color: var(--danger);
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 12.5px;
    font-weight: 600;
    margin-bottom: 16px;
}
.alert-banner.show {
    display: flex;
}
.alert-banner svg {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
}

/* ============ TOAST ============ */
.toast-wrap {
    position: fixed;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    width: calc(100% - 32px);
    max-width: 380px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.toast {
    background: var(--dark);
    color: #fff;
    padding: 13px 16px;
    border-radius: 14px;
    font-size: 12.5px;
    font-weight: 600;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateY(-14px);
}
.toast.toast-success {
    background: var(--teal);
}
.toast.toast-error {
    background: var(--danger);
}
.toast svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ============ APP SHELL (Dashboard) ============ */
.app-shell {
    min-height: 100vh;
    background: var(--bg);
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
}
.topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.menu-toggle {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.menu-toggle svg {
    width: 20px;
    height: 20px;
}
.topbar-brand img {
    height: 38px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}
.bell-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.bell-btn svg {
    width: 20px;
    height: 20px;
}
.bell-btn .dot {
    position: absolute;
    top: 9px;
    right: 10px;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    border: 2px solid #fff;
}

/* Sidebar */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(20, 20, 20, 0.5);
    z-index: 55;
    backdrop-filter: blur(2px);
}
.sidebar-backdrop.show {
    display: block;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 300px;
    max-width: 86vw;
    background: var(--card-bg);
    z-index: 60;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}
.sidebar::before,
.sidebar::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}
.sidebar::before {
    width: 260px;
    height: 260px;
    background: radial-gradient(
        circle,
        rgba(var(--accent-rgb), 0.1) 0%,
        rgba(var(--accent-rgb), 0) 70%
    );
    top: -90px;
    right: -110px;
}
.sidebar::after {
    width: 220px;
    height: 220px;
    background: radial-gradient(
        circle,
        rgba(240, 163, 60, 0.08) 0%,
        rgba(240, 163, 60, 0) 70%
    );
    bottom: 60px;
    left: -100px;
}
.sidebar.open {
    transform: translateX(0);
}

.sidebar-scroll {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 20px;
    position: relative;
    z-index: 1;
}

.sidebar-top {
    padding: 22px 20px 18px 20px;
}
.sidebar-top img {
    height: 40px;
    margin-bottom: 18px;
}

.sidebar-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}
.sidebar-profile img {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-light);
}
.sidebar-profile .p-name {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--dark);
}
.sidebar-profile .p-grade {
    font-size: 12px;
    font-weight: 600;
    color: var(--teal);
    margin-top: 1px;
}
.sidebar-profile .p-id {
    display: inline-block;
    margin-top: 6px;
    background: var(--bg);
    color: var(--text-muted);
    font-size: 10.5px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
}

.sidebar-nav {
    padding: 10px 12px;
}
.sidebar-nav .nav-item {
    margin-bottom: 2px;
}
.sidebar-nav .nav-link-item {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 12px 12px;
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 2px;
    position: relative;
    cursor: pointer;
}
.sidebar-nav .nav-link-item svg {
    width: 19px;
    height: 19px;
    stroke: var(--text-muted);
    flex-shrink: 0;
}
.sidebar-nav .nav-link-item span.txt {
    flex: 1;
}
.sidebar-nav .nav-link-item:hover {
    background: var(--bg);
}
.sidebar-nav .nav-link-item.active {
    background: var(--accent-light);
    color: var(--accent);
}
.sidebar-nav .nav-link-item.active svg {
    stroke: var(--accent);
}

.nav-link-item .chev {
    width: 15px !important;
    height: 15px !important;
    stroke: var(--text-muted) !important;
    opacity: 0.7;
    transition: transform 0.2s;
    flex-shrink: 0;
}
.nav-item.open > .nav-link-item .chev {
    transform: rotate(90deg);
}

.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.28s ease;
    padding-left: 16px;
}
.nav-item.open > .submenu {
    max-height: 800px;
}

.submenu .nav-link-item {
    font-size: 12.5px;
    padding: 10px 12px;
    font-weight: 550;
}
.submenu .submenu .nav-link-item {
    padding-left: 14px;
    font-size: 12px;
}
.submenu .submenu {
    padding-left: 12px;
}
.submenu .nav-link-item::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--text-muted);
    opacity: 0.5;
    flex-shrink: 0;
    margin-right: -3px;
}
.submenu .nav-link-item.active::before {
    background: var(--accent);
    opacity: 1;
}

.nav-badge-dot {
    width: 8px;
    height: 8px;
    background: var(--teal);
    border-radius: 50%;
}
.nav-badge-count {
    background: var(--teal);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-divider {
    height: 1px;
    background: var(--border);
    margin: 10px 20px;
}

.darkmode-row {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 12px;
    margin: 4px 12px;
    border-radius: 12px;
    background: var(--bg);
}
.darkmode-row svg {
    width: 19px;
    height: 19px;
    stroke: var(--text-muted);
}
.darkmode-row span {
    flex: 1;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--dark);
}
.switch {
    position: relative;
    width: 40px;
    height: 23px;
    flex-shrink: 0;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.switch .slider {
    position: absolute;
    inset: 0;
    background: #d8dce1;
    border-radius: 20px;
    cursor: pointer;
    transition: 0.2s;
}
.switch .slider::before {
    content: "";
    position: absolute;
    width: 17px;
    height: 17px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.switch input:checked + .slider {
    background: var(--accent);
}
.switch input:checked + .slider::before {
    transform: translateX(17px);
}

.logout-row {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 13px;
    margin: 12px 12px 0 12px;
    border-radius: 12px;
    background: #fff0ef;
    color: var(--danger);
    font-size: 13.5px;
    font-weight: 700;
}
.logout-row svg {
    width: 19px;
    height: 19px;
    stroke: var(--danger);
}

/* ============ MAIN CONTENT ============ */
.main-content {
    padding: 18px 16px 96px 16px;
    max-width: 900px;
    margin: 0 auto;
}

.hero-banner {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: linear-gradient(120deg, #f0559a 0%, #d82e7c 100%);
    padding: 22px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
    color: #fff;
}
.hero-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}
.hero-avatar {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.6);
    flex-shrink: 0;
}
.hero-text h2 {
    font-size: 19px;
    font-weight: 700;
}
.hero-grade {
    display: inline-block;
    background: rgba(255, 255, 255, 0.25);
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    margin: 6px 0;
}
.hero-text p {
    font-size: 12px;
    font-weight: 500;
    opacity: 0.95;
}
.hero-illustration {
    width: 68px;
    height: 68px;
    flex-shrink: 0;
    opacity: 0.95;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 22px 0 12px 0;
}
.section-head h3 {
    font-size: 15.5px;
    font-weight: 700;
}
.section-head a {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 3px;
}
.section-head a svg {
    width: 14px;
    height: 14px;
}

.quick-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.qa-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 14px 6px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    text-align: center;
    transition: transform 0.15s;
    flex: 0 0 calc(33.333% - 8px);
    max-width: calc(33.333% - 8px);
}
.qa-btn:active {
    transform: scale(0.95);
}
.qa-icon {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.qa-icon svg {
    width: 20px;
    height: 20px;
}
.qa-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.25;
}

@media (min-width: 560px) {
    .qa-btn {
        flex-basis: calc(16.666% - 10px);
        max-width: calc(16.666% - 10px);
    }
}

.overview-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}
.overview-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.stat-tile {
    border-radius: 14px;
    padding: 12px;
    flex: 0 0 calc(50% - 5px);
    max-width: calc(50% - 5px);
}
.stat-tile .st-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}
.stat-tile .st-icon svg {
    width: 16px;
    height: 16px;
}
.stat-tile .st-label {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--text-muted);
}
.stat-tile .st-value {
    font-size: 17px;
    font-weight: 800;
    margin: 1px 0;
}
.stat-tile .st-sub {
    font-size: 9.5px;
    font-weight: 600;
    color: var(--text-muted);
}

.tile-green {
    background: var(--teal-light);
}
.tile-green .st-icon {
    background: #fff;
}
.tile-green .st-icon svg {
    stroke: var(--teal);
}
.tile-green .st-value {
    color: var(--teal);
}

.tile-blue {
    background: var(--blue-light);
}
.tile-blue .st-icon {
    background: #fff;
}
.tile-blue .st-icon svg {
    stroke: var(--blue);
}
.tile-blue .st-value {
    color: var(--blue);
}

.tile-orange {
    background: #fdeaf2;
}
.tile-orange .st-icon {
    background: #fff;
}
.tile-orange .st-icon svg {
    stroke: var(--orange);
}
.tile-orange .st-value {
    color: var(--orange);
}

.tile-purple {
    background: var(--purple-light);
}
.tile-purple .st-icon {
    background: #fff;
}
.tile-purple .st-icon svg {
    stroke: var(--purple);
}
.tile-purple .st-value {
    color: var(--purple);
}

.courses-row {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}
.courses-row::-webkit-scrollbar {
    display: none;
}
.course-card {
    flex: 0 0 168px;
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 14px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}
.course-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}
.course-icon svg {
    width: 20px;
    height: 20px;
}
.course-card h4 {
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
    min-height: 32px;
}
.course-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 5px;
}
.course-progress-label b {
    font-size: 11px;
}
.progress-track {
    height: 6px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    border-radius: 4px;
    width: 0%;
}

.list-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 6px 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}
.sched-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid var(--border);
}
.sched-row:last-child {
    border-bottom: none;
}
.sched-time {
    font-size: 11.5px;
    font-weight: 700;
    width: 62px;
    flex-shrink: 0;
}
.sched-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.sched-icon svg {
    width: 17px;
    height: 17px;
}
.sched-main {
    flex: 1;
    min-width: 0;
}
.sched-main .sm-title {
    font-size: 12.5px;
    font-weight: 700;
}
.sched-main .sm-room {
    font-size: 10.5px;
    color: var(--text-muted);
    font-weight: 600;
}
.sched-chev {
    width: 16px;
    height: 16px;
    stroke: #c3c8ce;
    flex-shrink: 0;
}

.id-promo {
    background: linear-gradient(120deg, var(--teal-light), #fcf4f9);
    border-radius: var(--radius-lg);
    padding: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 22px 0;
}
.id-promo-text h4 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
}
.id-promo-text p {
    font-size: 11.5px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 12px;
    max-width: 180px;
}
.btn-mini-orange {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 9px 18px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 6px 16px rgba(var(--accent-rgb), 0.3);
}
.mini-id-card {
    width: 150px;
    background: #fff;
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 10px 24px rgba(240, 163, 60, 0.18);
    flex-shrink: 0;
    transform: rotate(3deg);
}
.mini-id-card .mic-head {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 8px;
}
.mini-id-card .mic-head img {
    height: 14px;
}
.mini-id-card .mic-body {
    display: flex;
    gap: 8px;
    align-items: center;
}
.mini-id-card img.mic-photo {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    object-fit: cover;
}
.mini-id-card .mic-name {
    font-size: 10px;
    font-weight: 700;
}
.mini-id-card .mic-grade {
    font-size: 8.5px;
    color: var(--text-muted);
    font-weight: 600;
}

.announce-row {
    display: flex;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid var(--border);
}
.announce-row:last-child {
    border-bottom: none;
}
.announce-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--teal-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.announce-icon svg {
    width: 18px;
    height: 18px;
    stroke: var(--teal);
}
.announce-main {
    flex: 1;
    min-width: 0;
}
.announce-main .am-title {
    font-size: 12.5px;
    font-weight: 700;
}
.announce-main .am-desc {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 2px;
    line-height: 1.4;
}
.announce-time {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 600;
    white-space: nowrap;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}
.announce-time .unread-dot {
    width: 7px;
    height: 7px;
    background: var(--accent);
    border-radius: 50%;
}

/* Bottom nav */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 45;
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom, 0px)) 6px;
}
.bottom-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 9.5px;
    font-weight: 700;
    color: #a6acb4;
    padding: 4px;
}
.bottom-nav a svg {
    width: 21px;
    height: 21px;
    stroke: currentColor;
}
.bottom-nav a.active {
    color: var(--accent);
}
.bottom-nav .fab-wrap {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
}
.bottom-nav .fab {
    position: absolute;
    top: -26px;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f0559a, var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px rgba(var(--accent-rgb), 0.4);
    border: 4px solid var(--card-bg);
}
.bottom-nav .fab svg {
    width: 22px;
    height: 22px;
    stroke: #fff;
}
.bottom-nav .fab-label {
    position: absolute;
    top: 30px;
    font-size: 9.5px;
    font-weight: 700;
    color: var(--accent);
    white-space: nowrap;
}

/* ============ DESKTOP / RESPONSIVE ============ */
@media (min-width: 992px) {
    .auth-shell {
        align-items: center;
    }
    .menu-toggle {
        display: none;
    }
    .sidebar-backdrop {
        display: none !important;
    }
    .sidebar {
        position: sticky;
        top: 0;
        height: 100vh;
        transform: none;
        box-shadow: none;
        border-right: 1px solid var(--border);
    }
    .app-shell {
        display: flex;
    }
    .app-main {
        flex: 1;
        min-width: 0;
    }
    .bottom-nav {
        display: none;
    }
    .main-content {
        padding: 28px 32px 44px 32px;
        max-width: 1100px;
    }
    .overview-grid {
        gap: 16px;
    }
    .stat-tile {
        flex-basis: calc(25% - 12px);
        max-width: calc(25% - 12px);
    }
    .courses-row {
        overflow: visible;
    }
    .course-card {
        flex: 1;
    }
    .content-cols {
        display: grid;
        grid-template-columns: 1.6fr 1fr;
        gap: 20px;
        align-items: start;
    }
    .hero-banner {
        padding: 30px 34px;
    }
    .hero-illustration {
        width: 90px;
        height: 90px;
    }
}

/* ============ SCROLLBARS — thin, smooth, accent-tinted ============ */
html {
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--accent-rgb), 0.65) transparent;
    scroll-behavior: smooth;
}
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background-color: rgba(var(--accent-rgb), 0.6);
    border-radius: 10px;
    transition: background-color 0.2s;
}
::-webkit-scrollbar-thumb:hover {
    background-color: rgba(var(--accent-rgb), 0.85);
}

.sidebar-scroll {
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--accent-rgb), 0.65) transparent;
}
.sidebar-scroll::-webkit-scrollbar {
    width: 4px;
}
.sidebar-scroll::-webkit-scrollbar-thumb {
    background-color: rgba(var(--accent-rgb), 0.65);
    border-radius: 10px;
}

/* ============ SIDEBAR CLOSE BUTTON ============ */
.sidebar-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}
.sidebar-top-row img {
    height: 40px;
}
.sidebar-close-btn {
    display: flex;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--bg);
    border: none;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.sidebar-close-btn svg {
    width: 16px;
    height: 16px;
    stroke: var(--dark);
}
@media (min-width: 992px) {
    .sidebar-close-btn {
        display: none;
    }
}

/* ============ NOTIFICATION DROPDOWN ============ */
.dropdown-panel {
    position: absolute;
    top: 52px;
    right: 0;
    width: 320px;
    max-width: 88vw;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
    z-index: 70;
    display: none;
    overflow: hidden;
}
.dropdown-panel.show {
    display: block;
}
.dropdown-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}
.dropdown-panel-head h5 {
    font-size: 13.5px;
    font-weight: 700;
    margin: 0;
}
.dropdown-panel-head a {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
}
.dropdown-panel-body {
    max-height: 340px;
    overflow-y: auto;
}
.notif-item {
    display: flex;
    gap: 11px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}
.notif-item:last-child {
    border-bottom: none;
}
.notif-item .ni-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.notif-item .ni-icon svg {
    width: 16px;
    height: 16px;
}
.notif-item .ni-main {
    flex: 1;
    min-width: 0;
}
.notif-item .ni-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.35;
}
.notif-item .ni-time {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    margin-top: 3px;
}
.notif-item.unread {
    background: rgba(var(--accent-rgb), 0.05);
}
.dropdown-panel-foot {
    padding: 10px;
    text-align: center;
}
.dropdown-panel-foot a {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--accent);
}
.notif-empty {
    padding: 30px 16px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

/* ============ SETTINGS PANEL (Panel Settings drawer) ============ */
.settings-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 340px;
    max-width: 90vw;
    background: var(--card-bg);
    z-index: 80;
    transform: translateX(100%);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
}
.settings-panel.open {
    transform: translateX(0);
}
.settings-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(20, 20, 20, 0.5);
    z-index: 75;
    backdrop-filter: blur(2px);
}
.settings-backdrop.show {
    display: block;
}

.settings-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
}
.settings-head h4 {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 15px;
    font-weight: 700;
    margin: 0;
}
.settings-head h4 svg {
    width: 19px;
    height: 19px;
    stroke: var(--teal);
}
.settings-close {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    border: none;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
}
.settings-close svg {
    width: 16px;
    height: 16px;
    stroke: var(--dark);
}

.settings-body {
    flex: 1;
    overflow-y: auto;
    padding: 18px 20px 30px 20px;
}
.settings-label {
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--text-muted);
    text-transform: uppercase;
    margin: 18px 0 10px 0;
}
.settings-label:first-child {
    margin-top: 0;
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.settings-row:last-of-type {
    border-bottom: none;
}
.settings-row .sr-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--dark);
}
.settings-row .sr-sub {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 2px;
}

.swatch-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding-bottom: 6px;
}
.swatch {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.25);
}
.swatch svg {
    width: 16px;
    height: 16px;
    stroke: #fff;
    opacity: 0;
    transition: opacity 0.15s;
}
.swatch.selected svg {
    opacity: 1;
}
.swatch.selected {
    box-shadow:
        0 0 0 2px var(--card-bg),
        0 0 0 4px currentColor;
}

.settings-select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1.5px solid var(--border);
    background: var(--card-bg);
    color: var(--dark);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238A9099' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.gear-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gear-btn svg {
    width: 19px;
    height: 19px;
    stroke: var(--dark);
}

/* ============ COLLAPSED SIDEBAR (desktop) ============ */
@media (min-width: 992px) {
    .sidebar.collapsed {
        width: 84px;
    }
    .sidebar.collapsed .sidebar-profile,
    .sidebar.collapsed .nav-text-label,
    .sidebar.collapsed .nav-link-item .txt,
    .sidebar.collapsed .nav-badge-dot,
    .sidebar.collapsed .nav-badge-count,
    .sidebar.collapsed .darkmode-row span,
    .sidebar.collapsed .darkmode-row .switch,
    .sidebar.collapsed .logout-row .txt-label,
    .sidebar.collapsed .sidebar-top-row img {
        display: none;
    }
    .sidebar.collapsed .sidebar-nav .nav-link-item {
        justify-content: center;
    }
    .sidebar.collapsed .logout-row {
        justify-content: center;
    }
}

/* ============ ATTENDANCE + FEE WIDGETS ============ */
.mini-widgets-row {
    display: flex;
    gap: 12px;
    margin: 18px 0 4px 0;
}
.mini-widget {
    flex: 1;
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 15px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}
.mw-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.mw-head .mw-title {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--dark);
}
.mw-status-badge {
    font-size: 10px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 20px;
}
.mw-status-present {
    background: #e9f8ef;
    color: var(--success);
}
.mw-status-absent {
    background: #fdedec;
    color: var(--danger);
}
.mw-status-cleared {
    background: #e9f8ef;
    color: var(--success);
}
.mw-status-pending {
    background: #fdf3e2;
    color: #b3760f;
}

.mw-attendance-main {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.mw-att-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mw-att-icon svg {
    width: 21px;
    height: 21px;
}
.mw-att-icon.present {
    background: #e9f8ef;
}
.mw-att-icon.present svg {
    stroke: var(--success);
}
.mw-att-icon.absent {
    background: #fdedec;
}
.mw-att-icon.absent svg {
    stroke: var(--danger);
}
.mw-att-text .mw-big {
    font-size: 15px;
    font-weight: 800;
    color: var(--dark);
}
.mw-att-text .mw-small {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--text-muted);
}

.mw-stats-row {
    display: flex;
    gap: 8px;
}
.mw-stat-chip {
    flex: 1;
    text-align: center;
    background: var(--bg);
    border-radius: 10px;
    padding: 8px 4px;
}
.mw-stat-chip .mwc-val {
    font-size: 13.5px;
    font-weight: 800;
}
.mw-stat-chip .mwc-lbl {
    font-size: 9px;
    font-weight: 700;
    color: var(--text-muted);
    margin-top: 1px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.mw-fee-amount {
    font-size: 20px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 2px;
}
.mw-fee-sub {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.mw-fee-track {
    height: 8px;
    background: var(--bg);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 10px;
}
.mw-fee-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--teal), #d6871c);
    border-radius: 6px;
    width: 0%;
}
.mw-fee-legend {
    display: flex;
    justify-content: space-between;
    font-size: 10.5px;
    font-weight: 700;
}
.mw-fee-legend .paid {
    color: var(--teal);
}
.mw-fee-legend .due {
    color: var(--danger);
}

@media (max-width: 560px) {
    .mini-widgets-row {
        flex-direction: column;
    }
}

.profile-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    overflow: hidden;
}

.profile-header {
    background: linear-gradient(135deg, #f0559a 0%, var(--accent) 100%);
    padding: 30px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.profile-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.5);
}

.profile-avatar-edit {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s;
}

.profile-avatar-edit:hover {
    transform: scale(1.1);
}

.profile-avatar-edit svg {
    width: 16px;
    height: 16px;
    stroke: var(--accent);
}

.profile-name-section {
    color: #fff;
}

.profile-name {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 4px 0;
}

.profile-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.25);
    padding: 2px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    margin-right: 8px;
}

.profile-id {
    display: inline-block;
    font-size: 12px;
    font-weight: 500;
    opacity: 0.9;
}

.profile-body {
    padding: 24px;
}

.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 24px;
}

.profile-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

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

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

.profile-field .field-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
    margin: 0;
    padding: 4px 0;
    border-bottom: 1px solid var(--border);
}

.profile-field .field-input {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
    padding: 8px 12px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    font-family: inherit;
    width: 100%;
}

.profile-field .field-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.profile-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    justify-content: flex-end;
}

.btn-cancel {
    padding: 10px 24px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    background: transparent;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel:hover {
    background: var(--bg);
}

.btn-update {
    padding: 10px 28px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #f0559a 0%, var(--accent) 100%);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-update:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--accent-rgb), 0.4);
}

.btn-update:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.edit-toggle-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1.5px solid var(--accent);
    border-radius: 10px;
    background: transparent;
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.edit-toggle-btn svg {
    width: 16px;
    height: 16px;
    stroke: var(--accent);
}

.edit-toggle-btn:hover {
    background: var(--accent-light);
}

@media (max-width: 600px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
        padding: 24px 16px;
    }

    .profile-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .profile-avatar {
        width: 80px;
        height: 80px;
    }

    .profile-actions {
        flex-direction: column;
    }

    .section-head {
        flex-wrap: wrap;
        gap: 10px;
    }
}
.toast-wrap {
    position: fixed;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    width: calc(100% - 32px);
    max-width: 380px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--dark);
    color: #fff;
    padding: 13px 16px;
    border-radius: 14px;
    font-size: 12.5px;
    font-weight: 600;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateY(-14px);
    transition: all 0.3s ease;
}

.toast-success {
    background: var(--teal);
}

.toast-error {
    background: var(--danger);
}

.toast-info {
    background: var(--blue);
}

.toast svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
