/* =============================================
   MySmartKMS Pelajar PWA — Design System v2
   ============================================= */

/* ---------- 1. Design Tokens ---------- */
:root {
    --c-primary:       #1d4ed8;
    --c-primary-mid:   #2563eb;
    --c-primary-light: #3b82f6;
    --c-accent:        #7c3aed;
    --c-accent-light:  #a78bfa;
    --c-danger:        #dc2626;
    --c-success:       #16a34a;
    --c-warning:       #d97706;

    --c-bg:            #f0f4ff;
    --c-surface:       #ffffff;
    --c-surface-2:     #f8faff;
    --c-border:        #e2e8f7;
    --c-text:          #0f172a;
    --c-text-2:        #374151;
    --c-muted:         #6b7280;
    --c-white:         #ffffff;

    --grad-header:     linear-gradient(140deg, #1e3a8a 0%, #2563eb 55%, #7c3aed 100%);
    --grad-scan:       linear-gradient(135deg, #7c3aed 0%, #2563eb 100%);
    --grad-login-bg:   linear-gradient(160deg, #0f172a 0%, #1e3a8a 50%, #312e81 100%);

    --shadow-sm:       0 2px 8px rgba(15,23,42,.07);
    --shadow-md:       0 6px 20px rgba(15,23,42,.10);
    --shadow-lg:       0 14px 36px rgba(15,23,42,.14);
    --shadow-blue:     0 10px 28px rgba(37,99,235,.28);
    --shadow-purple:   0 10px 28px rgba(124,58,237,.28);

    --radius-sm:       12px;
    --radius-md:       18px;
    --radius-lg:       24px;
    --radius-xl:       32px;
    --radius-full:     999px;

    --nav-height:      68px;
    --max-w:           430px;

    --ease-spring:     cubic-bezier(.34,1.56,.64,1);
    --ease-out:        cubic-bezier(.22,.68,0,1.2);
}

/* ---------- 2. Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
    min-height: 100%;
    background: var(--c-bg);
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    color: var(--c-text);
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--c-bg);
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

button, input, select, textarea { font: inherit; }

img { display: block; }

/* ---------- 3. App Shell ---------- */
.pelajar-app { min-height: 100vh; }

.app-shell {
    width: 100%;
    max-width: var(--max-w);
    min-height: 100vh;
    margin: 0 auto;
    padding: 0 16px calc(var(--nav-height) + 20px + env(safe-area-inset-bottom));
    background: var(--c-bg);
}

/* ---------- 4. Header ---------- */
.app-header {
    margin: 0 -16px 20px;
    padding: max(20px, env(safe-area-inset-top)) 20px 28px;
    border-radius: 0 0 36px 36px;
    overflow: hidden;
}

.app-gradient {
    position: relative;
    color: var(--c-white);
    background: var(--grad-header);
    box-shadow: var(--shadow-blue);
}

/* Decorative orbs */
.app-gradient::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 90% -10%, rgba(167,139,250,.35) 0%, transparent 55%),
        radial-gradient(circle at -10% 110%, rgba(37,99,235,.40) 0%, transparent 50%);
    pointer-events: none;
}

.app-gradient::after {
    content: "";
    position: absolute;
    width: 200px; height: 200px;
    top: -80px; right: -60px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    pointer-events: none;
}

/* Top Row */
.top-row {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.top-row h1, .top-row p { margin: 0; }

.top-row p {
    color: rgba(255,255,255,.75);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .3px;
    text-transform: uppercase;
}

.top-row h1 {
    color: var(--c-white);
    font-size: 1.3rem;
    line-height: 1.15;
    font-weight: 800;
}

/* Brand mini */
.brand-mini {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: .95rem;
    letter-spacing: .2px;
    color: var(--c-white);
}

.brand-mini img {
    width: 34px; height: 34px;
    border-radius: 10px;
    background: var(--c-white);
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
}

/* Icon button */
.icon-button {
    position: relative;
    z-index: 2;
    width: 40px; height: 40px;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 13px;
    color: var(--c-white);
    background: rgba(255,255,255,.15);
    backdrop-filter: blur(8px);
    text-decoration: none;
    font-weight: 900;
    font-size: .95rem;
    transition: background .18s;
    cursor: pointer;
}

.icon-button:active { background: rgba(255,255,255,.28); }

.notification span {
    position: absolute;
    top: -5px; right: -5px;
    min-width: 18px; height: 18px;
    display: grid;
    place-items: center;
    border-radius: var(--radius-full);
    background: #ef4444;
    color: var(--c-white);
    font-size: .62rem;
    font-weight: 900;
    border: 2px solid transparent;
    box-shadow: 0 2px 6px rgba(239,68,68,.5);
}

/* Profile hero */
.profile-hero {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 22px;
}

.profile-hero p, .profile-hero h1 { margin: 0; }

.profile-hero p {
    color: rgba(255,255,255,.75);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .2px;
}

.profile-hero h1 {
    max-width: 240px;
    margin-top: 3px;
    color: var(--c-white);
    font-size: 1.35rem;
    line-height: 1.12;
    font-weight: 800;
}

.profile-hero span {
    display: block;
    margin-top: 5px;
    color: rgba(255,255,255,.65);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .3px;
    text-transform: uppercase;
}

/* Avatar */
.avatar {
    width: 66px; height: 66px;
    flex: 0 0 66px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255,255,255,.2);
    border: 3px solid rgba(255,255,255,.70);
    box-shadow: 0 4px 16px rgba(0,0,0,.25);
}

.avatar.large {
    width: 110px; height: 110px;
    margin: 24px auto 12px;
    display: block;
    border-width: 4px;
    box-shadow: 0 8px 28px rgba(0,0,0,.3);
}

/* Profile header (profil page) */
.profile-header {
    text-align: center;
    padding-bottom: 38px;
}

.profile-header h1 {
    position: relative;
    z-index: 2;
    margin: 0;
    color: var(--c-white);
    font-size: 1.4rem;
    font-weight: 800;
}

.profile-header p {
    position: relative;
    z-index: 2;
    margin: 6px 0 0;
    color: rgba(255,255,255,.75);
    font-size: .85rem;
    font-weight: 700;
}

/* ---------- 5. Cards ---------- */
.app-card {
    border-radius: var(--radius-lg);
    background: var(--c-surface);
    box-shadow: var(--shadow-md);
}

.today-card {
    padding: 20px;
    border-radius: var(--radius-lg);
    background: var(--c-surface);
    box-shadow: var(--shadow-md);
}

.section-kicker {
    margin: 0 0 4px;
    color: var(--c-primary-mid);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .6px;
    text-transform: uppercase;
}

.today-card h2 {
    margin: 0;
    color: var(--c-text);
    font-size: 1.15rem;
    font-weight: 800;
}

.today-card p {
    margin: 6px 0 0;
    color: var(--c-muted);
    font-size: .88rem;
    line-height: 1.5;
    font-weight: 600;
}

/* Quick actions row */
.quick-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--c-border);
}

