/* SRTTS - Login/Register theme that matches the landing page. Loaded LAST in index.php (after landing-3d.css). */
/* =====================================================================
   LOGIN / REGISTER - matches the landing page (dark navy glass, electric blue,
   cyan + violet accents). Palette values mirror --l3d-* in landing-3d.css.
   ===================================================================== */
.auth-modal {
  --v: #4f7cff;                 /* landing primary */
  --v6: #2f4fc4;                /* landing primary-dark */
  --v1: rgba(79, 124, 255, .16);
  --ink: #e8ecff;
  --mut: #9aa3c7;
  --line: rgba(255, 255, 255, .12);
  --a-cyan: #22d3ee;
  --a-violet: #8b5cf6;
  /* field tokens used by the shared form rules above */
  --input-bg: rgba(255, 255, 255, .06);
  --input-border: rgba(255, 255, 255, .16);
  --text-subtle: #c3caf0;
  --brand-ring: rgba(79, 124, 255, .35);
  color-scheme: dark;
  font-family: Inter, system-ui, sans-serif;
  background: rgba(6, 9, 24, .82);
  backdrop-filter: blur(8px);
}

.auth-stage {
  background: linear-gradient(160deg, #0e1538 0%, #080c26 100%);
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 0 70px rgba(79, 124, 255, .18);
}

.auth-modal h1,
.ov h2 {
  font-family: "Space Grotesk", Inter, sans-serif;
  color: #fff;
}

/* sliding colour panel = landing's blue -> violet gradient */
.auth-overlay {
  background: linear-gradient(145deg, #4f7cff 0%, #8b5cf6 100%);
}

.auth-overlay::before {
  background: rgba(255, 255, 255, .12);
}

.auth-overlay::after {
  background: rgba(34, 211, 238, .38);
}

.ov-logo-card {
  background: linear-gradient(135deg, #ffffff, #e9e6ff);
  box-shadow: 0 8px 22px rgba(10, 16, 60, .35), 0 0 0 1px rgba(255, 255, 255, .4);
}

/* close buttons */
.auth-stage[data-mode="register"] .auth-close,
.auth-stage[data-mode="login"] .auth-close {
  background: rgba(255, 255, 255, .12);
  color: #fff;
}

.auth-stage[data-mode="register"] .auth-close:hover,
.auth-stage[data-mode="login"] .auth-close:hover {
  background: rgba(255, 255, 255, .24);
}

/* fields */
.auth-modal .form-control {
  color: #fff;
  background: var(--input-bg);
  border-color: var(--input-border);
}

.auth-modal .form-control::placeholder {
  color: #7c86b0;
  opacity: 1;
}

.auth-modal .form-control:hover {
  border-color: rgba(79, 124, 255, .7);
}

.auth-modal .form-control:focus {
  background: rgba(255, 255, 255, .09);
  border-color: var(--v);
  box-shadow: 0 0 0 4px rgba(79, 124, 255, .3);
}

.auth-modal select.form-control option {
  background: #0e1538;
  color: #fff;
}

.auth-modal .form-control:-webkit-autofill,
.auth-modal .form-control:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff;
  caret-color: #fff;
  box-shadow: 0 0 0 40px #141c47 inset;
  transition: background-color 9999s ease-out 0s;
}

/* primary button: same 3D blue button as "Login Portal" on the landing page */
.auth-modal .btn-primary {
  color: #fff;
  background: linear-gradient(180deg, #6a92ff, #4f7cff);
  box-shadow: 0 4px 0 #2f4fc4, 0 12px 26px rgba(79, 124, 255, .35);
  transform: translateY(0);
  transition: transform .15s, box-shadow .15s, filter .2s;
}

.auth-modal .btn-primary:hover {
  background: linear-gradient(180deg, #6a92ff, #4f7cff);
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #2f4fc4, 0 16px 32px rgba(79, 124, 255, .4);
}

.auth-modal .btn-primary:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #2f4fc4, 0 6px 14px rgba(79, 124, 255, .3);
}

.auth-modal .btn-primary:focus-visible,
.auth-modal .btn-ghost:focus-visible,
.auth-close:focus-visible {
  outline: 3px solid #22d3ee;
  outline-offset: 3px;
}

.btn-ghost:hover {
  background: #fff;
  color: #2f4fc4;
}

/* links readable on dark */
.link-btn,
.auth-alt a {
  color: #8fb0ff;
}

.link-btn:hover,
.auth-alt a:hover {
  color: #22d3ee;
}

/* year-level chips */
.year-chips label {
  background: rgba(255, 255, 255, .05);
  border-color: rgba(255, 255, 255, .16);
  color: #c3caf0;
}

.year-chips label:hover {
  background: rgba(79, 124, 255, .16);
  border-color: var(--v);
  color: #fff;
}

.year-chips input:checked + label {
  background: linear-gradient(145deg, #4f7cff, #8b5cf6);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 16px rgba(79, 124, 255, .4);
}

.year-chips input:focus-visible + label {
  outline: 3px solid #22d3ee;
}

/* error alert + demo box */
.auth-modal .alert {
  background: rgba(239, 68, 68, .12);
  color: #ffb4b4;
  border: 1px solid rgba(239, 68, 68, .38);
}

.demo code {
  background: rgba(79, 124, 255, .18);
  color: #cfe0ff;
}

@media (max-width: 760px) {
  .auth-stage .auth-close {
    background: rgba(255, 255, 255, .14) !important;
    color: #fff !important;
  }
}


/* Program dropdown (grouped by college) */
.auth-modal select.form-control {
  padding-right: 12px;
  cursor: pointer;
  text-overflow: ellipsis;
}

.auth-modal select.form-control:invalid {
  color: #7c86b0;
}

.auth-modal select.form-control optgroup {
  background: #0b1130;
  color: #8fb0ff;
  font-style: normal;
  font-weight: 700;
}

.auth-modal select.form-control option {
  background: #0e1538;
  color: #fff;
  font-weight: 400;
}

.auth-modal select.form-control option:disabled {
  color: #7c86b0;
}


/* ---------------------------------------------------------------------
   Program picker - black text on white, searchable, grouped by college
   --------------------------------------------------------------------- */

/* fallback native list (if JavaScript is off): also black on white */
.auth-modal select.form-control option {
  background: #fff;
  color: #111;
}

.auth-modal select.form-control optgroup {
  background: #F3F4F6;
  color: #374151;
}

.auth-modal select.form-control option:disabled {
  color: #6B7280;
}

/* real <select> stays in the form for the value + required check, but is hidden */
.pp {
  position: relative;
}

.pp.is-enhanced select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
}

.pp-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 40px;
  padding: 0 12px 0 14px;
  border: 1.5px solid var(--input-border);
  border-radius: 10px;
  background: var(--input-bg);
  color: #7c86b0;
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.pp-trigger:hover {
  border-color: rgba(79, 124, 255, .7);
}

.pp-trigger:focus-visible,
.pp-trigger[aria-expanded="true"] {
  outline: 0;
  background: rgba(255, 255, 255, .09);
  border-color: #4f7cff;
  box-shadow: 0 0 0 4px rgba(79, 124, 255, .3);
}

.pp-trigger.pp-invalid {
  border-color: #f87171;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, .25);
}

.pp-trigger-text {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  overflow: hidden;
  white-space: nowrap;
}

.pp-t-code {
  flex: none;
  color: #fff;
  font-weight: 800;
}

.pp-t-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #c3caf0;
}

.pp-chev {
  flex: none;
  color: #9aa3c7;
  transition: transform .18s ease;
}

.pp-trigger[aria-expanded="true"] .pp-chev {
  transform: rotate(180deg);
}

/* the white panel (lives on <body>, so colours are explicit) */
.pp-panel {
  position: fixed;
  z-index: 2100;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  color: #111;
  color-scheme: light;
  font-family: Inter, system-ui, sans-serif;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .5), 0 0 0 1px rgba(0, 0, 0, .1);
}

.pp-panel[hidden] {
  display: none;
}

.pp-search {
  position: relative;
  flex: none;
  padding: 10px;
  background: #fff;
  border-bottom: 1px solid #E5E7EB;
}

.pp-search-ico {
  position: absolute;
  left: 21px;
  top: 50%;
  transform: translateY(-50%);
  color: #6B7280;
  pointer-events: none;
}

.pp-input {
  width: 100%;
  height: 38px;
  padding: 0 14px 0 38px;
  border: 1.5px solid #D1D5DB;
  border-radius: 9999px;
  background: #fff;
  color: #111;
  font: inherit;
  font-size: 14px;
  box-sizing: border-box;
}

.pp-input::placeholder {
  color: #6B7280;
}

.pp-input:focus {
  outline: 0;
  border-color: #111;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, .1);
}

.pp-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 6px 8px;
  overscroll-behavior: contain;
  background: #fff;
}

