/* Login page and the Privacy / Terms pages. Colours match the app (css/style.css). */
:root {
  --navy: #141E3C; --navy-hover: #1B2A4A; --blue: #0066CC; --blue-light: #EAF2FC; --text: #1D1D1F; --muted: #6B7280;
  --border: #E5E7EB; --input-bg: #F9FAFB; --danger: #b02a37; --danger-light: #FDECEE; --panel: #EEF3FA;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: 'Inter', -apple-system, 'Segoe UI', system-ui, sans-serif; color: var(--text); background: #fff; -webkit-font-smoothing: antialiased; }
a { color: var(--blue); }

/* ---- split layout ---- */
.auth { display: grid; grid-template-columns: minmax(380px, 45%) 1fr; min-height: 100vh; }
.auth-left { display: flex; flex-direction: column; padding: 40px 56px 28px; }
.auth-form { margin: auto; width: 100%; max-width: 380px; }
.auth-logo { height: 40px; width: auto; display: block; margin: 0 auto 40px; }
.auth h1 { font-size: 26px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 8px; text-align: center; }
.auth .lead { color: var(--muted); font-size: 14.5px; margin: 0 0 28px; text-align: center; }
.field { position: relative; margin-bottom: 14px; }
.field svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.field input { width: 100%; height: 48px; border: 1px solid var(--border); background: var(--input-bg); border-radius: 12px; padding: 0 44px 0 44px;
  font: inherit; font-size: 15px; color: var(--text); transition: border-color .15s, box-shadow .15s, background .15s; }
.field input:focus { outline: none; border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px var(--blue-light); }
.field .eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; padding: 6px 8px;
  color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 600; border-radius: 8px; }
.field .eye:hover { color: var(--navy); background: var(--border); }
.row-end { display: flex; justify-content: flex-end; margin: -2px 0 18px; }
.link { background: none; border: none; padding: 0; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--blue); cursor: pointer; }
.link:hover { text-decoration: underline; }
.forgot-note { display: none; background: var(--blue-light); color: var(--navy); font-size: 13.5px; line-height: 1.5; border-radius: 10px; padding: 10px 12px; margin: -6px 0 16px; }
.forgot-note.show { display: block; }
.btn-primary { width: 100%; height: 48px; border: none; border-radius: 12px; background: var(--blue); color: #fff; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
  transition: background .15s, transform .05s; display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn-primary:hover { background: var(--navy); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary[disabled] { opacity: .7; cursor: wait; }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; display: none; }
.btn-primary[disabled] .spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }
.msg { min-height: 0; font-size: 13.5px; line-height: 1.45; border-radius: 10px; margin-bottom: 14px; }
.msg:empty { display: none; }
.msg.error { background: var(--danger-light); color: var(--danger); padding: 10px 12px; }
.msg.info { background: var(--blue-light); color: var(--navy); padding: 10px 12px; }
.auth-foot { display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); padding-top: 28px; }
.foot-row { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
.auth-foot a { color: var(--muted); text-decoration: none; }
.auth-foot a:hover { color: var(--navy); text-decoration: underline; }
.ks-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); transition: border-color .15s, background .15s; }
.auth-foot a.ks-badge:hover { text-decoration: none; border-color: var(--navy); background: var(--input-bg); }
.ks-badge img { width: 22px; height: 22px; display: block; }
.ks-by { font-size: 12px; color: var(--muted); }
.ks-name { font-size: 13px; font-weight: 600; color: var(--text); letter-spacing: .01em; }
.ks-inline { display: inline-flex; align-items: center; gap: 5px; vertical-align: -3px; }
.ks-inline img { width: 16px; height: 16px; }

/* ---- brand panel ---- */
.auth-right { position: relative; overflow: hidden; background: var(--panel); display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 48px; }
.auth-right::before { content: ''; position: absolute; width: 780px; height: 780px; right: -220px; bottom: -300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 102, 204, .13), rgba(0, 102, 204, 0) 68%); }
.auth-right::after { content: ''; position: absolute; width: 520px; height: 520px; left: -180px; top: -200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(20, 30, 60, .08), rgba(20, 30, 60, 0) 70%); }
.showcase { position: relative; z-index: 1; width: 100%; max-width: 560px; }
.showcase-media { width: 100%; aspect-ratio: 720 / 512; filter: drop-shadow(0 24px 40px rgba(20, 30, 60, .14)); }
.showcase-media canvas { width: 100%; height: 100%; display: block; }
.showcase h2 { font-size: 26px; line-height: 1.25; letter-spacing: -0.01em; color: var(--navy); margin: 22px 0 8px; }
.showcase p { font-size: 15px; line-height: 1.55; color: #3A4358; margin: 0; max-width: 470px; }

@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-right { display: none; }
  .auth-left { padding: 28px 20px 20px; min-height: 100vh; }
  .auth-form { margin: auto; }
  .auth-logo { margin-bottom: 32px; }
}
@media (prefers-reduced-motion: reduce) { .btn-primary, .field input { transition: none; } }

/* ---- legal pages ---- */
.legal { max-width: 760px; margin: 0 auto; padding: 36px 20px 60px; font-size: 15px; line-height: 1.65; }
.legal header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 30px; flex-wrap: wrap; }
.legal header img { height: 34px; }
.legal h1 { font-size: 30px; letter-spacing: -0.01em; margin: 0 0 4px; color: var(--navy); }
.legal .updated { color: var(--muted); font-size: 13.5px; margin: 0 0 26px; }
.legal h2 { font-size: 18px; color: var(--navy); margin: 30px 0 8px; }
.legal ul { padding-left: 20px; }
.legal li { margin-bottom: 4px; }
.legal .box { background: var(--panel); border-radius: 12px; padding: 14px 16px; font-size: 14px; }
.legal footer { margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.legal footer a { color: var(--muted); }
