/* ============================================
   LOGIN PAGES — candidate + staff
   ============================================ */

.login-page {
  background: var(--paper);
  min-height: 100vh;
  overflow-x: hidden;
}

/* hide reveal animations from main site styles that may be on these pages */
.login-page .reveal {
  opacity: 1;
  transform: none;
}

/* ============================================
   Candidate login — split layout
   ============================================ */
.login-page:not(.staff-login-page) {
  display: flex;
}

/* LEFT — decorative aside (navy panel) */
.login-aside {
  flex: 1.1;
  min-height: 100vh;
  background: var(--navy-950);
  color: var(--paper);
  padding: 3rem 4rem;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.login-aside::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 70% 30%, rgba(181, 137, 62, 0.18), transparent 55%),
    radial-gradient(ellipse at 20% 80%, rgba(122, 46, 30, 0.15), transparent 50%);
  pointer-events: none;
}

/* subtle grid pattern */
.login-aside::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(245, 241, 232, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 241, 232, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.login-aside > * { position: relative; z-index: 1; }

.login-back {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(245, 241, 232, 0.7);
  transition: color 0.3s, gap 0.3s var(--ease);
  align-self: flex-start;
  padding: 0.6rem 0;
}
.login-back:hover {
  color: var(--paper);
  gap: 1rem;
}

.aside-content {
  margin: auto 0;
  padding: 2rem 0;
  max-width: 36rem;
}

.aside-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 4rem;
  font-family: var(--f-display);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--paper);
  letter-spacing: -0.01em;
}
.aside-logo img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.25));
}

.aside-title {
  font-family: var(--f-display);
  font-size: clamp(2.6rem, 5vw, 4.5rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin-bottom: 1.8rem;
}
.aside-title .line {
  display: block;
}
.aside-title em {
  font-style: italic;
  font-weight: 300;
  color: var(--gold-light);
}

.aside-sub {
  font-size: 1.05rem;
  line-height: 1.6;
  color: rgba(245, 241, 232, 0.75);
  max-width: 32rem;
  margin-bottom: 2.5rem;
  font-weight: 300;
}

.aside-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-bottom: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(245, 241, 232, 0.12);
}
.aside-bullets li {
  font-size: 0.95rem;
  color: rgba(245, 241, 232, 0.85);
  display: flex;
  align-items: baseline;
  gap: 1rem;
}
.bullet-num {
  font-family: var(--f-display);
  font-size: 0.78rem;
  font-style: italic;
  color: var(--gold-light);
  min-width: 1.8rem;
}

.aside-help {
  font-size: 0.85rem;
  color: rgba(245, 241, 232, 0.55);
  line-height: 1.6;
}
.aside-help a {
  color: var(--gold-light);
  text-decoration: none;
  transition: color 0.3s;
  display: inline-block;
  margin-top: 0.3rem;
}
.aside-help a:hover {
  color: var(--paper);
}

/* RIGHT — form panel */
.login-main {
  flex: 0.9;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2.5rem;
  background: var(--paper);
  position: relative;
}

.login-main::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(181, 137, 62, 0.04), transparent 55%);
  pointer-events: none;
}

.login-form-wrap {
  width: 100%;
  max-width: 26rem;
  position: relative;
}

.login-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2.5rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--line);
}
.login-step { color: var(--rust); }

.login-title {
  font-family: var(--f-display);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.035em;
  margin-bottom: 1rem;
}
.login-title .line { display: block; }
.login-title em {
  font-style: italic;
  font-weight: 300;
  color: var(--rust);
}

.login-intro {
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--muted);
  margin-bottom: 2.5rem;
  max-width: 24rem;
}

/* ============================================
   Form fields
   ============================================ */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.field label {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 500;
}
.field input {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 0.85rem 0;
  color: var(--ink);
  font-size: 1.05rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.3s;
  letter-spacing: 0.02em;
}
.field input:focus {
  border-bottom-color: var(--rust);
}
.field input::placeholder {
  color: rgba(5, 9, 26, 0.3);
  font-size: 0.95rem;
}
#nic {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}
.field-hint {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

.field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-top: -0.3rem;
}
.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  cursor: none;
}
.checkbox-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--rust);
  cursor: none;
}
.forgot-link {
  color: var(--rust);
  font-size: 0.82rem;
  transition: opacity 0.3s;
}
.forgot-link:hover {
  opacity: 0.7;
}

.field-error {
  background: rgba(153, 27, 27, 0.08);
  border-left: 3px solid #991b1b;
  padding: 0.8rem 1rem;
  font-size: 0.88rem;
  color: #7f1d1d;
  line-height: 1.5;
  border-radius: 0 4px 4px 0;
}