.pp-grp + .pp-grp {
  margin-top: 4px;
  border-top: 1px solid #F0F0F0;
}

.pp-group {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 12px 10px 6px;
  background: #fff;
  color: #6B7280;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1.35;
  text-transform: uppercase;
}

.pp-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 10px;
  color: #111;
  font-size: 14px;
  cursor: pointer;
}

.pp-opt.is-active {
  background: #F3F4F6;
}

.pp-code {
  flex: none;
  min-width: 78px;
  padding: 3px 8px;
  border: 1px solid #D1D5DB;
  border-radius: 7px;
  background: #F9FAFB;
  color: #111;
  font-size: 12.5px;
  font-weight: 800;
  text-align: center;
}

.pp-name {
  flex: 1;
  min-width: 0;
  color: #111827;
  line-height: 1.35;
}

.pp-check {
  flex: none;
  display: none;
}

.pp-opt[aria-selected="true"] {
  background: #111;
  color: #fff;
}

.pp-opt[aria-selected="true"] .pp-code {
  background: #2A2A2A;
  border-color: #4B4B4B;
  color: #fff;
}

.pp-opt[aria-selected="true"] .pp-name {
  color: #fff;
  font-weight: 600;
}

.pp-opt[aria-selected="true"] .pp-check {
  display: block;
}

