/* Ingeni Project Management Platform: shared brand layer for every page (sign-in, Forgot, reset, Settings, Setup, the
   Lane Console, the Operating Console). Colours come from brand/brand.json (logo teal #1CC6C6, navy #042B4E, app primary
   #00B2A9, text #0C3C4C, canvas #EBEBEB, dark #1E293B). Two values are derived only for contrast: the link colour
   (#0F6F96, a darker --brand-primary-dark) and the muted text. Phone first; dark mode follows the device. */
:root {
  --brand-teal: #1CC6C6; --brand-navy: #042B4E; --brand-primary: #00B2A9; --brand-primary-dark: #157EAA;
  --bg: #EBEBEB; --fg: #0C3C4C; --muted: #4A6572; --card: #FFFFFF; --line: #CBD5D8; --input-line: #7A8F98;
  --accent: #0F6F96; --primary: #00B2A9; --primary-hover: #009E96; --on-primary: #042B4E; --focus: #157EAA;
  --green: #18794E; --amber: #9A5B00; --red: #B42318; --grey: #6B7C85;
  --plate: transparent; --radius: 12px; --shadow: 0 1px 2px rgba(4, 43, 78, .08), 0 4px 14px rgba(4, 43, 78, .06);
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1E293B; --fg: #F8FAFC; --muted: #A9B8C9; --card: #27344A; --line: #3B4A63; --input-line: #6C7E99;
    --accent: #5FD8D8; --primary: #1CC6C6; --primary-hover: #35D6D6; --on-primary: #042B4E; --focus: #5FD8D8;
    --green: #4ADE80; --amber: #FBBF24; --red: #F87171; --grey: #94A3B8;
    --plate: #FFFFFF; --shadow: none;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.45 var(--font); -webkit-text-size-adjust: 100%; }
body { padding: env(safe-area-inset-top) 16px calc(16px + env(safe-area-inset-bottom)); max-width: 760px; margin: 0 auto; overflow-x: hidden; }
h1, h2, h3 { font-weight: 650; letter-spacing: -.01em; line-height: 1.2; }
a, button.link { color: var(--accent); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
code { font: .9em ui-monospace, SFMono-Regular, Menlo, monospace; background: color-mix(in srgb, var(--fg) 8%, transparent); padding: 1px 5px; border-radius: 6px; overflow-wrap: anywhere; }

/* Header: the Ingeni logo, then the platform name, then the page's own links. The logo's navy wordmark needs a light
   plate on dark backgrounds. */
.brandbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 12px 0 10px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; color: inherit; text-decoration: none; min-height: 44px; }
.plate { display: inline-flex; align-items: center; background: var(--plate); border-radius: 10px; padding: 0 6px; flex: 0 0 auto; }
.logo { display: block; height: 36px; width: auto; }
.product { font-size: .72rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); line-height: 1.15; max-width: 9.5rem; }
.brandnav { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 14px; }
.brandnav a, .brandnav button.link { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; justify-content: center; padding: 0 2px; font-size: .95rem; }
a.btn, .brandnav a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; padding: 8px 14px; }
.brandnav a.btn.primary { color: var(--on-primary); }
h1.page { font-size: 1.3rem; margin: 10px 0 8px; }

/* Buttons and fields */
button, .btn { font: inherit; min-height: 44px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--fg); cursor: pointer; }
button:hover:not(:disabled) { border-color: var(--input-line); }
button:disabled { opacity: .55; cursor: default; }
button.primary, form button[type=submit], .btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); font-weight: 650; }
button.primary:hover:not(:disabled), form button[type=submit]:hover:not(:disabled) { background: var(--primary-hover); border-color: var(--primary-hover); }
button.link { border: 0; background: none; padding: 8px 0; }
button.danger { border-color: var(--red); color: var(--red); background: var(--card); }
input, textarea, select { font: inherit; color: var(--fg); background: var(--card); border: 1px solid var(--input-line); border-radius: 10px; }
input, select { min-height: 44px; padding: 8px 10px; }
textarea { padding: 8px 10px; width: 100%; }
label { display: block; margin: 12px 0 4px; color: var(--muted); font-size: .9rem; font-weight: 600; }

/* The centred card used by sign-in, Forgot password and the reset page */
body.login { max-width: 440px; }
body.login main { margin: clamp(16px, 8vh, 72px) 0 0; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 24px 20px 20px; box-shadow: var(--shadow); }
body.login .hero { display: flex; justify-content: center; margin: 0 0 14px; }
body.login .hero .plate { padding: 6px 12px; }
body.login .hero .logo { height: 64px; }
body.login h1 { font-size: 1.3rem; text-align: center; margin: 0 0 4px; }
body.login .tagline { text-align: center; color: var(--muted); margin: 0 0 18px; font-size: .95rem; }
body.login input { width: 100%; margin-bottom: 12px; }
body.login form button[type=submit] { width: 100%; }
body.login p { overflow-wrap: anywhere; }
.err { color: var(--red); font-weight: 600; }
.meta { color: var(--muted); font-size: .9rem; }
