/* =========================================================
   Tamayouz — Plateforme d'inscription Licence
   Arabic RTL design system
   ========================================================= */

:root {
    --primary: #003d7d;
    --primary-dark: #002a56;
    --primary-light: #e6edf7;
    --primary-soft: #f2f6fb;
    --gold: #ff0000;
    --gold-light: #ffecec;
    --ink: #131a2b;
    --ink-soft: #303a51;
    --muted: #6b7590;
    --line: #e2e7f2;
    --line-strong: #d2d9ea;
    --bg: #f4f6fb;
    --white: #ffffff;
    --danger: #b42318;
    --danger-bg: #fef3f2;
    --success: #067647;
    --success-bg: #ecfdf3;
    --warning: #b54708;
    --warning-bg: #fffaeb;
    --info: #175cd3;
    --info-bg: #eff8ff;
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 22px;
    --shadow-sm: 0 1px 2px rgba(19, 26, 43, 0.05);
    --shadow: 0 14px 40px -18px rgba(19, 26, 43, 0.22);
    --shadow-lg: 0 30px 70px -30px rgba(22, 53, 122, 0.35);
    --font: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
    --font-display: "Alexandria", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
    --header-height: 76px;
    --sidebar-width: 268px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.7;
    color: var(--ink);
    background: var(--bg);
    direction: rtl;
    text-align: right;
    min-height: 100vh;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.18s ease;
}

a:hover {
    color: var(--primary-dark);
}

h1, h2, h3, h4, h5 {
    margin: 0;
    line-height: 1.35;
    font-weight: 700;
    font-family: var(--font-display);
    color: var(--ink);
}

p {
    margin: 0;
}

svg {
    display: block;
}

::selection {
    background: rgba(0, 61, 125, 0.18);
}

:focus-visible {
    outline: 3px solid rgba(0, 61, 125, 0.28);
    outline-offset: 2px;
}

.container {
    width: min(1180px, calc(100% - 40px));
    margin-inline: auto;
}

.container-narrow {
    width: min(880px, calc(100% - 40px));
    margin-inline: auto;
}
#toolbarContainer{
display:none
}
.text-muted { color: var(--muted); }
.text-center { text-align: center; }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-primary { color: var(--primary); }
.mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.w-100 { width: 100%; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--primary);
    background: var(--primary-light);
    border: 1px solid rgba(0, 61, 125, 0.12);
    padding: 6px 14px;
    border-radius: 999px;
}

.eyebrow-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 61, 125, 0.12);
}

/* =========================================================
   Buttons
   ========================================================= */

.btn {
    --btn-bg: var(--white);
    --btn-color: var(--ink);
    --btn-border: var(--line-strong);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 12px 22px;
    border-radius: 12px;
    border: 1.5px solid var(--btn-border);
    background: var(--btn-bg);
    color: var(--btn-color);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.4;
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn:active {
    transform: translateY(0);
}

.btn svg {
    width: 18px;
    height: 18px;
}

.btn-primary {
    --btn-bg: var(--primary);
    --btn-color: #fff;
    --btn-border: var(--primary);
    box-shadow: 0 10px 24px -12px rgba(0, 61, 125, 0.7);
}

.btn-primary:hover {
    --btn-bg: var(--primary-dark);
    --btn-border: var(--primary-dark);
    color: #fff;
}

.btn-gold {
    --btn-bg: var(--gold);
    --btn-color: #fff;
    --btn-border: var(--gold);
    box-shadow: 0 10px 24px -12px rgba(255, 0, 0, 0.7);
}

.btn-gold:hover {
    --btn-bg: #a97224;
    --btn-border: #a97224;
    color: #fff;
}

.btn-outline {
    --btn-bg: transparent;
    --btn-color: var(--primary);
    --btn-border: rgba(0, 61, 125, 0.35);
}

.btn-outline:hover {
    --btn-bg: var(--primary-light);
}

.btn-ghost {
    --btn-bg: transparent;
    --btn-color: var(--ink-soft);
    --btn-border: transparent;
}

.btn-ghost:hover {
    --btn-bg: var(--primary-soft);
    color: var(--primary);
}

.btn-danger {
    --btn-bg: var(--danger);
    --btn-color: #fff;
    --btn-border: var(--danger);
}

.btn-danger:hover {
    --btn-bg: #912018;
    --btn-border: #912018;
    color: #fff;
}

.btn-white {
    --btn-bg: #fff;
    --btn-color: var(--primary-dark);
    --btn-border: #fff;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 0.86rem;
    border-radius: 9px;
}

.btn-lg {
    padding: 15px 30px;
    font-size: 1.02rem;
    border-radius: 14px;
}

.btn-block {
    width: 100%;
}

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

/* =========================================================
   Cards & surfaces
   ========================================================= */

.card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.card-pad {
    padding: 26px;
}

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--line);
}

.card-head h2,
.card-head h3 {
    font-size: 1.08rem;
}

.card-body {
    padding: 24px;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }

/* =========================================================
   Alerts
   ========================================================= */

.alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-size: 0.94rem;
    margin-bottom: 20px;
}

.alert svg {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    margin-top: 2px;
}

.alert-error {
    background: var(--danger-bg);
    border-color: #fecdca;
    color: #7a271a;
}

.alert-success {
    background: var(--success-bg);
    border-color: #abefc6;
    color: #05603a;
}

.alert-info {
    background: var(--info-bg);
    border-color: #b2ddff;
    color: #194185;
}

.alert-warning {
    background: var(--warning-bg);
    border-color: #fedf89;
    color: #93370d;
}

.alert ul {
    margin: 4px 0 0;
    padding-inline-start: 18px;
}

.alert-close {
    margin-inline-start: auto;
    background: none;
    border: 0;
    color: inherit;
    cursor: pointer;
    opacity: 0.6;
    padding: 0;
    font-size: 1.1rem;
    line-height: 1;
}

/* =========================================================
   Public header & footer
   ========================================================= */

.public-body {
    display: flex;
    flex-direction: column;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--ink);
}

.brand:hover { color: var(--ink); }

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    box-shadow: 0 8px 18px -8px rgba(0, 61, 125, 0.7);
    flex: 0 0 auto;
}

.brand-mark svg { width: 24px; height: 24px; }

.brand-logo {
    width: auto;
    height: 46px;
    max-width: 210px;
    object-fit: contain;
    flex: 0 0 auto;
    padding: 3px 8px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 18px -12px rgba(19, 26, 43, 0.45);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.brand-text strong {
    font-size: 1.18rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.brand-text small {
    font-size: 0.73rem;
    color: var(--muted);
    font-weight: 500;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.site-nav a {
    padding: 9px 16px;
    border-radius: 10px;
    font-size: 0.94rem;
    font-weight: 600;
    color: var(--ink-soft);
}

.site-nav a:hover,
.site-nav a.active {
    color: var(--primary);
    background: var(--primary-soft);
}

.site-nav .nav-admin {
    margin-inline-start: 8px;
    border: 1.5px solid var(--line-strong);
    color: var(--ink);
}

.site-nav .nav-admin:hover {
    border-color: rgba(0, 61, 125, 0.35);
    background: var(--primary-soft);
}

.site-main {
    flex: 1 0 auto;
}

.site-footer {
    flex-shrink: 0;
    margin-top: 70px;
    background: var(--primary);
    border-top: 3px solid var(--gold);
    color: #c8d7e8;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 32px 0 26px;
    flex-wrap: wrap;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-logo {
    width: auto;
    height: 44px;
    max-width: 190px;
    object-fit: contain;
    padding: 3px 8px;
    border-radius: 4px;
    background: #fff;
    box-shadow: none;
}

.footer-brand-text strong {
    display: block;
    font-family: var(--font-display);
    font-size: 1rem;
    color: #fff;
}

.footer-brand-text span {
    display: block;
    font-size: 0.78rem;
    color: #c8d7e8;
    margin-top: 1px;
}

.site-footer p { font-size: 0.87rem; }

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    font-size: 0.86rem;
    font-weight: 600;
}

.footer-links a { color: #dbe6f3; }
.footer-links a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.footer-bottom .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px 20px;
    flex-wrap: wrap;
    padding: 14px 0;
    font-size: 0.76rem;
    color: #b6c8dd;
}

/* =========================================================
   Hero / landing
   ========================================================= */

.hero {
    position: relative;
    overflow: hidden;
    padding: 68px 0 54px;
    background:
        radial-gradient(900px 420px at 88% -8%, rgba(0, 61, 125, 0.13), transparent 65%),
        radial-gradient(700px 380px at 4% 12%, rgba(255, 0, 0, 0.1), transparent 62%),
        linear-gradient(180deg, #fbfdfc 0%, var(--bg) 100%);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(0, 61, 125, 0.09) 1px, transparent 1px);
    background-size: 26px 26px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.55), transparent 78%);
    pointer-events: none;
}

.hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 56px;
    align-items: center;
}

.hero h1 {
    font-size: clamp(2.15rem, 4.4vw, 3.35rem);
    font-weight: 800;
    line-height: 1.28;
    letter-spacing: -0.015em;
    margin: 20px 0 18px;
}

.hero h1 span {
    color: var(--primary);
    position: relative;
    white-space: nowrap;
}

.hero h1 span::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: 4px;
    height: 10px;
    background: rgba(255, 0, 0, 0.22);
    border-radius: 4px;
    z-index: -1;
}

.hero-lead {
    font-size: 1.08rem;
    color: var(--ink-soft);
    max-width: 560px;
    line-height: 1.85;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 26px;
    margin-top: 34px;
    padding-top: 26px;
    border-top: 1px solid var(--line-strong);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ink-soft);
}

.hero-badge svg {
    width: 19px;
    height: 19px;
    color: var(--primary);
}

.hero-art {
    position: relative;
    min-height: 440px;
}

.hero-art-card {
    position: absolute;
    inset-inline: 8% 4%;
    top: 34px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 26px;
    transform: rotate(-1.2deg);
}

.hero-art-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 20px;
    border-bottom: 1px dashed var(--line-strong);
    margin-bottom: 20px;
}

.hero-art-avatar {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 800;
    font-size: 1.05rem;
}

.hero-art-head strong { display: block; font-size: 1rem; }
.hero-art-head span { font-size: 0.78rem; color: var(--muted); }

.hero-art-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 0;
    font-size: 0.88rem;
    color: var(--ink-soft);
}

.hero-art-row .bar {
    flex: 1;
    height: 8px;
    border-radius: 99px;
    background: #eef3f2;
    overflow: hidden;
}

.hero-art-row .bar span {
    display: block;
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--primary), #4d7cbf);
}

.hero-art-row b { font-size: 0.85rem; color: var(--ink); min-width: 34px; text-align: left; }

.hero-float {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 11px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 12px 16px;
    font-size: 0.85rem;
    font-weight: 700;
    animation: floaty 6s ease-in-out infinite;
}

.hero-float svg { width: 22px; height: 22px; }

.hero-float.one {
    inset-inline-start: -2%;
    bottom: 66px;
    color: var(--success);
}

.hero-float.two {
    inset-inline-end: -3%;
    top: 6px;
    color: var(--gold);
    animation-delay: -3s;
}

@keyframes floaty {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-9px); }
}

/* Sections */

.section {
    padding: 64px 0;
}

.section-head {
    max-width: 640px;
    margin: 0 auto 40px;
    text-align: center;
}

.section-head h2 {
    font-size: clamp(1.7rem, 3vw, 2.25rem);
    margin: 14px 0 10px;
    letter-spacing: -0.01em;
}

.section-head p { color: var(--muted); }

.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    counter-reset: step;
}

.step-card {
    position: relative;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px 22px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.step-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: rgba(0, 61, 125, 0.25);
}

.step-num {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-weight: 800;
    color: var(--primary);
    background: var(--primary-light);
    margin-bottom: 16px;
}

.step-card h3 { font-size: 1.02rem; margin-bottom: 7px; }
.step-card p { color: var(--muted); font-size: 0.9rem; line-height: 1.75; }

.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 56px;
    align-items: center;
}

.split h2 {
    font-size: clamp(1.6rem, 2.8vw, 2.1rem);
    margin: 14px 0 14px;
}

.split p { color: var(--ink-soft); }

.doc-list {
    display: grid;
    gap: 12px;
    margin-top: 24px;
}

