@font-face { font-family: Poppins; font-weight: 400; src: url('/login/fonts/poppins/Poppins-Regular.ttf'); font-display: swap; }
@font-face { font-family: Poppins; font-weight: 500; src: url('/login/fonts/poppins/Poppins-Medium.ttf'); font-display: swap; }
@font-face { font-family: Poppins; font-weight: 600; src: url('/login/fonts/poppins/Poppins-SemiBold.ttf'); font-display: swap; }
@font-face { font-family: Poppins; font-weight: 700; src: url('/login/fonts/poppins/Poppins-Bold.ttf'); font-display: swap; }
@font-face { font-family: Poppins; font-weight: 800; src: url('/login/fonts/poppins/Poppins-ExtraBold.ttf'); font-display: swap; }
@font-face { font-family: Poppins; font-weight: 900; src: url('/login/fonts/poppins/Poppins-Black.ttf'); font-display: swap; }

:root {
  --brand-1: #5b5cff;
  --brand-2: #b224ef;
  --brand-3: #ff59d6;
  --ink: #14152b;
  --ink-soft: #4a4b6a;
  --ink-mute: #8a8ca8;
  --line: #e6e7f2;
  --surface: #ffffff;
  --canvas: #f6f6fb;
  --danger: #e03a4a;
  --warn: #ffb020;
  --success: #15c98b;
}

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

html, body { height: 100%; }

body {
  font-family: Poppins, system-ui, -apple-system, Segoe UI, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font: inherit; color: inherit; }

.page {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 100vh;
}

/* ---------- Left: hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(120% 80% at 10% 0%, rgba(255,255,255,0.18), transparent 55%),
    radial-gradient(80% 60% at 100% 100%, rgba(255,89,214,0.55), transparent 60%),
    linear-gradient(135deg, #3b1e8a 0%, #5b5cff 45%, #b224ef 100%);
  padding: 56px 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  pointer-events: none;
}
.hero::before {
  width: 520px; height: 520px;
  background: radial-gradient(circle, #ff59d6 0%, rgba(255,89,214,0) 70%);
  top: -140px; right: -160px;
}
.hero::after {
  width: 420px; height: 420px;
  background: radial-gradient(circle, #5b5cff 0%, rgba(91,92,255,0) 70%);
  bottom: -120px; left: -120px;
}

.hero-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.brand-word {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.01em;
}

.hero-body {
  position: relative;
  z-index: 2;
  max-width: 560px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.78);
  padding: 8px 14px;
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.eyebrow .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #6affb0;
  box-shadow: 0 0 0 4px rgba(106,255,176,0.2);
}

.hero h1 {
  margin-top: 28px;
  font-weight: 900;
  font-size: clamp(44px, 5vw, 68px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.hero h1 em {
  font-style: normal;
  color: transparent;
  background-color: #ff9fea;
  background-image:
    radial-gradient(closest-side, #ffe4a3 0%, rgba(255,228,163,0) 70%),
    radial-gradient(closest-side, #ff59d6 0%, rgba(255,89,214,0) 70%),
    radial-gradient(closest-side, #b1b5ff 0%, rgba(177,181,255,0) 70%),
    radial-gradient(closest-side, #ffa2ec 0%, rgba(255,162,236,0) 70%),
    linear-gradient(120deg, #ff8ae6 0%, #a98bff 100%);
  background-repeat: no-repeat;
  background-size: 160% 220%, 170% 210%, 180% 230%, 150% 200%, 100% 100%;
  background-position: 20% 30%, 80% 20%, 60% 80%, 30% 70%, 0% 0%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: liquidSwirl 14s ease-in-out infinite;
  filter: saturate(1.15);
}

@keyframes liquidSwirl {
  0%   { background-position: 20% 30%, 80% 20%, 60% 80%, 30% 70%, 0% 0%; }
  25%  { background-position: 65% 15%, 35% 75%, 85% 35%, 10% 45%, 50% 50%; }
  50%  { background-position: 45% 85%, 20% 40%, 75% 65%, 90% 15%, 100% 100%; }
  75%  { background-position: 80% 55%, 55% 25%, 15% 75%, 60% 40%, 50% 50%; }
  100% { background-position: 20% 30%, 80% 20%, 60% 80%, 30% 70%, 0% 0%; }
}

@media (prefers-reduced-motion: reduce) {
  .hero h1 em { animation: none; }
}

.hero p.lede {
  margin-top: 22px;
  font-size: 18px;
  line-height: 1.55;
  color: rgba(255,255,255,0.82);
  max-width: 520px;
}

.hero-foot {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 18px;
  color: rgba(255,255,255,0.72);
  font-size: 13px;
}
.hero-foot .sep { width: 1px; height: 18px; background: rgba(255,255,255,0.22); }
.hero-foot a:hover { color: #fff; }

/* ---------- Right: form panel ---------- */
.panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 48px;
  background: var(--surface);
}

.card {
  width: 100%;
  max-width: 440px;
}

