/* Sign-in page of the park viewer. System fonts only (CSP font-src 'self'; nothing to fetch). */
:root {
  --bg: #edf1f2; --surface: #ffffff; --ink: #16232a; --ink-2: #4d5c65; --line: #cdd7db;
  --accent: #0b6e8a; --accent-ink: #ffffff; --bad: #b3261e; --bad-bg: #fbe9e7; --focus: #e39b00;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1519; --surface: #162026; --ink: #e4edf0; --ink-2: #9db0b9; --line: #2b3a42;
    --accent: #4cb2cf; --accent-ink: #062531; --bad: #ff8a80; --bad-bg: #3a1714; --focus: #ffc24a;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: var(--bg); color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.card {
  width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 24px 22px 18px; box-shadow: 0 6px 22px rgba(14, 30, 38, .12);
}
.lang { text-align: right; margin: -6px -4px 4px 0; }
.lang a { display: inline-block; padding: 10px 8px; color: var(--accent); font-weight: 600; text-decoration: none; }
.lang a:hover { text-decoration: underline; }
h1 { margin: 0 0 8px; font-size: 1.5rem; line-height: 1.25; letter-spacing: -0.01em; }
.lead { margin: 0 0 18px; color: var(--ink-2); }
label { display: block; margin: 0 0 6px; font-weight: 600; }
input[type=text] + label { margin-top: 14px; }
input[type=text], input[type=password] {
  display: block; width: 100%; min-height: 52px; padding: 12px 14px; font: inherit; font-size: 1.125rem;
  color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: 10px;
}
input[type=text]:focus, input[type=password]:focus { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--accent); }
.hint { margin: 6px 0 16px; font-size: .9rem; color: var(--ink-2); }
button {
  display: block; width: 100%; min-height: 52px; padding: 12px 16px; font: inherit; font-size: 1.0625rem; font-weight: 700;
  color: var(--accent-ink); background: var(--accent); border: 0; border-radius: 10px; cursor: pointer;
}
button:hover { filter: brightness(1.06); }
button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.msg { margin: 0 0 16px; padding: 10px 12px; border-radius: 10px; background: var(--bg); }
.msg-bad { color: var(--bad); background: var(--bad-bg); font-weight: 600; }
.small { margin: 14px 0 0; font-size: .85rem; color: var(--ink-2); }
.small a { color: var(--accent); }
@media (max-width: 420px) { .card { padding: 20px 16px 14px; } h1 { font-size: 1.35rem; } }
/* Setup, reset and forgot pages (CONTRACT 9u INV15): the same look; targets of 44 px or more (UI_SPEC). */
[hidden] { display: none !important; }
.forgot { margin: 10px 0 0; text-align: center; }
.forgot a, .small a { display: inline-block; min-height: 44px; padding: 12px 4px; color: var(--accent); font-weight: 600; }
h2 { margin: 18px 0 8px; font-size: 1.1rem; line-height: 1.3; }
dl.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0 0 8px; }
dl.kv dt { font-weight: 600; color: var(--ink-2); }
dl.kv dd { margin: 0; overflow-wrap: anywhere; }
input#pv-pw1, input#pv-pw2 { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
input[type=text] + label, input[type=text][hidden] + label { margin-top: 14px; }
@media (max-width: 420px) { dl.kv { grid-template-columns: 1fr; } dl.kv dd { margin-bottom: 6px; } }
#pv-finish, form[action="/forgot"] button, #pv-err { margin-top: 16px; }
/* KiteX V12 look (brand guideline of the kitex.tech theme: shopify memory/brand-guideline.md, values read from the live site on
   2026-11-30) on a BRANDED gateway only. pages.py puts the word mark (.brand) into the card only when PV_BRAND is set, so every page
   rule below is scoped with :has(.brand): an unbranded gateway (klynge) renders exactly as before. The word mark sits in a floating
   glass capsule at the top (the site header); the card is a glass panel (ts-panel); the page name a light glass pill with a gradient dot. */
