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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f8fafc;
  min-height: 100vh;
}

/* ── Layout ─────────────────────────────────────────────────── */
.auth-wrap {
  display: flex;
  min-height: 100vh;
}

/* ── Left panel ─────────────────────────────────────────────── */
.auth-left {
  width: 42%;
  background: linear-gradient(145deg, #312e81 0%, #4f46e5 40%, #7c3aed 100%);
  padding: 40px 48px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.auth-left::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  pointer-events: none;
}
.auth-left::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -60px;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: rgba(255,255,255,.05);
  pointer-events: none;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 60px;
}

.auth-logo {
  width: 44px; height: 44px;
  background: rgba(255,255,255,.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.auth-brand-name {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.3px;
}
.auth-brand-sub {
  font-size: 11px;
  color: rgba(255,255,255,.6);
  margin-top: 1px;
}

.auth-hero {
  margin-bottom: 44px;
}

.auth-hero-title {
  font-size: 30px;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
  letter-spacing: -.5px;
  margin-bottom: 14px;
}

.auth-hero-sub {
  font-size: 14px;
  color: rgba(255,255,255,.75);
  line-height: 1.65;
}

.auth-features {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}

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

.auth-feature-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.auth-feature-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
}
.auth-feature-desc {
  font-size: 12px;
  color: rgba(255,255,255,.6);
  line-height: 1.4;
}

.auth-left-footer {
  margin-top: 40px;
  font-size: 12px;
  color: rgba(255,255,255,.4);
}

/* ── Right panel ────────────────────────────────────────────── */
.auth-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: #fff;
}

.auth-card {
  width: 100%;
  max-width: 420px;
}

/* ── Tab bar ─────────────────────────────────────────────────── */
.auth-tab-bar {
  display: flex;
  background: #f1f5f9;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 32px;
}

.auth-tab {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all .18s;
}
.auth-tab.active {
  background: #fff;
  color: #1e293b;
  box-shadow: 0 1px 6px rgba(0,0,0,.1);
}

/* ── Form ────────────────────────────────────────────────────── */
.auth-form-wrap {
  animation: fade-in .2s ease;
}
@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.auth-form-header {
  margin-bottom: 26px;
}
.auth-form-header h2 {
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -.4px;
}
.auth-form-header p {
  font-size: 13px;
  color: #64748b;
  margin-top: 5px;
}

.auth-field {
  margin-bottom: 18px;
}
.auth-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 7px;
}

.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.auth-input-wrap > svg:first-child {
  position: absolute;
  left: 13px;
  color: #94a3b8;
  pointer-events: none;
}
.auth-input-wrap input {
  width: 100%;
  padding: 11px 44px 11px 40px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px;
  color: #0f172a;
  background: #fff;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.auth-input-wrap input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,.12);
}
.auth-input-wrap input::placeholder { color: #94a3b8; }

.auth-eye {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: #94a3b8;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color .12s;
}
.auth-eye:hover { color: #4f46e5; }

/* ── Error ──────────────────────────────────────────────────── */
.auth-error {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  font-size: 13px;
  color: #dc2626;
  font-weight: 500;
  margin-bottom: 14px;
}

/* ── Submit button ──────────────────────────────────────────── */
.auth-submit {
  width: 100%;
  padding: 13px 20px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity .15s, transform .1s;
  margin-top: 8px;
  letter-spacing: -.1px;
}
.auth-submit:hover  { opacity: .92; }
.auth-submit:active { transform: scale(.98); }
.auth-submit:disabled {
  opacity: .6;
  cursor: not-allowed;
}

/* ── Note ───────────────────────────────────────────────────── */
.auth-note {
  font-size: 12px;
  color: #94a3b8;
  text-align: center;
  margin-top: 16px;
}

/* ── Loading spinner inside button ─────────────────────────── */
.auth-spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.auth-back-home {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-decoration: none;
  margin-bottom: 18px;
  transition: color .15s;
}
.auth-back-home:hover { color: #6366f1; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .auth-wrap { flex-direction: column; }
  .auth-left { width: 100%; padding: 28px 24px 32px; min-height: unset; }
  .auth-hero-title { font-size: 22px; }
  .auth-features { display: none; }
  .auth-hero { margin-bottom: 0; }
  .auth-right { padding: 28px 20px; }
  .auth-card { padding: 24px 20px; }
}
@media (max-width: 480px) {
  .auth-left { padding: 20px 16px 24px; }
  .auth-right { padding: 20px 16px; }
  .auth-card { padding: 20px 16px; border-radius: 16px; }
  .auth-brand-name { font-size: 16px; }
}
