/* ── Reset & base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue-50:  #eff6ff;
  --blue-100: #dbeafe;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-800: #1e40af;
  --blue-900: #1e3a8a;
  --gray-50:  #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --green-500: #22c55e;
  --green-100: #dcfce7;
  --green-800: #166534;
  --red-500:   #ef4444;
  --red-100:   #fee2e2;
  --red-800:   #991b1b;
  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.06);
  --shadow:    0 4px 16px rgba(0,0,0,.08);
  --shadow-lg: 0 20px 60px rgba(0,0,0,.15);
}

html, body { height: 100%; font-family: 'Inter', system-ui, sans-serif; }
body { background: var(--gray-100); color: var(--gray-900); -webkit-font-smoothing: antialiased; }

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

.auth-shell--centered {
  grid-template-columns: 1fr;
  place-items: center;
  padding: 2rem;
  background: linear-gradient(135deg, var(--blue-900) 0%, var(--blue-700) 100%);
}

/* ── Brand panel ───────────────────────────────────────────── */
.auth-brand {
  position: relative;
  background: linear-gradient(145deg, var(--blue-900) 0%, var(--blue-700) 60%, #6d28d9 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem;
  overflow: hidden;
  color: #fff;
}

.brand-content { position: relative; z-index: 2; }

.brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
}

.brand-monogram {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #fff;
}

.brand-title {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 1rem;
}

.brand-tagline {
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(255,255,255,.75);
  margin-bottom: 2.5rem;
}

.brand-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.brand-features li {
  display: flex;
  align-items: center;
  gap: .625rem;
  font-size: .9375rem;
  color: rgba(255,255,255,.9);
}

.brand-features svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke: #4ade80;
}

/* Decorative shapes */
.brand-shapes { position: absolute; inset: 0; z-index: 1; overflow: hidden; }
.shape {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.07);
}
.shape-1 { width: 400px; height: 400px; top: -150px; right: -150px; }
.shape-2 { width: 250px; height: 250px; bottom: 60px;  right: 40px; }
.shape-3 { width: 120px; height: 120px; bottom: 200px; left: 40px; background: rgba(109,40,217,.25); }

/* ── Form panel ────────────────────────────────────────────── */
.auth-form-panel {
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.auth-form-panel--solo {
  width: 100%;
  max-width: 440px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 2.5rem;
}

.auth-form-wrap { width: 100%; max-width: 400px; }

/* ── Auth header ───────────────────────────────────────────── */
.auth-header { margin-bottom: 2rem; text-align: center; }
.auth-header h2 { font-size: 1.625rem; font-weight: 700; color: var(--gray-900); margin-bottom: .375rem; }
.auth-header p  { font-size: .9375rem; color: var(--gray-500); }

.auth-back { margin-bottom: 1.5rem; }
.auth-back a { font-size: .9rem; color: var(--blue-600); text-decoration: none; }
.auth-back a:hover { text-decoration: underline; }

.auth-icon-wrap {
  display: inline-flex;
  width: 56px;
  height: 56px;
  background: var(--blue-50);
  border-radius: var(--radius-lg);
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}
.auth-icon-wrap svg { width: 26px; height: 26px; stroke: var(--blue-600); }

/* ── Alerts ────────────────────────────────────────────────── */
.form-alert {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  padding: .75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}
.form-alert svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.form-alert--error   { background: var(--red-100);   color: var(--red-800); }
.form-alert--success { background: var(--green-100); color: var(--green-800); }

/* ── Google button ─────────────────────────────────────────── */
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  width: 100%;
  padding: .75rem 1.25rem;
  background: #fff;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: .9375rem;
  font-weight: 500;
  color: var(--gray-700);
  text-decoration: none;
  transition: background .15s, border-color .15s, box-shadow .15s;
  cursor: pointer;
}
.btn-google:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
  box-shadow: var(--shadow-sm);
}

/* ── Divider ───────────────────────────────────────────────── */
.divider {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 1.5rem 0;
  color: var(--gray-400);
  font-size: .8125rem;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

/* ── Form elements ─────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }

.form-group label {
  display: block;
  font-size: .875rem;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: .4rem;
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .4rem;
}
.label-row label { margin-bottom: 0; }

.forgot-link {
  font-size: .8125rem;
  color: var(--blue-600);
  text-decoration: none;
}
.forgot-link:hover { text-decoration: underline; }

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: .875rem;
  width: 17px;
  height: 17px;
  stroke: var(--gray-400);
  pointer-events: none;
  flex-shrink: 0;
}

.form-input {
  width: 100%;
  padding: .75rem 1rem .75rem 2.75rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: .9375rem;
  font-family: inherit;
  color: var(--gray-900);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.form-input::placeholder { color: var(--gray-400); }
.form-input:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}

.toggle-password {
  position: absolute;
  right: .875rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  color: var(--gray-400);
}
.toggle-password svg { width: 17px; height: 17px; }
.toggle-password:hover { color: var(--gray-600); }

/* ── Checkbox ──────────────────────────────────────────────── */
.form-check {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1.5rem;
}
.check-input {
  width: 16px;
  height: 16px;
  accent-color: var(--blue-600);
  cursor: pointer;
}
.form-check label { font-size: .875rem; color: var(--gray-600); cursor: pointer; margin: 0; }

/* ── Primary button ────────────────────────────────────────── */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  padding: .8125rem 1.25rem;
  background: var(--blue-600);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: .9375rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, box-shadow .15s, transform .1s;
}
.btn-primary:hover  { background: var(--blue-700); box-shadow: 0 4px 12px rgba(37,99,235,.35); }
.btn-primary:active { transform: scale(.99); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }

.btn-spinner { animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Auth note ─────────────────────────────────────────────── */
.auth-note {
  text-align: center;
  font-size: .8125rem;
  color: var(--gray-500);
  margin-top: 1.5rem;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }
  .auth-brand { display: none; }
  .auth-form-panel { min-height: 100vh; padding: 1.5rem; }
}
