/* GastroHub — the agency's control room for its restaurant websites.
   Porcelain + espresso, one saffron accent; Bricolage Grotesque for titles and figures,
   Instrument Sans for everything you read and type. Status colours only mean status.
   Fonts are served from /assets/fonts (no request to Google). */

@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 400 800; font-stretch: 75% 100%; font-display: swap; src: url(fonts/bricolage-grotesque.woff2) format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-stretch: 75% 100%; font-display: swap; src: url(fonts/instrument-sans.woff2) format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: italic; font-weight: 400 700; font-stretch: 75% 100%; font-display: swap; src: url(fonts/instrument-sans-italic.woff2) format("woff2"); }

:root {
    /* palette */
    --porcelain: #f4f4f1;   --plate: #ffffff;      --linen: #ecebe7;
    --espresso: #2b2522;    --ink-2: #4a433f;      --ink-3: #7a726c;
    --line: #e4e1dc;        --line-2: #cfcac3;
    --saffron: #d99a12;     --saffron-ink: #8a5d00; --saffron-soft: #fbf1d8;
    --herb: #2f7a4f;        --herb-soft: #e3f1e8;
    --amber: #a8650a;       --amber-soft: #fbeed6;
    --paprika: #c23b22;     --paprika-soft: #fae5df;
    /* roles (older names kept so every page keeps working) */
    --bg: var(--porcelain); --surface: var(--plate); --surface-2: #f7f6f3;
    --ink: var(--espresso);
    --accent: var(--espresso); --accent-hover: #000; --accent-soft: var(--saffron-soft);
    --ok: var(--herb);      --ok-soft: var(--herb-soft);
    --warn: var(--amber);   --warn-soft: var(--amber-soft);
    --bad: var(--paprika);  --bad-soft: var(--paprika-soft);
    --radius: 14px;         --radius-sm: 9px;     --radius-xs: 6px;
    --shadow-pop: 0 12px 32px -12px rgba(43, 37, 34, .28), 0 2px 6px rgba(43, 37, 34, .08);
    --sb-w: 248px;
    --ease: cubic-bezier(.2, .7, .2, 1);
    --font: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --display: "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif;
    --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
}

/* ── Base ─────────────────────────────────────────────── */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--ink); text-decoration-color: var(--line-2); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--saffron); }
h1, h2, h3 { font-family: var(--display); color: var(--ink); }
h1 { font-size: 2.15rem; line-height: 1.05; font-weight: 700; font-stretch: 82%; letter-spacing: -.02em; margin: 0 0 1rem; }
h2 { font-size: 1.12rem; line-height: 1.3; font-weight: 650; font-stretch: 92%; letter-spacing: -.005em; margin: 0 0 .75rem; }
h3 { font-size: .98rem; font-weight: 650; margin: 0 0 .5rem; }
p { margin: 0 0 .9rem; }
small, .muted { color: var(--ink-3); }
code, .code { font-family: var(--mono); font-size: .8rem; }
code { background: var(--linen); padding: .1rem .38rem; border-radius: var(--radius-xs); color: var(--ink-2); overflow-wrap: anywhere; }
:focus-visible { outline: 2px solid var(--saffron); outline-offset: 2px; }
::selection { background: var(--saffron-soft); }
.ic { width: 18px; height: 18px; flex: none; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--surface); padding: .5rem .8rem; border-radius: var(--radius-sm); }
.skip:focus { left: 8px; }
.num { font-variant-numeric: tabular-nums; }

