:root {
    --brand: #2563eb;
    --brand-dark: #1d4ed8;
    --brand-600: #2563eb;
    --accent: #22d3ee;
    --navy: #0f172a;
    --navy-soft: #111827;
    --sky: #f0f7ff;
    --bg: #f8fafc;
    --text: #0f172a;
    --muted: #475569;
    --line: #e5e7eb;
    --radius: 20px;
    --radius-sm: 14px;
    --shadow: 0 40px 80px -60px rgba(37, 99, 235, 0.45);
    --shadow-sm: 0 30px 60px -50px rgba(15, 23, 42, 0.4);
    --shadow-card: 0 60px 120px -80px rgba(15, 23, 42, 0.6);
    --sidebar-width: 276px;
    --sidebar-collapsed: 86px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
}

.text-muted-soft {
    color: var(--muted) !important;
}

.text-brand {
    color: var(--brand) !important;
}

.bg-navy {
    background: var(--navy) !important;
}

.bg-soft {
    background: var(--bg) !important;
}

.bg-sky {
    background: var(--sky) !important;
}

.fw-600 {
    font-weight: 600;
}

.fw-700 {
    font-weight: 700;
}

.letter-wide {
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.74rem;
    font-weight: 700;
}

/* ---------- Buttons & forms ---------- */
.btn {
    border-radius: 999px;
    font-weight: 600;
    padding: 0.64rem 1.4rem;
    letter-spacing: -0.01em;
}

.btn-lg {
    padding: 0.9rem 1.9rem;
    border-radius: 999px;
}

.btn-sm {
    padding: 0.38rem 0.75rem;
    border-radius: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand) 0%, #1d4ed8 100%);
    border: none;
    box-shadow: 0 18px 40px -18px rgba(37, 99, 235, 0.9);
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    box-shadow: 0 20px 44px -16px rgba(37, 99, 235, 0.95);
}

.btn-outline-primary {
    color: var(--brand);
    border-color: var(--brand);
}

.btn-outline-primary:hover {
    background: var(--brand);
    border-color: var(--brand);
}

.btn-light {
    background: #fff;
    border-color: #fff;
}

.btn-soft {
    background: var(--sky);
    color: var(--brand-dark);
    border: 1px solid #c7dbff;
}

.btn-soft:hover {
    background: #cfe0ff;
    color: var(--brand-dark);
}

.form-control,
.form-select {
    border-radius: 10px;
    border-color: #d8e1ee;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    line-height: 1.45;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 0.2rem rgba(29, 78, 216, 0.12);
}

.form-label {
    font-weight: 600;
    font-size: 0.84rem;
    margin-bottom: 0.3rem;
}

.form-text {
    font-size: 0.76rem;
}

.invalid-feedback.d-block {
    font-size: 0.76rem;
}

.form-check-label {
    font-size: 0.88rem;
}

.form-check-input:checked {
    background-color: var(--brand);
    border-color: var(--brand);
}

form.row.g-3,
form .row.g-3,
form .row.g-md-3 {
    --bs-gutter-x: 0.75rem;
    --bs-gutter-y: 0.75rem;
}

form .row.g-2 {
    --bs-gutter-x: 0.5rem;
    --bs-gutter-y: 0.5rem;
}

form .card-body {
    padding: 1.15rem;
}

form .card-body.border-top {
    padding: 0.9rem 1.15rem;
}

form .input-group > .btn:not(.btn-sm) {
    padding: 0.5rem 0.8rem;
}

/* ---------- Cards ---------- */
.card {
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--line);
    padding: 1.1rem 1.35rem;
    font-weight: 700;
}

.card-body {
    padding: 1.35rem;
}

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

.hover-lift {
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.icon-box {
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: var(--sky);
    color: var(--brand);
    font-size: 1.4rem;
    flex: 0 0 auto;
}

.icon-box.lg {
    width: 64px;
    height: 64px;
    font-size: 1.7rem;
    border-radius: 20px;
}

/* ---------- Public nav ---------- */
.public-nav {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(18px) saturate(120%);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 30px 60px -40px rgba(15, 23, 42, 0.9);
    z-index: 1030;
}

.public-nav .navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--navy);
    font-weight: 800;
    white-space: normal;
}

.public-nav .brand-logo {
    width: 46px;
    height: 46px;
    object-fit: contain;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--line);
    padding: 3px;
}

.public-nav .brand-title {
    font-size: 1rem;
    line-height: 1.15;
}

.public-nav .brand-sub {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: 0.04em;
}

.public-nav .nav-link {
    color: #334155;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.55rem 0.7rem !important;
    border-radius: 10px;
}

.public-nav .nav-link:hover,
.public-nav .nav-link.active {
    color: var(--brand);
    background: #eff5ff;
}

.navbar-toggler {
    border: 1px solid var(--line);
    border-radius: 10px;
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at 80% 0%, rgba(34, 211, 238, 0.22), transparent 40%),
        radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.18), transparent 38%),
        linear-gradient(135deg, #020617 0%, #0f172a 38%, #1e3a8a 100%);
    color: #fff;
    padding: clamp(4rem, 8vw, 6rem) 0 clamp(4.5rem, 9vw, 6.5rem);
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(0px);
    pointer-events: none;
}

.hero::before {
    width: 620px;
    height: 620px;
    right: -220px;
    top: -280px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.18) 0%, transparent 70%);
}

.hero::after {
    width: 420px;
    height: 420px;
    left: -160px;
    bottom: -260px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.16) 0%, transparent 72%);
}

.hero .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    max-width: 100%;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: rgba(125, 211, 252, 0.16);
    border: 1px solid rgba(125, 211, 252, 0.45);
    color: #e0f2fe;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    overflow-wrap: anywhere;
}

.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -0.03em;
    text-wrap: balance;
}

.hero.hero-compact {
    padding: clamp(2.25rem, 6vw, 3.5rem) 0;
}

.hero.hero-compact h1 {
    font-size: clamp(1.75rem, 3.8vw, 3rem);
}

.hero .lead {
    color: rgba(255, 255, 255, 0.78);
    font-size: 1.03rem;
    max-width: 660px;
}

.hero-panel {
    position: relative;
    width: 100%;
    max-width: 100%;
    background: radial-gradient(circle at top, rgba(255, 255, 255, 0.16), transparent 60%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(15, 23, 42, 0.4) 100%);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 26px;
    padding: clamp(1.4rem, 2vw, 1.8rem);
    backdrop-filter: blur(18px) saturate(120%);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.hero-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(34, 211, 238, 0.14), transparent 55%);
    pointer-events: none;
}

