:root {
    color-scheme: light;
    --bg: #fff7fb;
    --surface: #ffffff;
    --surface-soft: #fff0f7;
    --text: #241425;
    --muted: #765d70;
    --line: #f7bdd4;
    --primary: #d81b60;
    --primary-strong: #ad1457;
    --accent: #ec4899;
    --accent-soft: #ffe4ef;
    --danger: #b42318;
    --ok: #067647;
    --shadow: 0 18px 42px rgba(216, 27, 96, .12);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: linear-gradient(135deg, #fff7fb 0%, #fff0f7 100%);
    color: var(--text);
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    line-height: 1.5;
}

a { color: var(--primary); text-decoration: none; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 64px;
    padding: 10px clamp(16px, 4vw, 48px);
    background: rgba(255, 255, 255, .92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 750;
}

.brand-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: var(--primary);
    color: white;
    font-size: 13px;
}

.topnav {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--muted);
    font-size: 14px;
}

.nav-primary {
    padding: 8px 12px;
    border-radius: 8px;
    background: var(--text);
    color: white;
}

.page {
    width: min(1440px, 100%);
    margin: 0 auto;
    padding: clamp(18px, 4vw, 40px);
}

.landing-body {
    min-height: 100vh;
}

.landing-page {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0 clamp(18px, 4vw, 40px) 0 0;
}

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

.panel,
.auth-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.auth-wrap {
    display: grid;
    grid-template-columns: minmax(320px, 430px) minmax(320px, 430px);
    gap: 28px;
    align-items: start;
    justify-content: center;
}

.intro {
    padding: clamp(20px, 5vw, 44px) 0;
}

.intro h1,
.panel-title h1 {
    margin: 0 0 10px;
    font-size: clamp(28px, 5vw, 48px);
    line-height: 1.08;
}

.intro p,
.panel-title p,
.muted {
    color: var(--muted);
}

.form-kicker {
    margin: 0 0 4px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0;
    text-align: center;
}

.panel-title {
    text-align: center;
}

.auth-card,
.panel-body {
    padding: clamp(18px, 4vw, 28px);
}

.login-card h1 {
    margin: 0 0 8px;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.1;
}

.login-actions {
    justify-content: flex-start;
}

.auth-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 18px;
    font-weight: 700;
}

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

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

.register-title-row {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 16px;
    align-items: end;
}

.register-title-field select {
    min-width: 0;
}

label {
    display: grid;
    gap: 6px;
    font-size: 14px;
    font-weight: 650;
}

input,
select,
textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    color: var(--text);
    font: inherit;
}

textarea { resize: vertical; }

input:focus,
select:focus,
textarea:focus {
    outline: 3px solid rgba(236, 72, 153, .22);
    border-color: var(--primary);
}

.actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: var(--primary);
    color: white;
    font-weight: 750;
    cursor: pointer;
}

.btn:hover { background: var(--primary-strong); }
.btn-secondary { background: white; color: var(--text); border-color: var(--line); }
.btn-secondary:hover { background: var(--surface-soft); }
.btn-save { background: var(--accent); }
.btn-save:hover { background: #be185d; }
.btn-next { background: var(--primary); }
.btn-next:hover { background: var(--primary-strong); }
.btn-danger { background: var(--danger); }

.action-group {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.form-page {
    width: 100%;
    max-width: none;
    min-height: calc(100vh - 64px);
    padding: 0;
}

.form-app-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: calc(100vh - 64px);
    background: #f5f7fb;
}

.form-sidebar {
    position: sticky;
    top: 64px;
    align-self: start;
    height: calc(100vh - 64px);
    overflow-y: auto;
    padding: 16px 14px;
    background: linear-gradient(180deg, var(--primary) 0%, #163f76 100%);
    color: white;
    box-shadow: 12px 0 30px rgba(20, 33, 61, .14);
}

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

.form-sidebar-brand img {
    width: 54px;
    height: 54px;
    object-fit: contain;
    border-radius: 8px;
    background: white;
}

.form-sidebar-brand strong,
.form-sidebar-brand span {
    display: block;
}

.form-sidebar-brand strong {
    font-size: 18px;
}

.form-sidebar-brand span {
    color: rgba(255, 255, 255, .76);
    font-size: 13px;
}

.form-menu-toggle {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 8px;
    background: rgba(255, 255, 255, .12);
    cursor: pointer;
}

.form-menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 999px;
    background: white;
}

.form-workspace {
    min-width: 0;
    padding: 22px clamp(18px, 3vw, 34px) 38px;
}

.form-workspace-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    padding: 18px 22px;
    border: 1px solid rgba(216, 27, 96, .12);
    border-radius: 8px;
    background: white;
    box-shadow: 0 10px 26px rgba(20, 33, 61, .08);
}