.card h2 {
  font-weight: 800;
  font-size: 34px;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.card .sub {
  margin-top: 10px;
  color: var(--ink-mute);
  font-size: 15px;
  line-height: 1.55;
}

/* ---------- Alert banner (error/warning/info) ---------- */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 24px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid;
  font-size: 14px;
  line-height: 1.5;
}
.alert .alert-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 1px;
}
.alert-error {
  color: #7a0b18;
  background: #fff1f3;
  border-color: #fad0d6;
}
.alert-error .alert-icon { color: var(--danger); }
.alert-warn {
  color: #6a4500;
  background: #fff8eb;
  border-color: #f6dfa6;
}
.alert-warn .alert-icon { color: var(--warn); }
.alert-info {
  color: #1c1f5e;
  background: #eef0ff;
  border-color: #d4d8ff;
}
.alert-info .alert-icon { color: var(--brand-1); }

/* ---------- SSO row ---------- */
.sso-row {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.sso-row .sso-form { margin: 0; }
.sso-btn {
  width: 100%;
  height: 52px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  font-size: 14.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.sso-btn:hover {
  border-color: #c8cae0;
  background: #fafbff;
  box-shadow: 0 6px 20px -12px rgba(20,21,43,0.25);
}
.sso-btn:active { transform: translateY(1px); }

.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 26px 0 22px;
  color: var(--ink-mute);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ---------- Form fields ---------- */
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

.input-wrap { position: relative; }
.input-wrap .icon {
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
  color: var(--ink-mute);
  pointer-events: none;
}
.input {
  width: 100%;
  height: 54px;
  padding: 0 16px 0 46px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: #fcfcff;
  font-size: 15px;
  color: var(--ink);
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.input.no-icon { padding-left: 16px; }
.input::placeholder { color: var(--ink-mute); }
.input:hover { border-color: #d3d5e8; }
.input:focus {
  outline: none;
  border-color: var(--brand-1);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(91,92,255,0.14);
}
.field.has-error .input {
  border-color: var(--danger);
  background: #fff5f6;
}
.field.has-error .error-msg { display: block; }
.error-msg {
  display: none;
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--danger);
  font-weight: 500;
}

.password-wrap .toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  width: 36px; height: 36px;
  border-radius: 8px;
  display: grid; place-items: center;
  color: var(--ink-mute);
}
.password-wrap .toggle:hover { color: var(--ink); background: #f0f1f9; }

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 24px;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--ink-soft);
  cursor: pointer;
  user-select: none;
}
.check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.check .box {
  width: 18px; height: 18px;
  border-radius: 6px;
  border: 1.5px solid #c9cbe0;
  background: #fff;
  display: grid; place-items: center;
  transition: all .15s ease;
}
.check .box svg { opacity: 0; transition: opacity .15s ease; }
.check input:checked + .box {
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  border-color: transparent;
}
.check input:checked + .box svg { opacity: 1; }
.check input:focus-visible + .box {
  box-shadow: 0 0 0 4px rgba(91,92,255,0.18);
}

.forgot {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--brand-1);
}
.forgot:hover { color: var(--brand-2); }

/* ---------- Buttons ---------- */
.primary-btn {
  width: 100%;
  height: 56px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 15.5px;
  letter-spacing: 0.01em;
  color: #fff;
  background: linear-gradient(135deg, #5b5cff 0%, #8a3bf5 50%, #d23cff 100%);
  background-size: 180% 180%;
  background-position: 0% 0%;
  box-shadow: 0 14px 34px -14px rgba(91,92,255,0.65), 0 2px 0 rgba(255,255,255,0.25) inset;
  transition: background-position .35s ease, transform .1s ease, box-shadow .25s ease;
}
.primary-btn:hover { background-position: 100% 100%; box-shadow: 0 18px 40px -14px rgba(178,36,239,0.7); }
.primary-btn:active { transform: translateY(1px); }

.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 52px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  font-size: 14.5px;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.secondary-btn:hover {
  border-color: #c8cae0;
  background: #fafbff;
  box-shadow: 0 6px 20px -12px rgba(20,21,43,0.25);
}

.fine {
  margin-top: 28px;
  font-size: 12.5px;
  color: var(--ink-mute);
  text-align: center;
}
.fine a { color: var(--brand-1); font-weight: 600; }
.fine a:hover { color: var(--brand-2); }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  font-size: 13.5px;
  color: var(--ink-mute);
  font-weight: 500;
}
.back-link:hover { color: var(--brand-1); }

/* ---------- Status card (for expired / exception / simple message pages) ---------- */
.status-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  margin-bottom: 24px;
}
.status-icon svg { width: 36px; height: 36px; }
.status-icon.danger  { background: #fff1f3; color: var(--danger); }
.status-icon.warn    { background: #fff8eb; color: var(--warn); }
.status-icon.info    { background: #eef0ff; color: var(--brand-1); }
.status-icon.success { background: #e8faf2; color: var(--success); }

.actions-stack {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .page { grid-template-columns: 1fr; }
  .hero {
    padding: 40px 32px 56px;
    min-height: 340px;
  }
  .hero h1 { font-size: 40px; }
  .hero p.lede { font-size: 16px; }
  .hero-foot { display: none; }
  .panel { padding: 40px 24px 56px; }
}

@media (max-width: 480px) {
  .hero { padding: 32px 22px 44px; }
  .hero h1 { font-size: 34px; }
  .panel { padding: 32px 20px 44px; }
  .card h2 { font-size: 28px; }
  .sso-row { grid-template-columns: 1fr; }
}
