/* Sign in / sign up / password reset — light & dark, no external fonts. */
:root {
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --brand: #2563eb; --brand-600: #1d4ed8; --teal: #0ea5b7;
  --bg: #f4f6fb; --surface: #fff; --line: #e2e8f0; --line-2: #cbd5e1;
  --fg: #0f172a; --fg-2: #334155; --muted: #64748b;
  --bad: #dc2626; --bad-50: #fef2f2; --ok: #059669; --ok-50: #ecfdf5;
  --focus: 0 0 0 3px rgba(37,99,235,.25);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #070d1b; --surface: #0c1528; --line: #1c2a45; --line-2: #26385b;
    --fg: #e6ecf7; --fg-2: #c3cee3; --muted: #8e9bb6; --bad-50: rgba(220,38,38,.14); --ok-50: rgba(5,150,105,.14);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #070d1b; --surface: #0c1528; --line: #1c2a45; --line-2: #26385b;
  --fg: #e6ecf7; --fg-2: #c3cee3; --muted: #8e9bb6; --bad-50: rgba(220,38,38,.14); --ok-50: rgba(5,150,105,.14);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font: 15px/1.5 var(--font); background: var(--bg); color: var(--fg); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; font-weight: 600; }
a:hover { text-decoration: underline; }

.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.brand-panel {
  position: relative; overflow: hidden; color: #e2e8f0; padding: 48px 56px; display: flex; flex-direction: column;
  background: radial-gradient(1200px 600px at -10% -10%, rgba(37,99,235,.55), transparent 60%),
              radial-gradient(900px 500px at 110% 110%, rgba(14,165,183,.45), transparent 60%), #0b1324;
}
.brand-panel .logo { display: flex; align-items: center; gap: 12px; }
.brand-panel .logo img.icon { width: 40px; height: 40px; border-radius: 10px; }
.brand-panel .logo img.word { height: 26px; }
.brand-panel .pitch { margin: auto 0; max-width: 460px; }
.brand-panel h2 { font-size: 34px; line-height: 1.15; letter-spacing: -.02em; margin: 0 0 14px; color: #fff; }
.brand-panel p { color: #a5b4cf; margin: 0 0 26px; font-size: 16px; }
.brand-panel ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.brand-panel li { display: flex; gap: 10px; align-items: flex-start; color: #cbd5e1; }
.brand-panel li::before { content: ""; width: 20px; height: 20px; flex-shrink: 0; border-radius: 50%; margin-top: 1px;
  background: rgba(14,165,183,.25) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2367e8f9' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat; }
.brand-panel .foot { color: #7c8aa5; font-size: 13px; }

.form-side { display: grid; place-items: center; padding: 40px 24px; }
.card { width: 100%; max-width: 420px; }
.card .mobile-logo { display: none; margin-bottom: 28px; }
.card .mobile-logo img { height: 30px; }
.card h1 { margin: 0 0 6px; font-size: 26px; letter-spacing: -.02em; }
.card .sub { margin: 0 0 26px; color: var(--muted); }
.field { margin-bottom: 16px; }
.field label { display: flex; justify-content: space-between; align-items: baseline; font-size: 13.5px; font-weight: 600; color: var(--fg-2); margin-bottom: 6px; }
.field label a { font-size: 13px; }
.input-wrap { position: relative; }
input { width: 100%; height: 46px; padding: 0 14px; background: var(--surface); border: 1px solid var(--line-2); color: var(--fg); border-radius: 12px; font: inherit; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus { border-color: var(--brand); box-shadow: var(--focus); }
input[aria-invalid="true"] { border-color: var(--bad); }
.input-wrap input { padding-right: 70px; }
.reveal { position: absolute; right: 6px; top: 6px; height: 34px; padding: 0 10px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; border-radius: 8px; }
.reveal:hover { background: rgba(100,116,139,.12); }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 8px; }
.strength span { height: 4px; border-radius: 99px; background: var(--line); transition: background .2s; }
.strength[data-s="1"] span:nth-child(-n+1) { background: #ef4444; }
.strength[data-s="2"] span:nth-child(-n+2) { background: #f59e0b; }
.strength[data-s="3"] span:nth-child(-n+3) { background: #10b981; }
.strength[data-s="4"] span { background: #059669; }
.btn { width: 100%; height: 48px; margin-top: 8px; border: 0; border-radius: 12px; font: inherit; font-weight: 700; cursor: pointer; color: #fff;
  background: linear-gradient(110deg, #1d4ed8, #2563eb 45%, #0ea5b7); box-shadow: 0 10px 24px -12px rgba(37,99,235,.7); transition: transform .1s, opacity .15s; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .65; cursor: not-allowed; transform: none; }
.alert { display: none; padding: 11px 14px; border-radius: 12px; font-size: 14px; margin-bottom: 16px; }
.alert.show { display: block; }
.alert.err { background: var(--bad-50); color: var(--bad); }
.alert.ok { background: var(--ok-50); color: var(--ok); }
.alt { margin-top: 22px; text-align: center; color: var(--muted); font-size: 14px; }
.legal { margin-top: 14px; text-align: center; color: var(--muted); font-size: 12.5px; }
.legal a { font-weight: 500; }

@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .brand-panel { display: none; }
  .card .mobile-logo { display: block; }
  .form-side { align-items: start; padding-top: 48px; }
}
