:root {
    color-scheme: light;
    --navy-950: oklch(0.95 0.015 285);
    --navy-900: oklch(0.55 0.11 285);
    --navy-800: oklch(0.88 0.04 285);
    --teal-700: oklch(0.62 0.11 285);
    --teal-650: oklch(0.68 0.11 285);
    --teal-100: oklch(0.94 0.03 285);
    --amber-600: oklch(0.68 0.11 82);
    --red-700: oklch(0.54 0.12 25);
    --red-100: oklch(0.97 0.015 25);
    --green-700: oklch(0.52 0.10 160);
    --green-100: oklch(0.96 0.02 160);
    --canvas: oklch(0.985 0.005 280);
    --surface: oklch(1 0 0);
    --surface-subtle: oklch(0.97 0.008 280);
    --surface-hover: oklch(0.95 0.012 280);
    --line: oklch(0.91 0.008 280);
    --line-strong: oklch(0.82 0.015 280);
    --ink: oklch(0.24 0.03 280);
    --muted: oklch(0.48 0.02 280);
    --muted-strong: oklch(0.36 0.025 280);
    --white: oklch(1 0 0);
    --focus: oklch(0.85 0.08 285);
    --radius-panel: 12px;
    --radius-control: 8px;
    --radius-small: 6px;
    --sidebar-width: 272px;
    --topbar-height: 64px;
    --speed: 170ms;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --font-sans: "Prompt", ui-sans-serif, "Noto Sans Thai", Tahoma, "Segoe UI", sans-serif;
    font-family: var(--font-sans);
    font-weight: 400;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--canvas);
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background: var(--canvas);
    font-family: var(--font-sans);
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.5;
    text-rendering: optimizeLegibility;
}

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

a {
    color: inherit;
}

:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

.admin-login-shell,
.status-shell {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
    background:
        linear-gradient(135deg, oklch(0.96 0.02 285) 0%, oklch(0.92 0.03 220) 100%);
}

.login-stage {
    width: min(440px, 100%);
}

.login-panel,
.status-card {
    display: grid;
    gap: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-panel);
    background: var(--surface);
    box-shadow: 0 12px 32px oklch(0.24 0.03 280 / 0.06);
}

.login-panel {
    padding: 34px;
}

.status-card {
    width: min(560px, 100%);
    padding: 30px;
}

.login-brand {
    display: grid;
    justify-items: center;
    gap: 12px;
    color: var(--ink);
    text-align: center;
    text-decoration: none;
}

.login-logo {
    width: 76px;
    height: 76px;
    object-fit: contain;
}

.brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    width: fit-content;
    color: var(--ink);
    text-decoration: none;
}

.brand-logo {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.brand-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
    line-height: 1.15;
}

.brand-copy strong {
    color: var(--ink);
    font-size: 1rem;
    font-weight: 600;
}

.brand-copy span {
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 500;
}

.login-heading {
    display: grid;
    justify-items: center;
    gap: 6px;
    text-align: center;
}

.login-heading h1,
.status-card h1 {
    margin: 0;
    color: var(--ink);
    font-size: 1.55rem;
    font-weight: 600;
    line-height: 1.3;
    text-wrap: balance;
}

.login-heading p,
.status-card p {
    margin: 0;
    color: var(--muted-strong);
    font-size: 0.95rem;
    line-height: 1.65;
    text-wrap: pretty;
}

.login-alert {
    position: relative;
    display: block;
    padding: 12px 44px 12px 14px;
    border: 1px solid oklch(0.78 0.07 25);
    border-radius: var(--radius-control);
    background: var(--red-100);
    color: var(--red-700);
}

.login-alert[hidden] {
    display: none;
}

.login-alert-copy {
    display: grid;
    gap: 1px;
    min-width: 0;
}

.login-alert strong {
    font-size: 0.91rem;
    font-weight: 700;
    line-height: 1.45;
}

.login-alert span {
    font-size: 0.9rem;
    line-height: 1.5;
}

.login-alert-close {
    position: absolute;
    top: 10px;
    right: 10px;
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: var(--radius-small);
    background: transparent;
    color: var(--red-700);
    cursor: pointer;
    line-height: 1;
    touch-action: manipulation;
    transition: background-color var(--speed) var(--ease);
}

.login-alert-close:hover {
    background: oklch(0.91 0.055 25);
}

.login-form,
.field {
    display: grid;
}

.login-form {
    gap: 15px;
}

.field {
    gap: 7px;
}

.field label,
.field > span {
    color: var(--ink);
    font-size: 0.9rem;
    font-weight: 600;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    background: var(--white);
    color: var(--ink);
    font-weight: 450;
    line-height: 1.55;
    transition:
        border-color var(--speed) var(--ease),
        box-shadow var(--speed) var(--ease),
        background-color var(--speed) var(--ease);
}

.field textarea {
    min-height: 104px;
    resize: vertical;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
    border-color: var(--line-strong);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--teal-650);
    box-shadow: 0 0 0 3px oklch(0.78 0.12 198 / 0.3);
    outline: none;
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 52px;
}

.icon-button {
    position: absolute;
    top: 50%;
    right: 6px;
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: var(--radius-control);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transform: translateY(-50%);
    transition:
        background-color var(--speed) var(--ease),
        color var(--speed) var(--ease);
}

.icon-button svg {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.icon-button:hover,
.icon-button[aria-pressed="true"] {
    background: var(--surface-subtle);
    color: var(--teal-700);
}

.turnstile-field {
    min-height: 70px;
    overflow: hidden;
}

.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.check-control,
.toggle-control {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--muted-strong);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
}

.check-control input,
.toggle-control input {
    width: 18px;
    height: 18px;
    accent-color: var(--teal-700);
}

.primary-action,
.secondary-action,
.text-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border-radius: var(--radius-control);
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition:
        background-color var(--speed) var(--ease),
        border-color var(--speed) var(--ease),
        color var(--speed) var(--ease),
        transform var(--speed) var(--ease);
}

.primary-action {
    border: 1px solid var(--teal-700);
    background: var(--teal-700);
    color: var(--white);
}

.primary-action:hover {
    border-color: var(--navy-900);
    background: var(--navy-900);
}

.primary-action:active,
.secondary-action:active,
.text-action:active {
    transform: translateY(1px);
}

.primary-action:disabled {
    border-color: var(--line);
    background: var(--line);
    color: var(--muted);
    cursor: wait;
    transform: none;
}

.login-form .primary-action {
    width: 100%;
    margin-top: 2px;
}

.secondary-action {
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
}

.secondary-action:hover {
    border-color: var(--line-strong);
    background: var(--surface-subtle);
}

.text-action {
    min-height: 36px;
    padding: 0 10px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--teal-700);
}

.text-action:hover {
    background: var(--teal-100);
}

.loading-label {
    display: none;
}

.primary-action[data-loading="true"] [data-submit-label] {
    display: none;
}

.primary-action[data-loading="true"] .loading-label {
    display: inline;
}

.admin-dashboard-shell {
    min-height: 100vh;
    background: var(--canvas);
}

.admin-app-shell {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    min-height: 100vh;
}

.admin-sidebar {
    position: sticky;
    top: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    align-self: start;
    min-height: 100vh;
    background: var(--navy-950);
    color: var(--ink);
    border-right: 1px solid var(--line);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
    height: var(--topbar-height);
    padding: 0 16px;
    border-bottom: 1px solid var(--line);
    box-sizing: border-box;
}

.sidebar-brand .brand-copy strong {
    color: var(--ink);
}

.sidebar-brand .brand-copy span {
    color: var(--muted);
}

.admin-nav {
    display: grid;
    align-content: start;
    gap: 18px;
    min-width: 0;
    padding: 20px 12px;
}

