:root {
  --red: #E01F26;
  --red-dark: #B5161C;
  --teal: #008894;
  --ink: #1A1A1A;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #0f1115;
  --card: #ffffff;
  --radius: 16px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: radial-gradient(1200px 600px at 50% -10%, #1b2230 0%, var(--bg) 60%);
  -webkit-font-smoothing: antialiased;
}

.portal {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px calc(24px + env(safe-area-inset-bottom));
  gap: 18px;
}

.portal-card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  padding: 28px 24px 26px;
}

.portal-brand {
  color: var(--ink);
  margin-bottom: 18px;
}
.portal-brand .logo { width: 170px; height: auto; display: block; }

.portal-title {
  font-size: 1.5rem;
  line-height: 1.2;
  margin: 0 0 6px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.portal-subtitle {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 0.98rem;
}

.portal-form { display: flex; flex-direction: column; gap: 16px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 0.85rem; font-weight: 600; color: #374151; }
.field input[type="email"] {
  width: 100%;
  padding: 14px 14px;
  font-size: 1rem;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input[type="email"]:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(224, 31, 38, 0.15);
}

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.88rem;
  color: #374151;
  line-height: 1.35;
}
.check input { margin-top: 2px; width: 18px; height: 18px; accent-color: var(--red); flex: 0 0 auto; }
.check a { color: var(--red); text-decoration: none; }
.check a:hover { text-decoration: underline; }
.check em { color: var(--muted); font-style: normal; }

.btn-primary, .btn-secondary {
  display: block;
  width: 100%;
  text-align: center;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform .04s ease, background-color .15s ease, color .15s ease;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); }
.btn-primary:active { transform: translateY(1px); }

.btn-secondary { background: #fff; color: var(--teal); border-color: var(--teal); }
.btn-secondary:hover { background: var(--teal); color: #fff; }

.portal-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }

.alert {
  background: #fde8e8;
  color: #9b1c1c;
  border: 1px solid #f8b4b4;
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.portal-check {
  width: 64px; height: 64px;
  margin: 2px 0 14px;
  border-radius: 50%;
  background: #e7f6ef;
  color: #0a7a46;
  font-size: 34px;
  line-height: 64px;
  text-align: center;
  font-weight: 800;
}

.portal-footer {
  color: #9aa3b2;
  font-size: 0.8rem;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  text-align: center;
}
.portal-footer a { color: #c7cedb; text-decoration: none; }
.portal-footer a:hover { text-decoration: underline; }

@media (min-width: 480px) {
  .portal-title { font-size: 1.7rem; }
}
