@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
  --auth-bg: #eef4ff;
  --auth-panel: #ffffff;
  --auth-ink: #0f2747;
  --auth-muted: #466483;
  --auth-border: #bcd0ff;
  --auth-brand: #1d5fd0;
  --auth-brand-2: #2365d4;
  --auth-shadow: 0 22px 46px rgba(40, 86, 160, 0.16);
  --auth-green: #1fa36b;
  --auth-green-2: #64c78f;
}

@keyframes auth-drift {
  0% {
    transform: translate3d(0, 0, 0) scale(1) rotate(-8deg);
  }

  50% {
    transform: translate3d(14px, -10px, 0) scale(1.04) rotate(-6deg);
  }

  100% {
    transform: translate3d(0, 0, 0) scale(1) rotate(-8deg);
  }
}

@keyframes auth-rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-shell {
  position: relative;
  isolation: isolate;
  min-height: 100dvh;
  height: auto;
  display: grid;
  place-items: center;
  padding: 18px;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0) 30%),
    linear-gradient(180deg, #f4f7fc 0%, #e6eef9 100%);
  font-family: "Inter", "Segoe UI", sans-serif;
  overflow-x: hidden;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
}

.content {
  padding: 0 !important;
  min-height: 100dvh;
  height: auto;
  overflow-x: hidden;
}

.auth-shapes {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.auth-shape {
  position: absolute;
  border-radius: 24px;
  opacity: 0.58;
  filter: blur(1px);
  box-shadow: 0 16px 30px rgba(15, 41, 92, 0.1);
  animation: auth-drift 18s ease-in-out infinite;
}

.auth-shape-blue {
  width: clamp(150px, 20vw, 290px);
  height: clamp(100px, 13vw, 180px);
  left: -34px;
  top: 10%;
  background: linear-gradient(135deg, rgba(31, 95, 208, 0.85), rgba(52, 132, 239, 0.4));
}

.auth-shape-green {
  width: clamp(120px, 16vw, 220px);
  height: clamp(84px, 11vw, 150px);
  right: -28px;
  top: 18%;
  background: linear-gradient(135deg, rgba(31, 163, 107, 0.82), rgba(100, 199, 143, 0.34));
  animation-delay: -6s;
}

.auth-shape-blue-soft {
  width: clamp(140px, 18vw, 240px);
  height: clamp(96px, 12vw, 160px);
  left: 12%;
  bottom: 7%;
  background: linear-gradient(135deg, rgba(54, 118, 232, 0.16), rgba(31, 163, 107, 0.12));
  animation-delay: -11s;
}

.auth-panel {
  position: relative;
  z-index: 1;
  width: min(450px, 100%);
  background: var(--auth-panel);
  border: 1px solid rgba(188, 208, 255, 0.8);
  border-radius: 20px;
  box-shadow: 0 18px 34px rgba(40, 86, 160, 0.12);
  padding: 22px 22px 18px;
  transform: translateY(-8px);
}

.auth-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  color: rgba(15, 39, 71, 0.62);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
}

.auth-back-link i {
  font-size: 11px;
  line-height: 1;
}

.auth-back-link:hover {
  color: var(--auth-brand);
  transform: translateX(-1px);
  opacity: 1;
}

.auth-back-link:focus-visible {
  outline: 2px solid rgba(29, 95, 208, 0.22);
  outline-offset: 2px;
  border-radius: 999px;
}

.auth-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.auth-brand-crop {
  width: 78px;
  height: 78px;
  overflow: hidden;
  border: 1.5px solid var(--auth-brand);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(29, 95, 208, 0.08);
}

.auth-brand-crop img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.auth-title {
  margin: 0 0 4px;
  color: var(--auth-brand);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.auth-subtitle {
  margin: 0 0 16px;
  color: var(--auth-muted);
  font-size: 13.5px;
}

.auth-field {
  margin-bottom: 10px;
}

.auth-form .form-label {
  font-weight: 600;
  font-size: 14px;
  color: var(--auth-ink);
  margin-bottom: 6px;
}

.auth-required-mark {
  margin-left: 4px;
  color: #d64545;
  font-weight: 700;
}

.signup-form .signup-required-note {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid #f3d58a;
  border-left: 4px solid #e1b44c;
  border-radius: 10px;
  background: #fff8e1;
  color: #8c6816 !important;
  font-size: 12.5px;
  line-height: 1.45;
  font-weight: 600;
}

.signup-form .signup-required-note span {
  color: #8c6816;
  font-weight: 700;
}

.auth-form .form-control,
.auth-form .form-select,
.auth-form textarea {
  border: 1px solid var(--auth-border);
  border-radius: 12px;
  padding: 10px 14px;
  min-height: 44px;
  font-size: 14px;
  color: var(--auth-ink);
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-form .form-control::placeholder {
  color: #7f8fa5;
}

.auth-form .form-control:focus,
.auth-form .form-select:focus,
.auth-form textarea:focus {
  border-color: rgba(29, 95, 208, 0.6);
  box-shadow: 0 0 0 0.18rem rgba(29, 95, 208, 0.12);
}

.auth-password-wrap {
  position: relative;
}

.auth-password-input {
  padding-right: 48px;
}

.auth-password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #42638c;
  display: grid;
  place-items: center;
}

.auth-password-toggle:hover {
  background: rgba(29, 95, 208, 0.08);
}

.auth-password-toggle:focus-visible {
  outline: 2px solid rgba(29, 95, 208, 0.28);
  outline-offset: 1px;
}

.auth-actions {
  margin-top: 12px;
}

.auth-btn-main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 42px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  border: 0;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(180deg, var(--auth-brand) 0%, var(--auth-brand-2) 100%);
  box-shadow: 0 10px 22px rgba(29, 95, 208, 0.22);
}