.admin-nav-group {
    display: grid;
    gap: 5px;
}

.admin-nav-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.admin-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 9px 12px;
    border: 1px solid transparent;
    border-radius: var(--radius-control);
    color: var(--muted-strong);
    font-size: 0.94rem;
    font-weight: 500;
    text-decoration: none;
    transition:
        background-color var(--speed) var(--ease),
        border-color var(--speed) var(--ease),
        color var(--speed) var(--ease);
}

.admin-nav a .nav-icon {
    flex: 0 0 auto;
    opacity: 0.75;
    color: currentColor;
    transition: opacity var(--speed) var(--ease), transform var(--speed) var(--ease);
}

.admin-nav a:hover .nav-icon {
    opacity: 1;
    transform: translateX(2px);
}

.admin-nav a.is-active .nav-icon {
    opacity: 1;
    color: var(--teal-700);
}

.admin-nav a:hover {
    background: var(--surface-hover);
    color: var(--ink);
}

.admin-nav a.is-active {
    border-color: var(--teal-650);
    background: var(--teal-100);
    color: var(--teal-700);
}

.admin-main {
    display: grid;
    grid-template-rows: var(--topbar-height) 1fr auto;
    min-width: 0;
}

.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    min-width: 0;
    padding: 0 24px;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
}

.admin-topbar form,
.admin-profile-dropdown form {
    margin: 0;
}

.admin-profile-menu {
    position: relative;
}

.admin-profile-menu[open] .profile-chevron {
    transform: rotate(180deg);
}

.admin-profile-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    max-width: min(260px, calc(100vw - 48px));
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    background: var(--surface);
    color: var(--ink);
    cursor: pointer;
    list-style: none;
    transition:
        background-color var(--speed) var(--ease),
        border-color var(--speed) var(--ease),
        box-shadow var(--speed) var(--ease);
}

.admin-profile-trigger::-webkit-details-marker {
    display: none;
}

.admin-profile-trigger:hover,
.admin-profile-menu[open] .admin-profile-trigger {
    border-color: var(--line-strong);
    background: var(--surface-subtle);
}

.admin-profile-trigger .user-avatar {
    flex: 0 0 auto;
    color: var(--teal-700);
}

.profile-trigger-copy {
    min-width: 0;
    overflow: hidden;
    color: var(--ink);
    font-size: 0.9rem;
    font-weight: 650;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-chevron {
    flex: 0 0 auto;
    color: var(--muted);
    transition: transform var(--speed) var(--ease);
}

.admin-profile-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 30;
    display: grid;
    width: min(210px, calc(100vw - 32px));
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius-panel);
    background: var(--surface);
    box-shadow: 0 14px 34px oklch(0.24 0.03 280 / 0.11);
}

.admin-user-label {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: var(--ink);
    font-size: 0.94rem;
    font-weight: 500;
}

.admin-user-label .user-avatar {
    flex: 0 0 auto;
    color: var(--teal-700);
}

.user-role-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--teal-100);
    color: var(--teal-700);
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1;
}

.logout-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 36px;
    width: 100%;
    padding: 0 12px;
    border: 1px solid var(--red-700);
    border-radius: var(--radius-control);
    background: transparent;
    color: var(--red-700);
    font-size: 0.88rem;
    font-weight: 650;
    cursor: pointer;
    transition: all var(--speed) var(--ease);
}

.logout-action svg {
    flex: 0 0 auto;
}

.logout-action:hover {
    background: var(--red-100);
}

.admin-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 24px;
    border-top: 1px solid var(--line);
    background: var(--surface);
    color: var(--muted);
    font-size: 0.84rem;
}

@media (max-width: 620px) {
    .admin-footer {
        flex-direction: column;
        gap: 6px;
        text-align: center;
        padding: 14px 16px;
    }
}

.dashboard-panel,
.admin-workspace {
    display: grid;
}

.dashboard-panel {
    gap: 22px;
    padding: 24px;
}

.admin-workspace {
    align-content: start;
    background: var(--canvas);
}

.page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 42px;
}

.page-heading h1,
.panel-heading h2 {
    margin: 0;
    color: var(--ink);
    line-height: 1.25;
}

.page-heading h1 {
    font-size: 1.65rem;
    font-weight: 600;
}

.page-heading .secondary-action {
    padding: 0 14px;
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.panel-heading h2 {
    font-size: 1.02rem;
    font-weight: 600;
}

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

.metric-tile,
.admin-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius-panel);
    background: var(--surface);
}

.metric-tile {
    display: grid;
    gap: 8px;
    min-height: 98px;
    padding: 16px;
}

.metric-tile span,
.detail-list dt,
.record-identity span,
.check-row span:not(.status-dot) {
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 400;
}

.metric-tile strong {
    min-width: 0;
    color: var(--ink);
    font-size: 1.32rem;
    font-weight: 600;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.workspace-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
    gap: 14px;
    align-items: start;
}

.admin-panel {
    display: grid;
    gap: 16px;
    min-width: 0;
    padding: 16px;
}

.form-panel {
    align-content: start;
}

.check-list,
.detail-list,
.record-list {
    display: grid;
    gap: 8px;
}

.check-row {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.check-row:last-child {
    border-bottom: 0;
}

.check-row div,
.detail-list div,
.record-identity {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.check-row strong,
.detail-list dd,
.record-identity strong {
    color: var(--ink);
    font-weight: 700;
}

.status-dot {
    width: 9px;
    height: 9px;
    margin-top: 7px;
    border-radius: 999px;
}

.status-ok {
    background: var(--green-700);
}

.status-warn {
    background: var(--amber-600);
}

.detail-list {
    margin: 0;
}

.detail-list div {
    grid-template-columns: 126px minmax(0, 1fr);
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
}

.detail-list div:last-child {
    border-bottom: 0;
}

.detail-list dd {
    margin: 0;
}

.empty-copy {
    margin: 0;
    color: var(--muted);
    font-weight: 550;
}

.admin-flash {
    padding: 11px 13px;
    border-radius: var(--radius-control);
    font-weight: 700;
}

.admin-flash-success {
    border: 1px solid oklch(0.76 0.08 150);
    background: var(--green-100);
    color: var(--green-700);
}

.admin-flash-danger {
    border: 1px solid oklch(0.78 0.07 25);
    background: var(--red-100);
    color: var(--red-700);
}

.inline-form-grid,
.cycle-form {
    display: grid;
    gap: 12px;
    align-items: end;
}

.inline-form-grid {
    grid-template-columns: minmax(160px, 1fr) minmax(180px, 1fr) minmax(180px, 1fr) minmax(130px, 0.75fr) auto auto;
}

.cycle-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field-wide {
    grid-column: 1 / -1;
}

.toggle-control {
    min-height: 44px;
}

.form-actions,
.row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.form-actions .primary-action,
.record-row .secondary-action,
.row-actions .secondary-action {
    min-height: 40px;
    padding: 0 12px;
}

.record-row {
    display: grid;
    grid-template-columns: minmax(150px, 0.9fr) minmax(160px, 1fr) minmax(160px, 1fr) minmax(130px, 0.7fr) minmax(120px, 0.7fr) auto;
    gap: 10px;
    align-items: end;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    background: var(--surface);
}

.record-row:hover {
    background: var(--surface-hover);
}

.compact-field {
    gap: 6px;
}

.compact-field input,
.compact-field select {
    min-height: 40px;
    padding: 8px 10px;
}

.cycle-list {
    gap: 10px;
}

.cycle-row {
    grid-template-columns: minmax(150px, 0.8fr) repeat(3, minmax(140px, 1fr));
}

.cycle-row .field-wide {
    grid-column: 2 / -1;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    margin-left: 6px;
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--green-100);
    color: var(--green-700);
    font-size: 0.74rem;
    vertical-align: middle;
}

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

.import-upload-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
}