/* ── Sidebar ──────────────────────────────────────────── */
.sb {
    position: fixed; inset: 0 auto 0 0; width: var(--sb-w); z-index: 40;
    display: flex; flex-direction: column; background: var(--linen); color: var(--ink-2);
    border-right: 1px solid var(--line); transition: transform .25s var(--ease);
}
.sb__brand { display: flex; align-items: center; gap: .6rem; padding: 1.35rem 1.25rem 1rem; color: var(--ink); text-decoration: none; }
.sb__brand > span:not(.sb__logo) { font-family: var(--display); font-size: 1.28rem; font-weight: 700; font-stretch: 80%; letter-spacing: -.02em; }
.sb__brand strong { font-weight: 700; color: var(--saffron-ink); }
.sb__logo { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--espresso); color: var(--saffron); font: 700 1rem/1 var(--display); }
.sb__close { display: none; margin-left: auto; background: none; border: 0; color: var(--ink-2); padding: .5rem; border-radius: var(--radius-sm); cursor: pointer; }
.sb__nav { flex: 1; overflow-y: auto; padding: .25rem .7rem 1rem; }
.sb__group { margin: 1.15rem .65rem .35rem; font-size: .76rem; font-weight: 600; color: var(--ink-3); }
.sb__link {
    position: relative; display: flex; align-items: center; gap: .7rem; min-height: 40px; padding: .45rem .7rem; margin: 1px 0;
    border-radius: var(--radius-sm); color: var(--ink-2); text-decoration: none; font-weight: 500;
    transition: background-color .15s var(--ease), color .15s var(--ease);
}
.sb__link .ic { color: var(--ink-3); }
.sb__link:hover { background: rgba(255, 255, 255, .6); color: var(--ink); }
.sb__link.is-active { background: var(--plate); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(43, 37, 34, .06), inset 0 0 0 1px var(--line); }
.sb__link.is-active::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--saffron); }
.sb__link.is-active .ic { color: var(--ink); }
.sb__count { margin-left: auto; min-width: 22px; text-align: center; font-size: .74rem; font-weight: 600; font-variant-numeric: tabular-nums; background: rgba(43, 37, 34, .07); color: var(--ink-2); padding: .05rem .45rem; border-radius: 99px; }
.sb__count--bad, .sb__link.is-active .sb__count--bad { background: var(--paprika); color: #fff; }
.sb__user { display: flex; align-items: center; gap: .65rem; padding: .85rem 1rem; border-top: 1px solid var(--line); }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--espresso); color: var(--saffron); font: 700 .78rem/1 var(--display); letter-spacing: .02em; }
a.sb__who { text-decoration: none; border-radius: var(--radius-sm); }
a.sb__who:hover strong { text-decoration: underline; text-decoration-color: var(--saffron); }
.sb__who { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.sb__who strong { color: var(--ink); font-weight: 600; font-size: .9rem; }
.sb__who small { color: var(--ink-3); font-size: .75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb__out { margin-left: auto; display: grid; place-items: center; width: 38px; height: 38px; border-radius: var(--radius-sm); color: var(--ink-3); }
.sb__out:hover { background: var(--plate); color: var(--ink); }
.sb-backdrop { display: none; }

/* ── Main area ────────────────────────────────────────── */
.has-sb .shell { margin-left: var(--sb-w); min-height: 100dvh; }
.mbar { display: none; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 2.25rem 2.25rem 5rem; }
.wrap:focus { outline: none; }

/* page header: title + one line of explanation on the left, the page's actions on the right */
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem 1.5rem; flex-wrap: wrap; margin-bottom: 1.75rem; }
.head h1 { margin: 0; display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; }
.head h1 + p, .head .lede { margin: .45rem 0 0; color: var(--ink-3); max-width: 68ch; }
.head > div > a, .head > div > small { font-size: .9rem; }
.card .head { margin-bottom: 1rem; align-items: center; }
.card .head h2 { margin: 0; }
.lede { color: var(--ink-3); max-width: 68ch; }
h1 + .muted, h1 + p.muted { margin-top: -.4rem; margin-bottom: 1.75rem; max-width: 68ch; }

/* panels */
.card { background: var(--plate); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.35rem 1.5rem; margin-bottom: 1.25rem; }
.card > h2:first-child { margin-bottom: .85rem; }
.card--quiet { background: transparent; border-style: dashed; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-bottom: 1.25rem; }
.grid .card { margin: 0; }
.grid .card small:first-child { font-size: .82rem; font-weight: 600; color: var(--ink-3); }
.stat { font-family: var(--display); font-size: 2.6rem; line-height: 1; font-weight: 700; font-stretch: 80%; letter-spacing: -.03em; margin: .55rem 0 .35rem; font-variant-numeric: tabular-nums; }
.empty { padding: 2rem 1rem; text-align: center; color: var(--ink-3); }
.empty strong { display: block; color: var(--ink); font-family: var(--display); font-size: 1.05rem; margin-bottom: .25rem; }
hr, .rule { border: 0; border-top: 1px solid var(--line); margin: 1.25rem 0; }

/* tables */
.table-wrap { overflow-x: auto; position: relative; }   /* relative: hidden labels inside stay inside the scroll box */
.card.table-wrap { padding: .35rem 0; }
.card.table-wrap > h2 { padding: 1rem 1.5rem .25rem; margin: 0; }
.card.table-wrap table th:first-child, .card.table-wrap table td:first-child { padding-left: 1.5rem; }
.card.table-wrap table th:last-child,  .card.table-wrap table td:last-child  { padding-right: 1.5rem; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: .8rem .65rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .78rem; font-weight: 600; color: var(--ink-3); background: transparent; white-space: nowrap; padding-top: .7rem; padding-bottom: .7rem; }
tr:last-child td { border-bottom: 0; }
table tr { transition: background-color .12s var(--ease); }
table tr:hover td { background: #faf9f7; }
td strong { font-weight: 600; }
td a { text-decoration: none; }
td a strong { color: var(--ink); }
td a:hover strong { text-decoration: underline; text-decoration-color: var(--saffron); text-underline-offset: 3px; }
td small { line-height: 1.4; }

/* buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 40px;
    border: 1px solid var(--line-2); background: var(--plate); color: var(--ink); padding: .5rem 1rem;
    border-radius: var(--radius-sm); font: 600 .9rem/1 var(--font); cursor: pointer; text-decoration: none; white-space: nowrap;
    transition: background-color .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease), box-shadow .15s var(--ease);
}
.btn:hover { background: var(--surface-2); border-color: var(--ink-3); color: var(--ink); }
.btn--primary { background: var(--espresso); border-color: var(--espresso); color: #fff; }
.btn--primary:hover { background: #000; border-color: #000; color: #fff; box-shadow: 0 0 0 3px var(--saffron-soft); }
.btn--accent { background: var(--saffron); border-color: var(--saffron); color: var(--espresso); }
.btn--accent:hover { background: #c98c0a; border-color: #c98c0a; color: var(--espresso); }
.btn--sm { min-height: 32px; padding: .3rem .7rem; font-size: .84rem; }
.btn--lg { min-height: 48px; padding: .7rem 1.4rem; font-size: .98rem; }
.btn--ghost { border-color: transparent; background: transparent; }
.btn--danger { color: var(--paprika); border-color: #ecc4ba; }
.btn--danger:hover { background: var(--paprika-soft); border-color: var(--paprika); color: var(--paprika); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; box-shadow: none; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.actions form { margin: 0; }

/* forms */
input, select, textarea {
    font: 16px/1.4 var(--font); color: var(--ink); padding: .55rem .8rem; min-height: 42px; width: 100%;
    border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--plate);
    transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
input::placeholder, textarea::placeholder { color: #a39b94; }
input:hover, select:hover, textarea:hover { border-color: var(--ink-3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--espresso); box-shadow: 0 0 0 3px var(--saffron-soft); }
input:disabled { background: var(--surface-2); color: var(--ink-3); }
select { appearance: none; padding-right: 2.2rem; background: var(--plate) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237a726c' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right .8rem center; }
/* checkboxes / radios keep their natural size (the rule above is for text fields) */
input[type=checkbox], input[type=radio] { width: 17px; height: 17px; min-height: 0; padding: 0; flex: none; accent-color: var(--espresso); cursor: pointer; }
input[type=checkbox]:focus-visible, input[type=radio]:focus-visible { outline: 2px solid var(--saffron); outline-offset: 2px; box-shadow: none; }
textarea { min-height: 96px; resize: vertical; }
label { display: block; font-size: .84rem; font-weight: 600; margin-bottom: .35rem; color: var(--ink); }
label small { font-weight: 400; }
label.inline { font-weight: 500; }
.field { margin-bottom: 1rem; }
.row { display: grid; gap: 0 1rem; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.inline { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin: 0; }
.inline input:not([type=checkbox]):not([type=radio]), .inline select { width: auto; }
.code { display: block; width: 100%; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .75rem; word-break: break-all; white-space: pre-wrap; color: var(--ink-2); }
.hint { margin: .35rem 0 0; font-size: .82rem; color: var(--ink-3); }
.hint code { font-size: .76rem; }

/* feature switch row (site page) */
.feat-form { flex-wrap: nowrap; }
.feat-form select { width: 215px; flex: none; }
.feat-form input[type=date] { width: 160px; flex: none; }
.feat-form input[name=note] { flex: 1; min-width: 110px; width: auto; }
@media (max-width: 1280px) { .feat-form { flex-wrap: wrap; } .feat-form input[name=note] { flex-basis: 100%; order: 3; } .feat-form .btn { order: 2; } }

/* status pills + flash messages */
.pill { display: inline-flex; align-items: center; gap: .38rem; padding: .16rem .62rem; border-radius: 99px; font-size: .78rem; font-weight: 600; background: var(--linen); color: var(--ink-2); line-height: 1.45; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill--ok { background: var(--herb-soft); color: var(--herb); }
.pill--warn { background: var(--amber-soft); color: var(--amber); }
.pill--bad { background: var(--paprika-soft); color: var(--paprika); }
.flash { display: flex; gap: .65rem; align-items: flex-start; padding: .85rem 1.05rem; border-radius: var(--radius-sm); margin-bottom: 1.1rem; border: 1px solid; font-size: .93rem; background: var(--plate); }
.flash::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: .45rem; border-radius: 50%; background: currentColor; }
.flash--ok { border-color: #bcdcc8; color: #1f5135; background: #f3f9f5; }
.flash--warn, .flash--info { border-color: #ecd3a3; color: #6e4306; background: #fdf8ee; }
.flash--bad { border-color: #ecc4ba; color: #7f2614; background: #fdf4f1; }

details > summary { cursor: pointer; font-weight: 600; color: var(--ink); list-style: none; display: flex; align-items: center; gap: .55rem; min-height: 32px; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: ""; flex: none; width: 7px; height: 7px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(-45deg); transition: transform .2s var(--ease); }
details[open] > summary::before { transform: rotate(45deg); }

/* support threads (tickets) */
.thread { display: grid; gap: 1rem; margin-bottom: 1.25rem; }
.msg { display: flex; gap: .75rem; align-items: flex-start; max-width: 82ch; }
.msg__bubble { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); border-top-left-radius: var(--radius-xs); padding: .85rem 1.05rem; background: var(--plate); }
.msg--agency { flex-direction: row-reverse; margin-left: auto; }
.msg--agency .msg__bubble { background: #fbf6ea; border-color: #eedfb9; border-radius: var(--radius); border-top-right-radius: var(--radius-xs); }
.msg--agency .avatar { background: var(--saffron); color: var(--espresso); }
.msg__meta { font-size: .8rem; color: var(--ink-3); margin-bottom: .35rem; }
.msg__meta strong { color: var(--ink); }
.msg__body { overflow-wrap: anywhere; }
.avatar--sm { width: 30px; height: 30px; font-size: .7rem; }
.composer textarea { min-height: 130px; }
.tabs { display: flex; gap: .25rem; flex-wrap: wrap; padding: .85rem 1.25rem .35rem; border-bottom: 1px solid var(--line); }
.tabs a { padding: .45rem .8rem; border-radius: var(--radius-sm) var(--radius-sm) 0 0; color: var(--ink-3); font-weight: 600; font-size: .88rem; text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -.4rem; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--saffron); }

/* sign-in + owner pages (no sidebar) */
.no-sb .shell { min-height: 100dvh; display: grid; place-items: start center; background:
    radial-gradient(1200px 500px at 50% -10%, #fff 0%, transparent 60%), var(--porcelain); }
.no-sb .wrap { width: 100%; }
.login { max-width: 410px; margin: 9vh auto 0; padding: 2.25rem 2rem 2rem; }
.login h1 { text-align: center; font-size: 2rem; margin-bottom: .3rem; }
.login__lede { text-align: center; color: var(--ink-3); margin-bottom: 1.6rem; }
.login .btn { width: 100%; min-height: 46px; }
.login::before { content: "G"; display: grid; place-items: center; width: 46px; height: 46px; margin: 0 auto 1.1rem; border-radius: 13px; background: var(--espresso); color: var(--saffron); font: 700 1.3rem/1 var(--display); }

/* site page: "Manage this website" shortcut grid */
.manage { display: grid; gap: 1.1rem 1.75rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.manage__group { margin: 0 0 .35rem; font-size: .8rem; font-weight: 600; color: var(--ink-3); }
.manage__link { display: flex; justify-content: space-between; align-items: center; min-height: 36px; padding: .35rem .6rem; margin: 0 -.6rem; border-radius: var(--radius-sm); color: var(--ink); text-decoration: none; font-weight: 500; transition: background-color .15s var(--ease); }
.manage__link span { color: var(--ink-3); font-size: .8rem; }
.manage__link:hover { background: var(--saffron-soft); }
h3.sub { font-size: .88rem; font-weight: 650; margin: .5rem 0 .4rem; color: var(--ink-2); }
h3.sub small { font-weight: 400; }

/* ── Choice cards, segmented control, presets (new site, bulk) ── */
.choices { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.choices--lang { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.choice { display: flex; gap: .7rem; align-items: flex-start; margin: 0; padding: .8rem .9rem; cursor: pointer;
    border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--plate); font-weight: 400;
    transition: border-color .15s var(--ease), background .15s var(--ease), box-shadow .15s var(--ease); }
.choice:hover { border-color: var(--ink-3); }
.choice:has(input:checked) { border-color: var(--espresso); background: #fffdf7; box-shadow: inset 0 0 0 1px var(--espresso); }
.choice:has(input:focus-visible) { outline: 2px solid var(--saffron); outline-offset: 2px; }
.choice input { margin-top: .15rem; }
.choice strong { display: block; color: var(--ink); font-size: .92rem; line-height: 1.3; }
.choice small { display: block; margin-top: .2rem; color: var(--ink-3); font-size: .8rem; line-height: 1.4; }
.choice .price { display: block; margin-top: .4rem; color: var(--ink-2); font-size: .78rem; font-weight: 600; }
.choice .price--none { color: var(--ink-3); font-weight: 400; font-style: italic; }
.seg { display: inline-flex; flex-wrap: wrap; gap: .4rem; }
.seg label { display: inline-flex; align-items: center; gap: .45rem; margin: 0; padding: .38rem .8rem; border: 1px solid var(--line-2); border-radius: 99px; font-weight: 500; font-size: .86rem; cursor: pointer; background: var(--plate); }
.seg label:has(input:checked) { border-color: var(--espresso); background: var(--espresso); color: #fff; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.seg label:has(input:focus-visible) { outline: 2px solid var(--saffron); outline-offset: 2px; }
.seg .num { color: var(--ink-3); font-weight: 600; font-size: .8rem; }
.seg label:has(input:checked) .num { color: var(--saffron); }
.seg label:has(input:disabled) { opacity: .4; cursor: not-allowed; }
.presets { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .85rem; }

/* ── New site (site_new.php) ── */
.ns { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.25rem; align-items: start; }
.ns-main { padding: 1.6rem 1.75rem; }
.ns-section + .ns-section { border-top: 1px solid var(--line); margin-top: 1.4rem; padding-top: 1.4rem; }
.ns-step, .step-title { display: flex; align-items: center; gap: .65rem; margin: 0 0 1.05rem; font-size: 1.12rem; }
.ns-step b, .step-title b { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--espresso); color: var(--saffron); font: 700 .86rem/1 var(--display); }
.ns-step small, .step-title small { font: 400 .84rem/1.3 var(--font); color: var(--ink-3); }
.ns-submit { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-top: 1.6rem; padding-top: 1.3rem; border-top: 1px solid var(--line); }
.ns-submit .muted { font-size: .84rem; }
.ns-side { position: sticky; top: 1.25rem; display: grid; gap: 1rem; }
.ns-side .card { margin: 0; }
.ns-side h2 { margin: 0 0 .8rem; font-size: 1rem; }
.ns-sum { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .45rem .9rem; margin: 0; font-size: .87rem; }
.ns-sum dt { color: var(--ink-3); }
.ns-sum dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.ns-sum dd.empty { color: var(--ink-3); font-style: italic; padding: 0; text-align: left; }
.ns-steps { margin: 0; padding-left: 1.25rem; font-size: .84rem; color: var(--ink-2); line-height: 1.7; }
.ns-steps li::marker { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.ns-steps .step-skip { color: var(--ink-3); text-decoration: line-through; }
.ns-conn { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
details.card > summary { cursor: pointer; font-weight: 600; }

/* ── Bulk actions (bulk.php) ── */
.bk { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
.bk .card { margin: 0; }
.bk-acts { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.bk-act { position: relative; display: flex; flex-direction: column; gap: .3rem; margin: 0; padding: .95rem 1rem 1rem; cursor: pointer; font-weight: 400;
    border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--plate); transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
.bk-act input { position: absolute; opacity: 0; pointer-events: none; }
.bk-act .ic { width: 22px; height: 22px; color: var(--ink-3); margin-bottom: .2rem; }
.bk-act strong { font-size: .95rem; color: var(--ink); }
.bk-act small { font-size: .8rem; line-height: 1.4; }
.bk-act:hover { border-color: var(--ink-3); }
.bk-act:has(input:checked) { border-color: var(--espresso); box-shadow: inset 0 0 0 1px var(--espresso); background: #fffdf7; }
.bk-act:has(input:checked) .ic { color: var(--saffron-ink); }
.bk-act:has(input:focus-visible) { outline: 2px solid var(--saffron); outline-offset: 2px; }
.bk-tools { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: .85rem; }
.bk-tools input[type=search] { max-width: 280px; }
.bk-table td:first-child, .bk-table th:first-child { width: 44px; }
.bk-table tr { cursor: pointer; }
.bk-table tr.is-on td { background: #fffaf0; }
.bk-table tr.is-hidden { display: none; }
.bk-bar { position: sticky; bottom: 1rem; z-index: 10; display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; padding: .85rem 1rem .85rem 1.25rem;
    background: var(--espresso); color: #f1ece8; border-radius: var(--radius); box-shadow: var(--shadow-pop); }
.bk-bar__text { flex: 1; min-width: 220px; font-size: .95rem; }
.bk-bar__text strong { color: #fff; }
.bk-bar__text em { font-style: normal; color: var(--saffron); font-weight: 600; }
.bk-bar .btn--accent:disabled { background: #5b524d; border-color: #5b524d; color: #b9b0aa; opacity: 1; }

/* ── small shared bits ── */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.tag { display: inline-block; padding: .12rem .55rem; border-radius: var(--radius-xs); background: var(--linen); color: var(--ink-2); font-size: .8rem; font-weight: 600; white-space: nowrap; }
.behind { color: var(--saffron-ink); font-weight: 600; }
.site-link { text-decoration: none; }
.site-sub { display: block; margin-top: .1rem; }
.site-sub a { color: var(--ink-3); text-decoration: none; }
.site-sub a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--saffron); }

/* ── Site page (site.php) ── */
.site-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem 1.5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.site-head h1 { margin: 0; display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; }
.crumb { margin: 0 0 .35rem; font-size: .86rem; }
.crumb a { color: var(--ink-3); text-decoration: none; }
.crumb a::before { content: "‹ "; }
.crumb a:hover { color: var(--ink); }
.facts { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: .35rem 0; margin: .75rem 0 0; padding: 0; font-size: .88rem; color: var(--ink-2); }
.facts li { display: inline-flex; align-items: center; gap: .4rem; }
.facts li + li::before { content: ""; width: 1px; height: 14px; margin: 0 .8rem; background: var(--line-2); }
.facts a { font-weight: 600; text-decoration: none; }
.facts a:hover { text-decoration: underline; text-decoration-color: var(--saffron); }
.subnav { position: sticky; top: 0; z-index: 15; display: flex; gap: .2rem; overflow-x: auto; margin: 0 -.5rem 1.25rem; padding: .55rem .5rem; background: rgba(244, 244, 241, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); scrollbar-width: none; }
.subnav::-webkit-scrollbar { display: none; }
.subnav a { flex: none; padding: .35rem .75rem; border-radius: 99px; color: var(--ink-2); font-size: .86rem; font-weight: 600; text-decoration: none; }
.subnav a:hover { background: var(--plate); color: var(--ink); }
.subnav a.is-on { background: var(--espresso); color: #fff; }
[id] { scroll-margin-top: 4rem; }
.status-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1.3rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.status-row strong { display: block; }
.status-row small { display: block; max-width: 60ch; }
.feed--detail li { align-items: flex-start; }
.feed__what small { display: block; margin-top: .1rem; overflow-wrap: anywhere; }
@media (max-width: 1024px) { .subnav { top: 56px; } }

/* ── Dashboard (index.php) ── */
.dash { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.25rem; align-items: start; margin-bottom: 1.25rem; }
.dash > .card { margin: 0; }
.dash--lower { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 .45rem; margin-left: .35rem; border-radius: 99px; background: var(--espresso); color: var(--saffron); font: 700 .8rem/1 var(--display); vertical-align: 2px; }
.calm { display: flex; gap: .9rem; align-items: center; padding: 1.1rem 1.15rem; border-radius: var(--radius-sm); background: var(--herb-soft); color: #1f5135; }
.calm .ic { width: 28px; height: 28px; color: var(--herb); }
.calm strong { display: block; font-family: var(--display); font-size: 1.15rem; color: #1f5135; }
.calm span { font-size: .9rem; }
.queue { list-style: none; margin: 0; padding: 0; }
.queue__item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .85rem; align-items: center; padding: .8rem 0; border-top: 1px solid var(--line); }
.queue__item:first-child { border-top: 0; padding-top: .2rem; }
.queue__mark { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-3); box-shadow: 0 0 0 4px var(--linen); }
.queue__item--bad .queue__mark { background: var(--paprika); box-shadow: 0 0 0 4px var(--paprika-soft); }
.queue__item--warn .queue__mark { background: var(--saffron); box-shadow: 0 0 0 4px var(--saffron-soft); }
.queue__item--info .queue__mark { background: var(--line-2); box-shadow: 0 0 0 4px var(--surface-2); }
.queue__text strong { display: block; font-weight: 600; line-height: 1.35; }
.queue__text small { display: block; margin-top: .1rem; font-size: .84rem; line-height: 1.4; overflow-wrap: anywhere; }
.fleet { display: grid; gap: 1.1rem; margin: 0; }
.fleet > div { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 0 .75rem; }
.fleet dt { font-size: .86rem; font-weight: 600; color: var(--ink-2); }
.fleet dd { grid-row: span 2; margin: 0; font: 700 2.1rem/1 var(--display); font-stretch: 80%; letter-spacing: -.03em; text-align: right; }
.fleet dd span { font-size: 1.1rem; color: var(--ink-3); letter-spacing: 0; }
.fleet .fleet__rel { font-size: 1.05rem; letter-spacing: -.01em; font-stretch: 90%; }
.fleet small { font-size: .8rem; }
.fleet__jobs { display: flex; align-items: center; gap: .55rem; margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--line); font-weight: 600; text-decoration: none; }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--saffron); animation: pulse 1.6s var(--ease) infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(217, 154, 18, .5); } 100% { box-shadow: 0 0 0 9px rgba(217, 154, 18, 0); } }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-top: 1px solid var(--line); font-size: .9rem; }
.feed__what { min-width: 0; overflow-wrap: anywhere; }
.feed li:first-child { border-top: 0; padding-top: 0; }
.feed li > small { white-space: nowrap; font-size: .8rem; }
@media (max-width: 1100px) { .dash, .dash--lower { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .queue__item { grid-template-columns: auto minmax(0, 1fr); } .queue__item .btn { grid-column: 2; justify-self: start; } .feed li { flex-direction: column; gap: .1rem; } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }

/* ── Employees (employees.php) ── */
.people { padding: .35rem 1.5rem; }
.person { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1rem; align-items: center; padding: 1rem 0; border-top: 1px solid var(--line); }
.person:first-child { border-top: 0; }
.person.is-locked { opacity: .6; }
.person__who strong { display: block; font-size: 1rem; }
.person__who > small { display: block; }
.person__tags { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-top: .45rem; }
.person__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: flex-start; gap: .5rem; max-width: 460px; }
.person__actions form { margin: 0; }
.person__pw > summary { min-height: 32px; padding: 0 .7rem; border: 1px solid var(--line-2); border-radius: var(--radius-sm); font-size: .84rem; }
.person__pw > summary::before { display: none; }
@media (max-width: 760px) { .person { grid-template-columns: auto minmax(0, 1fr); } .person__actions { grid-column: 1 / -1; justify-content: flex-start; max-width: none; } }

/* ── Alerts (alerts.php) ── */
.section-title { margin: 1.75rem 0 .85rem; font-size: 1.2rem; }
.channels { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; align-items: start; margin-bottom: 1.25rem; }
.channels .card { margin: 0; }
.channel__head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.channel__head h3 { margin: 0; font-size: 1.05rem; }
.channel > .hint { margin-bottom: 1rem; }
.toggles { display: flex; flex-wrap: wrap; gap: .5rem; }
.toggle { display: inline-flex; align-items: center; gap: .55rem; margin: 0; padding: .5rem .85rem; border: 1px solid var(--line-2); border-radius: 99px; font-weight: 500; cursor: pointer; background: var(--plate); }
.toggle:has(input:checked) { border-color: var(--espresso); background: #fffdf7; }
.toggle:has(input:focus-visible) { outline: 2px solid var(--saffron); outline-offset: 2px; }
.queue__text a { text-decoration: none; }
.queue__text a:hover { text-decoration: underline; text-decoration-color: var(--saffron); }

/* ── Features & prices (features.php) ── */
.feat-list { display: grid; gap: .9rem; }
.feat-list .card { margin: 0; }
.feat-item { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr); gap: 1rem 1.75rem; align-items: start; }
.feat-item__title { font: 650 1.1rem/1.3 var(--display); font-stretch: 92%; border-color: transparent; padding-left: .5rem; margin-left: -.5rem; }
.feat-item__title:hover { border-color: var(--line-2); }
.feat-item__name textarea { min-height: 0; margin: .35rem 0 .45rem; font-size: .92rem; border-color: transparent; padding-left: .5rem; margin-left: -.5rem; color: var(--ink-2); }
.feat-item__name textarea:hover { border-color: var(--line-2); }
.feat-item__used { margin: .9rem 0 0; color: var(--ink-3); font-size: .88rem; }
.feat-item__used .num { font: 700 1.5rem/1 var(--display); color: var(--ink); margin-right: .2rem; }
.feat-list input:disabled, .feat-list select:disabled, .feat-list textarea:disabled { background: transparent; border-color: transparent; color: var(--ink); opacity: 1; }
@media (max-width: 900px) { .feat-item { grid-template-columns: 1fr; } }

/* ── Audit log (audit.php) ── */
.audit-table .day-row th { padding: 1.1rem 1.5rem .45rem; font: 650 .95rem/1.2 var(--display); color: var(--ink); background: var(--surface-2); }
.audit-table tr.day-row:hover th { background: var(--surface-2); }
.audit-detail { display: block; margin-top: .1rem; overflow-wrap: anywhere; }
.audit-key { display: block; font-size: .72rem; color: #a39b94; }

/* ── Updates (updates.php) ── */
.release-now { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 1.5rem 2.5rem; align-items: center; }
.release-now__label { margin: 0; font-size: .84rem; font-weight: 600; color: var(--ink-3); }
.release-now__ver { margin: .15rem 0 .25rem; font: 700 2.2rem/1 var(--display); font-stretch: 80%; letter-spacing: -.02em; }
.bk-table tr.is-off td { opacity: .55; }
.btn .count { margin-left: .15rem; }
@media (max-width: 760px) { .release-now { grid-template-columns: 1fr; } }

/* ── Jobs (jobs.php) ── */
.progress-card__top { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; }
.progress-card__count { margin: 0; font-family: var(--display); font-size: 1.25rem; font-weight: 650; }
.progress-card__count .num { font-size: 1.9rem; font-weight: 700; letter-spacing: -.02em; }
.bar { height: 10px; margin-top: .85rem; border-radius: 99px; background: var(--linen); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: inherit; background: var(--herb); transition: width .4s var(--ease); }
.bar > span.bar--warn { background: var(--saffron); }
.job-name { display: inline; }
.job-id { display: block; color: var(--ink-3); font-size: .76rem; }
.jobs-table .when { white-space: nowrap; }
.job-result { max-width: 520px; }
.job-log { display: block; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.job-log-wrap > summary { cursor: pointer; }
.job-log-wrap[open] > summary { margin-bottom: .4rem; }

/* ── Tablet / phone: sidebar becomes a drawer ─────────── */
@media (max-width: 1100px) { .ns { grid-template-columns: 1fr; } .ns-side { position: static; } }
@media (max-width: 1024px) {
    .sb { transform: translateX(-100%); box-shadow: 0 0 40px rgba(43, 37, 34, .3); }
    .sb-open .sb { transform: none; }
    .sb__close { display: grid; place-items: center; }
    .sb-backdrop { display: block; position: fixed; inset: 0; z-index: 30; background: rgba(43, 37, 34, .45); opacity: 0; pointer-events: none; transition: opacity .2s var(--ease); }
    .sb-open .sb-backdrop { opacity: 1; pointer-events: auto; }
    .sb-open { overflow: hidden; }
    .has-sb .shell { margin-left: 0; }
    .mbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: .5rem; height: 56px; padding: 0 .75rem; background: var(--plate); border-bottom: 1px solid var(--line); }
    .mbar__btn { display: grid; place-items: center; width: 44px; height: 44px; border: 0; background: none; color: var(--ink); border-radius: var(--radius-sm); cursor: pointer; }
    .mbar__btn .ic { width: 22px; height: 22px; }
    .mbar__title { font: 650 1.05rem/1 var(--display); font-stretch: 88%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .wrap { padding: 1.4rem 1rem 3rem; }
}
@media (max-width: 760px) { textarea.code, input.code, .feat-item__name textarea { font-size: 16px; } }
@media (max-width: 640px) {
    h1 { font-size: 1.75rem; }
    .card { padding: 1.05rem; }
    .card.table-wrap table th:first-child, .card.table-wrap table td:first-child { padding-left: 1rem; }
    .card.table-wrap table th:last-child, .card.table-wrap table td:last-child { padding-right: 1rem; }
    .stat { font-size: 2.2rem; }
    .inline input:not([type=checkbox]):not([type=radio]), .inline select { width: 100%; }
    .bk-bar { bottom: .5rem; }
    .bk-tools input[type=search] { max-width: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before { transition: none !important; } }
