/* ---- Layout ---- */
.portal-main {
  min-height: calc(100vh - 160px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 60px; /* top: navbar height (~80px) + breathing room */
}

/* ---- Form card ---- */
.auth-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 40px 32px;
  max-width: 440px;
  width: 100%;
  backdrop-filter: blur(8px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.auth-card--centered {
  text-align: center;
}

/* ---- Wordmark (shared with dashboard) ---- */
.portal-wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.wordmark {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #7C5CFF 0%, #4A9BFF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.area-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(124, 92, 255, 0.12);
  color: #7C5CFF;
  border: 1px solid rgba(124, 92, 255, 0.3);
  white-space: nowrap;
}

/* ---- Typography inside card ---- */
.auth-card h1 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.auth-card .lead {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 24px;
  line-height: 1.55;
}

.auth-card .note {
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.auth-card .note a {
  color: var(--text-light);
  text-decoration: none;
}

.auth-card .note a:hover {
  text-decoration: underline;
}

/* ---- Form fields ---- */
.auth-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.auth-field label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.auth-field input {
  background: rgba(0, 0, 0, 0.30);
  color: var(--text-light);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 8px;
  padding: 13px 14px;
  font: inherit;
  font-size: 1rem;
}

.auth-field input:focus {
  outline: none;
  border-color: rgba(124, 92, 255, 0.50);
}

/* ---- Submit button (full-width gradient inside card) ---- */
.auth-card .auth-btn {
  width: 100%;
  background: linear-gradient(135deg, #7C5CFF 0%, #4A9BFF 100%);
  color: #fff;
  border: none;
  padding: 15px;
  border-radius: 8px;
  font: 600 1rem 'Montserrat', sans-serif;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  margin-top: 8px;
  display: block;
  text-align: center;
}

.auth-card .auth-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(124, 92, 255, 0.4);
}

.auth-card .auth-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ---- Feedback messages ---- */
.auth-msg {
  margin-top: 18px;
  padding: 14px;
  border-radius: 8px;
  font-size: 0.88rem;
  line-height: 1.5;
}

.auth-msg.ok {
  background: rgba(40, 200, 64, 0.10);
  border: 1px solid rgba(40, 200, 64, 0.30);
  color: #C0FFB0;
}

.auth-msg.err {
  background: rgba(255, 90, 90, 0.10);
  border: 1px solid rgba(255, 90, 90, 0.30);
  color: #FFB0B0;
}

/* ---- Portal footer line ---- */
.auth-footer {
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-top: 24px;
  text-align: center;
}

.auth-footer a {
  color: var(--text-muted);
  text-decoration: none;
}

.auth-footer a:hover {
  color: var(--text-light);
}

/* ---- Icon circle (verify) ---- */
.auth-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.2) 0%, rgba(74, 155, 255, 0.2) 100%);
  border: 1px solid rgba(124, 92, 255, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

/* ---- Ghost back-link ---- */
.auth-btn-ghost {
  display: block;
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-light);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 15px;
  border-radius: 8px;
  font: 600 1rem 'Montserrat', sans-serif;
  text-decoration: none;
  text-align: center;
  margin-top: 8px;
  cursor: pointer;
  transition: background .15s;
}

.auth-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* ---- Light theme overrides ---- */
body.light-theme .auth-card {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

body.light-theme .auth-field input {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-light);
  border-color: rgba(0, 0, 0, 0.12);
}