.doc-item {
    display: flex;
    align-items: center;
    gap: 13px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 13px 16px;
    font-size: 0.9rem;
    font-weight: 600;
}

.doc-item .tick {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--success-bg);
    color: var(--success);
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

.doc-item .tick svg { width: 15px; height: 15px; }
.doc-item small { margin-inline-start: auto; color: var(--muted); font-weight: 500; font-size: 0.78rem; }

.cta-band {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary) 62%, #17897f);
    border-radius: var(--radius-lg);
    padding: 46px 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    color: #fff;
    box-shadow: var(--shadow-lg);
}

.cta-band::after {
    content: "";
    position: absolute;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    inset-inline-start: -90px;
    bottom: -190px;
}

.cta-band h2 { color: #fff; font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 8px; }
.cta-band p { color: rgba(255, 255, 255, 0.82); max-width: 560px; }

/* =========================================================
   Page header (inner pages)
   ========================================================= */

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 42px 0 46px;
    background:
        radial-gradient(800px 300px at 92% -30%, rgba(0, 61, 125, 0.16), transparent 65%),
        linear-gradient(180deg, #f9fcfb, var(--bg));
    border-bottom: 1px solid var(--line);
}

.page-hero h1 {
    font-size: clamp(1.7rem, 3.4vw, 2.35rem);
    margin: 12px 0 8px;
    letter-spacing: -0.01em;
}

.page-hero p { color: var(--muted); max-width: 640px; }

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--muted);
    margin-bottom: 8px;
}

.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { opacity: 0.5; }

/* =========================================================
   Forms
   ========================================================= */

.form-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 26px;
    align-items: start;
    padding: 34px 0 0;
}

.form-card {
    padding: 30px;
}

.form-progress {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 24px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--line);
}

.progress-track {
    flex: 1;
    height: 9px;
    border-radius: 99px;
    background: #edf3f1;
    overflow: hidden;
}

.progress-track span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--primary), #2fa596);
    transition: width 0.28s ease;
}

.progress-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--muted);
    min-width: 90px;
    text-align: left;
}

.form-section {
    padding: 28px 0;
    border-bottom: 1px solid var(--line);
}

.form-section:last-of-type { border-bottom: 0; padding-bottom: 10px; }

.form-section-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 22px;
}

.section-num {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 800;
    font-size: 0.95rem;
    flex: 0 0 auto;
}

.form-section-head h2 { font-size: 1.12rem; margin-bottom: 3px; }
.form-section-head p { font-size: 0.85rem; color: var(--muted); }

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 20px;
}

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

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

.field > label,
.field-label {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--ink-soft);
    display: flex;
    align-items: center;
    gap: 6px;
}

.field > label .req { color: var(--danger); font-size: 0.95rem; }

.input,
.select,
.textarea {
    width: 100%;
    font-family: inherit;
    font-size: 0.94rem;
    color: var(--ink);
    background: #fbfdfc;
    border: 1.5px solid var(--line-strong);
    border-radius: 11px;
    padding: 11px 14px;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
    min-height: 46px;
}

.textarea { min-height: 120px; resize: vertical; line-height: 1.7; }

.input::placeholder,
.textarea::placeholder { color: #9aacaa; }

.input:hover,
.select:hover,
.textarea:hover { border-color: #bfd1cd; }

.input:focus,
.select:focus,
.textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0, 61, 125, 0.1);
}

.select {
    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='%23667a76' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 14px center;
    padding-inline-end: 40px;
}

.input.is-invalid,
.select.is-invalid,
.textarea.is-invalid {
    border-color: #fda29b;
    background: #fffbfa;
}

.input.is-invalid:focus,
.select.is-invalid:focus,
.textarea.is-invalid:focus {
    border-color: var(--danger);
    box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.1);
}

.hint {
    font-size: 0.77rem;
    color: var(--muted);
    line-height: 1.6;
}

.error-text {
    font-size: 0.79rem;
    color: var(--danger);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.error-text svg { width: 13px; height: 13px; flex: 0 0 auto; }

.input-group { display: flex; gap: 10px; }
.input-group .input { flex: 1; }

/* Number with suffix */
.measure {
    position: relative;
}

.measure .input {
    padding-inline-end: 62px;
    font-variant-numeric: tabular-nums;
}

.measure .suffix {
    position: absolute;
    inset-inline-end: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--muted);
    pointer-events: none;
}

/* Choice cards (radio) */
.choice-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.choice {
    position: relative;
    flex: 1 1 120px;
    cursor: pointer;
}

.choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.choice-body {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1.5px solid var(--line-strong);
    border-radius: 11px;
    padding: 12px 14px;
    background: #fbfdfc;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ink-soft);
    transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.choice-body svg { width: 18px; height: 18px; color: var(--muted); }

.choice input:checked + .choice-body {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: var(--primary-dark);
    box-shadow: 0 0 0 3px rgba(0, 61, 125, 0.1);
}

.choice input:checked + .choice-body svg { color: var(--primary); }

.choice input:focus-visible + .choice-body {
    outline: 3px solid rgba(0, 61, 125, 0.28);
    outline-offset: 2px;
}

/* File upload */
.file-field { min-width: 0; }

.file-drop {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1.5px dashed #c6d6d2;
    background: #fbfdfc;
    border-radius: 12px;
    padding: 14px 16px;
    cursor: pointer;
    transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
    min-height: 78px;
    overflow: hidden;
}

.file-drop:hover {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.file-drop.has-file {
    border-style: solid;
    border-color: rgba(0, 61, 125, 0.45);
    background: var(--primary-soft);
}

.file-drop.has-error {
    border-color: #fda29b;
    background: #fffbfa;
}

.file-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--primary);
    flex: 0 0 auto;
}

.file-icon svg { width: 21px; height: 21px; }

.file-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.45;
}

.file-copy strong { font-size: 0.88rem; color: var(--ink); }
.file-copy .file-hint { font-size: 0.74rem; color: var(--muted); }

.file-name {
    margin-inline-start: auto;
    max-width: 44%;
    font-size: 0.73rem;
    color: var(--muted);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 3px 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 0 0 auto;
}

.file-drop.has-file .file-name {
    color: var(--primary-dark);
    border-color: rgba(0, 61, 125, 0.25);
    background: #fff;
}

.photo-field {
    display: flex;
    align-items: center;
    gap: 18px;
}

.photo-preview {
    width: 86px;
    height: 86px;
    border-radius: 20px;
    background: var(--primary-light) center/cover no-repeat;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px var(--line), var(--shadow-sm);
    display: grid;
    place-items: center;
    color: var(--primary);
    font-weight: 800;
    font-size: 1.2rem;
    flex: 0 0 auto;
    overflow: hidden;
}

.photo-field .file-field { flex: 1; }

/* Confirm */
.confirm-line {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    background: var(--primary-soft);
    border: 1px solid rgba(0, 61, 125, 0.16);
    border-radius: 12px;
    padding: 15px 17px;
    font-size: 0.86rem;
    color: var(--ink-soft);
}

.confirm-line input {
    width: 18px;
    height: 18px;
    margin-top: 3px;
    accent-color: var(--primary);
    flex: 0 0 auto;
}

/* Form actions */
.form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding-top: 8px;
    flex-wrap: wrap;
}

.form-actions .note {
    font-size: 0.79rem;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 7px;
    max-width: 360px;
}

.form-actions .note svg { width: 16px; height: 16px; flex: 0 0 auto; color: var(--primary); }

/* Aside */
.form-aside {
    position: sticky;
    top: calc(var(--header-height) + 22px);
    display: grid;
    gap: 18px;
}

.aside-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow-sm);
}

.aside-card h3 {
    font-size: 0.98rem;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 9px;
}

.aside-card h3 svg { width: 19px; height: 19px; color: var(--primary); }

.aside-card ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 11px;
}

.aside-card li {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 0.84rem;
    color: var(--ink-soft);
    line-height: 1.6;
}

.aside-card li svg { width: 16px; height: 16px; color: var(--success); flex: 0 0 auto; margin-top: 2px; }

