/* Sky-Tech portal sign-in redesign */

:root {
  --portal-bg: #08111f;
  --portal-bg-soft: #101d30;
  --portal-card: rgba(13, 23, 40, 0.86);
  --portal-card-2: rgba(16, 29, 48, 0.76);
  --portal-stroke: rgba(226, 235, 255, 0.15);
  --portal-stroke-strong: rgba(73, 177, 255, 0.45);
  --portal-text: #edf3ff;
  --portal-muted: rgba(217, 228, 248, 0.80);
  --portal-faint: rgba(191, 205, 228, 0.66);
  --portal-blue: #2e84ff;
  --portal-cyan: #47c8ff;
  --portal-green: #36c493;
  --portal-accent: #e9b34c;
  --portal-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
  --portal-radius-xl: 30px;
  --portal-radius-lg: 24px;
  --portal-radius-md: 18px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { min-height: 100%; }
body { min-height: 100dvh; }
img, video, svg { display: block; max-width: 100%; }

body.auth-portal-page {
  margin: 0;
  color: var(--portal-text);
  background:
    radial-gradient(900px 520px at 12% 14%, rgba(62, 130, 255, 0.18), transparent 58%),
    radial-gradient(760px 480px at 86% 18%, rgba(71, 200, 255, 0.12), transparent 54%),
    radial-gradient(700px 520px at 50% 100%, rgba(233, 179, 76, 0.08), transparent 55%),
    linear-gradient(180deg, var(--portal-bg), var(--portal-bg-soft));
  font-family: "Sora", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  padding: 24px;
}

body.auth-portal-page::before,
body.auth-portal-page::after {
  content: "";
  position: fixed;
  inset: auto;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(18px);
  opacity: 0.72;
}

body.auth-portal-page::before {
  width: 360px;
  height: 360px;
  top: -120px;
  left: -80px;
  background: rgba(75, 139, 255, 0.13);
}

body.auth-portal-page::after {
  width: 280px;
  height: 280px;
  right: -90px;
  bottom: -80px;
  background: rgba(87, 230, 255, 0.12);
}

a {
  color: inherit;
  text-decoration: none;
}

.hidden { display: none !important; }

.portal-toast,
.toast {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 9999;
  min-width: 280px;
  max-width: 420px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--portal-stroke);
  box-shadow: var(--portal-shadow);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  background: rgba(12, 18, 32, 0.92);
}

.portal-toast.is-success,
.toast.success,
.toast.is-success {
  border-color: rgba(42, 213, 156, 0.35);
  background: rgba(10, 36, 29, 0.92);
}

.portal-toast.is-error,
.toast.error,
.toast.is-error {
  border-color: rgba(255, 114, 131, 0.35);
  background: rgba(39, 12, 17, 0.92);
}

.portal-auth-shell {
  width: min(1200px, 100%);
  min-height: calc(100dvh - 48px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: 22px;
  align-items: stretch;
}

.portal-auth-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--portal-stroke);
  border-radius: var(--portal-radius-xl);
  background: linear-gradient(180deg, var(--portal-card), var(--portal-card-2));
  box-shadow: var(--portal-shadow);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.portal-auth-panel--form {
  padding: 28px;
}

.portal-auth-panel--trust {
  display: grid;
  gap: 16px;
  padding: 24px;
}

.portal-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
  flex-wrap: nowrap;
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
}

.portal-brand__logo {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.05);
  padding: 5px;
  object-fit: contain;
}

.portal-brand__text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.portal-brand__text strong {
  font-size: 0.98rem;
  letter-spacing: -0.02em;
  line-height: 1.05;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portal-brand__text small {
  color: var(--portal-muted);
  font-size: 0.72rem;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.portal-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(233, 179, 76, 0.32);
  background: rgba(233, 179, 76, 0.12);
  color: #f8db9d;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex: 0 0 auto;
}

.portal-alert {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--portal-stroke);
  margin-bottom: 18px;
  line-height: 1.5;
}

.portal-alert.is-success {
  border-color: rgba(42, 213, 156, 0.28);
  background: rgba(9, 42, 31, 0.68);
}

.portal-alert.is-error {
  border-color: rgba(255, 114, 131, 0.28);
  background: rgba(47, 13, 21, 0.68);
}