.login-btn {
  margin-top: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 1.1rem 2rem;
  background: var(--ink);
  color: var(--paper);
  border: none;
  border-radius: 999px;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-family: inherit;
  font-weight: 500;
  cursor: none;
  transition: background 0.3s, transform 0.4s var(--ease);
  width: 100%;
}
.login-btn:hover {
  background: var(--rust);
}
.login-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.login-btn svg {
  transition: transform 0.4s var(--ease);
}
.login-btn:hover svg {
  transform: translateX(4px);
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.8rem 0 0;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
}
.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

.login-help {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: rgba(245, 241, 232, 0.6);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
}
.login-help p {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}
.help-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line-soft);
  transition: padding 0.3s var(--ease);
}
.help-row:last-child { border-bottom: none; }
.help-row:hover {
  padding-left: 0.5rem;
}
.help-label {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}
.help-value {
  font-family: var(--f-display);
  font-size: 0.92rem;
  color: var(--ink);
}

.login-foot {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ============================================
   Mobile — candidate login
   ============================================ */
@media (max-width: 900px) {
  .login-page:not(.staff-login-page) {
    flex-direction: column;
  }
  .login-aside {
    min-height: auto;
    padding: 2rem 1.5rem 3rem;
  }
  .aside-content {
    padding: 1.5rem 0 0;
  }
  .aside-logo { margin-bottom: 2rem; }
  .aside-title { font-size: clamp(2rem, 8vw, 2.8rem); margin-bottom: 1.2rem; }
  .aside-sub { font-size: 0.95rem; margin-bottom: 1.8rem; }
  .aside-bullets {
    margin-bottom: 1.8rem;
    padding-top: 1.5rem;
  }
  .aside-bullets li { font-size: 0.88rem; }

  .login-main {
    padding: 2.5rem 1.5rem 3rem;
    min-height: auto;
  }
  .login-meta { margin-bottom: 1.8rem; }
  .login-title { font-size: 2rem; }
  .login-intro { font-size: 0.92rem; margin-bottom: 1.8rem; }
  .login-foot {
    flex-direction: column;
    gap: 0.5rem;
    text-align: left;
  }
}

@media (max-width: 480px) {
  .login-aside { padding: 1.5rem 1.25rem 2.5rem; }
  .login-main { padding: 2rem 1.25rem 2.5rem; }
}

/* ============================================
   STAFF LOGIN — minimal centered card
   ============================================ */
.staff-login-page {
  background: var(--navy-950);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}
.staff-login-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(181, 137, 62, 0.12), transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(45, 82, 145, 0.18), transparent 55%);
  pointer-events: none;
}
.staff-login-page::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(245, 241, 232, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 241, 232, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.staff-login-main {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 26rem;
}

.staff-form-wrap {
  background: rgba(245, 241, 232, 0.04);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border: 1px solid rgba(245, 241, 232, 0.1);
  border-radius: 6px;
  padding: 3rem 2.5rem 2.5rem;
  color: var(--paper);
}

.staff-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  margin-bottom: 2.2rem;
}
.staff-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
}
.staff-brand-text {
  font-family: var(--f-display);
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--paper);
}

.staff-meta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  justify-content: center;
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(245, 241, 232, 0.45);
  margin-bottom: 2rem;
}
.staff-meta-line {
  flex: 1;
  height: 1px;
  background: rgba(245, 241, 232, 0.12);
  max-width: 4rem;
}

.staff-title {
  font-family: var(--f-display);
  font-size: 2.2rem;
  font-weight: 400;
  letter-spacing: -0.03em;
  text-align: center;
  margin-bottom: 0.5rem;
}
.staff-intro {
  text-align: center;
  font-size: 0.88rem;
  color: rgba(245, 241, 232, 0.6);
  margin-bottom: 2rem;
}

.staff-form-wrap .field label {
  color: rgba(245, 241, 232, 0.7);
}
.staff-form-wrap .field input {
  border-bottom-color: rgba(245, 241, 232, 0.2);
  color: var(--paper);
}
.staff-form-wrap .field input:focus {
  border-bottom-color: var(--gold-light);
}
.staff-form-wrap .field input::placeholder {
  color: rgba(245, 241, 232, 0.3);
}
.staff-form-wrap .checkbox-row {
  color: rgba(245, 241, 232, 0.6);
}
.staff-form-wrap .forgot-link {
  color: var(--gold-light);
}

.staff-form-wrap .login-btn {
  background: var(--gold);
  color: var(--navy-950);
  margin-top: 1.4rem;
}
.staff-form-wrap .login-btn:hover {
  background: var(--gold-light);
}

.staff-form-wrap .field-error {
  background: rgba(220, 38, 38, 0.12);
  border-left-color: #fca5a5;
  color: #fecaca;
}

.staff-foot {
  margin-top: 2.2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(245, 241, 232, 0.08);
  text-align: center;
}
.staff-foot p {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245, 241, 232, 0.4);
  line-height: 1.8;
}

@media (max-width: 480px) {
  .staff-login-page { padding: 1rem; }
  .staff-form-wrap { padding: 2rem 1.5rem; }
  .staff-title { font-size: 1.8rem; }
}