.pp-empty {
  padding: 22px 16px 26px;
  color: #6B7280;
  font-size: 14px;
  text-align: center;
}

@media (max-width: 520px) {
  .pp-code {
    min-width: 66px;
  }

  .pp-opt {
    padding: 11px 10px;
  }
}


/* =====================================================================
   BLACK & WHITE FORM - white pane, black text, black buttons.
   (the sliding colour panel with the logo keeps the landing gradient)
   ===================================================================== */
.auth-modal {
  --ink: #111111;
  --mut: #6B7280;
  --line: #E5E7EB;
  --input-bg: #FFFFFF;
  --input-border: #D1D5DB;
  --text-subtle: #374151;
  --brand-ring: rgba(0, 0, 0, .12);
  color-scheme: light;
}

.auth-stage {
  background: #FFFFFF;
  border: 0;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
}

.auth-pane h1,
.auth-modal .auth-pane h1 {
  color: #111;
}

.auth-modal .auth-sub {
  color: #6B7280;
}

.auth-modal .form-label {
  color: #374151;
}

/* fields */
.auth-modal .form-control {
  color: #111;
  background: #fff;
  border-color: #D1D5DB;
}

.auth-modal .form-control::placeholder {
  color: #9CA3AF;
}

.auth-modal .form-control:hover {
  border-color: #111;
}

.auth-modal .form-control:focus {
  background: #fff;
  border-color: #111;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, .12);
}

.auth-modal .form-control:-webkit-autofill,
.auth-modal .form-control:-webkit-autofill:focus {
  -webkit-text-fill-color: #111;
  caret-color: #111;
  box-shadow: 0 0 0 40px #fff inset;
}

.auth-modal select.form-control:invalid {
  color: #9CA3AF;
}

/* program picker trigger */
.auth-modal .pp-trigger {
  background: #fff;
  border-color: #D1D5DB;
  color: #9CA3AF;
}

.auth-modal .pp-trigger:hover {
  border-color: #111;
}

.auth-modal .pp-trigger:focus-visible,
.auth-modal .pp-trigger[aria-expanded="true"] {
  outline: 0;
  background: #fff;
  border-color: #111;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, .12);
}

.auth-modal .pp-trigger.pp-invalid {
  border-color: #DC2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .18);
}

.auth-modal .pp-t-code {
  color: #111;
}

.auth-modal .pp-t-name {
  color: #374151;
}

.auth-modal .pp-chev {
  color: #6B7280;
}

/* primary button: black */
.auth-modal .btn-primary,
.auth-modal .btn-primary:hover {
  color: #fff;
  background: linear-gradient(180deg, #2B2B2B, #111);
  box-shadow: 0 4px 0 #000, 0 12px 24px rgba(0, 0, 0, .25);
}

.auth-modal .btn-primary:hover {
  filter: brightness(1.3);
  box-shadow: 0 6px 0 #000, 0 16px 30px rgba(0, 0, 0, .3);
}

.auth-modal .btn-primary:active {
  box-shadow: 0 1px 0 #000, 0 6px 12px rgba(0, 0, 0, .25);
}

/* links */
.auth-modal .link-btn,
.auth-modal .auth-alt a {
  color: #111;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-modal .link-btn:hover,
.auth-modal .auth-alt a:hover {
  color: #000;
  text-decoration-thickness: 2px;
}

/* year chips */
.auth-modal .year-chips label {
  background: #fff;
  border-color: #D1D5DB;
  color: #374151;
}

.auth-modal .year-chips label:hover {
  background: #F3F4F6;
  border-color: #111;
  color: #111;
}

.auth-modal .year-chips input:checked + label {
  background: #111;
  border-color: #111;
  color: #fff;
  box-shadow: 0 6px 14px rgba(0, 0, 0, .25);
}

.auth-modal .year-chips input:focus-visible + label {
  outline: 3px solid #111;
  outline-offset: 2px;
}

/* alert + demo box on white */
.auth-modal .alert {
  background: #FEF2F2;
  color: #991B1B;
  border: 1px solid #FECACA;
}

.auth-modal .demo {
  color: #6B7280;
  border-top-color: #E5E7EB;
}

.auth-modal .demo dt {
  color: #111;
}

.auth-modal .demo code {
  background: #F3F4F6;
  color: #111;
}

/* close button: dark on the white form (register), light on the colour panel (login) */
.auth-stage[data-mode="register"] .auth-close {
  background: #F3F4F6;
  color: #111;
}

.auth-stage[data-mode="register"] .auth-close:hover {
  background: #E5E7EB;
}

.auth-stage[data-mode="login"] .auth-close:focus-visible,
.auth-overlay a:focus-visible,
.auth-overlay button:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

/* focus rings: black on white (the landing page uses cyan) */
.auth-modal .btn-primary:focus-visible,
.auth-modal .link-btn:focus-visible,
.auth-modal .auth-alt a:focus-visible,
.auth-stage[data-mode="register"] .auth-close:focus-visible {
  outline: 3px solid #111;
  outline-offset: 3px;
}

@media (max-width: 760px) {
  .auth-stage .auth-close {
    background: #F3F4F6 !important;
    color: #111 !important;
  }
}