.import-upload-card {
    min-height: 100%;
}

.active-cycle-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    background: var(--surface-subtle);
    font-size: 0.94rem;
}

.active-cycle-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green-700);
    box-shadow: 0 0 0 3px oklch(0.96 0.02 160 / 0.8);
}

.active-cycle-display.error-display {
    border-color: var(--red-700);
    background: var(--red-100);
    color: var(--red-700);
}

/* Drag & Drop Dropzone Styles */
.dropzone-area {
    border: 2px dashed var(--navy-800);
    border-radius: var(--radius-panel);
    padding: 28px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    text-align: center;
    background: var(--canvas);
    transition: all var(--speed) var(--ease);
}

.dropzone-area:hover,
.dropzone-area.is-dragover {
    border-color: var(--navy-900);
    background: var(--surface);
    box-shadow: 0 4px 12px oklch(0.24 0.03 280 / 0.03);
}

.dropzone-icon {
    color: var(--navy-900);
    transition: transform var(--speed) var(--ease);
}

.dropzone-area:hover .dropzone-icon {
    transform: translateY(-2px);
}

.dropzone-title {
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--ink);
}

.dropzone-sub {
    font-size: 0.84rem;
    font-weight: 400;
    color: var(--muted-strong);
}

.file-name-display {
    display: none;
    font-size: 0.94rem;
    font-weight: 600;
    color: var(--teal-700);
    background: var(--teal-100);
    border: 1px solid var(--teal-700);
    padding: 6px 12px;
    border-radius: var(--radius-control);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-name-display.has-file {
    display: inline-block;
}

.import-progress-track {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--line);
}

.import-progress-track span {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: var(--teal-700);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 180ms var(--ease);
}

.import-modal {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: grid;
    place-items: center;
    padding: 24px;
}

.import-modal[hidden] {
    display: none;
}

.import-modal-backdrop {
    position: absolute;
    inset: 0;
    background: color-mix(in oklch, var(--ink) 42%, transparent);
}

.import-modal-panel {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 16px;
    width: min(560px, 100%);
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: 0 12px 28px color-mix(in oklch, var(--ink) 18%, transparent);
}

.import-modal-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 4px solid var(--teal-100);
    border-top-color: var(--teal-700);
    animation: import-modal-spin 900ms linear infinite;
}

.import-modal-copy,
.import-modal-progress {
    min-width: 0;
}

.import-modal-copy h2 {
    margin: 0;
    color: var(--ink);
    font-size: 1.08rem;
    line-height: 1.35;
    text-wrap: balance;
}

.import-modal-copy p {
    margin: 5px 0 0;
    color: var(--muted-strong);
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.55;
    text-wrap: pretty;
}

.import-modal-progress {
    grid-column: 1 / -1;
    display: grid;
    gap: 8px;
    padding-top: 4px;
}