.form-workspace-head .form-kicker {
    color: var(--accent);
    text-align: left;
}

.form-workspace-head h1 {
    margin: 0;
    color: var(--primary);
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.15;
}

.form-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 84px;
    min-height: 36px;
    padding: 7px 12px;
    border-radius: 8px;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 850;
}

.form-workspace .panel {
    box-shadow: 0 12px 32px rgba(20, 33, 61, .08);
}

.stepper {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 18px;
}

.step-item {
    display: grid;
    gap: 4px;
    min-height: 64px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    color: var(--muted);
    font-size: 12px;
}

.step-item strong { color: var(--text); font-size: 13px; }
.step-item.active { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.step-item.done { background: #fff0f7; border-color: #f7bdd4; }

.form-sidebar .stepper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin: 16px 0 0;
}

.form-sidebar .step-item {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 54px;
    padding: 10px 12px 10px 46px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 8px;
    background: rgba(255, 255, 255, .08);
    color: rgba(255, 255, 255, .82);
    font-size: 13px;
    font-weight: 750;
}

.form-sidebar .step-item::before {
    position: absolute;
    left: 12px;
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .18);
    color: white;
    font-size: 12px;
    font-weight: 900;
}

.form-sidebar .step-item:nth-child(1)::before { content: "1"; }
.form-sidebar .step-item:nth-child(2)::before { content: "2"; }
.form-sidebar .step-item:nth-child(3)::before { content: "3"; }
.form-sidebar .step-item:nth-child(4)::before { content: "4"; }
.form-sidebar .step-item:nth-child(5)::before { content: "5"; }
.form-sidebar .step-item:nth-child(6)::before { content: "6"; }
.form-sidebar .step-item:nth-child(7)::before { content: "7"; }
.form-sidebar .step-item:nth-child(8)::before { content: "8"; }
.form-sidebar .step-item:nth-child(9)::before { content: "9"; }

.form-sidebar .step-item strong {
    color: inherit;
    font-size: 13px;
}

.form-sidebar .step-item:hover {
    background: rgba(255, 255, 255, .16);
}

.form-sidebar .step-item.active {
    border-color: rgba(255, 255, 255, .92);
    background: white;
    color: var(--primary);
    box-shadow: 0 12px 24px rgba(15, 23, 42, .18);
}

.form-sidebar .step-item.active::before {
    background: var(--accent);
}

.form-sidebar .step-item.done {
    border-color: rgba(236, 72, 153, .45);
    background: rgba(236, 72, 153, .18);
    color: white;
}

.legacy-instructions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin: 18px 0 22px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfc;
    color: var(--muted);
}

.legacy-instructions strong {
    display: block;
    margin-bottom: 8px;
    color: var(--text);
}

.legacy-instructions ol {
    margin: 0;
    padding-left: 20px;
}