.portal-copy {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.portal-eyebrow {
  margin: 0;
  color: var(--portal-accent);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 800;
}

.portal-copy h1 {
  margin: 0;
  font-size: clamp(1.95rem, 1.64rem + 1vw, 2.45rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.portal-visual-card h2 {
  margin: 0;
  font-size: clamp(1.4rem, 2.2vw, 2.1rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.portal-copy p,
.portal-visual-card p,
.portal-feature-card p,
.portal-info-tile span {
  margin: 0;
  color: var(--portal-faint);
  line-height: 1.6;
  font-size: 0.94rem;
}

.portal-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.portal-trust-row span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(244, 247, 255, 0.84);
  font-size: 0.78rem;
}

.portal-form {
  display: grid;
  gap: 12px;
  max-width: 560px;
}

.portal-form label {
  margin-top: 4px;
  color: rgba(237, 243, 255, 0.92);
  font-weight: 650;
  letter-spacing: 0.01em;
  font-size: 0.88rem;
  text-transform: uppercase;
}

.portal-input {
  width: 100%;
  min-height: 54px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(226, 235, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: var(--portal-text);
  outline: none;
}

.portal-input::placeholder {
  color: rgba(191, 205, 228, 0.76);
}

.portal-input:focus {
  border-color: var(--portal-stroke-strong);
  box-shadow: 0 0 0 4px rgba(75, 139, 255, 0.18);
}

.portal-password {
  position: relative;
}

.portal-password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  min-width: 64px;
  min-height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(226, 235, 255, 0.18);
  background: rgba(255, 255, 255, 0.07);
  color: var(--portal-text);
  cursor: pointer;
}

.portal-submit,
.portal-secondary {
  min-height: 54px;
  border-radius: 16px;
  border: 0;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.portal-submit {
  margin-top: 8px;
  color: #04111f;
  background: linear-gradient(135deg, #6fd4ff, var(--portal-blue));
  box-shadow: 0 16px 28px rgba(75, 139, 255, 0.24);
}

.portal-secondary {
  color: var(--portal-text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(226, 235, 255, 0.18);
}

.portal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 6px;
}

.portal-links a {
  color: rgba(209, 223, 247, 0.92);
  font-size: 0.92rem;
}

.portal-links a:hover {
  color: #fff;
}

.portal-visual-card {
  position: relative;
  overflow: hidden;
  min-height: 260px;
  padding: 22px;
  border-radius: var(--portal-radius-lg);
  border: 1px solid rgba(87, 230, 255, 0.14);
  background:
    radial-gradient(700px 250px at 80% 24%, rgba(87, 230, 255, 0.18), transparent 55%),
    radial-gradient(520px 220px at 26% 70%, rgba(75, 139, 255, 0.16), transparent 58%),
    linear-gradient(160deg, rgba(8, 16, 32, 0.96), rgba(13, 22, 41, 0.92));
}

.portal-visual-card::before,
.portal-visual-card::after,
.portal-visual-card__ring {
  content: "";
  position: absolute;
  border-radius: 999px;
}

.portal-visual-card::before {
  width: 210px;
  height: 210px;
  right: -70px;
  top: -40px;
  background: rgba(75, 139, 255, 0.18);
  filter: blur(22px);
}

.portal-visual-card::after {
  width: 140px;
  height: 140px;
  left: -30px;
  bottom: -40px;
  background: rgba(42, 213, 156, 0.14);
  filter: blur(24px);
}

.portal-visual-card__ring {
  width: 270px;
  height: 270px;
  inset: auto 16px 16px auto;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background:
    radial-gradient(circle at 30% 32%, rgba(87, 230, 255, 0.18), transparent 40%),
    radial-gradient(circle at 72% 74%, rgba(75, 139, 255, 0.16), transparent 36%);
  opacity: 0.95;
}

.portal-visual-card__content {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  max-width: 360px;
}

.portal-feature-list {
  display: grid;
  gap: 12px;
}

.portal-feature-card {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.04);
}

.portal-feature-card__dot {
  width: 14px;
  height: 14px;
  margin-top: 4px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--portal-cyan), var(--portal-blue));
  box-shadow: 0 0 0 6px rgba(75, 139, 255, 0.10);
}

.portal-feature-card h3 {
  margin: 0 0 6px;
  font-size: 0.94rem;
  letter-spacing: -0.02em;
}

.portal-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.portal-info-tile {
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.04);
}

.portal-info-tile strong {
  display: block;
  margin-bottom: 8px;
  font-size: 0.98rem;
}

@media (max-width: 860px) {
  body.auth-portal-page {
    padding: 16px;
  }

  .portal-auth-shell {
    grid-template-columns: 1fr;
  }

  .portal-auth-panel--trust {
    order: 2;
  }
}

@media (max-width: 640px) {
  body.auth-portal-page {
    padding: 12px;
  }

  .portal-auth-panel--form,
  .portal-auth-panel--trust {
    padding: 18px;
    border-radius: 24px;
  }

  .portal-brand-row {
    align-items: flex-start;
    gap: 10px;
  }

  .portal-brand__logo {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    border-radius: 12px;
  }

  .portal-chip {
    min-height: 28px;
    font-size: 0.64rem;
    padding: 0 8px;
  }

  .portal-brand__text strong {
    font-size: 0.84rem;
  }

  .portal-brand__text small {
    font-size: 0.64rem;
  }

  .portal-copy h1 {
    font-size: clamp(1.7rem, 8.4vw, 2.3rem);
  }

  .portal-input,
  .portal-submit,
  .portal-secondary {
    min-height: 50px;
    border-radius: 15px;
  }

  .portal-trust-row {
    gap: 8px;
  }

  .portal-trust-row span {
    font-size: 0.72rem;
  }

  .portal-info-grid {
    grid-template-columns: 1fr;
  }

  .portal-visual-card {
    min-height: 220px;
  }

  .portal-visual-card__ring {
    width: 220px;
    height: 220px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 480px) {
  .portal-brand-row {
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 16px;
  }

  .portal-chip {
    order: 2;
  }

  .portal-copy p,
  .portal-visual-card p,
  .portal-feature-card p,
  .portal-info-tile span {
    font-size: 0.88rem;
  }
}