.quick-action {
    display: grid;
    justify-items: center;
    gap: 7px;
    text-decoration: none;
    color: var(--c-text);
    font-size: .7rem;
    font-weight: 800;
    text-align: center;
    line-height: 1.3;
}

/* ---------- 6. Dashboard Grid ---------- */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.dashboard-grid.small { gap: 12px; }

.shortcut-card {
    min-height: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 14px;
    border-radius: var(--radius-lg);
    background: var(--c-surface);
    box-shadow: var(--shadow-md);
    color: var(--c-text);
    text-decoration: none;
    transition: transform .18s var(--ease-spring), box-shadow .18s;
}

.shortcut-card:active {
    transform: scale(.96);
    box-shadow: var(--shadow-sm);
}

.dashboard-grid.small .shortcut-card { min-height: 110px; }

.shortcut-card strong {
    font-size: .95rem;
    font-weight: 800;
    text-align: center;
}

/* Shortcut icon */
.shortcut-icon {
    width: 50px; height: 50px;
    display: grid;
    place-items: center;
    border-radius: var(--radius-md);
    font-size: 1.3rem;
    font-weight: 900;
    transition: transform .18s var(--ease-spring);
}

.shortcut-card:active .shortcut-icon { transform: scale(.9); }

.shortcut-card .shortcut-icon {
    width: 68px; height: 68px;
    border-radius: 50%;
    font-size: 1.7rem;
}