.import-modal-progress-label {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.import-modal-progress-label strong {
    min-width: 0;
    color: var(--ink);
    font-size: 0.93rem;
    font-weight: 750;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.import-modal-progress-label span,
.import-modal-progress > span {
    color: var(--muted-strong);
    font-size: 0.84rem;
    font-weight: 750;
    line-height: 1.4;
}

.import-modal-track {
    height: 10px;
}

@keyframes import-modal-spin {
    to {
        transform: rotate(360deg);
    }
}

.import-metrics {
    margin-top: -2px;
    margin-bottom: 14px;
}

.import-metrics .metric-tile {
    display: grid;
    align-items: center;
    justify-content: space-between;
    grid-template-columns: auto 1fr;
    gap: 16px;
    padding: 18px 22px;
    border-style: solid;
    transition: all var(--speed) var(--ease);
}

.import-metrics .metric-tile span {
    font-size: 0.94rem;
    font-weight: 600;
}

.import-metrics .metric-tile strong {
    font-size: 1.55rem;
    text-align: right;
}

.import-metrics .metric-tile:nth-child(1) {
    background: oklch(0.96 0.02 285);
    border-color: oklch(0.88 0.04 285);
}
.import-metrics .metric-tile:nth-child(1) span,
.import-metrics .metric-tile:nth-child(1) strong {
    color: oklch(0.42 0.08 285);
}

.import-metrics .metric-tile:nth-child(2) {
    background: var(--green-100);
    border-color: oklch(0.85 0.08 160);
}
.import-metrics .metric-tile:nth-child(2) span,
.import-metrics .metric-tile:nth-child(2) strong {
    color: var(--green-700);
}

.import-metrics .metric-tile:nth-child(3) {
    background: oklch(0.985 0.02 85);
    border-color: oklch(0.88 0.06 85);
}
.import-metrics .metric-tile:nth-child(3) span,
.import-metrics .metric-tile:nth-child(3) strong {
    color: var(--amber-600);
}

.import-metrics .metric-tile:nth-child(4) {
    background: var(--red-100);
    border-color: oklch(0.88 0.07 25);
}
.import-metrics .metric-tile:nth-child(4) span,
.import-metrics .metric-tile:nth-child(4) strong {
    color: var(--red-700);
}

.import-workspace {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    width: fit-content;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 600;
    line-height: 1.2;
}

.status-pill-previewed,
.status-pill-uploaded,
.status-pill-validating,
.status-pill-commit_queued,
.status-pill-committing,
.status-pill-warning {
    background: oklch(0.97 0.03 80);
    color: oklch(0.55 0.1 75);
}

.status-pill-committed,
.status-pill-valid {
    background: var(--green-100);
    color: var(--green-700);
}

.status-pill-failed,
.status-pill-cancelled,
.status-pill-error {
    background: var(--red-100);
    color: var(--red-700);
}

.import-history-scroll-wrapper,
.import-row-scroll-wrapper {
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--line-strong) transparent;
}

.import-history-scroll-wrapper::-webkit-scrollbar,
.import-row-scroll-wrapper::-webkit-scrollbar {
    width: 6px;
}

.import-history-scroll-wrapper::-webkit-scrollbar-track,
.import-row-scroll-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.import-history-scroll-wrapper::-webkit-scrollbar-thumb,
.import-row-scroll-wrapper::-webkit-scrollbar-thumb {
    background-color: var(--line-strong);
    border-radius: 99px;
}

.import-history-scroll-wrapper {
    max-height: 340px;
    padding-right: 4px;
}

.import-row-scroll-wrapper {
    max-height: 520px;
    padding-right: 4px;
}

.import-history-list,
.import-row-list {
    display: grid;
    gap: 8px;
}

.import-history-row {
    display: grid;
    gap: 3px;
    min-width: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    background: var(--surface);
    text-decoration: none;
    transition:
        background-color var(--speed) var(--ease),
        border-color var(--speed) var(--ease);
}

.import-history-row:hover,
.import-history-row.is-active {
    border-color: var(--teal-650);
    background: var(--teal-100);
}

.import-history-row strong {
    color: var(--ink);
    font-size: 0.9rem;
    font-weight: 600;
}

.import-history-row span {
    color: var(--muted);
    font-size: 0.83rem;
    font-weight: 500;
}

.import-row {
    display: grid;
    grid-template-columns: 140px 90px 150px 100px 1fr;
    gap: 14px;
    align-items: center;
    min-width: 0;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    background: var(--surface);
    transition: all var(--speed) var(--ease);
}

.import-row-status-col {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.status-icon {
    flex: 0 0 auto;
}

.status-icon.icon-success {
    color: var(--green-700);
}

.status-icon.icon-warning {
    color: var(--amber-600);
}

.status-icon.icon-error {
    color: var(--red-700);
}

.import-student-id,
.import-action-type,
.import-message {
    font-size: 0.88rem;
    font-weight: 400;
}

.import-row strong {
    font-weight: 600;
    color: var(--ink);
}

.import-row.import-row-valid {
    border-color: var(--green-700);
    background: oklch(0.99 0.005 160);
}

.import-row.import-row-warning {
    border-color: var(--amber-600);
    background: oklch(0.995 0.005 85);
}

.import-row.import-row-invalid {
    border-color: var(--red-700);
    background: oklch(0.99 0.003 25);
}

.status-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.status-actions .primary-action,
.status-actions .secondary-action {
    padding: 0 16px;
}

@media (max-width: 1120px) {
    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .workspace-grid {
        grid-template-columns: 1fr;
    }

    .import-upload-grid,
    .import-workspace {
        grid-template-columns: 1fr;
    }

    .inline-form-grid,
    .record-row,
    .cycle-row {
        grid-template-columns: 1fr 1fr;
    }

    .inline-form-grid .form-actions,
    .record-row .secondary-action,
    .row-actions,
    .cycle-row .field-wide {
        grid-column: 1 / -1;
    }
}

@media (max-width: 860px) {
    .admin-app-shell {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: static;
        min-height: auto;
        gap: 12px;
        padding: 12px;
    }

    .sidebar-brand {
        padding: 4px 2px 10px;
        height: auto;
    }

    .admin-nav {
        display: flex;
        gap: 10px;
        overflow-x: auto;
        padding: 0;
        padding-bottom: 4px;
        scroll-snap-type: x proximity;
    }

    .admin-nav-group {
        display: flex;
        align-items: center;
        gap: 6px;
        flex: 0 0 auto;
    }

    .admin-nav-heading {
        padding: 0 2px;
        white-space: nowrap;
    }

    .admin-nav a {
        flex: 0 0 auto;
        min-height: 38px;
        white-space: nowrap;
        scroll-snap-align: start;
    }

    .admin-main {
        grid-template-rows: auto minmax(0, 1fr);
    }

    .admin-topbar {
        min-height: 58px;
        padding: 10px 14px;
    }

    .admin-profile-trigger {
        max-width: calc(100vw - 28px);
    }

    .dashboard-panel {
        padding: 16px;
    }
}

@media (max-width: 620px) {
    .admin-login-shell,
    .status-shell {
        padding: 16px;
    }

    .login-panel,
    .status-card {
        padding: 24px;
    }

    .login-heading h1,
    .status-card h1 {
        font-size: 1.42rem;
    }

    .form-row,
    .admin-topbar {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-user-label {
        justify-content: flex-start;
        width: 100%;
    }

    .admin-profile-menu,
    .admin-profile-trigger,
    .admin-topbar .secondary-action {
        width: 100%;
    }

    .admin-profile-dropdown {
        left: 0;
        right: auto;
        width: 100%;
    }

    .page-heading {
        min-height: auto;
    }

    .page-heading h1 {
        font-size: 1.42rem;
    }

    .metric-grid,
    .inline-form-grid,
    .cycle-form,
    .record-row,
    .cycle-row,
    .import-row {
        grid-template-columns: 1fr;
    }

    .graduate-filter-grid {
        grid-template-columns: 1fr;
    }

    .graduate-search-field {
        grid-column: auto;
    }

    .detail-list div {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .form-actions,
    .row-actions {
        justify-content: stretch;
    }

    .form-actions .primary-action,
    .row-actions .secondary-action,
    .record-row .secondary-action {
        width: 100%;
    }
}

/* simplified cycle page UX/UI redesign */
.input-with-button-inline {
    display: flex;
    gap: 10px;
    width: 100%;
}

.input-with-button-inline input {
    flex: 1 1 auto;
}

.input-with-button-inline button {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 20px;
}

.cycle-cards-container {
    display: grid;
    gap: 20px;
}

.cycle-card {
    display: block;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-panel);
    background: var(--surface);
    transition: all var(--speed) var(--ease);
}

.cycle-card.is-active-card {
    border-color: var(--green-700);
    box-shadow: 0 0 0 1px var(--green-700);
}

.cycle-card:hover {
    box-shadow: 0 6px 18px oklch(0.24 0.03 280 / 0.04);
}

.cycle-form-layout {
    display: block;
}

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

.cycle-year-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.15rem;
    font-weight: 750;
    color: var(--ink);
}

.badge-active {
    background: var(--green-100);
    color: var(--green-700);
    border: 1px solid var(--green-700);
}

.cycle-system-status {
    display: flex;
    align-items: center;
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    background: var(--surface-subtle);
    font-size: 0.94rem;
    font-weight: 700;
    color: var(--muted-strong);
}

.cycle-system-status-open {
    border-color: var(--green-700);
    background: var(--green-100);
    color: var(--green-700);
}

.cycle-system-status-waiting_to_open {
    border-color: oklch(0.88 0.06 82);
    background: oklch(0.97 0.025 82);
    color: var(--amber-600);
}

.cycle-system-status-closed,
.cycle-system-status-disabled {
    border-color: var(--line);
    background: var(--surface-subtle);
    color: var(--muted-strong);
}

.cycle-card-body {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
    margin-bottom: 20px;
}

.cycle-settings-col h3,
.cycle-dates-col h3 {
    font-size: 1rem;
    font-weight: 750;
    color: var(--ink);
    margin-bottom: 12px;
    padding-bottom: 4px;
    border-bottom: 2px solid var(--lavender-200);
    display: inline-block;
}

.cycle-toggles-vertical {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cycle-toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.94rem;
    font-weight: 650;
    color: var(--muted-strong);
    cursor: pointer;
    user-select: none;
}

.cycle-toggle-label input {
    width: 18px;
    height: 18px;
    accent-color: var(--teal-700);
    cursor: pointer;
}

.dates-selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.date-selector-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: oklch(0.98 0.005 280);
    padding: 12px;
    border-radius: var(--radius-control);
    border: 1px dashed var(--line);
}

.date-selector-group .group-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--muted-strong);
}

.dynamic-date-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.date-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.date-index-label {
    font-size: 0.88rem;
    font-weight: 550;
    color: var(--muted-strong);
    min-width: 52px;
    display: inline-block;
}

.date-row input {
    flex: 1 1 auto;
    min-height: 34px;
    padding: 4px 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    background: var(--surface);
    color: var(--ink);
    font-family: inherit;
    font-size: 0.9rem;
}

.btn-remove-row {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--red-200);
    background: var(--red-100);
    color: var(--red-700);
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
    transition: all var(--speed) var(--ease);
}

.btn-remove-row:hover {
    background: var(--red-200);
    color: var(--red-800);
}

.btn-add-row {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 10px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--teal-700);
    background: transparent;
    border: 1px dashed var(--teal-700);
    border-radius: var(--radius-control);
    cursor: pointer;
    transition: all var(--speed) var(--ease);
    margin-top: 4px;
}

.btn-add-row:hover {
    background: var(--teal-100);
    border-style: solid;
}

.cycle-card-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.btn-save {
    min-height: 40px;
    padding: 0 20px;
}

.activate-form-container {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
}

.btn-activate {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid var(--teal-700);
    border-radius: var(--radius-control);
    background: transparent;
    color: var(--teal-700);
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--speed) var(--ease);
}

.btn-activate:hover {
    background: var(--teal-100);
}

.btn-activate:active {
    transform: translateY(1px);
}

/* Import Search Form Styles */
.import-search-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.import-search-form input[type="text"] {
    min-width: 260px;
    height: 34px;
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    font-size: 0.88rem;
    background: var(--canvas);
    color: var(--ink);
    transition: all var(--speed) var(--ease);
}

