/* Honu Services design tokens + shared components (see Project Portfolio/DESIGN.md). */
:root {
  --navy:#04211f; --navy-2:#0c322e; --blue:#1f6f5c; --blue-dark:#164139; --sky:#90cca8;
  --ink:#16202c; --muted:#5d6878; --line:#cfe3d7; --bg:#f2f8f4; --card:#ffffff; --soft:#e3f2ea;
  --good:#1b7f4b; --good-bg:#e3f4ea; --warn:#b26a00; --warn-bg:#fff3df; --bad:#b3261e; --bad-bg:#fdecea;
  --info:#1f6f5c; --info-bg:#e3f2ea;
  --radius:14px; --shadow:0 10px 30px rgba(4,33,31,.08); --shadow-sm:0 2px 8px rgba(4,33,31,.06);
  --font:"Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
/* Admin screens follow the OS dark setting; client-facing pages stay light. */
@media (prefers-color-scheme: dark) {
  body.app {
    --ink:#e6edf5; --muted:#9aa8b9; --line:#22574b; --bg:#04211f; --card:#0c322e; --soft:#082b28;
    --good:#5cc98d; --good-bg:#12321f; --warn:#f0b357; --warn-bg:#3a2a0f; --bad:#f2817a; --bad-bg:#3d1714;
    --info:#90cca8; --info-bg:#0f3326; --blue:#90cca8; --blue-dark:#b4dbbe;
    --shadow:0 10px 30px rgba(0,0,0,.35); --shadow-sm:0 2px 8px rgba(0,0,0,.3);
  }
}
* { box-sizing:border-box; }
[hidden] { display:none !important; }   /* component display rules must never un-hide hidden elements */
html { scroll-behavior:smooth; }
body { margin:0; font:15.5px/1.55 var(--font); color:var(--ink); background:var(--bg); }
img { max-width:100%; height:auto; display:block; }
a { color:var(--blue); }
h1, h2, h3 { line-height:1.18; margin:0 0 12px; text-wrap:balance; }
:focus-visible { outline:3px solid var(--sky); outline-offset:2px; }
.wrap { width:min(1160px, 100% - 32px); margin-inline:auto; }
.wrap > *, [class*="-grid"] > * { min-width:0; }
.muted { color:var(--muted); }
.small { font-size:13.5px; }
.eyebrow { text-transform:uppercase; letter-spacing:.12em; font-size:12px; font-weight:800; color:var(--blue); margin:0 0 8px; }

/* Honu Services logo: the official artwork from _brand/ (never redrawn). On dark backgrounds it sits on a white tile. */
.mark { display:flex; align-items:center; gap:10px; text-decoration:none; color:inherit; }
.honu-logo { display:block; height:42px; width:auto; max-width:100%; }
.logo-tile { display:inline-flex; align-items:center; background:#fff; border-radius:12px; padding:6px 10px; box-shadow:0 2px 10px rgba(0,0,0,.12); }
.mark b { display:block; font-size:16px; letter-spacing:.02em; line-height:1.1; }
.mark small { display:block; font-size:11px; letter-spacing:.12em; text-transform:uppercase; opacity:.75; font-weight:600; }

/* buttons */
.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; padding:11px 20px; border-radius:999px;
       border:1.5px solid transparent; font:700 14.5px/1 var(--font); cursor:pointer; text-decoration:none; white-space:nowrap;
       background:var(--blue); color:#fff; transition:background .15s, transform .1s; }
.btn:hover { background:var(--blue-dark); }
.btn:active { transform:translateY(1px); }
.btn:disabled { opacity:.45; cursor:not-allowed; }
.btn.ghost { background:transparent; color:var(--blue); border-color:currentColor; }
.btn.ghost:hover { background:var(--info-bg); }
.btn.quiet { background:var(--soft); color:var(--ink); }
.btn.quiet:hover { background:var(--line); }
.btn.danger { background:transparent; color:var(--bad); border-color:currentColor; }
.btn.danger:hover { background:var(--bad-bg); }
.btn.good { background:var(--good); }
.btn.sm { padding:7px 13px; font-size:13px; }
.btn.white { background:#fff; color:var(--navy); }

/* cards */
.card { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:24px; box-shadow:var(--shadow-sm); }
.card + .card { margin-top:18px; }
.card h2 { font-size:19px; }
.card-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:14px; flex-wrap:wrap; }
.card-head h2, .card-head h3 { margin:0; }

/* pills */
.pill { display:inline-flex; align-items:center; gap:6px; padding:3px 10px; border-radius:999px; font-size:12.5px; font-weight:700;
        background:var(--info-bg); color:var(--info); white-space:nowrap; }
.pill::before { content:""; width:7px; height:7px; border-radius:50%; background:currentColor; }
.pill.good { background:var(--good-bg); color:var(--good); }
.pill.warn { background:var(--warn-bg); color:var(--warn); }
.pill.bad { background:var(--bad-bg); color:var(--bad); }
.pill.muted { background:var(--soft); color:var(--muted); }

/* forms */
.field { display:grid; gap:6px; font-weight:700; font-size:14px; }
.field .hint { font-weight:500; color:var(--muted); font-size:13px; }
input, select, textarea { font:15px var(--font); padding:11px 13px; border:1.5px solid var(--line); border-radius:10px;
       background:var(--card); color:var(--ink); width:100%; }
input:focus, select:focus, textarea:focus { border-color:var(--blue); outline:none; box-shadow:0 0 0 3px color-mix(in srgb, var(--sky) 30%, transparent); }
textarea { min-height:110px; resize:vertical; }
.invalid { border-color:var(--bad) !important; }
.field-error { color:var(--bad); font-size:13px; font-weight:600; min-height:0; }
.alert { padding:12px 16px; border-radius:10px; font-weight:600; font-size:14.5px; }
.alert.bad { background:var(--bad-bg); color:var(--bad); }
.alert.good { background:var(--good-bg); color:var(--good); }
.alert.info { background:var(--info-bg); color:var(--info); }

/* tables */
table.data { width:100%; border-collapse:collapse; font-size:14.5px; }
table.data th { text-align:left; font-size:12px; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); font-weight:700;
               padding:10px 10px; border-bottom:1px solid var(--line); }
table.data td { padding:12px 10px; border-bottom:1px solid var(--line); vertical-align:top; }
table.data .num { text-align:right; white-space:nowrap; font-variant-numeric:tabular-nums; }
table.data tfoot td { border-bottom:0; font-weight:700; }
.table-scroll { overflow-x:auto; }

/* messages thread (shared by client page + admin) */
.thread { display:grid; gap:12px; }
.msg { max-width:min(560px, 88%); padding:12px 15px; border-radius:16px; background:var(--soft); }
.msg .who { font-size:12px; font-weight:700; color:var(--muted); margin-bottom:3px; display:flex; gap:8px; }
.msg p { margin:0; white-space:pre-wrap; word-wrap:break-word; }
.msg.honu { background:var(--navy); color:#e2f4e9; border-bottom-left-radius:4px; }
.msg.honu .who { color:#90cca8; }
.msg.client { margin-left:auto; background:var(--info-bg); border-bottom-right-radius:4px; }
.empty { text-align:center; color:var(--muted); padding:22px 10px; }

/* toast */
.toast-host { position:fixed; right:18px; bottom:18px; display:grid; gap:10px; z-index:100; }
.toast { background:var(--navy); color:#fff; padding:12px 16px; border-radius:12px; box-shadow:var(--shadow); font-weight:600;
         font-size:14px; max-width:380px; animation:toast-in .2s ease-out; }
.toast.bad { background:var(--bad); }
.toast.good { background:var(--good); }
@keyframes toast-in { from { opacity:0; transform:translateY(8px); } }

/* modal */
dialog.modal { border:0; border-radius:18px; padding:0; width:min(480px, calc(100vw - 32px)); background:var(--card); color:var(--ink);
               box-shadow:0 30px 80px rgba(0,0,0,.35); }
dialog.modal::backdrop { background:rgba(4,33,31,.55); }
.modal .body { padding:24px; display:grid; gap:14px; }
.modal .foot { display:flex; justify-content:flex-end; gap:10px; padding:16px 24px; border-top:1px solid var(--line); background:var(--soft);
               border-radius:0 0 18px 18px; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior:auto; } * { animation:none !important; transition:none !important; } }