/* Colour helpers */
.blue   { background: #dbeafe; color: #1d4ed8; }
.cyan   { background: #cffafe; color: #0891b2; }
.purple { background: #ede9fe; color: #7c3aed; }
.green  { background: #dcfce7; color: #16a34a; }
.pink   { background: #fce7f3; color: #be185d; }
.orange { background: #ffedd5; color: #ea580c; }
.red    { background: #fee2e2; color: #dc2626; }
.indigo { background: #e0e7ff; color: #4338ca; }

/* ---------- 7. Sections & Lists ---------- */
.app-section { margin-top: 24px; }

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.section-title h2 {
    margin: 0;
    color: var(--c-text);
    font-size: 1.05rem;
    font-weight: 800;
}

.section-title a,
.section-title span {
    color: var(--c-primary-mid);
    font-size: .78rem;
    font-weight: 800;
    text-decoration: none;
}

.list-card { display: grid; gap: 10px; }

.list-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: var(--c-surface);
    color: var(--c-text);
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: transform .15s var(--ease-spring), box-shadow .15s;
}

.list-item:active {
    transform: scale(.98);
    box-shadow: none;
}

.list-item.tall { align-items: flex-start; }

.list-item strong {
    display: block;
    font-size: .9rem;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.list-item small {
    display: block;
    margin-top: 3px;
    color: var(--c-muted);
    font-size: .75rem;
    font-weight: 600;
}

.list-item em {
    padding: 6px 10px;
    border-radius: var(--radius-full);
    background: var(--c-surface-2);
    color: var(--c-text-2);
    font-size: .7rem;
    font-style: normal;
    font-weight: 800;
    white-space: nowrap;
    border: 1px solid var(--c-border);
}

/* Filter row */
.filter-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 0 4px;
    scrollbar-width: none;
}

.filter-row::-webkit-scrollbar { display: none; }

.filter-row span {
    flex: 0 0 auto;
    padding: 8px 14px;
    border-radius: var(--radius-full);
    background: var(--c-surface);
    color: var(--c-primary-mid);
    font-size: .78rem;
    font-weight: 800;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--c-border);
}

/* Empty states */
.empty-state,
.mini-empty {
    border-radius: var(--radius-lg);
    background: var(--c-surface);
    text-align: center;
    box-shadow: var(--shadow-md);
}

.empty-state { padding: 32px 22px; }

.empty-state span {
    width: 64px; height: 64px;
    display: grid;
    place-items: center;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: #ede9fe;
    color: #7c3aed;
    font-size: 1.7rem;
    font-weight: 900;
}

.empty-state h2 { margin: 0; font-size: 1rem; font-weight: 800; }

.empty-state p {
    margin: 8px 0 0;
    color: var(--c-muted);
    font-size: .88rem;
    line-height: 1.5;
}

.mini-empty {
    padding: 18px;
    color: var(--c-muted);
    font-size: .85rem;
    font-weight: 700;
}

/* ---------- 8. Profile Page ---------- */
.profile-card {
    display: grid;
    gap: 0;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--c-surface);
    box-shadow: var(--shadow-md);
}

.profile-card div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 18px;
    border-bottom: 1px solid var(--c-border);
}

.profile-card div:last-child { border-bottom: 0; }

.profile-card span {
    color: var(--c-muted);
    font-size: .85rem;
    font-weight: 700;
}

.profile-card strong {
    text-align: right;
    overflow-wrap: anywhere;
    font-size: .9rem;
    font-weight: 800;
}

.logout-button {
    min-height: 52px;
    display: grid;
    place-items: center;
    margin-top: 16px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    color: var(--c-white);
    text-decoration: none;
    font-weight: 800;
    font-size: .95rem;
    box-shadow: 0 8px 22px rgba(220,38,38,.30);
    transition: opacity .18s, transform .18s var(--ease-spring);
}

.logout-button:active { opacity: .9; transform: scale(.98); }

/* ---------- 9. Bottom Navigation ---------- */
.bottom-nav {
    position: fixed;
    left: 50%;
    bottom: 0;
    z-index: 100;
    width: min(100%, var(--max-w));
    height: calc(var(--nav-height) + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: 1fr 1fr 72px 1fr 1fr;
    align-items: start;
    padding: 8px 12px env(safe-area-inset-bottom);
    border-radius: 24px 24px 0 0;
    background: rgba(255,255,255,.97);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    box-shadow: 0 -8px 32px rgba(15,23,42,.12), 0 -1px 0 var(--c-border);
    transform: translateX(-50%);
}

.bottom-nav-item,
.scan-fab { text-decoration: none; }

.bottom-nav-item {
    min-height: 54px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 3px;
    color: #9ca3af;
    font-size: .68rem;
    font-weight: 800;
    border-radius: var(--radius-md);
    transition: color .18s;
}

.bottom-nav-item.is-active { color: var(--c-accent); }

.nav-icon {
    font-size: 1.25rem;
    line-height: 1;
    transition: transform .2s var(--ease-spring);
}

.bottom-nav-item.is-active .nav-icon {
    transform: scale(1.15) translateY(-1px);
}

/* FAB Scan Button */
.scan-fab {
    display: grid;
    place-items: center;
    padding-top: 0;
    margin-top: -20px;
}

.scan-fab span {
    width: 58px; height: 58px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    background: var(--grad-scan);
    color: var(--c-white);
    font-size: 1.55rem;
    font-weight: 900;
    box-shadow: 0 8px 24px rgba(124,58,237,.40);
    border: 3px solid rgba(255,255,255,.90);
    transition: transform .2s var(--ease-spring), box-shadow .2s;
    transform: rotate(45deg);
}

.scan-fab span::first-letter {
    display: inline-block;
    transform: rotate(-45deg);
}

.scan-fab:active span {
    transform: rotate(45deg) scale(.92);
    box-shadow: 0 4px 12px rgba(124,58,237,.30);
}

/* ---------- 10. Login Page ---------- */
.student-login-page {
    min-height: 100vh;
    margin: 0;
    background: var(--grad-login-bg);
    overflow: hidden;
    position: relative;
}

/* Animated background orbs */
.student-login-page::before {
    content: "";
    position: fixed;
    width: 400px; height: 400px;
    top: -120px; right: -100px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124,58,237,.45) 0%, transparent 70%);
    pointer-events: none;
    animation: orb-float 8s ease-in-out infinite;
}

.student-login-page::after {
    content: "";
    position: fixed;
    width: 320px; height: 320px;
    bottom: -80px; left: -80px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37,99,235,.40) 0%, transparent 70%);
    pointer-events: none;
    animation: orb-float 10s ease-in-out infinite reverse;
}

@keyframes orb-float {
    0%, 100% { transform: translateY(0) scale(1); }
    50%       { transform: translateY(-24px) scale(1.06); }
}

.student-login-shell {
    width: min(100%, var(--max-w));
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 0 auto;
    padding: max(32px, env(safe-area-inset-top)) 20px max(28px, env(safe-area-inset-bottom));
}

.student-login-stack {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fade-up .5s var(--ease-out) both;
}

@keyframes fade-up {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Logo area */
.student-app-title {
    color: rgba(255,255,255,.55);
    text-align: center;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.student-kms-logo {
    width: 78px; height: 78px;
    display: block;
    margin: 0 auto 24px;
    object-fit: contain;
    filter: drop-shadow(0 6px 18px rgba(0,0,0,.35));
}

/* Login card — glassmorphism */
.student-login-card {
    width: 100%;
    padding: 28px 24px 24px;
    border-radius: var(--radius-xl);
    background: rgba(255,255,255,.10);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    border: 1px solid rgba(255,255,255,.18);
    box-shadow: 0 24px 60px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.2);
}

/* Brand row inside card */
.student-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    margin-bottom: 20px;
}

.student-brand-logo {
    width: 44px; height: 44px;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(0,0,0,.25);
}

.student-brand-name {
    display: block;
    color: var(--c-white);
    font-weight: 900;
    font-size: 1rem;
}

.student-brand-sub {
    display: block;
    color: rgba(255,255,255,.60);
    font-size: .75rem;
    font-weight: 700;
    margin-top: 2px;
}

.student-login-title {
    margin: 0;
    color: var(--c-white);
    text-align: center;
    font-size: 1rem;
    line-height: 1.3;
    font-weight: 800;
    letter-spacing: .2px;
}

.student-login-subtitle {
    margin: 8px 0 20px;
    color: rgba(255,255,255,.60);
    text-align: center;
    font-size: .82rem;
    line-height: 1.5;
    font-weight: 600;
}

.student-alert {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: rgba(239,68,68,.18);
    border: 1px solid rgba(239,68,68,.35);
    color: #fca5a5;
    font-size: .84rem;
    font-weight: 700;
}

/* Form */
.student-login-form { display: grid; gap: 14px; }

.student-field label {
    display: block;
    margin-bottom: 7px;
    color: rgba(255,255,255,.75);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .2px;
    text-transform: uppercase;
}

.student-input-wrap {
    min-height: 52px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,.10);
    backdrop-filter: blur(8px);
    transition: border-color .18s, background .18s;
}

