/* ═══════════════════════════════════════════════
   BizRefine Login — Obsidian Intelligence
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,500;1,9..144,300;1,9..144,400&family=Syne:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

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

:root {
  --bg:        #07080e;
  --surface:   #0b0e18;
  --elevated:  #111827;
  --panel-l:   #090b14;
  --border:    rgba(255,255,255,0.07);
  --border-hi: rgba(255,255,255,0.12);
  --text:      #d8d3cb;
  --sub:       #7a8da8;
  --dim:       #3a4d66;
  --gold:      #c8a45c;
  --gold-dim:  rgba(200,164,92,0.12);
  --blue:      #4d81fb;
  --green:     #34d399;
  --red:       #f87171;
  --ff-d:      'Fraunces', Georgia, serif;
  --ff-u:      'Syne', system-ui, sans-serif;
  --ff-m:      'JetBrains Mono', monospace;
  --r:         8px;
}

html, body { height: 100%; }
body {
  background: var(--bg); color: var(--text); font-family: var(--ff-u);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}

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

/* ─── LEFT PANEL ─── */
.left-panel {
  background: var(--panel-l);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 48px; position: relative; overflow: hidden;
}
.left-panel::before {
  content: ''; position: absolute; top: -40%; left: -20%;
  width: 120%; height: 120%;
  background: radial-gradient(ellipse at 30% 40%, rgba(200,164,92,0.06) 0%, transparent 60%);
  pointer-events: none;
}
.left-panel::after {
  content: ''; position: absolute; bottom: -20%; right: -20%;
  width: 80%; height: 80%;
  background: radial-gradient(ellipse, rgba(77,129,251,0.04) 0%, transparent 65%);
  pointer-events: none;
}

.left-brand {
  display: flex; align-items: center; gap: 10px; margin-bottom: auto;
  font-family: var(--ff-u); font-size: 15px; font-weight: 600;
  color: var(--text); text-decoration: none;
}
.brand-mark {
  width: 30px; height: 30px; background: var(--gold);
  border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

.left-content { margin: auto 0; position: relative; z-index: 1; }
.left-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--ff-m); font-size: 11px; color: var(--gold);
  letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 20px;
}
.left-eyebrow::before { content: ''; width: 20px; height: 1px; background: var(--gold); }

.left-content h1 {
  font-family: var(--ff-d); font-size: clamp(32px,3.5vw,46px);
  font-weight: 300; line-height: 1.15; color: #ede8e0;
  letter-spacing: -0.02em; margin-bottom: 16px;
}
.left-content h1 em { font-style: italic; color: var(--gold); font-weight: 300; }
.left-content p { font-size: 14px; color: var(--sub); line-height: 1.7; max-width: 360px; margin-bottom: 36px; }

.feature-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.feature-list li {
  display: flex; align-items: flex-start; gap: 12px; font-size: 13.5px; color: var(--sub);
}
.feat-dot {
  width: 6px; height: 6px; border-radius: 50%; margin-top: 6px; flex-shrink: 0;
}
.feat-dot.gold { background: var(--gold); }
.feat-dot.blue { background: var(--blue); }
.feat-dot.green { background: var(--green); }
.feature-list strong { color: var(--text); font-weight: 600; font-size: 13.5px; display: block; margin-bottom: 2px; }
.feature-list span { display: block; color: var(--sub); font-size: 12.5px; }

/* Score card */
.score-card {
  display: flex; align-items: center; gap: 14px; margin-top: 36px;
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  border-radius: var(--r); padding: 16px 20px;
}
.score-ring { position: relative; width: 48px; height: 48px; flex-shrink: 0; }
.score-ring svg { transform: rotate(-90deg); }
.score-num { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); font-family: var(--ff-m); font-size: 13px; font-weight: 500; color: var(--gold); }
.score-info { flex: 1; }
.score-label { font-size: 12px; color: var(--text); font-weight: 600; }
.score-sub { font-size: 11px; color: var(--sub); margin-top: 2px; }
.score-badge-pass {
  display: flex; align-items: center; gap: 5px;
  background: rgba(52,211,153,0.1); border: 1px solid rgba(52,211,153,0.2);
  border-radius: 6px; padding: 5px 10px;
  font-size: 12px; color: var(--green); font-weight: 600; white-space: nowrap;
}

/* Left dots decoration */
.left-dots {
  position: absolute; bottom: 40px; left: 48px; right: 48px;
  display: grid; grid-template-columns: repeat(12,1fr); gap: 8px; opacity: 0.12;
}
.left-dots::before {
  content: '';
  grid-column: 1 / -1;
  height: 60px;
  background: repeating-linear-gradient(90deg, var(--gold) 0, var(--gold) 1px, transparent 1px, transparent 12px),
              repeating-linear-gradient(0deg, var(--gold) 0, var(--gold) 1px, transparent 1px, transparent 12px);
}

