/* Tathmeer login prototype — presentation only.
   Palette derived from the existing platform header (--hd-bg #0b1d2b / #10303f, teal accent)
   and the official logo teal (~#0689b0). Fonts match the existing platform (Georgia + Segoe UI). */

:root {
  --navy: #0b1d2b;
  --navy-2: #10303f;
  --teal: #0689b0;          /* official logo teal (sampled) */
  --teal-ink: #046a89;      /* button / links on white: 5.9:1 */
  --teal-deep: #035671;
  --teal-light: #5fd0e0;    /* existing platform accent on dark */
  --gold: #b8933f;          /* existing platform accent */
  --ink: #1b2433;
  --muted: #5b6678;
  --line: #d5dbe4;
  --bg: #f2f4f7;
  --card: #ffffff;
  --bad: #b3271f;  --bad-bg: #fbe9e7;
  --info: #24507a; --info-bg: #e8f0f8;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; font-family: var(--sans); font-size: 15px; line-height: 1.5;
  color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased;
}

.skip { position: absolute; left: -9999px; top: 0; background: #fff; color: var(--ink); padding: 10px 14px; z-index: 10; }
.skip:focus { left: 8px; top: 8px; outline: 3px solid var(--teal); }

.shell { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }

/* ---------- Brand area ---------- */
.brand {
  position: relative; overflow: hidden; color: #f1f6fa;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%);
  display: flex;
}
.brand::after { /* thin accent rule, as in the existing platform footer */
  content: ""; position: absolute; top: 0; left: 0; width: 96px; height: 3px; background: var(--teal-light);
}
.brand-art { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--teal-light); opacity: .14; pointer-events: none; }
.brand-inner {
  position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: space-between;
  gap: 48px; width: 100%; max-width: 640px; margin: 0 auto; padding: clamp(36px, 6vw, 72px) clamp(32px, 5vw, 72px);
}
.logo-plate { /* the official logo has an opaque white background, so it sits on a white plate */
  align-self: flex-start; background: #fff; padding: 16px 24px; border-radius: 4px;
  box-shadow: 0 1px 0 rgba(255,255,255,.08), 0 8px 24px rgba(0,0,0,.22); line-height: 0;
}
.logo-plate img { display: block; width: 210px; height: auto; max-width: 100%; }

