﻿body {
  background: radial-gradient(circle at top, #f7fafc, #e2e8f0);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  padding: 1.5rem;
}

.login-layout {
  width: 100%;
  max-width: 520px;
}

.login-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 2.25rem;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.login-header h1 {
  margin: 0 0 0.35rem;
  font-size: 2rem;
  font-weight: 700;
  color: #0f172a;
}

.login-subtitle {
  margin: 0;
  color: #475569;
  line-height: 1.4;
}

.login-form,
.portal-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  border: 1px solid #e2e8f0;
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
  background: #f8fafc;
}

.auth-label {
  font-weight: 700;
  color: #0f172a;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field-label {
  font-weight: 600;
  color: #1e293b;
}

.token-input {
  resize: vertical;
  min-height: 4.75rem;
}

.field-hint {
  margin: 0;
  font-size: 0.85rem;
  color: #64748b;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.primary-action,
.secondary-action,
.text-action,
.portal-actions button {
  border: none;
  border-radius: 10px;
  padding: 0.8rem 1.4rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.2s ease;
}

.primary-action {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #fff;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.25);
}

.primary-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.35);
}

.secondary-action {
  background: rgba(37, 99, 235, 0.12);
  color: #1e3a8a;
}

.secondary-action:hover {
  background: rgba(37, 99, 235, 0.2);
}

.text-action {
  align-self: flex-start;
  background: transparent;
  color: #1d4ed8;
  padding: 0;
}

.text-action:hover {
  text-decoration: underline;
}

.portal-section {
  border-top: 1px solid #e2e8f0;
  padding-top: 1rem;
}

.portal-heading {
  margin: 0;
  font-size: 1.3rem;
  color: #0f172a;
}

.portal-summary {
  margin: 0;
  color: #475569;
  line-height: 1.5;
}

.portal-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.mode-toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.75rem 0 0.35rem 0;
}

.mode-label {
  font-weight: 700;
  color: var(--text-strong);
  font-size: 0.95rem;
}

.mode-buttons {
  display: inline-flex;
  background: #f0f4ff;
  border-radius: 14px;
  padding: 4px;
  gap: 6px;
  box-shadow: 0 8px 20px rgba(0, 81, 255, 0.12);
  border: 1px solid rgba(0, 81, 255, 0.1);
}

.mode-button {
  border: none;
  background: transparent;
  padding: 8px 14px;
  border-radius: 12px;
  font-weight: 700;
  color: #4b5563;
  cursor: pointer;
  min-width: 90px;
}

.mode-button.active {
  background: linear-gradient(135deg, #2e60ff, #5188ff);
  color: #fff;
  box-shadow: 0 10px 24px rgba(46, 96, 255, 0.25);
}

.hidden {
  display: none !important;
}

.status-bar {
  text-align: center;
}

@media (max-width: 520px) {
  body {
    padding: 1rem;
  }

  .login-card {
    padding: 1.75rem;
  }

  .portal-actions,
  .form-actions {
    flex-direction: column;
  }

  .primary-action,
  .secondary-action {
    width: 100%;
    text-align: center;
  }
}
