:root {
  --bg: #f8fbff;
  --surface: #ffffff;
  --line: #d9e7ff;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
}

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

body {
  margin: 0;
  font-family: "Inter", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 8%, rgba(147, 197, 253, 0.26), transparent 30%),
    radial-gradient(circle at 92% 88%, rgba(96, 165, 250, 0.16), transparent 34%),
    var(--bg);
  overflow: hidden;
}

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

.login-left {
  padding: 24px clamp(20px, 5vw, 74px);
  display: grid;
  align-content: center;
  justify-items: center;
  background: linear-gradient(180deg, #ffffff, #fdfefe);
}

.back-link {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #334155;
  line-height: 0;
  text-decoration: none;
  flex: 0 0 22px;
}

.back-link:hover {
  color: #1d4ed8;
}

.back-link svg {
  width: 18px;
  height: 18px;
}

.form-shell {
  width: min(460px, 100%);
  max-width: 460px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.mini-badge {
  width: fit-content;
  margin: 0 0 12px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid #dbeafe;
  background: #eff6ff;
  color: #1e40af;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-line {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
}

.brand-line img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.brand-line span {
  font-family: "Space Grotesk", "Inter", Arial, sans-serif;
  font-size: 1.08rem;
  font-weight: 600;
}

h1 {
  margin: 0 0 8px;
  font-family: "Space Grotesk", "Inter", Arial, sans-serif;
  font-size: clamp(1.62rem, 3.2vw, 2.2rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.form-shell > p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.62;
  max-width: 420px;
}

.proof-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.proof-row span {
  border: 1px solid #dbeafe;
  background: #f8fbff;
  border-radius: 999px;
  padding: 5px 10px;
  color: #475569;
  font-size: 0.75rem;
}

.auth-panel[hidden] {
  display: none;
}

.auth-panel.is-active {
  display: block;
}

.login-form {
  display: grid;
  gap: 10px;
  margin-bottom: 0;
}

.switch-note {
  margin: 4px 0 0;
  text-align: center;
  color: #64748b;
  font-size: 0.86rem;
}

.form-message {
  margin: 2px 0 0;
  min-height: 18px;
  font-size: 0.82rem;
  font-weight: 500;
}

.form-message.success {
  color: #166534;
}

.form-message.error {
  color: #b42318;
}

.switch-note a {
  color: #1d4ed8;
  font-weight: 600;
  text-decoration: none;
}

.switch-note a:hover {
  text-decoration: underline;
}

label {
  display: grid;
  gap: 8px;
  font-size: 0.9rem;
  color: #1e293b;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 13px;
  font: inherit;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus {
  outline: none;
  border-color: #7aa8ff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

input.is-invalid {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.14) !important;
  background: #fff7f7;
}

input.shake-error {
  animation: inputShake 0.36s ease;
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: #475569;
}

.check input {
  width: 15px;
  height: 15px;
  padding: 0;
}

.form-row a {
  color: var(--primary);
  font-size: 0.84rem;
  text-decoration: none;
}

button {
  margin-top: 4px;
  border: 1px solid #1d4ed8;
  border-radius: 14px;
  background:
    radial-gradient(circle at 22% 20%, rgba(147, 197, 253, 0.5), transparent 38%),
    linear-gradient(135deg, #2563eb, #1d4ed8 55%, #1e40af);
  color: #ffffff;
  padding: 13px 15px;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 14px 26px rgba(37, 99, 235, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

button:hover {
  transform: translateY(-2px);
  filter: saturate(1.08);
  box-shadow: 0 18px 30px rgba(29, 78, 216, 0.34);
}

.ghost-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border: 1px solid #dbe7ff;
  border-radius: 12px;
  background: #ffffff;
  color: #334155;
  padding: 11px 12px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.ghost-btn:hover {
  border-color: #bfd6ff;
  color: #1d4ed8;
}

.register-box {
  border-top: 0;
  padding-top: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.register-box h2 {
  margin: 0 0 6px;
  font-family: "Space Grotesk", "Inter", Arial, sans-serif;
  font-size: 1.42rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.register-intro {
  margin: 0 0 10px;
  color: #475569;
  font-size: 0.86rem;
  line-height: 1.58;
  font-weight: 400;
}

.register-intro strong {
  color: #1d4ed8;
  font-weight: 600;
}

.register-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
}

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

.register-form label {
  font-size: 0.88rem;
  font-weight: 400;
  color: #0f172a;
}

.register-form input,
.register-form select {
  border-color: #cfe0ff;
  border-radius: 14px;
  padding: 13px 14px;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 6px 14px rgba(37, 99, 235, 0.05);
}

.register-form input:focus,
.register-form select:focus {
  border-color: #7aa8ff;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.14);
}

.inline-phone {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
}

select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 10px;
  font: inherit;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
}

select:focus {
  outline: none;
  border-color: #7aa8ff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.phone-code {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #64748b 50%),
    linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position:
    calc(100% - 16px) calc(50% - 2px),
    calc(100% - 11px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 28px;
  min-height: 47px;
}

.phone-input {
  min-height: 47px;
  letter-spacing: 0.02em;
}

.policy-list {
  margin-top: 4px;
  border: 1px solid #cfe0ff;
  border-radius: 14px;
  padding: 12px 12px;
  display: grid;
  gap: 10px;
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.08);
}

.policy-item {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: start;
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.52;
  font-weight: 400;
  color: #334155;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  transition: color 0.2s ease;
}

.policy-item input {
  width: 18px;
  height: 18px;
  padding: 0;
  margin-top: 1px;
  accent-color: #2563eb;
  cursor: pointer;
}

.policy-item:hover {
  color: #0f172a;
}

.policy-item a {
  color: #1d4ed8;
  font-weight: 500;
  text-decoration: none;
}

.policy-item a:hover {
  text-decoration: underline;
}

.field-hint {
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 400;
}

.register-btn {
  margin-top: 2px;
  border-radius: 14px;
}

.login-right {
  position: relative;
  padding: 22px clamp(16px, 4vw, 54px);
  display: grid;
  align-content: center;
  background:
    radial-gradient(circle at 84% 16%, rgba(147, 197, 253, 0.68), transparent 45%),
    radial-gradient(circle at 18% 90%, rgba(96, 165, 250, 0.22), transparent 34%),
    linear-gradient(165deg, #eaf2ff, #f4f8ff 58%, #edf5ff);
}

.hero-card {
  max-width: 520px;
  margin-inline: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  padding: 0;
  box-shadow: none;
}

.logo-orbit {
  width: 138px;
  height: 138px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  position: relative;
}

.logo-orbit img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  z-index: 2;
  animation: pulseLogo 2.8s ease-in-out infinite;
}

.ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(37, 99, 235, 0.32);
}

.ring-1 {
  inset: 10px;
  animation: spin 14s linear infinite;
}

.ring-2 {
  inset: 22px;
  animation: spinReverse 10s linear infinite;
}

.ring-3 {
  inset: 34px;
  animation: spin 8s linear infinite;
}

.hero-card h2 {
  margin: 0 0 8px;
  text-align: center;
  font-family: "Space Grotesk", "Inter", Arial, sans-serif;
  font-size: clamp(1.3rem, 2.2vw, 1.8rem);
  line-height: 1.18;
}

.hero-card > p {
  margin: 0 auto 10px;
  text-align: center;
  color: var(--muted);
  max-width: 430px;
  line-height: 1.62;
}

.benefit-list {
  display: grid;
  gap: 8px;
}

.benefit-list article {
  border: 1px solid #dbe7ff;
  border-radius: 14px;
  background: #ffffff;
  padding: 9px 10px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.benefit-list article:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.12);
}

.benefit-list strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.95rem;
  font-family: "Space Grotesk", "Inter", Arial, sans-serif;
}

.benefit-list span {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.55;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes spinReverse {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

@keyframes pulseLogo {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

@keyframes inputShake {
  0% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
  100% { transform: translateX(0); }
}

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

  .login-page {
    grid-template-columns: 1fr;
    height: auto;
  }

  .login-left,
  .login-right {
    padding: 26px 20px;
  }

  .form-shell {
    max-width: 100%;
  }

  .inline-phone {
    grid-template-columns: 84px 1fr;
  }

  .register-form {
    grid-template-columns: 1fr;
  }

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