:root {
  --dark:          #0f172a;
  --dark-2:        #1e293b;
  --accent:        #4f46e5;
  --accent-hover:  #4338ca;
  --accent-light:  #6366f1;
  --white:         #ffffff;
  --gray-50:       #f8fafc;
  --gray-100:      #f1f5f9;
  --gray-200:      #e2e8f0;
  --gray-400:      #94a3b8;
  --gray-500:      #64748b;
  --gray-700:      #334155;
  --gray-900:      #0f172a;
  --error:         #dc2626;
  --error-bg:      #fef2f2;
  --error-border:  #fecaca;
  --success:       #16a34a;
  --success-bg:    #f0fdf4;
  --success-border:#bbf7d0;
}

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

html, body {
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--gray-50);
  color: var(--gray-900);
}

/* ─── LAYOUT ─── */
.shell {
  display: grid;
  grid-template-columns: 1fr 480px;
  min-height: 100vh;
}

/* ─── LEFT BRAND PANEL ─── */
.brand-panel {
  position: relative;
  background: var(--dark);
  display: flex;
  flex-direction: column;
  padding: 48px 60px;
  overflow: hidden;
}

.brand-bg-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(99,102,241,0.12) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 80% 100% at 30% 50%, black 40%, transparent 80%);
  pointer-events: none;
}

.brand-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 1;
  animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

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

/* Brand logo */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 64px;
}

.logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.logo-name {
  font-size: 15px;
  font-weight: 600;
  color: white;
  letter-spacing: -0.01em;
}

.logo-sub {
  font-size: 11px;
  font-weight: 400;
  color: rgba(148,163,184,0.65);
  letter-spacing: 0.02em;
}

/* Hero text */
.brand-hero {
  margin-bottom: 48px;
}

.brand-hero h2 {
  font-size: 40px;
  font-weight: 700;
  color: white;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.brand-accent { color: var(--accent-light); }

.brand-hero p {
  font-size: 15px;
  line-height: 1.65;
  color: rgba(148,163,184,0.72);
  font-weight: 400;
  max-width: 380px;
}

/* Feature list */
.brand-features {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 44px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.feature-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(99,102,241,0.12);
  border: 1px solid rgba(99,102,241,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-light);
  flex-shrink: 0;
}

.feature-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 3px;
}

.feature-title {
  font-size: 13px;
  font-weight: 600;
  color: rgba(226,232,240,0.88);
}

.feature-desc {
  font-size: 12px;
  color: rgba(148,163,184,0.58);
  font-weight: 400;
}

/* Stats bar */
.brand-stats {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 18px 22px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
}

.stat-item { display: flex; flex-direction: column; gap: 3px; }

.stat-num {
  font-size: 20px;
  font-weight: 700;
  color: white;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 11px;
  color: rgba(148,163,184,0.5);
  font-weight: 400;
}

.stat-divider {
  width: 1px;
  height: 30px;
  background: rgba(255,255,255,0.1);
  flex-shrink: 0;
}

/* Footer */
.brand-footer {
  position: relative;
  z-index: 1;
  font-size: 12px;
  color: rgba(148,163,184,0.3);
  font-weight: 400;
}

/* ─── RIGHT FORM PANEL ─── */
.form-panel {
  background: white;
  border-left: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 52px;
  animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

.form-card {
  width: 100%;
  max-width: 360px;
}

/* Form header */
.form-header {
  margin-bottom: 32px;
}

.form-header h1 {
  font-size: 26px;
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -0.025em;
  margin-bottom: 6px;
}

.form-header p {
  font-size: 14px;
  color: var(--gray-500);
  font-weight: 400;
  line-height: 1.5;
}

/* ─── ALERTS ─── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 400;
  margin-bottom: 20px;
  line-height: 1.5;
  animation: alertIn 0.2s ease both;
}
@keyframes alertIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.alert-error   { background: var(--error-bg);   border: 1px solid var(--error-border);   color: var(--error);   }
.alert-success { background: var(--success-bg); border: 1px solid var(--success-border); color: var(--success); }
.alert svg { flex-shrink: 0; margin-top: 1px; }

/* ─── FIELDS ─── */
.field { margin-bottom: 18px; }

.field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.input-wrap { position: relative; }

.input-wrap input {
  width: 100%;
  padding: 10px 42px 10px 40px;
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--gray-900);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.input-wrap input::placeholder { color: var(--gray-400); }
.input-wrap input:focus {
  background: white;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}
.input-wrap input.input-error {
  border-color: var(--error);
  background: var(--error-bg);
}
.input-wrap input.input-error:focus {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(220,38,38,0.1);
}
.field-error-msg {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 5px;
  font-size: 12px;
  font-weight: 500;
  color: var(--error);
  animation: alertIn 0.2s ease both;
}

.input-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--gray-400);
  pointer-events: none;
  transition: color 0.15s;
}
.input-wrap:focus-within .input-icon { color: var(--accent); }

.eye-btn {
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--gray-400);
  display: flex;
  align-items: center;
  border-radius: 4px;
  transition: color 0.15s;
}
.eye-btn:hover { color: var(--gray-700); }

/* ─── SUBMIT BUTTON ─── */
.btn-submit {
  width: 100%;
  margin-top: 8px;
  padding: 11px 20px;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
}
.btn-submit svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  transition: transform 0.15s;
}
.btn-submit:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 16px rgba(99,102,241,0.28);
}
.btn-submit:hover svg { transform: translateX(3px); }
.btn-submit:active { transform: translateY(1px); }

/* ─── FORM FOOTER ─── */
.form-footer {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--gray-100);
}
.form-footer p {
  font-size: 12px;
  color: var(--gray-400);
  text-align: center;
  font-weight: 400;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .brand-panel { display: none; }
  .form-panel {
    border-left: none;
    padding: 48px 28px;
  }
}