/* Shared portal chrome. Exam screens and the student landing are not themed. */
.access-portal {
  --bg: #101927;
  --panel: #192637;
  --ink: #e9f0fb;
  --muted: #b0c0d4;
  --line: #35465c;
  --brand: #83d5d1;
  --brand-dark: #a1e3df;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  color-scheme: dark;
}
.portal-header { background: #192637; border-bottom: 1px solid #35465c; }
.portal-header-inner { max-width: 1120px; margin: auto; padding: 23px 32px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.portal-logo { display: block; width: 152px; height: 44px; object-fit: contain; filter: brightness(0) invert(1); }
.portal-back { display: inline-flex; align-items: center; min-height: 44px; color: #b0c0d4; font-size: 13px; text-decoration: none; overflow-wrap: anywhere; }
.portal-back:hover { color: #83d5d1; text-decoration: underline; }
.portal-footer { padding: 20px 24px; text-align: center; font-size: 12px; color: #b0c0d4; border-top: 1px solid #35465c; overflow-wrap: anywhere; }
.access-portal .billing { width: 100%; max-width: 1040px; flex: 1; padding: 32px; margin: 0 auto; min-width: 0; }
.access-portal .billing-head { display: block; border: 0; padding: 0; margin: 0 0 22px; text-align: center; }
.portal-eyebrow { font-size: 11px; font-weight: 700; color: #83d5d1; margin: 0 0 10px; }
.access-portal .billing-head h1 { font-size: 30px; line-height: 1.25; letter-spacing: 0; }
.access-portal .billing-auth { width: 100%; max-width: 500px; margin: 0 auto; padding: 22px 0 36px; gap: 19px; }
.access-portal .billing-auth label { color: #e9f0fb; font-size: 13px; font-weight: 600; gap: 8px; min-width: 0; }
.access-portal input:not([type=radio]) { width: 100%; min-width: 0; min-height: 46px; background: #192637; color: #e9f0fb; border: 1px solid #35465c; border-radius: 8px; padding: 11px 12px; font-size: 16px; }
.access-portal .billing-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 6px; background: #192637; border: 1px solid #35465c; border-radius: 8px; }
.access-portal .billing-modes label { justify-content: center; display: flex; align-items: center; padding: 12px 5px; border: 1px solid transparent; border-radius: 6px; cursor: pointer; }
.access-portal .billing-modes label:has(input:checked) { background: #213d40; border-color: #83d5d1; }
.access-portal .billing-modes input { accent-color: #83d5d1; width: 16px; height: 16px; margin: 0; }
.access-portal button { min-height: 44px; border-radius: 8px; background: #83d5d1; color: #102e32; border: 1px solid transparent; }
.access-portal button:hover { background: #a1e3df; }
.access-portal .secondary-button { color: #e9f0fb; background: #192637; border: 1px solid #35465c; }
.access-portal .secondary-button:hover { background: #213d40; }
.access-portal .billing a { color: #83d5d1; }
.access-portal .billing-status { max-width: 700px; margin: 0 auto; color: #b0c0d4; text-align: center; line-height: 1.5; }
.access-portal .billing-status:empty { display: none; }
.access-portal #billingAccount { padding-top: 20px; min-width: 0; }
.access-portal #billingAccount h2 { font-size: 20px; line-height: 1.4; overflow-wrap: anywhere; margin: 26px 0 10px; }
.access-portal #billingAccountName { margin-top: 0; }
.access-portal #billingValidity, .access-portal #billingAvailability { color: #b0c0d4; line-height: 1.5; }
.access-portal .billing-plan { background: #192637; border-color: #35465c; border-radius: 8px; min-width: 0; overflow-wrap: anywhere; }
.access-portal .billing-plan strong { color: #83d5d1; }
.access-portal .billing-plan p { color: #b0c0d4; }
.access-portal .billing-table-wrap { border: 1px solid #35465c; border-radius: 8px; }
.access-portal .billing-table th { background: #192637; color: #b0c0d4; }
.access-portal .billing-table td, .access-portal .billing-table th { border-color: #35465c; padding: 14px 12px; }
.access-portal :is(button,input,a):focus-visible, .admin-portal:not(.exam-active) :is(button,input,summary,a):focus-visible { outline: 3px solid #83d5d1; outline-offset: 3px; }

.admin-portal:not(.exam-active) { background: #101927; }
.admin-portal:not(.exam-active) > .app-shell > .topbar { border-bottom: 1px solid #35465c; padding: 0 0 20px; margin-bottom: 24px; }
.admin-portal:not(.exam-active) .topbar .app-logo { filter: brightness(0) invert(1); }
.admin-portal:not(.exam-active) .topbar .exam-meta { display: none; }
.admin-portal.exam-active .topbar .portal-back { display: none; }
.admin-portal #startScreen { min-height: 65svh; background: transparent; border: 0; padding: 40px 24px; color: #e9f0fb; grid-template-columns: minmax(0,1fr) minmax(0,440px); align-items: center; gap: 38px; }
.admin-portal #startScreen .start-copy { align-self: start; padding-top: 18px; }
.admin-portal #startScreen .start-title { font-size: 32px; line-height: 1.25; margin: 12px 0; }
.admin-portal #startScreen .eyebrow { color: #83d5d1; font-size: 11px; }
.admin-portal #startScreen .start-copy p:last-child { color: #b0c0d4; font-size: 15px; }
.admin-portal .portal-entry-actions { min-width: 0; }
.admin-portal #adminOpenButton { width: 100%; min-height: 50px; background: #83d5d1; color: #102e32; }
.admin-portal #adminOpenButton:hover { background: #a1e3df; }
.admin-portal #startScreen .admin-login-note { position: static; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin: 14px 0 28px; color: #b0c0d4; }
.admin-portal #adminLoginLink { color: #83d5d1; padding: 8px 0; min-height: 44px; }
.admin-portal #adminLoginState { color: #b0c0d4; }
.admin-portal .portal-practice { border-top: 1px solid #35465c; padding-top: 16px; }
.admin-portal .portal-practice summary { color: #b0c0d4; cursor: pointer; min-height: 44px; padding: 10px 0; font-size: 14px; }
.admin-portal .portal-practice .start-form { padding-top: 16px; }
.admin-portal #startScreen .start-form label { color: #b0c0d4; font-size: 13px; }
.admin-portal #startScreen :is(input,select) { background: #192637; color: #e9f0fb; border-color: #35465c; color-scheme: dark; min-width: 0; width: 100%; font-size: 16px; }
.admin-portal #startScreen .start-form button { min-height: 44px; background: #213d40; color: #e9f0fb; border: 1px solid #35465c; }
.admin-portal #startScreen .start-footer { position: static; grid-column: 1 / -1; text-align: center; color: #b0c0d4; font-size: 12px; overflow-wrap: anywhere; margin: 22px 0 0; }
.admin-portal #adminLoginDialog { background: #192637; color: #e9f0fb; border: 1px solid #35465c; border-radius: 8px; color-scheme: dark; width: min(460px, calc(100% - 32px)); }
.admin-portal #adminLoginDialog::backdrop { background: #060d18b3; }
.admin-portal #adminLoginDialog h3 { font-size: 22px; margin: 0 0 12px; }
.admin-portal #adminLoginDialog label { color: #b0c0d4; }
.admin-portal #adminLoginDialog input { background: #101927; border-color: #35465c; color: #e9f0fb; min-width: 0; width: 100%; font-size: 16px; min-height: 46px; }
.admin-portal #adminLoginDialog button { min-height: 44px; background: #83d5d1; color: #102e32; }
.admin-portal #adminLoginDialog .secondary-button { background: transparent; color: #e9f0fb; border-color: #35465c; }
.admin-portal #adminLoginError { color: #ffb7c1; }
.admin-portal #adminScreen { border-radius: 8px; }
.admin-portal #adminScreen .admin-head { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.admin-portal #adminScreen .admin-layout.question-layout { grid-template-columns: minmax(200px,.8fr) minmax(230px,1fr) minmax(0,1.6fr); }
@media (max-width: 1100px) {
  .admin-portal #adminScreen .admin-layout,
  .admin-portal #adminScreen .admin-layout.question-layout { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 700px) {
  .portal-header-inner { padding: 18px 20px; gap: 14px; }
  .portal-logo { width: 130px; }
  .portal-back { text-align: right; font-size: 12px; max-width: 135px; }
  .access-portal .billing { padding: 28px 20px; }
  .access-portal .billing-head h1 { font-size: 26px; }
  .admin-portal #startScreen { grid-template-columns: minmax(0,1fr); padding: 16px 4px 24px; gap: 20px; }
  .admin-portal #startScreen .start-title { font-size: 27px; }
  .admin-portal:not(.exam-active) .topbar { flex-direction: row; align-items: center; }
  .admin-portal #adminScreen { padding: 20px 16px; }
}