.import-search-form select {
    min-width: 190px;
    height: 34px;
    padding: 5px 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    background: var(--canvas);
    color: var(--ink);
    font-size: 0.88rem;
    font-weight: 500;
    transition: all var(--speed) var(--ease);
}

.import-search-form input[type="text"]:focus {
    border-color: var(--navy-900);
    background: var(--white);
    outline: none;
}

.import-search-form select:focus {
    border-color: var(--navy-900);
    background: var(--white);
    outline: none;
}

.btn-search {
    height: 34px;
    padding: 0 14px;
    border: 1px solid var(--navy-900);
    border-radius: var(--radius-control);
    background: var(--navy-900);
    color: var(--white);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--speed) var(--ease);
}

.btn-search:hover {
    background: var(--teal-700);
    border-color: var(--teal-700);
}

.btn-clear-search {
    font-size: 0.88rem;
    color: var(--red-700);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: var(--radius-control);
    transition: background var(--speed) var(--ease);
}

.btn-clear-search:hover {
    background: var(--red-100);
}

/* Pagination Styles */
.pagination-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-top: 1px solid var(--line);
    background: var(--surface-subtle);
    border-bottom-left-radius: var(--radius-panel);
    border-bottom-right-radius: var(--radius-panel);
    margin-top: 12px;
}

.pagination-info {
    font-size: 0.88rem;
    color: var(--muted-strong);
    font-weight: 500;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    background: var(--surface);
    color: var(--ink);
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 500;
    transition: all var(--speed) var(--ease);
}

.pagination-btn:hover:not(.is-disabled) {
    border-color: var(--navy-900);
    background: var(--canvas);
    color: var(--navy-900);
}

.pagination-btn.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
    background: var(--surface-subtle);
    color: var(--muted);
}

.graduate-metrics {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin-bottom: 0;
}

.import-summary-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-presentation-metrics .metric-tile {
    position: relative;
    isolation: isolate;
    min-width: 0;
    min-height: 112px;
    overflow: hidden;
    align-content: end;
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 16px 18px;
}

.admin-presentation-metrics .metric-tile span {
    position: relative;
    z-index: 1;
    min-width: 0;
    color: currentColor;
    font-size: 0.86rem;
    font-weight: 750;
    line-height: 1.35;
    white-space: normal;
}

.admin-presentation-metrics .metric-tile strong {
    position: relative;
    z-index: 1;
    color: currentColor;
    font-size: clamp(1.7rem, 2.2vw, 2.15rem);
    font-weight: 800;
    line-height: 1;
    text-align: left;
}

.metric-bg-icon {
    position: absolute;
    right: -10px;
    bottom: -12px;
    z-index: 0;
    width: 72px;
    height: 72px;
    color: currentColor;
    fill: none;
    opacity: 0.12;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
}

.admin-presentation-metrics .metric-tile:nth-child(1) {
    color: oklch(0.42 0.08 285);
}

.admin-presentation-metrics .metric-tile:nth-child(2) {
    color: var(--green-700);
}

.admin-presentation-metrics .metric-tile:nth-child(3) {
    color: var(--amber-600);
}

.admin-presentation-metrics .metric-tile:nth-child(4) {
    color: var(--red-700);
}

.graduate-metrics .metric-tile:nth-child(5) {
    color: oklch(0.42 0.08 230);
    background: oklch(0.97 0.018 230);
    border-color: oklch(0.86 0.045 230);
}
.graduate-metrics .metric-tile:nth-child(5) span,
.graduate-metrics .metric-tile:nth-child(5) strong {
    color: oklch(0.42 0.08 230);
}

.graduate-metrics .metric-tile:nth-child(6) {
    color: oklch(0.43 0.08 330);
    background: oklch(0.975 0.018 330);
    border-color: oklch(0.87 0.045 330);
}
.graduate-metrics .metric-tile:nth-child(6) span,
.graduate-metrics .metric-tile:nth-child(6) strong {
    color: oklch(0.43 0.08 330);
}

@media (max-width: 1120px) {
    .graduate-metrics,
    .import-summary-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .graduate-metrics,
    .import-summary-metrics {
        grid-template-columns: 1fr;
    }
}

.graduate-list-heading {
    align-items: flex-start;
    flex-wrap: wrap;
}

.graduate-search-form {
    justify-content: flex-end;
    margin-left: auto;
}

.graduate-filter-form {
    display: grid;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-panel);
    background: var(--surface-subtle);
}

.graduate-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 10px;
}

.graduate-search-field {
    grid-column: span 2;
}

.graduate-filter-grid .field > span {
    font-size: 0.78rem;
    font-weight: 700;
}

.graduate-filter-grid input,
.graduate-filter-grid select {
    height: 38px;
    min-height: 38px;
    padding: 7px 10px;
    font-size: 0.86rem;
}

.graduate-filter-actions {
    display: flex;
    align-self: end;
    align-items: stretch;
    justify-content: flex-start;
    gap: 8px;
    min-height: 38px;
}

.graduate-filter-actions .btn-search {
    flex: 1 1 auto;
    height: 38px;
    min-height: 38px;
    min-width: 0;
    width: 100%;
    padding: 0 12px;
}

.graduate-filter-actions .btn-clear-search {
    flex: 0 0 auto;
    height: 38px;
    min-height: 38px;
    background: var(--surface);
    border: 1px solid var(--line);
}

.graduate-table-scroll {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-panel);
    background: var(--surface);
    scrollbar-width: thin;
    scrollbar-color: var(--line-strong) transparent;
}

.graduate-table-scroll::-webkit-scrollbar {
    height: 8px;
}

.graduate-table-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.graduate-table-scroll::-webkit-scrollbar-thumb {
    background-color: var(--line-strong);
    border-radius: 99px;
}

.graduate-table {
    width: 100%;
    min-width: 1220px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.86rem;
}

.graduate-table th,
.graduate-table td {
    padding: 11px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
    white-space: nowrap;
}

.graduate-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--surface-subtle);
    color: var(--muted-strong);
    font-size: 0.78rem;
    font-weight: 750;
}

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

.graduate-table tbody tr {
    transition: background-color var(--speed) var(--ease);
}

.graduate-table tbody tr:hover {
    background: var(--surface-hover);
}

.graduate-table td {
    color: var(--muted-strong);
    font-weight: 500;
}

.graduate-table td strong {
    color: var(--ink);
    font-weight: 750;
}

.graduate-name-cell {
    min-width: 210px;
    color: var(--ink) !important;
    font-weight: 650 !important;
    white-space: normal !important;
}

@media (max-width: 992px) {
    .cycle-card-body {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .graduate-list-heading,
    .graduate-search-form {
        align-items: stretch;
    }

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

    .graduate-search-field {
        grid-column: 1 / -1;
    }

    .graduate-search-form,
    .graduate-search-form input[type="text"],
    .graduate-search-form select,
    .graduate-search-form .btn-search,
    .graduate-search-form .btn-clear-search {
        width: 100%;
    }

    .graduate-filter-actions {
        justify-content: stretch;
    }

    .graduate-filter-actions .btn-search,
    .graduate-filter-actions .btn-clear-search {
        width: 100%;
    }
}

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

/* Graduate Portal Custom Styles */
.portal-welcome {
    margin-bottom: 24px;
}

.portal-welcome h1 {
    font-size: 1.6rem;
    color: var(--navy-900);
    margin: 0 0 8px 0;
    font-weight: 700;
}

.portal-welcome p {
    font-size: 0.95rem;
    color: var(--muted-strong);
    margin: 0;
}

.choice-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.choice-card {
    position: relative;
    border: 2px solid var(--line);
    border-radius: 12px;
    padding: 24px;
    background: var(--surface);
    cursor: pointer;
    transition: all var(--speed) var(--ease);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
}

.choice-card:hover {
    border-color: var(--line-strong);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px oklch(0.24 0.03 280 / 0.05);
}

.choice-card input[type="radio"] {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 20px;
    height: 20px;
    accent-color: var(--teal-700);
}

.choice-card.selected {
    border-color: var(--teal-700);
    background: var(--teal-100);
    box-shadow: 0 0 0 4px oklch(0.62 0.11 285 / 0.15);
}

.choice-card.selected.not-attending {
    border-color: var(--amber-600);
    background: oklch(0.97 0.015 82);
    box-shadow: 0 0 0 4px oklch(0.68 0.11 82 / 0.15);
}

.choice-icon {
    font-size: 2.2rem;
    line-height: 1;
}

.choice-label {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--navy-900);
}