.aside-card.aside-help {
    background: linear-gradient(160deg, #002a56, #003d7d 70%, #2f5fa8);
    color: #d9efec;
    border: 0;
}

.aside-card.aside-help h3 { color: #fff; }
.aside-card.aside-help h3 svg { color: #a8bede; }
.aside-card.aside-help p { font-size: 0.84rem; color: #d3deee; }
.aside-card.aside-help a { color: #fff; font-weight: 700; font-size: 0.86rem; }

/* =========================================================
   Success page
   ========================================================= */

.success-wrap {
    max-width: 620px;
    margin: 56px auto;
    text-align: center;
}

.success-icon {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    margin: 0 auto 24px;
    display: grid;
    place-items: center;
    background: var(--success-bg);
    color: var(--success);
    box-shadow: 0 0 0 12px rgba(6, 118, 71, 0.07);
    animation: pop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.3) both;
}

.success-icon svg { width: 44px; height: 44px; }

@keyframes pop {
    from { transform: scale(0.6); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.success-wrap h1 { font-size: clamp(1.6rem, 3.4vw, 2.1rem); margin-bottom: 10px; }
.success-wrap > p { color: var(--muted); }

.reference-box {
    margin: 28px 0;
    background: #fff;
    border: 1.5px dashed rgba(0, 61, 125, 0.4);
    border-radius: var(--radius);
    padding: 20px;
}

.reference-box span {
    display: block;
    font-size: 0.78rem;
    color: var(--muted);
    margin-bottom: 6px;
}

.reference-box strong {
    font-size: 1.65rem;
    letter-spacing: 0.08em;
    color: var(--primary-dark);
    font-variant-numeric: tabular-nums;
}

.success-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.next-steps {
    text-align: right;
    margin-top: 34px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
}

.next-steps h2 { font-size: 1rem; margin-bottom: 14px; }
.next-steps ol { margin: 0; padding-inline-start: 22px; color: var(--ink-soft); font-size: 0.9rem; display: grid; gap: 8px; }

/* =========================================================
   Admin shell
   ========================================================= */

.admin-body {
    background: #f3f6f5;
}

.admin-shell {
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    inset-inline-end: 0;
    width: var(--sidebar-width);
    background: #001a36;
    color: #c6ddda;
    display: flex;
    flex-direction: column;
    z-index: 80;
    transition: transform 0.26s ease;
    border-inline-start: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 22px 22px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.sidebar-brand .brand-mark {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: none;
    width: 42px;
    height: 42px;
}

.sidebar-brand .brand-logo {
    width: auto;
    height: 42px;
    max-width: 168px;
    box-shadow: none;
}

.sidebar-brand .brand-text strong { color: #fff; font-size: 1.1rem; }
.sidebar-brand .brand-text small { color: #93a9c9; }

.sidebar-label {
    padding: 22px 24px 8px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #7488a8;
}

.sidebar-nav {
    display: grid;
    gap: 4px;
    padding: 0 14px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 11px;
    color: #d3deee;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.16s ease, color 0.16s ease;
}

.sidebar-link svg { width: 20px; height: 20px; color: #8298b8; transition: color 0.16s ease; }

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.sidebar-link:hover svg { color: #fff; }

.sidebar-link.active {
    background: linear-gradient(100deg, rgba(47, 165, 150, 0.25), rgba(47, 165, 150, 0.1));
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(95, 200, 187, 0.22);
}

.sidebar-link.active svg { color: #7fa6d9; }

.sidebar-link .count {
    margin-inline-start: auto;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 99px;
    padding: 1px 8px;
}

.sidebar-foot {
    margin-top: auto;
    padding: 16px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.04);
    margin-bottom: 10px;
}

.sidebar-user .avatar-sm {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: rgba(95, 200, 187, 0.16);
    color: #9db9e0;
    font-weight: 800;
    font-size: 0.9rem;
    flex: 0 0 auto;
}

.sidebar-user strong { display: block; color: #fff; font-size: 0.84rem; line-height: 1.3; }
.sidebar-user span { display: block; color: #8298b8; font-size: 0.7rem; direction: ltr; text-align: right; }

.logout-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: 0;
    color: #9fc0bc;
    font-family: inherit;
    font-size: 0.84rem;
    font-weight: 600;
    padding: 9px 12px;
    border-radius: 9px;
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease;
}

.logout-btn:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.logout-btn svg { width: 18px; height: 18px; }

.admin-main {
    margin-inline-end: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    height: 78px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 30px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}

.topbar-title h1 { font-size: 1.22rem; line-height: 1.3; }
.topbar-title span { font-size: 0.76rem; color: var(--muted); }

.topbar-actions {
    margin-inline-start: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    display: none;
    place-items: center;
    border-radius: 10px;
    border: 1px solid var(--line-strong);
    background: #fff;
    color: var(--ink);
    cursor: pointer;
}

.icon-btn svg { width: 20px; height: 20px; }

.admin-content {
    padding: 28px 30px 44px;
    flex: 1;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(5, 25, 23, 0.5);
    z-index: 70;
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* =========================================================
   Admin: stats & tables
   ========================================================= */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    position: relative;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px 22px;
    box-shadow: var(--shadow-sm);
}

.stat-card::after {
    content: "";
    position: absolute;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    inset-inline-start: -34px;
    bottom: -54px;
    background: currentColor;
    opacity: 0.05;
}

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

.stat-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: var(--primary-light);
    color: var(--primary);
}

.stat-icon svg { width: 19px; height: 19px; }

.stat-card.gold .stat-icon { background: var(--gold-light); color: var(--gold); }
.stat-card.green .stat-icon { background: var(--success-bg); color: var(--success); }
.stat-card.red .stat-icon { background: var(--danger-bg); color: var(--danger); }

.stat-label { font-size: 0.8rem; color: var(--muted); font-weight: 600; }

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.stat-foot {
    font-size: 0.74rem;
    color: var(--muted);
    margin-top: 6px;
}

.stat-foot a { font-weight: 700; }

.panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
}

.panel-head h2 { font-size: 1.02rem; }
.panel-head p { font-size: 0.78rem; color: var(--muted); }

.panel-body { padding: 22px; }

.toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 18px 22px;
    border-bottom: 1px solid var(--line);
    background: #fbfdfc;
}

.toolbar form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    flex: 1;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 220px;
    max-width: 430px;
}

.search-box svg {
    position: absolute;
    inset-inline-start: 13px;
    top: 50%;
    transform: translateY(-50%);
    width: 17px;
    height: 17px;
    color: var(--muted);
    pointer-events: none;
}

.search-box .input {
    padding-inline-start: 40px;
    background: #fff;
    min-height: 42px;
}

.toolbar .select {
    width: auto;
    min-width: 150px;
    min-height: 42px;
    background-color: #fff;
}

.toolbar-spacer { flex: 1; }

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

table.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.87rem;
    min-width: 860px;
}

.table thead th {
    text-align: right;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: var(--muted);
    text-transform: uppercase;
    background: #f8fbfa;
    border-bottom: 1px solid var(--line);
    padding: 12px 18px;
    white-space: nowrap;
}

.table tbody td {
    padding: 13px 18px;
    border-bottom: 1px solid #eef4f2;
    vertical-align: middle;
    color: var(--ink-soft);
}

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

.table tbody tr {
    transition: background 0.14s ease;
}

.table tbody tr:hover { background: #fbfdfc; }

.table .cell-name { display: flex; align-items: center; gap: 11px; min-width: 190px; }

.mini-avatar {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: var(--primary-light) center/cover no-repeat;
    color: var(--primary-dark);
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 0.82rem;
    flex: 0 0 auto;
    overflow: hidden;
    border: 1px solid rgba(0, 61, 125, 0.1);
}

.cell-name strong { display: block; font-size: 0.89rem; color: var(--ink); font-weight: 700; line-height: 1.4; }
.cell-name span { display: block; font-size: 0.73rem; color: var(--muted); }

.mono {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
    font-size: 0.83rem;
}

.actions-cell { display: flex; gap: 6px; justify-content: flex-start; }

.action-link {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 9px;
    color: var(--muted);
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    transition: all 0.15s ease;
}

.action-link svg { width: 17px; height: 17px; }

.action-link:hover {
    color: var(--primary);
    background: var(--primary-soft);
    border-color: rgba(0, 61, 125, 0.16);
}

.action-link.danger:hover {
    color: var(--danger);
    background: var(--danger-bg);
    border-color: #fecdca;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.5;
    white-space: nowrap;
}

.badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.badge.status-pending { background: var(--warning-bg); color: var(--warning); border: 1px solid #fedf89; }
.badge.status-reviewing { background: var(--info-bg); color: var(--info); border: 1px solid #b2ddff; }
.badge.status-accepted { background: var(--success-bg); color: var(--success); border: 1px solid #abefc6; }
.badge.status-rejected { background: var(--danger-bg); color: var(--danger); border: 1px solid #fecdca; }

.badge-soft {
    background: #f1f5f4;
    color: var(--ink-soft);
    border: 1px solid var(--line);
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
}

.empty-state {
    padding: 56px 24px;
    text-align: center;
}

.empty-icon {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    margin: 0 auto 18px;
    background: var(--primary-light);
    color: var(--primary);
}

.empty-icon svg { width: 32px; height: 32px; }
.empty-state h3 { font-size: 1.05rem; margin-bottom: 6px; }
.empty-state p { color: var(--muted); font-size: 0.88rem; margin-bottom: 18px; }

/* Pagination */
.pager-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 22px;
    border-top: 1px solid var(--line);
    flex-wrap: wrap;
}

.pager-info { font-size: 0.8rem; color: var(--muted); }

.pagination {
    list-style: none;
    display: flex;
    gap: 5px;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.pagination li a {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    border: 1px solid var(--line-strong);
    background: #fff;
    color: var(--ink-soft);
    font-size: 0.84rem;
    font-weight: 600;
}

.pagination li a:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }

.pagination li.active a {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.pagination li.disabled a {
    opacity: 0.45;
    pointer-events: none;
}

/* =========================================================
   Admin: detail view
   ========================================================= */

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 22px;
    align-items: start;
}

.profile-card {
    position: relative;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 22px;
}

.profile-cover {
    height: 82px;
    background:
        radial-gradient(300px 120px at 90% 0%, rgba(255, 0, 0, 0.25), transparent 70%),
        linear-gradient(120deg, #002a56, #003d7d 60%, #2f5fa8);
}

.profile-body {
    padding: 0 26px 24px;
    display: flex;
    align-items: flex-end;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: -42px;
}

.profile-avatar {
    width: 104px;
    height: 104px;
    border-radius: 24px;
    border: 4px solid #fff;
    background: var(--primary-light) center/cover no-repeat;
    box-shadow: var(--shadow);
    display: grid;
    place-items: center;
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--primary-dark);
    flex: 0 0 auto;
    overflow: hidden;
}

.profile-id { flex: 1; min-width: 220px; padding-top: 44px; }
.profile-id h2 { font-size: 1.4rem; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.profile-id .profile-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 6px; font-size: 0.82rem; color: var(--muted); }
.profile-id .profile-meta span { display: inline-flex; align-items: center; gap: 6px; }
.profile-id .profile-meta svg { width: 15px; height: 15px; }

.profile-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 44px; }

.info-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 22px;
    overflow: hidden;
}

.info-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 22px;
    border-bottom: 1px solid var(--line);
    background: #fbfdfc;
}

.info-card-head svg { width: 18px; height: 18px; color: var(--primary); }
.info-card-head h3 { font-size: 0.95rem; }

.info-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.info-list li {
    padding: 14px 22px;
    border-bottom: 1px solid #f1f6f4;
    min-width: 0;
}

.info-list li:nth-child(odd) { border-inline-end: 1px solid #f1f6f4; }

.info-list dt,
.info-list .label {
    font-size: 0.72rem;
    color: var(--muted);
    font-weight: 600;
    margin-bottom: 3px;
}

.info-list dd,
.info-list .value {
    margin: 0;
    font-size: 0.9rem;
    color: var(--ink);
    font-weight: 600;
    overflow-wrap: anywhere;
}

.info-list .span-2 { grid-column: span 2; border-inline-end: 0 !important; }
.info-list li:last-child,
.info-list li:nth-last-child(2):nth-child(odd) { border-bottom: 0; }

.grades-list { padding: 18px 22px 22px; display: grid; gap: 12px; }

.grade-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.grade-row .grade-label {
    width: 108px;
    flex: 0 0 auto;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ink-soft);
}

.grade-bar {
    flex: 1;
    height: 9px;
    background: #eef4f2;
    border-radius: 99px;
    overflow: hidden;
}

.grade-bar span {
    display: block;
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--primary), #39a99b);
    transition: width 0.4s ease;
}

.grade-row .grade-value {
    width: 52px;
    text-align: left;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}

.grade-total {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 4px 22px 22px;
    padding: 16px 18px;
    border-radius: 13px;
    background: linear-gradient(120deg, var(--primary-soft), #eef9f6);
    border: 1px solid rgba(0, 61, 125, 0.14);
}

.grade-total .big {
    font-size: 2.15rem;
    font-weight: 800;
    line-height: 1;
    color: var(--primary-dark);
    font-variant-numeric: tabular-nums;
}

.grade-total .big small { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.grade-total p { font-size: 0.78rem; color: var(--muted); }

.file-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 20px 22px;
}

.file-tile {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
    background: #fbfdfc;
    transition: border-color 0.16s ease, background 0.16s ease;
}

.file-tile:hover { border-color: rgba(0, 61, 125, 0.3); background: var(--primary-soft); }

.file-tile .file-tile-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--primary);
    flex: 0 0 auto;
}

.file-tile .file-tile-icon svg { width: 19px; height: 19px; }
.file-tile .file-tile-copy { min-width: 0; flex: 1; }
.file-tile strong { display: block; font-size: 0.81rem; color: var(--ink); line-height: 1.4; }
.file-tile span { display: block; font-size: 0.7rem; color: var(--muted); }
.file-tile .file-dl { color: var(--muted); width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; }
.file-tile .file-dl:hover { background: #fff; color: var(--primary); }
.file-tile .file-dl svg { width: 16px; height: 16px; }

.file-tile .file-preview {
    flex: 0 0 100%;
    width: 100%;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #f1f5f9;
}

.file-preview-image {
    display: block;
    width: 100%;
    max-height: 520px;
    object-fit: contain;
}

.file-preview-pdf {
    display: block;
    width: 100%;
    height: 520px;
    border: 0;
    background: #fff;
}

.file-preview-toolbar {
    display: flex;
    justify-content: flex-start;
    padding: 8px;
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.pdf-viewer-dialog {
    width: min(96vw, 1440px);
    height: 94vh;
    max-width: none;
    max-height: none;
    padding: 0;
    border: 0;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.pdf-viewer-dialog::backdrop {
    background: rgba(15, 23, 42, .78);
}

.pdf-viewer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
}

.pdf-viewer-frame {
    display: block;
    width: 100%;
    height: calc(94vh - 58px);
    border: 0;
}

.file-tile.missing { opacity: 0.6; }
.file-tile.missing .file-tile-icon { color: var(--muted); }

.side-panel {
    display: grid;
    gap: 18px;
    position: sticky;
    top: 100px;
}

.status-form .field { margin-bottom: 14px; }

.meta-stack {
    display: grid;
    gap: 10px;
    padding: 18px 22px;
    font-size: 0.8rem;
    color: var(--muted);
}

.meta-stack div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.meta-stack strong { color: var(--ink-soft); font-weight: 700; }

/* =========================================================
   Auth / login
   ========================================================= */

.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    background: #fff;
}

.auth-visual {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(700px 400px at 20% 0%, rgba(255, 0, 0, 0.22), transparent 65%),
        linear-gradient(150deg, #001830, #002a56 55%, #003d7d);
    color: #fff;
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.auth-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px);
    background-size: 24px 24px;
    mask-image: linear-gradient(140deg, rgba(0,0,0,0.5), transparent 75%);
}

.auth-visual .brand { position: relative; color: #fff; }
.auth-visual .brand-text small { color: #b3c3dd; }
.auth-visual .brand-mark { background: rgba(255, 255, 255, 0.12); box-shadow: none; }

.auth-quote { position: relative; max-width: 430px; }
.auth-quote h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.4; margin-bottom: 14px; }
.auth-quote p { color: #d3deee; font-size: 0.95rem; }
.auth-quote .eyebrow { background: rgba(255, 255, 255, 0.12); color: #e6f4f1; border-color: rgba(255, 255, 255, 0.15); margin-bottom: 18px; }
.auth-quote .eyebrow-dot { background: #9db9e0; box-shadow: 0 0 0 4px rgba(255, 0, 0, 0.15); }

.auth-visual-foot { position: relative; color: #96a9c7; font-size: 0.8rem; }

.auth-form-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background: #fbfdfc;
}

.auth-form {
    width: min(420px, 100%);
}

.auth-form .brand { display: none; }
.auth-form h1 { font-size: 1.65rem; margin-bottom: 8px; }
.auth-form > p { color: var(--muted); font-size: 0.9rem; margin-bottom: 28px; }
.auth-form .field { margin-bottom: 16px; }
.auth-form .btn { margin-top: 8px; }

.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 26px;
    font-size: 0.82rem;
    color: var(--muted);
}

.auth-back svg { width: 15px; height: 15px; }

/* =========================================================
   Utilities & responsive
   ========================================================= */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

[hidden] {
    display: none !important;
}

.flash-public {
    padding-top: 20px;
    margin-bottom: -4px;
}

.grade-preview {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    min-height: 46px;
    border: 1.5px dashed rgba(0, 61, 125, 0.35);
    border-radius: 11px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    padding: 8px 14px;
}

.grade-preview-value {
    font-size: 1.35rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.grade-preview-max {
    font-size: 0.75rem;
    color: var(--muted);
    font-weight: 600;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}


.divider { height: 1px; background: var(--line); margin: 22px 0; }

@media (max-width: 1100px) {
    .form-layout { grid-template-columns: minmax(0, 1fr) 280px; }
    .detail-grid { grid-template-columns: minmax(0, 1fr) 300px; }
    .hero-grid { gap: 36px; }
    .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-art { display: none; }
    .hero { padding: 46px 0 40px; }
    .steps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .split { grid-template-columns: 1fr; gap: 32px; }
    .form-layout { grid-template-columns: 1fr; }
    .form-aside { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .detail-grid { grid-template-columns: 1fr; }
    .side-panel { position: static; }
    .auth-page { grid-template-columns: 1fr; }
    .auth-visual { display: none; }
    .auth-form .brand { display: inline-flex; margin-bottom: 28px; }
}

@media (max-width: 860px) {
    .sidebar { transform: translateX(105%); box-shadow: -20px 0 60px rgba(0, 0, 0, 0.25); }
    .sidebar.is-open { transform: translateX(0); }
    .admin-main { margin-inline-end: 0; }
    .icon-btn { display: grid; }
    .sidebar-overlay.is-active { display: block; opacity: 1; }
    .topbar { padding: 0 18px; height: 70px; }
    .admin-content { padding: 20px 18px 36px; }
}

@media (max-width: 720px) {
    .container, .container-narrow { width: calc(100% - 28px); }
    .header-inner { height: 66px; }
    .site-nav a { padding: 8px 10px; font-size: 0.86rem; }
    .site-nav a:not(.nav-admin):not(.active) { display: none; }
    .brand-text small { display: none; }
    .section { padding: 44px 0; }
    .form-card { padding: 20px; }
    .form-grid { grid-template-columns: 1fr; }
    .form-grid .span-2 { grid-column: auto; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .form-aside { grid-template-columns: 1fr; }
    .cta-band { flex-direction: column; align-items: flex-start; padding: 32px 26px; }
    .cta-band .btn { width: 100%; }
    .hero-actions .btn { flex: 1 1 auto; }
    .info-list { grid-template-columns: 1fr; }
    .info-list li:nth-child(odd) { border-inline-end: 0; }
    .info-list .span-2 { grid-column: auto; }
    .file-grid { grid-template-columns: 1fr; }
    .profile-body { padding: 0 18px 20px; }
    .profile-id { padding-top: 8px; }
    .profile-actions { padding-top: 8px; width: 100%; }
    .topbar-title h1 { font-size: 1.05rem; }
    .topbar-actions .btn span { display: none; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .stat-card { padding: 16px; }
    .stat-value { font-size: 1.6rem; }
    .pager-wrap { justify-content: center; }
    .toolbar { padding: 14px 16px; }
    .toolbar form { width: 100%; }
    .search-box { max-width: none; }
    .toolbar .select { flex: 1; }
    .table thead th, .table tbody td { padding: 11px 14px; }
    .footer-inner { flex-direction: column; align-items: flex-start; }
    .profile-id h2 { font-size: 1.2rem; }
}

@media (max-width: 480px) {
    .hero-badges { gap: 10px 16px; }
    .hero-badge { font-size: 0.8rem; }
    .steps-grid { grid-template-columns: 1fr; }
    .choice-group { flex-direction: column; }
    .choice { flex: 1 1 auto; }
    .stats-grid { grid-template-columns: 1fr; }
    .form-actions { flex-direction: column; align-items: stretch; }
    .form-actions .btn { width: 100%; }
    .file-name { display: none; }
    .auth-form-wrap { padding: 30px 18px; }
}

/* =========================================================
   Print
   ========================================================= */

@media print {
    body { background: #fff; }
    .sidebar, .topbar, .sidebar-overlay, .site-header, .site-footer, .no-print, .form-actions { display: none !important; }
    .admin-main { margin: 0; }
    .admin-content { padding: 0; }
    .detail-grid { grid-template-columns: 1fr; }
    .profile-cover { height: 40px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .card, .panel, .info-card, .profile-card { box-shadow: none; border-color: #d5d5d5; }
    .side-panel { display: none; }
    .info-list li { break-inside: avoid; }
    a[href]::after { content: ""; }
}

/* ========================================================= */
/* Added for new flows (students/teachers/settings/portal) */
/* ========================================================= */
.sidebar-status { display:flex; align-items:center; gap:8px; margin:10px 0 14px; padding:8px 10px; border-radius:10px; font-size:.75rem; font-weight:700; }
.sidebar-status.is-open { background:rgba(95,200,187,.12); color:#5fc8bb; }
.sidebar-status.is-closed { background:rgba(255,255,255,.06); color:#b9d4d0; }
.sidebar-status-dot { width:6px; height:6px; border-radius:50%; background:currentColor; box-shadow:0 0 0 4px rgba(255,255,255,.06); }

.portal-body { background:var(--bg); }
.portal-header { position:sticky; }
.portal-user { display:flex; align-items:center; gap:10px; margin-inline-start:auto; }
.portal-user-copy { display:flex; flex-direction:column; line-height:1.2; }
.portal-user-copy strong { font-size:.86rem; }
.portal-user-copy span { font-size:.72rem; color:var(--muted); }
.portal-main { padding:26px 0 40px; }
.portal-footer { border-top:3px solid var(--gold); background:var(--primary); }
.portal-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:18px; }
.portal-heading h1 { font-size:clamp(1.4rem,3vw,2.1rem); margin:10px 0 8px; }
.portal-heading p { color:var(--muted); }

.detail-grid { display:grid; grid-template-columns:minmax(0,1fr) 340px; gap:20px; align-items:start; }
.side-panel { display:grid; gap:16px; }
.teacher-student-navigation { display:flex; justify-content:space-between; gap:10px; margin:0 0 16px; }
.teacher-student-navigation [aria-disabled="true"] { opacity:.45; pointer-events:none; }
.meta-stack { display:grid; }
.meta-stack > div { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 22px; border-bottom:1px solid #eef4f2; font-size:.86rem; }
.meta-stack > div:last-child { border-bottom:0; }
.meta-stack span { color:var(--muted); }
.meta-stack strong { font-weight:700; }

.file-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; padding:18px 22px; }
.file-tile { display:flex; align-items:center; gap:12px; border:1px solid var(--line); border-radius:12px; padding:12px 14px; }
.file-tile.missing { opacity:.7; }
.file-tile-icon { width:38px; height:38px; border-radius:10px; display:grid; place-items:center; background:var(--primary-light); color:var(--primary); }
.file-tile-icon svg { width:20px; height:20px; }
.file-tile-copy { display:flex; flex-direction:column; gap:2px; min-width:0; }
.file-tile-copy strong { font-size:.88rem; }
.file-tile-copy a { color:var(--ink); }
.file-tile-copy span { font-size:.74rem; color:var(--muted); }
.file-dl { margin-inline-start:auto; color:var(--muted); }

.badge.status-written { background:var(--info-bg); color:var(--info); border:1px solid #b2ddff; }
.badge.status-oral { background:var(--gold-light); color:var(--gold); border:1px solid #f5c6d0; }

.status-hero { display:flex; align-items:flex-start; gap:16px; margin:18px 0; padding:18px 22px; border-radius:var(--radius); border:1px solid var(--line); background:#fff; box-shadow:var(--shadow-sm); }
.status-hero-icon { width:46px; height:46px; border-radius:12px; display:grid; place-items:center; }
.status-hero-label { font-size:.78rem; font-weight:700; color:var(--muted); }
.status-hero h2 { margin:4px 0 6px; }
.status-hero p { color:var(--ink-soft); }
.status-hero-date { font-size:.78rem; color:var(--muted); }
.status-tone-pending .status-hero-icon { background:var(--warning-bg); color:var(--warning); }
.status-tone-reviewing .status-hero-icon { background:var(--info-bg); color:var(--info); }
.status-tone-written .status-hero-icon { background:var(--info-bg); color:var(--info); }
.status-tone-oral .status-hero-icon { background:var(--gold-light); color:var(--gold); }
.status-tone-accepted .status-hero-icon { background:var(--success-bg); color:var(--success); }
.status-tone-rejected .status-hero-icon { background:var(--danger-bg); color:var(--danger); }

.stage-list { display:grid; gap:10px; }
.stage-list li { display:flex; align-items:center; gap:10px; color:var(--muted); }
.stage-list .stage-dot { width:9px; height:9px; border-radius:50%; background:var(--line-strong); }
.stage-list li.is-done { color:var(--ink-soft); }
.stage-list li.is-done .stage-dot { background:var(--primary); }
.stage-list li.is-current { color:var(--ink); font-weight:700; }
.stage-list li.is-current .stage-dot { background:var(--gold); box-shadow:0 0 0 4px rgba(210,31,60,.1); }

.settings-hero { display:flex; justify-content:space-between; gap:18px; padding:18px 22px; border-radius:var(--radius); border:1px solid var(--line); background:linear-gradient(110deg,rgba(29,78,216,.08),transparent); margin-bottom:16px; }
.settings-hero.is-closed { background:linear-gradient(110deg,rgba(210,31,60,.08),transparent); }
.settings-hero h2 { margin:8px 0 6px; }
.settings-hero p { color:var(--ink-soft); }
.settings-close-date { font-size:.86rem; color:var(--muted); }
.settings-layout { display:grid; gap:16px; }
.settings-actions { display:flex; gap:10px; }

.weight-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.weight-total { display:flex; align-items:center; justify-content:space-between; margin-top:14px; padding:12px 16px; border-radius:12px; border:1px solid var(--line); background:#fbfdff; }
.weight-total.is-valid { border-color:#abefc6; background:var(--success-bg); }
.weight-total.is-invalid { border-color:#fecdca; background:var(--danger-bg); }
.final-score-preview { display:flex; align-items:center; justify-content:space-between; padding:12px 14px; border-radius:12px; border:1px solid var(--line); background:var(--primary-soft); margin:10px 0 14px; font-weight:700; }

.form-actions { display:flex; gap:10px; margin-top:18px; }
.choice-group { display:flex; flex-wrap:wrap; gap:8px; }
.choice { display:block; flex:1 1 150px; padding:0; border:0; border-radius:0; }
.choice input { margin:0; }
.choice-body { font-weight:600; }

.status-form .field { margin-bottom:12px; }
.measure { display:flex; align-items:center; gap:10px; }
.measure .input { flex:1; }
.suffix { color:var(--muted); font-weight:700; }

.closed-card { max-width:760px; margin:26px auto; text-align:center; background:#fff; border:1px solid var(--line); border-radius:var(--radius-lg); box-shadow:var(--shadow); padding:40px 28px; }
.closed-icon { width:78px; height:78px; border-radius:50%; margin:0 auto 16px; display:grid; place-items:center; background:var(--gold-light); color:var(--gold); }
.closed-icon svg { width:36px; height:36px; }
.closed-card h2 { margin:0 0 10px; }
.closed-card p { color:var(--ink-soft); max-width:560px; margin:0 auto; }
.closed-actions { display:flex; flex-wrap:wrap; justify-content:center; gap:10px; margin-top:18px; }

@media (max-width:1100px) {
  .detail-grid { grid-template-columns:1fr; }
  .file-grid { grid-template-columns:1fr; }
  .weight-grid { grid-template-columns:1fr; }
}
@media (max-width:720px) {
  .portal-heading { flex-direction:column; align-items:flex-start; }
  .form-grid { grid-template-columns:1fr; }
  .form-grid .span-2 { grid-column:1 / -1; }
}

/* =========================================================
   Animated landing page
   ========================================================= */
.welcome {
    position: relative;
    isolation: isolate;
    display: grid;
    min-height: 100vh;
    min-height: 100svh;
    align-items: center;
    overflow: hidden;
    padding: 64px 0;
    color: #fff;
    background:
        radial-gradient(ellipse at 18% 82%, rgba(18, 123, 191, .3), transparent 35%),
        radial-gradient(ellipse at 82% 14%, rgba(229, 49, 65, .19), transparent 31%),
        linear-gradient(130deg, #06172e 0%, #082b50 52%, #073967 100%);
}

.welcome::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
    background-size: 54px 54px;
    content: "";
    mask-image: linear-gradient(90deg, transparent, #000 32%, #000 80%, transparent);
}

.welcome::after {
    position: absolute;
    z-index: -1;
    top: -300px;
    inset-inline-start: -220px;
    width: 620px;
    height: 620px;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 50%;
    box-shadow: 0 0 0 48px rgba(255, 255, 255, .025), 0 0 0 96px rgba(255, 255, 255, .02);
    content: "";
    animation: welcome-orbit 36s linear infinite;
}

.welcome-inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(370px, .95fr);
    align-items: center;
    gap: clamp(36px, 7vw, 100px);
    max-width: 1280px;
}

.welcome-content {
    position: relative;
    z-index: 2;
    max-width: 630px;
    animation: welcome-enter .8s cubic-bezier(.2, .75, .25, 1) both;
}

.welcome-logo {
    width: auto;
    height: 62px;
    max-width: min(100%, 420px);
    margin-bottom: 36px;
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .13);
    object-fit: contain;
}

.welcome-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 999px;
    color: #d7e8f7;
    background: rgba(255, 255, 255, .07);
    font-size: .85rem;
    font-weight: 600;
    backdrop-filter: blur(12px);
}

.welcome-status-dot,
.welcome-float-live {
    position: relative;
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #6ee7b7;
    box-shadow: 0 0 14px rgba(110, 231, 183, .8);
}

.welcome-status-dot::after {
    position: absolute;
    inset: -5px;
    border: 1px solid rgba(110, 231, 183, .6);
    border-radius: 50%;
    content: "";
    animation: welcome-pulse 2s ease-out infinite;
}

.welcome-title {
    margin: 0;
    color: #fff;
    font-size: clamp(2.5rem, 5vw, 4.65rem);
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -.045em;
}

.welcome-title span {
    color: #ffd27b;
    background: linear-gradient(100deg, #ffe9ae 5%, #ffbd73 48%, #ff777c 100%);
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.welcome-description {
    max-width: 570px;
    margin-top: 20px;
    color: #c3d6e9;
    font-size: clamp(.98rem, 1.35vw, 1.12rem);
    line-height: 2;
}

.welcome-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.welcome-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 58px;
    padding: 14px 20px;
    border: 1px solid transparent;
    border-radius: 14px;
    color: #fff;
    font-family: inherit;
    font-size: .98rem;
    font-weight: 700;
    line-height: 1.3;
    transition: transform .22s ease, box-shadow .22s ease, background .22s ease, border-color .22s ease;
}

.welcome-btn svg {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
}

.welcome-btn-primary {
    position: relative;
    overflow: hidden;
    min-width: 190px;
    background: linear-gradient(115deg, #f04850, #d92e47);
    box-shadow: 0 14px 32px rgba(218, 46, 71, .28);
}

.welcome-btn-primary::after {
    position: absolute;
    top: -80%;
    left: -45%;
    width: 35%;
    height: 260%;
    background: rgba(255, 255, 255, .22);
    content: "";
    transform: rotate(25deg);
    transition: left .5s ease;
}

.welcome-btn-primary:hover {
    color: #fff;
    box-shadow: 0 18px 38px rgba(218, 46, 71, .4);
    transform: translateY(-3px);
}

.welcome-btn-primary:hover::after { left: 120%; }
.welcome-btn-arrow { font-size: 1.25rem; transition: transform .2s ease; }
.welcome-btn-primary:hover .welcome-btn-arrow { transform: translateX(-4px); }

.welcome-btn-secondary {
    border-color: rgba(255, 255, 255, .24);
    background: rgba(255, 255, 255, .075);
    backdrop-filter: blur(10px);
}

.welcome-btn-secondary:hover {
    border-color: rgba(255, 255, 255, .48);
    color: #fff;
    background: rgba(255, 255, 255, .14);
    transform: translateY(-3px);
}

.welcome-how-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 18px;
    color: #c3d6e9;
    font-size: .9rem;
    font-weight: 600;
    transition: color .18s ease, gap .18s ease;
}

.welcome-how-link svg { width: 15px; height: 15px; }
.welcome-how-link:hover { gap: 11px; color: #fff; }

.welcome-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    margin-top: 34px;
    color: #b6cbe0;
    font-size: .82rem;
}

.welcome-highlights span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.welcome-highlights svg { width: 16px; height: 16px; color: #75e0bd; }

.welcome-visual {
    position: relative;
    display: grid;
    min-height: 570px;
    place-items: center;
    perspective: 1000px;
    animation: welcome-enter .9s .12s cubic-bezier(.2, .75, .25, 1) both;
}

.welcome-main-card {
    position: relative;
    z-index: 1;
    width: min(100%, 430px);
    padding: 34px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 28px;
    color: var(--ink);
    background: linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(241, 247, 253, .96));
    box-shadow: 0 35px 90px rgba(0, 11, 34, .35), inset 0 1px 0 #fff;
    transform: rotateY(-5deg) rotateX(2deg);
    animation: welcome-card-float 6s ease-in-out infinite;
}

.welcome-main-card::before {
    position: absolute;
    top: -95px;
    inset-inline-end: -95px;
    width: 230px;
    height: 230px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 112, 190, .12), transparent 70%);
    content: "";
}

.welcome-card-top {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.welcome-card-icon {
    display: grid;
    width: 50px;
    height: 50px;
    place-items: center;
    border-radius: 15px;
    color: #fff;
    background: linear-gradient(145deg, #0d64a8, #07396d);
    box-shadow: 0 10px 20px rgba(0, 61, 125, .22);
}

.welcome-card-icon svg { width: 26px; height: 26px; }

.welcome-card-tag {
    padding: 7px 11px;
    border: 1px solid #dce8f4;
    border-radius: 999px;
    color: var(--primary);
    background: #f3f8fd;
    font-size: .76rem;
    font-weight: 700;
}

.welcome-card-overline {
    margin-top: 28px;
    color: #67809a;
    font-size: .8rem;
    font-weight: 700;
}

.welcome-main-card h2 {
    position: relative;
    margin-top: 6px;
    color: #102b49;
    font-size: 1.8rem;
    line-height: 1.55;
}

.welcome-main-card h2 span { color: #c33349; }

.welcome-card-copy {
    margin-top: 8px;
    color: #718198;
    font-size: .87rem;
    line-height: 1.8;
}

.welcome-journey {
    position: relative;
    display: grid;
    gap: 10px;
    margin-top: 25px;
}

.welcome-journey-line {
    position: absolute;
    top: 21px;
    bottom: 21px;
    inset-inline-start: 20px;
    width: 1px;
    background: #dce5ef;
}

.welcome-journey-step {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 5px 8px;
    border-radius: 12px;
    color: #607087;
    font-size: .86rem;
    font-weight: 600;
}

.welcome-step-number {
    z-index: 1;
    display: grid;
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid #dce5ef;
    border-radius: 10px;
    color: #69809a;
    background: #fff;
    font-size: .8rem;
    font-weight: 700;
}

.welcome-step-check {
    display: grid;
    width: 20px;
    height: 20px;
    place-items: center;
    margin-inline-start: auto;
    border-radius: 50%;
    color: #11815d;
    background: #e4f7ef;
    font-size: .7rem;
    opacity: .48;
}

.welcome-journey-step.is-current {
    color: #123b63;
    background: #edf5fc;
}

.welcome-journey-step.is-current .welcome-step-number {
    border-color: #0c5d9d;
    color: #fff;
    background: #0c5d9d;
    box-shadow: 0 0 0 4px rgba(12, 93, 157, .1);
}

.welcome-journey-step.is-current .welcome-step-check { opacity: 1; }

.welcome-orbit {
    position: absolute;
    width: 460px;
    height: 460px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 50%;
    animation: welcome-orbit 28s linear infinite;
}

.welcome-orbit::before,
.welcome-orbit::after {
    position: absolute;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #ff7b82;
    box-shadow: 0 0 20px rgba(255, 123, 130, .75);
    content: "";
}

.welcome-orbit::before { top: 55px; inset-inline-start: 76px; }
.welcome-orbit::after { right: 42px; bottom: 110px; width: 6px; height: 6px; background: #79d8ff; }
.welcome-orbit-two { width: 530px; height: 530px; border-style: dashed; opacity: .4; animation-duration: 42s; animation-direction: reverse; }
.welcome-orbit-two::before { top: 50%; inset-inline-start: -4px; background: #ffe091; }
.welcome-orbit-two::after { display: none; }

.welcome-spark {
    position: absolute;
    z-index: 2;
    color: #ffe091;
    text-shadow: 0 0 20px rgba(255, 224, 145, .55);
    animation: welcome-twinkle 2.6s ease-in-out infinite;
}

.welcome-spark-one { top: 70px; inset-inline-start: 20%; font-size: 2rem; }
.welcome-spark-two { bottom: 74px; inset-inline-end: 14%; color: #8ddfff; font-size: 2.4rem; animation-delay: .8s; }

.welcome-float-card {
    position: absolute;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 13px 16px;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 16px;
    color: var(--ink);
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 18px 45px rgba(0, 15, 40, .25);
    animation: welcome-float 5s ease-in-out infinite;
}

.welcome-float-card > span:last-child { display: grid; gap: 2px; }
.welcome-float-card strong { color: #143859; font-size: .82rem; }
.welcome-float-card small { color: #7b8da2; font-size: .7rem; }
.welcome-float-top { top: 105px; inset-inline-end: -8px; }
.welcome-float-bottom { bottom: 98px; inset-inline-start: -8px; animation-delay: -2.4s; }

.welcome-float-icon {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 12px;
    color: #087c5a;
    background: #e7f8f1;
}

.welcome-float-icon svg { width: 20px; height: 20px; }
.welcome-float-live { width: 9px; height: 9px; margin-inline: 5px; }

@keyframes welcome-enter {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes welcome-card-float {
    0%, 100% { transform: rotateY(-5deg) rotateX(2deg) translateY(0); }
    50% { transform: rotateY(-3deg) rotateX(1deg) translateY(-9px); }
}

@keyframes welcome-float {
    0%, 100% { transform: translateY(0) rotate(-1deg); }
    50% { transform: translateY(-12px) rotate(1deg); }
}

@keyframes welcome-orbit { to { transform: rotate(360deg); } }
@keyframes welcome-twinkle { 0%, 100% { opacity: .45; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); } }
@keyframes welcome-pulse { 0% { opacity: .9; transform: scale(.75); } 100% { opacity: 0; transform: scale(1.8); } }

.how-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

@media (max-width: 980px) {
    .welcome { padding: 54px 0; }
    .welcome-inner { grid-template-columns: minmax(0, 1fr) minmax(320px, .8fr); gap: 26px; }
    .welcome-visual { min-height: 500px; }
    .welcome-orbit { width: 390px; height: 390px; }
    .welcome-orbit-two { width: 450px; height: 450px; }
    .welcome-float-top { inset-inline-end: -2px; }
    .welcome-float-bottom { inset-inline-start: -2px; }
}

@media (max-width: 760px) {
    .welcome { padding: 42px 0 50px; }
    .welcome-inner { grid-template-columns: 1fr; gap: 18px; }
    .welcome-content { max-width: 650px; margin-inline: auto; }
    .welcome-logo { height: 54px; margin-bottom: 26px; }
    .welcome-title { font-size: clamp(2.55rem, 9vw, 3.7rem); }
    .welcome-visual { min-height: 440px; }
    .welcome-main-card { width: min(84%, 400px); padding: 28px; }
    .welcome-orbit { width: 370px; height: 370px; }
    .welcome-orbit-two { width: 430px; height: 430px; }
    .welcome-float-top { top: 48px; }
    .welcome-float-bottom { bottom: 46px; }
}

@media (max-width: 480px) {
    .welcome { padding: 30px 0 38px; }
    .welcome-logo { height: 48px; margin-bottom: 22px; }
    .welcome-eyebrow { margin-bottom: 14px; font-size: .76rem; }
    .welcome-title { font-size: clamp(2.2rem, 10.2vw, 3rem); }
    .welcome-description { margin-top: 14px; font-size: .92rem; }
    .welcome-actions { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 22px; }
    .welcome-btn { min-height: 54px; }
    .welcome-highlights { gap: 8px 14px; margin-top: 24px; font-size: .75rem; }
    .welcome-visual { min-height: 380px; margin-inline: -8px; }
    .welcome-main-card { width: min(82%, 350px); padding: 23px 20px; border-radius: 23px; }
    .welcome-main-card h2 { font-size: 1.5rem; }
    .welcome-card-overline { margin-top: 20px; }
    .welcome-journey { margin-top: 19px; }
    .welcome-journey-step { min-height: 40px; }
    .welcome-float-card { gap: 8px; padding: 10px 11px; }
    .welcome-float-card strong { font-size: .72rem; }
    .welcome-float-card small { font-size: .62rem; }
    .welcome-float-icon { width: 32px; height: 32px; }
    .welcome-orbit { width: 320px; height: 320px; }
    .welcome-orbit-two { width: 360px; height: 360px; }
    .welcome-float-top { top: 22px; inset-inline-end: 0; }
    .welcome-float-bottom { bottom: 20px; inset-inline-start: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .welcome *,
    .welcome *::before,
    .welcome *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }

    .welcome::after { animation: none; }
}


/* =========================================================
   Registration page
   ========================================================= */
.register-hero {
    background: var(--primary);
    border-top: 3px solid var(--gold);
    padding: 54px 0 56px;
    color: #fff;
}

.register-hero-grid {
    display: block;
}

.register-crumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.62);
}

.register-crumbs a { color: rgba(255, 255, 255, 0.78); }
.register-crumbs a:hover { color: #fff; }
.register-crumbs span { opacity: 0.6; }

.register-kicker {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #dbe6f3;
}

.register-kicker::before {
    content: "";
    width: 22px;
    height: 3px;
    background: var(--gold);
}

.register-hero h1 {
    margin: 14px 0 14px;
    font-size: clamp(1.8rem, 3.4vw, 2.55rem);
    line-height: 1.42;
    color: #fff;
    font-weight: 700;
}

.register-hero h1 em {
    display: inline-block;
    font-style: normal;
    color: #fff;
    border-bottom: 3px solid var(--gold);
    padding-bottom: 2px;
}

.register-hero p {
    margin: 0;
    max-width: 560px;
    color: #c8d7e8;
    font-size: 0.98rem;
    line-height: 1.9;
}



.register-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 322px;
    gap: 26px;
    align-items: start;
    padding: 44px 0 60px;
}

.register-main { min-width: 0; }

.register-main .form-card {
    padding: 32px;
    border-radius: 8px;
    border: 1px solid var(--line);
    border-top: 3px solid var(--primary);
    box-shadow: 0 1px 2px rgba(0, 26, 54, 0.05);
}

.register-main .form-progress { padding-bottom: 24px; }

.register-main .section-num {
    border-radius: 6px;
    background: var(--primary-light);
}

.register-main .form-section-head h2 {
    font-size: 1.15rem;
}

.register-aside {
    position: sticky;
    top: calc(var(--header-height) + 22px);
    display: grid;
    gap: 18px;
}

.register-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 22px;
    box-shadow: 0 1px 2px rgba(0, 26, 54, 0.05);
}

.register-card h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    margin: 0;
    padding-bottom: 13px;
    border-bottom: 1px solid var(--line);
}

.register-card-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: grid;
    place-items: center;
    background: var(--primary-light);
    color: var(--primary);
    flex: 0 0 auto;
}

.register-card-icon svg { width: 17px; height: 17px; }

.register-card ul {
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.register-card li {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 0.83rem;
    color: var(--ink-soft);
    line-height: 1.6;
}

.register-card-check li > svg {
    width: 15px;
    height: 15px;
    color: var(--primary);
    flex: 0 0 auto;
    margin-top: 3px;
}

.register-card-docs {
    background: var(--primary);
    border: 0;
    border-top: 4px solid var(--gold);
    border-radius: 8px;
    color: #dbe6f3;
    box-shadow: none;
}

.register-card-docs h3 {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.18);
}

.register-card-docs .register-card-icon {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.register-card-docs li {
    color: #d5e2f0;
    align-items: center;
}

.register-card-docs li small {
    margin-inline-start: auto;
    font-size: 0.68rem;
    color: #c3d4e8;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    padding: 1px 8px;
    white-space: nowrap;
}

.register-doc-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold);
    flex: 0 0 auto;
}

.register-card-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 0.74rem;
    color: #c3d4e8;
}

.register-card-note svg { width: 14px; height: 14px; flex: 0 0 auto; color: #fff; }

@media (max-width: 1100px) {

    .register-layout { grid-template-columns: minmax(0, 1fr) 290px; gap: 20px; }
}

@media (max-width: 980px) {

    .register-layout { grid-template-columns: minmax(0, 1fr); }
    .register-aside {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .register-hero { padding: 34px 0 38px; }

    .register-layout { padding: 26px 0 44px; }
    .register-main .form-card { padding: 22px 18px; }
    .register-aside { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 480px) {
    .register-hero h1 { font-size: 1.55rem; }

}

/* Keep short option groups (e.g. gender) on a single row on every screen */
.choice-group-inline { flex-direction: row; }

/* General average summary under the semester inputs */
.average-band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    padding: 15px 18px;
    border: 1px solid rgba(0, 61, 125, 0.18);
    background: var(--primary-soft);
    border-radius: 10px;
}

.average-band-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.average-band .field-label { font-size: 0.9rem; }
.average-band .hint { font-size: 0.76rem; }

.average-band .grade-preview {
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    gap: 5px;
}

.average-band .grade-preview-value {
    font-size: 1.5rem;
    color: var(--primary);
}

.combo {
    position: relative;
    width: 100%;
}

.combo-control {
    position: relative;
}

.combo-input {
    padding-inline-end: 48px;
    background: #fff;
}

.combo-input::placeholder {
    color: #8994a9;
}

.combo-chevron {
    position: absolute;
    inset-inline-end: 10px;
    top: 50%;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    color: var(--primary);
    background: var(--primary-soft);
    border-radius: 8px;
    pointer-events: none;
    transform: translateY(-50%);
    transition: background .16s ease, color .16s ease;
}

.combo-chevron svg {
    width: 16px;
    height: 16px;
    transition: transform .16s ease;
}

.combo.is-open .combo-chevron {
    color: #fff;
    background: var(--primary);
}

.combo.is-open .combo-chevron svg {
    transform: rotate(180deg);
}

.combo-panel {
    position: absolute;
    z-index: 30;
    inset-inline: 0;
    top: calc(100% + 7px);
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(19, 26, 43, .14);
}

.combo-list {
    max-height: 250px;
    overflow-y: auto;
    margin: 0;
    padding: 6px;
    list-style: none;
}

.combo-option {
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--ink-soft);
    cursor: pointer;
    font-size: .88rem;
    line-height: 1.55;
    transition: background .14s ease, color .14s ease;
}

.combo-option:hover,
.combo-option.is-active {
    color: var(--primary-dark);
    background: var(--primary-soft);
}

.combo-option.is-selected {
    color: var(--primary);
    font-weight: 700;
}

.combo-empty {
    padding: 16px 12px;
    color: var(--muted);
    text-align: center;
    font-size: .84rem;
}

.combo-hint {
    color: var(--muted);
    font-size: .74rem;
    line-height: 1.5;
}

.combo-native {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    clip-path: inset(50%);
    border: 0;
}

@media (max-width: 480px) {
    .average-band { align-items: flex-start; }
    .average-band .grade-preview { width: 100%; justify-content: flex-start; }
}

@media (max-width: 720px) {
    .combo-field { grid-column: 1 / -1; }
}

/* Homepage: keep the focus on the logo, requested announcement, and actions. */
.welcome::before {
    background:
        radial-gradient(circle at 22% 30%, rgba(32, 132, 192, .2), transparent 30%),
        radial-gradient(circle at 78% 72%, rgba(222, 54, 75, .16), transparent 28%),
        linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
    background-size: auto, auto, 54px 54px, 54px 54px;
    animation: welcome-background-drift 18s ease-in-out infinite alternate;
}

.welcome-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    max-width: 1000px;
    text-align: center;
}

.welcome-logo {
    height: 74px;
    margin: 0 0 38px;
    padding: 8px 14px;
    animation: welcome-enter .7s ease-out both, welcome-logo-glow 4s ease-in-out 1s infinite;
}

.welcome-title {
    display: grid;
    gap: 8px;
    color: #fff;
    font-size: clamp(2rem, 4.7vw, 4rem);
    line-height: 1.5;
    letter-spacing: -.025em;
    animation: welcome-enter .8s .12s ease-out both;
}

.welcome-title span {
    display: block;
    color: #ffd27b;
    background: linear-gradient(100deg, #ffe9ae 5%, #ffbd73 48%, #ff8587 100%);
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.welcome-title small {
    display: block;
    margin-top: 5px;
    color: #d7e5f3;
    font-size: clamp(1.05rem, 2vw, 1.45rem);
    font-weight: 500;
    letter-spacing: 0;
}

.welcome-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    width: auto;
    margin-top: 36px;
    animation: welcome-enter .8s .24s ease-out both;
}

.welcome-btn {
    min-width: 160px;
    min-height: 54px;
    padding: 14px 24px;
    border-radius: 13px;
    font-size: .96rem;
}

.welcome-btn-primary {
    color: #fff;
    background: linear-gradient(115deg, #f04850, #d92e47);
    box-shadow: 0 14px 32px rgba(218, 46, 71, .28);
}

.welcome-btn-primary:hover {
    color: #fff;
    box-shadow: 0 18px 38px rgba(218, 46, 71, .4);
    transform: translateY(-3px);
}

.welcome-btn-secondary,
.welcome-btn-tertiary {
    border-color: rgba(255, 255, 255, .3);
    color: #fff;
    background: rgba(255, 255, 255, .075);
    backdrop-filter: blur(10px);
}

.welcome-btn-secondary:hover,
.welcome-btn-tertiary:hover {
    border-color: rgba(255, 255, 255, .55);
    color: #fff;
    background: rgba(255, 255, 255, .15);
    transform: translateY(-3px);
}

/* Keep the landing page moving after its entrance animation. */
.welcome {
    background-size: 145% 145%, 135% 135%, 100% 100%;
    animation: welcome-scene-drift 18s ease-in-out infinite alternate;
}

.welcome-logo {
    animation:
        welcome-enter .7s ease-out both,
        welcome-logo-glow 4s ease-in-out 1s infinite,
        welcome-logo-float 5s ease-in-out 1s infinite;
}

.welcome-title > span:not(.welcome-typing) {
    background-size: 220% auto;
    animation: welcome-text-shimmer 8s ease-in-out infinite alternate;
}

.welcome-actions a:first-child {
    animation: welcome-action-enter .7s .2s ease-out both, welcome-button-glow 3.8s 1.2s ease-in-out infinite;
}

.welcome-actions a:nth-child(2) {
    animation: welcome-action-enter .7s .32s ease-out both;
}

.welcome-actions a:nth-child(3) {
    animation: welcome-action-enter .7s .44s ease-out both;
}

@keyframes welcome-background-drift {
    from { background-position: 0 0, 0 0, 0 0, 0 0; }
    to { background-position: 7% 9%, -8% -6%, 27px 18px, 27px 18px; }
}

@keyframes welcome-logo-glow {
    0%, 100% { box-shadow: 0 12px 30px rgba(0, 0, 0, .13); }
    50% { box-shadow: 0 14px 38px rgba(108, 183, 238, .28); }
}

@keyframes welcome-scene-drift {
    0% { background-position: 0% 50%, 100% 0%, 0 0; }
    50% { background-position: 35% 20%, 55% 60%, 0 0; }
    100% { background-position: 90% 80%, 0% 100%, 0 0; }
}

@keyframes welcome-logo-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}

@keyframes welcome-text-shimmer {
    from { background-position: 100% 50%; }
    to { background-position: 0% 50%; }
}

@keyframes welcome-action-enter {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes welcome-button-glow {
    0%, 100% { box-shadow: 0 14px 32px rgba(218, 46, 71, .28); }
    50% { box-shadow: 0 18px 42px rgba(218, 46, 71, .48); }
}

@media (max-width: 760px) {
    .welcome { padding: 44px 0; }
    .welcome-logo { height: 62px; margin-bottom: 30px; }
    .welcome-actions { flex-wrap: wrap; }
}

@media (max-width: 480px) {
    .welcome { min-height: 100svh; padding: 32px 0; }
    .welcome-logo { height: 54px; margin-bottom: 26px; }
    .welcome-title { gap: 7px; font-size: clamp(1.7rem, 8vw, 2.2rem); }
    .welcome-title small { margin-top: 3px; font-size: 1rem; }
    .welcome-actions { display: grid; width: min(100%, 340px); margin-top: 26px; }
    .welcome-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .welcome::before,
    .welcome::after,
    .welcome,
    .welcome-logo,
    .welcome-title,
    .welcome-actions,
    .welcome-actions a {
        animation: none !important;
    }

    .welcome-btn { transition: none; }
}

/* Student login visual refresh; content and wording remain unchanged. */
.auth-page-student {
    min-height: 100vh;
    min-height: 100svh;
    overflow: hidden;
    background: #f3f6fb;
}

.auth-page-student .auth-visual {
    isolation: isolate;
    padding: clamp(32px, 5vw, 72px);
    background:
        radial-gradient(ellipse at 18% 82%, rgba(18, 123, 191, .3), transparent 38%),
        radial-gradient(ellipse at 84% 12%, rgba(229, 49, 65, .19), transparent 32%),
        linear-gradient(140deg, #06172e 0%, #082b50 52%, #073967 100%);
}

.auth-page-student .auth-visual::before {
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
    background-size: 52px 52px;
    mask-image: linear-gradient(130deg, #000, transparent 90%);
    animation: login-grid-drift 24s linear infinite alternate;
}

.auth-page-student .auth-visual::after {
    position: absolute;
    z-index: -1;
    top: 50%;
    left: 50%;
    width: min(58vw, 620px);
    aspect-ratio: 1;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 50%;
    box-shadow: 0 0 0 42px rgba(255, 255, 255, .025), 0 0 0 92px rgba(255, 255, 255, .018);
    content: "";
    transform: translate(-50%, -50%);
    animation: login-ring 40s linear infinite;
}

.auth-page-student .auth-visual .brand {
    animation: login-rise .7s ease-out both;
}

.auth-page-student .auth-visual .brand-logo {
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .18);
}

.auth-page-student .auth-quote {
    animation: login-rise .8s .12s ease-out both;
}

.auth-page-student .auth-quote .eyebrow {
    border-radius: 999px;
    backdrop-filter: blur(10px);
}

.auth-page-student .auth-quote .eyebrow-dot {
    background: #70e1ba;
    box-shadow: 0 0 12px rgba(112, 225, 186, .7);
}

.auth-page-student .auth-form-wrap {
    position: relative;
    padding: clamp(28px, 5vw, 76px);
    background:
        radial-gradient(ellipse at 100% 0%, rgba(0, 61, 125, .07), transparent 42%),
        #f4f7fb;
}

.auth-page-student .auth-form {
    padding: clamp(28px, 4vw, 48px);
    border: 1px solid rgba(210, 220, 233, .85);
    border-radius: 24px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 24px 70px rgba(24, 48, 79, .1), 0 2px 6px rgba(24, 48, 79, .04);
    animation: login-rise .75s .08s ease-out both;
}

.auth-page-student .auth-form h1 {
    margin-bottom: 10px;
    color: #102b49;
    font-size: clamp(1.7rem, 3vw, 2rem);
}

.auth-page-student .auth-form > p {
    margin-bottom: 30px;
    color: #718198;
    line-height: 1.8;
}

.auth-page-student .auth-form .field {
    gap: 9px;
    margin-bottom: 20px;
}

.auth-page-student .auth-form .field > label {
    color: #30425a;
    font-size: .86rem;
}

.auth-page-student .auth-form .input {
    min-height: 54px;
    border-color: #dce4ee;
    border-radius: 12px;
    background: #f8fafc;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease, transform .2s ease;
}

.auth-page-student .auth-form .input:hover {
    border-color: #b7c9dc;
}

.auth-page-student .auth-form .input:focus {
    border-color: #1767a6;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(23, 103, 166, .11);
}

.auth-page-student .auth-form .btn {
    min-height: 56px;
    margin-top: 6px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(110deg, #0b5b9b, #07396d);
    box-shadow: 0 12px 24px rgba(7, 57, 109, .2);
    transition: transform .2s ease, box-shadow .2s ease;
}

.auth-page-student .auth-form .btn:hover {
    box-shadow: 0 16px 30px rgba(7, 57, 109, .28);
    transform: translateY(-2px);
}

.auth-page-student .auth-alt {
    color: #75849a;
    text-align: center;
}

.auth-page-student .auth-alt a {
    color: #0b5b9b;
    font-weight: 700;
}

.auth-page-student .auth-back {
    justify-content: center;
    width: 100%;
    margin-top: 22px;
    color: #7b899d;
    transition: color .18s ease;
}

.auth-page-student .auth-back:hover { color: #0b5b9b; }

@keyframes login-rise {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes login-ring { to { rotate: 360deg; } }
@keyframes login-grid-drift { to { background-position: 26px 26px, 26px 26px; } }

@media (max-width: 980px) {
    .auth-page-student {
        grid-template-columns: 1fr;
        align-items: center;
        padding: 28px 18px;
        background:
            radial-gradient(ellipse at 12% 10%, rgba(24, 115, 177, .35), transparent 42%),
            linear-gradient(145deg, #06172e, #082b50 58%, #073967);
    }

    .auth-page-student .auth-visual { display: none; }

    .auth-page-student .auth-form-wrap {
        width: 100%;
        padding: 0;
        background: transparent;
    }

    .auth-page-student .auth-form {
        width: min(440px, 100%);
        margin-inline: auto;
        padding: clamp(25px, 7vw, 40px);
        border-color: rgba(255, 255, 255, .7);
        border-radius: 22px;
        box-shadow: 0 25px 70px rgba(0, 10, 28, .3);
    }

    .auth-page-student .auth-form .brand {
        display: inline-flex;
        margin-bottom: 28px;
        padding: 8px 11px;
        border: 1px solid #e6ebf2;
        border-radius: 12px;
        background: #fff;
    }

    .auth-page-student .auth-form .brand-logo {
        width: 46px;
        height: 46px;
        object-fit: contain;
    }

    .auth-page-student .auth-form .brand-text small { color: #75849a; }
}

@media (max-width: 480px) {
    .auth-page-student { padding: 18px 14px; }
    .auth-page-student .auth-form { padding: 25px 21px; }
    .auth-page-student .auth-form > p { margin-bottom: 24px; }
}

@media (prefers-reduced-motion: reduce) {
    .auth-page-student *,
    .auth-page-student *::before,
    .auth-page-student *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

.how-page .how-steps {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: clamp(52px, 7vw, 88px) 0;
    background:
        radial-gradient(ellipse at 12% 0%, rgba(35, 136, 196, .22), transparent 38%),
        radial-gradient(ellipse at 92% 90%, rgba(222, 54, 75, .16), transparent 32%),
        linear-gradient(135deg, #06172e, #082b50 58%, #073967);
}

.how-page .how-steps::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(130deg, #000, transparent 95%);
    content: "";
    animation: how-grid-drift 28s linear infinite alternate;
}

.how-page .how-steps::after {
    position: absolute;
    z-index: -1;
    top: -190px;
    inset-inline-end: -160px;
    width: 420px;
    height: 420px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 50%;
    box-shadow: 0 0 0 42px rgba(255, 255, 255, .025), 0 0 0 88px rgba(255, 255, 255, .018);
    content: "";
    animation: how-ring 34s linear infinite;
}

.how-page .section-head {
    max-width: 720px;
    margin-bottom: 42px;
    animation: how-rise .65s ease-out both;
}

.how-page .how-steps .section-head h2 {
    color: #fff;
    font-size: clamp(2rem, 4vw, 3rem);
}

.how-page .how-steps .section-head p {
    color: #c3d6e9;
    line-height: 1.9;
}

.how-page .how-steps .eyebrow {
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 999px;
    color: #d7e8f7;
    background: rgba(255, 255, 255, .07);
    backdrop-filter: blur(10px);
}

.how-page .how-steps .eyebrow-dot {
    background: #70e1ba;
    box-shadow: 0 0 12px rgba(112, 225, 186, .7);
}

.how-page .steps-grid {
    position: relative;
    gap: 16px;
}

.how-page .steps-grid::before {
    position: absolute;
    top: 48px;
    inset-inline: 8%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(133, 186, 224, .45), transparent);
    content: "";
}

.how-page .step-card {
    z-index: 1;
    min-height: 220px;
    padding: 24px 20px;
    border: 1px solid rgba(255, 255, 255, .75);
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(240, 247, 253, .96));
    box-shadow: 0 14px 35px rgba(0, 10, 28, .15);
    animation: how-rise .65s ease-out both;
    transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}

.how-page .step-card:nth-child(2) { animation-delay: .08s; }
.how-page .step-card:nth-child(3) { animation-delay: .16s; }
.how-page .step-card:nth-child(4) { animation-delay: .24s; }

.how-page .step-card:hover {
    border-color: #9dc9e7;
    box-shadow: 0 22px 42px rgba(0, 10, 28, .24);
    transform: translateY(-7px);
}

.how-page .step-num {
    width: 48px;
    height: 48px;
    margin-bottom: 20px;
    border: 1px solid #d5e5f2;
    border-radius: 15px;
    color: #fff;
    background: linear-gradient(145deg, #0d64a8, #07396d);
    box-shadow: 0 8px 18px rgba(0, 61, 125, .2);
    font-size: 1.05rem;
}

.how-page .step-card h3 {
    margin-bottom: 9px;
    color: #102b49;
    font-size: 1.04rem;
}

.how-page .step-card p {
    color: #718198;
    font-size: .86rem;
    line-height: 1.85;
}

.how-page .how-documents {
    padding: clamp(48px, 6vw, 76px) 0 68px;
    background:
        radial-gradient(ellipse at 90% 4%, rgba(0, 61, 125, .055), transparent 34%),
        #f3f6fb;
}

.how-page .how-documents .section-head h2 {
    color: #102b49;
}

.how-page .how-documents .section-head p {
    color: #718198;
    line-height: 1.9;
}

.how-page .how-documents .eyebrow {
    border: 1px solid #dce8f4;
    border-radius: 999px;
    color: #315572;
    background: #fff;
}

.how-page .how-documents .eyebrow-dot {
    background: #0c78a9;
    box-shadow: 0 0 0 4px rgba(12, 120, 169, .1);
}

.how-page .doc-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    max-width: 900px;
    margin-inline: auto;
}

.how-page .doc-item {
    min-height: 68px;
    border-color: #e0e8f1;
    border-radius: 14px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 5px 16px rgba(25, 50, 80, .045);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.how-page .doc-item:hover {
    border-color: #bbd2e6;
    box-shadow: 0 10px 24px rgba(25, 50, 80, .09);
    transform: translateY(-2px);
}

.how-page .doc-item .tick {
    width: 32px;
    height: 32px;
    color: #087c5a;
    background: #e7f8f1;
}

.how-page .doc-item small {
    padding: 5px 8px;
    border-radius: 999px;
    background: #f1f5f9;
    white-space: nowrap;
}

.how-page .how-actions {
    justify-content: center;
    margin-top: 30px;
}

.how-page .how-actions .btn {
    min-width: 160px;
    border-radius: 12px;
    transition: transform .2s ease, box-shadow .2s ease;
}

.how-page .how-actions .btn:hover {
    box-shadow: 0 12px 24px rgba(0, 45, 88, .16);
    transform: translateY(-2px);
}

@keyframes how-rise {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes how-ring { to { rotate: 360deg; } }
@keyframes how-grid-drift { to { background-position: 24px 24px, 24px 24px; } }

@media (max-width: 980px) {
    .how-page .steps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .how-page .how-steps { padding: 48px 0; }
    .how-page .section-head { margin-bottom: 28px; }
    .how-page .steps-grid { grid-template-columns: 1fr; gap: 12px; }
    .how-page .steps-grid::before { display: none; }
    .how-page .step-card { min-height: 0; padding: 21px; }
    .how-page .step-num { margin-bottom: 14px; }
    .how-page .doc-list { grid-template-columns: 1fr; }
    .how-page .doc-item { gap: 10px; padding: 12px; font-size: .82rem; }
    .how-page .doc-item small { font-size: .68rem; }
    .how-page .how-actions { display: grid; }
    .how-page .how-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .how-page *,
    .how-page *::before,
    .how-page *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

.portal-main:has(.student-dashboard) {
    min-height: calc(100vh - var(--header-height));
    padding-block: 34px 52px;
    background:
        radial-gradient(ellipse at 92% 0%, rgba(0, 61, 125, .06), transparent 34%),
        #f3f6fb;
}

.student-dashboard {
    animation: dashboard-enter .55s ease-out both;
}

.student-dashboard > .alert {
    margin-bottom: 20px;
    border-radius: 14px;
}

.student-dashboard .profile-card {
    margin-bottom: 20px;
    border-color: #e0e8f1;
    border-radius: 22px;
    box-shadow: 0 12px 35px rgba(21, 43, 72, .07);
}

.student-dashboard .profile-cover {
    position: relative;
    height: 118px;
    overflow: hidden;
    background:
        radial-gradient(400px 170px at 88% 0%, rgba(255, 255, 255, .16), transparent 70%),
        linear-gradient(115deg, #06172e, #0b4779 65%, #147ca3);
}

.student-dashboard .profile-cover::before {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
    background-size: 34px 34px;
    content: "";
    mask-image: linear-gradient(100deg, transparent, #000);
}

.student-dashboard .profile-cover::after {
    position: absolute;
    top: -150px;
    inset-inline-start: 13%;
    width: 310px;
    height: 310px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 50%;
    box-shadow: 0 0 0 30px rgba(255, 255, 255, .035), 0 0 0 65px rgba(255, 255, 255, .025);
    content: "";
}

.student-dashboard .profile-body {
    position: relative;
    align-items: flex-end;
    gap: 18px;
    padding: 0 28px 24px;
    margin-top: -46px;
}

.student-dashboard .profile-avatar {
    width: 112px;
    height: 112px;
    border: 5px solid #fff;
    border-radius: 24px;
    background-color: #e7eff8;
    box-shadow: 0 12px 25px rgba(10, 39, 68, .18);
}

.student-dashboard .profile-id {
    min-width: 240px;
    padding-top: 48px;
}

.student-dashboard .profile-id h2 {
    color: #102b49;
    font-size: clamp(1.2rem, 2vw, 1.55rem);
}

.student-dashboard .profile-meta {
    gap: 8px;
    margin-top: 10px;
    color: #738198;
}

.student-dashboard .profile-meta span {
    max-width: 100%;
    overflow-wrap: anywhere;
}

.student-dashboard .profile-meta .badge-soft {
    padding: 4px 10px;
    border: 1px solid #dfe9f3;
    border-radius: 999px;
    color: #355a78;
    background: #f4f8fc;
    font-weight: 700;
}

.student-dashboard .profile-actions {
    padding-top: 42px;
}

.student-dashboard .profile-actions .btn {
    min-height: 42px;
    padding-inline: 16px;
    border-radius: 11px;
    box-shadow: 0 7px 16px rgba(0, 61, 125, .15);
}

.student-dashboard .status-hero {
    position: relative;
    align-items: center;
    gap: 18px;
    margin: 0 0 22px;
    padding: 20px 24px;
    overflow: hidden;
    border-color: #e1e9f2;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(21, 43, 72, .045);
    animation: dashboard-enter .55s .08s ease-out both;
}

.student-dashboard .status-hero::before {
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    width: 4px;
    background: var(--primary);
    content: "";
}

.student-dashboard .status-hero-icon {
    width: 50px;
    height: 50px;
    flex: 0 0 auto;
    border-radius: 15px;
}

.student-dashboard .status-hero h2 {
    font-size: 1.2rem;
}

.student-dashboard .status-hero p {
    color: #53647b;
    line-height: 1.75;
}

.student-dashboard .status-hero-date {
    display: inline-block;
    margin-top: 6px;
}

.student-dashboard .detail-grid {
    grid-template-columns: minmax(0, 1.65fr) minmax(290px, .85fr);
    gap: 20px;
}

.student-dashboard .detail-grid > div,
.student-dashboard .side-panel {
    min-width: 0;
}

.student-dashboard .side-panel {
    position: sticky;
    top: 96px;
    gap: 16px;
}

.student-dashboard .info-card {
    margin-bottom: 18px;
    border-color: #e1e9f2;
    border-radius: 17px;
    box-shadow: 0 8px 24px rgba(21, 43, 72, .045);
    transition: box-shadow .2s ease, transform .2s ease;
}

.student-dashboard .info-card:hover {
    box-shadow: 0 13px 30px rgba(21, 43, 72, .08);
}

.student-dashboard .info-card-head {
    min-height: 58px;
    padding: 15px 20px;
    border-bottom-color: #eaf0f6;
    background: linear-gradient(100deg, #fff, #f8fafc);
}

.student-dashboard .info-card-head svg {
    width: 34px;
    height: 34px;
    padding: 8px;
    border-radius: 10px;
    color: #0b5b91;
    background: #eaf3fa;
}

.student-dashboard .info-card-head h3 {
    color: #183854;
    font-size: .94rem;
}

.student-dashboard .info-list li {
    padding: 13px 20px;
    border-bottom-color: #edf2f7;
}

.student-dashboard .info-list .label {
    color: #8290a3;
    font-size: .72rem;
}

.student-dashboard .info-list .value {
    color: #263b52;
    font-size: .86rem;
}

.student-dashboard .grades-list {
    gap: 14px;
    padding-inline: 20px !important;
}

.student-dashboard .grade-row {
    gap: 12px;
}

.student-dashboard .grade-row .grade-label {
    width: 112px;
    color: #54657c;
}

.student-dashboard .grade-bar {
    height: 8px;
    background: #eaf0f6;
}

.student-dashboard .grade-bar span {
    background: linear-gradient(90deg, #0d64a8, #35b5a2);
}

.student-dashboard .grade-total {
    border-color: #d7e6f3;
    border-radius: 14px;
    background: linear-gradient(110deg, #eef5fb, #eff9f7);
}

.student-dashboard .file-grid {
    gap: 10px;
    padding: 18px;
}

.student-dashboard .file-tile {
    min-width: 0;
    border-color: #e4ebf3;
    border-radius: 13px;
    background: #fbfcfe;
}

.student-dashboard .file-tile:hover {
    border-color: #b8d2e7;
    background: #f4f8fc;
}

.student-dashboard .file-tile-icon {
    border-color: #e1ebf4;
    border-radius: 11px;
    color: #0b5b91;
    background: #edf4fa;
}

.student-dashboard .file-tile-copy strong {
    color: #263b52;
}

.student-dashboard .file-tile-copy span {
    font-size: .73rem;
}

.student-dashboard .file-tile.missing .file-tile-icon {
    color: #8492a5;
    background: #f0f3f7;
}

.student-dashboard .side-panel .info-card {
    margin: 0;
}

.student-dashboard .meta-stack > div {
    padding: 12px 18px;
    border-bottom-color: #edf2f7;
    font-size: .8rem;
}

.student-dashboard .meta-stack span {
    flex: 0 0 auto;
    color: #8290a3;
}

.student-dashboard .meta-stack strong {
    color: #30455d;
    text-align: left;
    overflow-wrap: anywhere;
}

.student-dashboard .side-panel .panel-body {
    padding: 18px 20px !important;
}

.student-dashboard .stage-list {
    position: relative;
    gap: 13px;
}

.student-dashboard .stage-list::before {
    position: absolute;
    top: 8px;
    bottom: 8px;
    inset-inline-start: 4px;
    width: 1px;
    background: #e2eaf2;
    content: "";
}

.student-dashboard .stage-list li {
    position: relative;
    gap: 11px;
    font-size: .83rem;
}

.student-dashboard .stage-list .stage-dot {
    z-index: 1;
    width: 9px;
    height: 9px;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #d5e0eb;
}

.student-dashboard .stage-list li.is-done .stage-dot {
    background: #22a17e;
    box-shadow: 0 0 0 1px #bde8d9;
}

.student-dashboard .stage-list li.is-current .stage-dot {
    background: #e84a57;
    box-shadow: 0 0 0 4px rgba(232, 74, 87, .12);
}

@keyframes dashboard-enter {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1100px) {
    .student-dashboard .detail-grid { grid-template-columns: 1fr; }
    .student-dashboard .side-panel { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
    .portal-main:has(.student-dashboard) { padding-block: 20px 34px; }
    .student-dashboard .profile-body { padding-inline: 18px; }
    .student-dashboard .profile-actions { padding-top: 0; }
    .student-dashboard .side-panel { grid-template-columns: 1fr; }
    .student-dashboard .file-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .student-dashboard .profile-cover { height: 88px; }
    .student-dashboard .profile-body { gap: 12px; margin-top: -36px; }
    .student-dashboard .profile-avatar { width: 84px; height: 84px; border-radius: 20px; }
    .student-dashboard .profile-id { min-width: 0; padding-top: 42px; }
    .student-dashboard .profile-id h2 { font-size: 1.05rem; }
    .student-dashboard .profile-meta { font-size: .74rem; }
    .student-dashboard .profile-actions { width: 100%; }
    .student-dashboard .status-hero { align-items: flex-start; padding: 17px; }
    .student-dashboard .status-hero-icon { width: 42px; height: 42px; }
    .student-dashboard .status-hero h2 { font-size: 1.05rem; }
    .student-dashboard .status-hero p { font-size: .84rem; }
    .student-dashboard .info-list li,
    .student-dashboard .info-list .span-2 { grid-column: auto; border-inline-end: 0 !important; }
    .student-dashboard .grades-list { padding-inline: 16px !important; }
    .student-dashboard .grade-row { gap: 8px; }
    .student-dashboard .grade-row .grade-label { width: 88px; font-size: .73rem; }
    .student-dashboard .grade-row .grade-value { width: 44px; font-size: .78rem; }
}

@media (prefers-reduced-motion: reduce) {
    .student-dashboard,
    .student-dashboard * {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* Animate only the homepage backdrop; keep all foreground content steady. */
.welcome {
    background-size: auto;
    animation: none;
}

.welcome::before {
    inset: -8%;
    background-size: auto, auto, 54px 54px, 54px 54px;
    animation: welcome-background-pan 28s ease-in-out infinite alternate;
    will-change: transform;
}

.welcome *:not(.welcome-typing) {
    animation: none !important;
}

.welcome-title .welcome-typing {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    color: #fff;
    background: none;
    -webkit-text-fill-color: #fff;
    clip-path: inset(0 0 0 100%);
    animation: welcome-typewriter 2.8s steps(28, end) .2s forwards;
}

.welcome-how-link {
    margin-top: 20px;
    color: #d7e5f3;
    font-size: .92rem;
    text-decoration: underline;
    text-decoration-color: rgba(215, 229, 243, .72);
    text-underline-offset: 5px;
    transition: color .18s ease, text-decoration-color .18s ease;
}

.welcome-how-link:hover {
    color: #fff;
    text-decoration-color: #fff;
}

@keyframes welcome-typewriter {
    to { clip-path: inset(0 0 0 0); }
}

@keyframes welcome-background-pan {
    from { transform: translate3d(-1.5%, -1%, 0) scale(1); }
    to { transform: translate3d(1.5%, 1%, 0) scale(1.04); }
}

@media (max-width: 760px) {
    .welcome::before {
        inset: -12%;
        animation-duration: 34s;
    }

    .welcome::after {
        animation-duration: 52s;
    }
}

@media (prefers-reduced-motion: reduce) {
    .welcome::before,
    .welcome::after {
        animation: none !important;
        will-change: auto;
    }

    .welcome-typing { animation: none !important; clip-path: none; }
}
