:root {
  color-scheme: light;
  --accent: #aed82c;
  --primary: #5f8f1e;
  --primary-hover: #4a7015;
  --ink: #16232e;
  --page: #eef1ef;
  --body: #3a4b56;
  --muted: #8497a1;
  --border: #e2e8e6;
  --danger: #8f2d2d;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-width: 320px; min-height: 100%; }
body { background: var(--page); color: var(--ink); font-size: 14px; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-underline-offset: .18em; }
a:hover { color: var(--primary-hover); }
button, input, select { font: inherit; }

.auth-shell { min-height: 100vh; display: flex; overflow: hidden; }
.auth-brand {
  position: relative;
  width: 44%;
  flex-shrink: 0;
  padding: 48px 46px;
  background: linear-gradient(180deg, rgba(22,35,46,.82), rgba(22,35,46,.9)), url('/bridge-v2/assets/6790fc2a-a81a-41c0-ba96-bf627389232e.jpg') center/cover;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
}
.brand-link { position: relative; display: inline-flex; align-items: center; width: min(100%, 330px); color: #fff; text-decoration: none; }
.brand-logo { display: block; width: auto; height: 160px; max-width: 100%; object-fit: contain; object-position: left center; }
.auth-brand h1 { font-family: Spectral, Georgia, serif; font-size: 30px; font-weight: 600; line-height: 1.25; margin: 8px 0 16px; max-width: 420px; text-shadow: 0 2px 12px rgba(0,0,0,.35); }
.auth-brand p { max-width: 420px; margin: 0; color: #e4ebee; font-size: 13.5px; line-height: 1.6; text-shadow: 0 1px 8px rgba(0,0,0,.35); }
.section-eyebrow { color: #cdd8dc !important; font-size: 11px !important; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.security-note { color: #cdd8dc !important; font-size: 11px !important; text-shadow: none !important; }

.auth-workspace { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; padding: 72px 32px 40px; overflow-y: auto; }
.back-link { position: absolute; top: 24px; left: 32px; font-size: 12px; font-weight: 600; text-decoration: none; }
.surface { width: min(100%, 680px); padding: 32px; background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 4px 24px rgba(22,35,46,.06); animation: brdgFade .3s ease both; }
.surface:has(input[type="password"]), .surface:has(#Code) { max-width: 400px; }
.surface-header h2 { margin: 0 0 4px; font-family: Spectral, Georgia, serif; font-size: 22px; font-weight: 600; }
.section-copy { margin: 0 0 22px; color: var(--muted); font-size: 12.5px; line-height: 1.55; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
.command-form label { display: block; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.command-form input, .command-form select { width: 100%; min-height: 40px; margin-top: 5px; padding: 9px 11px; border: 1px solid #d3dbd9; border-radius: 8px; background: #fbfcfb; color: var(--ink); }
.command-form input:focus, .command-form select:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(174,216,44,.22); }
.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; }
.button, .test-fill { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 11px 22px; border: 0; border-radius: 9px; background: var(--primary); color: #fff; font-size: 13px; font-weight: 600; text-decoration: none; cursor: pointer; }
.button:hover, .test-fill:hover { background: var(--primary-hover); color: #fff; }
.tiny-text { color: #5c6e78; font-size: 12.5px; line-height: 1.55; }
.validation-summary, .field-validation-error { color: var(--danger); }
.field-validation-error { display: block; margin-top: 4px; font-size: 11px; letter-spacing: 0; text-transform: none; }

.test-credentials { position: fixed; right: 18px; bottom: 18px; z-index: 20; width: min(320px, calc(100vw - 36px)); padding: 16px; border: 1px solid rgba(174,216,44,.65); border-radius: 12px; background: rgba(22,35,46,.97); box-shadow: 0 18px 48px rgba(22,35,46,.28); color: #fff; }
.test-credentials strong { display: block; margin: 8px 0 10px; font-family: Spectral, Georgia, serif; font-size: 16px; }
.test-credentials p { margin: 8px 0; color: #c3d0d6; font-size: 12px; line-height: 1.5; }
.test-badge { display: inline-flex; padding: 4px 8px; border-radius: 20px; background: var(--accent); color: var(--ink); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.test-credentials dl { display: grid; gap: 6px; margin: 8px 0 12px; }
.test-credentials dl div { display: grid; grid-template-columns: 72px 1fr; gap: 8px; }
.test-credentials dt { color: #9fb0b8; font-size: 11px; }
.test-credentials dd { margin: 0; font-family: "IBM Plex Mono", monospace; font-size: 11px; }
.test-fill { width: 100%; min-height: 36px; padding: 8px 12px; font-size: 12px; }

@keyframes brdgFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 820px) {
  .auth-shell { display: grid; grid-template-columns: 1fr; overflow: visible; }
  .auth-brand { width: 100%; min-height: 320px; padding: 28px 22px; }
  .brand-logo { height: 96px; }
  .auth-brand h1 { font-size: 26px; }
  .auth-workspace { padding: 64px 16px 112px; overflow: visible; }
  .back-link { top: 22px; left: 16px; }
  .surface { padding: 24px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-actions { align-items: stretch; flex-direction: column; }
  .button { width: 100%; }
  .test-credentials { right: 12px; bottom: 12px; width: calc(100vw - 24px); max-height: 42vh; overflow: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
