:root {
  --purple: #5b2d91;
  --purple-deep: #2a1048;
  --purple-mid: #3d1a66;
  --orange: #f05a28;
  --orange-hot: #ff6b1a;
  --ink: #1a1228;
  --muted: #6b6280;
  --line: #e4dcf0;
  --card: #ffffff;
  --danger: #b42318;
  --ok: #0f7a4c;
  --font: "Outfit", "Segoe UI", sans-serif;
  --display: "Sora", "Outfit", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background: #12081f;
}

.portal-shell {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 55% at 15% -10%, rgba(240, 90, 40, 0.35), transparent 55%),
    radial-gradient(ellipse 70% 50% at 95% 20%, rgba(91, 45, 145, 0.55), transparent 50%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(61, 26, 102, 0.45), transparent 55%),
    linear-gradient(165deg, #0d0618 0%, #1a0b32 45%, #12081f 100%);
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

.bg-orb-a {
  width: 280px;
  height: 280px;
  top: 12%;
  right: -60px;
  background: rgba(240, 90, 40, 0.22);
  animation: drift 12s ease-in-out infinite alternate;
}

.bg-orb-b {
  width: 340px;
  height: 340px;
  bottom: 8%;
  left: -80px;
  background: rgba(91, 45, 145, 0.28);
  animation: drift 14s ease-in-out infinite alternate-reverse;
}

@keyframes drift {
  from { transform: translate(0, 0); }
  to { transform: translate(18px, -22px); }
}

.portal {
  position: relative;
  z-index: 1;
  flex: 1;
  display: grid;
  place-items: center;
  padding: 2rem 1.25rem 1rem;
}

.portal-card {
  position: relative;
  width: min(460px, 100%);
  background: var(--card);
  padding: 1.85rem 1.7rem 1.5rem;
  border-radius: 18px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 24px 60px rgba(0, 0, 0, 0.45);
  animation: rise 0.55s ease;
  overflow: hidden;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.card-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--orange), var(--purple));
}

.card-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.logo {
  display: block;
  max-width: 170px;
  max-height: 72px;
  object-fit: contain;
}

.login-brand {
  max-width: 210px;
  max-height: 58px;
  background: #000;
  border-radius: 12px;
  padding: 0.4rem 0.65rem;
}

.logo-fallback {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--purple);
  letter-spacing: -0.02em;
}

.secure-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--purple);
  background: #f3ecfb;
  border: 1px solid #e0d2f5;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
}

h1 {
  margin: 0 0 0.4rem;
  font-family: var(--display);
  font-size: 1.55rem;
  font-weight: 800;
  text-align: center;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.lead {
  margin: 0 0 1.15rem;
  text-align: center;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.95rem;
}

.legal-note {
  margin: 1rem 0 0;
  text-align: center;
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.4;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.portal-form {
  display: grid;
  gap: 0.85rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.portal-form label {
  font-size: 0.8rem;
  font-weight: 650;
  color: #3d3454;
  letter-spacing: 0.01em;
}

.portal-form input[type="text"],
.portal-form input[type="password"],
.portal-form input[type="tel"] {
  width: 100%;
  padding: 0.8rem 0.9rem;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #faf8fd;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.portal-form input:focus {
  outline: none;
  border-color: var(--purple);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(91, 45, 145, 0.15);
}

.id-type {
  display: flex;
  gap: 0.5rem;
}

.chip {
  flex: 1;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-weight: 600 !important;
  background: #faf8fd;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 0.65rem 0.5rem;
  font-size: 0.82rem !important;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.chip:has(input:checked) {
  border-color: var(--purple);
  background: #f3ecfb;
  color: var(--purple);
}

.portal-form button {
  margin-top: 0.35rem;
  border: 0;
  background: linear-gradient(135deg, var(--orange-hot), var(--orange) 55%, #d94820);
  color: #fff;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.95rem 1rem;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(240, 90, 40, 0.35);
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
}

.portal-form button:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(240, 90, 40, 0.42);
}

.portal-form button:active { transform: translateY(0); }

.terms {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-weight: 400 !important;
  color: var(--muted);
  font-size: 0.78rem !important;
  line-height: 1.45;
  background: #f8f5fc;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.75rem;
}

.terms input {
  margin-top: 0.15rem;
  accent-color: var(--purple);
  flex-shrink: 0;
}

.alert {
  background: #fef3f2;
  color: var(--danger);
  border: 1px solid #fecdca;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  margin-bottom: 0.25rem;
  font-size: 0.88rem;
  font-weight: 500;
}

.info {
  background: #f3ecfb;
  color: var(--purple);
  border: 1px solid #e0d2f5;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  margin-bottom: 0.25rem;
  font-size: 0.88rem;
  font-weight: 500;
}

.demo-otp strong {
  letter-spacing: 0.12em;
  font-size: 1.1rem;
}

.phone-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
}

.btn-secondary {
  border: 1.5px solid var(--purple) !important;
  background: #fff !important;
  color: var(--purple) !important;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.85rem !important;
  padding: 0.75rem 0.9rem !important;
  border-radius: 10px !important;
  cursor: pointer;
  box-shadow: none !important;
  white-space: nowrap;
  margin-top: 0 !important;
}

.btn-secondary:hover {
  background: #f3ecfb !important;
  filter: none !important;
  transform: none !important;
}

.success .check {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), var(--purple));
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.7rem;
  margin: 0 auto 1rem;
  box-shadow: 0 12px 28px rgba(91, 45, 145, 0.3);
}

.brand-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 1.4rem 1rem 1.75rem;
  color: rgba(255, 255, 255, 0.82);
}

.brand-footer .footer-logo {
  height: 44px;
  width: auto;
  margin: 0 auto 0.65rem;
  display: block;
  border-radius: 10px;
  background: #000;
  padding: 0.3rem 0.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.brand-footer p {
  margin: 0.2rem 0;
  font-size: 0.84rem;
}

.brand-footer strong { color: #fff; font-weight: 650; }

.brand-footer .footer-sub {
  font-size: 0.72rem;
  opacity: 0.65;
  letter-spacing: 0.04em;
}

@media (max-width: 520px) {
  .field-row { grid-template-columns: 1fr; }
  .portal-card { padding: 1.5rem 1.2rem 1.25rem; border-radius: 16px; }
  h1 { font-size: 1.35rem; }
}