.legacy-form {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.legacy-form tr:nth-child(odd) {
    background: #fff0f7;
}

.legacy-form tr:nth-child(even) {
    background: #ffffff;
}

.legacy-form th,
.legacy-form td {
    border-bottom: 1px solid rgba(219, 226, 230, .9);
    padding: 9px 12px;
}

.legacy-form th {
    width: 42%;
    color: var(--text);
    font-size: 14px;
    font-weight: 750;
    text-align: right;
}

.legacy-form td {
    text-align: left;
}

.legacy-form input,
.legacy-form select {
    max-width: 360px;
    min-height: 36px;
    padding: 7px 10px;
}

.legacy-form input[type="file"] {
    max-width: 360px;
    padding: 6px;
    background: white;
}

.address-note {
    margin: 18px 0 8px;
    color: var(--text);
    font-weight: 800;
    text-align: center;
}

.form-note {
    margin: 0 0 12px;
    padding: 12px 14px;
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    background: var(--accent-soft);
    color: var(--text);
    font-weight: 750;
}

.recommendation-form {
    display: grid;
    gap: 18px;
}

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

.rating-table {
    min-width: 980px;
    border: 1px solid var(--line);
    background: white;
}

.rating-table th,
.rating-table td {
    padding: 8px;
    text-align: center;
    vertical-align: middle;
}

.rating-table th:first-child,
.rating-table td:first-child {
    text-align: left;
    font-weight: 750;
}

.radio-stack {
    display: grid;
    gap: 8px;
}

.radio-stack label,
.rating-table label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 650;
}

.radio-stack input,
.rating-table input {
    width: auto;
    min-height: 0;
}

.thank-you-card {
    display: grid;
    justify-items: center;
    gap: 10px;
    width: min(680px, 100%);
    margin: 28px auto;
    padding: clamp(28px, 6vw, 48px);
    border: 1px solid rgba(216, 27, 96, .14);
    border-top: 8px solid var(--primary);
    border-radius: 8px;
    background: white;
    box-shadow: 0 18px 42px rgba(20, 33, 61, .10);
    text-align: center;
}

.thank-you-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    font-size: 34px;
    font-weight: 900;
}

.thank-you-card h2 {
    margin: 6px 0 0;
    color: var(--primary);
    font-size: clamp(28px, 4vw, 40px);
}

.thank-you-card p {
    max-width: 540px;
    margin: 0;
    color: var(--muted);
    font-size: 17px;
}

.address-form th {
    width: 18%;
}

.address-form td {
    width: 32%;
}

.address-form input {
    max-width: 420px;
}

.status-form {
    width: min(760px, 100%);
    margin: 28px auto 0;
}

.status-form th {
    width: 48%;
}

.status-form td {
    width: 52%;
}

.status-form select {
    max-width: 340px;
}

.list-section {
    margin-top: 22px;
}

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

.section-toolbar h2 {
    margin: 0;
    font-size: clamp(18px, 2.5vw, 24px);
    font-weight: 750;
    letter-spacing: 0;
}

.data-table {
    min-width: 900px;
    border: 1px solid var(--line);
    background: white;
}

.data-table thead th {
    background: var(--primary);
    color: white;
    font-weight: 800;
    text-align: center;
}

.data-table th,
.data-table td {
    padding: 10px 12px;
    text-align: center;
}

.data-table tbody tr:nth-child(odd) {
    background: #fff7fb;
}

.data-table tbody tr:nth-child(even) {
    background: #ffffff;
}

.empty-row {
    color: var(--muted);
    font-weight: 650;
}

.row-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    white-space: nowrap;
}

.link-button {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--primary);
    font: inherit;
    font-weight: 750;
    cursor: pointer;
}

.danger-link {
    color: var(--danger);
    font-weight: 750;
}

.file-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    margin-left: 8px;
    padding: 6px 12px;
    border: 1px solid rgba(236, 72, 153, .35);
    border-radius: 8px;
    background: var(--accent);
    color: white;
    font-size: 13px;
    font-weight: 850;
    line-height: 1.2;
    white-space: nowrap;
    box-shadow: 0 8px 18px rgba(236, 72, 153, .22);
}

.upload-note {
    display: inline-block;
    margin-left: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    vertical-align: middle;
}

.file-badge::before {
    content: "VIEW";
    margin-right: 6px;
    padding: 2px 5px;
    border-radius: 6px;
    background: rgba(255, 255, 255, .22);
    color: white;
    font-size: 10px;
    font-weight: 900;
}

.file-badge:hover {
    background: #d97212;
    color: white;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(15, 23, 42, .42);
}

.modal.is-open {
    display: flex;
}

.modal-dialog {
    width: min(760px, 100%);
    max-height: min(88vh, 820px);
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    box-shadow: 0 26px 70px rgba(15, 23, 42, .22);
}

.modal-head {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
    background: white;
}

