/* hive-ui.css – styles for assets/js/hive-ui.js and the shared line icons (config/icons.php).
   Used by the landing page, the Admin Panel and the Resident Portal. */

/* ---- motion: one set of curves and timings for the whole site (Emil Kowalski's rules: ease-out for things that
        come and go, ease-in-out for things that move on screen, the iOS drawer curve for drawers; UI under 300ms,
        leaving faster than arriving; only transform and opacity where possible) */
:root {
    --hu-ease-out: cubic-bezier(.23, 1, .32, 1);
    --hu-ease-in-out: cubic-bezier(.77, 0, .175, 1);
    --hu-ease-drawer: cubic-bezier(.32, .72, 0, 1);
    --hu-t-press: 120ms;    /* button press */
    --hu-t-pop: 160ms;      /* dropdowns, small pop-ups arriving */
    --hu-t-leave: 120ms;    /* anything closing */
}

/* ---- line icons: sized to the text around them */
.hi { width: 1.1em; height: 1.1em; vertical-align: -.17em; flex: none; display: inline-block; }
.btn .hi, button .hi { margin-right: .15em; }
.ri-ico .hi, .notif-ico .hi, .hot-lead-icon .hi { width: 18px; height: 18px; margin: 0; }
.am-ico .hi { width: 22px; height: 22px; color: var(--accent2, #FFB25C); }
.card-img-icon .hi, .image-placeholder .hi { width: 44px; height: 44px; opacity: .55; }
.lo-grip .hi { width: 14px; height: 14px; }
.hx-ib .hi { width: 15px; height: 15px; margin: 0; }
.pl-menu .hi { width: 16px; height: 16px; color: var(--ink3); }

/* ---- press feedback on anything clickable */
.btn, button, .tab, .chip, .fchip, a.ad-kpi, a.building-stat-card, .sb-item, .pl-chip, .hx-tab, .pc-btn, .ha-chip {
    transition: transform .08s ease, translate .08s ease, scale var(--hu-t-press) var(--hu-ease-out), background-color .15s, border-color .15s, color .15s, box-shadow .15s;
}
/* a slight shrink while pressed – the page heard the click. `scale` (not `transform`): it adds to a button's own
   transform instead of replacing it, so buttons centred with transform: translateY(-50%) – the eye in password boxes,
   clear-search buttons – don't jump away mid-click */
.btn:active:not(:disabled), button:active:not(:disabled), .tab:active, .chip:active, .pl-chip:active, .pc-btn:active, .ha-chip:active { scale: .97; }
/* sidebar links are pressed tens of times a day: no shrink there, the highlight is enough */
.sb button:active:not(:disabled) { scale: none; }
a.ad-kpi:active, a.building-stat-card:active { transform: translateY(0) scale(.995); }

/* ---- a button that is working (form sent, waiting for the next page) */
.is-busy { position: relative; color: transparent !important; pointer-events: none; }
.is-busy::after {
    content: ''; position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%;
    border: 2px solid currentColor; border-color: rgba(26,14,5,.75) rgba(26,14,5,.75) transparent transparent; animation: huSpin .6s linear infinite;
}
.btn-ghost.is-busy::after, .btn-outline.is-busy::after, .btn-secondary.is-busy::after { border-color: var(--brand-light, #FFB25C) var(--brand-light, #FFB25C) transparent transparent; }
@keyframes huSpin { to { transform: rotate(360deg); } }

/* ---- thin progress bar while the next page loads */
.hu-progress { position: fixed; left: 0; top: 0; height: 2px; width: 0; z-index: 2147483000; background: var(--brand, #FF8A00); opacity: 0; pointer-events: none; }
.hu-progress.run { opacity: 1; width: 80%; transition: width 4s cubic-bezier(.1, .7, .2, 1), opacity .2s; }
.hu-progress.done { opacity: 0; width: 100%; transition: width .2s, opacity .4s .2s; }

/* ---- toasts: a deck in the bottom-left corner (hive-ui.js → hiveToast): newest in front, older ones peek out behind,
        pointing at it fans out the newest three. Its height is set by the script, so it never grows up the screen. */
.hu-toasts { position: fixed; left: 20px; bottom: 20px; z-index: 100001; width: min(400px, calc(100vw - 40px)); height: 0; pointer-events: none;
             transition: height .28s cubic-bezier(.2,.8,.2,1); }
.hu-toast {
    position: absolute; left: 0; right: 0; bottom: 0; transform-origin: 50% 100%;
    pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 11px 10px 11px 14px;
    border-radius: 12px; background: #1F2127; color: #F2EEE7; border: 1px solid rgba(255,255,255,.1);
    box-shadow: 0 12px 30px -12px rgba(0,0,0,.6); font-size: 14px; font-weight: 600; line-height: 1.4;
    transition: transform .28s cubic-bezier(.2,.8,.2,1), opacity .28s ease;
    animation: huIn .22s ease-out; cursor: pointer;
}
.hu-toast .hi { width: 18px; height: 18px; flex: none; }
.hu-toast.ok .hi { color: #4ADE80; }
.hu-toast.bad .hi { color: #F87171; }
.hu-toast .hu-msg { flex: 1; min-width: 0; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hu-toasts.open .hu-toast .hu-msg { -webkit-line-clamp: 6; }
.hu-toast .hu-act { border: 0; background: none; color: var(--brand-light, #FFB25C); font: inherit; font-weight: 800; cursor: pointer; padding: 2px 4px; flex: none; }
.hu-toast .hu-x { flex: none; width: 26px; height: 26px; border-radius: 8px; border: 0; background: transparent; color: inherit; opacity: .6;
                  font: 700 18px/1 system-ui, sans-serif; cursor: pointer; display: grid; place-items: center; }
.hu-toast .hu-x:hover, .hu-toast .hu-x:focus-visible { opacity: 1; background: rgba(255,255,255,.1); }
.hu-toast .hu-more { flex: none; padding: 2px 7px; border-radius: 999px; background: rgba(var(--brand-alt-rgb, 255,142,28),.2); color: var(--brand-light, #FFB25C); font-size: 11px; font-weight: 800; }
.hu-toast .hu-more[hidden] { display: none; }
/* leaving: quicker than arriving, and a few pixels down – the way it came in */
.hu-toast.out { opacity: 0 !important; pointer-events: none !important; translate: 0 6px; transition-duration: .18s; transition-property: transform, opacity, translate; }
[data-theme="light"] .hu-toast { background: #1F2127; }
@keyframes huIn { from { opacity: 0; translate: 0 10px; } }
@media (max-width: 600px) {   /* phones: across the bottom, above the round Hive Assist button */
    .hu-toasts { left: 12px; right: 12px; width: auto; bottom: 86px; }
    .hu-toast { font-size: 13px; padding: 9px 8px 9px 12px; }
}
@media (prefers-reduced-motion: reduce) { .hu-toasts, .hu-toast { transition: none; animation: none; } }

/* ---- notification target highlight: "light the card or border" when opened from a notification or toast ---- */
@keyframes hiveTargetPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 138, 0, 0), 0 0 0 rgba(255, 168, 52, 0);
        border-color: rgba(255, 138, 0, 0.4);
    }
    16% {
        box-shadow: 0 0 0 3px #FFA834, 0 0 38px rgba(255, 138, 0, 0.78), inset 0 0 20px rgba(255, 138, 0, 0.15);
        border-color: #FFA834 !important;
    }
    38% {
        box-shadow: 0 0 0 2px rgba(255, 138, 0, 0.65), 0 0 22px rgba(255, 168, 52, 0.45), inset 0 0 10px rgba(255, 138, 0, 0.08);
        border-color: #FF8A00 !important;
    }
    60% {
        box-shadow: 0 0 0 3px #FFA834, 0 0 34px rgba(255, 138, 0, 0.72), inset 0 0 16px rgba(255, 138, 0, 0.12);
        border-color: #FFA834 !important;
    }
    82% {
        box-shadow: 0 0 0 2px rgba(255, 138, 0, 0.55), 0 0 20px rgba(255, 168, 52, 0.35);
        border-color: #FF8A00 !important;
    }
    100% {
        box-shadow: 0 0 0 2px rgba(255, 168, 52, 0.5), 0 0 16px rgba(255, 138, 0, 0.28);
        border-color: rgba(255, 168, 52, 0.85) !important;
    }
}

@keyframes hiveRowPulse {
    0%, 100% {
        background: rgba(255, 138, 0, 0.12);
        outline: 1px solid rgba(255, 168, 52, 0.4);
    }
    50% {
        background: rgba(255, 138, 0, 0.24);
        outline: 1px solid rgba(255, 168, 52, 0.85);
    }
}

.hive-target-highlight {
    border-color: #FFA834 !important;
    animation: hiveTargetPulse 3.5s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
    position: relative !important;
    z-index: 5 !important;
    scroll-margin-top: 86px;
    border-width: 1px !important;
}

.hive-row-highlight {
    animation: hiveRowPulse 2.4s ease-in-out infinite alternate !important;
    border-radius: 8px !important;
    position: relative !important;
    z-index: 6 !important;
    scroll-margin-top: 96px;
}

.hive-target-beacon {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: absolute;
    top: 12px;
    right: 14px;
    padding: 4px 11px;
    border-radius: 999px;
    background: rgba(255, 138, 0, 0.18);
    border: 1px solid rgba(255, 168, 52, 0.6);
    color: #FFA834;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    pointer-events: none;
    animation: huIn 0.25s ease-out;
    box-shadow: 0 4px 14px rgba(255, 138, 0, 0.25);
    z-index: 10;
}
.hive-target-beacon svg {
    width: 13px;
    height: 13px;
    color: #FFA834;
}

/* ---- pop-ups open with a short lift instead of popping in */
.modal-overlay.open { animation: huFade .14s ease-out; }
.modal-overlay.open .modal { animation: huLift .18s var(--hu-ease-out); }
@keyframes huFade { from { opacity: 0; } }
@keyframes huLift { from { opacity: 0; transform: translateY(10px); } }
/* …and fade out when closed instead of vanishing (Chrome, Edge, Safari 17.4+; other browsers close at once as before).
   The closing pop-up no longer takes clicks, so the page underneath answers straight away. */
.modal-overlay { transition: opacity var(--hu-t-leave) var(--hu-ease-out), display var(--hu-t-leave) allow-discrete, overlay var(--hu-t-leave) allow-discrete; }
.modal-overlay:not(.open) { opacity: 0; pointer-events: none; }
.modal-overlay:not(.open) .modal { translate: 0 6px; transition: translate var(--hu-t-leave) var(--hu-ease-out); }

/* ---- small menus under a top-bar button (notifications, your account, "Aa"): grow out of the corner they hang from */
.dropdown-menu { transform-origin: top right; transition: opacity var(--hu-t-pop) var(--hu-ease-out), scale var(--hu-t-pop) var(--hu-ease-out), display var(--hu-t-pop) allow-discrete; }
.dropdown-menu.show { opacity: 1; scale: 1; }
@starting-style { .dropdown-menu.show { opacity: 0; scale: .97; } }
.dropdown-menu:not(.show) { opacity: 0; scale: .98; pointer-events: none; transition-duration: var(--hu-t-leave); }

/* ---- keyboard shortcuts panel ("?") */
.hu-keys { position: fixed; inset: 0; z-index: 100002; display: grid; place-items: center; padding: 16px; background: rgba(8,8,10,.55); }
.hu-keys[hidden] { display: none; }
.hu-keys-card { width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow-y: auto; border-radius: 16px; background: #17191E; color: #F2EEE7;
                border: 1px solid rgba(255,255,255,.12); box-shadow: 0 24px 60px -16px rgba(0,0,0,.75); padding: 0 22px 18px; animation: huLift .18s ease-out; box-sizing: border-box; }
.hu-keys-h { position: sticky; top: 0; z-index: 15; background: #17191E; display: flex; align-items: center; gap: 10px; margin: 0 -22px 12px; padding: 18px 22px 12px; border-bottom: 1px solid rgba(255,255,255,.1); }
.hu-keys-h b { flex: 1; font-size: 15px; }
.hu-keys-h .hi { width: 18px; height: 18px; color: var(--brand-light, #FFB25C); }
.hu-keys-h button { width: 30px; height: 30px; border-radius: 8px; border: 1px solid rgba(255,255,255,.12); background: none; color: inherit; cursor: pointer; display: grid; place-items: center; }
.hu-keys dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.hu-keys dl div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 7px 0; border-top: 1px solid rgba(255,255,255,.07); font-size: 13.5px; }
@media (max-width: 640px) {
    .hu-keys dl { grid-template-columns: 1fr; gap: 0; }
}
.hu-keys dt { margin: 0; color: #A9A397; font-size: 12px; white-space: nowrap; }
.hu-keys dd { margin: 0; text-align: right; }
.hu-keys kbd { display: inline-block; min-width: 22px; padding: 2px 6px; border-radius: 5px; border: 1px solid rgba(255,255,255,.18); border-bottom-width: 2px;
               background: rgba(255,255,255,.05); font: 600 12px/1.3 ui-monospace, SFMono-Regular, Consolas, monospace; text-align: center; color: #F2EEE7; }

/* ---- rows that just changed (lists refreshed in place) */
.rec-changed { animation: huChanged 1.6s ease-out; }
@keyframes huChanged { 0%, 30% { background: rgba(var(--brand-rgb, 255,138,0),.12); } 100% { background: transparent; } }

/* ---- portal pages: blocks come in one after another on a full page load (hive-ui.js sets --hu-i). A work tool,
        so it stays quick and small: the whole page is in place in about half a second and never waits on it */
html.hu-enter .content > * { animation: huRise .28s var(--hu-ease-out) both; animation-delay: calc(var(--hu-i, 0) * 35ms); }
@keyframes huRise { from { opacity: 0; transform: translateY(6px); } }

/* ---- cards: lift a little on hover (mouse only – a tap on a phone would leave them stuck up), with a soft light
        following the cursor */
.content .card, .content .ad-kpi, .content .rd-card, .content .building-stat-card { transition: transform .2s var(--hu-ease-out), border-color .2s, box-shadow .2s; }
@media (hover: hover) and (pointer: fine) {
    .content a.ad-kpi:hover, .content a.building-stat-card:hover, .content a.rd-kpi:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -18px rgba(0,0,0,.6), 0 0 0 1px rgba(var(--brand-rgb, 255,138,0),.18); }
}
/* the light under the mouse (hive-ui.js → spotlight()): warm on dark surfaces, white on orange buttons */
/* (class repeated on purpose: it has to beat themed "!important" glass backgrounds such as the sign-in card) */
/* --hu-spot-strength: how strong the light is, 0 (off) … 1 (the original, brighter look). .4 = 60% softer.
   Set it on :root (or on one page / element) to tune it; hive-ui.js also eases the light toward the cursor. */
:root { --hu-spot-strength: .4; }
.hu-spot.hu-spot.hu-spot { background-image: radial-gradient(var(--hu-r, 220px) circle at var(--mx, 50%) var(--my, 50%), var(--hu-glow, rgb(255 160 70 / calc(.16 * var(--hu-spot-strength)))), transparent 70%) !important; }
.hu-spot.hu-bright { --hu-glow: rgb(255 255 255 / calc(.42 * var(--hu-spot-strength))); }
[data-theme="light"] .hu-spot:not(.hu-bright) { --hu-glow: rgb(255 138 0 / calc(.12 * var(--hu-spot-strength))); }

/* ============ Moving between pages: no white flash ============
   The browser keeps the old page on screen until the new one is ready, then fades only the middle;
   the sidebar and the top bar stay put. (Chrome, Edge, Brave; other browsers just switch pages.)
   Together with the background loading in the portal headers (<script type="speculationrules">)
   page switches feel instant. */
@view-transition { navigation: auto; }
.sb { view-transition-name: hive-sidebar; }
.topbar { view-transition-name: hive-topbar; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .16s; animation-timing-function: ease-out; }
::view-transition-group(hive-sidebar), ::view-transition-group(hive-topbar) { animation-duration: 0s; }
@media (prefers-reduced-motion: reduce) {
    @view-transition { navigation: none; }
}

/* ============ Pages swapped in without reloading (assets/js/hive-nav.js) ============
   Only the content area changes: it fades out a little, the new page slides up into place. */
/* (browsers without view transitions: a quick fade of the content only – no sliding) */
.content.hn-out { opacity: .35; transition: opacity .09s var(--hu-ease-out); pointer-events: none; }
.content.hn-in { animation: hnIn .16s ease-out; }
@keyframes hnIn { from { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .content.hn-out { transition: none; } .content.hn-in { animation: none; } }

/* ============ Skeleton while the next page loads (hive-nav.js → showSkeleton) ============
   Instead of a spinner: the shape of a page – title, figure cards, rows – in grey blocks with a light sweeping across,
   so the next page feels like it is already arriving. Shown only when the page takes longer than a blink. */
.content.hn-loading > :not(.hn-skel) { display: none !important; }
.hn-skel { display: grid; gap: 22px; padding: 4px 0 24px; animation: hnSkelIn .18s ease-out; }
@keyframes hnSkelIn { from { opacity: 0; } }
.hn-skel .sk { display: block; border-radius: 8px; position: relative; overflow: hidden;
    background: color-mix(in srgb, var(--ink, #f2f2f2) 8%, transparent); }
.hn-skel .sk::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--ink, #f2f2f2) 9%, transparent), transparent);
    animation: hnSweep 1.25s ease-in-out infinite; }
@keyframes hnSweep { to { transform: translateX(100%); } }
.hn-skel-head { display: grid; gap: 10px; }
.hn-skel-title { width: min(260px, 60%); height: 26px; }
.hn-skel-sub { width: min(420px, 85%); height: 13px; }
.hn-skel-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.hn-skel .hn-skel-card { height: 92px; border-radius: 14px; }
.hn-skel-panel { display: grid; gap: 4px; padding: 16px; border-radius: 14px; border: 1px solid var(--border, rgba(255,255,255,.08)); }
.hn-skel-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) 84px; align-items: center; gap: 14px; padding: 10px 0; }
.hn-skel-row + .hn-skel-row { border-top: 1px solid var(--border, rgba(255,255,255,.06)); }
.hn-skel .hn-skel-dot { width: 40px; height: 40px; border-radius: 50%; }
.hn-skel-lines { display: grid; gap: 8px; }
.hn-skel-l1 { height: 12px; width: 55%; } .hn-skel-l2 { height: 10px; width: 80%; }
.hn-skel .hn-skel-title, .hn-skel .hn-skel-sub, .hn-skel .hn-skel-l1, .hn-skel .hn-skel-l2 { border-radius: 999px; }   /* text: long rounded bars */
.hn-skel .hn-skel-pill { height: 26px; border-radius: 999px; }
.hn-skel-row:nth-child(3n) .hn-skel-l1 { width: 42%; } .hn-skel-row:nth-child(3n+1) .hn-skel-l2 { width: 66%; }
@media (max-width: 640px) { .hn-skel-row { grid-template-columns: 34px minmax(0, 1fr); } .hn-skel-pill { display: none; } .hn-skel .hn-skel-dot { width: 34px; height: 34px; } }
@media (prefers-reduced-motion: reduce) { .hn-skel { animation: none; } .hn-skel .sk::after { animation: none; display: none; } }
html.hc .hn-skel .sk { background: var(--hc-line, #888); }

/* The page's own skeleton ("ghost", hive-nav.js → rememberGhost): the page's real layout – its cards, borders and
   columns stay as they are – with every word drawn as a grey bar, pictures and fields as grey blocks, and one light
   sweeping across the whole page. Nothing in it can be clicked. */
.hn-skel.hn-ghost { display: block; gap: 0; padding: 0; position: relative; overflow: hidden; pointer-events: none; user-select: none; }
.hn-ghost * { color: transparent !important; text-shadow: none !important; background-image: none !important; box-shadow: none !important;
    animation: none !important; transition: none !important; caret-color: transparent; }
.hn-ghost *::before, .hn-ghost *::after { content: none !important; }
.hn-ghost .gt { display: inline-block; vertical-align: middle; max-width: 100%; border-radius: 999px;
    background: color-mix(in srgb, var(--ink, #f2f2f2) 10%, transparent) !important; }
.hn-ghost .gt-line { display: block; }   /* a paragraph: one bar per line, stacked */
.hn-ghost .gm, .hn-ghost .gf { background: color-mix(in srgb, var(--ink, #f2f2f2) 9%, transparent) !important; border-color: transparent !important; }
.hn-ghost .gf { min-height: 1em; }
/* buttons, badges and chips lose their colour: grey shapes like everything else */
.hn-ghost .gb, .hn-ghost [class*="badge"], .hn-ghost [class*="pill"], .hn-ghost [class*="chip"], .hn-ghost [class*="tag"], .hn-ghost [class*="count"] {
    background-color: color-mix(in srgb, var(--ink, #f2f2f2) 7%, transparent) !important; border-color: transparent !important; }
.hn-ghost .gb .gt, .hn-ghost [class*="badge"] .gt, .hn-ghost [class*="count"] .gt { background: transparent !important; }
.hn-skel.hn-ghost::after { content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(100deg, transparent 35%, color-mix(in srgb, var(--ink, #f2f2f2) 8%, transparent) 50%, transparent 65%);
    background-size: 250% 100%; animation: hnGhostSweep 1.3s ease-in-out infinite; }
@keyframes hnGhostSweep { from { background-position: 120% 0; } to { background-position: -20% 0; } }
@media (prefers-reduced-motion: reduce) { .hn-skel.hn-ghost::after { animation: none; display: none; } }
html.hc .hn-ghost .gt, html.hc .hn-ghost .gm, html.hc .hn-ghost .gf { background: var(--hc-line, #888) !important; }

/* ============ Form controls: every dropdown and date box on the site follows the theme ============
   (first made for the Audit Log filters). Each page keeps its own field size and colours; what changes is
   the orange arrow, and the open list: a card like the rest of the site with an orange tick, highlight and scrollbar.
   Chrome / Edge / Brave draw the open list from these rules; other browsers show their own list in light or dark. */
select:not([multiple]):not([size]), input[type="date"], input[type="time"], input[type="datetime-local"], input[type="month"] {
    color-scheme: dark; accent-color: var(--accent, #FF8A00);
}
[data-theme="light"] select:not([multiple]):not([size]), [data-theme="light"] input[type="date"], [data-theme="light"] input[type="time"],
[data-theme="light"] input[type="datetime-local"], [data-theme="light"] input[type="month"] { color-scheme: light; }
@supports (appearance: base-select) {
    select:not([multiple]):not([size]), select:not([multiple]):not([size])::picker(select) { appearance: base-select; }
    select:not([multiple]):not([size]) { display: inline-flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; }
    select.fi:not([multiple]):not([size]), .content select:not([multiple]):not([size]), .modal select:not([multiple]):not([size]) { display: flex; }
    select:not([multiple]):not([size]):hover:not(:disabled) { border-color: rgba(var(--brand-rgb, 255,138,0),.5); }
    select:not([multiple]):not([size])::picker-icon { color: var(--accent, #FF8A00); transition: rotate .2s; }
    select:not([multiple]):not([size]):open::picker-icon { rotate: 180deg; }
    select:not([multiple]):not([size])::picker(select) {
        margin-top: 6px; padding: 6px; border: 1px solid var(--border, rgba(255,255,255,.12)); border-radius: 14px;
        background: var(--card, #17181c); color: var(--ink, #F4F1EC); box-shadow: 0 22px 50px -18px rgba(0,0,0,.6);
        max-height: min(340px, 60vh); overflow-y: auto;
    }
    [data-theme="light"] select:not([multiple]):not([size])::picker(select) { box-shadow: 0 22px 50px -20px rgba(60,40,10,.3); }
    select:not([multiple]):not([size])::picker(select)::-webkit-scrollbar { width: 8px; }
    select:not([multiple]):not([size])::picker(select)::-webkit-scrollbar-thumb { background: var(--accent, #FF8E1C); border-radius: 8px; }
    select:not([multiple]):not([size])::picker(select)::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
    @supports not selector(::-webkit-scrollbar) { select:not([multiple]):not([size])::picker(select) { scrollbar-width: thin; scrollbar-color: var(--accent, #FF8E1C) transparent; } }
    select:not([multiple]):not([size]) option { padding: 8px 12px; border-radius: 9px; font-size: .86rem; color: var(--ink, #F4F1EC); background: transparent; }
    select:not([multiple]):not([size]) option:hover, select:not([multiple]):not([size]) option:focus-visible { background: rgba(var(--brand-rgb, 255,138,0),.12); color: var(--accent, #FF8A00); outline: none; }
    select:not([multiple]):not([size]) option:checked { background: rgba(var(--brand-rgb, 255,138,0),.2); color: var(--accent, #FF8A00); font-weight: 700; }
    select:not([multiple]):not([size]) option:disabled { opacity: .45; }
    select:not([multiple]):not([size]) option::checkmark { color: var(--accent, #FF8A00); }
    select:not([multiple]):not([size]) optgroup { font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink3, #9a9590); padding: 6px 8px 2px; }
}
/* Filter bars (Resident → Marketplace, Admin → All Listings …) look like the Audit Log filters:
   small uppercase labels, rounded dark boxes of one height, the orange-arrow dropdowns above */
.content .filter-bar { gap: 12px; padding: 16px 18px; border-radius: 20px; border: 1px solid var(--border); background: var(--card); align-items: flex-end; }
.content .filter-bar .filter-group { gap: 5px; }
.content .filter-bar .filter-group > label { font-size: .68rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--ink3); }
.content .filter-bar input.fi, .content .filter-bar select.fi {
    min-height: 42px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg); color: var(--ink);
    font: inherit; font-size: .85rem; font-weight: 500; letter-spacing: 0; text-transform: none; width: 100%;
}
.content .filter-bar input.fi:focus, .content .filter-bar select.fi:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--brand-rgb, 255,138,0),.18); }
.content .filter-bar .price-filter input.fi { width: 110px; }
.content .filter-bar .btn-group { display: flex; gap: 8px; }
.content .filter-bar .btn-group .btn { min-height: 42px; border-radius: 12px; }
@media (max-width: 768px) { .content .filter-bar .price-filter input.fi { width: 100%; } }

/* the calendar / clock button: a pointer and a little brighter on hover */
input[type="date"]::-webkit-calendar-picker-indicator, input[type="time"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator, input[type="month"]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .8; }
input[type="date"]::-webkit-calendar-picker-indicator:hover, input[type="time"]::-webkit-calendar-picker-indicator:hover { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
    html.hu-enter .content > * { animation: none; }
    .content a.ad-kpi:hover, .content a.building-stat-card:hover { transform: none; }
    .modal-overlay.open, .modal-overlay.open .modal, .hu-toast, .hu-keys-card, .rec-changed { animation: none; }
    .hu-progress.run { transition: none; }
    /* nothing moves; the short fades that tell you something opened or closed stay */
    .btn:active:not(:disabled), button:active:not(:disabled), .tab:active, .chip:active, .pl-chip:active, .pc-btn:active, .ha-chip:active { scale: none; }
    .modal-overlay:not(.open) .modal, .hu-toast.out { translate: none; }
    .dropdown-menu, .dropdown-menu:not(.show) { scale: none; }
    @starting-style { .dropdown-menu.show { scale: none; } }
}
@media print { .hu-toasts, .hu-progress, .hu-keys { display: none !important; } }

/* ============ Admin: one-time tip pointing at the keyboard-shortcuts button ============ */
.hu-keytip { position: fixed; z-index: 100001; width: min(300px, calc(100vw - 24px)); padding: 14px 16px; border-radius: 14px;
             background: #17191E; color: #F2EEE7; border: 1px solid rgba(var(--brand-light-rgb, 255,178,92),.35); box-shadow: 0 18px 50px rgba(0,0,0,.45);
             font-size: 13px; line-height: 1.5; animation: huTipIn .25s ease-out; }
.hu-keytip::before { content: ''; position: absolute; top: -7px; right: var(--arrow, 24px); width: 12px; height: 12px; transform: rotate(45deg);
                     background: #17191E; border-left: 1px solid rgba(var(--brand-light-rgb, 255,178,92),.35); border-top: 1px solid rgba(var(--brand-light-rgb, 255,178,92),.35); }
.hu-keytip b { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 4px; }
.hu-keytip b .hi { width: 18px; height: 18px; color: var(--brand-light, #FFB25C); }
.hu-keytip p { margin: 0; color: #C9C3B8; }
.hu-keytip kbd { display: inline-block; min-width: 20px; padding: 1px 6px; border-radius: 5px; border: 1px solid rgba(255,255,255,.2); border-bottom-width: 2px;
                 font: 600 11.5px/1.5 ui-monospace, Consolas, monospace; text-align: center; color: #F2EEE7; }
.hu-keytip-a { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.hu-keytip-a button { padding: 7px 14px; border-radius: 9px; font: inherit; font-weight: 700; cursor: pointer; border: 1px solid rgba(255,255,255,.16); background: none; color: inherit; }
.hu-keytip-a button[data-tip="ok"] { background: var(--brand, #FF8A00); border-color: var(--brand, #FF8A00); color: #1A0E05; }
.hu-keytip-a button:hover { filter: brightness(1.1); }
.hu-keytip-a button:focus-visible { outline: 2px solid var(--brand-light, #FFB25C); outline-offset: 2px; }
.hu-keytip.out { opacity: 0; transform: translateY(-4px); transition: opacity .2s, transform .2s; }
@keyframes huTipIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .hu-keytip { animation: none; } }
@media print { .hu-keytip { display: none !important; } }
.tb-keys svg { width: 18px; height: 18px; }

/* ============ Medium theme: pop-ups that had a near-black colour written in get the medium-gray surfaces ============ */
[data-tone="medium"] .hu-toast, [data-tone="medium"] .hu-keys-card, [data-tone="medium"] .hu-keytip, [data-tone="medium"] .hu-keytip::before {
    background: #1F2023; color: #F5F5F5; border-color: #55575D; }
[data-tone="medium"] .hu-keys { background: rgba(12, 12, 14,.6); }
[data-tone="medium"] .hu-keytip b .hi { color: #FFCB8A; }

/* ============ Tooltips (hive-ui.js): the site's own hint bubble instead of the browser's grey box ============
   Follows the theme (card colour, text, border), with a small arrow pointing at the element. */
.hu-tip { position: fixed; z-index: 2147483600; max-width: min(280px, calc(100vw - 16px)); padding: 7px 12px; border-radius: 10px; pointer-events: none;
          background: var(--bg2, var(--card, #181B20)); color: var(--ink, #F5F5F5); border: 1px solid var(--accent-line, var(--border2, rgba(245,158,11,.35)));
          box-shadow: 0 12px 28px -6px rgba(0,0,0,.55), 0 0 0 1px rgba(245,158,11,.12); font: 600 12.5px/1.4 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
          letter-spacing: .01em; overflow-wrap: anywhere; opacity: 0; transform: translateY(3px) scale(.98); transition: opacity .14s ease, transform .14s ease; }
.hu-tip.in { opacity: 1; transform: none; }
.hu-tip[data-side="right"] { transform: translateX(-3px) scale(.98); }
.hu-tip[data-side="right"].in { transform: none; }
.hu-tip::before { content: ''; position: absolute; width: 8px; height: 8px; background: inherit; border: inherit; border-width: 0 1px 1px 0; }
.hu-tip[data-side="top"]::before { bottom: -5px; left: calc(var(--hu-tip-arrow, 50%) - 4px); transform: rotate(45deg); }
.hu-tip[data-side="bottom"]::before { top: -5px; left: calc(var(--hu-tip-arrow, 50%) - 4px); transform: rotate(-135deg); }
.hu-tip[data-side="right"]::before { left: -5px; top: calc(var(--hu-tip-arrow, 50%) - 4px); transform: rotate(135deg); }
[data-theme="light"] .hu-tip { box-shadow: 0 10px 26px -10px rgba(60,40,10,.28); }
html.hc .hu-tip { background: var(--hc-bg) !important; color: var(--hc-ink) !important; border: 2px solid var(--hc-line) !important; box-shadow: none !important; }
html.hc .hu-tip::before { border-width: 0 2px 2px 0; }
@media (prefers-reduced-motion: reduce) { .hu-tip { transition: none; transform: none !important; } }
@media print { .hu-tip { display: none !important; } }

/* ---------- Hive calendar (assets/js/hive-date.js): replaces the browser's date picker on computers ----------
   The field keeps a calendar icon in Hive orange; the panel uses the same surface, border, radius and orange
   selection as the other dropdowns, in every theme. On phones and tablets it is a sheet from the bottom (.hd-sheet). */
html.hd-cal-on :is(input[type="date"], input[type="datetime-local"], input[type="month"]):not(:disabled) { cursor: pointer; padding-right: 38px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FF8A00' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2.5'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; background-size: 17px; }
html.hd-cal-on :is(input[type="date"], input[type="datetime-local"], input[type="month"])::-webkit-calendar-picker-indicator { display: none; }
:is(input[type="date"], input[type="datetime-local"], input[type="month"])[aria-expanded="true"] { border-color: var(--accent, #FF8A00) !important; box-shadow: 0 0 0 3px rgba(var(--brand-rgb, 255,138,0),.18); }

/* ============ The Hive Custom File Upload Controls ============
   Styles native input[type="file"] and its choose-file button to match The Hive design system across all themes */
input[type="file"][hidden],
input[type="file"][style*="display: none"],
input[type="file"][style*="display:none"],
label.btn input[type="file"],
.btn input[type="file"],
.rd-pay-up input[type="file"],
.sr-only input[type="file"] {
    display: none !important;
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
input[type="file"]:not([hidden]):not([style*="display: none"]):not([style*="display:none"]):not(.btn input),
.fi[type="file"]:not([hidden]):not([style*="display: none"]):not([style*="display:none"]),
.content input[type="file"]:not([hidden]):not([style*="display: none"]):not([style*="display:none"]):not(.btn input),
.modal input[type="file"]:not([hidden]):not([style*="display: none"]):not([style*="display:none"]):not(.btn input) {
    display: flex;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    min-height: 44px;
    padding: 5px 12px;
    font: 500 .84rem/1.5 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    color: var(--ink3, #a59e93);
    background: var(--bg2, rgba(255,255,255,.04));
    border: 1px solid var(--border2, var(--border, rgba(255,255,255,.12)));
    border-radius: var(--r-sm, 12px);
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
input[type="file"]:hover,
.fi[type="file"]:hover {
    border-color: var(--accent, #FF8A00);
}
input[type="file"]:focus,
input[type="file"]:focus-visible,
.fi[type="file"]:focus,
.fi[type="file"]:focus-visible {
    outline: none;
    border-color: var(--accent, #FF8A00);
    box-shadow: 0 0 0 3px rgba(var(--brand-rgb, 255,138,0),.22);
}

input[type="file"]::file-selector-button,
input[type="file"]::-webkit-file-upload-button {
    margin-right: 12px;
    padding: 6px 15px;
    border-radius: 999px;
    border: 1px solid rgba(var(--brand-rgb, 255,138,0),.45);
    background: var(--accent-dim, rgba(var(--brand-rgb, 255,138,0),.12));
    color: var(--accent2, var(--accent, #FF8A00));
    font: 700 .78rem 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    letter-spacing: .02em;
    cursor: pointer;
    vertical-align: middle;
    transition: background .15s ease, color .15s ease, border-color .15s ease, transform .12s ease, box-shadow .15s ease;
}
input[type="file"]:hover::file-selector-button,
input[type="file"]::file-selector-button:hover,
input[type="file"]::-webkit-file-upload-button:hover {
    background: var(--accent, #FF8A00);
    color: var(--on-accent, #111827);
    border-color: var(--accent, #FF8A00);
    box-shadow: 0 2px 8px rgba(var(--brand-rgb, 255,138,0),.35);
    transform: translateY(-1px);
}
input[type="file"]:active::file-selector-button,
input[type="file"]::file-selector-button:active,
input[type="file"]::-webkit-file-upload-button:active {
    transform: translateY(0);
}

[data-theme="light"] input[type="file"],
[data-theme="light"] .fi[type="file"],
[data-theme="light"] .content input[type="file"],
[data-theme="light"] .modal input[type="file"] {
    background: #FFFFFF;
    border-color: var(--border, #E5E7EB);
    color: var(--ink3, #6B7280);
}
[data-theme="light"] input[type="file"]::file-selector-button,
[data-theme="light"] input[type="file"]::-webkit-file-upload-button {
    background: rgba(var(--brand-rgb, 255,138,0),.12);
    color: #9A4A05;
    border-color: rgba(var(--brand-rgb, 255,138,0),.4);
}
[data-theme="light"] input[type="file"]:hover::file-selector-button,
[data-theme="light"] input[type="file"]::file-selector-button:hover,
[data-theme="light"] input[type="file"]::-webkit-file-upload-button:hover {
    background: var(--accent, #FF8A00);
    color: #FFFFFF;
    border-color: var(--accent, #FF8A00);
}

html.hc input[type="file"],
html.hc .fi[type="file"] {
    background: var(--hc-bg, #000) !important;
    border: 2px solid var(--hc-line, #fff) !important;
    color: var(--hc-ink, #fff) !important;
}
html.hc input[type="file"]::file-selector-button,
html.hc input[type="file"]::-webkit-file-upload-button {
    background: var(--hc-link, #ffd400) !important;
    color: #000000 !important;
    border: 2px solid var(--hc-line, #fff) !important;
    box-shadow: none !important;
}
/* 2026-11-25: above the request pop-ups (.er-back 99000, edit-request-modal.js) – the calendar opened behind them – and below the confirm dialogs (.hd-backdrop 100000) and messages */
.hd-cal { position: fixed; z-index: 99500; width: 292px; padding: 12px; border-radius: 16px; border: 1px solid var(--border2, var(--border));
    background: var(--glass-strong, var(--card)); color: var(--ink); box-shadow: 0 22px 50px -20px rgba(0,0,0,.75);
    -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); font-size: .86rem; animation: hd-cal-in .16s var(--hu-ease-out, ease-out); }
[data-theme="light"] .hd-cal { box-shadow: 0 22px 50px -20px rgba(60,40,10,.3); }
.hd-cal[hidden] { display: none; }
@keyframes hd-cal-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.hd-cal button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.hd-cal button:focus-visible { outline: 2px solid var(--accent2, #FFB25C); outline-offset: 1px; }
.hd-cal-head { position: sticky; top: 0; z-index: 15; background: var(--card, #17191E); display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.hd-cal-title { padding: 6px 8px; border-radius: 9px; font-weight: 800; letter-spacing: .01em; }
.hd-cal-title:hover { background: rgba(var(--brand-rgb, 255,138,0),.1); color: var(--accent2, #FFB25C); }
.hd-cal-nav { display: flex; gap: 4px; }
.hd-cal-nav button { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--border) !important; font-size: 1.15rem; line-height: 1; color: var(--accent, #FF8A00); }
.hd-cal-nav button:hover { border-color: rgba(var(--brand-rgb, 255,138,0),.5) !important; background: rgba(var(--brand-rgb, 255,138,0),.08); }
.hd-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.hd-cal-dow { padding: 4px 0 6px; text-align: center; font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink3); }
.hd-cal-d { height: 36px; border-radius: 10px; font-variant-numeric: tabular-nums; font-weight: 600; }
.hd-cal-d:hover:not(:disabled) { background: rgba(var(--brand-rgb, 255,138,0),.12); color: var(--accent2, #FFB25C); }
.hd-cal-d.out { color: var(--ink3); opacity: .55; }
.hd-cal-d.today { box-shadow: inset 0 0 0 1.5px var(--accent, #FF8A00); color: var(--accent2, #FFB25C); }
.hd-cal-d.on { background: var(--accent, #FF8A00) !important; color: #1a0e05 !important; font-weight: 800; box-shadow: none; }
.hd-cal-d:disabled { opacity: .25; cursor: not-allowed; text-decoration: line-through; }
.hd-cal-months { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 4px 0; }
.hd-cal-m { height: 44px; border-radius: 10px; border: 1px solid var(--border) !important; font-weight: 700; }
.hd-cal-m:hover { border-color: rgba(var(--brand-rgb, 255,138,0),.5) !important; color: var(--accent2, #FFB25C); }
.hd-cal-m.on { background: rgba(var(--brand-rgb, 255,138,0),.16); border-color: var(--accent, #FF8A00) !important; color: var(--accent2, #FFB25C); }
.hd-cal-foot { position: sticky; bottom: 0; z-index: 15; background: var(--card, #17191E); display: flex; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.hd-cal-foot button { padding: 7px 12px; border-radius: 9px; font-weight: 800; color: var(--accent2, #FFB25C); }
.hd-cal-foot button:hover:not(:disabled) { background: rgba(var(--brand-rgb, 255,138,0),.1); }
.hd-cal-foot button:disabled { opacity: .35; cursor: not-allowed; }
.hd-cal-foot .hd-cal-clear { color: var(--ink2); }
.hd-cal-foot button[hidden] { visibility: hidden; display: inline-block; }
[data-theme="light"] .hd-cal-d:hover:not(:disabled), [data-theme="light"] .hd-cal-d.today, [data-theme="light"] .hd-cal-title:hover,
[data-theme="light"] .hd-cal-m:hover, [data-theme="light"] .hd-cal-m.on, [data-theme="light"] .hd-cal-foot button { color: #9A4A05; }
html.hc .hd-cal { background: var(--hc-bg, #000) !important; border: 2px solid var(--hc-line, #fff) !important; box-shadow: none; }
html.hc .hd-cal-d.on { outline: 3px solid var(--hc-link, #ffd400); }
@media (prefers-reduced-motion: reduce) { .hd-cal { animation: none; } }
/* date and time fields: the time row under the calendar, and Done */
.hd-cal-time { display: flex; align-items: center; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.hd-cal-time[hidden] { display: none; }
.hd-cal-time-l { margin-right: auto; font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink3); }
.hd-cal-time select { min-width: 62px; height: 34px; padding: 0 8px; border-radius: 9px; border: 1px solid var(--border); background: var(--bg2, transparent); color: var(--ink); font: inherit; font-variant-numeric: tabular-nums; }
.hd-cal-ampm { display: inline-flex; padding: 2px; border-radius: 10px; border: 1px solid var(--border); }
.hd-cal-ampm button { padding: 5px 9px; border-radius: 8px; font-size: .78rem; font-weight: 800; color: var(--ink2); }
.hd-cal-ampm button[aria-pressed="true"] { background: var(--accent, #FF8A00); color: #1a0e05; }
.hd-cal-foot .hd-cal-done { margin-left: auto; padding: 7px 16px; background: var(--accent, #FF8A00); color: #1a0e05 !important; }
.hd-cal-foot .hd-cal-done:hover { background: var(--accent2, #FFB25C) !important; }
.hd-cal-foot .hd-cal-done[hidden] { display: none; }
.hd-cal-m.today { box-shadow: inset 0 0 0 1.5px var(--accent, #FF8A00); }
.hd-cal-m:disabled { opacity: .3; cursor: not-allowed; }
/* phones and tablets: the calendar rises from the bottom of the screen, over a dimmed page, with bigger days to tap */
.hd-cal-scrim { position: fixed; inset: 0; z-index: 99499; background: rgba(0,0,0,.5); animation: hd-scrim-in .2s ease-out; }
.hd-cal-scrim[hidden] { display: none; }
@keyframes hd-scrim-in { from { opacity: 0; } }
.hd-cal.hd-sheet { top: auto; left: 0; right: 0; bottom: 0; width: auto; max-width: 440px; margin: 0 auto; max-height: 92dvh; overflow-y: auto;
    padding: 18px 16px calc(14px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; border-bottom: 0; font-size: .95rem;
    background: var(--card, var(--glass-strong)); -webkit-backdrop-filter: none; backdrop-filter: none; overscroll-behavior: contain;
    animation: hd-sheet-in .26s var(--hu-ease-drawer, cubic-bezier(.32,.72,0,1)); }
.hd-cal.hd-sheet::before { content: ""; position: absolute; top: 7px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 4px; background: var(--border2, var(--border)); }
@keyframes hd-sheet-in { from { transform: translateY(100%); } }
.hd-sheet .hd-cal-d { height: 44px; }
.hd-sheet .hd-cal-nav button { width: 40px; height: 40px; }
.hd-sheet .hd-cal-m { height: 50px; }
.hd-sheet .hd-cal-time select { height: 42px; font-size: 16px; }
.hd-sheet .hd-cal-ampm button { padding: 9px 12px; }
.hd-sheet .hd-cal-foot button { padding: 11px 16px; }
@media (prefers-reduced-motion: reduce) { .hd-cal.hd-sheet { animation: hd-scrim-in .16s ease-out; } }
.hd-cal-title:disabled { cursor: default; background: none !important; color: inherit !important; }

/* ============ Portal curtain (config/portal-curtain.php) ============
   Entering the Admin Panel or the Resident Portal: the hive mark draws itself over the portal's name, the orange line
   fills, and the curtain lifts – the website's opening, a little shorter (about 1.7 s). Never with reduced motion. */
.portal-loader { display: none; }
.portal-intro .portal-loader { position: fixed; inset: 0; z-index: 100000; display: grid; place-items: center; align-content: center; gap: 18px;
    background: var(--bg, #0B0C0F); color: var(--brand, #FF8A00); animation: portalLift .65s cubic-bezier(.65,0,.35,1) 1.05s both; }
@keyframes portalLift { to { clip-path: inset(0 0 100% 0); visibility: hidden; } }
.portal-loader-mark { width: 76px; height: auto; }
.portal-loader-mark path { stroke-dasharray: 150; stroke-dashoffset: 150; animation: portalDraw 1s cubic-bezier(.65,0,.35,1) both; }
.portal-loader-mark path:nth-child(2) { animation-delay: .12s; } .portal-loader-mark path:nth-child(3) { animation-delay: .24s; }
@keyframes portalDraw { to { stroke-dashoffset: 0; } }
.portal-loader-name { font-size: 1.05rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--ink, #F2EEE8);
    animation: portalName .7s ease-out .25s both; }
@keyframes portalName { from { opacity: 0; transform: translateY(10px); } }
.portal-loader-bar { display: block; width: 110px; height: 2px; border-radius: 2px; background: color-mix(in srgb, var(--ink, #F2EEE8) 14%, transparent); overflow: hidden; }
.portal-loader-bar i { display: block; height: 100%; background: var(--brand, #FF8A00); transform-origin: left; animation: portalBar 1.1s cubic-bezier(.65,0,.35,1) both; }
@keyframes portalBar { from { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { .portal-intro .portal-loader { display: none; } }
/* who is signed in, under the portal's name (Owner, Tenant, Non-resident, Guest; Administrator, Super admin …) */
.portal-loader-role { margin-top: -8px; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand, #FF8A00);
    animation: portalName .7s ease-out .4s both; }

/* ============ Universal Large Text Accessibility (Aa panel -> Larger text) ============
   Native rem root typography scaling that functions 100% reliably across iOS (iPhone/iPad),
   Android, macOS Safari, Windows, mobile, tablet and desktop. */
html.lg {
    font-size: 18.5px !important;
    -webkit-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;
}
@media (max-width: 640px) {
    html.lg {
        font-size: 18px !important;
    }
}
html.lg body {
    font-size: 17.5px;
    line-height: 1.6;
}
html.lg .content {
    font-size: 1.04rem;
}
html.lg :is(input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea) {
    font-size: 1rem !important;
}
html.lg .badge, html.lg .pill, html.lg .status-pill {
    font-size: 0.82rem;
}
html.lg .sb-nav, html.lg .sb-logo {
    font-size: 1.05rem;
}

/* ── Errors you can't miss (2026-11-21, client: "wrong password, invalid code… are not noticeable") ─────────────────
   Every real error box – sign-in, two-step, forgot password, verify email, the portals' red alerts – looks the same:
   red, a red bar on the left, a warning icon, larger bold text, left-aligned, and a short shake when it appears.
   Notices that share the old .error class (role="status": "password changed", "signed out") stay calm. */
.error[role="alert"], .signup-error, .alert-r, .alert-danger, .alert-error, .v2-vip-error {
    position: relative !important;
    display: block;
    text-align: left !important;
    padding: 12px 14px 12px 42px !important;
    border-radius: 12px !important;
    border: 1px solid rgba(239, 68, 68, .5) !important;
    border-left: 4px solid #ef4444 !important;
    background: rgba(239, 68, 68, .14) !important;
    color: #fecaca !important;
    font-size: .9rem !important;
    font-weight: 600 !important;
    line-height: 1.45 !important;
    animation: hiveErrShake .42s cubic-bezier(.36, .07, .19, .97) both;
}
.error[role="alert"]::before, .signup-error::before, .alert-r::before, .alert-danger::before, .alert-error::before, .v2-vip-error::before {
    content: '';
    position: absolute;
    left: 13px;
    top: 13px;
    width: 18px;
    height: 18px;
    background: #ef4444;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 7v6M12 17h.01'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 7v6M12 17h.01'/%3E%3C/svg%3E") center / contain no-repeat;
}
[data-theme="light"] .error[role="alert"], [data-theme="light"] .signup-error, [data-theme="light"] .alert-r,
[data-theme="light"] .alert-danger, [data-theme="light"] .alert-error, [data-theme="light"] .v2-vip-error {
    background: #fef2f2 !important;
    color: #991b1b !important;
    border-color: #fca5a5 !important;
    border-left-color: #dc2626 !important;
}
[data-theme="light"] .error[role="alert"]::before, [data-theme="light"] .signup-error::before, [data-theme="light"] .alert-r::before,
[data-theme="light"] .alert-danger::before, [data-theme="light"] .alert-error::before, [data-theme="light"] .v2-vip-error::before { background: #dc2626; }
.error[role="alert"][hidden], .v2-vip-error[hidden], .alert-r[hidden] { display: none !important; }
/* a notice in the old .error box: calm, readable, not red */
.error[role="status"] { font-size: .85rem !important; font-weight: 600; line-height: 1.45; text-align: left !important; padding: 11px 14px !important; border-radius: 12px !important; }
/* the field that was wrong (assets/js/form-errors.js) and the small line under a field (assets/js/input-rules.js) */
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, .25) !important;
}
.hive-field-err { font-size: .82rem !important; font-weight: 600; }
@keyframes hiveErrShake {
    0% { opacity: 0; transform: translateX(0); }
    15% { opacity: 1; transform: translateX(-6px); }
    30% { transform: translateX(5px); }
    45% { transform: translateX(-4px); }
    60% { transform: translateX(3px); }
    75% { transform: translateX(-1px); }
    100% { opacity: 1; transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
    .error[role="alert"], .signup-error, .alert-r, .alert-danger, .alert-error, .v2-vip-error { animation: none; }
}

/* ── Desktop density (2026-11-25, client: "100% should look like the browser at 90%") ─────────────────────────────
   On computer screens the sidebar and the page are drawn at 90%, like the browser's own 90% zoom. Only these two
   parts are zoomed – pop-ups, menus, toasts and dialogs that scripts attach to <body> keep their exact positions.
   Phones / small tablets (under 1024px) are left at full size. The large-text option ("Aa") still makes text bigger. */
@media (min-width: 1024px) {
    .sb, main.main { zoom: .9; }
    /* the sidebar is fixed top-to-bottom; zoomed, that would end 10% short of the bottom of the screen */
    .sb { bottom: auto; height: calc(100vh / .9); height: calc(100dvh / .9); }
    main.main { min-height: calc(100vh / .9); }
}
