@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Sora:wght@600;700;800&display=swap');

:root {
  --auth-ink: #012970;
  --auth-muted: #6b7280;
  --auth-line: #e1ecff;
  --auth-primary: #4154f1;
  --auth-primary-soft: #eef1ff;
  --auth-panel: #f6f9ff;
  --auth-panel-deep: #e1ecff;
  --auth-accent: #4154f1;
  --auth-bg: #ffffff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Manrope', sans-serif;
  background: var(--auth-bg);
  color: var(--auth-ink);
}

.auth-split {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #fff;
}

.auth-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.auth-form-inner {
  width: 100%;
  max-width: 420px;
}

.auth-brand-mobile {
  display: none;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  text-decoration: none;
  color: var(--auth-ink);
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 22px;
}

.auth-brand-mobile img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.auth-title {
  font-family: 'Sora', sans-serif;
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 12px;
  letter-spacing: -0.03em;
}

.auth-sub {
  margin: 0 0 32px;
  color: var(--auth-muted);
  font-size: 15px;
  line-height: 1.6;
}

.auth-sub strong {
  color: var(--auth-ink);
  font-weight: 700;
}

.auth-field {
  margin-bottom: 14px;
}

.auth-input-wrap {
  position: relative;
}

.auth-input {
  width: 100%;
  height: 54px;
  border: 1.5px solid var(--auth-line);
  border-radius: 999px;
  padding: 0 22px;
  font-size: 15px;
  color: var(--auth-ink);
  background: #fff;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.auth-input:focus {
  border-color: var(--auth-primary);
  box-shadow: 0 0 0 4px rgba(65, 84, 241, 0.12);
}

.auth-input.has-toggle {
  padding-right: 52px;
}

.auth-eye {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  padding: 6px;
  line-height: 1;
}

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 22px;
  font-size: 13px;
}

.auth-row a {
  color: var(--auth-muted);
  text-decoration: none;
  margin-left: auto;
}

.auth-row a:hover { color: var(--auth-ink); }

.auth-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--auth-muted);
  cursor: pointer;
  user-select: none;
  flex-wrap: wrap;
  line-height: 1.4;
}

.auth-check input { width: 16px; height: 16px; }

.auth-btn {
  width: 100%;
  height: 54px;
  border: 0;
  border-radius: 999px;
  background: var(--auth-primary);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(65, 84, 241, 0.28);
  transition: transform .15s ease, background .15s ease;
}

.auth-btn:hover { background: #5969f3; transform: translateY(-1px); }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 28px 0 18px;
  color: #9ca3af;
  font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--auth-line);
}

.auth-social {
  display: flex;
  justify-content: center;
  gap: 14px;
}

.auth-social a {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--auth-primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(65, 84, 241, 0.25);
  transition: transform .15s ease, background .15s ease;
}

.auth-social a:hover { background: #5969f3; transform: translateY(-2px); }

.auth-footer {
  margin-top: 28px;
  text-align: center;
  color: var(--auth-muted);
  font-size: 14px;
}

.auth-footer a {
  color: var(--auth-accent);
  font-weight: 700;
  text-decoration: none;
}

.auth-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.auth-visual {
  padding: 28px;
  display: flex;
}

.auth-visual-card {
  flex: 1;
  border-radius: 36px;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.85), transparent 42%),
    radial-gradient(circle at 80% 70%, rgba(65, 84, 241, 0.14), transparent 38%),
    linear-gradient(160deg, #f6f9ff 0%, #eef1ff 50%, #e1ecff 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 36px 40px;
  min-height: calc(100vh - 56px);
}

.auth-visual-brand {
  position: absolute;
  top: 28px;
  left: 32px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--auth-ink);
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 22px;
  z-index: 2;
}

.auth-visual-brand img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.auth-art {
  width: min(260px, 70%);
  margin: 48px auto 20px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-art svg {
  width: 100%;
  height: auto;
  display: block;
}

.auth-hero-img {
  width: 100%;
  max-width: 240px;
  height: auto;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 14px 28px rgba(65, 84, 241, 0.16));
}

.auth-float-card {
  position: absolute;
  left: -8%;
  top: 18%;
  background: #fff;
  border-radius: 18px;
  padding: 12px 14px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
  min-width: 150px;
}

.auth-float-card .label {
  font-size: 12px;
  font-weight: 700;
  color: var(--auth-ink);
}

.auth-float-card .meta {
  font-size: 11px;
  color: var(--auth-muted);
  margin-top: 2px;
}

.auth-float-card .chip {
  display: inline-block;
  margin-top: 8px;
  background: var(--auth-primary-soft);
  color: var(--auth-primary);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

.auth-float-card .ring {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid #dbe3ff;
  border-top-color: var(--auth-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
  color: var(--auth-ink);
}

.auth-dots {
  display: flex;
  gap: 8px;
  margin: 8px 0 22px;
}

.auth-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c7d2fe;
}

.auth-dots span.active { background: var(--auth-primary); }

.auth-visual-text {
  text-align: center;
  font-family: 'Sora', sans-serif;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 700;
  line-height: 1.35;
  max-width: 360px;
  color: var(--auth-ink);
}

.auth-visual-text strong {
  color: var(--auth-primary);
}

.auth-alert {
  display: none;
  border-radius: 14px;
  padding: 12px 14px;
  margin: 0 0 18px;
  font-size: 13.5px;
  line-height: 1.5;
  font-weight: 600;
}

.auth-alert-error {
  display: block;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #be123c;
}

.auth-alert-success {
  display: block;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
}

.auth-hint {
  margin: 6px 2px 0;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.4;
}

.auth-field.is-invalid .auth-input {
  border-color: #fb7185;
}

@media (max-width: 991px) {
  .auth-split {
    grid-template-columns: 1fr;
  }

  .auth-visual {
    display: none;
  }

  .auth-brand-mobile {
    display: inline-flex;
    margin-bottom: 16px;
    font-size: 18px;
  }

  .auth-brand-mobile img {
    width: 28px;
    height: 28px;
  }

  .auth-form-panel {
    min-height: auto;
    padding: 14px 16px calc(20px + env(safe-area-inset-bottom));
    align-items: flex-start;
  }

  .auth-form-inner {
    max-width: 100%;
    padding-top: 4px;
  }

  .auth-title {
    font-size: 1.45rem;
    margin-bottom: 4px;
  }

  .auth-sub {
    font-size: 13px;
    margin-bottom: 14px;
    line-height: 1.4;
  }

  /* Keep name + password side by side to shorten page */
  .auth-grid-2 {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .auth-field {
    margin-bottom: 10px;
  }

  .auth-hint {
    display: none;
  }

  .auth-input,
  .auth-btn {
    height: 46px;
    font-size: 16px;
    border-radius: 12px;
    padding: 0 14px;
  }

  .auth-input.has-toggle {
    padding-right: 42px;
  }

  .auth-eye {
    right: 10px;
  }

  .auth-alert {
    margin-bottom: 12px;
    padding: 10px 12px;
    font-size: 12.5px;
  }

  .auth-row {
    margin: 2px 0 12px;
    gap: 8px;
  }

  .auth-divider {
    margin: 16px 0 12px;
  }

  .auth-footer {
    margin-top: 16px;
    padding-bottom: 8px;
    font-size: 13px;
  }

  .auth-social a {
    width: 42px;
    height: 42px;
  }
}

@media (max-width: 380px) {
  .auth-grid-2 {
    gap: 8px;
  }

  .auth-input,
  .auth-btn {
    height: 44px;
    padding: 0 12px;
  }
}