.modal-head h2 {
    margin: 0;
    font-size: 22px;
    letter-spacing: 0;
}

.icon-button {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    color: var(--text);
    cursor: pointer;
    font-size: 18px;
    font-weight: 800;
}

.modal-form {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
}

.modal-form th {
    width: 34%;
}

.modal-form input,
.modal-form select {
    max-width: 420px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 18px 18px;
}

.legacy-form small {
    display: block;
    color: var(--muted);
    font-weight: 600;
}

.inline-fields {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.inline-fields select {
    max-width: 130px;
}

.inline-fields input {
    max-width: 220px;
}

.required {
    color: var(--danger);
    font-weight: 800;
}

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 680px; }
th, td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 13px; }

.alert {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: white;
}
.alert-success { border-color: #9ed6b8; color: var(--ok); }
.alert-error { border-color: #f0b4ad; color: var(--danger); }
.alert-info { border-color: #b7cfdc; color: #23566f; }

.swal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(20, 33, 61, .48);
}

.swal-dialog {
    width: min(420px, 100%);
    padding: 28px;
    border: 1px solid rgba(216, 27, 96, .18);
    border-radius: 8px;
    background: white;
    box-shadow: 0 28px 80px rgba(20, 33, 61, .26);
    text-align: center;
}

.swal-icon {
    display: inline-grid;
    place-items: center;
    width: 58px;
    height: 58px;
    margin-bottom: 14px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-size: 30px;
    font-weight: 900;
}

.swal-success .swal-icon {
    background: var(--ok);
}

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

.swal-info .swal-icon {
    background: var(--accent);
}

.swal-dialog h2 {
    margin: 0;
    color: var(--primary);
    font-size: 26px;
}

.swal-dialog p {
    margin: 10px 0 20px;
    color: var(--muted);
}

.swal-button {
    min-width: 112px;
}

.swal-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.summary-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.summary-list div {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfc;
}

.summary-list dt { color: var(--muted); font-size: 12px; }
.summary-list dd { margin: 3px 0 0; font-weight: 700; }

.review-payment {
    display: grid;
    gap: 22px;
}

.review-title {
    color: var(--primary);
    font-size: 24px;
    font-weight: 850;
    text-align: center;
    text-transform: uppercase;
}

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

.payment-block {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fffafd;
    overflow: hidden;
    box-shadow: 0 14px 32px rgba(216, 27, 96, .08);
}

.payment-header {
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    font-size: 16px;
    font-weight: 850;
}

.payment-block > h2,
.payment-block > h3,
.payment-block > p,
.payment-block > .payment-note-row {
    margin-left: 18px;
    margin-right: 18px;
}

.payment-block h2 {
    margin-top: 18px;
    margin-bottom: 8px;
    color: var(--primary);
    font-size: 18px;
    text-decoration: underline;
}

.payment-block h3 {
    margin-top: 18px;
    margin-bottom: 10px;
    color: var(--primary);
    font-size: 15px;
    text-decoration: underline;
}

.payment-block p {
    margin-top: 0;
    margin-bottom: 18px;
    color: var(--text);
    line-height: 1.65;
}

.payment-indent {
    padding-left: 24px;
}

.payment-note-row {
    display: grid;
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 8px;
    margin-top: 24px;
    margin-bottom: 18px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--accent-soft);
}

.payment-note-row strong {
    color: var(--text);
}

.payment-note-row p {
    margin: 0;
}

.payment-address-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.payment-address-card,
.payment-upload-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--text);
    line-height: 1.55;
    text-align: center;
    overflow: hidden;
    box-shadow: 0 12px 26px rgba(216, 27, 96, .07);
}

.payment-address-card {
    padding-bottom: 18px;
}

.payment-address-card .payment-header {
    margin-bottom: 16px;
    text-align: left;
}

.payment-upload-card {
    display: grid;
    justify-items: center;
    gap: 12px;
    padding: 18px;
    text-align: center;
    background: #fff0f7;
}

.payment-upload-card label {
    color: var(--primary);
    font-weight: 850;
}

.payment-upload-card label small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.payment-submit-note {
    width: min(860px, 100%);
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--primary);
    font-weight: 850;
}

