/*
 * The design system - shared by EVERY screen: admin panel, guard and
 * resident app, sign-in. Colours, type and components live here so the whole
 * product looks and behaves like one app.
 *
 * Look: a clean mobile-app style - white surfaces, Inter, one royal blue
 * (#2748DB) for actions and the active state, near-black headings with grey
 * body text, pill buttons, 16px-rounded fields and cards with a soft shadow.
 *
 * Light by default; dark mode follows <html data-bs-theme="dark"> (switch in
 * the account menu, remembered per device).
 *
 *   Admin panel layout ......... app.css (uses these tokens and components)
 *   Guard / resident screens ... body.co-app (rules below)
 *
 * Tap targets are at least 44px and nothing scrolls sideways at 320px.
 */

/* ── Tokens ──────────────────────────────────────────────────────────── */
:root {
    --co-brand: #2748db;            /* fills: buttons, active tab, banner */
    --co-brand-600: #1f3bbd;        /* hover */
    --co-brand-700: #1a32a3;        /* pressed */
    --co-brand-rgb: 39, 72, 219;
    --co-brand-ink: #2748db;        /* brand as text or icon colour (lighter in dark mode) */
    --co-brand-soft: rgba(39, 72, 219, .08);
    --co-bg: #ffffff;
    --co-card: #ffffff;
    --co-ink: #121212;              /* headings, values */
    --co-muted: #64666c;            /* body text, labels, meta */
    --co-faint: #9a9ca3;            /* placeholders */
    --co-line: #e7e8ea;             /* dividers, card edges */
    --co-field: #dcdde0;            /* field borders */
    --co-soft: #efefef;             /* icon circles, chips, pressed rows */
    --co-note-bg: rgba(39, 72, 219, .06);
    --co-note-line: rgba(39, 72, 219, .18);
    --co-top-bg: #ffffff;
    --co-tabs-line: rgba(18, 25, 39, .06);
    --co-ok: #13795b;
    --co-ok-bg: #e3f6ef;
    --co-warn: #946200;
    --co-warn-bg: #fff4dc;
    --co-bad: #c62828;
    --co-bad-bg: #fdecec;
    --co-idle: #5b5e66;
    --co-idle-bg: #efefef;
    --co-red: #e74141;              /* badges with a count */
    --co-radius: 16px;
    --co-radius-sm: 12px;
    --co-field-radius: 14px;
    --co-shadow: 0 1px 2px rgba(18, 25, 39, .04), 0 8px 28px rgba(18, 25, 39, .06);
    --co-shadow-lg: 0 18px 48px rgba(18, 25, 39, .14);
    --co-tabs-h: 64px;
    --co-safe-b: env(safe-area-inset-bottom, 0px);
    --co-font: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Light values for Bootstrap's own variables. They must come BEFORE the dark
   block below: both selectors match <html>, so the later one wins. */
:root, [data-bs-theme="light"] {
    --bs-body-color: #121212;
    --bs-emphasis-color: #121212;
    --bs-secondary-color: #64666c;
    --bs-border-color: #e7e8ea;
    --bs-link-color: #2748db;
    --bs-link-color-rgb: 39, 72, 219;
    --bs-link-hover-color: #1f3bbd;
    --bs-link-hover-color-rgb: 31, 59, 189;
    --bs-primary-text-emphasis: #1a32a3;
    --bs-primary-bg-subtle: #e9edfc;
    --bs-primary-border-subtle: #bdc8f4;
}

[data-bs-theme="dark"] {
    --co-brand-ink: #8da2ff;
    --co-brand-soft: rgba(141, 162, 255, .12);
    --co-bg: #0e1014;
    --co-card: #16191f;
    --co-ink: #f2f3f5;
    --co-muted: #a0a4ad;
    --co-faint: #6f737c;
    --co-line: #262a33;
    --co-field: #343944;
    --co-soft: #20242c;
    --co-note-bg: rgba(141, 162, 255, .10);
    --co-note-line: rgba(141, 162, 255, .28);
    --co-top-bg: #16191f;
    --co-tabs-line: #262a33;
    --co-ok: #4ade80;
    --co-ok-bg: rgba(22, 163, 74, .18);
    --co-warn: #fbbf24;
    --co-warn-bg: rgba(202, 138, 4, .18);
    --co-bad: #f87171;
    --co-bad-bg: rgba(220, 38, 38, .18);
    --co-idle: #c9ccd3;
    --co-idle-bg: rgba(160, 164, 173, .16);
    --co-shadow: 0 1px 2px rgba(0, 0, 0, .4);
    --co-shadow-lg: 0 18px 48px rgba(0, 0, 0, .55);

    /* Bootstrap components (dialogs, menus, fields) take the same surfaces. */
    --bs-body-bg: #16191f;
    --bs-body-color: #f2f3f5;
    --bs-emphasis-color: #ffffff;
    --bs-border-color: #262a33;
    --bs-secondary-bg: #20242c;
    --bs-tertiary-bg: #1b1e25;
    --bs-secondary-color: #a0a4ad;
    --bs-link-color: #8da2ff;
    --bs-link-color-rgb: 141, 162, 255;
    --bs-link-hover-color: #b3c1ff;
    --bs-link-hover-color-rgb: 179, 193, 255;
    --bs-primary-text-emphasis: #b3c1ff;
    --bs-primary-bg-subtle: rgba(39, 72, 219, .22);
    --bs-primary-border-subtle: rgba(141, 162, 255, .35);
}

/* Bootstrap speaks the same language: brand blue for "primary", Inter, rounder corners. */
:root, [data-bs-theme="light"], [data-bs-theme="dark"] {
    --bs-primary: #2748db;
    --bs-primary-rgb: 39, 72, 219;
    --bs-font-sans-serif: var(--co-font);
    --bs-body-font-family: var(--co-font);
    --bs-border-radius: .75rem;
    --bs-border-radius-sm: .5rem;
    --bs-border-radius-lg: 1rem;
    --bs-border-radius-xl: 1.25rem;
    --bs-border-radius-pill: 50rem;
    --bs-focus-ring-color: rgba(39, 72, 219, .25);
}

/* clip, not hidden: hidden would turn <body> into a scroll box and stop sticky bars from sticking. */
html, body { overflow-x: clip; }

body {
    font-family: var(--co-font);
    color: var(--co-ink);
    background: var(--co-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { color: var(--co-ink); font-weight: 600; letter-spacing: -.01em; }
a { color: var(--bs-link-color); text-decoration: none; }
.text-primary { color: var(--co-brand-ink) !important; }
/* Status text colours readable on white (Bootstrap's yellow and cyan are not). */
.text-warning { color: var(--co-warn) !important; }
.text-success { color: var(--co-ok) !important; }
.text-danger  { color: var(--co-bad) !important; }
.text-info    { color: #1f6fd1 !important; }
[data-bs-theme="dark"] .text-info { color: #7cc0ff !important; }
.bg-primary { background-color: var(--co-brand) !important; }
.border-primary { border-color: var(--co-brand) !important; }
hr { border-color: var(--co-line); opacity: 1; }

/* ── Guard / resident screens ────────────────────────────────────────── */
body.co-app {
    font-size: 1rem;
    line-height: 1.5;
    padding-bottom: calc(var(--co-tabs-h) + var(--co-safe-b) + 16px);
    -webkit-tap-highlight-color: transparent;
}

.co-main { max-width: 40rem; margin: 0 auto; padding: 1rem 1rem 0; }

.co-app .form-control, .co-app .form-select { min-height: 52px; font-size: 1rem; border-radius: 16px; }
.co-app .form-label { font-weight: 500; margin-bottom: .4rem; }

/* ── App bar ─────────────────────────────────────────────────────────── */
/* Three slots: back arrow (or the brand mark) | title, centred | actions.
   The side columns share the spare width equally, so the title sits in the
   middle whenever it fits and never runs under a button when it does not. */
.co-top {
    position: sticky; top: 0; z-index: 1020;
    display: grid; grid-template-columns: minmax(max-content, 1fr) minmax(0, auto) minmax(max-content, 1fr);
    align-items: center; column-gap: .25rem;
    min-height: 56px;
    padding: calc(.375rem + env(safe-area-inset-top, 0px)) .375rem .375rem;
    background: var(--co-top-bg); color: var(--co-ink);
    border-bottom: 1px solid transparent;
    font-family: var(--co-font);
    transition: box-shadow .2s ease, border-color .2s ease;
}
.co-top__start, .co-top__end { display: flex; align-items: center; gap: .25rem; min-width: 44px; }
.co-top__end { justify-content: flex-end; }
.co-top__title { min-width: 0; text-align: center; }
.co-top__name { font-weight: 600; font-size: 1.125rem; line-height: 1.3; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-top__sub { font-size: .75rem; line-height: 1.3; color: var(--co-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-top__btn {
    flex: 0 0 auto; width: 44px; height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 0; border-radius: 50%;
    background: transparent; color: var(--co-ink); font-size: 1.375rem; text-decoration: none;
}
.co-top__btn:focus-visible { outline: 2px solid var(--co-brand); outline-offset: 2px; color: var(--co-ink); }
.co-logo { display: block; flex: 0 0 auto; }
.co-top__brand {
    width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
    color: var(--co-brand-ink); font-size: 1.5rem;
}

/* Live connection status (gate and resident screens). */
.co-pill {
    flex: 0 0 auto; display: inline-flex; align-items: center; gap: .35rem;
    padding: .25rem .6rem; border-radius: 999px;
    font-size: .75rem; font-weight: 600; white-space: nowrap;
    color: var(--co-idle); background: var(--co-idle-bg);
}
.co-pill::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; }
.co-pill--ok   { color: var(--co-ok); background: var(--co-ok-bg); }
.co-pill--warn { color: var(--co-warn); background: var(--co-warn-bg); }
.co-pill--off  { color: var(--co-bad); background: var(--co-bad-bg); }

/* ── Cards, chips, text ──────────────────────────────────────────────── */
.co-card {
    background: var(--co-card); border: 1px solid var(--co-line); border-radius: var(--co-radius);
    padding: 1rem; margin-bottom: .875rem; overflow-wrap: anywhere; box-shadow: var(--co-shadow);
}
.co-card--flash { animation: co-flash 1.6s ease-out 1; }
@keyframes co-flash { 0% { box-shadow: 0 0 0 4px rgba(var(--co-brand-rgb), .5); } 100% { box-shadow: 0 0 0 0 rgba(var(--co-brand-rgb), 0); } }

.co-h { font-size: 1.125rem; font-weight: 600; margin: 1.25rem 0 .625rem; letter-spacing: -.01em; }
.co-name { font-size: 1.2rem; font-weight: 600; letter-spacing: -.01em; }
.co-flat { font-size: 1.4rem; font-weight: 700; letter-spacing: -.01em; }
.co-meta { color: var(--co-muted); font-size: .9375rem; }
.co-guide { font-weight: 600; margin: .5rem 0 0; }
.co-count { font-variant-numeric: tabular-nums; font-weight: 700; }

.co-chip {
    display: inline-flex; align-items: center; gap: .35rem;
    flex: 0 0 auto; max-width: 60%;
    padding: .3rem .7rem; border-radius: 999px; font-size: .8125rem; font-weight: 600;
    color: var(--co-idle); background: var(--co-idle-bg);
    /* never break a status word in half */
    overflow-wrap: normal; word-break: keep-all; text-align: left;
}
.co-chip--pending     { color: var(--co-warn); background: var(--co-warn-bg); }
.co-chip--approved,
.co-chip--checked_in  { color: var(--co-ok); background: var(--co-ok-bg); }
.co-chip--denied      { color: var(--co-bad); background: var(--co-bad-bg); }
.co-chip--no_response { color: var(--co-warn); background: var(--co-warn-bg); }

/* The left edge repeats the status, so it is never carried by colour alone (the chip has text + icon). */
.co-card[data-status="pending"],
.co-card[data-status="no_response"] { border-left: 5px solid var(--co-warn); }
.co-card[data-status="approved"]    { border-left: 5px solid var(--co-ok); }
.co-card[data-status="denied"]      { border-left: 5px solid var(--co-bad); }

/*
 * Stale data: while a screen has not heard from the server, nothing may look
 * approved. Cards go grey, chips lose their colour, live-only buttons hide.
 */
.is-stale .co-card { border-left-color: var(--co-line) !important; opacity: .72; }
.is-stale .co-chip { color: var(--co-idle) !important; background: var(--co-idle-bg) !important; }
.is-stale [data-live-only] { display: none !important; }
.co-stale-note { display: none; font-weight: 600; color: var(--co-bad); }
.is-stale .co-stale-note { display: block; }

/* ── Buttons ─────────────────────────────────────────────────────────── */
/* Every button is a pill. Variants only set colours (Bootstrap variables). */
.btn {
    --bs-btn-padding-x: 1.125rem;
    --bs-btn-padding-y: .5rem;
    --bs-btn-font-size: .9375rem;
    --bs-btn-font-weight: 600;
    --bs-btn-border-radius: 999px;
    letter-spacing: -.005em;
}
.btn-sm { --bs-btn-padding-x: .8rem; --bs-btn-padding-y: .3rem; --bs-btn-font-size: .8125rem; --bs-btn-border-radius: 999px; }
.btn-lg { --bs-btn-padding-x: 1.5rem; --bs-btn-padding-y: .75rem; --bs-btn-font-size: 1rem; --bs-btn-border-radius: 999px; }

.btn-primary {
    --bs-btn-color: #fff; --bs-btn-bg: var(--co-brand); --bs-btn-border-color: var(--co-brand);
    --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--co-brand-600); --bs-btn-hover-border-color: var(--co-brand-600);
    --bs-btn-active-color: #fff; --bs-btn-active-bg: var(--co-brand-700); --bs-btn-active-border-color: var(--co-brand-700);
    --bs-btn-disabled-color: #fff; --bs-btn-disabled-bg: var(--co-brand); --bs-btn-disabled-border-color: var(--co-brand);
    --bs-btn-focus-shadow-rgb: var(--co-brand-rgb);
}
.btn-outline-primary {
    --bs-btn-border-width: 1.5px;
    --bs-btn-color: var(--co-brand-ink); --bs-btn-border-color: var(--co-brand);
    --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--co-brand); --bs-btn-hover-border-color: var(--co-brand);
    --bs-btn-active-color: #fff; --bs-btn-active-bg: var(--co-brand); --bs-btn-active-border-color: var(--co-brand);
    --bs-btn-disabled-color: var(--co-brand-ink); --bs-btn-disabled-border-color: var(--co-brand);
    --bs-btn-focus-shadow-rgb: var(--co-brand-rgb);
}
.btn-secondary, .btn-light {
    --bs-btn-color: var(--co-ink); --bs-btn-bg: var(--co-soft); --bs-btn-border-color: var(--co-soft);
    --bs-btn-hover-color: var(--co-ink); --bs-btn-hover-bg: #e4e5e7; --bs-btn-hover-border-color: #e4e5e7;
    --bs-btn-active-color: var(--co-ink); --bs-btn-active-bg: #dadbde; --bs-btn-active-border-color: #dadbde;
    --bs-btn-disabled-color: var(--co-muted); --bs-btn-disabled-bg: var(--co-soft); --bs-btn-disabled-border-color: var(--co-soft);
    --bs-btn-focus-shadow-rgb: 100, 102, 108;
}
[data-bs-theme="dark"] .btn-secondary, [data-bs-theme="dark"] .btn-light {
    --bs-btn-hover-bg: #2a2f39; --bs-btn-hover-border-color: #2a2f39;
    --bs-btn-active-bg: #323844; --bs-btn-active-border-color: #323844;
}
.btn-outline-secondary, .btn-outline-dark, .btn-outline-light {
    --bs-btn-color: var(--co-ink); --bs-btn-bg: transparent; --bs-btn-border-color: var(--co-field);
    --bs-btn-hover-color: var(--co-ink); --bs-btn-hover-bg: var(--co-soft); --bs-btn-hover-border-color: var(--co-field);
    --bs-btn-active-color: var(--co-ink); --bs-btn-active-bg: var(--co-soft); --bs-btn-active-border-color: var(--co-field);
    --bs-btn-disabled-color: var(--co-muted); --bs-btn-disabled-border-color: var(--co-line);
    --bs-btn-focus-shadow-rgb: 100, 102, 108;
}
.btn-danger {
    --bs-btn-bg: #d93636; --bs-btn-border-color: #d93636;
    --bs-btn-hover-bg: #c22d2d; --bs-btn-hover-border-color: #c22d2d;
    --bs-btn-active-bg: #a92626; --bs-btn-active-border-color: #a92626;
    --bs-btn-disabled-bg: #d93636; --bs-btn-disabled-border-color: #d93636;
}
.btn-outline-danger {
    --bs-btn-border-width: 1.5px;
    --bs-btn-color: #d93636; --bs-btn-border-color: #d93636;
    --bs-btn-hover-bg: #d93636; --bs-btn-hover-border-color: #d93636;
    --bs-btn-active-bg: #c22d2d; --bs-btn-active-border-color: #c22d2d;
}
[data-bs-theme="dark"] .btn-outline-danger { --bs-btn-color: #f87171; --bs-btn-border-color: #f87171; }
.btn-success {
    --bs-btn-bg: #13795b; --bs-btn-border-color: #13795b;
    --bs-btn-hover-bg: #0f6a4f; --bs-btn-hover-border-color: #0f6a4f;
    --bs-btn-active-bg: #0c5a43; --bs-btn-active-border-color: #0c5a43;
    --bs-btn-disabled-bg: #13795b; --bs-btn-disabled-border-color: #13795b;
}
.btn-outline-success { --bs-btn-border-width: 1.5px; --bs-btn-color: #13795b; --bs-btn-border-color: #13795b; --bs-btn-hover-bg: #13795b; --bs-btn-hover-border-color: #13795b; --bs-btn-active-bg: #0f6a4f; --bs-btn-active-border-color: #0f6a4f; }
[data-bs-theme="dark"] .btn-outline-success { --bs-btn-color: #4ade80; --bs-btn-border-color: #4ade80; }
.btn-warning {
    --bs-btn-color: #121212; --bs-btn-bg: #ffb321; --bs-btn-border-color: #ffb321;
    --bs-btn-hover-color: #121212; --bs-btn-hover-bg: #f0a50f; --bs-btn-hover-border-color: #f0a50f;
    --bs-btn-active-color: #121212; --bs-btn-active-bg: #e09a08; --bs-btn-active-border-color: #e09a08;
}
.btn-outline-warning {
    --bs-btn-border-width: 1.5px;
    --bs-btn-color: var(--co-warn); --bs-btn-border-color: #f0b429;
    --bs-btn-hover-color: #121212; --bs-btn-hover-bg: #ffb321; --bs-btn-hover-border-color: #ffb321;
    --bs-btn-active-color: #121212; --bs-btn-active-bg: #f0a50f; --bs-btn-active-border-color: #f0a50f;
}
.btn-outline-info {
    --bs-btn-border-width: 1.5px;
    --bs-btn-color: #1f6fd1; --bs-btn-border-color: #1f6fd1;
    --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #1f6fd1; --bs-btn-hover-border-color: #1f6fd1;
    --bs-btn-active-color: #fff; --bs-btn-active-bg: #195db0; --bs-btn-active-border-color: #195db0;
}
[data-bs-theme="dark"] .btn-outline-info { --bs-btn-color: #7cc0ff; --bs-btn-border-color: #7cc0ff; }
.btn-link { --bs-btn-color: var(--co-brand-ink); --bs-btn-hover-color: var(--co-brand-600); --bs-btn-active-color: var(--co-brand-700); --bs-btn-font-weight: 600; text-decoration: none; }

/* Big app buttons (gate decisions, sign-in). */
.co-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    width: 100%; min-height: 54px; padding: .6rem 1.25rem;
    border-radius: 999px; font-size: 1rem; font-weight: 700; text-decoration: none;
}
.co-btn--sm { min-height: 48px; font-size: .9375rem; }
.co-btn:disabled, .co-btn.disabled { opacity: .55; }
.co-btnrow { display: grid; gap: .625rem; margin-top: .875rem; }
.co-btnrow--2 { grid-template-columns: 1fr 1fr; }

/* Choice buttons: visit type, purpose suggestions. */
.co-seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: .5rem; }
.co-seg .btn { min-height: 46px; font-weight: 600; text-transform: capitalize; }
.co-picks { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .5rem; }
.co-picks .btn { min-height: 40px; }

.co-result {
    display: block; width: 100%; text-align: left; min-height: 56px; padding: .65rem .9rem; margin-top: .45rem;
    background: var(--co-card); color: var(--co-ink); border: 1px solid var(--co-line); border-radius: var(--co-radius-sm);
}
.co-result strong { font-size: 1.1rem; }

/* ── Fields ──────────────────────────────────────────────────────────── */
.form-control, .form-select {
    min-height: 44px;
    color: var(--co-ink); background-color: var(--co-card);
    border-color: var(--co-field); border-radius: var(--co-field-radius);
    font-weight: 500;
}
.form-control:not([type="file"]) { padding-left: .9375rem; padding-right: .9375rem; }
.form-select { padding-left: .9375rem; padding-right: 2.6rem; background-position: right .9375rem center; }
.form-control-sm, .form-select-sm { min-height: 36px; border-radius: .625rem; }
.form-control::placeholder { color: var(--co-faint); font-weight: 400; opacity: 1; }
.form-control:focus, .form-select:focus { border-color: var(--co-brand); box-shadow: 0 0 0 .25rem rgba(var(--co-brand-rgb), .14); }
.form-control:disabled, .form-select:disabled, .form-control[readonly] { background-color: var(--co-soft); }
[data-bs-theme="dark"] .form-control:not(:disabled):not([readonly]),
[data-bs-theme="dark"] .form-select:not(:disabled) { background-color: var(--co-bg); }
.form-label { font-size: .875rem; font-weight: 500; color: var(--co-muted); margin-bottom: .375rem; }
.form-text { color: var(--co-muted); }
.form-check-input { border-color: var(--co-field); background-color: var(--co-card); }
.form-check-input[type="checkbox"] { border-radius: .375rem; }
.form-check-input:checked { background-color: var(--co-brand); border-color: var(--co-brand); }
.form-check-input:focus { border-color: var(--co-brand); box-shadow: 0 0 0 .25rem rgba(var(--co-brand-rgb), .14); }
/* Switches: a 44 x 24 pill with a white knob. */
.form-switch { padding-left: 3.4em; }
.form-switch .form-check-input {
    width: 2.75em; height: 1.5em; margin-left: -3.4em; margin-top: 0;
    border: 0; background-color: rgba(18, 25, 39, .14);
    --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3.1' fill='%23fff'/%3e%3c/svg%3e");
}
.form-switch .form-check-input:checked { background-color: var(--co-brand); }
[data-bs-theme="dark"] .form-switch .form-check-input:not(:checked) { background-color: #3a3f4b; }
.form-switch .form-check-label { padding-top: .1em; }
.input-group-text { color: var(--co-muted); background-color: var(--co-soft); border-color: var(--co-field); border-radius: var(--co-field-radius); }
.input-group > .btn { --bs-btn-border-radius: var(--co-field-radius); }

/* ── Badges and statuses ─────────────────────────────────────────────── */
.badge { --bs-badge-font-weight: 600; --bs-badge-border-radius: 999px; --bs-badge-padding-x: .7em; --bs-badge-padding-y: .4em; letter-spacing: .01em; }
.badge.status-open, .badge.status-pending, .badge.status-trial { background: var(--co-warn-bg); color: var(--co-warn); }
.badge.status-in_progress, .badge.status-assigned, .badge.status-approved { background: var(--co-brand-soft); color: var(--co-brand-ink); }
.badge.status-resolved, .badge.status-paid, .badge.status-active, .badge.status-completed, .badge.status-in { background: var(--co-ok-bg); color: var(--co-ok); }
.badge.status-closed, .badge.status-cancelled, .badge.status-suspended, .badge.status-inactive, .badge.status-out { background: var(--co-idle-bg); color: var(--co-idle); }
.badge.status-overdue, .badge.status-failed, .badge.status-rejected, .badge.status-expired { background: var(--co-bad-bg); color: var(--co-bad); }
.text-bg-light { color: var(--co-ink) !important; background-color: var(--co-soft) !important; }
/* Soft badges, as in the rest of the app; blue and red stay solid for emphasis. */
.badge.text-bg-warning   { color: var(--co-warn) !important; background-color: var(--co-warn-bg) !important; }
.badge.text-bg-success   { color: var(--co-ok) !important; background-color: var(--co-ok-bg) !important; }
.badge.text-bg-secondary { color: var(--co-idle) !important; background-color: var(--co-idle-bg) !important; }
.badge.text-bg-info      { color: #1f6fd1 !important; background-color: #e4f1fd !important; }
[data-bs-theme="dark"] .badge.text-bg-info { color: #7cc0ff !important; background-color: rgba(31, 111, 209, .22) !important; }
/* A badge beside a title keeps its own height instead of stretching to the row. */
.d-flex > .badge { align-self: flex-start; flex-shrink: 0; }

/* ── Tabs and pills ──────────────────────────────────────────────────── */
.nav-tabs {
    --bs-nav-tabs-border-color: var(--co-line);
    --bs-nav-link-color: var(--co-muted);
    --bs-nav-link-hover-color: var(--co-ink);
    --bs-nav-link-font-weight: 500;
    gap: .25rem;
}
.nav-tabs .nav-link { border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: .65rem .9rem; margin-bottom: -1px; }
.nav-tabs .nav-link.active, .nav-tabs .nav-item.show .nav-link { color: var(--co-ink); background: transparent; border-bottom-color: var(--co-brand); font-weight: 600; }
.nav-pills { --bs-nav-pills-border-radius: 999px; --bs-nav-pills-link-active-bg: var(--co-brand); --bs-nav-link-font-weight: 500; gap: .5rem; }
.nav-pills .nav-link { background: var(--co-soft); color: var(--co-ink); padding: .5rem 1rem; }
.nav-pills .nav-link.active, .nav-pills .show > .nav-link { background: var(--co-brand); color: #fff; }
.nav-pills .nav-link.disabled { background: transparent; color: var(--co-muted); }

/* ── Menus, dialogs, alerts, paging ──────────────────────────────────── */
.dropdown-menu {
    --bs-dropdown-border-radius: 16px;
    --bs-dropdown-border-color: var(--co-line);
    --bs-dropdown-padding-x: .375rem;
    --bs-dropdown-padding-y: .375rem;
    --bs-dropdown-item-padding-x: .75rem;
    --bs-dropdown-item-padding-y: .55rem;
    --bs-dropdown-item-border-radius: 10px;
    --bs-dropdown-link-color: var(--co-ink);
    --bs-dropdown-link-hover-bg: var(--co-soft);
    --bs-dropdown-link-hover-color: var(--co-ink);
    --bs-dropdown-link-active-bg: var(--co-brand);
    --bs-dropdown-font-size: .9375rem;
    --bs-dropdown-divider-bg: var(--co-line);
    background-color: var(--co-card);
    box-shadow: var(--co-shadow-lg) !important;
}
.modal {
    --bs-modal-border-radius: 20px;
    --bs-modal-inner-border-radius: 19px;
    --bs-modal-border-color: var(--co-line);
    --bs-modal-header-border-color: var(--co-line);
    --bs-modal-footer-border-color: var(--co-line);
    --bs-modal-bg: var(--co-card);
}
.modal-content { box-shadow: var(--co-shadow-lg); }
.modal-title { font-weight: 600; }
.alert { --bs-alert-border-radius: 14px; --bs-alert-border-color: transparent; font-weight: 500; }
.alert-success { --bs-alert-bg: var(--co-ok-bg); --bs-alert-color: var(--co-ok); --bs-alert-link-color: var(--co-ok); }
.alert-warning { --bs-alert-bg: var(--co-warn-bg); --bs-alert-color: var(--co-warn); --bs-alert-link-color: var(--co-warn); }
.alert-danger  { --bs-alert-bg: var(--co-bad-bg); --bs-alert-color: var(--co-bad); --bs-alert-link-color: var(--co-bad); }
.alert-info, .alert-primary { --bs-alert-bg: var(--co-note-bg); --bs-alert-color: var(--co-brand-ink); --bs-alert-link-color: var(--co-brand-ink); }
.alert-secondary, .alert-light { --bs-alert-bg: var(--co-soft); --bs-alert-color: var(--co-ink); }
.pagination {
    --bs-pagination-color: var(--co-ink);
    --bs-pagination-bg: transparent;
    --bs-pagination-border-color: transparent;
    --bs-pagination-border-radius: 999px;
    --bs-pagination-hover-color: var(--co-ink);
    --bs-pagination-hover-bg: var(--co-soft);
    --bs-pagination-hover-border-color: transparent;
    --bs-pagination-focus-color: var(--co-ink);
    --bs-pagination-focus-bg: var(--co-soft);
    --bs-pagination-focus-box-shadow: 0 0 0 .25rem rgba(var(--co-brand-rgb), .14);
    --bs-pagination-active-bg: var(--co-brand);
    --bs-pagination-active-border-color: var(--co-brand);
    --bs-pagination-disabled-bg: transparent;
    --bs-pagination-disabled-border-color: transparent;
    gap: .25rem;
}
.page-link { border-radius: 999px !important; min-width: 2.25rem; text-align: center; font-weight: 500; }
.list-group { --bs-list-group-border-color: var(--co-line); --bs-list-group-border-radius: var(--co-radius); --bs-list-group-active-bg: var(--co-brand); --bs-list-group-active-border-color: var(--co-brand); }
.progress { --bs-progress-bg: var(--co-soft); --bs-progress-border-radius: 999px; --bs-progress-bar-bg: var(--co-brand); }

/* ── Banners and notes ───────────────────────────────────────────────── */
.co-banner {
    display: none; padding: .85rem 1rem; border-radius: 14px; margin-bottom: .875rem;
    font-weight: 600; color: var(--co-warn); background: var(--co-warn-bg); border: 1.5px solid var(--co-warn);
}
.co-banner.is-on { display: block; }
.co-banner--off { color: var(--co-bad); background: var(--co-bad-bg); border-color: var(--co-bad); }
.co-note { padding: .8rem .95rem; border-radius: 14px; background: var(--co-note-bg); border: 1px solid var(--co-note-line); }
.co-empty { text-align: center; color: var(--co-muted); padding: 2.25rem 1rem; }
.co-empty .bi {
    width: 64px; height: 64px; margin: 0 auto .75rem; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.75rem; color: var(--co-muted); background: var(--co-soft);
}

/* ── Bottom bar ──────────────────────────────────────────────────────── */
.co-tabs {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030;
    display: flex; padding: 0 .25rem var(--co-safe-b);
    background: var(--co-card); border-top: 1px solid var(--co-tabs-line);
    box-shadow: 0 -8px 32px rgba(18, 25, 39, .06);
    font-family: var(--co-font);
}
.co-tab {
    flex: 1 1 0; min-width: 0; min-height: var(--co-tabs-h); border: 0; background: none; color: var(--co-muted);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem;
    font-size: .6875rem; font-weight: 500; letter-spacing: .01em; line-height: 1.2;
    text-decoration: none; position: relative; white-space: nowrap;
}
.co-tab .bi { font-size: 1.375rem; line-height: 1; transition: transform .12s ease; }
/* The active tab: its icon turns solid blue, its label dark - no pill behind it. */
.co-tab.active { color: var(--co-ink); font-weight: 600; }
.co-tab.active .bi { color: var(--co-brand-ink); }
.co-tab__n {
    position: absolute; top: 7px; left: calc(50% + 5px); min-width: 18px; height: 18px; padding: 0 .3rem;
    border-radius: 999px; background: var(--co-red); color: #fff; font-size: .6875rem; font-weight: 700; line-height: 18px; text-align: center;
    box-shadow: 0 0 0 2px var(--co-card);
}
.co-tab__n:empty, .co-tab__n[data-n="0"] { display: none; }

/* Sticky action bar (Approve / Deny). */
.co-actionbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1035;
    background: var(--co-card); border-top: 1px solid var(--co-tabs-line);
    box-shadow: 0 -8px 32px rgba(18, 25, 39, .08);
    padding: .75rem 1rem calc(.75rem + var(--co-safe-b));
}
.co-actionbar__in { max-width: 40rem; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: .875rem; }
.co-actionbar .co-btn { font-size: 1rem; gap: .35rem; padding-inline: .4rem; }
body.has-actionbar { padding-bottom: calc(100px + var(--co-safe-b)); }

/* ── "More" menu (bottom sheet) ──────────────────────────────────────── */
.co-sheet {
    position: fixed; inset: 0; z-index: 1060;
    display: flex; align-items: flex-end; justify-content: center;
    background: rgba(18, 25, 39, .42); opacity: 0; transition: opacity .2s ease;
    font-family: var(--co-font);
}
.co-sheet[hidden] { display: none !important; }
.co-sheet.is-open { opacity: 1; }
.co-sheet__panel {
    width: 100%; max-width: 40rem; max-height: 88vh; max-height: 88dvh; overflow-y: auto; overscroll-behavior: contain;
    background: var(--co-card); color: var(--co-ink);
    border-radius: 24px 24px 0 0;
    padding: .5rem 1.25rem calc(1.5rem + var(--co-safe-b));
    transform: translateY(32px); transition: transform .24s cubic-bezier(.32, .72, 0, 1);
}
.co-sheet__panel::before {   /* grab handle */
    content: ""; display: block; width: 40px; height: 4px; margin: .25rem auto .9rem;
    border-radius: 999px; background: var(--co-field);
}
.co-sheet.is-open .co-sheet__panel { transform: none; }
.co-sheet__head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.co-sheet__title { font-weight: 600; font-size: 1.125rem; letter-spacing: -.01em; }
.co-sheet__close {
    flex: 0 0 auto; width: 40px; height: 40px; border: 0; border-radius: 50%;
    background: var(--co-soft); color: var(--co-ink); font-size: 1rem;
}
.co-sheet__group { margin: 1.5rem 0 .875rem; font-size: 1rem; font-weight: 600; color: var(--co-ink); letter-spacing: -.005em; }

/* Module tiles: an icon in a circle with its name underneath. */
.co-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 1rem .5rem; }
.co-tile {
    position: relative;
    display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: .5rem;
    padding: .125rem; text-align: center;
    background: none; border: 0; color: var(--co-ink);
    font-size: .8125rem; font-weight: 500; line-height: 1.25; text-decoration: none;
}
.co-tile .bi {
    width: 56px; height: 56px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
    font-size: 1.45rem; color: var(--co-brand-ink); background: var(--co-soft);
    transition: transform 120ms cubic-bezier(.2, .8, .2, 1), background-color 120ms ease, color 120ms ease;
}
.co-tile.active .bi { color: #fff; background: var(--co-brand); }
.co-tile__badge {
    position: absolute; top: -2px; left: calc(50% + 14px); min-width: 20px; height: 20px; padding: 0 .35rem;
    border-radius: 999px; background: var(--co-red); color: #fff; font-size: .7rem; font-weight: 700; line-height: 20px;
    box-shadow: 0 0 0 2px var(--co-card);
}
.co-tile--urgent .bi { color: var(--co-warn); background: var(--co-warn-bg); }

/* Rows: an icon in a grey circle, a title with a line under it, a chevron. */
.co-list { display: flex; flex-direction: column; }
.co-list form { margin: 0; }
.co-list__item {
    display: flex; align-items: center; gap: .875rem; width: 100%; min-height: 60px; padding: .7rem 0;
    background: none; border: 0; border-bottom: 1px solid var(--co-line);
    color: var(--co-ink); font-size: .9375rem; font-weight: 500; text-align: left; text-decoration: none;
    transition: opacity 120ms ease;
}
.co-list > :last-child, .co-list > :last-child .co-list__item { border-bottom: 0; }
.co-list__item > .bi:first-child {
    flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.2rem; color: var(--co-ink); background: var(--co-soft);
}
.co-list__item--urgent > .bi:first-child { color: var(--co-warn) !important; background: var(--co-warn-bg) !important; }
.co-list__item--warn > .bi:first-child { color: var(--co-bad) !important; background: var(--co-bad-bg) !important; }
.co-list__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.co-list__title { font-weight: 600; color: var(--co-ink); }
.co-list__meta { font-size: .8125rem; color: var(--co-muted); }
.co-list__chev { flex: 0 0 auto; color: var(--co-muted); font-size: .9rem; }
.co-list__item--danger, .co-list__item--danger > .bi:first-child { color: var(--co-bad) !important; }
.co-list__item--danger > .bi:first-child { background: var(--co-bad-bg) !important; }
body.co-sheet-open { overflow: hidden; }

/* ── Toasts, status lists ────────────────────────────────────────────── */
.co-toasts {
    position: fixed; left: .75rem; right: .75rem; bottom: calc(var(--co-tabs-h) + var(--co-safe-b) + 12px);
    z-index: 1090; display: grid; gap: .45rem; pointer-events: none;
}
.co-toast {
    max-width: 38rem; margin: 0 auto; width: 100%; padding: .8rem 1rem; border-radius: 14px;
    background: #121212; color: #fff; font-weight: 600; box-shadow: 0 10px 30px rgba(18, 25, 39, .22);
}
[data-bs-theme="dark"] .co-toast { background: #2a2f39; }
.co-toast--ok  { background: #13795b !important; }
.co-toast--bad { background: #c62828 !important; }

.co-steps { padding-left: 1.2rem; }
.co-steps li { margin-bottom: .45rem; }
.co-status { display: flex; align-items: flex-start; gap: .6rem; padding: .55rem 0; border-bottom: 1px solid var(--co-line); }
.co-status:last-child { border-bottom: 0; }
.co-status .bi { font-size: 1.25rem; margin-top: .05rem; }
.co-status .bi-check-circle-fill { color: var(--co-ok); }
.co-status .bi-x-circle-fill { color: var(--co-bad); }
.co-status .bi-dash-circle { color: var(--co-muted); }

[hidden] { display: none !important; }
.min-w-0 { min-width: 0; }

@media (prefers-reduced-motion: reduce) {
    .co-card--flash { animation: none; }
    .co-sheet, .co-sheet__panel { transition: none; }
}

/* ════════════════════════════════════════════════════════════════════════
   Feels like an installed app on a phone
   ════════════════════════════════════════════════════════════════════════ */

/* No grey flash on tap and no font inflation in landscape. */
html { -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; }

/* The guard / resident app manages its own refreshing: a stray pull-to-refresh
   would throw away a half-typed visitor. Inner panels keep their own bounce. */
html.co-app-html, html.co-app-html body { overscroll-behavior-y: none; }

/* Controls respond at once (no double-tap delay) and long-pressing one does
   not select its label. Text that is content stays selectable. */
button, .btn, .co-tab, .co-tile, .co-list__item, .co-quick__item, .co-result, .co-top__btn,
.co-sheet__close, .co-install__btn, .nav-link, .dropdown-item, .page-link, .co-chip, .co-hero__cta, [role="button"] {
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* Phones never zoom into a field when its text is at least 16px. */
@media (pointer: coarse) {
    input, select, textarea,
    .form-control, .form-select, .form-control-sm, .form-select-sm { font-size: 16px; }
}

/* Press feedback the moment a finger lands - native controls answer on press, not on release. */
.btn, .co-quick__item, .co-result, .co-top__btn, .co-sheet__close, .co-install__btn, .co-hero__cta {
    transition: transform 120ms cubic-bezier(.2, .8, .2, 1), background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease, color 120ms ease;
}
.btn:active:not(:disabled), .co-quick__item:active, .co-result:active, .co-sheet__close:active,
.co-install__btn:active, .co-hero__cta:active { transform: scale(.97); }
.co-top__btn:active { background: var(--co-soft); }
.co-tile:active .bi { transform: scale(.92); }
.co-tab:active .bi { transform: scale(.9); }
.co-list__item:active { opacity: .6; }

/* Hover effects only where a real mouse or trackpad can hover. */
@media (hover: hover) and (pointer: fine) {
    .co-top__btn:hover { background: var(--co-soft); color: var(--co-ink); }
    .co-tab:hover { color: var(--co-ink); }
    .co-tile:hover .bi { background: var(--co-brand-soft); }
    .co-tile.active:hover .bi { background: var(--co-brand-600); }
    .co-list__item:hover { color: var(--co-ink); opacity: .75; }
    .co-quick__item:hover { background: var(--co-brand-soft); color: var(--co-ink); }
    .co-hero__cta:hover { color: var(--co-brand); background: #eef1fd; }
    .nav-pills .nav-link:not(.active):not(.disabled):hover { background: #e4e5e7; color: var(--co-ink); }
    [data-bs-theme="dark"] .nav-pills .nav-link:not(.active):not(.disabled):hover { background: #2a2f39; }
}

/* Keyboard focus: a brand-coloured ring on every custom control. */
.co-tab:focus-visible, .co-tile:focus-visible, .co-list__item:focus-visible, .co-quick__item:focus-visible,
.co-hero__cta:focus-visible, .co-result:focus-visible, .co-sheet__close:focus-visible {
    outline: 2px solid var(--co-brand-ink); outline-offset: 2px;
}
.co-tab:focus-visible, .co-tile:focus-visible, .co-list__item:focus-visible { border-radius: 12px; }

/* Touch screens: Bootstrap's hover colours would stick to a button after a tap. */
@media (hover: none) {
    .btn:hover { color: var(--bs-btn-color); background-color: var(--bs-btn-bg); border-color: var(--bs-btn-border-color); }
}

/* App bar gets a hairline once the page scrolls under it. */
body.co-scrolled .co-top { border-bottom-color: var(--co-line); box-shadow: 0 6px 24px rgba(18, 25, 39, .06); }

/* Thin loading bar while the next page opens (shell.js). */
.co-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 2000; overflow: hidden; pointer-events: none; }
.co-progress::before {
    content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 40%;
    background: linear-gradient(90deg, transparent, #2748db, #7c93ff, #2748db, transparent);
    animation: co-progress 1s ease-in-out infinite;
}
@keyframes co-progress { to { left: 100%; } }

/* A button whose form is being sent: spinner, and no second submission. */
.is-busy { pointer-events: none; opacity: .85; }
.is-busy::after {
    content: ""; display: inline-block; width: 1em; height: 1em; margin-left: .5em; vertical-align: -.15em;
    border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
    animation: co-rotate .7s linear infinite;
}
@keyframes co-rotate { to { transform: rotate(360deg); } }

/* Pages settle in gently instead of popping. */
@media (prefers-reduced-motion: no-preference) {
    .app-content, .co-main { animation: co-enter .22s cubic-bezier(.2, .8, .2, 1) backwards; }
}
@keyframes co-enter { from { opacity: 0; transform: translateY(6px); } }

/* ── Home ────────────────────────────────────────────────────────────── */
.co-home { max-width: 56rem; }

/* The blue banner: who and where, plus the one thing that needs them now. */
.co-hero {
    position: relative; overflow: hidden; isolation: isolate;
    color: #fff; background: var(--co-brand);
    border-radius: var(--co-radius); padding: 1.25rem 1.25rem 1.35rem;
}
[data-bs-theme="dark"] .co-hero { background: var(--co-brand-700); }
.co-hero__art {
    position: absolute; z-index: -1; right: -18px; bottom: -30px;
    font-size: 8rem; line-height: 1; opacity: .13; transform: rotate(-8deg); pointer-events: none;
}
.co-hero__hello { font-size: 1.375rem; font-weight: 700; letter-spacing: -.015em; line-height: 1.25; max-width: 85%; }
.co-hero__where { display: flex; flex-wrap: wrap; gap: .2rem .9rem; margin-top: .35rem; opacity: .9; font-weight: 500; font-size: .9375rem; }
.co-hero__cta {
    display: inline-flex; align-items: center; gap: .45rem; max-width: 100%;
    margin-top: 1rem; padding: .55rem 1.1rem; border-radius: 999px;
    background: #fff; color: var(--co-brand); font-weight: 600; font-size: .875rem; line-height: 1.3; text-decoration: none;
}
.co-hero--profile { display: flex; align-items: center; gap: 1rem; }
.co-hero__avatar { width: 64px; height: 64px; flex: 0 0 64px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px rgba(255, 255, 255, .35); }
.co-hero--profile .co-hero__hello { max-width: none; }
.co-hero__cta .co-hero__dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--co-red); flex: 0 0 auto; }

/* Section heading with an optional "See all" on the right. */
.co-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 1.6rem 0 .8rem; }
.co-section-head .co-section-title { margin: 0; }
.co-section-title { margin: 1.6rem 0 .8rem; font-size: 1.125rem; font-weight: 600; letter-spacing: -.01em; color: var(--co-ink); }
.co-section-link { font-size: .8125rem; font-weight: 600; color: var(--co-ink); white-space: nowrap; }
.co-tiles--home { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); }
.co-caughtup { display: flex; align-items: center; gap: .75rem; color: var(--co-muted); }
.co-caughtup .bi { font-size: 1.6rem; color: var(--co-ok); }

/* Shortcut strip (committee dashboard). */
.co-quick { display: flex; gap: .5rem; overflow-x: auto; scrollbar-width: none; padding: .1rem 0 .2rem; }
.co-quick::-webkit-scrollbar { display: none; }
.co-quick__item {
    flex: 0 0 auto; display: inline-flex; align-items: center; gap: .45rem;
    min-height: 40px; padding: .45rem 1rem; border-radius: 999px;
    background: var(--co-soft); border: 0; color: var(--co-ink);
    font-weight: 600; font-size: .875rem; white-space: nowrap; text-decoration: none;
}
.co-quick__item .bi { color: var(--co-brand-ink); font-size: 1.05rem; }

/* ════════════════════════════════════════════════════════════════════════
   Friendly app screens: colour per feature, one look / one tap decisions
   ════════════════════════════════════════════════════════════════════════ */

/* Each feature keeps its own soft colour, so it is recognised before it is read. */
[data-tone] { --tone-bg: var(--co-soft); --tone-fg: var(--co-ink); }
[data-tone="blue"]   { --tone-bg: #e9edfc; --tone-fg: #2748db; }
[data-tone="violet"] { --tone-bg: #f0ebff; --tone-fg: #6a4be0; }
[data-tone="orange"] { --tone-bg: #fff0e5; --tone-fg: #c2550a; }
[data-tone="green"]  { --tone-bg: #e3f6ef; --tone-fg: #13795b; }
[data-tone="teal"]   { --tone-bg: #e0f5f7; --tone-fg: #0e7c86; }
[data-tone="pink"]   { --tone-bg: #fde8f1; --tone-fg: #c2307a; }
[data-tone="amber"]  { --tone-bg: #fff4dc; --tone-fg: #946200; }
[data-tone="cyan"]   { --tone-bg: #e4f1fd; --tone-fg: #1f6fd1; }
[data-tone="red"]    { --tone-bg: #fdecec; --tone-fg: #c62828; }
[data-bs-theme="dark"] [data-tone="blue"]   { --tone-bg: rgba(39, 72, 219, .26);  --tone-fg: #a9b9ff; }
[data-bs-theme="dark"] [data-tone="violet"] { --tone-bg: rgba(106, 75, 224, .26); --tone-fg: #c4b5ff; }
[data-bs-theme="dark"] [data-tone="orange"] { --tone-bg: rgba(217, 98, 15, .24);  --tone-fg: #ffb27a; }
[data-bs-theme="dark"] [data-tone="green"]  { --tone-bg: rgba(19, 121, 91, .28);  --tone-fg: #6ee7b7; }
[data-bs-theme="dark"] [data-tone="teal"]   { --tone-bg: rgba(14, 124, 134, .28); --tone-fg: #7dd3dc; }
[data-bs-theme="dark"] [data-tone="pink"]   { --tone-bg: rgba(194, 48, 122, .26); --tone-fg: #f9a8d4; }
[data-bs-theme="dark"] [data-tone="amber"]  { --tone-bg: rgba(202, 138, 4, .24);  --tone-fg: #fcd34d; }
[data-bs-theme="dark"] [data-tone="cyan"]   { --tone-bg: rgba(31, 111, 209, .26); --tone-fg: #93c5fd; }
[data-bs-theme="dark"] [data-tone="red"]    { --tone-bg: rgba(220, 38, 38, .24);  --tone-fg: #fca5a5; }
.co-tile[data-tone] .bi { background: var(--tone-bg); color: var(--tone-fg); }
.co-tile.active[data-tone] .bi { background: var(--co-brand); color: #fff; }
.co-tiles--home .co-tile .bi { width: 58px; height: 58px; border-radius: 20px; font-size: 1.55rem; }
.co-list__item > .bi[data-tone]:first-child { background: var(--tone-bg); color: var(--tone-fg); }
.co-well { flex: 0 0 auto; width: 48px; height: 48px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.4rem; background: var(--tone-bg, var(--co-soft)); color: var(--tone-fg, var(--co-ink)); }

/* Home: hello, the thing that needs them now, dues, money. */
.co-hello { display: flex; align-items: center; gap: .8rem; margin: .1rem 0 1rem; }
.co-hello__av { flex: 0 0 46px; width: 46px; height: 46px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--co-brand); color: #fff; font-weight: 700; }
.co-hello__hi { font-size: .8125rem; color: var(--co-muted); }
.co-hello__name { font-size: 1.25rem; font-weight: 700; letter-spacing: -.015em; line-height: 1.2; }
.co-urgent {
    position: relative; overflow: hidden; isolation: isolate; display: block; text-decoration: none;
    border-radius: 22px; padding: 1rem 1rem 1.05rem; margin-bottom: 1rem; color: #fff;
    background: linear-gradient(135deg, var(--co-brand), #4f63e6);
}
[data-bs-theme="dark"] .co-urgent { background: linear-gradient(135deg, var(--co-brand-700), #3442b8); }
.co-urgent:hover, .co-urgent:focus { color: #fff; }
.co-urgent::after { content: ""; position: absolute; z-index: -1; right: -60px; top: -60px; width: 180px; height: 180px; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.co-urgent__tag { display: inline-flex; align-items: center; gap: .4rem; padding: .25rem .65rem; border-radius: 999px; background: rgba(255, 255, 255, .18); font-size: .75rem; font-weight: 700; }
.co-urgent__tag::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: #ffd166; box-shadow: 0 0 0 0 rgba(255, 209, 102, .7); animation: co-ping 1.6s ease-out infinite; }
@keyframes co-ping { 70% { box-shadow: 0 0 0 8px rgba(255, 209, 102, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 209, 102, 0); } }
.co-urgent__row { display: flex; align-items: center; gap: .8rem; margin-top: .8rem; }
.co-urgent__av { flex: 0 0 54px; width: 54px; height: 54px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #fff; color: var(--tone-fg, var(--co-brand)); font-size: 1.6rem; }
.co-urgent__title { font-size: 1.125rem; font-weight: 700; line-height: 1.25; }
.co-urgent__meta { font-size: .8125rem; opacity: .9; }
.co-urgent__go { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: .9rem; padding: .65rem .65rem .65rem 1rem; border-radius: 999px; background: #fff; color: var(--co-brand); font-weight: 700; }
.co-urgent__go .bi { font-size: 1.6rem; line-height: 1; }
.co-urgent__left { font-size: .75rem; opacity: .9; margin-top: .5rem; }
.co-dues { display: flex; align-items: center; gap: .8rem; padding: .9rem 1rem; margin-bottom: .5rem; border: 1px solid var(--co-line); border-radius: 18px; background: var(--co-card); color: var(--co-ink); text-decoration: none; }
.co-dues:hover { color: var(--co-ink); }
.co-dues__amount { font-size: 1.25rem; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; }
.co-dues__meta { font-size: .8125rem; color: var(--co-muted); }
.co-dues .btn { margin-left: auto; flex: 0 0 auto; }
.co-money { display: block; padding: .9rem 1rem; border-radius: 18px; background: var(--co-note-bg); border: 1px solid var(--co-line); color: var(--co-ink); text-decoration: none; }
.co-money:hover { color: var(--co-ink); }
.co-money__bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--co-line); margin: .65rem 0 .5rem; }
.co-money__bar > span { display: block; height: 100%; }

/* One request at the gate: who, how long is left, and two big answers. */
.co-visit { text-align: center; padding-top: .25rem; }
.co-ring { position: relative; width: 184px; height: 184px; margin: 0 auto; }
.co-ring svg { display: block; transform: rotate(-90deg); }
.co-ring__track { stroke: var(--co-soft); }
.co-ring__left { stroke: #f0a50f; transition: stroke-dashoffset 1s linear; }
.co-ring__left.is-low { stroke: #e74141; }
.co-ring__face { position: absolute; inset: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 3.6rem; background: var(--tone-bg); color: var(--tone-fg); }
.co-ring__time { position: absolute; left: 50%; bottom: -4px; transform: translateX(-50%); padding: .3rem .8rem; border-radius: 999px; background: var(--co-ink); color: var(--co-card); font-weight: 700; font-size: .875rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.co-visit__name { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; margin-top: 1.1rem; overflow-wrap: anywhere; }
.co-visit__what { display: inline-flex; align-items: center; gap: .4rem; margin-top: .45rem; padding: .3rem .8rem; border-radius: 999px; font-weight: 600; background: var(--tone-bg); color: var(--tone-fg); }
.co-facts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; margin: 1.1rem 0 .75rem; text-align: left; }
.co-fact { padding: .7rem .85rem; border-radius: 16px; background: var(--co-soft); }
.co-fact__k { font-size: .75rem; color: var(--co-muted); }
.co-fact__v { font-weight: 700; overflow-wrap: anywhere; }
.co-decide { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1rem; min-height: 84px; border-radius: 22px; font-size: 1.05rem; font-weight: 700; line-height: 1.2; }
.co-decide .bi { font-size: 1.6rem; line-height: 1; margin-bottom: .2rem; }
.co-decide small { font-size: .8125rem; font-weight: 500; opacity: .92; }
.co-outcome-big { text-align: center; padding: 1.25rem 1rem; border-radius: 22px; margin-bottom: .875rem; background: var(--tone-bg, var(--co-soft)); color: var(--tone-fg, var(--co-ink)); }
.co-outcome-big .bi { font-size: 2.6rem; display: block; margin-bottom: .35rem; }
.co-outcome-big__title { font-size: 1.15rem; font-weight: 700; }
.co-outcome-big__text { color: var(--co-ink); opacity: .85; margin-top: .25rem; }

/* Guard: New Visitor in three numbered steps with big choices. */
.co-step { display: flex; align-items: center; gap: .55rem; font-weight: 700; font-size: 1rem; margin: 1.1rem 0 .65rem; }
.co-step:first-child { margin-top: 0; }
.co-step__n { flex: 0 0 26px; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--co-brand); color: #fff; font-size: .8125rem; }
.co-typegrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.co-type {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem;
    min-height: 92px; padding: .6rem .3rem; border: 2px solid var(--co-line); border-radius: 18px;
    background: var(--co-card); color: var(--co-ink); font-weight: 700; font-size: .9375rem;
    transition: border-color 120ms ease, background-color 120ms ease, transform 120ms cubic-bezier(.2, .8, .2, 1);
}
.co-type > span { max-width: 100%; text-align: center; line-height: 1.2; overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto; }
.co-type .bi { width: 46px; height: 46px; border-radius: 15px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.4rem; background: var(--tone-bg, var(--co-soft)); color: var(--tone-fg, var(--co-ink)); }
.co-type.is-on, .co-type:has(input:checked) { border-color: var(--co-brand); background: var(--co-brand-soft); box-shadow: inset 0 0 0 1px var(--co-brand); }
.co-type.is-on .bi, .co-type:has(input:checked) .bi { background: var(--co-card); }

/* Report a problem: radio buttons drawn as big choices. */
label.co-type, .co-level, .co-photo { cursor: pointer; margin: 0; -webkit-user-select: none; user-select: none; }
.co-type:has(input:focus-visible), .co-level:has(input:focus-visible), .co-photo:has(input:focus-visible) { outline: 3px solid var(--co-brand); outline-offset: 2px; }
.co-report .co-typegrid { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
.co-report .co-type { padding-inline: .15rem; font-size: .8125rem; letter-spacing: -.01em; }
.co-levels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.co-level { display: flex; align-items: flex-start; gap: .65rem; padding: .75rem .8rem; border: 2px solid var(--co-line); border-radius: 16px; background: var(--co-card); }
.co-level__dot { flex: 0 0 auto; width: 14px; height: 14px; margin: .25rem .1rem 0; border-radius: 50%; background: var(--tone-fg); box-shadow: 0 0 0 4px var(--tone-bg); }
.co-level__label { display: block; font-weight: 700; }
.co-level__hint { display: block; font-size: .75rem; line-height: 1.3; color: var(--co-muted); }
.co-level:has(input:checked) { border-color: var(--tone-fg); background: var(--tone-bg); }
.co-photo { display: flex; align-items: center; gap: .8rem; padding: .85rem 1rem; border: 2px dashed var(--co-field); border-radius: 18px; }
.co-photo > .bi { flex: 0 0 auto; width: 48px; height: 48px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.35rem; background: var(--co-brand-soft); color: var(--co-brand); }
.co-photo__title { display: block; font-weight: 700; }
.co-photo__hint { display: block; font-size: .8125rem; color: var(--co-muted); }
.co-thumbs { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.co-thumbs:empty { display: none; }
.co-thumbs__item { width: 64px; height: 64px; border-radius: 12px; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; background: var(--co-soft); color: var(--co-muted); font-size: .75rem; font-weight: 700; }
.co-thumbs__item img { width: 100%; height: 100%; object-fit: cover; }
.co-type:active { transform: scale(.96); }
.co-picked { display: flex; align-items: center; gap: .9rem; padding: .7rem .9rem; border: 2px solid var(--co-ok); border-radius: 18px; background: var(--co-ok-bg); color: var(--co-ok); }
.co-picked .co-flat { color: var(--co-ok); }
.co-picked__who { font-size: .8125rem; font-weight: 600; }
.co-picked .btn-link { margin-left: auto; color: var(--co-ok); font-weight: 700; }
.co-picked.is-warn { border-color: var(--co-warn); background: var(--co-warn-bg); color: var(--co-warn); }
.co-picked.is-warn .co-flat, .co-picked.is-warn .btn-link { color: var(--co-warn); }
.co-picks .btn.is-on { background: var(--co-brand); border-color: var(--co-brand); color: #fff; }
.co-send { min-height: 58px; font-size: 1.125rem; font-weight: 800; }

/* Guard: every card starts with what to do, in one coloured line. */
.co-card--strip { padding: 0; overflow: hidden; }
.co-card--strip > .co-card__in { padding: .85rem 1rem 1rem; }
.co-strip { display: flex; align-items: center; gap: .6rem; padding: .75rem 1rem; font-weight: 800; font-size: 1.05rem; letter-spacing: .01em; color: #fff; background: var(--co-idle); }
.co-strip .bi { font-size: 1.35rem; }
.co-strip__note { margin-left: auto; font-size: .8125rem; font-weight: 600; opacity: .92; text-align: right; }
.co-strip--go { background: #13795b; }
.co-strip--wait { background: #f0a50f; color: #121212; }
.co-strip--stop { background: #d93636; }
.co-strip--call { background: #c2550a; }
.co-strip--in { background: var(--co-brand); }
.co-strip--done { background: var(--co-idle-bg); color: var(--co-idle); }
.co-card[data-status] .co-strip ~ * { border: 0; }
.co-card--strip[data-status] { border-left-width: 1px !important; border-left-color: var(--co-line) !important; }
.co-strip__label { min-width: 0; }
.co-strip__stale { display: none; }
/* Out of date: the line goes grey and only says it is checking - nothing reads as "let in". */
.is-stale .co-strip { background: var(--co-idle-bg) !important; color: var(--co-idle) !important; }
.is-stale .co-strip > .bi, .is-stale .co-strip__label, .is-stale .co-strip__note { display: none; }
.is-stale .co-strip__stale { display: inline; }
.is-stale .co-outcome-big { --tone-bg: var(--co-idle-bg); --tone-fg: var(--co-idle); }
.is-stale .co-ring__left { stroke: var(--co-idle); }
.co-gate-flat { flex: 0 0 auto; min-width: 4.5rem; font-size: 1.45rem; font-weight: 800; letter-spacing: -.01em; }

/* Visitor photo: taken by the guard, shown to the flat and on the gate cards. */
.co-step__tag { margin-left: auto; padding: .15rem .55rem; border-radius: 999px; background: var(--co-soft); color: var(--co-muted); font-size: .75rem; font-weight: 600; }
.co-shot {
    display: flex; align-items: center; gap: .9rem; width: 100%; padding: .85rem 1rem; text-align: left;
    border: 2px dashed var(--co-brand); border-radius: 18px; background: var(--co-brand-soft); color: var(--co-ink);
    transition: transform 120ms cubic-bezier(.2, .8, .2, 1);
}
.co-shot > .bi { flex: 0 0 auto; width: 54px; height: 54px; border-radius: 18px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.5rem; background: var(--co-brand); color: #fff; }
.co-shot:active { transform: scale(.98); }
.co-shot:disabled { opacity: .7; }
.co-shot__title { display: block; font-size: 1.05rem; font-weight: 800; }
.co-shot__hint { display: block; font-size: .8125rem; color: var(--co-muted); }
.co-shot-done { display: flex; align-items: center; gap: .8rem; padding: .6rem .7rem; border: 2px solid var(--co-ok); border-radius: 18px; background: var(--co-ok-bg); }
.co-shot-done__img { flex: 0 0 auto; width: 72px; height: 72px; padding: 0; border: 0; border-radius: 16px; overflow: hidden; background: var(--co-soft); }
.co-shot-done__img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.co-shot-done__title { font-weight: 800; color: var(--co-ok); }
.co-shot-done > .min-w-0 { flex: 1 1 auto; }
.co-shot-done__actions { flex: 0 0 auto; margin-left: auto; display: flex; align-items: center; }
.co-shot-done__actions .btn-link { font-weight: 700; min-height: 44px; white-space: nowrap; }
@media (max-width: 359.98px) {
    /* Small phones: Retake / Remove move under the photo so the text keeps its width. */
    .co-shot-done { flex-wrap: wrap; }
    .co-shot-done__actions { width: 100%; justify-content: flex-end; margin-top: -.35rem; }
}
.co-ring__face--photo { padding: 0; border: 0; overflow: hidden; background: var(--co-soft); cursor: zoom-in; }
.co-ring__face--photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.co-photo-hint { margin-top: .9rem; font-size: .8125rem; color: var(--co-muted); }
.co-urgent__av--photo { overflow: hidden; padding: 0; border: 2px solid #fff; }
.co-urgent__av--photo img, .co-well--photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.co-well--photo { overflow: hidden; padding: 0; }
.co-gate-photo { flex: 0 0 auto; width: 68px; height: 68px; padding: 0; border: 0; border-radius: 18px; overflow: hidden; background: var(--co-soft); cursor: zoom-in; }
.co-gate-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.co-viewer {
    position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center;
    padding: calc(16px + env(safe-area-inset-top, 0px)) 16px calc(16px + env(safe-area-inset-bottom, 0px));
    background: rgba(10, 12, 18, .92); cursor: zoom-out; overscroll-behavior: contain;
}
.co-viewer img { max-width: 100%; max-height: 100%; border-radius: 16px; object-fit: contain; }
.co-viewer__close { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .16); color: #fff; font-size: 1.25rem; }
.is-stale .co-ring__face--photo, .is-stale .co-gate-photo { filter: grayscale(1); opacity: .8; }

/* Doorbell: the ringing screen when someone is at the gate (public/js/doorbell.js). */
html.co-bell-open { overflow: hidden; }
.co-bell {
    position: fixed; inset: 0; z-index: 2100; overflow-y: auto; overscroll-behavior: contain;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem;
    padding: calc(28px + env(safe-area-inset-top, 0px)) 20px calc(20px + env(safe-area-inset-bottom, 0px));
    text-align: center; color: #fff;
    background: radial-gradient(120% 80% at 50% 22%, #4a67f2 0%, #2748db 45%, #172684 100%);
    animation: co-bell-in 260ms cubic-bezier(.2, .8, .2, 1);
}
[data-bs-theme="dark"] .co-bell { background: radial-gradient(120% 80% at 50% 22%, #2f45c4 0%, #1d2f9e 45%, #0b1240 100%); }
@keyframes co-bell-in { from { opacity: 0; transform: scale(1.04); } }
.co-bell__mute {
    position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px;
    width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .16); color: #fff; font-size: 1.3rem;
}
.co-bell[data-sound="off"] .co-bell__mute, .co-bell[data-sound="blocked"] .co-bell__mute { opacity: .4; }
.co-bell__stage { position: relative; flex: 0 0 auto; width: 220px; height: 220px; display: flex; align-items: center; justify-content: center; margin-bottom: .6rem; }
.co-bell__rings span { position: absolute; inset: 40px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .6); animation: co-bell-wave 2.4s cubic-bezier(.1, .6, .3, 1) infinite; }
.co-bell__rings span:nth-child(2) { animation-delay: .8s; }
.co-bell__rings span:nth-child(3) { animation-delay: 1.6s; }
@keyframes co-bell-wave { from { transform: scale(.9); opacity: .9; } to { transform: scale(1.75); opacity: 0; } }
.co-bell__face {
    position: relative; width: 140px; height: 140px; border-radius: 50%; overflow: hidden;
    display: flex; align-items: center; justify-content: center; background: #fff; color: var(--co-brand); font-size: 4.2rem;
    border: 4px solid #fff; box-shadow: 0 14px 40px rgba(0, 0, 0, .28);
    animation: co-bell-buzz 2.4s ease-in-out infinite;
}
.co-bell__face img { width: 100%; height: 100%; object-fit: cover; }
.co-bell__face .bi, .co-bell__tag .bi { display: inline-block; transform-origin: 50% 8%; animation: co-bell-swing 1.2s ease-in-out infinite; }
@keyframes co-bell-swing { 0%, 100% { transform: rotate(0); } 12% { transform: rotate(16deg); } 26% { transform: rotate(-14deg); } 40% { transform: rotate(10deg); } 54% { transform: rotate(-6deg); } 68% { transform: rotate(2deg); } }
@keyframes co-bell-buzz {
    0%, 66%, 100% { transform: translate(0, 0) rotate(0); }
    69% { transform: translate(-4px, 0) rotate(-2deg); } 72% { transform: translate(4px, 0) rotate(2deg); }
    75% { transform: translate(-4px, 0) rotate(-2deg); } 78% { transform: translate(4px, 0) rotate(2deg); } 81% { transform: translate(0, 0) rotate(0); }
}
.co-bell__tag { display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .85rem; border-radius: 999px; background: rgba(255, 255, 255, .18); font-size: .875rem; font-weight: 700; }
.co-bell__title { margin: .55rem 0 0; color: #fff; font-size: 1.65rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.co-bell__text { margin: .3rem 0 0; max-width: 340px; font-size: 1rem; line-height: 1.45; opacity: .92; overflow-wrap: anywhere; }
.co-bell__name { display: block; font-size: 1.25rem; font-weight: 700; opacity: 1; }
.co-bell__left { margin: .55rem 0 0; min-height: 1.5em; font-weight: 700; font-variant-numeric: tabular-nums; }
.co-bell__hear { margin-top: .4rem; min-height: 48px; padding: .5rem 1.1rem; border: 2px solid rgba(255, 255, 255, .75); border-radius: 999px; background: transparent; color: #fff; font-weight: 700; }
.co-bell__actions { display: grid; gap: .45rem; width: 100%; max-width: 380px; margin-top: 1.3rem; }
.co-bell__answer {
    display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 62px;
    border: 0; border-radius: 999px; background: #16a34a; color: #fff; font-size: 1.2rem; font-weight: 800;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .28);
}
.co-bell__answer:hover, .co-bell__answer:focus, .co-bell__answer:active { background: #15803d; color: #fff; }
.co-bell__answer .bi { font-size: 1.35rem; }
.co-bell__later { min-height: 48px; border: 0; border-radius: 999px; background: transparent; color: #fff; font-weight: 600; opacity: .9; }
.co-bell button:focus, .co-bell a:focus { outline: none; box-shadow: none; }
.co-bell button:focus-visible, .co-bell a:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
@media (max-height: 640px) {
    .co-bell__stage { width: 170px; height: 170px; }
    .co-bell__face { width: 112px; height: 112px; font-size: 3.4rem; }
}

/* Who's home? (resident Home, visitor list, Alerts): who rings first, who is out, who is busy. */
.co-house { margin: .25rem 0 .75rem; }
.co-house__list { display: flex; gap: .6rem; overflow-x: auto; padding: .15rem .1rem .45rem; scroll-snap-type: x proximity; overscroll-behavior-x: contain; }
.co-house__member {
    flex: 0 0 auto; width: 92px; display: flex; flex-direction: column; align-items: center; gap: .3rem;
    padding: .75rem .3rem .65rem; border: 1px solid var(--co-line); border-radius: 18px; background: var(--co-card); color: var(--co-ink);
    scroll-snap-align: start; transition: transform 120ms cubic-bezier(.2, .8, .2, 1);
}
.co-house__member:active { transform: scale(.96); }
.co-house__av { position: relative; width: 50px; height: 50px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--co-brand-soft); color: var(--co-brand); font-weight: 800; }
.co-house__member[data-state="busy"] .co-house__av { background: var(--co-soft); color: var(--co-muted); }
.co-house__badge { position: absolute; right: -5px; bottom: -5px; width: 25px; height: 25px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: .75rem; background: var(--tone-bg); color: var(--tone-fg); border: 2px solid var(--co-card); }
.co-house__name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .875rem; font-weight: 700; }
.co-house__state { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: .1rem .5rem; border-radius: 999px; background: var(--tone-bg); color: var(--tone-fg); font-size: .75rem; font-weight: 700; }
.co-house__how { display: flex; align-items: flex-start; gap: .5rem; margin: .2rem 0 0; color: var(--co-muted); font-size: .8125rem; line-height: 1.4; }
.co-house__how .bi { margin-top: .15rem; color: #f0a50f; }
.co-house__choices { display: grid; gap: .6rem; }
.co-house__pick { display: flex; align-items: center; gap: .8rem; width: 100%; padding: .8rem .9rem; border: 2px solid var(--co-line); border-radius: 18px; background: var(--co-card); color: var(--co-ink); text-align: left; }
.co-house__pick > .bi { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 15px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.25rem; background: var(--tone-bg); color: var(--tone-fg); }
.co-house__pick strong { display: block; font-size: 1rem; }
.co-house__pick small { display: block; color: var(--co-muted); font-size: .8125rem; line-height: 1.35; }
.co-house__pick.is-on { border-color: var(--tone-fg); background: var(--tone-bg); }
.co-house__busy { padding: .8rem .9rem; border-radius: 18px; background: var(--co-soft); }
.co-house__busy-title { margin-bottom: .5rem; font-weight: 700; }
.co-house__busy-title .bi { color: #946200; }
[data-bs-theme="dark"] .co-house__busy-title .bi { color: #fcd34d; }
.co-house__busy-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem; }
.co-house__busy-row .btn { min-height: 48px; padding-inline: .3rem; background: var(--co-card); font-weight: 700; }
@media (max-width: 575.98px) {
    /* On phones the choices open as a bottom sheet. */
    .co-house-sheet .modal-dialog { margin: 0; min-height: 100%; align-items: flex-end; }
    .co-house-sheet .modal-content { border: 0; border-radius: 24px 24px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
}
@media (prefers-reduced-motion: reduce) { .co-house__member { transition: none; } }

/* Alerts page: the guided "ding-dong when the phone is locked" step. */
.co-ringset.is-new { border-color: var(--co-brand); box-shadow: 0 0 0 3px var(--co-brand-soft); animation: co-ringset-in 1.4s ease-out 2; }
@keyframes co-ringset-in { 50% { box-shadow: 0 0 0 8px var(--co-brand-soft); } }
.co-ringset__tag { display: inline-block; margin-bottom: .1rem; padding: .1rem .55rem; border-radius: 999px; background: var(--co-brand-soft); color: var(--co-brand); font-size: .75rem; font-weight: 700; }
.co-ringsteps { list-style: none; counter-reset: ringstep; margin: 0; padding: 0; display: grid; gap: .75rem; }
.co-ringsteps li { counter-increment: ringstep; position: relative; padding-left: 2.4rem; display: grid; gap: .45rem; justify-items: start; }
.co-ringsteps li::before {
    content: counter(ringstep); position: absolute; left: 0; top: -.05rem; width: 1.75rem; height: 1.75rem; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center; background: var(--co-brand); color: #fff; font-size: .8125rem; font-weight: 700;
}
@media (prefers-reduced-motion: reduce) { .co-ringset.is-new { animation: none; } }

/* The request page while the visitor waits: the face pulses like a ringing bell. */
.co-visit.is-ringing .co-ring__face { animation: co-face-pulse 1.8s ease-out infinite; }
@keyframes co-face-pulse {
    0% { box-shadow: 0 0 0 0 rgba(240, 165, 15, .55); }
    70% { box-shadow: 0 0 0 18px rgba(240, 165, 15, 0); }
    100% { box-shadow: 0 0 0 0 rgba(240, 165, 15, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .co-bell, .co-bell__rings span, .co-bell__face, .co-bell__face .bi, .co-bell__tag .bi, .co-visit.is-ringing .co-ring__face { animation: none; }
    .co-bell__rings span { opacity: .3; transform: scale(1.2); }
}

@media (prefers-reduced-motion: reduce) {
    .co-urgent__tag::before { animation: none; }
    .co-ring__left, .co-type { transition: none; }
}

@media (prefers-reduced-motion: reduce) {
    .btn, .co-tile .bi, .co-quick__item, .co-result, .co-top__btn, .co-tab .bi, .co-hero__cta { transition: none; }
    .btn:active:not(:disabled), .co-quick__item:active, .co-tile:active .bi, .co-hero__cta:active { transform: none; }
    .co-progress::before, .is-busy::after { animation-duration: 2.5s; }
}

/* ════════════════════════════════════════════════════════════════════════
   Media library: upload box (forms), gallery and file list (record pages),
   full-screen viewer, upload progress. public/js/media.js
   ════════════════════════════════════════════════════════════════════════ */

/* Upload box. Without the script only the plain file field shows. */
.co-media-input { margin-bottom: 1rem; }
.co-media-drop { display: none; }
.co-media-input.is-ready .co-media-drop {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .55rem .75rem;
    padding: 1.1rem 1rem; border: 2px dashed var(--co-field); border-radius: 18px; background: var(--co-soft);
    text-align: center; cursor: pointer; transition: border-color 120ms ease, background-color 120ms ease;
}
.co-media-input.is-ready .co-media-input__native { display: none; }
.co-media-drop.is-over, .co-media-drop:focus-visible { border-color: var(--co-brand); background: var(--co-brand-soft); outline: none; }
.co-media-drop__icon { flex: 0 0 100%; font-size: 1.9rem; line-height: 1; color: var(--co-brand); }
.co-media-drop__text { flex: 0 0 100%; color: var(--co-ink); }
.co-media-drop__btns { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.co-media-drop__btns .btn { min-height: 42px; border-radius: 999px; padding-inline: 1rem; font-weight: 600; }
.co-media-drop__hint { flex: 0 0 100%; font-size: .8125rem; color: var(--co-muted); }
.co-media-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: .5rem; margin-top: .6rem; }
.co-media-list:empty { display: none; }
.co-media-chip { display: flex; align-items: center; gap: .65rem; padding: .45rem .5rem; border: 1px solid var(--co-line); border-radius: 14px; background: var(--co-card); }
.co-media-chip.is-busy { opacity: .7; }
.co-media-chip__thumb { position: relative; flex: 0 0 auto; width: 48px; height: 48px; border-radius: 10px; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; background: var(--co-soft); color: var(--co-muted); font-size: 1.3rem; }
.co-media-chip__thumb img { width: 100%; height: 100%; object-fit: cover; }
.co-media-chip__play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.4rem; text-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
.co-media-chip__text { min-width: 0; flex: 1 1 auto; display: grid; }
.co-media-chip__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .875rem; font-weight: 600; }
.co-media-chip__meta { font-size: .75rem; color: var(--co-muted); }
.co-media-chip__remove { flex: 0 0 auto; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--co-muted); }
.co-media-chip__remove:hover { background: var(--co-soft); color: #c62828; }
.co-media-errors { margin-top: .5rem; color: #c62828; font-size: .875rem; font-weight: 600; }
[data-bs-theme="dark"] .co-media-errors { color: #fca5a5; }

/* Gallery on a record page. */
.co-gallery { padding: 1rem; border: 1px solid var(--co-line); border-radius: 20px; background: var(--co-card); }
.co-gallery + .co-gallery { margin-top: 1rem; }
.co-gallery__head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .75rem; }
.co-gallery__title { display: flex; align-items: center; gap: .5rem; margin: 0; font-size: 1rem; font-weight: 700; }
.co-gallery__title > .bi { color: var(--co-brand); }
.co-gallery__count { min-width: 1.6rem; padding: .05rem .5rem; border-radius: 999px; background: var(--co-soft); color: var(--co-muted); font-size: .75rem; font-weight: 700; text-align: center; }
.co-gallery__empty { display: flex; flex-direction: column; align-items: center; gap: .45rem; padding: 1.4rem .75rem; border: 2px dashed var(--co-line); border-radius: 16px; color: var(--co-muted); text-align: center; }
.co-gallery__empty-icon { width: 52px; height: 52px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--co-brand-soft); color: var(--co-brand); font-size: 1.4rem; }
.co-gallery__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(46%, 150px), 1fr)); gap: .55rem; }
.co-mtile { position: relative; margin: 0; }
.co-mtile__open { position: relative; display: block; width: 100%; aspect-ratio: 1 / 1; padding: 0; border: 0; border-radius: 14px; overflow: hidden; background: var(--co-soft); cursor: zoom-in; }
.co-mtile__open img, .co-mtile__open video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.co-mtile__open:focus-visible { outline: 3px solid var(--co-brand); outline-offset: 2px; }
.co-mtile__play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .55); color: #fff; font-size: 1.5rem; }
.co-mtile__dur { position: absolute; right: .4rem; bottom: .4rem; padding: .05rem .4rem; border-radius: 6px; background: rgba(0, 0, 0, .65); color: #fff; font-size: .75rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.co-mtile__cover { position: absolute; left: .4rem; top: .4rem; padding: .1rem .45rem; border-radius: 999px; background: rgba(0, 0, 0, .6); color: #ffd166; font-size: .6875rem; font-weight: 700; }
.co-mtile__menu { position: absolute; right: .35rem; top: .35rem; }
.co-mtile__more { width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .5); color: #fff; }
.co-mtile figcaption { margin-top: .3rem; font-size: .8125rem; color: var(--co-muted); line-height: 1.3; overflow-wrap: anywhere; }
.co-filelist { list-style: none; margin: .25rem 0 0; padding: 0; display: grid; gap: .5rem; }
.co-gallery__grid + .co-filelist { margin-top: .9rem; }
.co-filelist__item { display: flex; align-items: center; gap: .7rem; padding: .55rem .6rem; border: 1px solid var(--co-line); border-radius: 14px; }
.co-filelist__icon { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.25rem; background: var(--co-soft); color: var(--co-muted); }
.co-filelist__icon[data-kind="pdf"] { background: #fdecec; color: #c62828; }
.co-filelist__icon[data-kind="audio"] { background: #f0ebff; color: #6a4be0; }
.co-filelist__icon[data-kind="document"] { background: #e9edfc; color: #2748db; }
[data-bs-theme="dark"] .co-filelist__icon[data-kind="pdf"] { background: rgba(220, 38, 38, .2); color: #fca5a5; }
[data-bs-theme="dark"] .co-filelist__icon[data-kind="audio"] { background: rgba(106, 75, 224, .25); color: #c4b5ff; }
[data-bs-theme="dark"] .co-filelist__icon[data-kind="document"] { background: rgba(39, 72, 219, .25); color: #a9b9ff; }
.co-filelist__body { min-width: 0; flex: 1 1 auto; display: grid; gap: .1rem; }
.co-filelist__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--co-ink); text-decoration: none; }
.co-filelist__name:hover { color: var(--co-brand); }
.co-filelist__meta { font-size: .75rem; color: var(--co-muted); }
.co-filelist__body audio { width: 100%; height: 36px; margin-top: .3rem; }

/* Full-screen viewer. */
html.co-lightbox-open { overflow: hidden; }
.co-lightbox { position: fixed; inset: 0; z-index: 2050; display: flex; flex-direction: column; background: rgba(8, 10, 16, .96); color: #fff; overscroll-behavior: contain; }
.co-lightbox__top { display: flex; align-items: center; gap: .5rem; padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 6px; }
.co-lightbox__count { font-weight: 600; font-variant-numeric: tabular-nums; opacity: .85; }
.co-lightbox__spacer { flex: 1 1 auto; }
.co-lightbox__btn { width: 44px; height: 44px; border: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .14); color: #fff; font-size: 1.15rem; text-decoration: none; }
.co-lightbox__btn:hover { background: rgba(255, 255, 255, .24); color: #fff; }
.co-lightbox__stage { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 8px 12px; touch-action: pan-y; }
.co-lightbox__stage img, .co-lightbox__stage video { max-width: 100%; max-height: 100%; border-radius: 12px; object-fit: contain; background: #000; }
.co-lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .16); color: #fff; font-size: 1.3rem; }
.co-lightbox__nav--prev { left: 12px; }
.co-lightbox__nav--next { right: 12px; }
.co-lightbox__caption { padding: 8px 16px calc(14px + env(safe-area-inset-bottom, 0px)); text-align: center; font-size: .9375rem; opacity: .9; }
@media (hover: none) { .co-lightbox__nav { display: none; } }

/* Upload progress and messages. */
.co-upload {
    position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); z-index: 2060; transform: translateX(-50%);
    width: min(92vw, 420px); padding: .8rem 1rem; border-radius: 16px; background: var(--co-ink); color: var(--co-card);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .3);
}
.co-upload__row { display: flex; align-items: center; gap: .6rem; font-weight: 600; }
.co-upload__label { flex: 1 1 auto; }
.co-upload__track { height: 6px; margin-top: .55rem; border-radius: 999px; background: rgba(255, 255, 255, .2); overflow: hidden; }
.co-upload__bar { display: block; width: 0; height: 100%; border-radius: 999px; background: #4ade80; transition: width 160ms linear; }
.co-media-toast {
    position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); z-index: 2060; transform: translateX(-50%);
    display: flex; align-items: center; gap: .5rem; max-width: min(92vw, 440px); padding: .7rem 1rem; border-radius: 14px;
    background: var(--co-ink); color: var(--co-card); font-weight: 600; box-shadow: 0 12px 30px rgba(0, 0, 0, .3); transition: opacity 400ms ease;
}
.co-media-toast .bi { color: #4ade80; }
.co-media-toast.is-bad .bi { color: #fca5a5; }
.co-media-toast.is-out { opacity: 0; }
@media (min-width: 992px) { .co-upload, .co-media-toast { bottom: 24px; } }
@media (prefers-reduced-motion: reduce) { .co-upload__bar, .co-media-drop { transition: none; } }

/* Vehicle page: cover photo, number plate, owner and facts, then photos and papers. */
.co-vehicle__hero { display: grid; gap: 1rem; padding: 1rem; border: 1px solid var(--co-line); border-radius: 22px; background: var(--co-card); }
@media (min-width: 768px) { .co-vehicle__hero { grid-template-columns: minmax(260px, 40%) 1fr; align-items: start; padding: 1.25rem; } }
.co-vehicle__media { position: relative; aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden; background: linear-gradient(135deg, var(--co-brand-soft), var(--co-soft)); }
.co-vehicle__cover { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.co-vehicle__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.co-vehicle__count { position: absolute; right: .6rem; bottom: .6rem; padding: .2rem .6rem; border-radius: 999px; background: rgba(0, 0, 0, .6); color: #fff; font-size: .8125rem; font-weight: 600; }
.co-vehicle__placeholder { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; color: var(--co-brand); }
.co-vehicle__placeholder .bi { font-size: 4.6rem; line-height: 1; opacity: .85; }
.co-vehicle__placeholder span { color: var(--co-muted); font-weight: 600; }
.co-vehicle__info { display: grid; gap: .8rem; align-content: start; min-width: 0; }
.co-vehicle__name { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.co-vehicle__tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.co-vtag { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .75rem; border-radius: 999px; background: var(--tone-bg, var(--co-soft)); color: var(--tone-fg, var(--co-ink)); font-size: .875rem; font-weight: 600; }
.co-swatch { width: 14px; height: 14px; border-radius: 50%; background: var(--swatch, conic-gradient(#d93636, #f4c430, #2e9d5b, #2f6fdf, #d93636)); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25); }
.co-vehicle__facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: .5rem; }
.co-vfact { display: flex; align-items: center; gap: .65rem; padding: .65rem .8rem; border-radius: 14px; background: var(--co-soft); min-width: 0; }
.co-vfact > .bi { flex: 0 0 auto; font-size: 1.15rem; color: var(--co-brand); }
.co-vfact__k { display: block; font-size: .75rem; color: var(--co-muted); }
.co-vfact__v { display: block; font-weight: 700; overflow-wrap: anywhere; }
.co-vfact--owner { grid-column: 1 / -1; }
.co-vfact__av { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--co-brand); color: #fff; font-weight: 800; }

/* An Indian number plate (white, black letters, blue IND strip) - always white, also in dark mode. */
.co-plate { display: inline-flex; align-items: stretch; justify-self: start; max-width: 100%; border: 2px solid #111; border-radius: 8px; background: #fff; color: #111; overflow: hidden; box-shadow: 0 2px 0 rgba(0, 0, 0, .1); }
.co-plate__ind { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0 .4rem; background: #1a4fb3; color: #fff; font-size: .55rem; font-weight: 800; letter-spacing: .04em; }
.co-plate__chakra { width: 10px; height: 10px; border-radius: 50%; border: 2px solid #fff; }
.co-plate__no { padding: .2rem .8rem; font-size: 1.5rem; font-weight: 800; letter-spacing: .08em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-plate--sm .co-plate__no { padding: .05rem .45rem; font-size: .9rem; letter-spacing: .05em; }
.co-plate--sm .co-plate__ind { padding: 0 .25rem; font-size: .45rem; }
.co-plate--sm .co-plate__chakra { width: 7px; height: 7px; border-width: 1.5px; }

/* A record's photo in lists. */
.co-listthumb { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 12px; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; background: var(--co-brand-soft); color: var(--co-brand); font-size: 1.3rem; }
.co-listthumb img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Cover pictures on notices and facilities ---------- */
.co-notice-cover, .co-card-cover { display: block; width: 100%; padding: 0; border: 0; background: var(--co-brand-soft); cursor: zoom-in; overflow: hidden; }
.co-notice-cover { border-radius: var(--co-radius-sm); margin: .25rem 0 1rem; }
.co-notice-cover img { display: block; width: 100%; max-height: 420px; object-fit: cover; }
.co-card-cover { border-radius: var(--co-radius) var(--co-radius) 0 0; }
.co-card-cover img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.co-notice-thumb { height: 160px; object-fit: cover; }
.co-notice-cover:focus-visible, .co-card-cover:focus-visible { outline: 3px solid var(--co-brand); outline-offset: 2px; }
/* A gallery inside a card uses the card's own frame. */
.card .co-gallery { padding: 0; border: 0; border-radius: 0; background: none; }

/* ---------- Society Buzz: rooms page ---------- */
.co-buzz { display: flex; flex-direction: column; gap: 1rem; padding-bottom: 1rem; }
.co-buzz-h { display: flex; align-items: center; gap: .45rem; font-size: 1rem; font-weight: 700; color: var(--co-ink); margin: 0 0 .6rem; }
.co-buzz-h .bi { color: var(--co-brand-ink); }

.co-buzz-today { padding: 1rem; border-radius: 20px; background: linear-gradient(135deg, rgba(var(--co-brand-rgb), .08), rgba(var(--co-brand-rgb), .02)); border: 1px solid var(--co-note-line); }
.co-buzz-today__list { display: flex; flex-direction: column; gap: .5rem; }
.co-buzz-today__item { display: flex; align-items: center; gap: .75rem; padding: .6rem .7rem; border-radius: 14px; background: var(--co-card); color: var(--co-ink); text-decoration: none; box-shadow: 0 1px 2px rgba(18, 25, 39, .05); }
.co-buzz-today__icon { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--tone-bg); color: var(--tone-fg); font-size: 1.1rem; }
.co-buzz-today__title { display: block; font-weight: 650; font-size: .95rem; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-buzz-today__meta { display: block; font-size: .8rem; color: var(--co-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.co-buzz-ask__form { display: flex; align-items: center; gap: .5rem; padding: .35rem .35rem .35rem .45rem; border-radius: 999px; background: var(--co-card); border: 1.5px solid var(--co-field); box-shadow: var(--co-shadow); }
.co-buzz-ask__form:focus-within { border-color: var(--co-brand); }
.co-buzz-ask__bot { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--co-brand); color: #fff; font-size: 1.05rem; }
.co-buzz-ask__input { flex: 1 1 auto; min-width: 0; border: 0; background: transparent; color: var(--co-ink); font-size: 16px; padding: .35rem .2rem; outline: none; }
.co-buzz-ask__input::-webkit-search-cancel-button { display: none; }
.co-buzz-ask__go { flex: 0 0 auto; width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--co-brand-soft); color: var(--co-brand-ink); font-size: 1.1rem; }
.co-buzz-ask__note { margin: .45rem .25rem 0; font-size: .75rem; color: var(--co-faint); }
.co-buzz-chips { display: flex; gap: .4rem; overflow-x: auto; padding: .6rem .1rem .1rem; scrollbar-width: none; }
.co-buzz-chips::-webkit-scrollbar { display: none; }
.co-buzz-chip { flex: 0 0 auto; display: inline-flex; align-items: center; gap: .3rem; border: 1px solid var(--co-line); background: var(--co-card); color: var(--co-ink); border-radius: 999px; padding: .4rem .75rem; font-size: .85rem; font-weight: 550; text-decoration: none; white-space: nowrap; touch-action: manipulation; }
.co-buzz-chip .bi { color: var(--co-brand-ink); }
.co-buzz-chip--go { background: var(--co-brand); border-color: var(--co-brand); color: #fff; }
.co-buzz-chip--go .bi { color: #fff; }

.co-buzz-answer { margin-top: .75rem; display: flex; flex-direction: column; gap: .5rem; }
.co-buzz-answer__q { align-self: flex-end; max-width: 85%; }
.co-buzz-answer__q span { display: inline-block; padding: .5rem .8rem; border-radius: 18px 18px 4px 18px; background: var(--co-brand); color: #fff; font-size: .95rem; }
.co-buzz-answer__bot { display: flex; align-items: flex-start; gap: .5rem; }
.co-buzz-answer__avatar { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--co-brand-soft); color: var(--co-brand-ink); }
.co-buzz-answer__body { flex: 1 1 auto; min-width: 0; padding: .65rem .8rem; border-radius: 4px 18px 18px 18px; background: var(--co-card); border: 1px solid var(--co-line); }
.co-buzz-answer__text { font-size: .95rem; color: var(--co-ink); }
.co-buzz-answer__items { display: flex; flex-direction: column; gap: .4rem; margin-top: .55rem; }
.co-buzz-answer__item { display: flex; align-items: center; gap: .6rem; padding: .5rem .55rem; border-radius: 12px; background: var(--co-soft); color: var(--co-ink); text-decoration: none; }
.co-buzz-answer__icon { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--tone-bg); color: var(--tone-fg); }
.co-buzz-answer__title { display: block; font-weight: 650; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-buzz-answer__meta { display: block; font-size: .78rem; color: var(--co-muted); }
.co-buzz-answer__actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.co-typing { display: inline-flex; gap: 4px; padding: .7rem .8rem; border-radius: 4px 18px 18px 18px; background: var(--co-card); border: 1px solid var(--co-line); }
.co-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--co-faint); animation: co-typing 1s infinite ease-in-out; }
.co-typing i:nth-child(2) { animation-delay: .15s; }
.co-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes co-typing { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.co-buzz-rooms__head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .6rem; }
.co-buzz-rooms { display: flex; flex-direction: column; border-radius: 20px; background: var(--co-card); border: 1px solid var(--co-line); overflow: hidden; }
.co-buzz-room { display: flex; align-items: center; gap: .8rem; padding: .8rem .9rem; color: var(--co-ink); text-decoration: none; border-bottom: 1px solid var(--co-line); touch-action: manipulation; }
.co-buzz-room:last-child { border-bottom: 0; }
.co-buzz-room:active { background: var(--co-soft); }
@media (hover: hover) and (pointer: fine) { .co-buzz-room:hover { background: var(--co-soft); } }
.co-buzz-room__icon { flex: 0 0 auto; width: 48px; height: 48px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; background: var(--tone-bg); color: var(--tone-fg); font-size: 1.35rem; }
.co-buzz-room__icon--sm { width: 30px; height: 30px; border-radius: 10px; font-size: .95rem; }
.co-buzz-room__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.co-buzz-room__top, .co-buzz-room__bottom { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.co-buzz-room__name { flex: 1 1 auto; min-width: 0; font-weight: 700; font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-buzz-room__time { flex: 0 0 auto; font-size: .75rem; color: var(--co-muted); }
.co-buzz-room__preview { flex: 1 1 auto; min-width: 0; font-size: .87rem; color: var(--co-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-buzz-room.is-unread .co-buzz-room__preview { color: var(--co-ink); font-weight: 550; }
.co-buzz-room.is-unread .co-buzz-room__time { color: var(--co-brand-ink); font-weight: 650; }
.co-buzz-room__badge { flex: 0 0 auto; min-width: 22px; height: 22px; padding: 0 .4rem; border-radius: 999px; background: var(--co-brand); color: #fff; font-size: .75rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.co-buzz-room__at { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; background: var(--co-red); color: #fff; font-size: .78rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.co-buzz-room__muted { color: var(--co-faint); }
.co-buzz-room__tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .1rem; }
.co-buzz-tag { font-size: .7rem; font-weight: 600; color: var(--co-muted); background: var(--co-soft); border-radius: 999px; padding: .1rem .5rem; }
.co-buzz-foot { font-size: .78rem; color: var(--co-faint); text-align: center; margin: .25rem .5rem 0; }

/* ---------- Society Buzz: a room ---------- */
/* Bars and boxes below are shown and hidden with the hidden attribute; their own display must not undo it. */
.co-chat [hidden], .co-composer [hidden], .co-buzz [hidden], .co-chat__jump[hidden] { display: none !important; }
.co-chat { padding-bottom: calc(var(--bz-composer-h, 76px) + 12px); }
.co-chat__head { display: flex; align-items: center; gap: .6rem; padding: .55rem .7rem; margin-bottom: .75rem; border-radius: 16px; background: var(--co-card); border: 1px solid var(--co-line); }
.co-chat__icon { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; background: var(--tone-bg); color: var(--tone-fg); }
.co-chat__about { flex: 1 1 auto; min-width: 0; font-size: .82rem; color: var(--co-muted); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.co-chat__bell { flex: 0 0 auto; display: inline-flex; align-items: center; gap: .3rem; border: 1px solid var(--co-line); background: var(--co-card); color: var(--co-ink); border-radius: 999px; padding: .3rem .65rem; font-size: .8rem; font-weight: 600; }
.co-chat__bell .bi { color: var(--co-brand-ink); }
.co-chat__more { text-align: center; margin: .25rem 0 .75rem; }
.co-chat__list, .co-chat__pending { display: flex; flex-direction: column; gap: .2rem; }
.co-chat__day { display: flex; justify-content: center; margin: .9rem 0 .5rem; }
.co-chat__day span { font-size: .72rem; font-weight: 650; color: var(--co-muted); background: var(--co-soft); border-radius: 999px; padding: .2rem .7rem; }
.co-chat__unread { display: flex; align-items: center; gap: .6rem; margin: .7rem 0 .4rem; color: var(--co-brand-ink); font-size: .75rem; font-weight: 700; }
.co-chat__unread::before, .co-chat__unread::after { content: ""; flex: 1; height: 1px; background: rgba(var(--co-brand-rgb), .35); }
.co-chat__empty { text-align: center; color: var(--co-muted); padding: 3rem 1rem; }
.co-chat__empty .bi { font-size: 2rem; color: var(--co-faint); }
.co-chat__jump { position: fixed; right: 16px; bottom: calc(var(--bz-composer-h, 76px) + 14px); z-index: 1031; border: 0; border-radius: 999px; padding: .45rem .9rem; background: var(--co-brand); color: #fff; font-size: .85rem; font-weight: 650; box-shadow: var(--co-shadow-lg); }

.co-msg { display: flex; align-items: flex-end; gap: .45rem; max-width: 100%; margin-top: .45rem; scroll-margin: 80px; }
.co-msg.is-cont { margin-top: .12rem; }
.co-msg.is-mine { flex-direction: row-reverse; }
.co-msg__avatar { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--tone-bg); color: var(--tone-fg); font-size: .75rem; font-weight: 750; letter-spacing: .02em; }
.co-msg__avatar.is-blank { visibility: hidden; }
.co-msg__col { display: flex; flex-direction: column; min-width: 0; max-width: min(78%, 520px); }
.co-msg.is-mine .co-msg__col { align-items: flex-end; }
.co-msg.is-bot .co-msg__col { max-width: min(92%, 560px); }
.co-msg__bubble { position: relative; padding: .45rem .7rem .35rem; border-radius: 18px 18px 18px 6px; background: var(--co-card); border: 1px solid var(--co-line); color: var(--co-ink); cursor: pointer; -webkit-touch-callout: none; overflow-wrap: anywhere; }
.co-msg.is-cont .co-msg__bubble { border-radius: 6px 18px 18px 6px; }
.co-msg.is-mine .co-msg__bubble { background: var(--co-brand); border-color: var(--co-brand); color: #fff; border-radius: 18px 18px 6px 18px; }
.co-msg.is-mine.is-cont .co-msg__bubble { border-radius: 18px 6px 6px 18px; }
.co-msg.is-mention:not(.is-mine) .co-msg__bubble { box-shadow: inset 3px 0 0 var(--co-red); }
.co-msg.is-pending .co-msg__bubble { opacity: .7; }
.co-msg.is-failed .co-msg__bubble { background: var(--co-bad-bg); border-color: var(--co-bad); color: var(--co-ink); }
.co-msg.is-flash .co-msg__bubble, .co-msg.is-flash .co-botcard { animation: co-flash 1.4s ease-out; }
@keyframes co-flash { 0%, 30% { box-shadow: 0 0 0 4px rgba(var(--co-brand-rgb), .35); } 100% { box-shadow: 0 0 0 0 rgba(var(--co-brand-rgb), 0); } }
.co-msg__who { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .4rem; margin-bottom: .1rem; }
.co-msg__name { font-size: .8rem; font-weight: 750; color: var(--tone-fg); }
.co-msg__flat { font-size: .72rem; color: var(--co-muted); }
.co-msg__badge { font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #6a4be0; background: #f0ebff; border-radius: 999px; padding: .05rem .4rem; }
.co-msg__text { font-size: .95rem; line-height: 1.4; white-space: pre-wrap; }
.co-msg__text a { color: inherit; text-decoration: underline; }
.co-msg__mention { font-weight: 700; color: var(--co-brand-ink); }
.co-msg.is-mine .co-msg__mention { color: #fff; text-decoration: underline; text-decoration-thickness: 1px; }
.co-msg__meta { display: block; text-align: right; font-size: .68rem; margin-top: .1rem; color: var(--co-faint); white-space: nowrap; }
.co-msg.is-mine .co-msg__meta { color: rgba(255, 255, 255, .78); }
.co-msg__failed { color: var(--co-bad); font-weight: 650; }
.co-msg__reported { color: var(--co-bad); }
.co-msg__gone { font-size: .9rem; font-style: italic; color: var(--co-muted); }
.co-msg.is-mine .co-msg__gone { color: rgba(255, 255, 255, .85); }
.co-msg.is-removed .co-msg__bubble { background: var(--co-soft); border-color: var(--co-line); color: var(--co-muted); }
.co-msg.is-mine.is-removed .co-msg__meta { color: var(--co-faint); }
.co-msg__quote { display: block; width: 100%; text-align: left; border: 0; border-left: 3px solid var(--co-brand); background: rgba(var(--co-brand-rgb), .07); color: inherit; border-radius: 8px; padding: .3rem .5rem; margin: .1rem 0 .3rem; font-size: .82rem; }
.co-msg.is-mine .co-msg__quote { border-left-color: #fff; background: rgba(255, 255, 255, .16); }
.co-msg__quote strong { display: block; font-size: .75rem; }
.co-msg__quote span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .85; }
.co-msg__files { margin: .15rem -.4rem .3rem; }
.co-msg__grid { display: grid; gap: 3px; border-radius: 14px; overflow: hidden; }
.co-msg__grid--1 { grid-template-columns: 1fr; }
.co-msg__grid--2, .co-msg__grid--4 { grid-template-columns: 1fr 1fr; }
.co-msg__grid--3 { grid-template-columns: 1fr 1fr; }
.co-msg__grid--3 .co-msg__photo:first-child { grid-column: 1 / -1; }
.co-msg__photo { position: relative; display: block; width: 100%; padding: 0; border: 0; background: var(--co-soft); aspect-ratio: 1 / 1; overflow: hidden; cursor: zoom-in; }
.co-msg__grid--1 .co-msg__photo { aspect-ratio: 4 / 3; max-height: 340px; min-width: 200px; }
.co-msg__grid--3 .co-msg__photo:first-child { aspect-ratio: 16 / 9; }
.co-msg__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.co-msg__photo.is-video { background: #111; cursor: pointer; }
.co-msg__play { position: absolute; inset: 0; margin: auto; width: 46px; height: 46px; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; }
.co-msg__dur { position: absolute; right: 6px; bottom: 6px; font-size: .7rem; font-weight: 700; color: #fff; background: rgba(0, 0, 0, .55); border-radius: 6px; padding: .05rem .35rem; }
.co-msg__doc { display: flex; align-items: center; gap: .5rem; margin: 0 .4rem; padding: .5rem .6rem; border-radius: 12px; background: rgba(var(--co-brand-rgb), .07); color: inherit; text-decoration: none; }
.co-msg.is-mine .co-msg__doc { background: rgba(255, 255, 255, .16); }
.co-msg__doc .bi { font-size: 1.4rem; color: #d93025; }
.co-msg.is-mine .co-msg__doc .bi { color: #fff; }
.co-msg__docname { flex: 1 1 auto; min-width: 0; font-weight: 600; font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-msg__docsize { flex: 0 0 auto; font-size: .72rem; opacity: .75; }
.co-msg__expired { font-size: .8rem; font-style: italic; opacity: .75; margin: .1rem 0 .2rem; }
.co-msg__reacts { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: -.3rem; padding: 0 .4rem; position: relative; z-index: 1; }
.co-react { border: 1px solid var(--co-line); background: var(--co-card); color: var(--co-ink); border-radius: 999px; padding: .05rem .45rem; font-size: .8rem; line-height: 1.5; box-shadow: 0 1px 2px rgba(18, 25, 39, .06); touch-action: manipulation; }
.co-react.is-mine { border-color: var(--co-brand); background: var(--co-brand-soft); color: var(--co-brand-ink); font-weight: 650; }

.co-botcard { width: 100%; padding: .75rem .85rem; border-radius: 18px; background: var(--co-card); border: 1px solid var(--co-line); box-shadow: inset 4px 0 0 #f08a24; cursor: pointer; }
.co-botcard__top { display: flex; align-items: center; gap: .45rem; margin-bottom: .35rem; }
.co-botcard__icon { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: #fff0e5; color: #c2550a; }
.co-botcard__label { font-size: .75rem; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; color: #c2550a; }
.co-botcard__by { margin-left: auto; font-size: .7rem; color: var(--co-faint); white-space: nowrap; }
.co-botcard__title { font-weight: 700; font-size: 1rem; color: var(--co-ink); }
.co-botcard__text { font-size: .88rem; color: var(--co-muted); margin-top: .15rem; }
.co-botcard__go { display: inline-flex; align-items: center; gap: .3rem; margin-top: .5rem; font-weight: 650; font-size: .88rem; color: var(--co-brand-ink); text-decoration: none; }

/* The message box: fixed at the bottom, above the keyboard and the phone's gesture bar. */
.co-composer { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; padding: .5rem .75rem calc(.5rem + var(--co-safe-b)); background: var(--co-top-bg); border-top: 1px solid var(--co-line); transition: transform .12s ease-out; }
.co-composer__in { position: relative; max-width: 38rem; margin: 0 auto; }
.co-composer__row { display: flex; align-items: flex-end; gap: .45rem; }
.co-composer__btn, .co-composer__send { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; border: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 1.2rem; touch-action: manipulation; }
.co-composer__btn { background: var(--co-soft); color: var(--co-ink); }
.co-composer__send { background: var(--co-brand); color: #fff; }
.co-composer__send:disabled { background: var(--co-soft); color: var(--co-faint); }
.co-composer__btn:active, .co-composer__send:not(:disabled):active { transform: scale(.94); }
.co-composer__text { flex: 1 1 auto; min-width: 0; resize: none; max-height: 140px; overflow-y: hidden; border: 1.5px solid var(--co-field); border-radius: 22px; padding: .6rem .9rem; font-size: 16px; line-height: 1.35; background: var(--co-card); color: var(--co-ink); outline: none; }
.co-composer__text:focus { border-color: var(--co-brand); }
.co-composer__readonly { text-align: center; font-size: .88rem; color: var(--co-muted); padding: .6rem; }
.co-composer__bar, .co-composer__hint { display: flex; align-items: center; gap: .5rem; padding: .45rem .6rem; margin-bottom: .45rem; border-radius: 14px; background: var(--co-soft); font-size: .85rem; }
.co-composer__bar { border-left: 3px solid var(--co-brand); }
.co-composer__barico, .co-composer__hintico { color: var(--co-brand-ink); }
.co-composer__hint { background: var(--co-warn-bg); color: var(--co-ink); }
.co-composer__hint a { font-weight: 700; color: var(--co-brand-ink); }
.co-composer__bartext { flex: 1 1 auto; min-width: 0; }
.co-composer__bartext strong { display: block; font-size: .78rem; }
.co-composer__bartext span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--co-muted); }
.co-composer__x { flex: 0 0 auto; border: 0; background: transparent; color: var(--co-muted); width: 30px; height: 30px; border-radius: 50%; margin-left: auto; }
.co-composer__files { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .45rem; }
.co-composer__file { position: relative; flex: 0 0 auto; width: 64px; height: 64px; border-radius: 12px; overflow: hidden; background: var(--co-soft); display: flex; align-items: center; justify-content: center; }
.co-composer__file img { width: 100%; height: 100%; object-fit: cover; }
.co-composer__file.is-busy::after { content: ""; position: absolute; inset: 0; background: rgba(255, 255, 255, .55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='9' fill='none' stroke='%232748db' stroke-width='3' stroke-dasharray='40 20'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 11 11' to='360 11 11' dur='0.9s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/svg%3E") center no-repeat; }
.co-composer__fileico { font-size: 1.6rem; color: var(--co-muted); }
.co-composer__filetag { position: absolute; left: 4px; bottom: 4px; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.co-composer__filename { position: absolute; left: 4px; right: 4px; bottom: 3px; font-size: .6rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-composer__fileremove { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .6); color: #fff; font-size: .8rem; display: flex; align-items: center; justify-content: center; padding: 0; }
.co-mention { position: absolute; left: 0; right: 0; bottom: calc(100% + .4rem); max-height: 260px; overflow-y: auto; background: var(--co-card); border: 1px solid var(--co-line); border-radius: 16px; box-shadow: var(--co-shadow-lg); padding: .3rem; }
.co-mention__item { display: flex; align-items: center; gap: .55rem; width: 100%; border: 0; background: transparent; color: var(--co-ink); padding: .45rem .5rem; border-radius: 12px; text-align: left; }
.co-mention__item:active, .co-mention__item:focus-visible { background: var(--co-soft); }
@media (hover: hover) and (pointer: fine) { .co-mention__item:hover { background: var(--co-soft); } }
.co-mention__name { font-weight: 650; }
.co-mention__flat { margin-left: auto; font-size: .78rem; color: var(--co-muted); }

/* Tap a message: react, reply, copy, edit, delete, report. */
.co-sheet { position: fixed; inset: 0; z-index: 1060; }
.co-sheet__backdrop { position: absolute; inset: 0; background: rgba(10, 14, 25, .45); opacity: 0; transition: opacity .18s ease-out; }
.co-sheet__panel { position: absolute; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto; background: var(--co-card); border-radius: 22px 22px 0 0; padding: .9rem .9rem calc(.9rem + var(--co-safe-b)); transform: translateY(100%); transition: transform .2s cubic-bezier(.2, .8, .2, 1); overscroll-behavior: contain; }
.co-sheet.is-open .co-sheet__backdrop { opacity: 1; }
.co-sheet.is-open .co-sheet__panel { transform: translateY(0); }
.co-sheet__emoji { display: flex; justify-content: space-between; gap: .3rem; padding: .2rem .1rem .7rem; border-bottom: 1px solid var(--co-line); margin-bottom: .4rem; }
.co-sheet__emo { flex: 1 1 0; border: 0; background: var(--co-soft); border-radius: 14px; font-size: 1.5rem; padding: .35rem 0; touch-action: manipulation; }
.co-sheet__emo.is-mine { background: var(--co-brand-soft); box-shadow: inset 0 0 0 2px var(--co-brand); }
.co-sheet__emo:active { transform: scale(.92); }
.co-sheet__item { display: flex; align-items: center; gap: .6rem; width: 100%; border: 0; background: transparent; color: var(--co-ink); padding: .8rem .5rem; border-radius: 12px; font-size: 1rem; font-weight: 550; text-align: left; }
.co-sheet__item .bi { font-size: 1.15rem; color: var(--co-muted); }
.co-sheet__item.is-danger, .co-sheet__item.is-danger .bi { color: var(--co-bad); }
.co-sheet__item:active { background: var(--co-soft); }
.co-sheet__cancel { width: 100%; margin-top: .35rem; border: 0; border-radius: 14px; background: var(--co-soft); color: var(--co-ink); padding: .75rem; font-weight: 650; }
@media (prefers-reduced-motion: reduce) {
    .co-sheet__panel, .co-sheet__backdrop, .co-composer { transition: none; }
    .co-typing i, .co-msg.is-flash .co-msg__bubble { animation: none; }
}

/* ---------- Insights & Alerts ---------- */
.co-pills { gap: .4rem; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.co-pills::-webkit-scrollbar { display: none; }
.co-pills .nav-link { white-space: nowrap; border-radius: 999px; border: 1px solid var(--co-line); background: var(--co-card); color: var(--co-ink); font-weight: 600; font-size: .9rem; padding: .45rem .9rem; }
.co-pills .nav-link.active { background: var(--co-brand); border-color: var(--co-brand); color: #fff; }
.co-subtabs { gap: .25rem; border-bottom: 1px solid var(--co-line); }
.co-subtabs .nav-link { color: var(--co-muted); font-weight: 600; border-bottom: 2.5px solid transparent; border-radius: 0; padding: .5rem .75rem; }
.co-subtabs .nav-link.active { color: var(--co-ink); border-bottom-color: var(--co-brand); }
.co-ichip { display: inline-flex; align-items: center; gap: .25rem; font-size: .74rem; font-weight: 650; line-height: 1.6; padding: 0 .5rem; border-radius: 999px; background: var(--tone-bg, var(--co-soft)); color: var(--tone-fg, var(--co-ink)); white-space: nowrap; }

.co-rank .card-body { padding: 1rem; }
.co-rank__head { display: flex; align-items: flex-start; gap: .7rem; margin-bottom: .6rem; }
.co-rank__icon { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; background: var(--tone-bg); color: var(--tone-fg); font-size: 1.15rem; }
.co-rank__count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 .4rem; margin-left: .35rem; border-radius: 999px; background: var(--tone-bg); color: var(--tone-fg); font-size: .75rem; vertical-align: middle; }
.co-rank__row { display: flex; gap: .7rem; padding: .7rem 0; border-top: 1px solid var(--co-line); }
.co-rank__n { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--co-soft); color: var(--co-muted); font-weight: 750; font-size: .85rem; }
.co-rank__n.is-top { background: var(--tone-fg); color: #fff; }
.co-rank__body { flex: 1 1 auto; min-width: 0; }
.co-rank__title { font-weight: 700; color: var(--co-ink); }
.co-rank__title a { color: inherit; text-decoration: none; }
.co-rank__title a:hover { text-decoration: underline; }
.co-rank__sub { font-size: .8rem; color: var(--co-muted); }
.co-rank__badges { display: flex; flex-wrap: wrap; gap: .3rem; margin: .35rem 0 .3rem; }
.co-rank__why { font-size: .85rem; color: var(--co-ink); }
.co-rank__bar { height: 6px; border-radius: 999px; background: var(--co-soft); margin: .45rem 0 0; overflow: hidden; }
.co-rank__bar span { display: block; height: 100%; border-radius: 999px; background: var(--tone-fg); }
.co-rank__actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.co-rank__empty { padding: .8rem 0 .2rem; color: var(--co-muted); font-size: .9rem; border-top: 1px solid var(--co-line); }
.co-rank__empty .bi { color: var(--co-ok); }

.co-alertstrip { padding: .9rem; border-radius: 18px; background: var(--co-bad-bg); border: 1px solid rgba(198, 40, 40, .2); }
.co-alert { position: relative; display: flex; gap: .7rem; padding: .85rem; margin-bottom: .6rem; border-radius: 16px; background: var(--co-card); border: 1px solid var(--co-line); box-shadow: inset 4px 0 0 var(--tone-fg); }
.co-alert.is-compact { padding: .6rem .75rem; margin-bottom: .45rem; }
.co-alert.is-closed { opacity: .72; box-shadow: none; }
.co-alert__icon { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--tone-bg); color: var(--tone-fg); font-size: 1.1rem; }
.co-alert.is-compact .co-alert__icon { width: 32px; height: 32px; font-size: .95rem; }
.co-alert__body { flex: 1 1 auto; min-width: 0; }
.co-alert__top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.co-alert__when { font-size: .74rem; color: var(--co-muted); white-space: nowrap; }
.co-alert__title { font-weight: 700; color: var(--co-ink); margin-top: .15rem; }
.co-alert.is-compact .co-alert__title { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-alert__detail { font-size: .88rem; color: var(--co-muted); margin-top: .2rem; }
.co-alert__closed { font-size: .82rem; color: var(--co-ok); margin-top: .4rem; }
.co-alert__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin-top: .6rem; }
.co-alert__form { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; flex: 1 1 280px; }
.co-alert__form .form-control { flex: 1 1 180px; min-width: 0; }

.co-log { border-radius: 18px; background: var(--co-card); border: 1px solid var(--co-line); padding: .25rem .9rem .5rem; }
.co-log__day { position: sticky; top: 0; z-index: 1; margin: 0 -.9rem; padding: .55rem .9rem .35rem; font-size: .75rem; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; color: var(--co-muted); background: var(--co-card); border-bottom: 1px solid var(--co-line); }
.co-log__row { display: flex; gap: .65rem; padding: .7rem 0; border-bottom: 1px solid var(--co-line); }
.co-log__row:last-child { border-bottom: 0; }
.co-log__icon { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--tone-bg); color: var(--tone-fg); }
.co-log__body { flex: 1 1 auto; min-width: 0; font-size: .92rem; }
.co-log__line a { color: var(--co-ink); }
.co-log__changes { list-style: none; padding: 0; margin: .3rem 0 0; font-size: .82rem; }
.co-log__changes li { padding: .1rem 0; overflow-wrap: anywhere; }
.co-log__field { font-weight: 650; color: var(--co-muted); }
.co-log__old { text-decoration: line-through; color: var(--co-bad); }
.co-log__new { color: var(--co-ok); font-weight: 600; }
.co-log__meta { font-size: .74rem; color: var(--co-faint); margin-top: .2rem; }

/* Reports: what the numbers say. */
.co-findings { display: flex; flex-direction: column; gap: .45rem; }
.co-finding { display: flex; gap: .6rem; align-items: flex-start; padding: .65rem .8rem; border-radius: 14px; background: var(--tone-bg); color: var(--co-ink); }
.co-finding .bi { color: var(--tone-fg); font-size: 1.1rem; margin-top: .05rem; }
.co-report-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .75rem; }
.co-report-card { display: flex; gap: .75rem; padding: .9rem; border-radius: 18px; background: var(--co-card); border: 1px solid var(--co-line); color: var(--co-ink); text-decoration: none; }
.co-report-card:hover { border-color: var(--co-brand); }
.co-report-card__icon { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; background: var(--tone-bg); color: var(--tone-fg); font-size: 1.25rem; }
.co-report-card__title { font-weight: 700; }
.co-report-card__text { font-size: .84rem; color: var(--co-muted); }
@media print { .co-findings .co-finding { border: 1px solid #ccc; background: #fff; } }

/* ── Platform console (Super Admin) ──────────────────────────────────────
   Command Centre, Societies + Society 360, People, Billing, Announcements,
   Audit & Security, System Health. Same tokens and tones as the rest. */
.pc-hero { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .9rem; padding: 1.1rem 1.2rem; margin-bottom: 1rem; border-radius: 20px; background: linear-gradient(135deg, rgba(var(--co-brand-rgb), .10), rgba(var(--co-brand-rgb), .02)); border: 1px solid var(--co-note-line); }
.pc-hero__hello { font-size: 1.15rem; font-weight: 750; color: var(--co-ink); letter-spacing: -.01em; }
.pc-hero__sub { font-size: .875rem; color: var(--co-muted); margin-top: .15rem; }
.pc-hero__actions { display: flex; flex-wrap: wrap; gap: .45rem; }
.pc-sys { display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .8rem; border-radius: 999px; font-size: .8125rem; font-weight: 650; background: var(--tone-bg); color: var(--tone-fg); text-decoration: none; }
.pc-sys::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; }

.pc-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.pc-kpi { position: relative; display: flex; flex-direction: column; gap: .2rem; padding: .95rem 1rem; border-radius: 18px; background: var(--co-card); border: 1px solid var(--co-line); box-shadow: var(--co-shadow); color: var(--co-ink); text-decoration: none; min-width: 0; }
.pc-kpi__top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.pc-kpi__label { font-size: .8rem; font-weight: 600; color: var(--co-muted); }
.pc-kpi__icon { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; background: var(--tone-bg); color: var(--tone-fg); }
.pc-kpi__value { font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pc-kpi__sub { font-size: .78rem; color: var(--co-muted); }
.pc-delta { display: inline-flex; align-items: center; gap: .15rem; font-size: .74rem; font-weight: 700; padding: 0 .4rem; border-radius: 999px; }
.pc-delta.is-up { color: var(--co-ok); background: var(--co-ok-bg); }
.pc-delta.is-down { color: var(--co-bad); background: var(--co-bad-bg); }
.pc-delta.is-flat { color: var(--co-muted); background: var(--co-soft); }

.pc-panel { border-radius: 18px; background: var(--co-card); border: 1px solid var(--co-line); box-shadow: var(--co-shadow); padding: 1rem; min-width: 0; }
.row > * > .pc-panel:only-child { height: 100%; }
.pc-panel__head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .75rem; }
.pc-panel__title { margin: 0; font-size: 1rem; font-weight: 700; color: var(--co-ink); }
.pc-panel__title small { font-weight: 500; color: var(--co-muted); font-size: .8rem; margin-left: .25rem; }
.pc-panel__link { font-size: .8125rem; font-weight: 600; white-space: nowrap; }
.pc-chart { position: relative; height: 240px; }
.pc-chart--sm { height: 190px; }

.pc-attn { display: flex; flex-direction: column; gap: .45rem; max-height: 420px; overflow-y: auto; overscroll-behavior: contain; }
.pc-attn__item { display: flex; align-items: flex-start; gap: .65rem; padding: .65rem .75rem; border-radius: 14px; background: var(--co-card); border: 1px solid var(--co-line); box-shadow: inset 4px 0 0 var(--tone-fg); color: var(--co-ink); text-decoration: none; }
.pc-attn__icon { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--tone-bg); color: var(--tone-fg); }
.pc-attn__title { font-weight: 650; font-size: .9rem; }
.pc-attn__detail { font-size: .8rem; color: var(--co-muted); }
.pc-attn__go { margin-left: auto; color: var(--co-faint); align-self: center; }
.pc-empty { padding: 1rem; text-align: center; color: var(--co-muted); font-size: .9rem; border-radius: 14px; background: var(--co-soft); }
.pc-empty .bi { color: var(--co-ok); }

.pc-mix { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--co-soft); margin: .25rem 0 .6rem; }
.pc-mix > span { display: block; height: 100%; background: var(--tone-fg); }
.pc-legend { display: flex; flex-wrap: wrap; gap: .35rem .9rem; font-size: .8rem; color: var(--co-muted); }
.pc-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.pc-legend i { width: .6rem; height: .6rem; border-radius: 50%; background: var(--tone-fg); }

.pc-score { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: .9rem; color: var(--tone-fg); background: conic-gradient(var(--tone-fg) calc(var(--score, 0) * 1%), var(--co-soft) 0); position: relative; font-variant-numeric: tabular-nums; }
.pc-score::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--co-card); }
.pc-score > b { position: relative; }
.pc-score--lg { width: 76px; height: 76px; font-size: 1.35rem; }
.pc-score--lg::before { inset: 7px; }
.pc-tag { display: inline-flex; align-items: center; gap: .3rem; padding: .1rem .55rem; border-radius: 999px; font-size: .74rem; font-weight: 700; background: var(--tone-bg); color: var(--tone-fg); white-space: nowrap; }

.pc-list { display: flex; flex-direction: column; border-radius: 18px; background: var(--co-card); border: 1px solid var(--co-line); overflow: hidden; }
.pc-row { display: grid; grid-template-columns: minmax(0, 2.3fr) minmax(0, 1.2fr) minmax(0, 1.3fr) minmax(0, 1fr) var(--pc-act, 112px); align-items: center; gap: .9rem; padding: .8rem 1rem; border-bottom: 1px solid var(--co-line); color: var(--co-ink); }
.pc-row:last-child { border-bottom: 0; }
.pc-row--head { padding-top: .55rem; padding-bottom: .55rem; background: var(--co-soft); font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--co-muted); }
.pc-row--people { grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) minmax(0, 1.4fr) minmax(0, 1fr) var(--pc-act, 112px); }
.pc-row--invoice { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) var(--pc-act, 112px); }
.pc-row__main { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.pc-row__name { font-weight: 700; color: var(--co-ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.pc-row__meta { font-size: .78rem; color: var(--co-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-row__num { font-weight: 700; font-variant-numeric: tabular-nums; }
.pc-row--invoice .pc-row__meta { white-space: normal; }
.pc-row__actions { display: flex; flex-wrap: wrap; gap: .35rem; justify-content: flex-end; }
@media (max-width: 991.98px) {
    .pc-row, .pc-row--people, .pc-row--invoice { grid-template-columns: minmax(0, 1fr); gap: .45rem; }
    .pc-row--head { display: none; }
    .pc-row > .pc-row__cell { display: flex; justify-content: space-between; align-items: center; gap: .5rem; font-size: .85rem; }
    .pc-row > .pc-row__cell::before { content: attr(data-label); color: var(--co-muted); font-weight: 600; }
    .pc-row__actions { justify-content: flex-start; }
}

.pc-filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .9rem; }
.pc-filters .form-control, .pc-filters .form-select { flex: 1 1 150px; min-width: 0; max-width: 240px; }
.pc-filters .pc-filters__q { flex: 2 1 220px; max-width: 360px; }
.pc-counts { display: flex; flex-wrap: nowrap; gap: .4rem; overflow-x: auto; scrollbar-width: none; margin-bottom: .8rem; padding-bottom: 2px; }
.pc-counts::-webkit-scrollbar { display: none; }
.pc-count { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .85rem; border-radius: 999px; border: 1px solid var(--co-line); background: var(--co-card); color: var(--co-ink); font-weight: 600; font-size: .875rem; white-space: nowrap; text-decoration: none; touch-action: manipulation; }
.pc-count b { font-variant-numeric: tabular-nums; }
.pc-count.is-active { background: var(--co-brand); border-color: var(--co-brand); color: #fff; }

/* Society 360 */
.pc-360 { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; padding: 1.1rem 1.2rem; border-radius: 20px; background: var(--co-card); border: 1px solid var(--co-line); box-shadow: var(--co-shadow); margin-bottom: 1rem; }
.pc-360__id { display: flex; gap: .9rem; align-items: center; min-width: 0; }
.pc-360__logo { flex: 0 0 auto; width: 56px; height: 56px; border-radius: 18px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 800; background: var(--co-brand-soft); color: var(--co-brand-ink); }
.pc-360__name { font-size: 1.25rem; font-weight: 800; letter-spacing: -.01em; color: var(--co-ink); margin: 0; overflow-wrap: anywhere; }
.pc-360__meta { display: flex; flex-wrap: wrap; gap: .35rem .6rem; align-items: center; font-size: .82rem; color: var(--co-muted); margin-top: .25rem; }
.pc-360__actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.pc-suspended { display: flex; gap: .7rem; align-items: flex-start; padding: .85rem 1rem; border-radius: 16px; background: var(--co-bad-bg); color: var(--co-ink); border: 1px solid rgba(198, 40, 40, .25); margin-bottom: 1rem; }
.pc-suspended > .bi { color: var(--co-bad); font-size: 1.2rem; }

.pc-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.pc-stat { padding: .75rem .85rem; border-radius: 14px; background: var(--co-soft); min-width: 0; }
.pc-stat__label { font-size: .76rem; color: var(--co-muted); font-weight: 600; }
.pc-stat__value { font-size: 1.2rem; font-weight: 800; color: var(--co-ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pc-stat__sub { font-size: .74rem; color: var(--co-muted); }

.pc-limit { margin-bottom: .7rem; }
.pc-limit__top { display: flex; justify-content: space-between; gap: .5rem; font-size: .84rem; }
.pc-limit__top b { font-variant-numeric: tabular-nums; }
.pc-limit__bar { height: 8px; border-radius: 999px; background: var(--co-soft); overflow: hidden; margin-top: .3rem; }
.pc-limit__bar span { display: block; height: 100%; border-radius: 999px; background: var(--co-brand); }
.pc-limit.is-near .pc-limit__bar span { background: var(--co-warn); }
.pc-limit.is-over .pc-limit__bar span { background: var(--co-bad); }

.pc-parts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.pc-part { text-align: center; padding: .6rem .4rem; border-radius: 14px; background: var(--co-soft); }
.pc-part b { display: block; font-size: 1.15rem; font-variant-numeric: tabular-nums; color: var(--co-ink); }
.pc-part span { font-size: .74rem; color: var(--co-muted); }

.pc-feature { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; padding: .7rem 0; border-bottom: 1px solid var(--co-line); }
.pc-feature:last-child { border-bottom: 0; }
.pc-feature__name { font-weight: 650; color: var(--co-ink); }
.pc-feature__plan { font-size: .78rem; color: var(--co-muted); }
.pc-seg { position: relative; display: inline-flex; padding: 3px; border-radius: 999px; background: var(--co-soft); gap: 2px; }
.pc-seg input { position: absolute; opacity: 0; pointer-events: none; }
.pc-seg label { min-width: 64px; min-height: 36px; display: inline-flex; align-items: center; justify-content: center; padding: .3rem .75rem; border-radius: 999px; font-size: .8125rem; font-weight: 650; color: var(--co-muted); cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.pc-seg input:checked + label { background: var(--co-card); color: var(--co-ink); box-shadow: 0 1px 3px rgba(18, 25, 39, .12); }
.pc-seg input:checked + label.is-on { color: var(--co-ok); }
.pc-seg input:checked + label.is-off { color: var(--co-bad); }
.pc-seg input:focus-visible + label { outline: 2px solid var(--co-brand); outline-offset: 1px; }

.pc-note { padding: .8rem .9rem; border-radius: 14px; border: 1px solid var(--co-line); background: var(--co-card); margin-bottom: .55rem; }
.pc-note.is-pinned { background: var(--co-warn-bg); border-color: rgba(148, 98, 0, .25); }
.pc-note__body { white-space: pre-line; color: var(--co-ink); overflow-wrap: anywhere; }
.pc-note__meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem; font-size: .76rem; color: var(--co-muted); margin-top: .4rem; }
.pc-note__meta form { display: inline; }

.pc-kv { display: grid; grid-template-columns: minmax(110px, auto) minmax(0, 1fr); gap: .45rem 1rem; font-size: .9rem; margin: 0; }
.pc-kv dt { color: var(--co-muted); font-weight: 600; }
.pc-kv dd { margin: 0; color: var(--co-ink); overflow-wrap: anywhere; }
.pc-warn { display: block; font-size: .78rem; color: var(--co-warn); margin-top: .1rem; }

.pc-check { display: flex; align-items: flex-start; gap: .75rem; padding: .9rem; border-radius: 16px; background: var(--co-card); border: 1px solid var(--co-line); box-shadow: inset 4px 0 0 var(--tone-fg); height: 100%; }
.pc-check__icon { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; background: var(--tone-bg); color: var(--tone-fg); font-size: 1.15rem; }
.pc-check__title { font-weight: 700; color: var(--co-ink); }
.pc-check__detail { font-size: .84rem; color: var(--co-muted); overflow-wrap: anywhere; }

.pc-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .8rem; overflow-wrap: anywhere; }
.pc-secret { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; padding: .85rem 1rem; border-radius: 16px; background: var(--co-warn-bg); border: 1px dashed rgba(148, 98, 0, .45); margin-bottom: 1rem; }
.pc-secret code { font-size: 1.1rem; font-weight: 800; letter-spacing: .04em; color: var(--co-ink); background: var(--co-card); padding: .2rem .6rem; border-radius: 10px; user-select: all; -webkit-user-select: all; }

/* Platform announcement banner (society people) and "inside a society" bar (platform team). */
.pc-banner { position: relative; display: flex; gap: .7rem; align-items: flex-start; padding: .8rem 2.8rem .8rem .9rem; margin-bottom: .75rem; border-radius: 16px; background: var(--tone-bg); color: var(--co-ink); border: 1px solid var(--co-line); }
.pc-banner > .bi { color: var(--tone-fg); font-size: 1.15rem; margin-top: .05rem; }
.pc-banner__title { font-weight: 700; }
.pc-banner__body { font-size: .875rem; color: var(--co-ink); white-space: pre-line; overflow-wrap: anywhere; }
.pc-banner__close { position: absolute; top: .4rem; right: .4rem; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--co-muted); display: inline-flex; align-items: center; justify-content: center; touch-action: manipulation; }
.pc-banner__close:active { background: rgba(0, 0, 0, .08); }
.pc-inside { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; padding: .55rem .9rem; margin-bottom: .75rem; border-radius: 14px; background: #121212; color: #fff; font-size: .875rem; }
[data-bs-theme="dark"] .pc-inside { background: #2a2f3a; }
.pc-inside .btn { --bs-btn-color: #fff; --bs-btn-border-color: rgba(255, 255, 255, .45); --bs-btn-hover-bg: #fff; --bs-btn-hover-color: #121212; --bs-btn-hover-border-color: #fff; --bs-btn-active-bg: #fff; --bs-btn-active-color: #121212; }
@media (hover: hover) and (pointer: fine) {
    a.pc-kpi:hover { border-color: var(--co-brand); }
    a.pc-attn__item:hover { border-color: var(--tone-fg); }
    a.pc-row__name:hover { text-decoration: underline; }
    .pc-banner__close:hover { background: rgba(0, 0, 0, .06); color: var(--co-ink); }
}
@media (max-width: 575.98px) {
    .pc-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
    .pc-kpi { padding: .75rem; border-radius: 16px; }
    .pc-kpi__icon { width: 28px; height: 28px; border-radius: 9px; font-size: .85rem; }
    .pc-kpi__label { font-size: .74rem; }
    .pc-kpi__value { font-size: 1.2rem; }
    .pc-kpi__sub { font-size: .7rem; }
    .pc-hero { padding: .9rem 1rem; }
}
.pc-tabs { scrollbar-width: none; }
.pc-tabs::-webkit-scrollbar { display: none; }

/* ── Society profile form (Add society, Edit details, Society Profile) ─── */
.sf-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
@media (min-width: 992px) { .sf-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 1.5rem; align-items: start; } }

.sf-nav__list { list-style: none; margin: 0; padding: 0; display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; }
.sf-nav__list::-webkit-scrollbar { display: none; }
.sf-nav__link { display: inline-flex; align-items: center; gap: .5rem; padding: .45rem .8rem .45rem .45rem; border-radius: 999px; border: 1px solid var(--co-line); background: var(--co-card); color: var(--co-ink); font-size: .875rem; font-weight: 600; text-decoration: none; white-space: nowrap; touch-action: manipulation; }
.sf-nav__n { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--co-soft); color: var(--co-muted); font-size: .75rem; font-weight: 750; }
.sf-nav__n:empty::before { content: "\F47B"; font-family: bootstrap-icons; font-weight: 400; }
.sf-nav__done { display: none; color: var(--co-ok); }
.sf-nav__link.is-done .sf-nav__done { display: inline-block; }
.sf-nav__link.is-done .sf-nav__n { background: var(--co-ok-bg); color: var(--co-ok); }
.sf-nav__link.is-active { border-color: var(--co-brand); color: var(--co-brand-ink); }
.sf-nav__link.is-active .sf-nav__n { background: var(--co-brand); color: #fff; }
.sf-nav__summary { margin-top: .75rem; padding: .7rem .8rem; border-radius: 14px; background: var(--co-note-bg); border: 1px solid var(--co-note-line); font-size: .8125rem; color: var(--co-ink); }
.sf-nav__summary:empty, .sf-actions__summary:empty { display: none; }
@media (min-width: 992px) {
    .sf-nav { position: sticky; top: calc(64px + 1rem); }
    .sf-nav__list { flex-direction: column; overflow: visible; gap: .2rem; }
    .sf-nav__link { display: flex; width: 100%; border-color: transparent; background: transparent; border-radius: 12px; white-space: normal; }
    .sf-nav__link.is-active { background: var(--co-brand-soft); border-color: transparent; }
    .sf-nav__done { margin-left: auto; }
}

.sf-section { background: var(--co-card); border: 1px solid var(--co-line); border-radius: 18px; box-shadow: var(--co-shadow); padding: 1.1rem; margin-bottom: 1rem; scroll-margin-top: 88px; min-width: 0; }
.sf-section__head { display: flex; gap: .75rem; align-items: flex-start; margin-bottom: 1rem; }
.sf-section__n { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--co-brand-soft); color: var(--co-brand-ink); font-weight: 800; }
.sf-section__title { margin: 0; font-size: 1.05rem; font-weight: 700; color: var(--co-ink); }
.sf-section__sub { margin: .1rem 0 0; font-size: .85rem; color: var(--co-muted); }

.sf-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: .5rem; }
.sf-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; min-height: 84px; padding: .65rem .5rem; border: 1.5px solid var(--co-line); border-radius: 14px; background: var(--co-card); color: var(--co-ink); font-size: .84rem; font-weight: 600; text-align: center; cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.sf-tile .bi { font-size: 1.35rem; color: var(--co-muted); }
.btn-check:checked + .sf-tile { border-color: var(--co-brand); background: var(--co-brand-soft); color: var(--co-brand-ink); }
.btn-check:checked + .sf-tile .bi { color: var(--co-brand-ink); }
.btn-check:focus-visible + .sf-tile, .btn-check:focus-visible + .sf-amenity { outline: 2px solid var(--co-brand); outline-offset: 2px; }

.sf-amenities { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: .45rem; }
.sf-amenity { display: flex; align-items: center; gap: .5rem; min-height: 48px; padding: .45rem .6rem; border: 1.5px solid var(--co-line); border-radius: 14px; background: var(--co-card); color: var(--co-ink); font-size: .84rem; font-weight: 600; cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.sf-amenity .bi { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--co-soft); color: var(--co-muted); }
.sf-amenity span { flex: 1 1 auto; min-width: 0; line-height: 1.2; }
.sf-amenity small { display: block; width: fit-content; margin-top: .15rem; font-size: .66rem; font-weight: 700; line-height: 1.5; color: var(--co-ok); background: var(--co-ok-bg); border-radius: 999px; padding: 0 .4rem; }
.btn-check:checked + .sf-amenity { border-color: var(--co-brand); background: var(--co-brand-soft); }
.btn-check:checked + .sf-amenity .bi { background: var(--co-brand); color: #fff; }

.sf-map { padding: .75rem; border-radius: 16px; background: var(--co-soft); }
.sf-map__canvas { position: relative; z-index: 0; height: 320px; border-radius: 12px; overflow: hidden; background: var(--co-card); border: 1px solid var(--co-line); }
.sf-map__canvas--view { height: 240px; }
.sf-map--off .sf-map__canvas { display: none; }
.sf-map__bar { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
@media (max-width: 575.98px) { .sf-map__canvas { height: 260px; } }

.sf-setup { padding: .75rem .9rem; border-radius: 14px; background: var(--co-note-bg); border: 1px dashed var(--co-note-line); }
.sf-setup__body { margin-top: .65rem; }
.sf-preview { margin-top: .6rem; padding: .5rem .65rem; border-radius: 10px; background: var(--co-card); border: 1px solid var(--co-line); font-size: .85rem; color: var(--co-ink); }
.sf-preview.is-bad { color: var(--co-bad); border-color: var(--co-bad); }

.sf-contact { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: .4rem; margin-bottom: .4rem; }
@media (max-width: 575.98px) {
    .sf-contact { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; padding-bottom: .4rem; border-bottom: 1px solid var(--co-line); }
    .sf-contact > :first-child { grid-column: 1 / -1; }
}

.sf-logo { display: flex; gap: .8rem; align-items: flex-start; }
.sf-logo__preview { flex: 0 0 auto; width: 64px; height: 64px; border-radius: 16px; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; background: var(--co-soft); color: var(--co-muted); font-size: 1.5rem; border: 1px solid var(--co-line); }
.sf-logo__preview img { width: 100%; height: 100%; object-fit: cover; }
.sf-logo__preview--lg { width: 56px; height: 56px; }

.sf-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .5rem; }
.sf-actions__summary { flex: 1 1 100%; font-size: .8rem; color: var(--co-muted); }
@media (min-width: 992px) {
    .sf-actions { position: sticky; bottom: 1rem; z-index: 15; padding: .55rem .6rem; background: var(--co-card); border: 1px solid var(--co-line); border-radius: 999px; box-shadow: var(--co-shadow-lg); }
}
.sf-galleries { margin-top: 1rem; }

/* ── Subscription plans (cards, compare table, plan page, plan form) ───── */
.pl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(285px, 1fr)); gap: 1rem; align-items: stretch; }
.pl-card { position: relative; display: flex; flex-direction: column; background: var(--co-card); border: 1px solid var(--co-line); border-radius: 20px; box-shadow: var(--co-shadow); overflow: hidden; min-width: 0; }
.pl-card.is-featured { border: 2px solid var(--tone-fg); box-shadow: var(--co-shadow-lg); }
.pl-card.is-hidden { opacity: .72; }
.pl-card__band { height: 6px; background: var(--tone-fg); }
.pl-card__body { display: flex; flex-direction: column; gap: .75rem; padding: 1.1rem; flex: 1 1 auto; }
.pl-card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; }
.pl-card__name { margin: 0; font-size: 1.15rem; font-weight: 800; color: var(--co-ink); letter-spacing: -.01em; overflow-wrap: anywhere; }
.pl-card__tagline { font-size: .85rem; color: var(--co-muted); }
.pl-card__tagline:empty { display: none; }
.pl-card__badges { display: flex; flex-direction: column; align-items: flex-end; gap: .25rem; }
.pl-badge { display: inline-flex; align-items: center; padding: .1rem .55rem; border-radius: 999px; font-size: .7rem; font-weight: 750; background: var(--co-soft); color: var(--co-muted); white-space: nowrap; }
.pl-badge--popular { background: var(--tone-fg, var(--co-brand)); color: #fff; }
.pl-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: .35rem; }
.pl-price__amount { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.05; color: var(--co-ink); font-variant-numeric: tabular-nums; }
.pl-price__per { font-size: .9rem; color: var(--co-muted); }
.pl-price__more { font-size: .8rem; color: var(--co-muted); margin-top: -.4rem; }
.pl-price__more:empty { display: none; }
.pl-limits { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; }
.pl-limits li { padding: .45rem .3rem; border-radius: 12px; background: var(--tone-bg); color: var(--co-muted); font-size: .74rem; text-align: center; }
.pl-limits .bi { display: block; color: var(--tone-fg); font-size: .95rem; }
.pl-limits b { display: block; font-size: .95rem; color: var(--co-ink); overflow-wrap: anywhere; }
.pl-points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .3rem; }
.pl-points li { display: flex; gap: .45rem; align-items: flex-start; font-size: .875rem; color: var(--co-ink); }
.pl-points .bi { color: var(--tone-fg, var(--co-ok)); margin-top: .1rem; }
.pl-points:empty { display: none; }
.pl-modules__count { font-size: .76rem; font-weight: 650; color: var(--co-muted); margin-bottom: .3rem; }
.pl-modules__icons { display: flex; flex-wrap: wrap; gap: .3rem; }
.pl-module { width: 28px; height: 28px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; font-size: .85rem; background: var(--co-soft); color: var(--co-faint); }
.pl-module.is-on { background: var(--tone-bg); color: var(--tone-fg); }
.pl-card__stats { display: flex; flex-wrap: wrap; gap: .4rem 1rem; padding-top: .65rem; border-top: 1px solid var(--co-line); font-size: .8rem; color: var(--co-muted); }
.pl-card__stats b { color: var(--co-ink); }
.pl-card__actions { display: flex; align-items: center; gap: .4rem; margin-top: auto; }

.pl-compare-wrap { overflow-x: auto; border: 1px solid var(--co-line); border-radius: 18px; background: var(--co-card); box-shadow: var(--co-shadow); }
.pl-compare { min-width: 680px; --bs-table-bg: transparent; }
.pl-compare th, .pl-compare td { padding: .6rem .8rem; vertical-align: middle; border-color: var(--co-line); font-size: .875rem; }
.pl-compare tbody th { font-weight: 600; color: var(--co-ink); white-space: nowrap; }
.pl-compare thead th { border-bottom: 3px solid var(--tone-fg, var(--co-line)); background: var(--co-card); vertical-align: bottom; }
.pl-compare > :not(caption) > * > :first-child { position: sticky; left: 0; z-index: 1; background: var(--co-card); }
.pl-compare__corner { color: var(--co-muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; }
.pl-compare__group th { background: var(--co-soft) !important; color: var(--co-muted) !important; font-size: .72rem !important; text-transform: uppercase; letter-spacing: .05em; padding-top: .4rem !important; padding-bottom: .4rem !important; }
.pl-compare__name { font-weight: 800; color: var(--co-ink); text-decoration: none; }

.pl-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; padding: 1.2rem; margin-bottom: 1rem; border-radius: 20px; border: 1px solid var(--co-line); border-top: 5px solid var(--tone-fg); background: linear-gradient(135deg, var(--tone-bg), var(--co-card) 70%); box-shadow: var(--co-shadow); }
.pl-hero__main { flex: 1 1 320px; min-width: 0; }
.pl-hero__name { margin: 0; font-size: 1.4rem; font-weight: 800; color: var(--co-ink); }
.pl-hero__tagline { color: var(--co-muted); margin-top: .2rem; }
.pl-hero__price { flex: 0 0 auto; }
.pl-hero__amount { font-size: 1.35rem; font-weight: 800; color: var(--co-ink); }
.pl-hero__actions { display: flex; flex-wrap: wrap; gap: .4rem; }

.pf-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
@media (min-width: 1200px) {
    .pf-layout { grid-template-columns: minmax(0, 1fr) 330px; gap: 1.5rem; align-items: start; }
    .pf-preview { position: sticky; top: calc(64px + 1rem); }
}
.pf-preview__title { font-size: .74rem; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; color: var(--co-muted); margin-bottom: .5rem; }
.pf-tiles-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pf-tiles-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 575.98px) { .pf-tiles-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sf-tile small { display: block; font-size: .72rem; }
.pf-swatches { display: flex; flex-wrap: wrap; gap: .55rem; }
.pf-swatch { width: 36px; height: 36px; border-radius: 50%; background: var(--tone-fg); border: 3px solid var(--co-card); box-shadow: 0 0 0 1px var(--co-line); cursor: pointer; touch-action: manipulation; }
.btn-check:checked + .pf-swatch { box-shadow: 0 0 0 2px var(--tone-fg); }
.btn-check:focus-visible + .pf-swatch { outline: 2px solid var(--co-brand); outline-offset: 3px; }
.pf-calc { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; padding: .6rem .8rem; border-radius: 12px; background: var(--co-note-bg); border: 1px solid var(--co-note-line); font-size: .9rem; color: var(--co-ink); }
.pf-point { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .5rem; margin-bottom: .4rem; }

/* Under every console list: count, rows per page, page links. */
.pc-pager { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin-top: .9rem; }
.pc-pager__count { font-size: .85rem; color: var(--co-muted); font-variant-numeric: tabular-nums; }
.pc-pager__per .form-select { width: auto; border-radius: 999px; }
.pc-pager__links { margin-left: auto; }
.pc-pager__links nav > div > div:first-child p, .pc-pager__links p.small.text-muted { display: none; }
.pc-pager__links .pagination { margin: 0; flex-wrap: wrap; }
.pc-thumb { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 14px; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; background: var(--co-brand-soft); color: var(--co-brand-ink); font-weight: 800; font-size: 1.05rem; border: 1px solid var(--co-line); }
.pc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pc-thumb--lg { width: 72px; height: 72px; border-radius: 20px; font-size: 1.6rem; }

/* Subscriptions and societies lists, Society 360 "At a glance", timeline. */
.pc-row--subs { grid-template-columns: minmax(0, 2fr) minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr) var(--pc-act, 112px); }
.pc-row--soc { grid-template-columns: minmax(0, 2.4fr) minmax(0, 1.1fr) minmax(0, 1.6fr) minmax(0, 1.4fr) var(--pc-act, 112px); }
@media (max-width: 991.98px) { .pc-row--subs, .pc-row--soc { grid-template-columns: minmax(0, 1fr); } }
.pc-thumb--soc { width: 52px; height: 52px; border-radius: 16px; }
.pl-dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; background: var(--tone-fg); margin-right: .35rem; vertical-align: middle; }
.sb-timeline { max-height: 460px; overflow-y: auto; overscroll-behavior: contain; padding-right: .25rem; }

.pc-glance { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
@media (min-width: 992px) { .pc-glance { grid-template-columns: 300px minmax(0, 1fr); } }
.pc-glance__photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; align-content: start; }
.pc-glance__photo { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: var(--co-soft); }
.pc-glance__photo:first-child:last-child { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.pc-glance__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pc-glance__more { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(18, 18, 18, .55); color: #fff; font-weight: 800; font-size: 1.2rem; }
.pc-glance__nophoto { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; aspect-ratio: 16 / 9; border-radius: 12px; border: 1.5px dashed var(--co-line); color: var(--co-muted); text-decoration: none; font-size: .85rem; }
.pc-glance__nophoto .bi { font-size: 1.6rem; }
.pc-row--soc .pc-row__cell > span { min-width: 0; }
.pc-why { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }

/* Enquiries list and page; big empty states; Usage Analytics mini lists and compare table. */
.pc-row--inq { grid-template-columns: minmax(0, 1.6fr) minmax(0, 2fr) minmax(0, .8fr) minmax(0, .9fr) var(--pc-act, 112px); }
@media (max-width: 991.98px) { .pc-row--inq { grid-template-columns: minmax(0, 1fr); } }
.pc-empty-state { display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: 2.5rem 1rem; text-align: center; border-radius: 18px; background: var(--co-card); border: 1.5px dashed var(--co-line); color: var(--co-ink); }
.pc-empty-state > .bi { font-size: 2.1rem; color: var(--co-brand); margin-bottom: .2rem; }
.iq-message { white-space: pre-line; overflow-wrap: anywhere; line-height: 1.65; padding: .9rem 1rem; border-radius: 14px; background: var(--co-soft); color: var(--co-ink); }
.pc-mini-list { list-style: none; margin: .75rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .15rem; }
.pc-mini-list li { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .3rem .1rem; border-bottom: 1px dashed var(--co-line); font-size: .85rem; min-width: 0; }
.pc-mini-list li:last-child { border-bottom: 0; }
.pc-mini-list b { font-variant-numeric: tabular-nums; }
.pc-table-wrap { border: 1px solid var(--co-line); border-radius: 16px; overflow-x: auto; overscroll-behavior-x: contain; }
.pc-table { --bs-table-bg: var(--co-card); --bs-table-color: var(--co-ink); --bs-table-border-color: var(--co-line); font-size: .9rem; }
.pc-table thead th { background: var(--co-soft); color: var(--co-muted); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; padding: .6rem .75rem; }
.pc-table td { padding: .65rem .75rem; vertical-align: middle; }
.pc-table tbody tr:last-child td { border-bottom: 0; }
.pc-num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Website pages and blog posts: list rows, editor, preview, Google result, ready list, covers. */
.pc-row--cms { grid-template-columns: minmax(0, 2.4fr) minmax(0, .9fr) minmax(0, 1.1fr) minmax(0, .9fr) var(--pc-act, 112px); }
.pc-row--blog { grid-template-columns: minmax(0, 2.6fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, .6fr) minmax(0, 1fr) var(--pc-act, 112px); }
@media (max-width: 991.98px) { .pc-row--cms, .pc-row--blog { grid-template-columns: minmax(0, 1fr); } }
.pc-thumb--cover { width: 76px; height: 52px; border-radius: 12px; color: var(--co-muted); background: var(--co-soft); }
.cf-ready { display: inline-flex; align-items: center; gap: .25rem; font-size: .8rem; font-weight: 700; color: var(--tone-fg); }
.cf-ready__dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--co-line); }
.cf-ready__dot.is-ok { background: var(--tone-fg); }
.cf-ready > span { margin-left: .25rem; }

.cf-editor { border: 1px solid var(--co-line); border-radius: 16px; background: var(--co-card); overflow: hidden; }
.cf-editor__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; padding: .55rem .75rem; border-bottom: 1px solid var(--co-line); background: var(--co-soft); }
.cf-editor__tabs { display: inline-flex; gap: .2rem; padding: .2rem; border-radius: 999px; background: var(--co-card); border: 1px solid var(--co-line); }
.cf-tab { border: 0; background: transparent; color: var(--co-muted); font-size: .82rem; font-weight: 700; padding: .3rem .8rem; border-radius: 999px; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.cf-tab.is-active { background: var(--co-brand); color: #fff; }
.cf-tab:focus-visible, .cf-tool:focus-visible { outline: 2px solid var(--co-brand); outline-offset: 2px; }
.cf-editor__tools { display: flex; flex-wrap: wrap; align-items: center; gap: .15rem; padding: .35rem .5rem; border-bottom: 1px solid var(--co-line); }
.cf-editor__tools[hidden] { display: none; }
.cf-tool { width: 36px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 10px; background: transparent; color: var(--co-ink); font-size: 1.05rem; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.cf-tool:active { background: var(--co-brand-soft); color: var(--co-brand-ink); }
.cf-tools__sep { width: 1px; height: 20px; background: var(--co-line); margin: 0 .3rem; }
.cf-editor__text.form-control { border: 0; border-radius: 0; box-shadow: none; resize: vertical; min-height: 220px; font-size: 1rem; line-height: 1.6; padding: .85rem 1rem; background: var(--co-card); color: var(--co-ink); }
.cf-editor__text.form-control:focus { box-shadow: inset 0 0 0 2px var(--co-brand-soft); }
.cf-editor__text[hidden] { display: none; }
.cf-editor__preview { min-height: 220px; max-height: 70vh; overflow-y: auto; overscroll-behavior: contain; padding: .85rem 1rem; }
.cf-editor__preview[hidden] { display: none; }
.cf-editor__foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem .8rem; padding: .5rem .8rem; border-top: 1px solid var(--co-line); font-size: .78rem; color: var(--co-muted); }
.cf-editor__help code { font-size: .74rem; padding: .05rem .3rem; border-radius: 6px; background: var(--co-soft); color: var(--co-ink); }
@media (hover: hover) and (pointer: fine) {
    .cf-tool:hover { background: var(--co-soft); }
    .cf-tab:not(.is-active):hover { color: var(--co-ink); }
}

.cf-prose { color: var(--co-ink); font-size: 1rem; line-height: 1.7; overflow-wrap: anywhere; }
.cf-prose > :first-child { margin-top: 0; }
.cf-prose > :last-child { margin-bottom: 0; }
.cf-prose h1, .cf-prose h2, .cf-prose h3, .cf-prose h4 { font-weight: 750; line-height: 1.3; margin: 1.4em 0 .5em; color: var(--co-ink); }
.cf-prose h1 { font-size: 1.6rem; }
.cf-prose h2 { font-size: 1.3rem; }
.cf-prose h3 { font-size: 1.12rem; }
.cf-prose h4 { font-size: 1rem; }
.cf-prose p, .cf-prose ul, .cf-prose ol, .cf-prose blockquote, .cf-prose pre { margin: 0 0 1em; }
.cf-prose ul, .cf-prose ol { padding-left: 1.4em; }
.cf-prose li + li { margin-top: .25em; }
.cf-prose a { color: var(--co-brand); text-underline-offset: 2px; }
.cf-prose blockquote { padding: .6em 1em; border-left: 4px solid var(--co-brand); border-radius: 0 12px 12px 0; background: var(--co-soft); color: var(--co-ink); }
.cf-prose code { font-size: .88em; padding: .1em .35em; border-radius: 6px; background: var(--co-soft); }
.cf-prose pre { padding: .8em 1em; border-radius: 12px; background: var(--co-soft); overflow-x: auto; }
.cf-prose hr { border: 0; border-top: 1px solid var(--co-line); margin: 1.5em 0; }
.cf-prose img { max-width: 100%; height: auto; border-radius: 12px; }
.cf-page { max-width: 760px; }
.cf-page__title { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); font-weight: 800; line-height: 1.2; margin: 0 0 1rem; color: var(--co-ink); letter-spacing: -.01em; }
.cf-page__lead { font-size: 1.1rem; color: var(--co-muted); margin: 0 0 1.25rem; line-height: 1.6; }
.cf-page__by { display: flex; flex-wrap: wrap; gap: .35rem .9rem; font-size: .85rem; color: var(--co-muted); margin-bottom: 1rem; }
.cf-page__cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 16px; margin-bottom: 1.25rem; background: var(--co-soft); display: block; }

.cf-snippet { padding: .85rem 1rem; border-radius: 14px; border: 1px solid var(--co-line); background: var(--co-card); font-family: Arial, system-ui, sans-serif; }
.cf-snippet__label { font-size: .68rem; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; color: var(--co-muted); margin-bottom: .45rem; }
.cf-snippet__site { display: flex; align-items: center; gap: .55rem; margin-bottom: .2rem; }
.cf-snippet__fav { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--co-brand-soft); color: var(--co-brand-ink); font-weight: 800; font-size: .8rem; }
.cf-snippet__name { display: block; font-size: .85rem; color: var(--co-ink); line-height: 1.2; }
.cf-snippet__url { display: block; font-size: .75rem; color: var(--co-muted); line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cf-snippet__title { font-size: 1.15rem; line-height: 1.3; color: #1a0dab; margin: .15rem 0 .2rem; overflow-wrap: anywhere; }
[data-bs-theme="dark"] .cf-snippet__title { color: #8ab4f8; }
.cf-snippet__text { font-size: .85rem; line-height: 1.5; color: var(--co-ink); overflow-wrap: anywhere; }
.cf-snippet__text.is-empty { color: var(--co-muted); font-style: italic; }
.cf-count { font-size: .75rem; font-weight: 700; color: var(--co-muted); font-variant-numeric: tabular-nums; }
.cf-count[data-tone="green"], .cf-count[data-tone="amber"] { color: var(--tone-fg); }

.cf-checks__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.cf-check { display: flex; align-items: flex-start; gap: .55rem; font-size: .88rem; color: var(--co-ink); }
.cf-check > .bi { flex: 0 0 auto; margin-top: .1rem; color: var(--co-muted); font-size: 1.05rem; }
.cf-check.is-ok > .bi { color: var(--co-ok); }
.cf-check__label { display: block; font-weight: 650; }
.cf-check__hint { display: block; font-size: .78rem; color: var(--co-muted); }
.cf-check.is-ok .cf-check__hint { display: none; }

.cf-cover { display: grid; grid-template-columns: minmax(0, 1fr); gap: .75rem; }
@media (min-width: 768px) { .cf-cover { grid-template-columns: 240px minmax(0, 1fr); align-items: start; } }
.cf-cover__frame { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: var(--co-soft); border: 1.5px dashed var(--co-line); display: flex; align-items: center; justify-content: center; }
.cf-cover__frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cf-cover__frame img[hidden], .cf-cover__empty[hidden] { display: none; }
.cf-cover__empty { display: flex; flex-direction: column; align-items: center; gap: .25rem; color: var(--co-muted); font-size: .8rem; text-align: center; padding: .5rem; }
.cf-cover__empty .bi { font-size: 1.6rem; }

/* Announcements: tiles for importance, the preview banner, how many read it. */
.an-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.an-tiles .sf-tile .bi { color: var(--tone-fg); }
.an-preview { margin-bottom: 0; }
.an-preview .pc-banner__close { pointer-events: none; }
.an-reach { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .75rem; }
.an-reach .pc-limit__bar { min-width: 120px; max-width: 220px; }

/* KPI rows by how many cards they hold, so no card is left alone on a second line. */
@media (min-width: 576px) and (max-width: 1199.98px) {
    .pc-kpis:has(> :nth-child(8):last-child), .pc-kpis:has(> :nth-child(6):last-child), .pc-kpis:has(> :nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 768px) and (max-width: 1199.98px) {
    .pc-kpis:has(> :nth-child(6):last-child), .pc-kpis:has(> :nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .pc-kpis:has(> :nth-child(4):last-child), .pc-kpis:has(> :nth-child(8):last-child) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
    .pc-kpis:has(> :nth-child(8):last-child) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .pc-kpis:has(> :nth-child(5):last-child) { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .pc-kpis:has(> :nth-child(6):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .pc-kpis:has(> :nth-child(4):last-child) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1600px) {
    .pc-kpis:has(> :nth-child(6):last-child) { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
.pc-thumb--round { border-radius: 50%; }

/* Small "icon - text - time" lines inside panels; sign-in history rows. */
.pc-line { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .65rem; padding: .55rem 0; border-top: 1px solid var(--co-line); }
.pc-line:first-of-type { border-top: 0; }
.pc-line__icon { width: 34px; height: 34px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; background: var(--tone-bg, var(--co-soft)); color: var(--tone-fg, var(--co-muted)); font-size: .95rem; }
.pc-subhead { font-size: .78rem; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; color: var(--co-muted); margin: 1rem 0 .35rem; }
.pc-row--login { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, .9fr); }
@media (max-width: 991.98px) { .pc-row--login { grid-template-columns: minmax(0, 1fr); } }
.pc-date { width: auto; flex-wrap: nowrap; }
.pc-date .input-group-text { font-size: .8rem; color: var(--co-muted); background: var(--co-soft); }

/* System Health: one-line verdict, the four checks, small stat grids, server set-up tiles. */
.sy-summary { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; padding: .85rem 1rem; margin-bottom: .9rem; border-radius: 16px; background: var(--tone-bg); border: 1px solid var(--co-line); color: var(--co-ink); }
.sy-summary > .bi { font-size: 1.4rem; color: var(--tone-fg); }
.sy-checks { display: grid; grid-template-columns: minmax(0, 1fr); gap: .75rem; }
@media (min-width: 768px) { .sy-checks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1400px) { .sy-checks { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.sy-checks .pc-check { height: 100%; }
.sy-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: .5rem; }
.sy-stats > div { padding: .6rem .7rem; border-radius: 12px; background: var(--co-soft); min-width: 0; }
.sy-stats b { display: block; font-size: 1.1rem; font-variant-numeric: tabular-nums; color: var(--co-ink); overflow-wrap: anywhere; }
.sy-stats span { display: block; font-size: .74rem; color: var(--co-muted); }
.sy-specs { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .5rem; margin: 0; }
.sy-spec { padding: .6rem .75rem; border-radius: 12px; background: var(--co-soft); border: 1px solid transparent; min-width: 0; }
.sy-spec.is-warn { border-color: var(--co-warn); }
.sy-spec dt { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--co-muted); }
.sy-spec dd { margin: .15rem 0 0; font-weight: 650; color: var(--co-ink); overflow-wrap: anywhere; }
.sy-spec .sy-spec__warn { font-size: .75rem; font-weight: 600; color: var(--co-warn); }
.pc-line--top { align-items: start; }

/* Command Centre: what was checked and found fine. */
.cc-checked { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .35rem .75rem; }
.cc-checked li { display: flex; align-items: center; gap: .45rem; font-size: .85rem; color: var(--co-ink); padding: .25rem 0; }
.cc-checked li .bi { color: var(--co-bad); }
.cc-checked li.is-ok .bi { color: var(--co-ok); }

/* Plan cards fill the row on wide screens when there are 2-4 of them. */
@media (min-width: 1400px) {
    .pl-grid:has(> :nth-child(4):last-child) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .pl-grid:has(> :nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .pl-grid:has(> :nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 420px)); }
}
.sy-spec.is-wide { grid-column: span 2; }
.pc-row--choose { grid-template-columns: minmax(0, 2.4fr) minmax(0, 1fr) minmax(0, 1fr) var(--pc-act, 130px); --pc-act: 130px; }
@media (max-width: 991.98px) { .pc-row--choose { grid-template-columns: minmax(0, 1fr); } }

/* Platform Settings: section tabs. */
.ps-tabs { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; margin-bottom: 1rem; padding-bottom: .1rem; }
.ps-tabs::-webkit-scrollbar { display: none; }
.ps-tab { display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .9rem; border-radius: 999px; border: 1px solid var(--co-line); background: var(--co-card); color: var(--co-ink); font-size: .875rem; font-weight: 600; text-decoration: none; white-space: nowrap; touch-action: manipulation; }
.ps-tab .bi { color: var(--co-muted); }
.ps-tab.is-active { background: var(--co-brand); border-color: var(--co-brand); color: #fff; }
.ps-tab.is-active .bi { color: #fff; }
@media (hover: hover) and (pointer: fine) { .ps-tab:not(.is-active):hover { border-color: var(--co-brand); } }
.pc-row--plan-inv { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) var(--pc-act, 112px); }
@media (max-width: 991.98px) { .pc-row--plan-inv { grid-template-columns: minmax(0, 1fr); } }
.ps-levels { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .5rem; }
.ps-level { display: flex; flex-direction: column; gap: .3rem; padding: .55rem .65rem; border-radius: 12px; border: 1px solid var(--co-line); background: var(--co-card); }
.ps-level.is-changed { border-color: var(--co-brand); background: var(--co-brand-soft); }
.ps-level__name { display: flex; align-items: center; gap: .45rem; font-size: .85rem; font-weight: 650; color: var(--co-ink); }
.ps-level__name .bi { color: var(--co-muted); }
.pc-row--cat { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, .5fr) var(--pc-act, 130px); --pc-act: 130px; }
@media (max-width: 991.98px) { .pc-row--cat { grid-template-columns: minmax(0, 1fr); } }
.ps-gateway { padding: .85rem 1rem; border-radius: 14px; border: 1px solid var(--co-line); background: var(--co-card); }
.ps-list { display: flex; flex-direction: column; gap: .3rem; max-height: 420px; overflow-y: auto; overscroll-behavior: contain; padding-right: .2rem; }
.ps-list__row { display: flex; align-items: center; gap: .5rem; }

/* ── Gate cards (register, card page, form, report) ─────────────────────── */
.gc-face { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 14px; background: var(--co-brand-soft); color: var(--co-brand-ink); font-weight: 800; letter-spacing: .02em; }
.gc-face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gc-face--sm { width: 36px; height: 36px; border-radius: 11px; font-size: .8rem; }
.gc-face--md { width: 44px; height: 44px; font-size: .9rem; }
.gc-face--lg { width: 64px; height: 64px; border-radius: 18px; font-size: 1.2rem; }
.gc-face--xl { width: 84px; height: 84px; border-radius: 22px; font-size: 1.6rem; }
.gc-num { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-weight: 700; letter-spacing: .12em; }
.gc-num--lg { font-size: 1.35rem; color: var(--co-ink); }
.pc-row--card { grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.3fr) minmax(0, .9fr) minmax(0, 1.1fr) minmax(0, .9fr) var(--pc-act, 80px); --pc-act: 80px; }
@media (max-width: 991.98px) { .pc-row--card { grid-template-columns: minmax(0, 1fr); } }
.gc-link { display: flex; align-items: flex-start; gap: .8rem; padding: .7rem 0; border-bottom: 1px solid var(--co-line); }
.gc-link:last-of-type { border-bottom: 0; }
.gc-link.is-removed { opacity: .6; }
.gc-link__flat { flex: 0 0 auto; min-width: 72px; padding: .3rem .6rem; border-radius: 10px; background: var(--co-soft); font-weight: 800; text-align: center; color: var(--co-ink); }
.gc-link__when { flex: 1 1 auto; font-size: .9rem; }
.gc-link__tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .3rem; }
.gc-visit { display: flex; gap: .7rem; align-items: flex-start; padding: .55rem 0; border-bottom: 1px solid var(--co-line); }
.gc-visit:last-child { border-bottom: 0; }
.gc-visit__dot { width: 10px; height: 10px; border-radius: 50%; margin-top: .4rem; background: var(--co-line); flex: 0 0 auto; }
.gc-visit__dot.is-in { background: var(--co-ok); box-shadow: 0 0 0 4px var(--co-ok-bg); }
.gc-event { padding: .45rem 0; border-bottom: 1px dashed var(--co-line); }
.gc-event:last-child { border-bottom: 0; }
.gc-mini { display: flex; gap: 1rem; align-items: center; }
.gc-mini__qr { width: 120px; height: 120px; flex: 0 0 auto; padding: 8px; border-radius: 14px; border: 1px solid var(--co-line); background: #fff; }
.gc-mini__qr svg { width: 100%; height: 100%; display: block; }
.gc-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; padding-top: .8rem; border-top: 1px solid var(--co-line); }
.gc-inline > summary, .gc-add > summary { list-style: none; }
.gc-inline > summary::-webkit-details-marker, .gc-add > summary::-webkit-details-marker { display: none; }
.gc-inline[open] { flex-basis: 100%; }
.gc-inline__form { margin-top: .5rem; padding: .75rem; border-radius: 12px; background: var(--co-soft); }
.gc-report { padding: .7rem .8rem; border-radius: 12px; border: 1px solid var(--co-line); margin-bottom: .5rem; }
.gc-report.is-open { border-color: rgba(148, 98, 0, .35); background: var(--co-warn-bg); }
.gc-days { display: flex; flex-wrap: wrap; gap: .3rem; }
.gc-day { min-width: 46px; min-height: 36px; display: inline-flex; align-items: center; justify-content: center; padding: .25rem .6rem; border-radius: 999px; border: 1px solid var(--co-line); background: var(--co-card); font-size: .82rem; font-weight: 650; color: var(--co-muted); cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: manipulation; transition: background-color .15s ease, color .15s ease, border-color .15s ease; }
.btn-check:checked + .gc-day { background: var(--co-brand); border-color: var(--co-brand); color: #fff; }
.btn-check:focus-visible + .gc-day { outline: 2px solid var(--co-brand); outline-offset: 2px; }
.gc-kinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .6rem; }
.gc-kind { display: flex; flex-direction: column; gap: .25rem; padding: .9rem; border-radius: 16px; border: 1.5px solid var(--co-line); background: var(--co-card); cursor: pointer; height: 100%; touch-action: manipulation; color: var(--co-ink); transition: border-color .15s ease, box-shadow .15s ease; }
.gc-kind .bi { font-size: 1.35rem; color: var(--co-brand); }
.gc-kind span { font-size: .8rem; color: var(--co-muted); }
.btn-check:checked + .gc-kind { border-color: var(--co-brand); box-shadow: 0 0 0 3px rgba(var(--co-brand-rgb), .15); }
.btn-check:focus-visible + .gc-kind { outline: 2px solid var(--co-brand); outline-offset: 2px; }
.gc-row-block { padding: .9rem; border-radius: 14px; background: var(--co-soft); margin-bottom: .7rem; }
.gc-photo { display: flex; gap: .8rem; align-items: center; }
.gc-note ul { padding-left: 1.1rem; }
.gc-note li { margin-bottom: .3rem; color: var(--co-muted); }
.gc-bars { display: flex; align-items: flex-end; gap: 2px; height: 140px; padding-top: 6px; border-bottom: 1px solid var(--co-line); }
.gc-bars__bar { flex: 1 1 0; min-width: 2px; height: var(--h); min-height: 1px; border-radius: 3px 3px 0 0; background: var(--co-brand); opacity: .85; }
.gc-top { display: flex; align-items: center; gap: .7rem; padding: .55rem .2rem; border-bottom: 1px solid var(--co-line); color: var(--co-ink); text-decoration: none; }
.gc-top:last-child { border-bottom: 0; }
@media (hover: hover) and (pointer: fine) { .gc-top:hover { background: var(--co-soft); } .gc-kind:hover { border-color: var(--co-brand); } }
.gc-help__when { display: flex; align-items: center; gap: .4rem; margin-top: .35rem; font-size: .9375rem; font-weight: 600; color: var(--co-ink); }
.gc-help__actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .4rem; margin-top: .85rem; padding-top: .75rem; border-top: 1px solid var(--co-line); }
.gc-help__actions form { margin: 0; }
.gc-time { display: flex; gap: .7rem; align-items: flex-start; padding: .75rem 1rem; border-bottom: 1px solid var(--co-line); }
.gc-time:last-child { border-bottom: 0; }
.gc-dayhead { padding: .55rem 1rem .35rem; font-size: .78rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--co-muted); background: var(--co-soft); }
.gc-time { align-items: center; padding: .6rem 1rem; }
.gc-time .gc-visit__dot { margin-top: 0; }
/* Gate cards at the gate (guard screens) */
.gc-scan { margin-bottom: .875rem; }
.gc-scan__frame { position: relative; width: 100%; max-width: 420px; aspect-ratio: 1; margin: 0 auto; border-radius: 22px; overflow: hidden; background: #0d1220; }
.gc-scan__video { width: 100%; height: 100%; object-fit: cover; display: block; }
.gc-scan__aim { position: absolute; inset: 18%; border-radius: 18px; box-shadow: 0 0 0 999px rgba(13, 18, 32, .35); border: 3px solid rgba(255, 255, 255, .85); pointer-events: none; }
.gc-scan__idle { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; color: #fff; background: #0d1220; }
.gc-scan__idle[hidden] { display: none; }
.gc-scan__idle .bi { font-size: 3.2rem; opacity: .85; }
.gc-scan__status { text-align: center; color: var(--co-muted); margin: .7rem 0 0; font-size: .9375rem; }
.gc-scan-cta { box-shadow: var(--co-shadow); }
.gc-person { text-align: center; padding: 1.1rem 1rem 1rem; margin-bottom: .875rem; border-radius: var(--co-radius); background: var(--co-card); border: 1px solid var(--co-line); box-shadow: var(--co-shadow); }
.gc-person.is-stop { border-color: rgba(198, 40, 40, .45); }
.gc-person__photo { width: min(220px, 62vw); aspect-ratio: 4 / 5; margin: 0 auto .8rem; border-radius: 22px; overflow: hidden; background: var(--co-brand-soft); color: var(--co-brand-ink); display: flex; align-items: center; justify-content: center; font-size: 3rem; font-weight: 800; }
.gc-person__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gc-person__name { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; margin: 0; overflow-wrap: anywhere; }
.gc-person__tags { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem; margin-top: .55rem; }
.gc-person__check { margin: .8rem 0 0; font-size: .875rem; font-weight: 600; color: var(--co-ink); display: flex; gap: .4rem; justify-content: center; }
.gc-stop { display: flex; gap: .75rem; align-items: flex-start; padding: .9rem 1rem; border-radius: var(--co-radius); background: var(--co-bad-bg); color: var(--co-ink); border: 1px solid rgba(198, 40, 40, .3); margin-bottom: .875rem; }
.gc-stop > .bi { color: var(--co-bad); font-size: 1.5rem; line-height: 1; }
.gc-pick { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .7rem; padding: .75rem .85rem; margin-bottom: .45rem; border-radius: 14px; border: 1px solid var(--co-line); background: var(--co-card); cursor: pointer; touch-action: manipulation; }
.gc-pick .form-check-input { width: 1.4em; height: 1.4em; margin: 0; }
.gc-pick__flat { font-size: 1.15rem; font-weight: 800; letter-spacing: -.01em; color: var(--co-ink); }
.gc-pick .co-meta { flex-basis: 100%; padding-left: calc(1.4em + .7rem); }
.gc-pick:has(.form-check-input:checked) { border-color: var(--co-brand); background: rgba(var(--co-brand-rgb), .05); }
.gc-cardline { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-top: .45rem; font-size: .84rem; font-weight: 600; color: var(--co-ink); text-decoration: none; }
.gc-issue__photo { width: 72px; height: 88px; object-fit: cover; border-radius: 14px; flex: 0 0 auto; }
.gc-handover__qr { width: min(260px, 72vw); aspect-ratio: 1; margin: 1rem auto .6rem; padding: 12px; border-radius: 18px; border: 1px solid var(--co-line); background: #fff; }
.gc-handover__qr svg { width: 100%; height: 100%; display: block; }
.gc-report-box summary { cursor: pointer; color: var(--co-bad); }
.gc-num::placeholder { text-transform: none; letter-spacing: normal; font-family: var(--bs-body-font-family); font-weight: 400; }

/* Agreements: the full text of a document, readable in place */
.legal-text { max-height: 340px; overflow-y: auto; overscroll-behavior: contain; padding: 1rem 1.15rem; border-radius: 14px; border: 1px solid var(--co-line); background: var(--co-soft); font-size: .92rem; line-height: 1.6; color: var(--co-ink); }
.legal-text h2, .legal-text h3 { font-size: 1rem; font-weight: 700; margin: 1rem 0 .4rem; }
.legal-text ul, .legal-text ol { padding-left: 1.2rem; }
.legal-text:focus-visible { outline: 2px solid var(--co-brand); outline-offset: 2px; }
.v-doc { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: .6rem 1rem; padding: .85rem 0; border-top: 1px solid var(--co-line); }
.v-doc__file { max-width: 320px; }

/* Setup checklist (dashboard) */
.sc__bar { height: 8px; border-radius: 999px; background: var(--co-soft); overflow: hidden; margin: -.2rem 0 .9rem; }
.sc__bar span { display: block; height: 100%; border-radius: 999px; background: var(--co-ok); }
.sc__groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .9rem 1.2rem; }
.sc__group-title { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--co-muted); margin-bottom: .35rem; }
.sc__item { display: flex; gap: .6rem; align-items: flex-start; padding: .5rem .55rem; border-radius: 12px; color: var(--co-ink); text-decoration: none; font-size: .9rem; }
.sc__item .bi { color: var(--co-faint); font-size: 1.1rem; line-height: 1.2; }
.sc__item span span { font-size: .8rem; color: var(--co-muted); }
.sc__item.is-done { opacity: .62; }
.sc__item.is-done .bi { color: var(--co-ok); }
.sc__item.is-done b { text-decoration: line-through; text-decoration-color: var(--co-faint); }
@media (hover: hover) and (pointer: fine) { .sc__item:hover { background: var(--co-soft); } }

/* ---- Joining: the society's join link, requests, the flat's confirmation (onboarding phase 4) ---- */
.join-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.join-choice { display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .8rem .5rem; border: 1.5px solid var(--co-line); border-radius: 16px; background: var(--co-card); text-align: center; cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; transition: border-color .15s ease, background-color .15s ease; }
.join-choice .bi { font-size: 1.4rem; color: var(--co-muted); }
.join-choice b { font-size: .95rem; color: var(--co-ink); }
.join-choice span { font-size: .74rem; color: var(--co-muted); line-height: 1.25; }
.btn-check:checked + .join-choice { border-color: var(--co-brand); background: rgba(var(--co-brand-rgb), .1); }
.btn-check:checked + .join-choice .bi { color: var(--co-brand-ink); }
.btn-check:focus-visible + .join-choice { outline: 3px solid rgba(var(--co-brand-rgb), .35); outline-offset: 2px; }
.join-choice:active { transform: scale(.98); }
[data-bs-theme="dark"] .btn-check:checked + .join-choice { background: rgba(39, 72, 219, .22); }
@media (max-width: 420px) { .join-choice span { display: none; } }
.join-notice { padding: .8rem .9rem; border-radius: 14px; background: var(--co-soft); border: 1px solid var(--co-line); }
.join-notice p { color: var(--co-muted); }
.join-done { display: inline-flex; width: 64px; height: 64px; border-radius: 50%; align-items: center; justify-content: center; background: #e3f6ef; color: #13795b; font-size: 2rem; }
.join-steps { padding-left: 1.2rem; color: var(--co-muted); }
.join-steps li { margin-bottom: .4rem; }
.join-form input[type="file"] { font-size: 16px; }

.jn-top { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1rem; margin-bottom: 1rem; }
.jn-top > .card { margin: 0; }
.jn-link__body { display: flex; gap: 1rem; align-items: flex-start; }
.jn-link__qr { flex: 0 0 auto; width: 120px; height: 120px; padding: 8px; border: 1px solid var(--co-line); border-radius: 14px; background: #fff; }
.jn-link__qr svg { width: 100%; height: 100%; display: block; }
.jn-ending { list-style: none; padding: 0; margin: 0 0 .6rem; display: flex; flex-direction: column; gap: .35rem; }
.jn-ending li { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: .9rem; }
.jn-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .45rem 1rem; margin: 0; font-size: .92rem; }
.jn-facts dt { color: var(--co-muted); font-weight: 600; }
.jn-facts dd { margin: 0; overflow-wrap: anywhere; }
.jn-flags { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .45rem; }
.jn-flags li { display: flex; gap: .55rem; align-items: flex-start; padding: .55rem .7rem; border-radius: 12px; background: var(--tone-bg); color: var(--co-ink); font-size: .88rem; }
.jn-flags li .bi { color: var(--tone-fg); margin-top: .1rem; }
.jn-asks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: .8rem; }
.jn-ask { margin: 0; }
.jn-ask__actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .5rem; margin-top: .9rem; }
@media (max-width: 991.98px) {
    .jn-top { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 575.98px) {
    .jn-link__body { flex-direction: column; align-items: center; }
    .jn-link__body > .min-w-0 { width: 100%; }
    .jn-facts { grid-template-columns: minmax(0, 1fr); gap: .1rem; }
    .jn-facts dd { margin-bottom: .45rem; }
    .jn-ask__actions { grid-template-columns: minmax(0, 1fr); }
}

/* ---- Resident card ---- */
.rc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 1rem; }
.rc-card { background: var(--co-card); border: 1px solid var(--co-line); border-radius: 22px; overflow: hidden; box-shadow: 0 10px 30px rgba(18, 25, 39, .07); }
.rc-card__head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .8rem 1.1rem; background: var(--co-brand); color: #fff; }
.rc-card__head b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-card__head span { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .9; white-space: nowrap; }
.rc-card__body { padding: 1rem 1.1rem; }
.rc-card__who { display: flex; gap: .8rem; align-items: center; }
.rc-card__photo { flex: 0 0 auto; width: 64px; height: 64px; border-radius: 18px; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; background: rgba(var(--co-brand-rgb), .12); color: var(--co-brand-ink); font-weight: 800; font-size: 1.3rem; }
.rc-card__photo img { width: 100%; height: 100%; object-fit: cover; }
.rc-card__name { font-size: 1.15rem; font-weight: 800; margin: 0; overflow-wrap: anywhere; }
.rc-card__meta { font-size: .85rem; color: var(--co-muted); }
.rc-card__qr { width: min(220px, 70vw); aspect-ratio: 1; margin: 1rem auto .5rem; padding: 10px; border: 1px solid var(--co-line); border-radius: 16px; background: #fff; }
.rc-card__qr svg { width: 100%; height: 100%; display: block; }
.rc-card__foot { display: flex; gap: .5rem; justify-content: center; padding: 0 1.1rem 1rem; }
.rc-card.is-off .rc-card__qr { opacity: .2; filter: grayscale(1); }

/* ---- Staff and household help onboarding (phase 5): ID check, joining checklist ---- */
.gc-verify__qr { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; padding: .75rem; margin-bottom: .75rem; border-radius: 14px; background: rgba(var(--co-brand-rgb), .07); }
.sj-list { list-style: none; padding: 0; margin: 0 0 .75rem; display: flex; flex-direction: column; gap: .35rem; }
.sj-list li { display: flex; gap: .6rem; align-items: flex-start; padding: .45rem .55rem; border-radius: 12px; background: var(--co-soft); }
.sj-list li > .bi { color: var(--co-muted); margin-top: .15rem; }
.sj-list li > span { display: flex; flex-direction: column; min-width: 0; }
.sj-list li b { font-size: .9rem; font-weight: 600; }
.sj-list li span span { font-size: .78rem; color: var(--co-muted); overflow-wrap: anywhere; }
.sj-list li.is-done > .bi { color: var(--co-ok); }
.sj-actions { display: flex; flex-wrap: wrap; gap: .5rem; }

/* ---- Platform Settings -> Aadhaar QR check ---- */
.ps-aadhaar__steps { padding-left: 1.2rem; margin-bottom: 1rem; color: var(--co-muted); }
.ps-aadhaar__steps li { margin-bottom: .35rem; }
.ps-aadhaar__upload { max-width: 560px; }
.ps-aadhaar__fp { white-space: normal; overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .72rem; }

/* ---- Membership registers: nominations ---- */
.nm-rows { display: flex; flex-direction: column; gap: .75rem; }
.nm-row { border: 1px solid var(--co-line); border-radius: 14px; padding: .75rem .85rem .5rem; background: var(--co-card); }
.nm-row legend { float: none; width: auto; font-size: .85rem; margin: 0; }
.nm-steps { list-style: none; padding: 0; margin: 0 0 .75rem; display: flex; flex-direction: column; gap: .4rem; }
.nm-steps li { display: flex; gap: .55rem; align-items: flex-start; }
.nm-steps li > .bi { color: var(--co-muted); margin-top: .15rem; }
.nm-steps li.is-done > .bi { color: var(--co-ok); }
.nm-steps li > span { display: flex; flex-direction: column; }
.nm-steps li b { font-size: .88rem; font-weight: 600; }
.nm-steps li span span { font-size: .78rem; color: var(--co-muted); }
.nm-list { padding-left: 1.1rem; margin: 0 0 .5rem; }
.nm-list li { margin-bottom: .2rem; }
.ps-aadhaar__name { white-space: normal; }

/* ---- My family: a household, and the children a parent added ---- */
.fm-title { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--co-muted); margin: .9rem 0 .4rem; }
.fm-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .45rem; }
.fm-list li { display: flex; align-items: flex-start; gap: .65rem; padding: .55rem .65rem; border-radius: 14px; background: var(--co-soft); }
.fm-list b { display: inline; font-weight: 600; }
.fm-meta { display: block; font-size: .8rem; color: var(--co-muted); }
.fm-av { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; background: rgba(var(--co-brand-rgb), .12); color: var(--co-brand-ink); }
.fm-av.is-child { border-radius: 50%; background: #fff4dc; color: #946200; }
.fm-actions { display: flex; gap: .35rem; align-items: center; margin-left: auto; }
[data-bs-theme="dark"] .fm-av.is-child { background: rgba(217, 160, 15, .2); color: #f5c76a; }

/* ---- Children going out of the gate: the guard's screens ---- */
.kd-cta { display: flex; align-items: center; justify-content: center; gap: .5rem; }
.kd-title { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--co-muted); margin: 1.1rem 0 .5rem; }
.kd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: .6rem; margin-bottom: .5rem; }
.kd-child { display: flex; align-items: center; gap: .8rem; padding: .75rem .85rem; border-radius: var(--co-radius); border: 1px solid var(--co-line); background: var(--co-card); color: var(--co-ink); text-decoration: none; touch-action: manipulation; transition: transform 120ms cubic-bezier(0.23, 1, 0.32, 1), border-color 120ms ease; }
.kd-child b { display: block; font-size: 1.05rem; font-weight: 700; overflow-wrap: anywhere; }
.kd-child:active { transform: scale(.98); }
.kd-face { flex: 0 0 auto; width: 64px; height: 64px; border-radius: 18px; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 800; background: var(--co-warn-bg); color: var(--co-warn); }
.kd-face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kd-face--sm { width: 44px; height: 44px; border-radius: 14px; font-size: 1.1rem; }
.kd-row { display: flex; align-items: center; gap: .75rem; color: var(--co-ink); text-decoration: none; }
.kd-row b { font-weight: 700; overflow-wrap: anywhere; }
.kd-wait { display: flex; align-items: flex-start; gap: .75rem; border-color: rgba(148, 98, 0, .35); background: var(--co-warn-bg); }
.kd-wait .spinner-border { flex: 0 0 auto; margin-top: .2rem; }
@media (hover: hover) and (pointer: fine) {
    .kd-child:hover { border-color: rgba(var(--co-brand-rgb), .45); }
}

/* ---- Children going out: the parents' answer ---- */
.kx-card { text-align: center; padding: 1.4rem 1.1rem 1.2rem; margin-bottom: 1rem; border-radius: var(--co-radius); background: var(--co-card); border: 1px solid var(--co-line); box-shadow: var(--co-shadow); }
.kx-face { width: 112px; height: 112px; margin: 0 auto .8rem; border-radius: 30px; overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 2.6rem; font-weight: 800; background: var(--co-warn-bg); color: var(--co-warn); }
.kx-face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kx-title { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; margin: 0 0 .35rem; overflow-wrap: anywhere; text-wrap: balance; }
.kx-sub { color: var(--co-muted); margin: 0 auto 1rem; max-width: 34rem; }
.kx-answer { display: grid; gap: .6rem; max-width: 26rem; margin: 0 auto .8rem; }
.kx-answer .btn { min-height: 54px; font-weight: 700; touch-action: manipulation; }
.kx-steps { list-style: none; padding: 0; margin: .9rem auto 0; max-width: 28rem; text-align: left; display: flex; flex-direction: column; gap: .45rem; }
.kx-steps li { display: flex; gap: .55rem; align-items: flex-start; font-size: .92rem; }
.kx-steps .bi { color: var(--co-muted); margin-top: .1rem; }

/* ---- My family: the gate photo, going out alone, the latest trip ---- */
.fm-av { overflow: hidden; }
.fm-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fm-photo { flex: 0 0 auto; width: 72px; height: 72px; border-radius: 20px; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; font-size: 1.5rem; background: var(--co-soft); color: var(--co-muted); }
.fm-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fm-gate { display: inline-flex; align-items: center; gap: .35rem; margin-top: .35rem; font-size: .8rem; font-weight: 600; color: var(--co-brand-ink); text-decoration: none; }
.fm-trip { display: flex; align-items: center; gap: .5rem; margin-top: .45rem; padding: .45rem .6rem; border-radius: 12px; font-size: .82rem; background: var(--tone-bg); color: var(--tone-fg); }
.fm-trip .btn { flex: 0 0 auto; }
.fm-choices { display: grid; gap: .5rem; margin: .8rem 0 0; }
.fm-choice { display: flex; gap: .65rem; align-items: flex-start; padding: .7rem .8rem; border-radius: 14px; border: 1px solid var(--co-line); cursor: pointer; touch-action: manipulation; }
.fm-choice input { width: 1.2em; height: 1.2em; margin-top: .15rem; flex: 0 0 auto; accent-color: var(--co-brand); }
.fm-choice b { display: block; font-weight: 600; }
.fm-choice span span { display: block; font-size: .8rem; color: var(--co-muted); }
.fm-choice:has(input:checked) { border-color: var(--co-brand); background: rgba(var(--co-brand-rgb), .05); }
.fm-time { max-width: 11rem; }
.fm-list li { flex-wrap: wrap; }
.fm-list li > .min-w-0 { flex: 1 1 0; }
.fm-list li > .fm-trip { flex: 1 1 100%; margin-top: 0; }
.kd-row .btn { flex: 0 0 auto; white-space: nowrap; }

/* ---- School van: the guard after scanning a van card, the parents in My family ---- */
.vn-child { display: flex; align-items: center; gap: .7rem; padding: .6rem .7rem; border-radius: 14px; border: 1px solid var(--co-line); background: var(--co-card); cursor: pointer; touch-action: manipulation; }
.vn-child .form-check-input { width: 1.5em; height: 1.5em; margin: 0; flex: 0 0 auto; }
.vn-child b { font-weight: 700; overflow-wrap: anywhere; }
.vn-child:has(.form-check-input:checked) { border-color: var(--co-ok); background: var(--co-ok-bg); }
.vn-child.is-off { cursor: default; background: var(--co-soft); }
.vn-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .4rem; }
.vn-list b { font-weight: 700; }
.fm-gate { display: flex; width: fit-content; }
.sv-list { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-direction: column; gap: .5rem; }
.sv-list li { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .65rem; padding: .6rem .7rem; border-radius: 14px; background: var(--co-soft); }
.sv-list li > .min-w-0 { flex: 1 1 0; }
.sv-list li b { display: block; font-weight: 600; overflow-wrap: anywhere; }
.sv-change { flex: 1 1 100%; }
.sv-change > summary { color: var(--co-brand-ink); cursor: pointer; }
.sv-days { display: flex; flex-wrap: wrap; gap: .3rem; }
.sv-days .btn { min-width: 3rem; border-radius: 999px; }
.sv-add { padding-top: .25rem; }
.sv-new > summary { color: var(--co-brand-ink); cursor: pointer; }
.sv-holiday { margin: 0 0 1rem; padding: .6rem .75rem; border-radius: 14px; border: 1px dashed var(--co-line); }
.sv-holiday > summary { color: var(--co-brand-ink); cursor: pointer; }
.sv-holiday.is-on { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .6rem; border: 1px solid rgba(148, 98, 0, .3); background: var(--co-warn-bg); }
.sv-holiday.is-on > .bi { color: var(--co-warn); font-size: 1.2rem; line-height: 1.2; }
.sv-holiday.is-on b { display: block; font-weight: 700; }
.sv-holiday.is-on > .min-w-0 { flex: 1 1 0; }
.sv-holiday.is-on > form { flex: 1 1 100%; padding-left: 1.8rem; }

/* ---- Do not disturb (children home alone): the household's card, the reminders ---- */
.dnd-card__head { display: flex; align-items: center; gap: .75rem; margin-bottom: .6rem; }
.dnd-card__icon { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.3rem; background: var(--co-soft); color: var(--co-ink); }
.dnd-card__title { font-size: 1.05rem; font-weight: 700; margin: 0; }
.dnd-card.is-on { border-color: rgba(var(--co-brand-rgb), .45); background: rgba(var(--co-brand-rgb), .05); }
.dnd-card.is-on .dnd-card__icon { background: var(--co-brand); color: #fff; }
.dnd-card__rules { margin: 0 0 .75rem; padding-left: 1.1rem; font-size: .9rem; display: flex; flex-direction: column; gap: .3rem; }
.dnd-card__time { max-width: 11rem; }
.dnd-remind { display: flex; gap: .6rem; align-items: flex-start; border-color: rgba(var(--co-brand-rgb), .35); background: rgba(var(--co-brand-rgb), .06); }
.dnd-remind > .bi { color: var(--co-brand-ink); font-size: 1.2rem; line-height: 1.2; }
.fm-dnd { display: flex; align-items: flex-start; gap: .45rem; margin: 0 0 .5rem; padding: .5rem .65rem; border-radius: 12px; font-size: .82rem; font-weight: 600; text-decoration: none; color: var(--co-brand-ink); background: rgba(var(--co-brand-rgb), .06); }
.fm-dnd.is-on { color: #fff; background: var(--co-brand); }

/* ---- Elder care: the senior's screens (big buttons, icon + words, never colour alone) ---- */
.care-page { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: .85rem; }
.care-lang { display: flex; gap: .4rem; justify-content: center; flex-wrap: wrap; }
.care-lang__btn { min-height: 44px; padding: .35rem 1rem; border-radius: 999px; border: 1.5px solid var(--co-line); background: var(--co-card); color: var(--co-ink); font-weight: 600; font-size: 1rem; touch-action: manipulation; }
.care-lang__btn.is-on { border-color: var(--co-brand); background: var(--co-brand); color: #fff; }
.care-big { display: flex; align-items: center; gap: 1rem; width: 100%; min-height: 96px; padding: 1rem 1.15rem; border-radius: 22px; border: 2px solid transparent; text-align: left; text-decoration: none; color: #fff; font: inherit; touch-action: manipulation; transition: transform 120ms cubic-bezier(0.23, 1, 0.32, 1); }
.care-big:active { transform: scale(.98); }
.care-big > .bi { flex: 0 0 auto; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 18px; font-size: 1.9rem; background: rgba(255, 255, 255, .2); }
.care-big b { display: block; font-size: 1.45rem; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; }
.care-big small { display: block; font-size: .98rem; opacity: .95; margin-top: .2rem; line-height: 1.35; }
.care-big--fine { background: #0f7f55; }
.care-big--done { background: var(--co-ok-bg); color: var(--co-ok); border-color: rgba(19, 121, 91, .35); }
.care-big--done > .bi { background: #fff; }
.care-big--help { background: #b45309; }
.care-big--sos { background: #c62828; }
.care-big--setup { background: var(--co-brand); }
.care-big--security { background: #1e3a8a; }
.care-today { padding: 1rem 1.1rem; border-radius: 18px; border: 1px solid var(--co-line); background: var(--co-card); }
.care-today h2 { font-size: .95rem; font-weight: 700; color: var(--co-muted); margin: 0 0 .4rem; }
.care-today__line { display: flex; align-items: flex-start; gap: .6rem; margin: 0; font-size: 1.12rem; font-weight: 600; color: var(--co-ink); }
.care-today__line > .bi { font-size: 1.35rem; line-height: 1.2; color: var(--co-brand-ink); }
.care-today__line[data-state="done"] > .bi { color: var(--co-ok); }
.care-today__line[data-state="missed"] > .bi, .care-today__line[data-state="reminded"] > .bi { color: var(--co-warn); }
.care-link { display: inline-flex; align-items: center; gap: .45rem; align-self: center; min-height: 44px; font-weight: 600; font-size: 1.02rem; color: var(--co-brand-ink); text-decoration: none; }
.care-h { font-size: 1.1rem; font-weight: 700; margin: .5rem 0 .1rem; }
.care-muted { color: var(--co-muted); margin: 0; }
.care-call { display: flex; align-items: center; gap: .85rem; min-height: 72px; padding: .8rem 1rem; border-radius: 18px; border: 1.5px solid var(--co-line); background: var(--co-card); color: var(--co-ink); text-decoration: none; touch-action: manipulation; }
.care-call > .bi { flex: 0 0 auto; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; font-size: 1.35rem; background: var(--co-ok-bg); color: var(--co-ok); }
.care-call b { display: block; font-size: 1.12rem; }
.care-call small { display: block; color: var(--co-muted); font-size: .92rem; }
.care-sec { display: flex; flex-direction: column; gap: .7rem; margin-top: .4rem; }
.care-sec__status { display: flex; align-items: flex-start; gap: .6rem; margin: 0; padding: .85rem 1rem; border-radius: 16px; font-weight: 600; font-size: 1.05rem; background: var(--co-warn-bg); color: var(--co-ink); }
.care-sec__status[data-status="acknowledged"] { background: var(--co-ok-bg); }
.care-sec__status > .bi { font-size: 1.3rem; line-height: 1.2; }
.care-sec__fail { display: flex; align-items: center; gap: .6rem; margin: 0; padding: .85rem 1rem; border-radius: 16px; background: var(--co-bad-bg); color: var(--co-bad); font-size: 1.05rem; }
.care-ok { min-height: 52px; font-size: 1.05rem; font-weight: 600; width: 100%; }
.care-others { margin-top: .6rem; display: flex; flex-direction: column; gap: .5rem; }
.care-row { display: flex; align-items: flex-start; gap: .7rem; padding: .75rem .9rem; border-radius: 16px; border: 1px solid var(--co-line); background: var(--co-card); color: var(--co-ink); text-decoration: none; }
.care-row > .bi { font-size: 1.25rem; color: var(--co-brand-ink); line-height: 1.3; }
.care-row b { display: block; font-weight: 700; }
.care-row small { display: block; color: var(--co-muted); }
.care-row--alert { border-color: rgba(198, 40, 40, .35); background: var(--co-bad-bg); }
.care-row--alert > .bi { color: var(--co-bad); }
.care-panel { display: flex; flex-direction: column; gap: .35rem; }
.care-switch { display: flex; gap: .5rem; }
.care-switch__opt { flex: 1 1 0; }
.care-switch__opt input { position: absolute; opacity: 0; pointer-events: none; }
.care-switch__opt span { display: flex; align-items: center; justify-content: center; gap: .45rem; min-height: 52px; border-radius: 14px; border: 1.5px solid var(--co-line); font-weight: 700; font-size: 1.05rem; cursor: pointer; }
.care-switch__opt input:checked + span { border-color: var(--co-brand); background: rgba(var(--co-brand-rgb), .08); color: var(--co-brand-ink); }
.care-switch__opt input:focus-visible + span { outline: 3px solid rgba(var(--co-brand-rgb), .4); outline-offset: 2px; }
.care-time { max-width: 12rem; }
.care-save { align-self: flex-start; min-width: 10rem; }
.care-contact { padding: .7rem 0; border-top: 1px solid var(--co-line); display: flex; flex-direction: column; gap: .45rem; }
.care-contact__who { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.care-find { margin: .5rem 0 .25rem; }
.care-invite, .care-alert { max-width: 640px; margin: 0 auto; }
.care-invite__icon, .care-alert__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; font-size: 1.6rem; background: rgba(var(--co-brand-rgb), .1); color: var(--co-brand-ink); margin-bottom: .6rem; }
.care-alert__icon { background: var(--co-bad-bg); color: var(--co-bad); margin: 0; flex: 0 0 auto; }
.care-alert__head { display: flex; gap: .8rem; align-items: center; margin-bottom: .6rem; }
.care-invite__title, .care-alert__title { font-size: 1.3rem; font-weight: 800; margin: 0; }
.care-invite__answer { display: flex; gap: .6rem; flex-wrap: wrap; }
.care-steps { list-style: none; padding: 0; margin: 0 0 .9rem; display: flex; flex-direction: column; gap: .5rem; }
.care-steps li { display: flex; gap: .6rem; align-items: flex-start; padding: .6rem .75rem; border-radius: 12px; background: var(--co-soft); color: var(--co-muted); }
.care-steps li.is-done { background: var(--co-ok-bg); color: var(--co-ink); }
.care-steps li > .bi { font-size: 1.15rem; line-height: 1.3; }
.care-noone, .care-ok-line { display: flex; gap: .5rem; align-items: center; font-weight: 600; margin: 0 0 .8rem; }
.care-noone { color: var(--co-warn); }
.care-ok-line { color: var(--co-ok); }

/* Elder care on the gate screen: a resident asked security for help */
.co-helps { display: flex; flex-direction: column; gap: .6rem; margin-bottom: .8rem; }
.co-help { border: 2px solid var(--co-bad); background: var(--co-bad-bg); }
.co-help.is-acked { border-color: var(--co-ok); background: var(--co-ok-bg); }
.co-help__head { display: flex; align-items: center; gap: .5rem; font-size: 1.1rem; }
.co-help__head > .bi { font-size: 1.3rem; color: var(--co-bad); }
.co-help.is-acked .co-help__head > .bi { color: var(--co-ok); }
.co-help__actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }

/* ── Parking (docs/PARKING.md) ───────────────────────────────────── */
.pc-row--park { grid-template-columns: minmax(0, 1.9fr) minmax(0, 1.3fr) minmax(0, 1.2fr) minmax(0, .9fr) minmax(0, .8fr) var(--pc-act, 80px); --pc-act: 80px; }
.pc-row--wait { grid-template-columns: minmax(0, 1.6fr) minmax(0, .8fr) minmax(0, 1.2fr) minmax(0, 1.4fr); }
.pc-row--draw { grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr) minmax(0, .8fr) minmax(0, .8fr) var(--pc-act, 90px); --pc-act: 90px; }
.pc-row--issue { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.5fr) minmax(0, 1.2fr) minmax(0, 1fr) var(--pc-act, 80px); --pc-act: 80px; }
@media (max-width: 991.98px) { .pc-row--park, .pc-row--wait, .pc-row--draw, .pc-row--issue { grid-template-columns: minmax(0, 1fr); } }

.pk-chip { flex: 0 0 auto; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; font-size: 1.15rem; background: var(--co-brand-soft); color: var(--co-brand-ink); }
.pk-chip[data-size="two_wheeler"] { background: #e2f4eb; color: #0f7f55; }
.pk-chip--lg { width: 52px; height: 52px; border-radius: 16px; font-size: 1.5rem; }
.pk-head { display: flex; align-items: flex-start; gap: .9rem; }
.pk-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .5rem .9rem; margin: 0 0 .6rem; }
.pk-facts > div { min-width: 0; }
.pk-facts dt { font-size: .74rem; font-weight: 600; color: var(--co-muted); margin: 0; }
.pk-facts dd { margin: 0; font-weight: 600; color: var(--co-ink); overflow-wrap: anywhere; }
.pk-facts--tight { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pk-callout { padding: .7rem .85rem; border-radius: 14px; background: var(--co-warn-bg); }
.pk-more > summary { cursor: pointer; font-weight: 600; color: var(--co-brand-ink); min-height: 32px; display: flex; align-items: center; }
.pk-more > summary.text-danger { color: var(--co-bad); }
.pk-history { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.pk-history li { padding: .5rem .7rem; border-radius: 12px; background: var(--co-soft); }
.pk-pills { display: flex; flex-wrap: wrap; gap: .4rem; }
.pk-pills .btn { border-radius: 999px; }
.pk-checks { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; }
.pk-example { display: flex; align-items: center; min-height: 38px; font-weight: 600; color: var(--co-brand-ink); }
.pk-next { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; }
.pk-next__flat { display: inline-flex; flex-direction: column; padding: .35rem .7rem; border-radius: 12px; border: 1px solid var(--co-line); text-decoration: none; color: var(--co-ink); font-weight: 600; font-size: .9rem; }
.pk-next__flat small { font-weight: 500; color: var(--co-muted); font-size: .74rem; }
.pk-approve__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; padding: .55rem 0; border-top: 1px solid var(--co-line); }
.pk-approve__row:first-of-type { border-top: 0; }
.pk-turn { flex: 0 0 auto; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--co-brand); color: #fff; font-weight: 800; }
.pk-slotgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .45rem; margin-top: .4rem; }
.pk-slotpick { display: flex; align-items: flex-start; gap: .5rem; padding: .5rem .6rem; border-radius: 12px; border: 1px solid var(--co-line); cursor: pointer; }
.pk-slotpick:has(input:checked) { border-color: var(--co-brand); background: var(--co-brand-soft); }
.pk-slotpick input { margin-top: .2rem; }
.pk-slotpick b { display: block; }
.pk-slotpick small { display: block; color: var(--co-muted); font-size: .76rem; }
.pk-queue { padding-left: 1.2rem; margin: .4rem 0 .6rem; max-height: 320px; overflow: auto; }
.pk-queue li { margin-bottom: .2rem; }
.pk-results { padding-left: 1.3rem; margin: 0; display: grid; gap: .35rem; }
.pk-radios { display: grid; gap: .45rem; }
.pk-radio { display: flex; align-items: flex-start; gap: .6rem; padding: .65rem .8rem; border-radius: 14px; border: 1px solid var(--co-line); cursor: pointer; }
.pk-radio:has(input:checked) { border-color: var(--co-brand); background: var(--co-brand-soft); }
.pk-radio .form-check-input { margin-top: .2rem; flex: 0 0 auto; }
.pk-repeat { display: flex; flex-wrap: wrap; gap: .5rem; }
.pk-repeat__item { display: inline-flex; flex-direction: column; padding: .45rem .75rem; border-radius: 12px; background: var(--co-bad-bg); color: var(--co-ink); text-decoration: none; }
.pk-repeat__item small { color: var(--co-muted); }

/* Residents: My parking, the move-a-vehicle form, a report's page. */
.pk-page { display: flex; flex-direction: column; gap: .9rem; max-width: 640px; margin: 0 auto; }
.pk-page--wide { max-width: 980px; }
.pk-h { font-size: 1.1rem; font-weight: 700; margin: .35rem 0 .1rem; display: flex; align-items: center; gap: .45rem; }
.pk-flat { display: flex; flex-direction: column; gap: .6rem; }
.pk-big { display: flex; align-items: center; gap: 1rem; min-height: 92px; padding: 1rem 1.1rem; border-radius: 22px; background: #b45309; color: #fff; text-decoration: none; touch-action: manipulation; transition: transform 120ms cubic-bezier(0.23, 1, 0.32, 1); }
.pk-big:hover { color: #fff; }
.pk-big:active { transform: scale(.98); }
.pk-big__icon { flex: 0 0 auto; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 17px; font-size: 1.7rem; background: rgba(255, 255, 255, .2); }
.pk-big b { display: block; font-size: 1.25rem; font-weight: 800; line-height: 1.2; }
.pk-big small { display: block; font-size: .92rem; opacity: .95; margin-top: .15rem; line-height: 1.35; }
.pk-alert { display: flex; align-items: center; gap: .75rem; padding: .85rem 1rem; border-radius: 18px; background: var(--co-bad-bg); border: 1.5px solid var(--co-bad); color: var(--co-ink); text-decoration: none; }
.pk-alert > .bi:first-child { font-size: 1.5rem; color: var(--co-bad); }
.pk-alert b { display: block; font-size: 1.05rem; }
.pk-alert small { display: block; color: var(--co-muted); }
.pk-alert > .bi:last-child { margin-left: auto; color: var(--co-muted); }
.pk-slot { padding: .95rem 1rem; border-radius: 18px; border: 1px solid var(--co-line); background: var(--co-card); box-shadow: var(--co-shadow); display: flex; flex-direction: column; gap: .5rem; }
.pk-slot__top { display: flex; align-items: center; gap: .75rem; }
.pk-slot__code { font-size: 1.25rem; font-weight: 800; letter-spacing: .01em; }
.pk-slot__meta { color: var(--co-muted); font-size: .9rem; }
.pk-inline { padding-top: .5rem; border-top: 1px dashed var(--co-line); }
.pk-none { display: flex; align-items: center; gap: .6rem; padding: .85rem 1rem; border-radius: 16px; background: var(--co-soft); color: var(--co-muted); }
.pk-none > .bi { font-size: 1.3rem; }
.pk-req { display: flex; align-items: center; gap: .7rem; padding: .7rem .85rem; border-radius: 16px; border: 1px solid var(--co-line); background: var(--co-card); color: var(--co-ink); }
.pk-req > .bi { font-size: 1.2rem; color: var(--co-brand-ink); }
.pk-req b { display: block; }
.pk-req small { display: block; color: var(--co-muted); }
.pk-req form { margin-left: auto; }
.pk-req--link { text-decoration: none; }
.pk-req--link .pc-tag { margin-left: auto; }
.pk-ask { padding: .75rem .9rem; border-radius: 16px; border: 1px dashed var(--co-brand); background: var(--co-card); }
.pk-ask > summary { cursor: pointer; font-weight: 700; color: var(--co-brand-ink); min-height: 36px; display: flex; align-items: center; }
.pk-kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .45rem; }
.pk-kind { display: flex; align-items: center; gap: .55rem; min-height: 52px; padding: .55rem .75rem; border-radius: 14px; border: 1.5px solid var(--co-line); background: var(--co-card); font-weight: 600; cursor: pointer; margin: 0; }
.pk-kind > .bi { font-size: 1.25rem; color: var(--co-brand-ink); }
.btn-check:checked + .pk-kind { border-color: var(--co-brand); background: var(--co-brand-soft); }
.btn-check:focus-visible + .pk-kind { outline: 2px solid var(--co-brand); outline-offset: 2px; }
.pk-plate { font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: 1.15rem; }
.pk-plate::placeholder { text-transform: none; letter-spacing: normal; font-weight: 400; }
.pk-issue { display: flex; flex-direction: column; align-items: flex-start; gap: .3rem; padding: 1.1rem; border-radius: 20px; border: 1px solid var(--co-line); background: var(--co-card); box-shadow: var(--co-shadow); }
.pk-issue__plate { display: inline-block; padding: .25rem .6rem; border-radius: 8px; border: 2px solid #111; background: #fff; color: #111; font-weight: 800; letter-spacing: .08em; font-size: 1.2rem; }
.pk-issue__note { font-style: italic; color: var(--co-muted); }
.pk-steps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .45rem; }
.pk-steps li { display: flex; align-items: center; gap: .6rem; padding: .55rem .75rem; border-radius: 12px; background: var(--co-soft); color: var(--co-muted); }
.pk-steps li.is-done { background: var(--co-ok-bg); color: var(--co-ink); }
.pk-steps li.is-done > .bi { color: var(--co-ok); }
.pk-steps li small { margin-left: auto; }
.pk-photo img { max-width: 100%; border-radius: 16px; display: block; }

/* The gate's parking screen. */
.pk-lookup .pk-plate { font-size: 1.25rem; }
.pk-found { display: flex; flex-direction: column; gap: .1rem; margin-top: .75rem; padding: .75rem .85rem; border-radius: 14px; background: var(--co-soft); }
.pk-found__plate { font-size: 1.15rem; letter-spacing: .05em; }
.pk-problem { padding: .85rem 1rem; border-radius: 16px; border: 2px solid var(--co-bad); background: var(--co-bad-bg); }
.pk-problem.is-acked { border-color: var(--co-brand); background: var(--co-brand-soft); }
.pk-problem__head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: 1.1rem; }
.pk-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .6rem; }
.pk-vslot { display: flex; flex-direction: column; gap: .3rem; padding: .7rem .8rem; border-radius: 14px; border: 1.5px solid var(--co-line); background: var(--co-card); }
.pk-vslot.is-free { border-color: rgba(15, 127, 85, .45); }
.pk-vslot.is-taken { background: var(--co-soft); }
.pk-vslot.is-over { border-color: var(--co-bad); background: var(--co-bad-bg); }
.pk-vslot__plate { font-weight: 800; letter-spacing: .05em; }
.pk-vslot small { color: var(--co-muted); }

/* My family: the tenancy of a let-out flat (docs/TENANTS.md) */
.fm-tenancy { display: grid; gap: .6rem; margin: .25rem 0 .9rem; padding: .8rem .9rem; border-radius: 16px; background: var(--co-soft); }
.fm-tenancy__head { display: flex; align-items: center; gap: .5rem; }
.fm-tenancy__head > .bi { font-size: 1.15rem; color: var(--co-brand-ink); }
.fm-tenancy__lives { padding-bottom: .6rem; border-bottom: 1px dashed var(--co-line); }
.fm-radio { display: flex; align-items: flex-start; gap: .5rem; padding: .3rem 0; cursor: pointer; }
.fm-radio .form-check-input { margin-top: .2rem; flex: 0 0 auto; }
.fm-tenancy__row { padding: .6rem .7rem; border-radius: 12px; background: var(--co-card); border: 1px solid var(--co-line); }
.fm-more > summary { cursor: pointer; font-weight: 600; color: var(--co-brand-ink); min-height: 32px; display: flex; align-items: center; }

/* ── Apna Bazaar (docs/BAZAAR.md) ────────────────────────────────── */
/* A colour per kind: products brand blue, services amber, one-time items green. */
.bz-page { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
/* Narrow pages keep the Bazaar menu where it is on every page; only the content narrows. */
.bz-page--narrow > :not(.bz-nav):not(.bz-noprint) { max-width: 780px; width: 100%; }
[data-bz-kind="product"] { --bz: #2748db; --bz-soft: rgba(39, 72, 219, .09); }
[data-bz-kind="service"] { --bz: #b45309; --bz-soft: #fff1e0; }
[data-bz-kind="classified"] { --bz: #0f7f55; --bz-soft: #e2f4eb; }
.bz-nav { margin-bottom: 0; }
.bz-nav .badge { font-size: .68rem; }

.bz-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1rem; align-items: center; padding: 1.4rem 1.5rem; border-radius: 24px; background: linear-gradient(120deg, #1f3bc2 0%, #2748db 55%, #3b5cf0 100%); color: #fff; overflow: hidden; }
.bz-hero__eyebrow { font-size: .78rem; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; opacity: .85; }
.bz-hero__title { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.3rem); font-weight: 800; line-height: 1.12; margin: .35rem 0 .4rem; letter-spacing: -.01em; }
.bz-hero__title span { color: #ffd166; }
.bz-hero__sub { margin: 0 0 .9rem; max-width: 46ch; opacity: .95; }
.bz-hero__actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.bz-hero__actions .btn { border-radius: 999px; font-weight: 700; padding: .55rem 1.1rem; }
.bz-hero__chip { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .65rem; border-radius: 999px; background: rgba(255, 255, 255, .16); font-size: .8rem; font-weight: 700; }
.bz-hero__tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.bz-hero__tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; min-height: 96px; padding: .6rem; border-radius: 18px; background: rgba(255, 255, 255, .12); text-align: center; font-weight: 700; font-size: .85rem; color: #fff; text-decoration: none; }
.bz-hero__tile .bi { font-size: 1.6rem; }
.bz-hero__tile:hover { color: #fff; background: rgba(255, 255, 255, .2); }
@media (max-width: 767.98px) { .bz-hero { grid-template-columns: minmax(0, 1fr); padding: 1.15rem; } .bz-hero__tiles { display: none; } }

.bz-search { display: flex; gap: .5rem; align-items: center; }
.bz-search .form-control { border-radius: 999px; padding-left: 2.4rem; min-height: 46px; font-size: 16px; }
.bz-search__wrap { position: relative; flex: 1 1 auto; min-width: 0; }
.bz-search__wrap > .bi { position: absolute; left: .95rem; top: 50%; transform: translateY(-50%); color: var(--co-muted); }
.bz-search .btn { border-radius: 999px; min-height: 46px; padding: 0 1.1rem; font-weight: 700; }
.bz-tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--co-line); overflow-x: auto; scrollbar-width: none; }
.bz-tabs::-webkit-scrollbar { display: none; }
.bz-tabs a { flex: 0 0 auto; padding: .65rem .9rem; font-weight: 700; color: var(--co-muted); text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.bz-tabs a.is-active { color: var(--co-brand-ink); border-bottom-color: var(--co-brand); }
.bz-cats { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; padding-bottom: .1rem; }
.bz-cats::-webkit-scrollbar { display: none; }
.bz-cats a { flex: 0 0 auto; padding: .35rem .8rem; border-radius: 999px; border: 1px solid var(--co-line); background: var(--co-card); color: var(--co-ink); font-size: .85rem; font-weight: 600; text-decoration: none; }
.bz-cats a.is-active { background: var(--co-ink); border-color: var(--co-ink); color: var(--co-card); }
.bz-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem .9rem; margin: .2rem 0 0; }
.bz-h h2 { font-size: 1.25rem; font-weight: 800; margin: 0; padding-left: .7rem; border-left: 4px solid var(--co-brand); line-height: 1.2; }
.bz-h small { color: var(--co-muted); }

/* Listing cards: the photo beside the words, like the shelves of a shop. */
.bz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: .75rem; }
.bz-card { position: relative; display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: .8rem; padding: .6rem; border-radius: 20px; background: var(--co-card); border: 1px solid var(--co-line); box-shadow: var(--co-shadow); min-width: 0; }
.bz-card__photo { position: relative; display: block; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--bz-soft, var(--co-soft)); }
.bz-card__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bz-card__photo .bi { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2.2rem; color: var(--bz, var(--co-muted)); }
.bz-card__body { display: flex; flex-direction: column; gap: .15rem; min-width: 0; padding: .15rem .1rem; }
.bz-card__title { font-weight: 700; color: var(--co-ink); text-decoration: none; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bz-card__title::after { content: ""; position: absolute; inset: 0; border-radius: 20px; }
.bz-card__by { font-size: .8rem; color: var(--co-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bz-card__price { font-size: 1.15rem; font-weight: 800; color: var(--bz, var(--co-ink)); font-variant-numeric: tabular-nums; }
.bz-card__price small { font-size: .78rem; font-weight: 600; color: var(--co-muted); }
.bz-card__meta { font-size: .8rem; color: var(--co-muted); }
.bz-card__foot { margin-top: auto; display: flex; align-items: center; gap: .4rem; padding-top: .35rem; position: relative; z-index: 1; }
.bz-card__foot form { margin: 0; }
.bz-btn { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; white-space: nowrap; min-height: 40px; padding: 0 1rem; border-radius: 12px; border: 0; font-weight: 700; background: var(--bz, var(--co-brand)); color: #fff; text-decoration: none; touch-action: manipulation; transition: transform 120ms cubic-bezier(0.23, 1, 0.32, 1); }
.bz-btn:hover { color: #fff; filter: brightness(1.06); }
.bz-btn:active { transform: scale(.97); }
.bz-btn[disabled] { opacity: .6; }
.bz-btn--soft { background: var(--bz-soft, var(--co-soft)); color: var(--bz, var(--co-ink)); }
.bz-btn--soft:hover { color: var(--bz, var(--co-ink)); }
.bz-btn--wide { width: 100%; min-height: 48px; font-size: 1.02rem; }
.bz-heart { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--co-line); background: var(--co-card); color: var(--co-muted); }
.bz-heart.is-on { color: #d6336c; border-color: rgba(214, 51, 108, .35); background: #fdeef4; }
.bz-kind { display: inline-flex; align-items: center; gap: .3rem; padding: .1rem .5rem; border-radius: 999px; background: var(--bz-soft); color: var(--bz); font-size: .72rem; font-weight: 700; }
@media (max-width: 575.98px) { .bz-grid { grid-template-columns: minmax(0, 1fr); } .bz-card { grid-template-columns: 104px minmax(0, 1fr); } }

/* Stores: a strip of shop fronts. */
.bz-stores { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .6rem; }
.bz-store { display: flex; align-items: center; gap: .65rem; padding: .55rem; border-radius: 18px; border: 1px solid var(--co-line); background: var(--co-card); text-decoration: none; color: var(--co-ink); min-width: 0; }
.bz-store:hover { color: var(--co-ink); border-color: var(--co-field); }
.bz-store__logo { flex: 0 0 auto; width: 56px; height: 56px; border-radius: 14px; overflow: hidden; display: grid; place-items: center; background: var(--bz-soft); color: var(--bz); font-size: 1.5rem; }
.bz-store__logo img { width: 100%; height: 100%; object-fit: cover; }
.bz-store b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bz-store small { display: block; color: var(--co-muted); }

.bz-sent { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; padding: .85rem 1rem; border-radius: 18px; background: var(--co-ok-bg); border: 1.5px solid rgba(19, 121, 91, .35); color: var(--co-ink); }
.bz-sent > .bi { font-size: 1.5rem; color: var(--co-ok); }
.bz-sent b { display: block; }
.bz-sent a { margin-left: auto; font-weight: 700; }
.bz-soon { display: flex; align-items: center; gap: .8rem; padding: .85rem 1rem; border-radius: 18px; border: 1.5px dashed var(--co-line); color: var(--co-muted); }
.bz-soon > .bi { font-size: 1.5rem; }
.bz-soon b { color: var(--co-ink); }
.bz-empty { display: flex; flex-direction: column; align-items: center; gap: .4rem; padding: 2.2rem 1rem; text-align: center; border-radius: 20px; border: 1.5px dashed var(--co-line); color: var(--co-muted); }
.bz-empty > .bi { font-size: 2rem; color: var(--co-faint); }
.bz-empty b { color: var(--co-ink); font-size: 1.05rem; }

/* An item's page. */
.bz-item { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
@media (max-width: 991.98px) { .bz-item { grid-template-columns: minmax(0, 1fr); } }
.bz-gallery { display: grid; gap: .5rem; }
.bz-gallery__main { aspect-ratio: 4 / 3; border-radius: 22px; overflow: hidden; background: var(--bz-soft, var(--co-soft)); display: grid; place-items: center; color: var(--bz); font-size: 3rem; }
.bz-gallery__main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bz-gallery__thumbs { display: flex; gap: .45rem; overflow-x: auto; scrollbar-width: none; }
.bz-gallery__thumbs a { flex: 0 0 auto; width: 72px; height: 72px; border-radius: 12px; overflow: hidden; border: 2px solid transparent; }
.bz-gallery__thumbs a.is-on { border-color: var(--bz, var(--co-brand)); }
.bz-gallery__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.bz-panel { padding: 1rem 1.1rem; border-radius: 20px; background: var(--co-card); border: 1px solid var(--co-line); box-shadow: var(--co-shadow); min-width: 0; }
.bz-panel h2 { font-size: 1.05rem; font-weight: 800; margin: 0 0 .6rem; }
.bz-title, .bz-panel .bz-title { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.8rem); font-weight: 800; line-height: 1.2; margin: .25rem 0; }
.bz-price { font-size: 1.6rem; font-weight: 800; color: var(--bz); font-variant-numeric: tabular-nums; }
.bz-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .5rem .9rem; margin: .6rem 0; }
.bz-facts dt { font-size: .74rem; font-weight: 600; color: var(--co-muted); margin: 0; }
.bz-facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.bz-days { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; padding-bottom: .2rem; }
.bz-days a { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; min-width: 58px; padding: .4rem .5rem; border-radius: 14px; border: 1.5px solid var(--co-line); color: var(--co-ink); text-decoration: none; font-weight: 700; line-height: 1.15; }
.bz-days a small { font-weight: 600; color: var(--co-muted); font-size: .72rem; }
.bz-days a.is-on { border-color: var(--bz); background: var(--bz-soft); }
.bz-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: .4rem; margin: .6rem 0; }
.bz-slot { margin: 0; }
.bz-slot input { position: absolute; opacity: 0; pointer-events: none; }
.bz-slot span { display: flex; align-items: center; justify-content: center; min-height: 42px; border-radius: 12px; border: 1.5px solid var(--co-line); font-weight: 700; cursor: pointer; font-variant-numeric: tabular-nums; }
.bz-slot input:checked + span { border-color: var(--bz); background: var(--bz-soft); color: var(--bz); }
.bz-slot input:focus-visible + span { outline: 2px solid var(--bz); outline-offset: 2px; }
.bz-qty { display: inline-flex; align-items: center; border: 1.5px solid var(--co-line); border-radius: 14px; overflow: hidden; }
.bz-qty button { width: 44px; height: 44px; border: 0; background: var(--co-soft); font-size: 1.2rem; font-weight: 700; color: var(--co-ink); touch-action: manipulation; }
.bz-qty input { width: 56px; height: 44px; border: 0; text-align: center; font-weight: 700; font-size: 16px; background: var(--co-card); color: var(--co-ink); }
.bz-mine { display: flex; align-items: center; gap: .6rem; padding: .6rem .8rem; border-radius: 14px; background: var(--co-soft); color: var(--co-ink); text-decoration: none; }
.bz-mine:hover { color: var(--co-ink); }
.bz-mine .pc-tag { margin-left: auto; }
.bz-terms { padding: .7rem .85rem; border-radius: 14px; background: var(--co-note-bg); border: 1px solid var(--co-note-line); }

/* Requests: the buyer's and the seller's lists, and one request. */
.bz-reqs { display: flex; flex-direction: column; gap: .5rem; }
.bz-req { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: .75rem; align-items: center; padding: .6rem .75rem; border-radius: 18px; border: 1px solid var(--co-line); background: var(--co-card); color: var(--co-ink); text-decoration: none; }
.bz-req:hover { color: var(--co-ink); border-color: var(--co-field); }
.bz-req__photo { width: 64px; height: 64px; border-radius: 12px; overflow: hidden; display: grid; place-items: center; background: var(--bz-soft, var(--co-soft)); color: var(--bz); font-size: 1.4rem; }
.bz-req__photo img { width: 100%; height: 100%; object-fit: cover; }
.bz-req b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bz-req small { display: block; color: var(--co-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bz-req__side { display: flex; flex-direction: column; align-items: flex-end; gap: .25rem; text-align: right; }
.bz-req__side b { font-variant-numeric: tabular-nums; }
@media (max-width: 575.98px) { .bz-req { grid-template-columns: 52px minmax(0, 1fr); } .bz-req__photo { width: 52px; height: 52px; } .bz-req__side { grid-column: 2; flex-direction: row; justify-content: space-between; align-items: center; } }
.bz-steps { list-style: none; padding: 0; margin: 0; display: flex; gap: .35rem; flex-wrap: wrap; }
.bz-steps li { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .65rem; border-radius: 999px; background: var(--co-soft); color: var(--co-muted); font-size: .82rem; font-weight: 700; }
.bz-steps li.is-done { background: var(--co-ok-bg); color: var(--co-ok); }
.bz-steps li.is-now { background: var(--co-brand); color: #fff; }
.bz-steps li.is-stop { background: var(--co-bad-bg); color: var(--co-bad); }
.bz-history { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.bz-history li { display: flex; flex-wrap: wrap; gap: .2rem .6rem; padding: .5rem .7rem; border-radius: 12px; background: var(--co-soft); font-size: .88rem; }
.bz-history li small { margin-left: auto; color: var(--co-muted); }
.bz-history li em { flex-basis: 100%; color: var(--co-muted); }
.bz-acts { display: grid; gap: .6rem; }
.bz-acts form { margin: 0; }
.bz-or { display: flex; align-items: center; gap: .6rem; color: var(--co-muted); font-size: .8rem; }
.bz-or::before, .bz-or::after { content: ""; flex: 1; height: 1px; background: var(--co-line); }
.bz-who { display: flex; align-items: center; gap: .7rem; padding: .7rem .85rem; border-radius: 16px; background: var(--co-soft); }
.bz-who > .bi { font-size: 1.4rem; color: var(--co-brand-ink); }
.bz-who b { display: block; }
.bz-who small { display: block; color: var(--co-muted); }

/* My store: the shop fronts, storage, the plan. */
.bz-mystore { display: flex; flex-direction: column; gap: .75rem; padding: 1rem; border-radius: 22px; border: 1px solid var(--co-line); background: var(--co-card); box-shadow: var(--co-shadow); min-width: 0; }
.bz-mystore__top { display: flex; align-items: center; gap: .8rem; min-width: 0; }
.bz-mystore__top .bz-store__logo { width: 64px; height: 64px; border-radius: 16px; }
.bz-mystore__name { font-size: 1.2rem; font-weight: 800; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bz-mystore__actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.bz-mystore__actions form { margin: 0; }
.bz-meter { display: grid; gap: .3rem; }
.bz-meter__bar { height: 10px; border-radius: 999px; background: var(--co-soft); overflow: hidden; }
.bz-meter__bar > span { display: block; height: 100%; border-radius: 999px; background: var(--co-ok); }
.bz-meter__bar.is-warn > span { background: #e59a00; }
.bz-meter__bar.is-full > span { background: var(--co-bad); }
.bz-meter__text { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .2rem .5rem; font-size: .82rem; color: var(--co-muted); }
.bz-meter__text b { color: var(--co-ink); }
.bz-open { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .7rem; }
.bz-open__tile { display: flex; align-items: center; gap: .9rem; min-height: 96px; padding: 1rem; border-radius: 22px; background: var(--bz); color: #fff; text-decoration: none; touch-action: manipulation; transition: transform 120ms cubic-bezier(0.23, 1, 0.32, 1); }
.bz-open__tile:hover { color: #fff; }
.bz-open__tile:active { transform: scale(.98); }
.bz-open__tile > .bi { flex: 0 0 auto; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: rgba(255, 255, 255, .2); font-size: 1.6rem; }
.bz-open__tile b { display: block; font-size: 1.12rem; }
.bz-open__tile small { display: block; opacity: .95; line-height: 1.35; }
.bz-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .7rem; }
.bz-plan { position: relative; display: flex; flex-direction: column; gap: .2rem; padding: 1rem; border-radius: 20px; border: 2px solid var(--co-line); background: var(--co-card); cursor: pointer; margin: 0; }
.bz-plan:has(input:checked) { border-color: var(--co-brand); background: var(--co-brand-soft); }
.bz-plan:has(input:focus-visible) { outline: 2px solid var(--co-brand); outline-offset: 2px; }
.bz-plan input { position: absolute; opacity: 0; pointer-events: none; }
.bz-plan__name { font-weight: 800; font-size: 1.05rem; }
.bz-plan__size { font-size: 1.6rem; font-weight: 800; color: var(--co-brand-ink); line-height: 1.1; }
.bz-plan__price { font-weight: 700; }
.bz-plan__price small { color: var(--co-muted); font-weight: 600; }
.bz-plan ul { margin: .35rem 0 0; padding-left: 1.1rem; font-size: .85rem; color: var(--co-muted); }
.bz-plan.is-current::after { content: "Your plan"; position: absolute; top: .7rem; right: .7rem; padding: .1rem .5rem; border-radius: 999px; background: var(--co-ok-bg); color: var(--co-ok); font-size: .72rem; font-weight: 800; }
.bz-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .5rem; }
.bz-photo { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--co-soft); margin: 0; }
.bz-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bz-photo form { position: absolute; top: .35rem; right: .35rem; margin: 0; }
.bz-photo form button { width: 34px; height: 34px; border-radius: 10px; border: 0; background: rgba(18, 18, 18, .65); color: #fff; }
.bz-photo small { position: absolute; left: .4rem; bottom: .35rem; padding: .05rem .4rem; border-radius: 8px; background: rgba(18, 18, 18, .6); color: #fff; font-size: .7rem; }
.bz-photo--add { display: grid; place-items: center; border: 2px dashed var(--co-field); background: var(--co-card); color: var(--co-muted); text-align: center; font-weight: 600; font-size: .85rem; cursor: pointer; }
.bz-photo--add .bi { display: block; font-size: 1.6rem; color: var(--co-brand-ink); }
.bz-photo--add input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.bz-photo--add:focus-within { outline: 2px solid var(--co-brand); outline-offset: 2px; }
.bz-daypick { display: flex; flex-wrap: wrap; gap: .35rem; }
.bz-daypick label { margin: 0; }
.bz-daypick input { position: absolute; opacity: 0; pointer-events: none; }
.bz-daypick span { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; min-height: 40px; padding: 0 .6rem; border-radius: 12px; border: 1.5px solid var(--co-line); font-weight: 700; cursor: pointer; }
.bz-daypick input:checked + span { border-color: var(--co-brand); background: var(--co-brand-soft); color: var(--co-brand-ink); }
.bz-daypick input:focus-visible + span { outline: 2px solid var(--co-brand); outline-offset: 2px; }
.pc-row--bzinv { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.2fr) minmax(0, .9fr) minmax(0, 1fr) var(--pc-act, 150px); --pc-act: 150px; }
.pc-row--bzmod { grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1.1fr) var(--pc-act, 120px); --pc-act: 120px; }
.pc-row--bzlist { grid-template-columns: minmax(0, 2.2fr) minmax(0, .9fr) minmax(0, 1fr) minmax(0, .8fr) var(--pc-act, 150px); --pc-act: 150px; }
@media (max-width: 991.98px) { .pc-row--bzinv, .pc-row--bzmod, .pc-row--bzlist { grid-template-columns: minmax(0, 1fr); } }
@media print { .bz-noprint { display: none !important; } }