.hero-panel > * {
    position: relative;
    z-index: 1;
}

.hero-panel .status-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem 1rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    margin-bottom: 1rem;
}

.hero-panel .status-line .badge {
    max-width: 100%;
    white-space: normal;
    text-align: left;
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.45rem;
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18);
}

.hero-date {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.15rem 1rem;
    min-width: 0;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.7);
    padding: 0.35rem 0;
}

.hero-date strong {
    margin-left: auto;
    color: #fff;
    font-weight: 600;
    text-align: right;
    overflow-wrap: anywhere;
}

/* ---------- Sections ---------- */
.section {
    padding: clamp(3.5rem, 7vw, 5.2rem) 0;
}

.section-sm {
    padding: clamp(2.4rem, 6vw, 3.6rem) 0;
}

.section-title {
    font-weight: 800;
    letter-spacing: -0.02em;
    font-size: clamp(1.55rem, 2.5vw, 2.1rem);
    color: var(--navy);
}

.section-subtitle {
    color: var(--muted);
    max-width: 680px;
}

.eyebrow {
    color: var(--brand);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.major-card {
    height: 100%;
    position: relative;
    overflow: hidden;
}

.major-card::after {
    content: "";
    position: absolute;
    right: -40px;
    top: -40px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #eff5ff;
}

.major-card .card-body {
    position: relative;
    z-index: 1;
}

.quota-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
    border-radius: 999px;
    padding: 0.25rem 0.65rem;
    font-size: 0.76rem;
    font-weight: 700;
}

.stat-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.2rem 1.3rem;
    height: 100%;
    box-shadow: var(--shadow-sm);
}

.stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--navy);
    line-height: 1.1;
}

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

.announcement-item {
    display: flex;
    gap: 1rem;
    padding: 1.1rem 0;
    border-bottom: 1px dashed var(--line);
}

.announcement-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.date-chip {
    flex: 0 0 auto;
    width: 58px;
    text-align: center;
    background: #eff5ff;
    color: var(--brand-dark);
    border-radius: 12px;
    padding: 0.35rem 0.25rem;
    font-weight: 700;
    line-height: 1.1;
}

.date-chip .day {
    font-size: 1.15rem;
    display: block;
}

.date-chip .month {
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.step-flow {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.step-flow-item {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 1.1rem;
    background: #fff;
    height: 100%;
}

.step-number {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--brand);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 0.65rem;
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-list li {
    display: flex;
    gap: 0.7rem;
    padding: 0.45rem 0;
    color: #334155;
}

.info-list li i {
    color: var(--brand);
    margin-top: 0.15rem;
}

/* ---------- Auth ---------- */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    background: var(--bg);
}

.auth-side {
    background: linear-gradient(150deg, #07172e 0%, #0b2447 55%, #1d4ed8 130%);
    color: #fff;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.auth-side::after {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    right: -180px;
    bottom: -160px;
}

.auth-side .brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 800;
    position: relative;
    z-index: 1;
}

.auth-side .brand img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #fff;
    padding: 3px;
}

.auth-side h2 {
    font-size: clamp(1.6rem, 2.7vw, 2.5rem);
    font-weight: 800;
    line-height: 1.2;
    position: relative;
    z-index: 1;
}

.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-card {
    width: 100%;
    max-width: 540px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
    padding: 2rem;
}

.auth-card.wide {
    max-width: 820px;
}

.auth-card h1 {
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--navy);
}

.divider-text {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--muted);
    font-size: 0.8rem;
}

.divider-text::before,
.divider-text::after {
    content: "";
    height: 1px;
    background: var(--line);
    flex: 1;
}

.captcha-box {
    background: #0b2447;
    color: #fff;
    border-radius: 12px;
    padding: 0.72rem 1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.captcha-row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.5rem;
}

.captcha-row .form-control {
    flex: 1 1 130px;
    min-width: 130px;
}

.captcha-image {
    width: 180px;
    height: 60px;
    flex: 0 0 auto;
    object-fit: cover;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

#daftar {
    scroll-margin-top: 90px;
}

/* ---------- Registration form highlight ---------- */
.registration-card {
    position: relative;
    background:
        radial-gradient(circle at 92% 4%, rgba(34, 211, 238, 0.16), transparent 38%),
        linear-gradient(165deg, #ffffff 0%, #eef5ff 45%, #e2edff 100%);
    border-color: rgba(37, 99, 235, 0.2);
    box-shadow: 0 36px 80px -52px rgba(30, 58, 138, 0.6);
}

.registration-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-600) 0%, #38bdf8 55%, var(--accent) 100%);
}

.registration-card > .card-body {
    position: relative;
    z-index: 1;
}

.registration-card .form-label {
    color: #1e293b;
}

.registration-card .form-control,
.registration-card .form-select {
    background-color: #fff;
}

/* ---------- Dashboard shell ---------- */
.app-shell {
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-width);
    background: #081a33;
    color: #cbd5e1;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    transition: width 0.2s ease, transform 0.25s ease;
    overflow-y: auto;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 1.15rem 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    min-height: 76px;
    color: #fff;
}

.sidebar-brand img {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #fff;
    padding: 3px;
    flex: 0 0 auto;
}

.sidebar-brand .brand-text {
    font-weight: 800;
    font-size: 0.95rem;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-brand .brand-text small {
    display: block;
    font-size: 0.66rem;
    color: #93c5fd;
    font-weight: 600;
    letter-spacing: 0.06em;
}

.sidebar-nav {
    padding: 0.9rem 0.65rem 1.3rem;
    flex: 1;
}

.sidebar-section {
    font-size: 0.64rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #64748b;
    padding: 1rem 0.75rem 0.45rem;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.65rem 0.8rem;
    border-radius: 11px;
    color: #cbd5e1;
    font-size: 0.87rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-link i {
    font-size: 1.05rem;
    flex: 0 0 auto;
    color: #93c5fd;
}

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

.sidebar-link.active {
    background: var(--brand);
    color: #fff;
    box-shadow: 0 8px 16px rgba(29, 78, 216, 0.28);
}

.sidebar-link.active i {
    color: #fff;
}

.sidebar-footer {
    padding: 0.9rem 0.65rem 1.15rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.main-wrap {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left 0.2s ease;
    display: flex;
    flex-direction: column;
}

.topbar {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    padding: 0.7rem 1.4rem;
    position: sticky;
    top: 0;
    z-index: 1020;
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.content-area {
    padding: 1.6rem;
    flex: 1;
}

.content-area > .container-fluid {
    max-width: 1500px;
}

.page-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--navy);
    margin: 0;
}

.page-subtitle {
    color: var(--muted);
    font-size: 0.85rem;
    margin: 0.1rem 0 0;
}

.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--sky);
    color: var(--brand-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.82rem;
    flex: 0 0 auto;
}

.avatar-circle.lg {
    width: 74px;
    height: 74px;
    font-size: 1.35rem;
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.55);
    z-index: 1035;
}