.choice-card.not-attending .choice-label {
    color: var(--muted-strong);
}

.choice-card.selected.not-attending .choice-label {
    color: var(--amber-600);
}

.portal-contact-check {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 22px 0 20px;
    margin: 8px 0 24px;
}

.portal-contact-check-header p {
    color: var(--muted-strong);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: -8px 0 14px;
}

.portal-current-phone {
    align-items: center;
    background: var(--surface-subtle);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 14px;
    padding: 12px 14px;
}

.portal-current-phone span {
    color: var(--muted-strong);
    font-size: 0.9rem;
    font-weight: 500;
}

.portal-current-phone strong {
    color: var(--navy-900);
    font-size: 1rem;
    text-align: right;
}

.contact-phone-options {
    flex-wrap: wrap;
}

.portal-form-section {
    display: none; /* hidden by default, shown via JS */
    border-top: 1px solid var(--line);
    padding-top: 24px;
    margin-top: 24px;
    animation: fadeIn var(--speed) var(--ease);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.portal-form-section.is-active {
    display: block;
}

.form-group-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--navy-900);
    margin: 0 0 16px 0;
}

.radio-group {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}

.radio-control {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
}

.radio-control input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--teal-700);
}

.form-sub-field {
    display: none;
    margin-top: 8px;
    margin-bottom: 16px;
    animation: slideDown var(--speed) var(--ease);
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-sub-field.is-active {
    display: block;
}

.form-sub-field textarea,
.form-sub-field input[type="tel"],
.form-sub-field input[type="text"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    background: var(--surface-subtle);
    transition: all var(--speed) var(--ease);
}

.form-sub-field textarea:focus,
.form-sub-field input[type="tel"]:focus,
.form-sub-field input[type="text"]:focus {
    outline: none;
    border-color: var(--teal-700);
    background: var(--surface);
    box-shadow: 0 0 0 3px oklch(0.62 0.11 285 / 0.1);
}

@media (max-width: 640px) {
    .portal-current-phone {
        align-items: flex-start;
        flex-direction: column;
    }

    .portal-current-phone strong {
        text-align: left;
    }
}

.portal-confirmation {
    background: var(--surface-subtle);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    margin: 24px 0;
}

.portal-status-card {
    border-radius: 12px;
    padding: 24px;
    margin-top: 16px;
    border: 1px solid var(--line);
    background: var(--surface);
}

.portal-status-card.status-attending {
    border-color: var(--teal-700);
    background: linear-gradient(180deg, var(--white) 0%, oklch(0.98 0.01 160) 100%);
    box-shadow: 0 8px 32px oklch(0.52 0.10 160 / 0.05);
}

.portal-status-card.status-not-attending {
    border-color: var(--amber-600);
    background: linear-gradient(180deg, var(--white) 0%, oklch(0.99 0.005 82) 100%);
    box-shadow: 0 8px 32px oklch(0.68 0.11 82 / 0.05);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.status-badge.badge-attending {
    background: oklch(0.94 0.02 160);
    color: var(--green-700);
    border: 1px solid oklch(0.85 0.05 160);
}

.status-badge.badge-not-attending {
    background: oklch(0.97 0.015 82);
    color: var(--amber-600);
    border: 1px solid oklch(0.92 0.03 82);
}

.status-badge.badge-info {
    background: oklch(0.965 0.018 260);
    color: var(--teal-700);
    border: 1px solid oklch(0.86 0.05 245);
}

.status-badge svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.25;
}

.summary-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
    margin: 16px 0;
}

.summary-item {
    border-bottom: 1px dashed var(--line);
    padding-bottom: 8px;
}

.summary-item-wide {
    grid-column: 1 / -1;
}

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

.summary-label {
    font-size: 0.9rem;
    color: var(--muted);
    font-weight: 500;
}

.summary-value {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--navy-900);
    margin-top: 2px;
}

/* Graduate Portal Redesign */
.graduate-portal-shell {
    min-height: 100vh;
    padding: 28px;
    background:
        linear-gradient(180deg, oklch(0.965 0.014 285) 0%, var(--canvas) 46%, oklch(0.98 0.006 280) 100%);
}

.portal-stage {
    width: min(1040px, 100%);
    margin: 0 auto;
}

.portal-panel {
    gap: 0;
    overflow: hidden;
    padding: 0;
    border-color: var(--line-strong);
    border-radius: 12px;
    box-shadow: 0 4px 12px oklch(0.24 0.03 280 / 0.08);
    text-align: left;
}

.portal-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 28px;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
}

.portal-brand-copy {
    font-size: 0.95rem;
}

.portal-logout-button {
    min-height: 40px;
    padding: 8px 16px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-control);
    background: var(--surface);
    color: var(--muted-strong);
    cursor: pointer;
    font-weight: 600;
    transition:
        border-color var(--speed) var(--ease),
        color var(--speed) var(--ease),
        background-color var(--speed) var(--ease);
}

.portal-logout-button:hover {
    border-color: oklch(0.78 0.07 25);
    background: var(--red-100);
    color: var(--red-700);
}

.portal-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
    padding: 30px 28px 26px;
    background:
        linear-gradient(135deg, oklch(0.98 0.012 285) 0%, var(--surface) 72%);
    border-bottom: 1px solid var(--line);
}

.portal-welcome {
    position: relative;
    z-index: 2;
    margin: 0;
}

.portal-period {
    display: inline-flex;
    width: fit-content;
    margin-bottom: 10px;
    padding: 4px 10px;
    border: 1px solid oklch(0.86 0.04 285);
    border-radius: 999px;
    background: var(--teal-100);
    color: var(--teal-700);
    font-size: 0.82rem;
    font-weight: 600;
}

.portal-welcome h1 {
    color: var(--ink);
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 8px;
    text-wrap: balance;
}

.portal-welcome p {
    max-width: 68ch;
    color: var(--muted-strong);
    font-size: 0.98rem;
    line-height: 1.7;
    margin: 0;
    text-wrap: pretty;
}

.portal-hero-illustration {
    position: relative;
    z-index: 1;
    width: 260px;
    max-width: 32vw;
    opacity: 0.85;
}

