/* Scholarship 2026 */
:root {
    --navy: #0b2a5b;
    --blue: #1d4f9c;
    --orange: #f97316;
    --ink: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
    --bg-soft: #f8fafc;
    --success: #16a34a;
    --error: #dc2626;
    --warning: #d97706;
    --info: #2563eb;
    --radius: 14px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--ink);
    background: linear-gradient(160deg, var(--navy) 0%, var(--blue) 55%, #2b6cc4 100%) fixed;
    line-height: 1.5;
}

.shell { max-width: 680px; margin: 0 auto; padding: 24px 16px 32px; }

/* Brand header */
.brand { text-align: center; color: #fff; margin-bottom: 18px; }
.brand-logo {
    width: 180px; height: auto; max-width: 60%;
    background: #fff; border-radius: 12px; padding: 8px 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
}
.brand-title { margin: 14px 0 2px; font-size: 2rem; letter-spacing: .5px; }
.brand-sub { margin: 0; opacity: .9; font-weight: 600; }

/* Card */
.card {
    background: #fff;
    border-radius: var(--radius);
    padding: 28px 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
}
.card-center { text-align: center; }
.card-title { margin: 0 0 4px; font-size: 1.4rem; color: var(--navy); }
.muted { color: var(--muted); margin: 0 0 16px; }
.exam-chip {
    display: inline-block; margin-bottom: 12px; padding: 6px 14px;
    border-radius: 999px; background: #fff4e5; color: #9a3412;
    border: 1px solid #fed7aa; font-size: .9rem;
}

/* Form */
.field { border: 0; margin: 0 0 16px; padding: 0; min-width: 0; }
.field > label, .field legend, .label-row > label:first-child {
    display: block; font-weight: 700; margin-bottom: 6px; padding: 0; color: var(--ink);
}
.label-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.inline-check { font-size: .88rem; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }

input[type="text"], input[type="email"], input[type="tel"], input[type="date"] {
    width: 100%; padding: 11px 12px; font: inherit; color: inherit;
    border: 1.5px solid #cbd5e1; border-radius: 10px; background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(29, 79, 156, .18); }
input[readonly] { background: var(--bg-soft); }

.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice {
    display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
    padding: 9px 14px; border: 1.5px solid #cbd5e1; border-radius: 10px; background: #fff;
    transition: border-color .15s, background .15s;
}
.choice:hover { border-color: var(--blue); }
.choice:has(input:checked) { border-color: var(--blue); background: #eef4ff; font-weight: 600; }
.choice input { accent-color: var(--blue); margin: 0; }

.is-invalid input[type="text"], .is-invalid input[type="email"],
.is-invalid input[type="tel"], .is-invalid input[type="date"], .is-invalid .choice { border-color: var(--error); }
.field-error { color: var(--error); font-size: .86rem; margin: 6px 0 0; }
.field-error::before { content: "\26A0\FE0E  "; }

.center-detail {
    margin: 10px 0 0; padding: 10px 12px; border-radius: 10px;
    background: #fff7ed; border-left: 4px solid var(--orange); color: #7c2d12; font-size: .9rem;
}

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.fee-box {
    display: flex; justify-content: space-between; align-items: center;
    margin: 20px 0 14px; padding: 14px 16px; border-radius: 10px;
    background: var(--bg-soft); border: 1px dashed #94a3b8; font-weight: 600;
}
.fee-box strong { font-size: 1.3rem; color: var(--navy); }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 22px; border-radius: 10px; border: 0; cursor: pointer;
    font: inherit; font-weight: 700; text-decoration: none; transition: filter .15s, transform .05s;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .65; cursor: progress; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--error); color: #fff; }
.btn-ghost { background: #f1f5f9; color: var(--ink); }
.btn-block { width: 100%; font-size: 1.05rem; padding: 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 18px; }
.secure-note { text-align: center; font-size: .82rem; color: var(--muted); margin: 10px 0 0; width: 100%; }

/* Status page */
.status-head { display: flex; gap: 16px; align-items: flex-start; }
.status-icon {
    flex: 0 0 auto; width: 56px; height: 56px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 30px; font-weight: 800; color: #fff; margin: 0 auto 12px;
}
.status-head .status-icon { margin: 0; }
.status-success { background: var(--success); }
.status-success::after { content: "\2713"; }
.status-error { background: var(--error); }
.status-error::after { content: "\2715"; }
.status-warning { background: var(--warning); }
.status-warning::after { content: "!"; }
.status-info { background: var(--info); }
.status-info::after { content: "i"; font-family: Georgia, serif; }

.summary { margin: 20px 0 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.summary div { display: grid; grid-template-columns: 42% 1fr; border-top: 1px solid var(--line); }
.summary div:first-child { border-top: 0; }
.summary dt { background: var(--bg-soft); padding: 10px 12px; font-weight: 600; color: var(--muted); font-size: .9rem; }
.summary dd { margin: 0; padding: 10px 12px; word-break: break-word; }
.summary dd.strong { font-weight: 800; color: var(--navy); font-size: 1.1rem; }

.foot { text-align: center; color: rgba(255, 255, 255, .8); font-size: .82rem; margin-top: 22px; }

/* ---------- Alert dialog ---------- */
.sa-overlay {
    position: fixed; inset: 0; z-index: 1000; padding: 16px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(15, 23, 42, .55); backdrop-filter: blur(2px);
    animation: sa-fade .18s ease-out;
}
.sa-modal {
    width: 100%; max-width: 440px; max-height: calc(100vh - 32px); overflow-y: auto;
    background: #fff; border-radius: 16px; padding: 28px 24px 22px; text-align: center;
    box-shadow: 0 25px 60px rgba(0, 0, 0, .35); border-top: 6px solid var(--info);
    animation: sa-pop .22s cubic-bezier(.2, .9, .3, 1.2);
}
.sa-modal .status-icon { width: 64px; height: 64px; font-size: 34px; margin-bottom: 14px; }
.sa-success { border-top-color: var(--success); }
.sa-error { border-top-color: var(--error); }
.sa-warning { border-top-color: var(--warning); }
.sa-title { margin: 0 0 8px; font-size: 1.3rem; color: var(--ink); }
.sa-text { margin: 0; color: var(--muted); }
.sa-list {
    text-align: left; margin: 14px 0 0; padding: 12px 14px 12px 32px;
    background: #fef2f2; border-radius: 10px; color: #991b1b; font-size: .9rem;
}
.sa-list li + li { margin-top: 4px; }
.sa-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 20px; }
.sa-actions .btn { min-width: 120px; }

.sa-spinner {
    width: 54px; height: 54px; margin: 4px auto 16px; border-radius: 50%;
    border: 5px solid #dbeafe; border-top-color: var(--blue); animation: sa-spin .8s linear infinite;
}

@keyframes sa-fade { from { opacity: 0; } }
@keyframes sa-pop { from { opacity: 0; transform: scale(.9); } }
@keyframes sa-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
    .sa-overlay, .sa-modal { animation: none; }
    .sa-spinner { animation-duration: 2s; }
}

@media (max-width: 480px) {
    .brand-title { font-size: 1.6rem; }
    .card { padding: 22px 16px; }
    .summary div { grid-template-columns: 1fr; }
    .summary dt { padding-bottom: 2px; }
    .status-head { flex-direction: column; align-items: center; text-align: center; }
    .sa-actions .btn { flex: 1 1 100%; }
}