.student-input-wrap:focus-within {
    border-color: rgba(255,255,255,.50);
    background: rgba(255,255,255,.16);
}

.student-field-icon {
    width: 20px; height: 20px;
    fill: rgba(255,255,255,.55);
    flex-shrink: 0;
}

.student-input-wrap input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--c-white);
    font-size: .95rem;
}

.student-input-wrap input::placeholder { color: rgba(255,255,255,.38); }

.student-form-row {
    display: flex;
    justify-content: flex-end;
    margin-top: -4px;
}

.student-form-row a {
    color: rgba(255,255,255,.70);
    text-decoration: none;
    font-size: .8rem;
    font-weight: 800;
    transition: color .15s;
}

.student-form-row a:hover { color: var(--c-white); }

/* Login button */
.student-login-button {
    width: 100%;
    min-height: 52px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    color: var(--c-white);
    font-size: .95rem;
    font-weight: 800;
    letter-spacing: .3px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(37,99,235,.45);
    transition: opacity .18s, transform .18s var(--ease-spring), box-shadow .18s;
}

.student-login-button:active {
    opacity: .92;
    transform: scale(.98);
    box-shadow: 0 4px 12px rgba(37,99,235,.35);
}

/* Secondary links */
.student-links { margin-top: 12px; }

.student-links a {
    min-height: 46px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: var(--radius-md);
    color: rgba(255,255,255,.80);
    font-size: .88rem;
    font-weight: 800;
    text-decoration: none;
    background: rgba(255,255,255,.07);
    transition: background .18s, border-color .18s;
}