.auth-btn-main:hover {
  filter: brightness(1.03);
}

.auth-alert {
  border-radius: 12px;
  font-size: 13px;
  margin-bottom: 14px;
}

.auth-links {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
}

.auth-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(15, 95, 255, 0.28);
  border-radius: 10px;
  color: #0f5fff;
  font-size: 13px;
  text-decoration: none;
  background: rgba(15, 95, 255, 0.04);
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.auth-link:hover {
  background: #ffffff;
  color: #0f5fff;
  border-color: #ffffff;
  text-decoration: none;
  box-shadow: 0 6px 14px rgba(15, 95, 255, 0.12);
}

.auth-link:focus-visible {
  outline: 2px solid rgba(15, 95, 255, 0.28);
  outline-offset: 2px;
}

.auth-link-muted {
  color: #0f5fff;
  opacity: 0.96;
  cursor: default;
}

@media (max-width: 640px) {
  .auth-shell {
    padding: 10px;
  }

  .auth-panel {
    padding: 18px 16px 16px;
    transform: translateY(-4px);
  }

  .auth-back-link {
    margin-bottom: 8px;
  }

  .auth-shape-blue {
    width: 120px;
    height: 82px;
    left: -58px;
    top: 6%;
  }

  .auth-shape-green {
    width: 104px;
    height: 72px;
    right: -58px;
    top: 22%;
  }

  .auth-shape-blue-soft {
    width: 118px;
    height: 78px;
    left: 6%;
    bottom: 4%;
  }

  .auth-shape {
    opacity: 0.42;
    filter: blur(0.5px);
  }

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

  .auth-subtitle {
    margin-bottom: 14px;
  }

  .auth-brand {
    margin-bottom: 10px;
  }

  .auth-brand-crop {
    width: 72px;
    height: 72px;
  }

  .auth-links {
    flex-direction: column;
    gap: 10px;
  }

  .auth-link {
    width: 100%;
  }
}

.signup-panel {
  width: min(920px, 100%);
  padding: 0;
  overflow: hidden;
}

.signup-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  background: linear-gradient(180deg, #155cc9 0%, #0d49af 100%);
  color: #fff;
}

.signup-hero-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.signup-brand {
  width: 52px;
  height: 52px;
  border-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 8px 18px rgba(10, 38, 93, 0.18);
  flex: 0 0 auto;
}

.signup-hero-text h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1.05;
  font-weight: 700;
}

.signup-hero-text p {
  margin: 4px 0 0;
  font-size: 14px;
  opacity: 0.95;
}

.signup-back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.06);
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.signup-back-btn:hover {
  background: #ffffff;
  color: #0d49af;
  border-color: #ffffff;
  text-decoration: none;
}

.signup-back-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.55);
  outline-offset: 2px;
}

.signup-body {
  padding: 20px 22px 18px;
}

.signup-form .form-control,
.signup-form .form-select,
.signup-form textarea {
  background: #edf3ff;
  border-color: #bed0ff;
}

.signup-form .form-select {
  cursor: pointer;
}

.signup-section {
  border: 1px solid #d9e5ff;
  border-radius: 16px;
  padding: 14px 14px 12px;
  background: #fff;
  margin-bottom: 14px;
}

.signup-section h2 {
  margin: 0 0 12px;
  color: #0f3f98;
  font-size: 16px;
  font-weight: 700;
}

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

.signup-span-2 {
  grid-column: span 2;
}

.signup-help {
  margin-top: 8px;
}

.signup-help a {
  font-size: 13px;
  color: #0f5fff;
  text-decoration: underline;
}

.signup-help a:hover {
  text-decoration-thickness: 2px;
}

.signup-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 8px;
}

.signup-link {
  color: #0f5fff;
  font-weight: 600;
  text-decoration: none;
}

.signup-link:hover {
  text-decoration: underline;
}

.signup-submit {
  width: auto;
  min-width: 146px;
  padding-inline: 18px;
}

.signup-password-rules {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px dashed #bed0ff;
  border-radius: 14px;
  background: rgba(237, 243, 255, 0.7);
  color: var(--auth-muted);
  font-size: 13px;
  line-height: 1.55;
}

.signup-password-rules[hidden] {
  display: none !important;
}

.signup-password-rules strong {
  display: block;
  color: var(--auth-ink);
  margin-bottom: 4px;
}

.signup-password-rules-body {
  color: var(--auth-muted);
}

.signup-password-rules-body p {
  margin: 0;
}

.signup-password-rules-body ul {
  margin: 8px 0 0 18px;
  padding: 0;
}

.signup-password-rules-body li + li {
  margin-top: 4px;
}

.signup-password-rules.is-visible {
  animation: auth-rise 0.22s ease-out;
}

@media (max-width: 640px) {
  .auth-shell {
    padding: 14px;
  }

  .auth-panel {
    padding: 20px 16px 18px;
    border-radius: 18px;
  }

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

  .auth-links {
    font-size: 12px;
  }

  .signup-hero {
    padding: 16px;
    flex-direction: column;
    align-items: stretch;
  }

  .signup-hero-left {
    align-items: center;
  }

  .signup-hero-text h1 {
    font-size: 22px;
  }

  .signup-body {
    padding: 16px;
  }

  .signup-grid {
    grid-template-columns: 1fr;
  }

  .signup-span-2 {
    grid-column: span 1;
  }

  .signup-footer {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .signup-submit {
    width: 100%;
  }
}