.portal-hero-illustration svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.portal-hero-illustration path,
.portal-hero-illustration circle {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.portal-illustration-halo {
    stroke: oklch(0.9 0.035 285);
    stroke-width: 14;
}

.portal-illustration-cap,
.portal-illustration-diploma {
    stroke: var(--teal-700);
    stroke-width: 5;
}

.portal-illustration-tassel {
    stroke: var(--amber-600);
    stroke-width: 5;
}

.portal-illustration-seal {
    stroke: var(--green-700);
    stroke-width: 4;
}

.portal-profile-details {
    display: grid;
    grid-template-columns: minmax(230px, 0.75fr) minmax(0, 2fr);
    gap: 12px;
    align-items: start;
    margin: 0;
    padding: 18px 28px;
    border-bottom: 1px solid var(--line);
    background: var(--surface-subtle);
    font-size: 0.95rem;
}

.profile-identity {
    position: relative;
    display: grid;
    align-content: center;
    gap: 5px;
    min-width: 0;
    min-height: 100%;
    overflow: hidden;
    padding: 16px 18px;
    border: 1px solid oklch(0.84 0.035 285);
    border-radius: 10px;
    background:
        linear-gradient(135deg, var(--surface) 0%, oklch(0.972 0.016 285) 100%);
}

.profile-identity-label {
    position: relative;
    z-index: 1;
    color: var(--teal-700);
    font-size: 0.82rem;
    font-weight: 600;
}

.profile-identity strong {
    position: relative;
    z-index: 1;
    overflow-wrap: anywhere;
    color: var(--ink);
    font-size: 1.22rem;
    font-weight: 700;
    line-height: 1.35;
}

.profile-identity-watermark {
    position: absolute;
    right: -12px;
    bottom: -1px;
    width: 116px;
    height: auto;
    color: var(--teal-700);
    opacity: 0.11;
    pointer-events: none;
}

.profile-identity-watermark path,
.profile-identity-watermark circle {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 5;
}

.profile-detail-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.profile-detail {
    min-width: 0;
    padding: 12px 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.profile-detail-wide {
    grid-column: span 2;
}

.profile-detail dt {
    display: block;
    color: var(--muted-strong);
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 4px;
}

.profile-detail dd {
    display: block;
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--ink);
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1.45;
}

.portal-panel .login-alert {
    margin: 22px 28px 0;
}

.portal-declaration-form {
    display: grid;
    gap: 22px;
    padding: 28px;
}

.portal-declaration-form:not(.is-choice-made) .portal-flow-after-choice {
    display: none;
}

.portal-section-heading {
    display: grid;
    gap: 4px;
}

.portal-section-heading > span,
.portal-contact-check-header span {
    color: var(--teal-700);
    font-size: 0.8rem;
    font-weight: 600;
}

.portal-section-heading .form-group-title,
.portal-contact-check .form-group-title,
.portal-form-section .form-group-title {
    margin: 0;
    color: var(--ink);
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.4;
}

.choice-container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
}

.choice-card {
    align-items: flex-start;
    min-height: 142px;
    padding: 20px 54px 20px 20px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: none;
    gap: 8px;
    text-align: left;
}

.choice-card:hover {
    border-color: var(--teal-650);
    box-shadow: none;
    transform: translateY(-1px);
}

.choice-card input[type="radio"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
    opacity: 0;
}

.choice-card.selected {
    border-color: var(--teal-700);
    background: oklch(0.975 0.018 285);
    box-shadow: inset 0 0 0 1px var(--teal-700);
}

.choice-card.selected.not-attending {
    border-color: var(--amber-600);
    background: oklch(0.985 0.014 82);
    box-shadow: inset 0 0 0 1px var(--amber-600);
}

.choice-icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 50%;
    background: var(--teal-100);
    color: var(--teal-700);
    font-size: 1.1rem;
    font-weight: 700;
}

.choice-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.choice-card.not-attending .choice-icon {
    background: oklch(0.97 0.015 82);
    color: var(--amber-600);
}

.choice-label {
    color: var(--ink);
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.35;
}

.choice-card.not-attending .choice-label,
.choice-card.selected.not-attending .choice-label {
    color: var(--ink);
}

.choice-copy {
    color: var(--muted-strong);
    font-size: 0.9rem;
    line-height: 1.55;
}

.portal-contact-check {
    display: grid;
    grid-template-columns: minmax(260px, 0.95fr) minmax(420px, 1.35fr);
    align-items: start;
    gap: 16px 20px;
    margin: 0;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-subtle);
}

.portal-contact-check-header p {
    margin: 4px 0 0;
    color: var(--muted-strong);
    font-size: 0.92rem;
}

.portal-contact-control {
    display: grid;
    grid-template-columns: minmax(220px, 0.95fr) auto;
    gap: 10px;
    align-items: stretch;
}

.portal-current-phone {
    display: grid;
    grid-template-columns: 34px 1fr;
    grid-template-rows: auto auto;
    column-gap: 10px;
    align-items: center;
    min-height: 54px;
    margin: 0;
    padding: 10px 14px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: var(--surface);
}

.portal-phone-mark {
    grid-row: 1 / span 2;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: oklch(0.965 0.018 196);
    color: var(--teal-700);
}

.portal-phone-mark svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
}

.portal-current-phone-label {
    color: var(--muted-strong);
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.25;
}

.portal-current-phone strong {
    color: var(--ink);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.25;
    font-variant-numeric: tabular-nums;
    text-align: left;
}

.contact-phone-options {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(116px, auto);
    gap: 8px;
}

.contact-phone-options .radio-control {
    display: grid;
    place-items: center;
    min-height: 54px;
    width: auto;
    padding: 9px 14px;
    text-align: center;
    white-space: nowrap;
}

#contact-phone-update-field {
    grid-column: 2;
    max-width: 560px;
}

.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 0;
}

.radio-group.contact-phone-options {
    display: grid;
}

.radio-control {
    position: relative;
    min-height: 40px;
    padding: 9px 14px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    box-shadow: inset 0 0 0 1px transparent;
    font-size: 0.92rem;
    font-weight: 500;
    isolation: isolate;
    transition:
        border-color var(--speed) var(--ease),
        background-color var(--speed) var(--ease),
        box-shadow var(--speed) var(--ease),
        color var(--speed) var(--ease);
}

.radio-control:hover {
    border-color: var(--teal-650);
    background: oklch(0.985 0.006 285);
}

.radio-control input[type="radio"] {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
    opacity: 0;
}

.radio-control span {
    position: relative;
    z-index: 2;
}

.radio-control:has(input[type="radio"]:checked) {
    border-color: var(--teal-700);
    background: var(--teal-100);
    box-shadow: inset 0 0 0 1px var(--teal-700);
    color: var(--teal-700);
    font-weight: 600;
}

.radio-control:has(input[type="radio"]:focus-visible),
.choice-card:has(input[type="radio"]:focus-visible) {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

.portal-form-section {
    display: none;
    margin: 0;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    animation: fadeIn var(--speed) var(--ease);
}

.portal-form-section.is-active {
    display: grid;
    gap: 18px;
}

.portal-question {
    gap: 10px;
    padding-top: 0;
}

.portal-question + .portal-question {
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.portal-question > label {
    color: var(--ink);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.65;
}

.field-help,
.form-sub-field label {
    color: var(--muted-strong);
    font-size: 0.88rem;
    line-height: 1.55;
}

.field-help {
    margin: -2px 0 0;
}

.form-sub-field {
    width: 100%;
    margin: 0;
}

.form-sub-field.is-active {
    display: grid;
    gap: 6px;
}

.form-sub-field textarea,
.form-sub-field input[type="tel"],
.form-sub-field input[type="text"],
#not_attend_reason {
    min-height: 46px;
    padding: 11px 13px;
    border-color: var(--line-strong);
    background: var(--surface);
    color: var(--ink);
}

#not_attend_reason {
    min-height: 108px;
}

.portal-confirmation {
    margin: 2px 0 0;
    padding: 16px;
    border-radius: 10px;
    background: oklch(0.965 0.014 285);
}

.portal-confirm-check {
    cursor: pointer;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    text-align: left;
}

.portal-confirm-check input {
    margin-top: 4px;
}

.portal-confirm-check span {
    color: var(--ink);
    font-size: 0.94rem;
    font-weight: 600;
    line-height: 1.65;
}

