/* BABY Staff — shared look for the back office (Mac / PC). Brand: black with the pink "baby"
   script (#facbd1). The top bar and the sign-in screen are always the brand's black; the
   working area follows the computer's light or dark setting. */
:root {
  --bg: #faf6f4; --panel: #ffffff; --ink: #221a1c; --muted: #7d6f73; --line: #eadfe1;
  --pink: #facbd1; --accent: #b23e58; --soft: #fdeef0; --field: #ffffff; --hover: #f6eeef;
  --btn: #221a1c; --btn-ink: #facbd1;
  --bad: #b3261e; --bad-bg: #fde8e6; --ok: #1e7a45; --ok-bg: #e4f5ea;
  --bar: #141112; --bar-ink: #f6eef0; --bar-muted: #b9a9ad; --bar-line: #3a3133;
  --shadow: 0 1px 2px rgba(34, 26, 28, .06), 0 8px 24px rgba(34, 26, 28, .08);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141112; --panel: #1f1a1b; --ink: #f6eef0; --muted: #b9a9ad; --line: #3a3133;
    --accent: #facbd1; --soft: #33262a; --field: #120f10; --hover: #2a2224;
    --btn: #facbd1; --btn-ink: #1a1314;
    --bad: #ffa59a; --bad-bg: #3d211f; --ok: #9fe0b6; --ok-bg: #1d3427;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
  }
}
:root[data-theme="dark"] {
  --bg: #141112; --panel: #1f1a1b; --ink: #f6eef0; --muted: #b9a9ad; --line: #3a3133;
  --accent: #facbd1; --soft: #33262a; --field: #120f10; --hover: #2a2224;
  --btn: #facbd1; --btn-ink: #1a1314;
  --bad: #ffa59a; --bad-bg: #3d211f; --ok: #9fe0b6; --ok-bg: #1d3427;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.45 -apple-system, "Sukhumvit Set", Thonburi, "Segoe UI", "Leelawadee UI", system-ui, sans-serif; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ---- the top bar on every page ---- */
.topbar { display: flex; align-items: center; gap: 18px; height: 56px; padding: 0 18px;
  background: var(--bar); color: var(--bar-ink); border-bottom: 1px solid var(--bar-line); }
.topbar .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--pink);
  font-weight: 700; letter-spacing: .32em; font-size: 12px; }
.topbar .brand img { height: 28px; width: auto; display: block; }
.topbar nav { display: flex; gap: 4px; }
.topbar nav a { color: var(--bar-muted); text-decoration: none; font-weight: 600; padding: 7px 12px; border-radius: 9px; }
.topbar nav a:hover { color: var(--bar-ink); background: #262021; }
.topbar nav a.on { color: #1a1314; background: var(--pink); }
.topbar .grow { flex: 1; min-width: 0; }
.topbar .who { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.topbar .who b { font-weight: 600; }
.topbar .who button { color: var(--bar-muted); font-weight: 600; padding: 7px 10px; border-radius: 9px; border: 1px solid var(--bar-line); }
.topbar .who button:hover { color: var(--bar-ink); border-color: var(--bar-muted); }

/* ---- sign-in (the gate staff.js lays over every page) and the reset page: always dark ---- */
body.card-page, .gate { --card: #1f1a1b; --ink: #f6eef0; --muted: #b9a9ad; --line: #3a3133; --field: #120f10; --accent: #facbd1;
  --bad: #ffa59a; --bad-bg: #3d211f; --ok: #9fe0b6; --ok-bg: #1d3427;
  display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 16px;
  background: #141112; color: var(--ink); font-size: 17px; }
.gate { position: fixed; inset: 0; z-index: 1000; overflow: auto; min-height: 0; }
body.card-page > main, .gate > main { width: 100%; max-width: 400px; }
.gate .brand, .card-page .brand { text-align: center; margin-bottom: 26px; }
.gate .brand img, .card-page .brand img { width: 190px; max-width: 60%; height: auto; display: block; margin: 0 auto; }
.gate .brand .sub, .card-page .brand .sub { color: var(--pink); font-weight: 700; letter-spacing: .5em; font-size: 14px; margin: 6px 0 0 .5em; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 22px; }
.card h2 { margin: 0 0 4px; font-size: 21px; }
.card .lead { color: var(--muted); margin: 0 0 18px; font-size: 15px; }
.card label { display: block; font-weight: 600; margin: 0 0 6px; }
.card label small { color: var(--muted); font-weight: 400; }
.card .field + .field { margin-top: 14px; }
.card input { width: 100%; font-size: 18px; padding: 13px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--field); color: var(--ink); min-height: 52px; }
.card input:focus { outline: 2px solid var(--pink); outline-offset: 1px; }
.card .pw { position: relative; }
.card .pw input { padding-right: 76px; }
.card .pw .peek { position: absolute; right: 6px; top: 6px; bottom: 6px; padding: 0 12px; color: var(--muted); font-size: 15px; font-weight: 600; }
.card .primary { width: 100%; margin-top: 20px; min-height: 56px; font-size: 19px; font-weight: 700; border-radius: 12px;
  background: var(--pink); color: #1a1314; }
.card .primary:disabled { opacity: .55; cursor: default; }
.card .quiet { min-height: 44px; padding: 8px 16px; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; font-weight: 700; }
.card .link { display: block; margin-top: 14px; min-height: 44px; color: var(--pink); font-weight: 600; font-size: 16px;
  text-align: center; text-decoration: none; line-height: 44px; }
.msg { border-radius: 12px; padding: 12px 14px; margin-top: 16px; font-size: 15px; }
.msg.bad { background: var(--bad-bg); color: var(--bad); }
.msg.ok { background: var(--ok-bg); color: var(--ok); }
.msg.info { background: var(--field); color: var(--muted); }
.center { text-align: center; }
.card-page footer { color: var(--muted); font-size: 12px; text-align: center; margin-top: 18px; opacity: .7; }

/* ---- home ---- */
.home { max-width: 860px; margin: 0 auto; padding: 36px 20px; }
.home h1 { font-size: 24px; margin: 0 0 4px; }
.home p.lead { color: var(--muted); margin: 0 0 24px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.tile { display: flex; flex-direction: column; gap: 4px; min-height: 128px; padding: 18px; border-radius: 16px;
  background: var(--panel); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 700; font-size: 17px; }
.tile:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.tile .ico { font-size: 30px; line-height: 1; margin-bottom: 8px; }
.tile small { color: var(--muted); font-weight: 400; font-size: 14px; }
.tile.off { opacity: .5; pointer-events: none; }
.home footer { color: var(--muted); font-size: 12px; margin-top: 28px; opacity: .7; }
