/* ============================================================
   HipocratIA — Auth (Login / Register) Layout
   Requires: tokens.css + app.css loaded before this file.

   Inconsistency notes (resolve in Fase B):
     - --navy-3 used here as #1a3260; tokens.css has #162847. Values differ.
     - --error (#e53e3e) intentionally kept separate from --danger (#ef4444).
   ============================================================ */

html, body { height: 100%; }

/* ── Google OAuth button ─────────────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 16px;
  color: var(--text-4);
  font-size: 12px;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  background: #fff;
  color: #1f2937;
  border: 1.5px solid #dadce0;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
  margin-bottom: 8px;
  box-sizing: border-box;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.btn-google:hover {
  background: #f8faff;
  border-color: #4285f4;
  box-shadow: 0 2px 10px rgba(66,133,244,.15);
  opacity: 1;
}

body {
  font-family: var(--font-sans);
  background: var(--light);
  color: var(--navy);
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* ── LEFT PANEL ─────────────────────────────────────────────── */
.auth-left {
  background: var(--navy);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 48px 56px;
  min-height: 100vh;
}

.auth-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(0,184,160,.07) 1.5px, transparent 1.5px);
  background-size: 28px 28px;
}

.auth-left::after {
  content: '';
  position: absolute;
  bottom: -120px;
  right: -120px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0,184,160,.12) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
}

.auth-left-logo {
  position: relative;
  z-index: 1;
  margin-bottom: 56px;
}

.auth-left-logo a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.auth-left-logo img {
  height: 44px;
  width: auto;
  display: block;
  mix-blend-mode: screen;
}

.auth-left-body {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 20px;
}

.auth-left h2 {
  font-family: var(--font-serif);
  font-size: clamp(32px, 3vw, 48px);
  font-weight: 900;
  color: #fff;
  line-height: 1.08;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
}

.auth-left h2 em {
  font-style: italic;
  font-weight: 300;
  color: var(--teal);
}

.auth-left-desc {
  font-size: 16px;
  color: rgba(255,255,255,.55);
  line-height: 1.65;
  margin-bottom: 36px;
  max-width: 400px;
}

.auth-benefits {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 44px;
}

.auth-benefits li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,.75);
}

.auth-benefits li::before {
  content: '✓';
  width: 22px; height: 22px;
  background: rgba(0,184,160,.2);
  border: 1px solid rgba(0,184,160,.35);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--teal);
  flex-shrink: 0;
}

.auth-testimonial {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--r-lg);
  padding: 24px;
  position: relative;
}

.auth-testimonial::before {
  content: '"';
  position: absolute;
  top: -8px; left: 20px;
  font-family: var(--font-serif);
  font-size: 64px;
  color: var(--teal);
  line-height: 1;
}

.auth-testimonial-text {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255,255,255,.7);
  font-style: italic;
  margin-bottom: 16px;
  padding-top: 12px;
}

.auth-testimonial-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy-2), #1a3260);  /* #1a3260 ≠ --navy-3 (#162847) — resolve in Fase B */
  border: 2px solid rgba(0,184,160,.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.auth-testimonial-author strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.auth-testimonial-author span {
  font-size: 12px;
  color: var(--teal);
  font-weight: 500;
}

/* ── RIGHT PANEL ────────────────────────────────────────────── */
.auth-right {
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  min-height: 100vh;
}

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

.auth-form-wrap h1 {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 900;
  color: var(--navy);
  letter-spacing: -.5px;
  margin-bottom: 6px;
}

.auth-form-wrap .subtitle {
  color: var(--text-3);
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 28px;
}

.field { margin-bottom: 18px; }

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
  letter-spacing: .1px;
}

input, select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  color: var(--navy);
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  -webkit-appearance: none;
}

input:focus, select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(0,184,160,.1);
}

/* --error (#e53e3e) intentionally differs from --danger (#ef4444) — Fase B alignment */
input.error, select.error { border-color: var(--error); }

.field-error {
  color: var(--error);
  font-size: 12px;
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.label-row label { margin-bottom: 0; }

.label-link {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-3);
  text-decoration: none;
  transition: color .2s;
}
.label-link:hover { color: var(--teal); }

.btn-primary {
  display: block;
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-d) 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .2s, transform .15s, box-shadow .2s;
  margin-top: 8px;
  letter-spacing: .2px;
  box-shadow: 0 4px 16px rgba(0,184,160,.3);
}
.btn-primary:hover   { opacity: .92; transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0,184,160,.35); }
.btn-primary:active  { transform: scale(.98); }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--text-3);
}

.auth-footer a {
  color: var(--teal);
  text-decoration: none;
  font-weight: 600;
  transition: color .2s;
}
.auth-footer a:hover { color: var(--teal-d); }

.auth-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.auth-trust-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-4);
  letter-spacing: .2px;
}

.alert {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}

.alert-success {
  background: var(--teal-pale);
  color: #0d6b5e;
  border: 1px solid rgba(0,184,160,.25);
}

.alert-error {
  background: #fff5f5;
  color: #c53030;
  border: 1px solid #fed7d7;
}

/* ── Responsive (768px = mobile breakpoint) ─────────────────── */
@media (max-width: 768px) {
  body { grid-template-columns: 1fr; }
  .auth-left { display: none; }
  .auth-right {
    padding: 40px 24px;
    min-height: 100vh;
    background: var(--navy);
  }
  .auth-form-wrap {
    background: #fff;
    border-radius: 20px;
    padding: 36px 28px;
    box-shadow: 0 24px 64px rgba(0,0,0,.35);
  }
}

@media (max-width: 400px) {
  .auth-right { padding: 24px 16px; }
  .auth-form-wrap { padding: 28px 20px; }
}
