.portal-container {
  max-width: 500px;
  margin: 4rem auto;
  padding: 0 2rem;
}

.portal-card {
  background: var(--card-bg);
  border: 2px solid rgba(var(--accent-rgb), 0.2);
  border-radius: 16px;
  padding: 3rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.portal-card h1 {
  color: var(--accent);
  margin: 0 0 1rem 0;
  font-size: 2rem;
  text-align: center;
}

.portal-card p {
  color: var(--fg);
  margin-bottom: 2rem;
  text-align: center;
  line-height: 1.6;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.form-group input {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid rgba(var(--accent-rgb), 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--fg);
  font-size: 1rem;
  box-sizing: border-box;
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent);
}

.message {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  text-align: center;
}

.message.success {
  background: rgba(var(--success-rgb), 0.2);
  border: 1px solid rgba(var(--success-rgb), 0.4);
  color: var(--success);
}

.message.error {
  background: rgba(var(--error-rgb), 0.2);
  border: 1px solid rgba(var(--error-rgb), 0.4);
  color: var(--error);
}

/* Simple back link for within card */
.portal-card .back-link {
  display: inline-block;
  margin-top: 2rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.portal-card .back-link:hover {
  text-decoration: underline;
}

/* Light mode: white background for input */
@media (prefers-color-scheme: light) {
  .form-group input {
    background: white;
    color: var(--fg);
  }
}

/* Alias nav-back-link to back-link for backwards compatibility */
.nav-back-link {
  display: inline-block;
  background: rgba(var(--muted-rgb), 0.1);
  color: var(--accent);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  border: 2px solid rgba(var(--muted-rgb), 0.3);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.nav-back-link:hover {
  background: rgba(var(--muted-rgb), 0.2);
  border-color: var(--accent);
  transform: translateX(-4px);
  text-decoration: none;
}

.nav-back-link.primary {
  background: linear-gradient(135deg, var(--accent), var(--header-grad-2));
  color: white;
  border-color: transparent;
}

.nav-back-link.primary:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(var(--muted-rgb), 0.5);
}
