/* TenderScope — shared auth layout styles (login, register, forgot, reset).
 * Extracted from templates/auth_layout.html (Batch 7).
 * Order preserved; cascade behaviour identical.
 *
 * PR FI-1 (superseded by PR SF) — this file used to @import
 * tokens.css, which serialized the two stylesheet fetches (the
 * browser can't discover the @import URL until auth.css itself has
 * downloaded). PR SF replaced it with a <link> to tokens.css placed
 * BEFORE the <link> to this file in templates/auth_layout.html, so
 * both fetch in parallel. Cascade order is preserved by that <link>
 * ordering: tokens.css's `:root` loads first, so this file's
 * page-specific overrides below still win, same as before. */

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

/* PR BY: skip-link — see static/index.css for the longer note. */
.skip-link {
  position: absolute;
  top: -100px; left: 8px;
  background: var(--accent, #1E40AF);
  color: #ffffff;
  padding: 10px 16px; border-radius: 6px;
  z-index: 100; font-weight: 600;
  text-decoration: none;
  font-family: 'Noto Sans Georgian', sans-serif;
}
.skip-link:focus { top: 8px; outline: 2px solid #ffffff; outline-offset: 2px; }

/* PR QU (#7): keyboard focus ring on buttons/links (inputs already ring via
   .field input:focus box-shadow). Mirrors static/index.css:148. */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

:root {
  /* PR BY: native form controls + scrollbars + date picker honor the
     active theme. See static/index.css for the longer note. */
  color-scheme: light dark;
  /* PR CI: explicit transition list — see static/index.css for note. */
  --transition-base: background-color var(--dur, 180ms) var(--ease, ease),
                     border-color     var(--dur, 180ms) var(--ease, ease),
                     color            var(--dur, 180ms) var(--ease, ease),
                     box-shadow       var(--dur, 180ms) var(--ease, ease),
                     transform        var(--dur, 180ms) var(--ease, ease);


  /* PR FQ — ink/paper/line/accent/green consolidated to tokens.css. */
  --bg: #F1F5F9;
  --red: #B91C1C;
  --red-soft: #FEE2E2;
  --shadow-sm: 0 1px 3px rgba(11, 18, 32, 0.05), 0 1px 2px rgba(11, 18, 32, 0.04);
  --shadow-lg: 0 12px 32px rgba(11, 18, 32, 0.12), 0 4px 8px rgba(11, 18, 32, 0.06);
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
}

[data-theme="dark"] {
  /* PR FQ — dark color tokens consolidated to tokens.css. */
  --bg: #0B1220;
  --red: #F87171;
  --red-soft: #450A0A;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.55);
}

body {
  font-family: 'Noto Sans Georgian', sans-serif;
  color: var(--ink); background: var(--bg);
  background-image:
    radial-gradient(circle at 20% 0%, rgba(30, 64, 175, 0.06), transparent 40%),
    radial-gradient(circle at 80% 100%, rgba(11, 37, 69, 0.04), transparent 40%);
  background-attachment: fixed;
  min-height: 100vh; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column;
}

[data-theme="dark"] body {
  background-image:
    radial-gradient(circle at 20% 0%, rgba(96, 165, 250, 0.06), transparent 40%),
    radial-gradient(circle at 80% 100%, rgba(30, 64, 175, 0.08), transparent 40%);
}

.brand-bar {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  padding: 14px 28px;
  display: flex; align-items: center; justify-content: space-between;
}
[data-theme="dark"] .brand-bar { background: rgba(19, 28, 46, 0.85); }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-logo {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  color: white; border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
}
[data-theme="dark"] .brand-logo {
  background: linear-gradient(135deg, #1E3A8A, #3B82F6);
}
.brand-text { display: flex; flex-direction: column; gap: 1px; line-height: 1.1; }
.brand-mark {
  font-family: 'Noto Serif Georgian', serif;
  font-weight: 700; font-size: 18px; letter-spacing: -0.015em;
  color: var(--ink);
}
.brand-tag {
  font-size: 10.5px; color: var(--ink-muted);
  text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600;
}

.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--ink-soft);
  cursor: pointer;
  transition: var(--transition-base);
}
.theme-toggle:hover {
  background: var(--accent-soft); color: var(--accent);
  border-color: var(--accent);
}
.theme-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .icon-sun  { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun  { display: inline-block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

.shell {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 32px;
  width: 100%; max-width: 420px;
  box-shadow: var(--shadow-lg);
}
/* PR FI-4 — route auth-card typography through FI-1 tokens. Same
   pattern as PR FI-2 landing + PR FI-3 pricing: `var(--display-font)`
   + `var(--text-h2)` + `var(--line-height-display)` +
   `var(--tracking-display)`. Subtitle picks up `--text-body` +
   `--line-height-body`. */
.card h1 {
  font-family: var(--display-font);
  font-size: var(--text-h2);
  font-weight: 700;
  margin-bottom: 6px; color: var(--ink);
  line-height: var(--line-height-display);
  letter-spacing: var(--tracking-display);
}
.card .subtitle {
  color: var(--ink-muted);
  font-size: var(--text-body);
  line-height: var(--line-height-body);
  margin-bottom: 24px;
}

/* PR FI-4 a11y F-LOW — `.field-label-row` is the sibling-flex
   container that holds the actual <label> + the "forgot password?"
   link side-by-side WITHOUT nesting the link inside the label. Same
   visual layout as the pre-FI-4 label-with-inline-style flexbox, but
   the link is now a sibling — clicking it doesn't accidentally
   trigger the label's focus-input default action. */
.field-label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}
/* PR FI-4 CR-accept (Gemini HIGH): selector `.field .field-label-row
   label` (specificity 0,2,1) wins over the generic `.field label`
   (0,1,1) regardless of source order. The original `.field-label-row
   label` (0,1,1) tied with `.field label` and lost by source order,
   so display:inline + margin-bottom:0 silently got overridden. */
.field .field-label-row label {
  display: inline;
  margin-bottom: 0;
}
.field-aside-link {
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  transition: var(--transition-base);
}
/* PR FI-4 CR-accept (Gemini): multi-line declaration for
   consistency with the rest of the stylesheet. */
.field-aside-link:hover {
  text-decoration: underline;
}

.field { margin-bottom: 16px; }
.field label {
  display: block; font-size: 11.5px; font-weight: 700;
  color: var(--ink-soft); margin-bottom: 6px;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.field input {
  width: 100%; padding: 11px 14px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--paper); color: var(--ink);
  font-family: inherit; font-size: 14px;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
.field input:hover:not(:focus) { border-color: #CBD5E1; }
.field input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
[data-theme="dark"] .field input:focus {
  background: var(--paper-soft);
}
.field .hint {
  font-size: 11.5px; color: var(--ink-muted);
  margin-top: 4px;
}

.error-banner {
  background: var(--red-soft); color: var(--red);
  border: 1px solid currentColor;
  border-radius: var(--r-sm);
  padding: 10px 14px; font-size: 13px;
  margin-bottom: 18px;
  font-weight: 500;
}
/* PR KI — reusable success banner (mirrors .error-banner in green). Was
   open-coded as an inline style on the forgot/reset success messages. */
.success-banner {
  background: var(--green-soft); color: var(--green);
  border: 1px solid currentColor;
  border-radius: var(--r-sm);
  padding: 10px 14px; font-size: 13px;
  margin-bottom: 18px;
  font-weight: 500;
}

.btn {
  width: 100%; padding: 13px 22px;
  border: none; border-radius: var(--r-sm);
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: white;
  font-family: inherit; font-size: 14.5px; font-weight: 600;
  cursor: pointer; letter-spacing: 0.01em;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: var(--transition-base);
}
[data-theme="dark"] .btn { color: #0B1220; font-weight: 700; }
.btn:hover {
  background: linear-gradient(180deg, var(--accent-hover) 0%, var(--accent-strong) 100%);
}
[data-theme="dark"] .btn:hover {
  background: linear-gradient(180deg, var(--accent-hover) 0%, var(--accent) 100%);
}
.btn:active { transform: translateY(1px); }

.divider {
  margin: 20px 0;
  display: flex; align-items: center; gap: 10px;
  color: var(--ink-muted); font-size: 12px;
}
.divider::before, .divider::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}

.alt-link {
  text-align: center; font-size: 13.5px;
  color: var(--ink-muted);
}
.alt-link a {
  color: var(--accent); text-decoration: none; font-weight: 600;
}
.alt-link a:hover { text-decoration: underline; }

footer {
  text-align: center; padding: 20px;
  font-size: 11.5px; color: var(--ink-muted);
  font-family: 'JetBrains Mono', monospace;
  border-top: 1px solid var(--line);
  background: var(--paper);
}
/* PR TN — 44px tap targets. This footer is a ` · `-separated link row at
   11.5px, so all 7 anchors measured 16px tall and touching on a phone
   (/login, /register, /pricing all extend this layout). Same treatment as
   seo_layout / legal_layout / landing's footers. */
footer a {
  color: var(--accent); text-decoration: none; border-bottom: 1px dotted var(--accent);
  display: inline-block; padding: 8px 4px; min-height: 44px; line-height: 28px;
  vertical-align: middle;
}