.eyebrow { margin: 0 0 14px; font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.platform { margin: 0 0 28px; font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 3.6vw, 46px); line-height: 1.12; letter-spacing: .005em; }
.tagline { list-style: none; margin: 0; padding: 18px 0 0; border-top: 1px solid rgba(255,255,255,.16); max-width: 360px; }
.tagline li { font-size: 16px; line-height: 1.9; color: #c3d3df; }
.tagline li::before { content: ""; display: inline-block; width: 18px; height: 1px; background: var(--teal-light); vertical-align: middle; margin-right: 12px; }

/* ---------- Login panel ---------- */
.panel { display: flex; flex-direction: column; background: var(--bg); min-width: 0; }
.panel-inner { flex: 1; width: 100%; max-width: 440px; margin: 0 auto; padding: clamp(32px, 6vh, 72px) 24px 24px; display: flex; flex-direction: column; justify-content: center; }

.panel-head h2 { margin: 0 0 6px; font-family: var(--serif); font-weight: 400; font-size: 32px; line-height: 1.2; }
.panel-head p { margin: 0; color: var(--muted); }

.proto-badge { /* unused since the real adapter was connected; kept for the prototype folder */
  margin: 22px 0 22px; padding: 7px 12px; font-size: 12.5px; font-weight: 600; color: var(--info);
  background: var(--info-bg); border-left: 3px solid var(--info); border-radius: 2px;
}
.proto-badge span { font-size: 9px; margin-right: 6px; vertical-align: 1px; }

.field { margin-bottom: 18px; }
label { display: block; margin-bottom: 6px; font-size: 13.5px; font-weight: 600; color: var(--ink); }
input[type="text"], input[type="password"] {
  width: 100%; height: 46px; padding: 0 14px; font: inherit; color: var(--ink);
  background: var(--card); border: 1px solid #aeb8c6; border-radius: 4px;
  transition: border-color .12s, box-shadow .12s;
}
input:hover { border-color: #7f8da1; }
input:focus-visible { outline: none; border-color: var(--teal-ink); box-shadow: 0 0 0 3px rgba(6,137,176,.28); }
input[aria-invalid="true"] { border-color: var(--bad); }
input[aria-invalid="true"]:focus-visible { box-shadow: 0 0 0 3px rgba(179,39,31,.22); }

.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 50px; }
.pw-toggle {
  position: absolute; top: 3px; right: 3px; width: 40px; height: 40px; display: grid; place-items: center;
  background: none; border: 0; border-radius: 3px; color: var(--muted); cursor: pointer;
}
.pw-toggle svg[hidden] { display: none; } /* the UA [hidden] rule does not apply to SVG elements */
.pw-toggle:hover { color: var(--ink); background: #eef1f5; }
.pw-toggle:focus-visible { outline: 3px solid var(--teal); outline-offset: -2px; }

.field-err { margin: 6px 0 0; font-size: 13px; color: var(--bad); }
.field-err[hidden] { display: none; }

.row-aux { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: -6px 0 14px; }
.btn-passkey { width: 100%; margin-top: 10px; min-height: 48px; border-radius: 10px; border: 1.5px solid #c9a65a; background: #fffaf0; color: #14263d; font: inherit; font-weight: 700; cursor: pointer; display: grid; gap: 2px; place-items: center; } .btn-passkey small { font-weight: 500; font-size: 11.5px; opacity: .7; } .btn-passkey:disabled { opacity: .6; }
.remember { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; } .remember input { width: 18px; height: 18px; margin: 0; } .remember small { opacity: .65; font-size: 11.5px; }
.link-btn { padding: 4px 2px; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--teal-ink); background: none; border: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: transparent; }
.link-btn:hover { text-decoration-color: currentColor; }
.link-btn:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 2px; }

/* Reserved feedback area: fixed height so the layout never jumps */
.feedback { min-height: 62px; margin-bottom: 12px; display: flex; align-items: flex-start; }
.feedback .msg { width: 100%; padding: 10px 12px; font-size: 13.5px; line-height: 1.45; border-left: 3px solid; border-radius: 2px; }
.feedback .msg strong { display: block; font-weight: 600; }
.feedback[data-state="error"] .msg { color: #7d1a14; background: var(--bad-bg); border-color: var(--bad); }
.feedback[data-state="info"] .msg { color: #1c4468; background: var(--info-bg); border-color: var(--info); }

.btn-primary {
  width: 100%; height: 48px; font: inherit; font-size: 15px; font-weight: 600; letter-spacing: .02em; color: #fff;
  background: var(--teal-ink); border: 0; border-radius: 4px; cursor: pointer; transition: background .12s;
}
.btn-primary:hover { background: var(--teal-deep); }
.btn-primary:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.btn-primary:active { background: #02455b; }
.btn-primary[disabled] { opacity: .7; cursor: progress; }

.help { margin: 18px 0 0; font-size: 13px; color: var(--muted); text-align: center; }

.foot { padding: 18px 24px 22px; border-top: 1px solid var(--line); text-align: center; font-size: 12px; line-height: 1.6; color: var(--muted); }
.foot p { margin: 0; }
.foot strong { color: var(--ink); font-weight: 600; }

/* ---------- Tablet ---------- */
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .brand-inner { flex-direction: row; align-items: center; justify-content: flex-start; gap: 32px; max-width: none; padding: 28px 40px; }
  .brand-copy { min-width: 0; }
  .platform { font-size: 28px; margin-bottom: 0; }
  .eyebrow { margin-bottom: 8px; }
  .tagline { display: none; }
  .panel-inner { padding-top: 40px; justify-content: flex-start; }
}

/* ---------- Mobile ---------- */
@media (max-width: 600px) {
  body { font-size: 16px; }
  .brand-inner { flex-direction: column; align-items: flex-start; gap: 18px; padding: 22px 20px 24px; }
  .logo-plate { padding: 10px 16px; }
  .logo-plate img { width: 150px; }
  .platform { font-size: 24px; }
  .platform br { display: none; }
  .eyebrow { font-size: 11px; letter-spacing: .14em; }
  .panel-inner { padding: 28px 20px 16px; }
  .panel-head h2 { font-size: 28px; }
  input[type="text"], input[type="password"] { font-size: 16px; } /* avoids iOS zoom-on-focus */
  .brand-art { opacity: .1; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
