:root { --primary-navy: #142B49; --button-blue: #244D78; --silver: #C5D2E2; --background: #EAF0F6; --text-color: #40536A; }
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--background); color: var(--text-color); font: 15px/1.5 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
.page { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }

/* brand panel */
.brand { position: relative; overflow: hidden; color: #fff; background: radial-gradient(120% 80% at 0% 0%, color-mix(in srgb, var(--button-blue) 85%, #fff 0%) 0%, var(--primary-navy) 62%), var(--primary-navy); }
.brand .pattern { position: absolute; inset: 0; width: 100%; height: 100%; color: rgba(255,255,255,.07); }
.brand-in { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: space-between; padding: 48px 56px; gap: 40px; }
.logo { display: flex; align-items: center; gap: 12px; }
.mark { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); font: 700 17px/1 "Segoe UI", system-ui, sans-serif; letter-spacing: .02em; color: #fff; }
.name { font-size: 21px; font-weight: 650; letter-spacing: .01em; }
.pitch h1 { margin: 0 0 14px; font-size: clamp(30px, 3.3vw, 44px); line-height: 1.1; letter-spacing: -.01em; font-weight: 700; }
.pitch p { margin: 0; max-width: 460px; font-size: 16px; color: rgba(255,255,255,.82); }
.feats { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; max-width: 470px; }
.feats li { display: flex; gap: 14px; align-items: flex-start; }
.feats b { display: block; color: #fff; font-weight: 600; margin-bottom: 1px; }
.feats li > span:last-child { color: rgba(255,255,255,.75); font-size: 14px; }
.fi { flex: 0 0 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); }
.fi svg { width: 19px; height: 19px; fill: none; stroke: var(--silver); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.legal { margin: 0; font-size: 12.5px; color: rgba(255,255,255,.6); }

/* form side */
.side { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px 24px; gap: 18px; }
.card { width: min(420px, 100%); background: #fff; border: 1px solid color-mix(in srgb, var(--silver) 80%, #fff); border-radius: 18px; box-shadow: 0 1px 2px rgba(20,43,73,.06), 0 24px 60px rgba(20,43,73,.12); padding: 36px 34px 28px; }
.m-logo { display: none; }
.logo-plate { align-self: flex-start; background: #fff; border-radius: 16px; padding: 14px 20px; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.logo-plate img { display: block; width: 260px; height: auto; }
h2 { margin: 0; color: var(--primary-navy); font-size: 26px; font-weight: 700; letter-spacing: -.01em; }
.sub { margin: 6px 0 22px; font-size: 14px; }
label { display: block; font-weight: 600; font-size: 13px; color: var(--primary-navy); margin: 14px 0 6px; }
.opt { font-weight: 400; color: var(--text-color); }
.field { position: relative; display: flex; align-items: center; }
.field > svg { position: absolute; left: 13px; width: 18px; height: 18px; fill: none; stroke: color-mix(in srgb, var(--text-color) 70%, #fff); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
input { width: 100%; height: 46px; border: 1px solid var(--silver); border-radius: 10px; padding: 0 14px; font: inherit; color: var(--primary-navy); background: #fbfcfe; transition: border-color .15s, box-shadow .15s, background .15s; }
.field > svg + input { padding-left: 40px; }
input::placeholder { color: #9aa8ba; }
input:focus { outline: none; border-color: var(--button-blue); background: #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--button-blue) 16%, transparent); }
.pw input { padding-right: 74px; }
.pw button { position: absolute; right: 7px; height: 32px; border: 0; background: color-mix(in srgb, var(--button-blue) 9%, #fff); color: var(--button-blue); border-radius: 8px; padding: 0 12px; font-weight: 600; font-size: 13px; cursor: pointer; }
button.primary { width: 100%; height: 48px; margin-top: 22px; border: 0; border-radius: 10px; background: var(--button-blue); color: #fff; font: 600 15.5px inherit; font-family: inherit; cursor: pointer; box-shadow: 0 6px 16px color-mix(in srgb, var(--button-blue) 35%, transparent); transition: background .15s, transform .05s; }
button.primary:hover { background: var(--primary-navy); } button.primary:active { transform: translateY(1px); }
button.primary:disabled { opacity: .65; cursor: wait; }
.or { display: flex; align-items: center; gap: 12px; margin: 22px 0 12px; font-size: 13px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--silver); }
button.secondary { width: 100%; height: 44px; border: 1px solid var(--silver); border-radius: 10px; background: #fff; color: var(--primary-navy); font: 600 14.5px inherit; font-family: inherit; cursor: pointer; }
button.secondary:hover { border-color: var(--button-blue); background: color-mix(in srgb, var(--button-blue) 5%, #fff); }
button.link { display: block; margin: 16px auto 0; border: 0; background: none; color: var(--button-blue); font: 600 13.5px inherit; font-family: inherit; cursor: pointer; }
button.link:hover { text-decoration: underline; }
.msg { margin: 0 0 6px; padding: 10px 12px; border-radius: 10px; font-size: 13.5px; background: #fdecec; color: #8a1c1c; border: 1px solid #f3c2c2; }
.msg.ok { background: #e8f5ec; color: #1d5b33; border-color: #bfe0c9; }
.hint { display: block; margin-top: 5px; font-size: 12px; }
.done { padding: 14px; border-radius: 10px; background: #e8f5ec; color: #1d5b33; border: 1px solid #bfe0c9; margin-top: 10px; }
.done p { margin: 0; }
.foot { margin: 0; font-size: 12px; color: color-mix(in srgb, var(--text-color) 80%, #fff); }
#loading { font-style: italic; margin-right: 6px; }
.ios-tip { font-size: 12.5px; text-align: center; margin: 12px 0 0; }

@media (max-width: 900px) {
  .page { grid-template-columns: 1fr; }
  .brand { display: none; }
  .side { justify-content: flex-start; padding: 0 0 24px; background: linear-gradient(180deg, #1f6fcc 0, #20a765 160px, var(--background) 160px); }
  .card { margin-top: 40px; width: calc(100% - 32px); padding: 24px 22px 24px; position: relative; }
  .m-logo { display: flex; justify-content: center; margin: -4px 0 14px; }
  .m-logo img { width: 220px; height: auto; }
  input { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Rev 56: keep signed in (off = sign in again every time the app is opened) */
.keep { display: flex; align-items: center; gap: 8px; font-size: 13.5px; margin: 2px 0 12px; cursor: pointer; font-weight: 500; }
.keep input { width: 16px; height: 16px; margin: 0; }

/* Rev 64: Install button – always clickable; shows how to install when the browser gives no install offer */
[hidden] { display: none !important; }
button.install { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 44px; margin: 14px 0 0; padding: 10px 14px; border: 1px dashed color-mix(in srgb, var(--button-blue) 55%, #fff); border-radius: 10px; background: color-mix(in srgb, var(--button-blue) 6%, #fff); color: var(--button-blue); font: 600 13.5px inherit; font-family: inherit; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; transition: background .15s, border-color .15s, transform .08s; }
button.install:hover { background: color-mix(in srgb, var(--button-blue) 12%, #fff); border-style: solid; }
button.install:active { transform: scale(.98); }
button.install:focus-visible { outline: 3px solid color-mix(in srgb, var(--button-blue) 35%, transparent); outline-offset: 2px; }
button.install svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
button.install.ready { border-style: solid; background: var(--button-blue); color: #fff; }
.inst-help { margin: 10px 0 0; padding: 12px 14px; border-radius: 10px; background: color-mix(in srgb, var(--button-blue) 7%, #fff); border: 1px solid color-mix(in srgb, var(--button-blue) 20%, #fff); font-size: 13px; line-height: 1.5; color: var(--text-color); }
.inst-help b { color: var(--primary-navy); } .inst-help ol { margin: 6px 0 0; padding-left: 20px; } .inst-help li { margin: 2px 0; }