body.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed);
}

body.sidebar-collapsed .main-wrap {
    margin-left: var(--sidebar-collapsed);
}

body.sidebar-collapsed .sidebar-brand .brand-text,
body.sidebar-collapsed .sidebar-link span,
body.sidebar-collapsed .sidebar-section,
body.sidebar-collapsed .sidebar-footer span {
    display: none;
}

body.sidebar-collapsed .sidebar-link {
    justify-content: center;
    padding: 0.72rem;
}

body.sidebar-collapsed .sidebar-brand {
    justify-content: center;
    padding: 1.1rem 0.5rem;
}

/* ---------- Stepper ---------- */
.stepper {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.35rem;
    scrollbar-width: thin;
}

.stepper-item {
    flex: 1 0 130px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0.65rem 0.75rem;
    font-size: 0.76rem;
    color: var(--muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stepper-item .num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #eef2f7;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    flex: 0 0 auto;
}

.stepper-item.done {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #15803d;
}

.stepper-item.done .num {
    background: #16a34a;
    color: #fff;
}

.stepper-item.active {
    border-color: var(--brand);
    background: #eff5ff;
    color: var(--brand-dark);
    box-shadow: 0 6px 14px rgba(29, 78, 216, 0.12);
}

.stepper-item.active .num {
    background: var(--brand);
    color: #fff;
}

/* ---------- Tables ---------- */
.table {
    --bs-table-border-color: #eef2f7;
    margin-bottom: 0;
    font-size: 0.87rem;
}

.table > :not(caption) > * > * {
    padding: 0.78rem 0.8rem;
    vertical-align: middle;
}

.table thead th {
    background: #f8fafc;
    color: #475569;
    font-size: 0.73rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

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

.table-actions {
    display: inline-flex;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.applicants-table {
    font-size: 0.83rem;
}

.applicants-table > :not(caption) > * > * {
    padding: 0.62rem 0.55rem;
}

.applicants-table th:first-child,
.applicants-table td:first-child {
    padding-left: 0.9rem;
}

.applicants-table th:last-child,
.applicants-table td:last-child {
    position: sticky;
    right: 0;
    z-index: 1;
    background: #fff;
    padding-right: 0.9rem;
    box-shadow: -10px 0 14px -14px rgba(15, 23, 42, 0.55);
}

.applicants-table thead th:last-child {
    background: #f8fafc;
    z-index: 2;
}

.applicants-table tbody tr:hover td:last-child {
    background: #f8fbff;
}

.applicants-table .table-actions {
    flex-wrap: nowrap;
}

.applicants-table .table-actions form {
    display: inline-flex;
    margin: 0;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--muted);
}

.empty-state i {
    font-size: 2.6rem;
    color: #cbd5e1;
    display: block;
    margin-bottom: 0.7rem;
}

.pagination {
    --bs-pagination-border-radius: 10px;
    --bs-pagination-color: var(--brand);
    --bs-pagination-active-bg: var(--brand);
    --bs-pagination-active-border-color: var(--brand);
    font-size: 0.84rem;
}

.pagination .page-link {
    border-radius: 9px !important;
    margin: 0 0.12rem;
    border-color: var(--line);
}

/* ---------- Documents / misc ---------- */
.doc-item {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    justify-content: space-between;
    padding: 0.9rem 0;
    border-bottom: 1px dashed var(--line);
}

.doc-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.doc-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #eff5ff;
    color: var(--brand);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex: 0 0 auto;
}

.upload-drop {
    border: 1.5px dashed #cbd5e1;
    border-radius: 14px;
    padding: 1rem;
    background: #fbfdff;
}

.upload-drop:hover {
    border-color: var(--brand);
}

.toast-flash {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1090;
    max-width: min(420px, calc(100vw - 2rem));
    box-shadow: var(--shadow);
    border: 0;
}

.summary-box {
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 1rem;
}

.summary-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    font-weight: 700;
    margin-bottom: 0.15rem;
}

.summary-value {
    font-weight: 600;
    color: #1e293b;
    word-break: break-word;
}

.meta-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.9rem;
}

.page-item.disabled .page-link {
    color: #94a3b8;
}

.nav-tabs {
    border-bottom: 1px solid var(--line);
    gap: 0.3rem;
}

.nav-tabs .nav-link {
    border: 0;
    border-radius: 10px;
    color: #475569;
    font-weight: 600;
    font-size: 0.86rem;
    padding: 0.6rem 0.9rem;
}

.nav-tabs .nav-link.active {
    background: var(--brand);
    color: #fff;
}

.chart-box {
    position: relative;
    min-height: 260px;
}

.chart-box canvas {
    max-height: 280px;
}

.hover-bg:hover {
    background: #f8fbff;
}

.faq-accordion .accordion-item {
    border: 1px solid var(--line);
    border-radius: 14px !important;
    margin-bottom: 0.7rem;
    overflow: hidden;
}

.faq-accordion .accordion-button {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--navy);
    background: #fff;
}

.faq-accordion .accordion-button:not(.collapsed) {
    background: #eff5ff;
    color: var(--brand-dark);
}

.faq-accordion .accordion-button:focus {
    box-shadow: none;
}

.footer-public {
    background: #07172e;
    color: #94a3b8;
    padding: 3rem 0 1.5rem;
}

.footer-public h6 {
    color: #fff;
    font-weight: 700;
}

.footer-public a {
    color: #cbd5e1;
}

.footer-public a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 2rem;
    padding-top: 1.25rem;
    font-size: 0.8rem;
}

.mobile-bottom-nav {
    display: none;
}

/* ---------- Print ---------- */
.print-page {
    background: #e9eef5;
    color: #111;
    font-size: 11.5pt;
}

.print-sheet {
    max-width: 210mm;
    margin: 0 auto;
    background: #fff;
    padding: 14mm 16mm;
    min-height: 297mm;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 6px;
    box-shadow: 0 28px 70px -38px rgba(15, 23, 42, 0.45);
}

.print-header {
    display: flex;
    align-items: center;
    gap: 18px;
    border-bottom: 3px double #111;
    padding-bottom: 12px;
    margin-bottom: 18px;
}

.print-header img {
    width: 72px;
    height: 72px;
    object-fit: contain;
}