.student-links a:active {
    background: rgba(255,255,255,.14);
    border-color: rgba(255,255,255,.35);
}

/* PWA install panel */
.pwa-install-panel { margin-top: 12px; }

.pwa-install-button {
    width: 100%;
    min-height: 46px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
    color: var(--c-white);
    font-weight: 800;
    font-size: .88rem;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(234,88,12,.35);
}

.ios-install-tip {
    display: none;
    margin: 10px 0 0;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: rgba(251,191,36,.12);
    border: 1px solid rgba(251,191,36,.25);
    color: #fde68a;
    font-size: .8rem;
    font-weight: 700;
    line-height: 1.5;
}

.ios-install-tip.is-visible { display: block; }

.student-back {
    display: block;
    margin-top: 16px;
    text-align: center;
    color: rgba(255,255,255,.45);
    font-size: .8rem;
    font-weight: 700;
    text-decoration: none;
    transition: color .15s;
}

.student-back:hover { color: rgba(255,255,255,.70); }

/* ---------- 11. Offline Page ---------- */
.pwa-offline-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    margin: 0;
    padding: 20px;
    background: var(--grad-login-bg);
}

.offline-card {
    width: min(100%, 380px);
    padding: 32px 28px;
    border-radius: var(--radius-xl);
    background: rgba(255,255,255,.10);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255,255,255,.18);
    text-align: center;
    box-shadow: 0 24px 60px rgba(0,0,0,.35);
    color: var(--c-white);
}

.offline-logo {
    width: 68px; height: 68px;
    object-fit: contain;
    margin: 0 auto 12px;
}

.app-kicker {
    color: var(--c-accent-light);
    font-weight: 900;
    font-size: .82rem;
    letter-spacing: .6px;
    text-transform: uppercase;
}

.offline-button {
    min-height: 46px;
    display: inline-grid;
    place-items: center;
    margin-top: 12px;
    padding: 0 22px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    color: var(--c-white);
    text-decoration: none;
    font-weight: 800;
    box-shadow: 0 6px 18px rgba(37,99,235,.40);
}

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

@keyframes pop-in {
    from { opacity: 0; transform: scale(.88); }
    to   { opacity: 1; transform: scale(1); }
}

.app-card,
.shortcut-card,
.list-item {
    animation: slide-up .35s var(--ease-out) both;
}

/* Stagger children */
.dashboard-grid .shortcut-card:nth-child(1) { animation-delay: .05s; }
.dashboard-grid .shortcut-card:nth-child(2) { animation-delay: .10s; }
.dashboard-grid .shortcut-card:nth-child(3) { animation-delay: .15s; }
.dashboard-grid .shortcut-card:nth-child(4) { animation-delay: .20s; }

.list-card .list-item:nth-child(1) { animation-delay: .08s; }
.list-card .list-item:nth-child(2) { animation-delay: .14s; }
.list-card .list-item:nth-child(3) { animation-delay: .20s; }
.list-card .list-item:nth-child(4) { animation-delay: .26s; }

/* ---------- 13. Responsive ---------- */
@media (min-width: 700px) {
    body { background: #1e2a4a; }

    .app-shell,
    .student-login-shell {
        box-shadow: 0 0 0 1px rgba(255,255,255,.06), 0 32px 80px rgba(0,0,0,.35);
    }

    .app-shell { background: var(--c-bg); }
}

@media (max-width: 380px) {
    .app-shell { padding-left: 12px; padding-right: 12px; }
    .dashboard-grid { gap: 12px; }
    .shortcut-card { min-height: 122px; }
    .quick-row { gap: 6px; }
    .student-login-card { padding: 22px 16px 20px; }
}