.payment-slip-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: min(980px, 100%);
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff7fb;
    box-shadow: 0 10px 24px rgba(216, 27, 96, .08);
}

.payment-slip-row input[type="file"] {
    width: min(370px, 100%);
    min-height: 40px;
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.admission-landing {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
    gap: clamp(20px, 3vw, 36px);
    align-items: stretch;
    min-height: 100vh;
}

.admission-info {
    display: grid;
    align-content: start;
    gap: 22px;
    max-height: 100vh;
    overflow-y: auto;
    padding: clamp(16px, 2vw, 22px);
    border: 1px solid rgba(216, 27, 96, .14);
    border-left: 0;
    border-radius: 0 8px 8px 0;
    background: rgba(255, 255, 255, .78);
    box-shadow: var(--shadow);
    scrollbar-color: var(--primary) #e8eef7;
    scrollbar-width: thin;
}

.admission-info::-webkit-scrollbar {
    width: 10px;
}

.admission-info::-webkit-scrollbar-track {
    background: #e8eef7;
    border-radius: 999px;
}

.admission-info::-webkit-scrollbar-thumb {
    border: 2px solid #e8eef7;
    border-radius: 999px;
    background: var(--primary);
}

.landing-logo-row {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px 18px;
    border: 1px solid rgba(216, 27, 96, .16);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(216, 27, 96, .08), rgba(236, 72, 153, .10));
}

.landing-logo,
.login-logo {
    display: block;
    object-fit: contain;
}

.landing-logo {
    width: 72px;
    height: 72px;
}

.thai-title {
    margin: 2px 0 0;
    color: var(--accent);
    font-size: 18px;
    font-weight: 800;
}

.eyebrow {
    margin: 0;
    color: var(--accent);
    font-size: 13px;
    font-weight: 850;
    text-transform: uppercase;
}

.info-block,
.login-panel {
    border: 1px solid rgba(216, 27, 96, .14);
    border-radius: 8px;
    background: rgba(255, 255, 255, .94);
    box-shadow: var(--shadow);
}