/* ─── RIGHT PANEL ─── */
.right-panel {
  display: flex; align-items: center; justify-content: center;
  padding: 48px; background: var(--bg);
}
.right-inner { width: 100%; max-width: 420px; }

/* Tabs */
.auth-tabs {
  display: flex; margin-bottom: 32px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 4px;
}
.auth-tab {
  flex: 1; background: none; border: none;
  color: var(--sub); font-family: var(--ff-u); font-size: 13px; font-weight: 600;
  padding: 9px 16px; border-radius: calc(var(--r) - 2px); cursor: pointer; transition: all 0.2s;
}
.auth-tab.active {
  background: var(--elevated); color: var(--text);
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* Forms */
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-form.hidden { display: none; }

.form-head { margin-bottom: 4px; }
.form-head h2 { font-family: var(--ff-d); font-size: 28px; font-weight: 300; color: #ede8e0; letter-spacing: -0.015em; margin-bottom: 5px; }
.form-head p { font-size: 13.5px; color: var(--sub); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 12px; font-weight: 600; color: var(--sub);
  letter-spacing: 0.05em; text-transform: uppercase;
  display: flex; align-items: center; justify-content: space-between;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.input-wrap {
  display: flex; align-items: center; gap: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r);
  transition: border-color 0.2s; overflow: hidden;
}
.input-wrap:focus-within { border-color: rgba(200,164,92,0.5); }
.input-wrap i { color: var(--dim); font-size: 15px; padding: 0 12px; flex-shrink: 0; }
.input-wrap input {
  flex: 1; background: none; border: none; outline: none; padding: 11px 14px 11px 0;
  color: var(--text); font-family: var(--ff-u); font-size: 14px;
}
.input-wrap input::placeholder { color: var(--dim); }

/* Fix browser autofill overriding dark background */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px #0b0e18 inset !important;
  -webkit-text-fill-color: #d8d3cb !important;
  caret-color: #d8d3cb;
  transition: background-color 9999s ease-in-out 0s;
}
.eye-btn {
  background: none; border: none; color: var(--dim); cursor: pointer;
  padding: 0 12px; font-size: 15px; transition: color 0.2s;
}
.eye-btn:hover { color: var(--sub); }

.input-wrap input.error, .input-wrap:has(input.error) { border-color: rgba(248,113,113,0.5); }

/* Password strength */
.password-strength { display: flex; gap: 4px; margin-top: 6px; height: 3px; }
.pw-seg { flex: 1; border-radius: 2px; background: var(--border-hi); transition: background 0.3s; }
.pw-seg.weak { background: var(--red); }
.pw-seg.medium { background: var(--gold); }
.pw-seg.strong { background: var(--green); }

.btn-auth {
  background: var(--gold); color: #1a1200; border: none; border-radius: var(--r);
  padding: 13px 24px; width: 100%; font-family: var(--ff-u); font-size: 14px; font-weight: 700;
  cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; gap: 8px;
  letter-spacing: 0.02em;
}
.btn-auth:hover { background: #d4af67; transform: translateY(-1px); box-shadow: 0 4px 20px rgba(200,164,92,0.25); }
.btn-auth:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-spinner.hidden { display: none; }
.btn-spinner i { animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Alt button */
.btn-alt {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r);
  color: var(--sub); font-family: var(--ff-u); font-size: 13px; font-weight: 600;
  padding: 11px 24px; text-decoration: none; transition: all 0.2s;
}
.btn-alt:hover { border-color: var(--border-hi); color: var(--text); }

/* Divider */
.divider {
  display: flex; align-items: center; gap: 12px; color: var(--dim); font-size: 12px;
}
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* Messages */
.form-msg {
  background: rgba(248,113,113,0.1); border: 1px solid rgba(248,113,113,0.2);
  border-radius: var(--r); padding: 10px 14px; font-size: 13px; color: var(--red);
}
.form-msg.hidden { display: none; }
.form-msg-ok { background: rgba(52,211,153,0.1) !important; border-color: rgba(52,211,153,0.2) !important; color: var(--green) !important; }

/* Forgot link */
.forgot-link {
  background: none; border: none; color: var(--dim); font-family: var(--ff-u); font-size: 12px;
  cursor: pointer; transition: color 0.2s; padding: 0;
}
.forgot-link:hover { color: var(--gold); }

/* Terms note */
.terms-note { font-size: 12px; color: var(--dim); text-align: center; line-height: 1.5; }
.terms-note a { color: var(--sub); }

/* Bottom link */
.bottom-link { text-align: center; margin-top: 20px; }
.bottom-link a { font-size: 13px; color: var(--sub); text-decoration: none; transition: color 0.2s; }
.bottom-link a:hover { color: var(--text); }

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .left-panel { display: none; }
  .right-panel { padding: 32px 24px; align-items: flex-start; padding-top: 60px; }
}
