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

:root {
  --navy:      #0d1b3e;
  --teal:      oklch(62% 0.18 195);
  --teal2:     oklch(55% 0.18 195);
  --teal-glow: oklch(62% 0.18 195 / 0.35);
  --white:     #f8f9fc;
  --muted:     #8b95b0;
  --border:    #dde3f0;
  --error:     oklch(60% 0.2 25);
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  min-height: 100vh;
  display: flex;
  background: var(--navy);
}

/* ── LEFT PANEL ── */
.left {
  flex: 1.1;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 60px 64px;
  position: relative;
  overflow: hidden;
}

.left::before {
  content: '';
  position: absolute;
  width: 480px; height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, oklch(62% 0.18 195 / 0.18) 0%, transparent 70%);
  top: -100px; left: -100px;
  pointer-events: none;
}
.left::after {
  content: '';
  position: absolute;
  width: 360px; height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, oklch(55% 0.16 230 / 0.14) 0%, transparent 70%);
  bottom: -80px; right: 80px;
  pointer-events: none;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 72px;
  position: relative;
  z-index: 1;
}

.logo-mark {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--teal);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 20px var(--teal-glow);
}
.logo-mark svg { width: 22px; height: 22px; }

.brand-name {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
}
.brand-name span { color: var(--teal); }

.left-headline {
  position: relative;
  z-index: 1;
  max-width: 380px;
}
.left-headline h1 {
  font-size: 42px;
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 20px;
}
.left-headline h1 .accent { color: var(--teal); }
.left-headline p {
  font-size: 15px;
  color: oklch(80% 0.04 230);
  line-height: 1.7;
}

.feature-pills {
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  z-index: 1;
}
.pill {
  display: flex;
  align-items: center;
  gap: 12px;
  color: oklch(78% 0.05 230);
  font-size: 14px;
  font-weight: 500;
}
.pill-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: oklch(62% 0.18 195 / 0.12);
  border: 1px solid oklch(62% 0.18 195 / 0.2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.pill-icon svg { width: 15px; height: 15px; }

.grid-deco {
  position: absolute;
  bottom: 40px; left: 64px;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
  opacity: 0.25;
  z-index: 0;
}
.grid-dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--teal);
}

/* ── RIGHT PANEL ── */
.right {
  flex: 1;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 64px;
}

.form-card {
  width: 100%;
  max-width: 400px;
  animation: slideUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.form-header { margin-bottom: 36px; }
.form-header h2 {
  font-size: 28px;
  font-weight: 700;
  color: #0d1b3e;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}
.form-header p {
  font-size: 14px;
  color: var(--muted);
}

/* floating label inputs */
.field {
  position: relative;
  margin-bottom: 20px;
}

.field-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  transition: color 0.2s;
  pointer-events: none;
  z-index: 2;
}
.field-icon svg { width: 18px; height: 18px; display: block; }

.field input {
  width: 100%;
  height: 54px;
  padding: 0 44px 0 46px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  color: #0d1b3e;
  background: #fff;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input::placeholder { color: #b4bcd0; font-weight: 400; }
.field input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px var(--teal-glow);
}
.field input:focus ~ .field-icon,
.field input:not(:placeholder-shown) ~ .field-icon {
  color: var(--teal);
}

.field label {
  position: absolute;
  left: 46px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: #b4bcd0;
  pointer-events: none;
  transition: all 0.18s cubic-bezier(0.4,0,0.2,1);
  background: #fff;
  padding: 0 4px;
  font-weight: 400;
}
.field input:focus ~ label,
.field input:not(:placeholder-shown) ~ label {
  top: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--teal);
  text-transform: uppercase;
}

.toggle-pw {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 4px;
  border-radius: 6px;
  display: flex;
  transition: color 0.2s;
  z-index: 2;
}
.toggle-pw:hover { color: var(--teal); }
.toggle-pw svg { width: 18px; height: 18px; }

.field-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 28px;
  margin-top: -8px;
}
.link {
  font-size: 13px;
  color: var(--teal);
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.15s;
}
.link:hover { opacity: 0.75; }

.btn-login {
  width: 100%;
  height: 54px;
  border: none;
  border-radius: 12px;
  background: var(--teal);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 20px var(--teal-glow);
}
.btn-login::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background 0.2s;
}
.btn-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 28px var(--teal-glow);
}
.btn-login:hover::before { background: rgba(255,255,255,0.08); }
.btn-login:active { transform: translateY(0); }
.btn-login svg { width: 18px; height: 18px; }

.btn-login.loading .btn-text { opacity: 0; }
.btn-login .spinner {
  position: absolute;
  width: 20px; height: 20px;
  border: 2.5px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}
.btn-login.loading .spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.footer-note {
  text-align: center;
  font-size: 12px;
  color: #b4bcd0;
  margin-top: 36px;
}
.footer-note strong { color: var(--muted); }

/* error */
.field.error input {
  border-color: var(--error);
  box-shadow: 0 0 0 3px oklch(60% 0.2 25 / 0.12);
  animation: shake 0.4s ease;
}
.error-msg {
  font-size: 12px;
  color: var(--error);
  margin-top: 6px;
  padding-left: 4px;
  display: none;
  font-weight: 500;
}
.field.error .error-msg { display: block; }
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%     { transform: translateX(-6px); }
  60%     { transform: translateX(6px); }
  80%     { transform: translateX(-3px); }
}

/* success overlay */
.success-overlay {
  position: fixed; inset: 0;
  background: var(--teal);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
  gap: 16px;
}
.success-overlay.show { opacity: 1; pointer-events: all; }
.success-overlay svg { width: 56px; height: 56px; color: #fff; }
.success-overlay p { color: #fff; font-size: 18px; font-weight: 700; }

/* ── RESPONSIVE ── */

/* Tablet: hide left panel text, keep it as a thinner decorative stripe */
@media (max-width: 900px) {
  .left {
    flex: 0 0 64px;
    padding: 24px 20px;
    align-items: center;
    justify-content: flex-start;
  }
  .left-headline,
  .feature-pills,
  .grid-deco,
  .brand-name { display: none; }
  .brand-logo { margin-bottom: 0; }
  .logo-mark { width: 40px; height: 40px; }
  .right { padding: 40px 32px; }
}

/* Mobile: stack vertically, no left panel */
@media (max-width: 600px) {
  body { flex-direction: column; min-height: 100vh; }

  .left {
    flex: 0 0 auto;
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 20px 24px;
    border-bottom: 1px solid oklch(62% 0.18 195 / 0.15);
  }
  .left::before, .left::after { display: none; }
  .brand-logo { margin-bottom: 0; }
  .brand-name { display: block; }
  .left-headline,
  .feature-pills,
  .grid-deco { display: none; }

  .right {
    flex: 1;
    padding: 40px 24px;
    background: var(--white);
    border-radius: 24px 24px 0 0;
    margin-top: -16px;
    box-shadow: 0 -4px 30px rgba(0,0,0,0.1);
  }

  .form-card { max-width: 100%; }
  .form-header h2 { font-size: 24px; }
}
