/* ============================================================
   AgentBrowser – Auth Pages (Dark Theme)
   ============================================================ */

/* ----- Auth Layout ----- */
.auth-page {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: linear-gradient(135deg, #0a0a0b, #16181d 50%, #0c1929);
  color: #fff;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.auth-shell {
  width: min(1080px, 100%);
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 28px;
  align-items: center;
}

/* ----- Brand ----- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 900;
}
.brand span {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  color: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(59, 130, 246, .35);
}

/* ----- Auth Copy (left column) ----- */
.auth-copy h1 {
  font-size: 52px;
  line-height: 1.05;
  margin: 30px 0 18px;
  max-width: 10ch;
  letter-spacing: -.02em;
}
.auth-copy p {
  font-size: 18px;
  line-height: 1.8;
  color: rgba(255, 255, 255, .65);
  max-width: 600px;
}
.auth-points {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.auth-points span {
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 999px;
  padding: 8px 12px;
  color: rgba(255, 255, 255, .85);
  font-size: 14px;
  backdrop-filter: blur(4px);
  background: rgba(255, 255, 255, .04);
}

/* ----- Auth Card (right column) ----- */
.auth-card {
  background: #1c1e24;
  color: #e8eaed;
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .06);
}
.auth-card h2 {
  margin: 0 0 18px;
  font-size: 26px;
}

/* Auth card labels */
.auth-card label {
  display: block;
  font-weight: 700;
  margin: 14px 0;
  color: #e8eaed;
}

/* Auth card inputs */
.auth-card input {
  width: 100%;
  margin-top: 8px;
  padding: 12px 14px;
  border: 1px solid #2a2d35;
  border-radius: 8px;
  font: inherit;
  background: #16181d;
  color: #e8eaed;
  transition: border-color .2s, box-shadow .2s;
}
.auth-card input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .15);
}

/* ----- Buttons (auth override) ----- */
.auth-card .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 8px;
  border: 0;
  font-weight: 800;
  cursor: pointer;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.auth-card .btn:hover { transform: translateY(-2px); }
.auth-card .btn.primary {
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  color: #fff;
  box-shadow: 0 6px 18px rgba(59, 130, 246, .3);
}
.auth-card .btn.primary:hover { box-shadow: 0 12px 28px rgba(59, 130, 246, .45); }
.auth-card .btn.dark {
  background: #001529;
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 21, 41, .25);
}
.auth-card .btn.dark:disabled {
  background: #374151;
  cursor: not-allowed;
  box-shadow: none;
}
.auth-card .btn.dark:hover { box-shadow: 0 12px 28px rgba(0, 21, 41, .4); }
.auth-card .btn.full { width: 100%; margin-top: 8px; }
.auth-card .btn:disabled { opacity: .55; cursor: not-allowed; }
.auth-card .btn.primary:disabled { opacity: .55; }

/* ----- Auth misc ----- */
.auth-card .form-foot {
  color: #9ca3af;
  text-align: center;
  margin-top: 18px;
}
.auth-card .form-foot a {
  color: #3b82f6;
  font-weight: 800;
  text-decoration: none;
}

.code-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.code-row input { flex: 1; }
.code-row .btn { margin-top: 8px; white-space: nowrap; min-width: 120px; }

.code-hint {
  font-size: 14px;
  margin: -6px 0 8px;
  min-height: 18px;
}
.code-hint.ok { color: #22c55e; }
.code-hint.err { color: #ef4444; }

.managed-challenge {
  display: grid;
  gap: 8px;
  margin: 16px 0 8px;
}
.managed-challenge > span { font-weight: 700; }
.managed-challenge small { color: #9ca3af; line-height: 1.5; }
.managed-challenge .cf-turnstile { min-height: 65px; }

.alert {
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid rgba(239, 68, 68, .2);
  background: rgba(239, 68, 68, .08);
  color: #fca5a5;
  margin: 14px 0;
}
.alert.ok {
  border-color: rgba(34, 197, 94, .2);
  background: rgba(34, 197, 94, .08);
  color: #86efac;
}

.pwd-toggle { min-width: 76px !important; }

.pwd-strength {
  height: 6px;
  border-radius: 999px;
  background: #2a2d35;
  margin: 8px 0 0;
  overflow: hidden;
}
.pwd-strength i {
  display: block;
  height: 100%;
  width: 0;
  transition: width .2s, background .2s;
}
.pwd-strength.weak i { width: 33%; background: #ef4444; }
.pwd-strength.mid i { width: 66%; background: #f59e0b; }
.pwd-strength.strong i { width: 100%; background: #22c55e; }

.field-err {
  color: #ef4444;
  font-size: 13px;
  margin: 4px 0 0;
  min-height: 16px;
  font-weight: 400;
}

.terms {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-weight: 400;
  color: #9ca3af;
  font-size: 14px;
  margin: 16px 0;
}
.terms input { width: auto; margin: 2px 0 0; }
.terms a { color: #3b82f6; text-decoration: none; font-weight: 700; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-copy h1 { font-size: 38px; max-width: none; }
}
.brand img{width:46px;height:46px;object-fit:contain;flex:0 0 auto}

.auth-language-picker {
  position: fixed;
  top: 18px;
  right: 20px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  background: rgba(18,20,25,.9);
  color: rgba(255,255,255,.78);
}
.auth-language-picker select { border: 0; outline: 0; background: #17191e; color: inherit; font: inherit; }
