/* Login area styles (login, reset password, admin hub, client portal).
   Brand: light page, black header, Montserrat, black/silver buttons. See se-brand skill. */
:root {
  color-scheme: light;
  --bg: #F6F5F2; --paper: #FFFFFF; --surface-2: #EFEEEA; --line: #E3E1DB;
  --fg: #1A1A1C; --heading: #0A0A0B; --muted: #5F5F66;
  --accent: #111113; --accent-ink: #FFFFFF;
  --good: #3F7A52; --bad: #B4483C;
  --black: #0A0A0B; --black-fg: #A8A8AE; --black-head: #F2F2F4; --black-line: #2C2C31; --silver: #D8D8DD;
  --shadow: 0 1px 2px rgba(30,28,20,.04), 0 18px 40px -22px rgba(30,28,20,.18);
  --radius: 18px;
  --font: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--fg); font-family: var(--font);
  font-size: 1rem; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: clip;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
a { color: inherit; }
h1, h2, h3 { color: var(--heading); margin: 0; letter-spacing: -0.015em; line-height: 1.2; text-wrap: balance; }
h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); font-weight: 700; }
h2 { font-size: 1.35rem; font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.label { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .16em; color: var(--muted); }
.wrap { max-width: 1080px; margin-inline: auto; padding-inline: 16px; }
@media (min-width: 720px) { .wrap { padding-inline: 40px; } }
.wrap.narrow { max-width: 520px; }

/* Black header */
header.top { background: var(--black); color: var(--black-fg); position: sticky; top: 0; z-index: 5; }
header.top .wrap { display: flex; align-items: center; gap: 16px; padding-block: 14px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--black-head); min-width: 0; }
.mark { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: none;
  background: #A8A8AE; color: var(--black); font-weight: 800; font-size: .8rem; letter-spacing: .02em; }
.brand-name { font-weight: 600; font-size: 1rem; letter-spacing: .02em; white-space: nowrap; }
.top-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; min-width: 0; }
.who { color: var(--black-fg); font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 480px) { .brand-name { display: none; } .who { max-width: 120px; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px; border: 1px solid transparent; min-height: 44px;
  font: inherit; font-weight: 600; font-size: .95rem; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, opacity .15s ease; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost { background: var(--paper); color: var(--fg); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-sm { padding: 7px 14px; min-height: 36px; font-size: .85rem; }
.btn-silver { background: var(--silver); color: var(--black); }
.btn-dark-ghost { background: transparent; color: var(--black-head); border-color: var(--black-line); }
.btn-dark-ghost:hover { border-color: var(--black-fg); }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }
.small { font-size: 0.9rem; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--fg); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Cards and forms */
.card { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; }
@media (max-width: 480px) { .card { padding: 20px; } }
.stack > * + * { margin-top: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: .9rem; color: var(--heading); }
.field input, .field textarea {
  font: inherit; color: var(--fg); background: #FAF9F7; border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px; min-height: 46px; width: 100%; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.field input[aria-invalid="true"] { border-color: var(--bad); }
.msg { border-radius: 12px; padding: 12px 14px; font-size: .92rem; }
.msg.error { background: #F8ECEA; color: #8E3329; }
.msg.ok { background: #EAF2EC; color: #2F5E3E; }
.msg.info { background: var(--surface-2); color: var(--fg); }
.auth-page main { padding-block: 56px 72px; }
.auth-page h1 { margin-bottom: 8px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }

footer.foot { background: var(--black); color: var(--black-fg); font-size: .85rem; }
footer.foot .wrap { padding-block: 22px; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
footer.foot a { text-decoration: none; }
footer.foot a:hover { color: var(--black-head); }

/* Loading state */
.loading { padding: 64px 0; text-align: center; color: var(--muted); }

/* =====================================================================
   V2 (2026-11-17): same light look as the homepage. Light grey page, white raised cards,
   light header with a soft line, black buttons. These rules come last on purpose.
   ===================================================================== */
:root {
  --bg: #EEEEF0; --paper: #FFFFFF; --surface-2: #F4F4F6; --line: #D9D9DE;
  --fg: #1A1A1C; --heading: #0A0A0B; --muted: #55555C;
  --shadow: 0 1px 2px rgba(20, 20, 30, .05), 0 10px 24px -10px rgba(20, 20, 30, .14), 0 26px 50px -30px rgba(20, 20, 30, .2);
}
header.top { background: rgba(246, 246, 248, .92); color: var(--fg); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.brand { color: var(--heading); }
.mark { background: #111113; color: #FFFFFF; }
.who { color: var(--muted); }
.btn-dark-ghost { background: #FFFFFF; color: var(--heading); border-color: var(--line); }
.btn-dark-ghost:hover { border-color: var(--muted); }
.card { border: 1px solid rgba(17, 17, 19, .06); }
.field input, .field textarea, .field select { background: #F7F7F9; }
footer.foot { background: transparent; color: var(--muted); border-top: 1px solid var(--line); }
footer.foot a:hover { color: var(--heading); }