.portal-submit-button {
    width: 100%;
    min-height: 52px;
    font-size: 1.03rem;
    font-weight: 700;
}

.portal-status-card {
    margin: 28px;
    padding: 24px;
    border-radius: 10px;
    box-shadow: none;
}

.portal-status-card.status-attending {
    border-color: oklch(0.78 0.07 160);
    background: oklch(0.985 0.01 160);
}

.portal-status-card.status-not-attending {
    border-color: oklch(0.86 0.08 82);
    background: oklch(0.99 0.012 82);
}

.portal-status-card.status-info {
    border-color: oklch(0.84 0.05 245);
    background: oklch(0.985 0.01 250);
}

.status-badge {
    margin-bottom: 18px;
    border-radius: 999px;
}

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

.summary-item {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.summary-item:last-child {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.summary-label {
    color: var(--muted-strong);
    font-size: 0.8rem;
    font-weight: 500;
}

.summary-value {
    overflow-wrap: anywhere;
    color: var(--ink);
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1.55;
}

.summary-value-attending {
    color: var(--green-700);
}

.summary-value-not-attending {
    color: var(--amber-600);
}

.summary-value-info {
    color: var(--teal-700);
}

.portal-edit-footer {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid oklch(0.88 0.03 245);
    border-radius: 8px;
    background: oklch(0.975 0.008 250);
    color: var(--muted-strong);
    font-size: 0.9rem;
    line-height: 1.55;
}

.portal-edit-footer svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    margin-top: 2px;
    fill: none;
    stroke: var(--teal-700);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.1;
}

.portal-edit-footer strong {
    display: block;
    color: var(--ink);
    font-size: 0.92rem;
    font-weight: 600;
}

.portal-edit-footer span {
    display: block;
}

.summary-value-muted {
    color: var(--muted-strong);
    font-size: 0.9rem;
}

.portal-rehearsal-card {
    display: grid;
    gap: 10px;
    margin-top: 0;
    border-color: var(--line-strong);
    background: var(--surface-subtle);
}

.portal-rehearsal-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink);
    font-size: 1.05rem;
    font-weight: 700;
}

.portal-rehearsal-card p {
    color: var(--muted-strong);
    font-size: 0.94rem;
    line-height: 1.7;
    margin: 0;
}

@media (max-width: 820px) {
    .graduate-portal-shell {
        padding: 14px;
    }

    .portal-topbar,
    .portal-hero,
    .portal-profile-details,
    .portal-declaration-form {
        padding-left: 18px;
        padding-right: 18px;
    }

    .portal-hero {
        grid-template-columns: 1fr;
    }

    .portal-hero-illustration {
        display: none;
    }

    .portal-profile-details {
        grid-template-columns: 1fr;
    }

    .profile-detail,
    .profile-detail-wide {
        grid-column: auto;
    }

    .profile-detail-list {
        grid-template-columns: 1fr 1fr;
    }

    .choice-container,
    .summary-list {
        grid-template-columns: 1fr;
    }

    .portal-contact-check {
        grid-template-columns: 1fr;
    }

    .portal-contact-control {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    #contact-phone-update-field {
        grid-column: 1;
        max-width: none;
    }

    .portal-status-card {
        margin: 18px;
    }
}

@media (max-width: 560px) {
    .graduate-portal-shell {
        padding: 0;
        background: var(--surface);
    }

    .portal-panel {
        min-height: 100vh;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .portal-topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .portal-logout-button {
        width: 100%;
    }

    .portal-welcome h1 {
        font-size: 1.45rem;
    }

    .portal-declaration-form {
        gap: 18px;
    }

    .profile-detail-list {
        grid-template-columns: 1fr;
    }

    .choice-card {
        min-height: auto;
        padding: 18px 48px 18px 18px;
    }

    .radio-group {
        flex-direction: column;
    }

    .contact-phone-options {
        grid-auto-flow: row;
        grid-auto-columns: 1fr;
        grid-template-columns: 1fr;
    }

    .portal-contact-control {
        grid-template-columns: 1fr;
    }

    .radio-control {
        width: 100%;
    }

    .portal-current-phone {
        grid-template-columns: 34px 1fr;
    }

    .portal-current-phone strong {
        text-align: left;
    }
}

.table-action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    background: var(--surface);
    color: var(--teal-700);
    font-size: 0.86rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition:
        background-color var(--speed) var(--ease),
        border-color var(--speed) var(--ease),
        color var(--speed) var(--ease);
}

.table-action-link:hover {
    border-color: var(--teal-650);
    background: var(--teal-100);
    color: var(--navy-900);
}

.graduate-edit-heading {
    align-items: flex-end;
}

.graduate-edit-heading p {
    margin: 6px 0 0;
    color: var(--muted-strong);
    font-size: 0.94rem;
    font-weight: 500;
}

.graduate-edit-summary {
    display: grid;
    grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.4fr);
    gap: 22px;
    align-items: center;
}

.graduate-edit-identity {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.graduate-edit-avatar {
    display: grid;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 50%;
    background: var(--teal-100);
    color: var(--teal-700);
    font-size: 1.08rem;
    font-weight: 800;
}

.graduate-edit-identity h2 {
    margin: 0;
    color: var(--ink);
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.35;
}

.graduate-edit-identity p {
    margin: 3px 0 0;
    color: var(--muted-strong);
    font-size: 0.9rem;
}

.graduate-edit-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
}

.graduate-edit-meta div {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.graduate-edit-meta dt {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
}

.graduate-edit-meta dd {
    margin: 0;
    color: var(--ink);
    font-size: 0.9rem;
    font-weight: 650;
    overflow-wrap: anywhere;
}

.graduate-edit-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.85fr);
    gap: 18px;
    align-items: start;
}

.graduate-edit-card {
    min-width: 0;
}

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

.graduate-edit-section {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.graduate-edit-wide {
    grid-column: 1 / -1;
}

.graduate-edit-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 2px;
}

.graduate-edit-actions .primary-action {
    min-width: 180px;
    padding: 0 22px;
}

.graduate-registration-heading {
    align-items: flex-start;
    gap: 12px;
}

.graduate-registration-heading p {
    margin: 4px 0 0;
    color: var(--muted-strong);
    font-size: 0.88rem;
    line-height: 1.55;
}

.override-chip {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--surface-subtle);
    color: var(--muted-strong);
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.intent-radio-group {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
    padding: 0;
    border: 0;
}

.intent-radio-group legend {
    grid-column: 1 / -1;
    margin-bottom: 2px;
    color: var(--ink);
    font-size: 0.9rem;
    font-weight: 700;
}

.intent-radio {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    background: var(--surface);
    color: var(--muted-strong);
    font-size: 0.88rem;
    font-weight: 650;
    cursor: pointer;
}

.intent-radio:has(input:checked) {
    border-color: var(--teal-650);
    background: var(--teal-100);
    color: var(--teal-700);
}

.intent-radio input {
    width: 16px;
    height: 16px;
    accent-color: var(--teal-700);
}

.registration-conditional {
    display: grid;
    gap: 13px;
}

.registration-conditional[hidden] {
    display: none;
}

@media (max-width: 1180px) {
    .graduate-edit-summary,
    .graduate-edit-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .graduate-edit-heading {
        align-items: stretch;
    }

    .graduate-edit-heading .secondary-action {
        width: 100%;
    }

    .graduate-edit-meta,
    .graduate-edit-section,
    .intent-radio-group {
        grid-template-columns: 1fr;
    }

    .graduate-edit-actions {
        justify-content: stretch;
    }

    .graduate-edit-actions .primary-action {
        width: 100%;
    }
}