.print-header h1 {
    font-size: 17pt;
    font-weight: 800;
    margin: 0;
    letter-spacing: 0.02em;
}

.print-header p {
    margin: 2px 0;
    font-size: 9pt;
    line-height: 1.35;
}

.print-title {
    text-align: center;
    font-weight: 800;
    font-size: 14pt;
    text-decoration: underline;
    margin: 18px 0 4px;
}

.print-subtitle {
    text-align: center;
    font-size: 9.5pt;
    margin-bottom: 18px;
}

.print-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 9.6pt;
}

.print-table th,
.print-table td {
    border: 1px solid #64748b;
    padding: 6px 8px;
    vertical-align: top;
}

.print-table th {
    background: #f1f5f9;
    text-align: left;
}

.print-table td.label {
    width: 32%;
    background: #f8fafc;
    font-weight: 600;
}

.print-footer {
    margin-top: 28px;
    display: flex;
    justify-content: space-between;
    gap: 30px;
    font-size: 9.5pt;
}

.signature {
    width: 46%;
    text-align: center;
    padding-top: 8px;
}

.signature .space {
    height: 64px;
}

.print-note {
    font-size: 8.8pt;
    color: #475569;
    margin-top: 14px;
}

/* ---------- Official print form ---------- */
.official-doc {
    --official-ink: #0f172a;
    --official-muted: #475569;
    --official-line: #cbd5e1;
    --official-soft: #f8fafc;
    color: var(--official-ink);
    font-size: 8.7pt;
    line-height: 1.42;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.official-doc * {
    box-sizing: border-box;
}

.official-topline {
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(90deg, #0f172a 0%, var(--official-accent) 58%, #38bdf8 100%);
    margin-bottom: 10px;
}

.official-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 9px;
    border-bottom: 2px solid var(--official-ink);
}

.official-brand {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
}

.official-logo {
    width: 64px;
    height: 64px;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border: 1px solid #dbe3ef;
    border-radius: 14px;
    background: #fff;
}

.official-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.official-logo-fallback {
    display: none;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--official-accent);
    font-size: 1.55rem;
}

.official-brand-text {
    min-width: 0;
}