:root:has(.brand) {
  --bg: linear-gradient(135deg, #ffffff, #eef2f5); --surface: rgba(255, 255, 255, .55); --field: #ffffff;
  --ink: #101220; --ink-2: #5b6472; --line: rgba(16, 18, 32, .12);
  --grad: linear-gradient(135deg, #6945ff, #3b82f6); --accent: #3b5bdb; --accent-ink: #ffffff;
  --focus: rgba(59, 130, 246, .55); --soft: rgba(59, 130, 246, .08);
}
@media (prefers-color-scheme: dark) {
  :root:has(.brand) {
    --bg: linear-gradient(135deg, #0a0e27, #1a1f4e 60%, #2b3a8c); --surface: rgba(255, 255, 255, .07); --field: rgba(255, 255, 255, .06);
    --ink: #eef1ff; --ink-2: #b4bce0; --line: rgba(255, 255, 255, .16); --accent: #a5b4fc;
    --focus: rgba(165, 180, 252, .7); --soft: rgba(255, 255, 255, .06);
  }
}
body:has(.brand) {
  background: var(--bg) fixed; padding-top: 104px; align-items: flex-start;
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
/* No backdrop-filter on the card: it would make the card the containing block of the fixed header capsule. */
.card:has(.brand) { border: 1px solid rgba(255, 255, 255, .7); border-radius: 20px; box-shadow: 0 10px 40px rgba(0, 0, 0, .06); padding: 22px 26px 18px; }
/* The word mark in a floating glass capsule at the top of the page (kitex.tech header). Shop header choreography (header-modern.css). */
.brand {
  position: fixed; z-index: 2; top: 14px; left: 16px; right: 16px; display: flex; align-items: center; min-height: 64px; padding: 0 24px;
  border-radius: 999px; color: var(--ink); line-height: 0; background: rgba(255, 255, 255, .72);
  -webkit-backdrop-filter: blur(16px) saturate(1.6); backdrop-filter: blur(16px) saturate(1.6); border: 1px solid rgba(255, 255, 255, .85);
  box-shadow: 0 10px 30px rgba(16, 18, 32, .08), 0 2px 6px rgba(16, 18, 32, .04);
}
@media (prefers-color-scheme: dark) { .brand { background: rgba(16, 18, 40, .6); border-color: rgba(255, 255, 255, .14); } .card:has(.brand) { border-color: rgba(255, 255, 255, .18); } }
.kx-logo { display: block; height: 34px; width: auto; }
.kx-logo__x { transform-box: fill-box; transform-origin: center; will-change: transform; }
.kx-logo__underscore { transform-box: fill-box; transform-origin: left center; }
@keyframes kxSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes kxSpinAgain { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes kxUnderscoreIn { 0% { transform: translateX(-120%); opacity: 0; } 25% { opacity: 1; } 100% { transform: translateX(0); opacity: 1; } }
.kx-logo--intro .kx-logo__x { animation: kxSpin .9s cubic-bezier(0.12, 0.6, 0.2, 1) both; }
.kx-logo--intro .kx-logo__underscore { animation: kxUnderscoreIn .55s cubic-bezier(0.16, 1, 0.3, 1) .4s both; }
.brand:hover .kx-logo__x { animation: kxSpinAgain .8s cubic-bezier(0.2, 0.7, 0.2, 1); }
/* The page name as a light glass pill with a gradient dot (the site's toggle capsule). */
.card:has(.brand) h1 {
  display: inline-flex; align-items: center; gap: 10px; max-width: 100%; margin: 0 0 12px; padding: 8px 18px 8px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .7); border: 1px solid rgba(255, 255, 255, .9); box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
  color: var(--ink); font-size: 1rem; line-height: 1.35; font-weight: 700; letter-spacing: 0;
}
.card:has(.brand) h1::before { content: ""; flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: var(--grad); }
@media (prefers-color-scheme: dark) { .card:has(.brand) h1 { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .18); } }
.card:has(.brand) .lang { margin: -6px -4px 4px 0; }
.card:has(.brand) input[type=text], .card:has(.brand) input[type=password] {
  background: var(--field); border-radius: 8px; transition: border-color .2s ease, box-shadow .2s ease;
}
.card:has(.brand) input[type=text]:focus, .card:has(.brand) input[type=password]:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px var(--focus); }
.card:has(.brand) button {
  background: var(--grad); border-radius: 8px; box-shadow: 0 4px 14px rgba(59, 130, 246, .28);
  transition: transform .3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow .25s ease;
}
.card:has(.brand) button:hover { filter: none; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(59, 130, 246, .34); }
.card:has(.brand) .msg { border-radius: 16px; background: var(--soft); }
.card:has(.brand) .msg-bad { background: var(--bad-bg); }
@media (max-width: 420px) {
  body:has(.brand) { padding-top: 88px; }
  .brand { top: 10px; left: 10px; right: 10px; min-height: 56px; padding: 0 18px; }
  .kx-logo { height: 28px; }
  .card:has(.brand) { padding: 20px 16px 14px; }
  .card:has(.brand) h1 { font-size: .95rem; border-radius: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .kx-logo__x, .kx-logo__underscore { animation: none !important; opacity: 1 !important; transform: none !important; }
  .card:has(.brand) button, .card:has(.brand) input { transition: none; }
  .card:has(.brand) button:hover { transform: none; }
}
