:root {
  --bg-1: #f4f8ff;
  --bg-2: #eef3fb;
  --card: #ffffff;
  --text-1: #12233f;
  --text-2: #51637f;
  --line: #d5e2f4;
  --brand: #0e4c9b;
  --brand-2: #1f6cc7;
  --head-a: #1a1033;
  --head-b: #1e1f6a;
  --head-c: #0e4c9b;
  --danger: #b91c1c;
  --ok: #0f766e;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100dvh;
  height: 100dvh;
  font-family: "Segoe UI Variable", "Segoe UI", Inter, Arial, sans-serif;
  color: var(--text-1);
  background: #eef3fb;
  overflow: hidden;
}

.auth-shell {
  width: 100vw;
  height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  overflow: hidden;
}

.hero-pane {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background: #0d224a;
}

.hero-picture {
  position: absolute;
  inset: 0;
  display: block;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  filter: saturate(0.98) contrast(1.02) brightness(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 18, 42, 0.03) 0%, rgba(10, 22, 49, 0.1) 100%),
    radial-gradient(circle at 8% 14%, rgba(255, 220, 170, 0.28), transparent 24%);
}

.hero-pane::after {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: 8%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(242, 246, 255, 0.38));
  pointer-events: none;
}

.auth-panel-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 28px;
  background:
    radial-gradient(560px 420px at 8% 14%, rgba(218, 231, 255, 0.9), transparent 60%),
    linear-gradient(180deg, #f7f9fe 0%, #eef3fb 52%, #eaf0f9 100%);
}

.auth-panel {
  width: min(456px, 100%);
  border: 1px solid rgba(215, 226, 244, 0.88);
  border-radius: 28px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.94);
  box-shadow:
    0 20px 44px rgba(22, 48, 90, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
}

.auth-panel-header {
  position: relative;
  padding: 14px 18px 12px;
  background:
    url('/images/header-bg.svg') no-repeat center center,
    radial-gradient(circle at 16% 22%, rgba(255, 163, 83, 0.12), transparent 18%),
    radial-gradient(circle at 90% 26%, rgba(86, 120, 255, 0.18), transparent 24%),
    linear-gradient(135deg, var(--head-a) 0%, var(--head-b) 58%, #2b39ab 100%);
  background-size: cover, auto, auto, auto;
  border-bottom: 1px solid rgba(183, 195, 255, 0.14);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.08);
}

.auth-panel-logo {
  display: block;
  width: min(158px, 100%);
  height: auto;
}

.auth-body {
  padding: 24px 30px 22px;
  display: grid;
  gap: 10px;
  background: transparent;
}

.auth-form-stack {
  display: grid;
  gap: 10px;
}

input {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  padding: 0;
  font-size: 16px;
  color: #1f2c40;
  background: transparent;
}

input:focus {
  outline: 0;
  box-shadow: none;
}

.field-row {
  display: grid;
  gap: 4px;
}

.btn-row {
  display: block;
  margin-top: 4px;
}

button {
  height: 48px;
  border-radius: 15px;
  border: 1px solid transparent;
  padding: 0 14px;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
}

.btn-primary {
  width: 100%;
  color: #fff;
  border-color: #184a95;
  background: linear-gradient(180deg, #1f6cc7 0%, #0e4c9b 100%);
  box-shadow: 0 12px 22px rgba(25, 72, 146, 0.18);
}

.status {
  margin-top: 2px;
  min-height: 20px;
  font-size: 12px;
  color: var(--text-2);
}

.status[data-tone="error"] { color: var(--danger); }
.status[data-tone="success"] { color: var(--ok); }

.meta {
  margin-top: 0;
  font-size: 12px;
  color: #6a7f9e;
  text-align: center;
}

.advanced {
  display: none;
  margin-top: 8px;
  border-top: 1px dashed #d6e3f5;
  padding-top: 10px;
  gap: 8px;
}

.advanced[data-show="true"] {
  display: grid;
}

.login-title {
  margin: 0;
  text-align: center;
  font-size: 24px;
  line-height: 1.18;
  color: #151f32;
  letter-spacing: -0.03em;
}

.login-subtitle {
  margin: 0 0 8px;
  text-align: center;
  font-size: 13px;
  line-height: 1.4;
  color: #6a768a;
}

#forgotPasswordEmailHint.login-subtitle {
  margin: 0 0 2px;
  text-align: left;
}

.input-pill {
  height: 50px;
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  padding: 0 14px;
  border: 1px solid #d6e0ee;
  border-radius: 15px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.74),
    0 6px 14px rgba(15, 37, 68, 0.04);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.input-pill:focus-within {
  border-color: #7da7e2;
  box-shadow:
    0 0 0 4px rgba(31, 108, 199, 0.12),
    0 12px 24px rgba(15, 37, 68, 0.08);
  transform: translateY(-1px);
}

.input-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: #6e7685;
  font-size: 16px;
}

.input-pill input {
  font-size: 14px;
  line-height: 1.2;
  color: #151f32;
}

.input-pill input::placeholder {
  color: #6f7889;
}

.password-toggle {
  height: 32px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: #184a95;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: none;
}

.password-toggle:hover {
  text-decoration: underline;
}

.forgot-link {
  margin-top: 0;
  font-size: 10px;
  font-weight: 600;
  color: #184a95;
  text-align: right;
  text-decoration: none;
}

.or-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 2px;
  color: #8b94a5;
  font-size: 12px;
  justify-content: center;
}

.or-divider::before,
.or-divider::after {
  content: "";
  height: 1px;
  background: #d6dde8;
  width: 42%;
}

.btn-google {
  width: 100%;
  border-radius: 16px;
  height: 58px;
  border: 1px solid #cfd6e2;
  background: #f7f9fc;
  color: #3b4658;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
}

.google-mark {
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
  background: conic-gradient(#ea4335 0 25%, #fbbc05 25% 50%, #34a853 50% 75%, #4285f4 75% 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.signup-hint {
  margin: 0;
  text-align: center;
  color: #4f5f78;
  font-size: 12px;
}

.signup-hint a {
  color: #184a95;
  text-decoration: none;
  font-weight: 700;
}

@media (max-width: 960px) {
  body {
    height: auto;
    overflow: auto;
  }

  .auth-shell {
    width: 100%;
    height: auto;
    max-height: none;
    grid-template-columns: 1fr;
  }

  .hero-pane {
    min-height: 280px;
    max-height: 340px;
  }

  .auth-panel-wrap {
    padding: 22px 16px 28px;
  }

  .auth-panel {
    width: min(560px, 100%);
  }

  .auth-body {
    padding: 38px 34px 26px;
  }

  .login-title {
    font-size: 26px;
  }
}

@media (max-width: 640px) {
  .hero-pane {
    min-height: 232px;
    max-height: 280px;
  }

  .hero-image {
    object-position: center 28%;
  }

  .auth-panel-header {
    padding: 13px 16px 11px;
  }

  .auth-panel-logo {
    height: 26px;
    width: auto;
  }

  .auth-panel-wrap {
    padding: 18px 12px 22px;
  }

  .auth-body {
    padding: 26px 20px 20px;
  }

  .login-title {
    font-size: 22px;
  }

  .login-subtitle {
    font-size: 12px;
    margin-bottom: 8px;
  }
}