.official-eyebrow {
    color: var(--official-accent);
    font-size: 6.8pt;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.official-brand h1 {
    margin: 2px 0 3px;
    font-size: 15pt;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.official-school-meta {
    color: #334155;
    font-size: 7.7pt;
    font-weight: 700;
}

.official-school-contact {
    margin-top: 2px;
    color: var(--official-muted);
    font-size: 7.1pt;
    line-height: 1.35;
}

.official-doc-code {
    min-width: 112px;
    padding: 7px 9px;
    text-align: right;
    border: 1px solid var(--official-line);
    border-radius: 11px;
    background: var(--official-soft);
    flex: 0 0 auto;
}

.official-doc-code-label {
    color: #64748b;
    font-size: 6.3pt;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.official-doc-code-value {
    font-size: 8.8pt;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.official-doc-code-year {
    color: #475569;
    font-size: 6.8pt;
}

.official-title-band {
    margin: 6px 0 5px;
    padding: 7px 11px;
    text-align: center;
    border: 1px solid #c7d7f5;
    border-left: 5px solid var(--official-accent);
    border-radius: 9px;
    background: linear-gradient(135deg, #f8fbff 0%, #eef4ff 100%);
}

.official-title {
    font-size: 11.6pt;
    font-weight: 800;
    letter-spacing: 0.075em;
    text-transform: uppercase;
}

.official-subtitle {
    margin-top: 1px;
    color: #334155;
    font-size: 8pt;
}

.official-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 5px;
}

.official-meta-item {
    min-width: 0;
    padding: 5px 7px;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: #fff;
}

.official-meta-item span {
    display: block;
    color: #64748b;
    font-size: 6.3pt;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.official-meta-item strong {
    display: block;
    margin-top: 1px;
    font-size: 8.3pt;
    overflow-wrap: anywhere;
}

.official-meta-item--status {
    background: var(--official-soft);
}

.official-status {
    display: inline-block;
    padding: 1px 7px;
    border: 1px solid #94a3b8;
    border-radius: 999px;
    font-size: 7.1pt;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.official-status.is-success {
    border-color: #86efac;
    background: #f0fdf4;
    color: #166534;
}

.official-status.is-info {
    border-color: #93c5fd;
    background: #eff6ff;
    color: #1e40af;
}

.official-status.is-warning {
    border-color: #fcd34d;
    background: #fffbeb;
    color: #92400e;
}

.official-status.is-danger {
    border-color: #fca5a5;
    background: #fef2f2;
    color: #991b1b;
}

.official-status.is-neutral {
    border-color: #cbd5e1;
    background: #f8fafc;
    color: #334155;
}

.official-section {
    margin-top: 2px;
    break-inside: avoid;
    page-break-inside: avoid;
}

.official-section-head {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.official-section-number {
    width: 17px;
    height: 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 5px;
    background: var(--official-accent);
    color: #fff;
    font-size: 7.2pt;
    font-weight: 800;
}

.official-section-head h2 {
    margin: 0;
    font-size: 8.7pt;
    font-weight: 800;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.official-personal-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 28mm;
    gap: 7px;
    align-items: start;
}

.official-photo {
    text-align: center;
}

.official-photo-label {
    margin-bottom: 3px;
    color: #334155;
    font-size: 6.5pt;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.official-photo-frame {
    height: 37mm;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px dashed #94a3b8;
    border-radius: 6px;
    background: #f8fafc;
    color: #94a3b8;
    font-size: 7pt;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.official-photo-frame.is-filled {
    border-style: solid;
    border-color: #cbd5e1;
    background: #fff;
}

.official-photo-frame img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center top;
    border-radius: 5px;
}

.official-photo-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    color: #94a3b8;
    font-size: 6.2pt;
    letter-spacing: 0.04em;
    text-transform: none;
}

.official-photo-note {
    margin-top: 3px;
    color: #64748b;
    font-size: 6.2pt;
    line-height: 1.25;
}

.official-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 8.1pt;
    line-height: 1.38;
}

.official-table th,
.official-table td {
    padding: 3px 5px;
    border: 1px solid var(--official-line);
    vertical-align: top;
    overflow-wrap: anywhere;
}

.official-table th {
    background: #f1f5f9;
    color: #334155;
    font-weight: 700;
    text-align: left;
}

.official-table tbody th {
    background: #f8fafc;
}

.official-table thead th {
    background: #eef2f7;
    color: #1e293b;
    font-size: 7.6pt;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.official-table td {
    background: #fff;
}

.official-table--personal th,
.official-table--personal td {
    padding-top: 3px;
    padding-bottom: 3px;
}

.official-multiline {
    white-space: pre-line;
}

.official-statement {
    margin-top: 4px;
    break-inside: avoid;
    page-break-inside: avoid;
}

.official-statement p {
    margin: 3px 0 0;
    padding: 4px 8px;
    border: 1px solid #dbe3ef;
    border-radius: 7px;
    background: #f8fafc;
    font-size: 8pt;
    line-height: 1.48;
    text-align: justify;
}

.official-signatures {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 2px;
    break-inside: avoid;
    page-break-inside: avoid;
}

.official-signature {
    text-align: center;
    font-size: 8.1pt;
}

.official-signature-place {
    min-height: 20px;
    line-height: 1.35;
}

.official-signature-role {
    font-weight: 700;
}

.official-signature-space {
    height: 28px;
}

.official-signature-line {
    width: 76%;
    margin: 0 auto;
    border-top: 1px solid var(--official-ink);
}

.official-signature-name {
    margin-top: 3px;
    font-weight: 800;
}

.official-signature-nisn {
    color: #475569;
    font-size: 7pt;
}

.official-footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 3px;
    padding-top: 4px;
    border-top: 1px solid var(--official-line);
    color: #64748b;
    font-size: 6.4pt;
}

.proof-title-band {
    margin-top: 5px;
}

.proof-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 58mm;
    gap: 10px;
    margin: 6px 0;
    padding: 9px 11px;
    border: 1px solid #1e3a8a;
    border-radius: 10px;
    background:
        radial-gradient(circle at 100% 0%, rgba(56, 189, 248, 0.32), transparent 42%),
        linear-gradient(135deg, #0f172a 0%, #1e3a8a 66%, var(--official-accent) 145%);
    color: #fff;
    break-inside: avoid;
    page-break-inside: avoid;
}

.proof-hero-main {
    min-width: 0;
}

.proof-hero-label {
    color: rgba(255, 255, 255, 0.72);
    font-size: 6.4pt;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.proof-hero-number {
    margin-top: 1px;
    font-size: 18pt;
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: 0.02em;
    overflow-wrap: anywhere;
}

.proof-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 3px 12px;
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 7pt;
}

.proof-hero-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.proof-hero-status {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    padding-left: 10px;
    border-left: 1px solid rgba(255, 255, 255, 0.24);
}

.proof-hero-status .official-status {
    align-self: flex-start;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.proof-hero-status-note {
    color: rgba(255, 255, 255, 0.72);
    font-size: 6.2pt;
    line-height: 1.35;
}

.proof-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 30mm;
    gap: 8px;
    align-items: start;
    break-inside: avoid;
    page-break-inside: avoid;
}

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

.proof-side {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.proof-side .official-photo-frame {
    height: 40mm;
}

.proof-verify {
    padding: 7px;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: #f8fafc;
    text-align: center;
}

.proof-verify-icon {
    color: #15803d;
    font-size: 1.35rem;
    line-height: 1;
}

.proof-verify-title {
    margin-top: 2px;
    font-size: 7.2pt;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.proof-verify p {
    margin: 3px 0 5px;
    color: #475569;
    font-size: 6.3pt;
    line-height: 1.35;
    text-align: left;
}

.proof-verify-row {
    display: flex;
    justify-content: space-between;
    gap: 4px;
    padding-top: 3px;
    border-top: 1px dashed #cbd5e1;
    font-size: 6.2pt;
    text-align: left;
}

.proof-verify-row span {
    color: #64748b;
}

.proof-verify-row strong {
    text-align: right;
    overflow-wrap: anywhere;
}

.proof-note {
    margin-top: 5px;
    padding: 5px 8px;
    border: 1px solid #dbe3ef;
    border-left: 4px solid var(--official-accent);
    border-radius: 7px;
    background: #f8fbff;
    color: #334155;
    font-size: 7.2pt;
    line-height: 1.45;
}

.proof-note strong {
    color: #0f172a;
}

.proof-doc .official-signatures {
    margin-top: 6px;
}

.proof-doc .official-footer {
    margin-top: 4px;
}

.print-toolbar {
    position: sticky;
    top: 0;
    z-index: 20;
    max-width: 210mm;
    margin: 0 auto 12px;
    padding: 10px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: rgba(233, 238, 245, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.print-toolbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.print-toolbar-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d8e1ee;
    border-radius: 10px;
    background: #fff;
    color: var(--brand);
    font-size: 1.05rem;
    flex: 0 0 auto;
}

.print-toolbar-brand strong {
    display: block;
    font-size: 0.82rem;
    line-height: 1.2;
}

.print-toolbar-brand small {
    display: block;
    color: #64748b;
    font-size: 0.68rem;
    line-height: 1.2;
    margin-top: 1px;
}

.print-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.print-toolbar .btn {
    padding: 0.5rem 0.95rem;
    font-size: 0.8rem;
}

@page {
    size: A4;
    margin: 9mm 12mm;
}

@media print {
    body.print-page {
        background: #fff;
    }

    .print-sheet {
        max-width: none;
        padding: 0;
        min-height: 0;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .no-print {
        display: none !important;
    }

    a[href]::after {
        content: "";
    }

    .print-table {
        page-break-inside: auto;
    }

    tr {
        page-break-inside: avoid;
    }

    .official-doc {
        font-size: 8.4pt;
    }

    .official-doc,
    .official-doc * {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .official-section,
    .official-statement,
    .official-signatures {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .official-table tr {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* ---------- Responsive ---------- */
@media (max-width: 1199.98px) {
    :root {
        --sidebar-width: 250px;
    }
}

@media (max-width: 991.98px) {
    .public-nav .navbar-brand {
        flex: 1 1 auto;
        min-width: 0;
        max-width: calc(100% - 62px);
        gap: 0.6rem;
    }

    .public-nav .navbar-brand > span {
        min-width: 0;
    }

    .public-nav .brand-logo {
        width: 40px;
        height: 40px;
        flex: 0 0 auto;
    }

    .public-nav .brand-title,
    .public-nav .brand-sub {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .public-nav .navbar-toggler {
        flex: 0 0 auto;
        margin-left: auto;
    }

    .public-nav .navbar-collapse {
        flex-basis: 100%;
        width: 100%;
        margin-top: 0.6rem;
        padding: 0.75rem;
        background: #fff;
        border: 1px solid var(--line);
        border-radius: 14px;
        box-shadow: var(--shadow-sm);
    }

    .public-nav .navbar-nav {
        width: 100%;
    }

    .public-nav .nav-link {
        padding: 0.65rem 0.8rem !important;
    }

    .public-nav .navbar-collapse .btn,
    .public-nav .navbar-collapse .btn-link {
        width: 100%;
        justify-content: center;
        margin: 0 !important;
        padding: 0.6rem 0.9rem;
        text-align: center;
    }

    .public-nav .navbar-collapse .gap-2 {
        gap: 0.5rem !important;
    }

    .hero {
        padding: 3.5rem 0 4rem;
    }

    .auth-side {
        display: none;
    }

    .section {
        padding: 3.25rem 0;
    }

    .step-flow {
        grid-template-columns: 1fr;
    }

    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width) !important;
        box-shadow: 30px 0 60px rgba(2, 6, 23, 0.3);
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    body.sidebar-open .sidebar-backdrop {
        display: block;
    }

    .main-wrap,
    body.sidebar-collapsed .main-wrap {
        margin-left: 0;
    }

    body.sidebar-collapsed .sidebar-brand .brand-text,
    body.sidebar-collapsed .sidebar-link span,
    body.sidebar-collapsed .sidebar-section,
    body.sidebar-collapsed .sidebar-footer span {
        display: inline;
    }

    body.sidebar-collapsed .sidebar-link {
        justify-content: flex-start;
        padding: 0.65rem 0.8rem;
    }

    .content-area {
        padding: 1.15rem;
    }

    .topbar {
        padding: 0.65rem 1rem;
    }
}

@media (max-width: 767.98px) {
    .public-nav .brand-title {
        font-size: 0.92rem;
    }

    .public-nav .brand-sub {
        font-size: 0.64rem;
    }

    .hero {
        padding: 2.75rem 0 3.25rem;
    }

    .hero-panel {
        margin-top: 1.5rem;
        padding: 1.15rem;
    }

    .auth-card {
        padding: 1.35rem;
        border-radius: 18px;
    }

    .page-title {
        font-size: 1.15rem;
    }

    .content-area {
        padding: 1rem 0.8rem 2rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-card .stat-value {
        font-size: 1.45rem;
    }

    .table-responsive {
        -webkit-overflow-scrolling: touch;
    }

    .table {
        font-size: 0.8rem;
    }

    .table > :not(caption) > * > * {
        padding: 0.6rem 0.55rem;
    }

    .table thead th {
        font-size: 0.66rem;
        letter-spacing: 0.03em;
    }

    .table-actions {
        flex-wrap: nowrap;
    }

    .stepper {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.4rem;
        overflow: visible;
        padding-bottom: 0;
    }

    .stepper-item {
        flex: none;
        min-width: 0;
        padding: 0.55rem 0.6rem;
        font-size: 0.7rem;
    }

    .stepper-item > span:last-child {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #fff;
        border-top: 1px solid var(--line);
        z-index: 1030;
        padding: 0.3rem 0.4rem calc(0.3rem + env(safe-area-inset-bottom));
        justify-content: space-around;
        box-shadow: 0 -8px 20px rgba(15, 35, 70, 0.06);
    }

    .mobile-bottom-nav a {
        font-size: 0.65rem;
        color: #64748b;
        text-align: center;
        padding: 0.35rem 0.5rem;
        border-radius: 10px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.1rem;
        min-width: 58px;
    }

    .mobile-bottom-nav a i {
        font-size: 1.1rem;
    }

    .mobile-bottom-nav a.active {
        color: var(--brand);
        background: #eff5ff;
    }

    body.has-mobile-nav .content-area {
        padding-bottom: 5.2rem;
    }
}

@media (max-width: 575.98px) {
    .btn {
        padding: 0.6rem 0.95rem;
    }

    .btn-lg {
        padding: 0.75rem 1.1rem;
    }

    .stepper {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stepper-item {
        padding: 0.5rem 0.55rem;
        gap: 0.4rem;
        font-size: 0.66rem;
    }

    .stepper-item .num {
        width: 20px;
        height: 20px;
        font-size: 0.62rem;
    }

    .card-body {
        padding: 0.9rem;
    }

    .card-header {
        padding: 0.75rem 0.9rem;
        font-size: 0.84rem;
    }

    .form-label {
        font-size: 0.8rem;
        margin-bottom: 0.3rem;
    }

    .form-control,
    .form-select {
        font-size: 0.88rem;
        padding: 0.5rem 0.7rem;
    }

    textarea.form-control {
        min-height: 72px;
    }

    form .card-body {
        padding: 0.9rem;
    }

    form .card-body.border-top {
        padding: 0.8rem 0.9rem;
        flex-direction: column-reverse;
        align-items: stretch;
    }

    form .card-body.border-top .btn {
        width: 100%;
        justify-content: center;
    }

    .table {
        font-size: 0.75rem;
    }

    .table > :not(caption) > * > * {
        padding: 0.5rem 0.45rem;
    }

    .table .btn-sm {
        padding: 0.28rem 0.5rem;
        font-size: 0.72rem;
    }

    .pagination {
        font-size: 0.76rem;
    }

    .pagination .page-link {
        margin: 0;
        padding: 0.35rem 0.55rem;
    }

    .hero .eyebrow {
        font-size: 0.7rem;
    }

    .toast-flash {
        top: auto;
        bottom: 4.6rem;
        right: 0.7rem;
        left: 0.7rem;
        max-width: none;
    }

    .print-sheet {
        padding: 6mm 4mm;
    }

    .print-header {
        gap: 10px;
    }

    .print-header img {
        width: 54px;
        height: 54px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

.maintenance-page {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    align-items: center;
    align-items: safe center;
    justify-items: center;
    overflow-x: hidden;
    overflow-x: clip;
    padding: clamp(1.25rem, 4vw, 3rem) 1rem;
    background:
        radial-gradient(circle at 12% 18%, rgba(34, 211, 238, 0.18), transparent 34%),
        radial-gradient(circle at 88% 82%, rgba(37, 99, 235, 0.28), transparent 38%),
        linear-gradient(135deg, #020617 0%, #0f172a 48%, #1e3a8a 100%);
}

.maintenance-decor {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.maintenance-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 46px 46px;
    opacity: 0.55;
    -webkit-mask-image: radial-gradient(circle at center, #000 15%, transparent 78%);
    mask-image: radial-gradient(circle at center, #000 15%, transparent 78%);
}

.maintenance-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(6px);
}

.maintenance-glow-a {
    width: 420px;
    height: 420px;
    top: -180px;
    right: -120px;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.2), transparent 70%);
}

.maintenance-glow-b {
    width: 520px;
    height: 520px;
    bottom: -280px;
    left: -180px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.24), transparent 70%);
}

.maintenance-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 720px;
}

.maintenance-card {
    position: relative;
    overflow: hidden;
    padding: clamp(1.4rem, 4vw, 2.8rem);
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 50px 120px -40px rgba(2, 6, 23, 0.85);
}

.maintenance-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 6px;
    background: linear-gradient(90deg, var(--brand), #22d3ee, #f59e0b);
}

.maintenance-brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.1rem;
    border-bottom: 1px solid #e5e7eb;
}

.maintenance-brand img {
    width: 54px;
    height: 54px;
    flex: 0 0 auto;
    object-fit: contain;
    padding: 4px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
}

.maintenance-brand-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.maintenance-brand-name {
    color: var(--navy);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.maintenance-brand-meta {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.maintenance-visual {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.maintenance-icon {
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 18px;
    background: linear-gradient(135deg, #fff7ed, #fde68a);
    color: #b45309;
    font-size: 1.7rem;
    box-shadow: 0 18px 30px -20px rgba(180, 83, 9, 0.65);
}

.maintenance-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    max-width: 100%;
    padding: 0.38rem 0.75rem;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.maintenance-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.16);
    animation: maintenance-pulse 2s ease-in-out infinite;
}

@keyframes maintenance-pulse {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.28);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
    }
}

.maintenance-card h1 {
    margin: 0 0 0.65rem;
    color: var(--navy);
    font-size: clamp(1.55rem, 3.2vw, 2.15rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.maintenance-lead {
    max-width: 56ch;
    margin-bottom: 1.4rem;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

.maintenance-info {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.4rem;
}

.maintenance-info-item {
    display: flex;
    gap: 0.7rem;
    min-width: 0;
    padding: 0.9rem;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #f8fafc;
}

.maintenance-info-item > div {
    min-width: 0;
}

.maintenance-info-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 10px;
    background: #ecfdf5;
    color: #047857;
    font-size: 1rem;
}

.maintenance-info-item strong {
    display: block;
    margin-bottom: 0.15rem;
    color: #0f172a;
    font-size: 0.82rem;
    overflow-wrap: anywhere;
}

.maintenance-info-item p {
    margin: 0;
    color: #64748b;
    font-size: 0.76rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.maintenance-contact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    background: linear-gradient(135deg, #eff6ff, #f8fafc);
}

.maintenance-contact-copy {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.maintenance-contact-label {
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.maintenance-contact-copy strong {
    color: #0f172a;
    font-size: 0.86rem;
    overflow-wrap: anywhere;
}

.maintenance-contact-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.45rem;
    min-width: 0;
}

.maintenance-contact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    max-width: 100%;
    padding: 0.42rem 0.7rem;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    background: #fff;
    color: #1d4ed8;
    font-size: 0.76rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.maintenance-contact-link:hover {
    background: #dbeafe;
    color: #1e40af;
}

.maintenance-footer {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    color: #94a3b8;
    font-size: 0.72rem;
}

.maintenance-footer span {
    overflow-wrap: anywhere;
}

@media (max-width: 575.98px) {
    .maintenance-page {
        padding: 1rem 0.75rem;
    }

    .maintenance-card {
        padding: 1.25rem;
        border-radius: 22px;
    }

    .maintenance-brand {
        gap: 0.7rem;
    }

    .maintenance-brand img {
        width: 46px;
        height: 46px;
    }

    .maintenance-info {
        grid-template-columns: 1fr;
    }

    .maintenance-contact {
        align-items: flex-start;
        flex-direction: column;
    }

    .maintenance-contact-links {
        justify-content: flex-start;
    }

    .maintenance-footer {
        flex-direction: column;
    }
}

@media (min-width: 576px) and (max-height: 860px) {
    .maintenance-page {
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }

    .maintenance-card {
        padding: 1.5rem 2rem;
    }

    .maintenance-brand {
        margin-bottom: 1rem;
        padding-bottom: 0.85rem;
    }

    .maintenance-icon {
        width: 50px;
        height: 50px;
        font-size: 1.45rem;
    }

    .maintenance-visual {
        margin-bottom: 0.8rem;
    }

    .maintenance-card h1 {
        font-size: clamp(1.45rem, 2.8vw, 1.9rem);
    }

    .maintenance-lead {
        margin-bottom: 1rem;
        line-height: 1.55;
    }

    .maintenance-info {
        margin-bottom: 1rem;
        gap: 0.6rem;
    }

    .maintenance-info-item {
        padding: 0.75rem;
    }

    .maintenance-contact {
        padding: 0.8rem;
    }

    .maintenance-footer {
        margin-top: 1rem;
        padding-top: 0.8rem;
    }
}

.error-page {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 62vh;
    padding: clamp(3rem, 7vw, 6rem) 0;
    overflow: hidden;
    background:
        radial-gradient(circle at 12% 18%, rgba(37, 99, 235, 0.12), transparent 34%),
        radial-gradient(circle at 88% 12%, rgba(34, 211, 238, 0.16), transparent 32%),
        linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
}

.error-page::before,
.error-page::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.error-page::before {
    width: 280px;
    height: 280px;
    left: -120px;
    bottom: -140px;
    background: rgba(37, 99, 235, 0.08);
}

.error-page::after {
    width: 220px;
    height: 220px;
    right: -80px;
    top: -100px;
    background: rgba(34, 211, 238, 0.1);
}

.error-page .error-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: clamp(2rem, 5vw, 3.5rem);
    text-align: center;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 28px;
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(10px);
}

.error-page .error-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.error-page .error-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: var(--sky);
    color: var(--brand);
    font-size: 1.8rem;
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.12);
}

.error-page .error-code {
    font-size: clamp(4rem, 10vw, 6.5rem);
    font-weight: 800;
    line-height: 0.85;
    letter-spacing: -0.06em;
    color: var(--brand);
}

.error-page .error-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    margin-bottom: 1rem;
    border-radius: 999px;
    background: var(--sky);
    color: var(--brand-dark);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.error-page .error-card h1 {
    font-size: clamp(1.6rem, 4vw, 2.35rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 0.75rem;
}

.error-page .error-card p {
    max-width: 48ch;
    margin: 0 auto 1.75rem;
    color: var(--muted);
    line-height: 1.7;
}

.error-page .error-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.error-page .error-help {
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px dashed var(--line);
    color: var(--muted);
    font-size: 0.85rem;
}

.error-page .error-help a {
    color: var(--brand);
    font-weight: 700;
}

.error-page.error-tone-danger .error-code {
    color: #dc2626;
}

.error-page.error-tone-danger .error-icon {
    background: #fef2f2;
    color: #dc2626;
    box-shadow: inset 0 0 0 1px rgba(220, 38, 38, 0.12);
}

.error-page.error-tone-danger .error-eyebrow {
    background: #fef2f2;
    color: #b91c1c;
}

.error-page.error-tone-warning .error-code {
    color: #d97706;
}

.error-page.error-tone-warning .error-icon {
    background: #fffbeb;
    color: #d97706;
    box-shadow: inset 0 0 0 1px rgba(217, 119, 6, 0.12);
}

.error-page.error-tone-warning .error-eyebrow {
    background: #fffbeb;
    color: #b45309;
}

.error-page .error-debug {
    max-width: 100%;
}

@media (max-width: 575.98px) {
    .error-page {
        min-height: auto;
        padding: 2.5rem 0;
    }

    .error-page .error-card {
        padding: 1.5rem;
        border-radius: 22px;
    }

    .error-page .error-visual {
        gap: 0.75rem;
    }

    .error-page .error-icon {
        width: 54px;
        height: 54px;
        border-radius: 16px;
        font-size: 1.5rem;
    }

    .error-page .error-code {
        font-size: 4.5rem;
    }

    .error-page .error-actions .btn {
        width: 100%;
    }
}

.public-page {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overflow-x: clip;
}

.public-page main,
.public-page main > section,
.public-page .container,
.public-page .row,
.public-page .row > *,
.public-page .card,
.public-page .card-body,
.public-page .card-header {
    min-width: 0;
}

.public-page img {
    max-width: 100%;
}

.public-page h1,
.public-page h2,
.public-page h3,
.public-page h5,
.public-page p,
.public-page .hero-date strong,
.public-page .announcement-item a {
    overflow-wrap: break-word;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 0.5rem;
}

.hero-actions .btn {
    max-width: 100%;
}

.hero-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    max-width: 100%;
}

.hero-trust > span {
    display: inline-flex;
    align-items: flex-start;
    gap: 0.35rem;
    min-width: 0;
}

.hero-trust > span > i {
    flex: 0 0 auto;
    margin-top: 0.1rem;
}

.announcement-item > div:last-child {
    min-width: 0;
}

.announcement-body {
    overflow-wrap: anywhere;
}

.public-page .footer-public .row > *,
.public-page .footer-public .container,
.public-page .footer-bottom {
    min-width: 0;
}

.public-page .footer-public a,
.public-page .footer-public li,
.public-page .footer-public p,
.public-page .footer-bottom span {
    overflow-wrap: anywhere;
}

.public-page .error-page > .container,
.public-page .error-page .error-card,
.public-page .error-page .error-card h1,
.public-page .error-page .error-card p,
.public-page .error-page .error-help {
    min-width: 0;
    overflow-wrap: anywhere;
}

/* ---------- Public page mobile polish ---------- */
@media (max-width: 991.98px) {
    .hero-row {
        --bs-gutter-y: 2rem;
    }

    .hero-panel-col {
        margin-top: 0;
    }
}

@media (max-width: 767.98px) {
    .public-nav {
        padding-top: 0.45rem !important;
        padding-bottom: 0.45rem !important;
    }

    .public-nav .brand-logo {
        width: 38px;
        height: 38px;
    }

    .public-nav .navbar-brand {
        max-width: calc(100% - 58px);
    }

    .public-nav .brand-title {
        font-size: 0.88rem;
    }

    .public-nav .brand-sub {
        font-size: 0.62rem;
    }

    .hero {
        padding: 2.25rem 0 2.75rem;
    }

    .hero h1 {
        font-size: clamp(1.8rem, 4.9vw, 2.35rem);
        line-height: 1.14;
        letter-spacing: -0.02em;
    }

    .hero .lead {
        margin-top: 0.9rem !important;
        font-size: 0.97rem;
        line-height: 1.6;
    }

    .hero .eyebrow {
        padding: 0.38rem 0.7rem;
        font-size: 0.7rem;
    }

    .hero-actions {
        margin-top: 1.35rem !important;
    }

    .hero-actions .btn-lg {
        padding: 0.78rem 1.15rem;
        font-size: 1rem;
    }

    .hero-trust {
        margin-top: 1.35rem !important;
        gap: 0.55rem 1rem;
        font-size: 0.8rem;
    }

    .hero-panel {
        margin-top: 0;
        padding: 1.15rem;
        border-radius: 20px;
    }

    .hero-panel .status-line {
        padding-bottom: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .hero-date {
        font-size: 0.8rem;
    }

    .section {
        padding: 2.6rem 0;
    }

    .section-title {
        font-size: clamp(1.4rem, 5vw, 1.9rem);
    }

    .card-header {
        padding: 0.85rem 1rem;
        font-size: 0.9rem;
    }

    .announcement-item {
        gap: 0.8rem;
    }

    .footer-public {
        padding-top: 2.25rem;
    }
}

@media (max-width: 575.98px) {
    .row.g-5 {
        --bs-gutter-x: 1.5rem;
        --bs-gutter-y: 2rem;
    }

    .hero {
        padding: 1.9rem 0 2.4rem;
    }

    .hero h1 {
        font-size: 1.72rem;
        line-height: 1.16;
    }

    .hero .lead {
        font-size: 0.92rem;
    }

    .hero-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 0.55rem;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
        text-align: center;
        white-space: normal;
    }

    .hero-trust {
        flex-direction: column;
        gap: 0.45rem;
        padding-top: 0.35rem !important;
    }

    .hero-panel {
        padding: 1rem;
        border-radius: 18px;
    }

    .hero-panel .status-line {
        align-items: flex-start;
    }

    .hero-date {
        display: grid;
        grid-template-columns: minmax(0, auto) minmax(0, 1fr);
        align-items: baseline;
        gap: 0.5rem;
    }

    .hero-date strong {
        margin-left: 0;
    }

    .public-nav .brand-title {
        font-size: 0.84rem;
    }

    .public-nav .brand-sub {
        font-size: 0.6rem;
    }

    .announcement-item .date-chip {
        width: 50px;
    }

    .public-page .card-body .d-flex.justify-content-between {
        flex-wrap: wrap;
    }

    .public-page .card .badge {
        max-width: 100%;
        white-space: normal;
        text-align: left;
    }

    .step-flow-item {
        padding: 0.95rem;
    }

    .footer-public .row > .col-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

@media (max-width: 379.98px) {
    .hero h1 {
        font-size: 1.6rem;
    }

    .public-nav .brand-title {
        font-size: 0.8rem;
    }

    .public-nav .brand-sub {
        font-size: 0.56rem;
    }
}