.info-block {
    padding: clamp(18px, 3vw, 28px);
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.section-heading h2 {
    margin: 0;
    color: var(--primary);
    font-size: clamp(22px, 3vw, 32px);
}

.section-heading p {
    margin: 2px 0 0;
    color: var(--muted);
    font-weight: 750;
}

.section-icon,
.doc-icon {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 8px;
    background: var(--accent);
    color: white;
    font-weight: 850;
}

.section-icon {
    width: 42px;
    height: 42px;
    font-size: 20px;
}

.lead-text {
    margin: 0;
    color: var(--text);
    font-weight: 750;
}

.lead-text.thai,
.thai {
    color: var(--muted);
}

.step-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.step-cards article {
    padding: 16px;
    border: 1px solid rgba(216, 27, 96, .14);
    border-radius: 8px;
    background: #f8fbff;
}

.step-cards strong {
    display: block;
    color: var(--primary);
    font-size: 18px;
}

.step-cards span {
    display: block;
    color: var(--accent);
    font-weight: 800;
}

.step-cards p {
    margin: 10px 0 0;
}

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

.document-list > div {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.doc-icon {
    width: 34px;
    height: 34px;
}

.doc-icon::before {
    display: block;
    color: white;
    font-weight: 900;
    line-height: 1;
}

.icon-document::before { content: "DOC"; font-size: 10px; }
.icon-form::before { content: "FORM"; font-size: 8px; }
.icon-transcript::before { content: "PDF"; font-size: 10px; }
.icon-purpose::before { content: "SOP"; font-size: 10px; }
.icon-score::before { content: "A+"; font-size: 12px; }
.icon-contact::before { content: "i"; font-size: 18px; font-family: Georgia, serif; }

.document-list p {
    margin: 0;
}

.document-list em {
    color: var(--muted);
    font-style: normal;
    font-weight: 650;
}

.document-list .detail-row,
.document-list .score-box {
    display: block;
    margin-left: 46px;
    background: var(--accent-soft);
}

.document-list .detail-row p + p,
.score-box p + p {
    margin-top: 8px;
}

.score-box strong {
    color: var(--primary);
}

.contact-card > div {
    display: grid;
    gap: 8px;
}

.contact-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 3px 6px 3px 0;
    padding: 4px 8px;
    border-radius: 8px;
    background: #fff0f7;
    color: var(--primary);
    font-weight: 750;
    white-space: nowrap;
}

.phone-icon::before,
.email-icon::before {
    display: inline-grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    font-size: 11px;
    font-weight: 900;
}

.phone-icon::before { content: "\260E"; }
.email-icon::before { content: "\2709"; }

.login-panel {
    position: sticky;
    top: clamp(18px, 4vw, 40px);
    align-self: start;
    margin-top: clamp(18px, 4vw, 40px);
    padding: clamp(22px, 4vw, 38px);
}

.login-logo {
    width: min(220px, 72%);
    margin: 0 auto 22px;
}

.login-panel h2 {
    margin: 0 0 8px;
    color: var(--primary);
    font-size: 34px;
}

.login-panel form {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}

.login-submit {
    width: 100%;
    margin-top: 6px;
}

@media (max-width: 820px) {
    .auth-wrap,
    .admission-landing,
    .form-grid,
    .recommendation-grid,
    .payment-grid,
    .payment-address-grid,
    .summary-list,
    .legacy-instructions {
        grid-template-columns: 1fr;
    }

    .register-title-row {
        grid-template-columns: 1fr;
    }

    .login-panel {
        position: static;
        order: -1;
    }

    .landing-page {
        min-height: 0;
        padding: 16px;
    }

    .admission-landing {
        min-height: 0;
    }

    .admission-info {
        max-height: none;
        overflow: visible;
        border-left: 1px solid rgba(216, 27, 96, .14);
        border-radius: 8px;
    }

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

    .payment-slip-row {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .payment-slip-row input[type="file"],
    .payment-slip-row .file-badge {
        width: 100%;
    }

    .form-page {
        min-height: 0;
    }

    .form-app-shell {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .form-sidebar {
        position: static;
        height: auto;
        padding: 14px;
        overflow: visible;
    }

    .form-sidebar-brand {
        padding-bottom: 12px;
    }

    .form-menu-toggle {
        display: inline-block;
        flex: 0 0 auto;
    }

    .form-sidebar .stepper {
        display: none;
        grid-template-columns: 1fr;
        gap: 8px;
        margin-top: 12px;
        overflow-x: auto;
        padding-bottom: 6px;
        scrollbar-width: thin;
    }

    .form-sidebar.menu-open .stepper {
        display: grid;
    }

    .form-sidebar .step-item {
        width: 100%;
    }

    .form-workspace {
        padding: 16px;
    }

    .form-workspace-head {
        align-items: flex-start;
        flex-direction: column;
        padding: 16px;
    }

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

    .hide-sm { display: none; }

    .legacy-form,
    .legacy-form tbody,
    .legacy-form tr,
    .legacy-form th,
    .legacy-form td {
        display: block;
        width: 100%;
    }

    .legacy-form th {
        text-align: left;
        padding-bottom: 4px;
    }

    .legacy-form td {
        padding-top: 4px;
    }

    .address-form tr {
        padding: 8px 0;
    }

    .section-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .section-toolbar .btn {
        width: 100%;
    }

    .legacy-form input,
    .legacy-form select,
    .legacy-form input[type="file"] {
        max-width: 100%;
    }

    .modal {
        align-items: flex-end;
        padding: 0;
    }

    .modal-dialog {
        width: 100%;
        max-height: 92vh;
        border-radius: 8px 8px 0 0;
    }

    .modal-actions {
        flex-direction: column-reverse;
    }

    .modal-actions .btn {
        width: 100%;
    }
}

@media (max-width: 520px) {
    .topbar { align-items: flex-start; }
    .topnav { gap: 10px; font-size: 13px; }
    .page { padding: 16px; }
    .landing-logo-row {
        grid-template-columns: 1fr;
    }

    .landing-logo {
        width: 72px;
        height: 72px;
    }

    .document-list .detail-row,
    .document-list .score-box {
        margin-left: 0;
    }
    .stepper { grid-template-columns: 1fr; }
    .actions .btn { width: 100%; }
}
