/* Bina – Property Admin · plain CSS, no build step.
   Look: warm drafting paper with a faint grid, a deep green tower and brass details, Tenor Sans headings; the
   navigation is a building section with a lift, the language switch a key board at the reception.
   Sections: fonts · tokens · base · tower · frame + top bar · menus · key board · page frame · overview · unit colours ·
   properties · tables · rent · maintenance · viewings · settings · forms · overlays · login + 404 · responsive · print */

/* fonts (SIL Open Font License, see assets/fonts/OFL.txt) */
@font-face { font-family: "Tenor Sans"; font-weight: 400; font-display: swap; src: url("../fonts/tenor-sans-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+20BE, U+2122, U+2212, U+FEFF; }
@font-face { font-family: "Tenor Sans"; font-weight: 400; font-display: swap; src: url("../fonts/tenor-sans-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+1E00-1EFF, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Tenor Sans"; font-weight: 400; font-display: swap; src: url("../fonts/tenor-sans-cyrillic-400-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-weight: 400; font-display: swap; src: url("../fonts/onest-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+20BE, U+2122, U+2212, U+FEFF; }
@font-face { font-family: "Onest"; font-weight: 400; font-display: swap; src: url("../fonts/onest-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+1E00-1EFF, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Onest"; font-weight: 400; font-display: swap; src: url("../fonts/onest-cyrillic-400-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-weight: 600; font-display: swap; src: url("../fonts/onest-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+20BE, U+2122, U+2212, U+FEFF; }
@font-face { font-family: "Onest"; font-weight: 600; font-display: swap; src: url("../fonts/onest-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+1E00-1EFF, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Onest"; font-weight: 600; font-display: swap; src: url("../fonts/onest-cyrillic-600-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Noto Sans Georgian"; font-weight: 400; font-display: swap; src: url("../fonts/noto-sans-georgian-georgian-400-normal.woff2") format("woff2"); unicode-range: U+0589, U+10A0-10FF, U+1C90-1CBA, U+1CBD-1CBF, U+2D00-2D2F; }
@font-face { font-family: "Noto Sans Georgian"; font-weight: 600; font-display: swap; src: url("../fonts/noto-sans-georgian-georgian-600-normal.woff2") format("woff2"); unicode-range: U+0589, U+10A0-10FF, U+1C90-1CBA, U+1CBD-1CBF, U+2D00-2D2F; }

/* tokens */
:root {
    --display: "Tenor Sans", "Noto Sans Georgian", system-ui, sans-serif;
    --font: "Onest", "Noto Sans Georgian", system-ui, sans-serif;
    --r: 10px; --r-s: 6px; --floor: 54px;
    --ease: cubic-bezier(.2, .8, .2, 1);
}
:root[data-theme="light"] {
    color-scheme: light;
    --bg: #f1ede4; --grid: rgba(36, 73, 63, .055); --card: #fbf9f4; --soft: #ece6da; --line: #ddd5c6; --line-2: #c9bfac;
    --text: #1e2622; --muted: #5d665f; --faint: #8b918a; --accent: #24493f; --accent-ink: #1c3a32; --accent-soft: rgba(36, 73, 63, .1);
    --brass: #b4874a; --brass-soft: rgba(180, 135, 74, .16); --tower: #1f3a33; --tower-2: #284a41; --tower-ink: #efe9dc; --lit: #f2c97a;
    --ok: #3b7a4c; --ok-soft: #dfeadf; --warn: #a8721a; --warn-soft: #f4e6c8; --bad: #b0442e; --bad-soft: #f4dcd5;
    --u-occ: #2f5d50; --u-notice: #c9a05c; --u-reno: #8b918a;
    --shadow: 0 18px 36px -26px rgba(30, 38, 34, .5), 0 1px 3px rgba(30, 38, 34, .08);
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #121815; --grid: rgba(239, 233, 220, .035); --card: #1a221e; --soft: #232c27; --line: #2e3833; --line-2: #3d4842;
    --text: #ebe7dc; --muted: #a9b0a8; --faint: #7b837c; --accent: #8cc4ad; --accent-ink: #a7d8c3; --accent-soft: rgba(140, 196, 173, .14);
    --brass: #d7ad6c; --brass-soft: rgba(215, 173, 108, .16); --tower: #0c110f; --tower-2: #17201c; --tower-ink: #e3dccd; --lit: #f2c97a;
    --ok: #8fca9c; --ok-soft: rgba(143, 202, 156, .14); --warn: #e3b866; --warn-soft: rgba(227, 184, 102, .14); --bad: #ee9580; --bad-soft: rgba(238, 149, 128, .14);
    --u-occ: #4f8f7b; --u-notice: #c9a05c; --u-reno: #5d665f;
    --shadow: 0 18px 36px -22px rgba(0, 0, 0, .85);
}

/* base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.i18n-wait body { visibility: hidden; }
body { margin: 0; min-height: 100vh; font: 400 15px/1.55 var(--font); color: var(--text); background: var(--bg); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 24px 24px; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 400; line-height: 1.15; letter-spacing: .01em; }
:lang(ka) h1, :lang(ka) h2, :lang(ka) h3 { font-weight: 600; letter-spacing: 0; }
p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.flag { stroke: none; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.ok { color: var(--ok); }
.bad { color: var(--bad); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: var(--r-s); background: var(--card); color: var(--text); }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
[hidden] { display: none !important; }
kbd { padding: 1px 7px; border-radius: 4px; background: var(--soft); color: var(--muted); font: 600 12px/1.6 var(--font); }

/* tower: the navigation is a building section, every page a floor, the lift car stops at the current page */
.tower { position: fixed; inset: 0 auto 0 0; z-index: 30; display: flex; flex-direction: column; width: 252px; padding: 18px 16px 0; background: var(--tower); color: var(--tower-ink); }
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 6px 22px; color: inherit; text-decoration: none; }
.brand-roof { position: relative; width: 38px; height: 38px; flex: none; }
.brand-roof::before { content: ""; position: absolute; inset: 0 0 auto; height: 18px; background: var(--brass); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.brand-roof::after { content: ""; position: absolute; left: 6px; right: 6px; bottom: 0; height: 20px; border: 2px solid currentColor; border-top: 0; background: linear-gradient(90deg, transparent 40%, var(--lit) 40% 60%, transparent 60%) bottom / 100% 9px no-repeat; }
.brand-word { display: grid; font: 400 24px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; }
.brand-word small { margin-top: 5px; color: color-mix(in srgb, var(--tower-ink) 62%, transparent); font: 400 11.5px/1.2 var(--font); letter-spacing: .06em; text-transform: none; }
.floors { position: relative; display: grid; padding: 10px 30px 10px 0; border: 1.5px solid color-mix(in srgb, var(--tower-ink) 30%, transparent); border-bottom: 0; background: repeating-linear-gradient(0deg, transparent 0 calc(var(--floor) - 1px), color-mix(in srgb, var(--tower-ink) 12%, transparent) calc(var(--floor) - 1px) var(--floor)); background-position: 0 10px; }
.floor { position: relative; display: grid; grid-template-columns: 26px 20px minmax(0, 1fr) auto; align-items: center; gap: 10px; height: var(--floor); padding: 0 8px 0 10px; color: color-mix(in srgb, var(--tower-ink) 78%, transparent); text-decoration: none; transition: color .2s, background .2s; }
.floor:hover { color: var(--tower-ink); background: color-mix(in srgb, var(--tower-ink) 6%, transparent); }
.fl-no { color: color-mix(in srgb, var(--tower-ink) 45%, transparent); font: 400 12px/1 var(--display); letter-spacing: .1em; }
.floor svg { width: 19px; height: 19px; }
.fl-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; }
.fl-win { display: none; }
.fl-badge { min-width: 22px; padding: 0 6px; border-radius: 4px; background: var(--brass); color: #1e2622; font-size: 12px; font-weight: 600; line-height: 20px; text-align: center; }
.floor[aria-current="page"] { color: var(--tower-ink); background: linear-gradient(90deg, color-mix(in srgb, var(--lit) 22%, transparent), transparent 85%); }
.floor[aria-current="page"] .fl-no { color: var(--lit); }
.floor[aria-current="page"]::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; background: var(--lit); }
.shaft { position: absolute; top: 0; right: 0; bottom: 0; width: 26px; border-left: 1.5px solid color-mix(in srgb, var(--tower-ink) 30%, transparent); background: repeating-linear-gradient(90deg, transparent 0 6px, color-mix(in srgb, var(--tower-ink) 8%, transparent) 6px 7px); }
.car { position: absolute; left: 4px; right: 4px; top: calc(10px + var(--car) * var(--floor) + 9px); height: calc(var(--floor) - 18px); border: 1.5px solid var(--lit); border-radius: 2px; background: color-mix(in srgb, var(--lit) 30%, transparent); transition: top .5s var(--ease); }
.car::before { content: ""; position: absolute; left: 50%; bottom: 100%; height: 400px; border-left: 1px solid color-mix(in srgb, var(--tower-ink) 35%, transparent); }
.shaft { overflow: hidden; }
.ground { display: flex; align-items: flex-end; justify-content: center; gap: 10px; flex: 1; min-height: 40px; border-left: 1.5px solid color-mix(in srgb, var(--tower-ink) 30%, transparent); border-right: 1.5px solid color-mix(in srgb, var(--tower-ink) 30%, transparent); background: linear-gradient(transparent calc(100% - 4px), var(--brass) 0); }
.ground i { width: 26px; height: 38px; border: 1.5px solid color-mix(in srgb, var(--tower-ink) 40%, transparent); border-bottom: 0; border-radius: 13px 13px 0 0; }
.ground i:nth-child(2) { width: 34px; height: 46px; background: color-mix(in srgb, var(--lit) 25%, transparent); }

/* frame + top bar */
.frame { min-height: 100vh; margin-left: 252px; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 12px 30px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); }
.search { display: flex; align-items: center; gap: 10px; flex: 1; max-width: 460px; min-width: 0; padding: 9px 14px; border: 1px solid var(--line-2); border-radius: var(--r-s); background: var(--card); color: var(--muted); text-align: left; }
.search span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.icon-btn { position: relative; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: var(--r-s); background: none; color: inherit; }
.icon-btn:hover { background: var(--soft); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.t-sun { display: none; }
[data-theme="dark"] .t-sun { display: block; }
[data-theme="dark"] .t-moon { display: none; }
.dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 2px var(--bg); }
.me { padding: 0; border: 0; background: none; }
.avatar { display: inline-grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 50%; background: hsl(var(--h, 160) 32% 84%); color: hsl(var(--h, 160) 40% 24%); font-size: 13px; font-weight: 600; letter-spacing: .02em; }
[data-theme="dark"] .avatar { background: hsl(var(--h, 160) 22% 26%); color: hsl(var(--h, 160) 45% 82%); }
.avatar.sm { width: 30px; height: 30px; font-size: 11px; }
.avatar.lg { width: 64px; height: 64px; font-size: 21px; }
.me .avatar { --h: 160; box-shadow: 0 0 0 2px var(--card), 0 0 0 3px var(--line-2); }
.main { flex: 1; display: grid; align-content: start; gap: 22px; width: 100%; max-width: 1400px; padding: 28px 30px 40px; }
.main:focus { outline: none; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; padding: 18px 30px 26px; color: var(--faint); font-size: 12.5px; }

/* menus */
.dd { position: relative; }
.menu { position: absolute; z-index: 50; min-width: 220px; padding: 6px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); color: var(--text); box-shadow: var(--shadow); animation: pop .18s var(--ease); }
.menu > a, .menu > button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: 0; border-radius: var(--r-s); background: none; text-align: left; text-decoration: none; }
.menu > a:hover, .menu > button:hover { background: var(--soft); }
.me-menu { right: 0; top: calc(100% + 8px); }
.me-who { padding: 8px 12px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.me-who b { display: block; font-weight: 600; }
.me-who small { color: var(--muted); }
.bell-menu { right: 0; top: calc(100% + 8px); width: min(360px, calc(100vw - 28px)); padding: 0; }
.bell-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.bell-list { max-height: 360px; margin: 0; padding: 6px; list-style: none; overflow-y: auto; }
.bell-list li { display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 12px; padding: 10px; border-radius: var(--r-s); font-size: 14px; }
.bell-list li.is-new { background: var(--accent-soft); }
.bell-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: var(--r-s); background: var(--c); color: var(--text); }
.bell-ico svg { width: 17px; height: 17px; }
.link { padding: 0; border: 0; background: none; color: var(--accent); font-size: 13.5px; font-weight: 600; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px); } }

/* language: a key board at the reception, one key per language */
.key-btn { display: flex; align-items: center; gap: 7px; height: 40px; padding: 0 12px 0 10px; border: 1px solid var(--line-2); border-radius: var(--r-s); background: var(--card); font-weight: 600; font-size: 13px; letter-spacing: .06em; }
.key-btn > svg { width: 17px; height: 17px; color: var(--brass); }
.key-mini { display: grid; width: 22px; height: 15px; overflow: hidden; border-radius: 2px; box-shadow: 0 0 0 1px var(--line); }
.key-mini .flag { width: 100%; height: 100%; }
.key-menu { right: 0; top: calc(100% + 8px); width: min(400px, calc(100vw - 24px)); padding: 0; overflow: hidden; }
.key-head { padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.key-board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 16px 14px 20px; background: linear-gradient(var(--brass) 0 0) 0 26px / 100% 3px no-repeat, var(--soft); }
.key-opt { position: relative; display: grid; justify-items: center; padding: 0 0 4px; border: 0; background: none; transform-origin: 50% 12px; transition: transform .25s var(--ease); }
.key-hook { width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; background: var(--brass); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .2); }
.key-ring { width: 18px; height: 18px; margin-top: -4px; border: 2px solid var(--faint); border-radius: 50%; }
.key-tag { display: grid; justify-items: center; gap: 4px; width: 100%; max-width: 86px; margin-top: -3px; padding: 9px 6px 8px; border-radius: 4px 4px 12px 12px; background: var(--card); box-shadow: 0 6px 12px -8px rgba(0, 0, 0, .5), 0 0 0 1px var(--line); transform: rotate(-3deg); transition: transform .25s var(--ease), background .2s; }
.key-opt:nth-child(even) .key-tag { transform: rotate(3deg); }
.key-flag { display: grid; width: 34px; height: 23px; overflow: hidden; border-radius: 2px; box-shadow: 0 0 0 1px var(--line); }
.key-flag .flag { width: 100%; height: 100%; }
.key-tag b { font: 400 15px/1 var(--display); letter-spacing: .1em; }
.key-tag small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 11.5px; }
.key-opt:hover .key-tag { transform: rotate(0) translateY(-2px); }
.key-opt[aria-current="true"] .key-tag { background: var(--accent); color: #fff; transform: rotate(0) translateY(6px); }
[data-theme="dark"] .key-opt[aria-current="true"] .key-tag { color: #10201a; }
.key-opt[aria-current="true"] .key-tag small { color: inherit; opacity: .8; }
.key-opt[aria-current="true"] .key-ring { border-color: var(--accent); }

/* page frame */
.hero { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; padding-bottom: 18px; border-bottom: 1px solid var(--line-2); }
.hero > div:first-child { min-width: 0; max-width: 760px; }
.hero h1 { font-size: clamp(30px, 4vw, 44px); overflow-wrap: anywhere; }
.eyebrow { margin-bottom: 8px; color: var(--brass); font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.lead { margin-top: 8px; color: var(--muted); }
.head-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.card { position: relative; min-width: 0; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); }
.card::before, .card::after { content: ""; position: absolute; width: 9px; height: 9px; border-color: var(--line-2); border-style: solid; pointer-events: none; }
.card::before { top: 6px; left: 6px; border-width: 1px 0 0 1px; }
.card::after { right: 6px; bottom: 6px; border-width: 0 1px 1px 0; }
.card.flat { padding: 0; }
.card-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 16px; margin-bottom: 14px; }
.card-head h2 { font-size: 21px; }
.card-head small { display: block; margin-top: 3px; color: var(--muted); font-size: 13px; }
.link-more { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-size: 13.5px; font-weight: 600; text-decoration: none; }
.link-more svg { width: 16px; height: 16px; }
.tools { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 14px; }
.tools .field-search { flex: 1 1 240px; }
.tools-note { margin-left: auto; color: var(--muted); font-size: 13px; }
.tools.inline { margin-bottom: 18px; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 4px; background: var(--soft); color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.ls-active, .us-occupied, .ps-paid, .vs-applied { background: var(--ok-soft); color: var(--ok); }
.ls-ending, .ls-notice, .us-notice, .ps-open, .pp-normal { background: var(--brass-soft); color: var(--warn); }
.ps-overdue, .pp-high, .vs-noshow { background: var(--bad-soft); color: var(--bad); }
.us-vacant { background: var(--accent-soft); color: var(--accent); }
.empty { padding: 30px; color: var(--muted); text-align: center; }
.rows { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.rows li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px dashed var(--line-2); }
.rows li:first-child { border-top: 0; }
.rows li > div { min-width: 0; }
.rows b { display: block; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.rows small { display: block; color: var(--muted); font-size: 12.5px; }
.rows li.none { display: block; color: var(--muted); }
.rows a { text-decoration: none; }

/* overview */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat { position: relative; display: grid; gap: 2px; padding: 18px 20px 20px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); overflow: hidden; }
.stat small { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.stat b { font: 400 34px/1.15 var(--display); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat span { color: var(--muted); font-size: 13px; }
.stat-bar { display: block; height: 4px; margin-top: 10px; border-radius: 2px; background: var(--soft); overflow: hidden; }
.stat-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .6s var(--ease); }
.stat[data-stat="arrears"] b { color: var(--bad); }
.grid-ov { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; }
.grid-ov > .chart-card { grid-column: span 4; }
.grid-ov > :nth-child(2) { grid-column: span 2; }
.grid-ov > :nth-child(n+3) { grid-column: span 2; }
.legend-inline { display: flex; gap: 14px; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 13px; }
.legend-inline li { display: flex; align-items: center; gap: 6px; }
.legend-inline i { width: 12px; height: 12px; border-radius: 2px; }
.lg-exp { background: var(--soft); box-shadow: inset 0 0 0 1px var(--line-2); }
.lg-col { background: var(--accent); }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { fill: var(--muted); stroke: none; font-size: 11px; font-family: var(--font); }
.chart .grid { stroke: var(--line); stroke-dasharray: 3 4; stroke-width: 1; }
.b-exp { fill: var(--soft); stroke: var(--line-2); stroke-width: 1; }
.b-col { fill: var(--accent); stroke: none; }
.bldg-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.bldg-list a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 10px; border: 1px solid var(--line); border-radius: var(--r-s); text-decoration: none; transition: border-color .2s, background .2s; }
.bldg-list a:hover { border-color: var(--accent); background: var(--accent-soft); }
.mini-facade { display: grid; gap: 2px; padding: 4px; border: 1px solid var(--line-2); border-radius: 2px; background: var(--bg); }
.mini-floor { display: flex; gap: 2px; }
.mini-floor i { width: 9px; height: 7px; border-radius: 1px; }
.bl-txt { min-width: 0; }
.bl-txt b { display: block; font-weight: 600; overflow-wrap: anywhere; }
.bl-txt small, .bl-num small { display: block; color: var(--muted); font-size: 12px; }
.bl-num { text-align: right; }
.bl-num b { font: 400 20px/1.1 var(--display); }
.time-chip { display: grid; justify-items: center; min-width: 58px; padding: 6px 8px; border-radius: var(--r-s); background: var(--accent-soft); color: var(--accent); }
.time-chip b { font: 400 17px/1.1 var(--display); }
.time-chip small { color: inherit !important; font-size: 11px !important; }
.rows .icon-btn { width: 34px; height: 34px; }
.rows .icon-btn svg { width: 17px; height: 17px; }

/* unit colours (facade windows, mini facades, legend) */
.u-occupied { background: var(--u-occ); color: #f3efe6; }
.u-notice { background: var(--u-notice); color: #241a0c; }
.u-vacant { background: var(--card); color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.u-renovation { background: repeating-linear-gradient(135deg, var(--soft) 0 5px, color-mix(in srgb, var(--u-reno) 45%, transparent) 5px 7px); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-2); }
.mini-floor i.u-vacant { box-shadow: inset 0 0 0 1px var(--accent); }

/* properties */
.bldg-tabs { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; }
.bldg-tabs button { display: grid; flex: none; min-width: 170px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--card); text-align: left; transition: border-color .2s; }
.bldg-tabs button b { font: 400 17px/1.2 var(--display); }
.bldg-tabs button small { color: var(--muted); font-size: 12.5px; }
.bldg-tabs button[aria-selected="true"] { border-color: var(--accent); background: var(--accent); color: #fff; }
[data-theme="dark"] .bldg-tabs button[aria-selected="true"] { color: #10201a; }
.bldg-tabs button[aria-selected="true"] small { color: inherit; opacity: .8; }
.pr-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.facade { display: grid; gap: 0; max-width: 820px; margin: 0 auto; padding: 0 18px; }
.roof { height: 34px; margin: 0 -18px; background: var(--line-2); clip-path: polygon(6% 0, 94% 0, 100% 100%, 0 100%); }
.storey { display: flex; gap: 8px; padding: 8px 10px 8px 0; border-left: 2px solid var(--line-2); border-right: 2px solid var(--line-2); background: color-mix(in srgb, var(--soft) 60%, transparent); }
.storey + .storey { border-top: 1px solid var(--line); }
.storey-no { display: grid; place-items: center; width: 34px; flex: none; color: var(--faint); font: 400 13px/1 var(--display); }
.win { position: relative; display: grid; align-content: start; gap: 1px; flex: 1 1 0; min-width: 0; min-height: 76px; padding: 8px 10px; border: 0; border-radius: 3px; text-align: left; transition: transform .15s var(--ease), opacity .2s; }
.win:hover { transform: translateY(-2px); }
.win b { font: 400 17px/1.1 var(--display); }
.win small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; opacity: .85; }
.win-who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 600; }
.win.is-dim { opacity: .22; }
.win.has-debt::after { content: ""; position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 2px var(--card); }
.plinth { position: relative; height: 26px; margin: 0 -18px; background: var(--line-2); }
.entrance { position: absolute; left: 50%; bottom: 0; width: 56px; height: 34px; margin-left: -28px; border-radius: 3px 3px 0 0; background: var(--brass); }
.keys-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin: 18px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 13px; }
.keys-legend li { display: flex; align-items: center; gap: 7px; }
.keys-legend i { width: 16px; height: 12px; border-radius: 2px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin: 0; }
.facts div { min-width: 0; }
.facts dt { color: var(--muted); font-size: 12px; letter-spacing: .04em; }
.facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.ring-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 20px; padding-top: 18px; border-top: 1px dashed var(--line-2); }
.ring { position: relative; display: grid; justify-items: center; gap: 4px; margin: 0; text-align: center; }
.ring svg { width: 74px; height: 74px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 7; }
.r-bg { stroke: var(--soft); }
.r-fg { stroke: var(--accent); stroke-linecap: butt; }
.ring b { position: absolute; top: 25px; left: 0; right: 0; font-size: 13px; font-weight: 600; }
.ring figcaption { color: var(--muted); font-size: 11.5px; line-height: 1.25; }
.unit-badge { display: inline-grid; place-items: center; min-width: 44px; height: 38px; padding: 0 8px; border-radius: 3px; background: var(--soft); font: 400 16px/1 var(--display); }
.person-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: var(--r-s); text-decoration: none; }
.person-row:hover { border-color: var(--accent); }
.person-row b { display: block; font-weight: 600; }
.person-row small { color: var(--muted); font-size: 12.5px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }

/* tables */
.table-wrap { position: relative; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { padding: 12px 14px; border-bottom: 1px solid var(--line-2); color: var(--muted); font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-align: left; text-transform: uppercase; white-space: nowrap; }
th button { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; }
th button svg { width: 14px; height: 14px; opacity: 0; transition: transform .2s; }
th[aria-sort="ascending"] button svg { opacity: 1; transform: rotate(180deg); }
th[aria-sort="descending"] button svg { opacity: 1; }
td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: color-mix(in srgb, var(--accent-soft) 50%, transparent); }
th.num, td.num { text-align: right; }
td .sub { display: block; color: var(--muted); font-size: 12px; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who button, .who a { padding: 0; border: 0; background: none; font-weight: 600; text-align: left; text-decoration: none; }
.who button:hover, .who a:hover { color: var(--accent); text-decoration: underline; }
.row-btns { display: flex; align-items: center; justify-content: flex-end; gap: 6px; white-space: nowrap; }

/* rent */
.month-nav { display: flex; align-items: center; gap: 6px; }
.month-nav h2 { min-width: 0; font-size: 22px; text-align: center; }
.tools .month-nav h2 { min-width: 190px; }
.sums { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r); background: var(--card); overflow: hidden; }
.sum-cell { display: grid; gap: 2px; padding: 16px 18px 20px; border-left: 1px solid var(--line); }
.sum-cell:first-child { border-left: 0; }
.sum-cell small { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.sum-cell b { font: 400 24px/1.2 var(--display); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.sum-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--soft); }
.sum-bar i { display: block; height: 100%; background: var(--ok); transition: width .5s var(--ease); }
.hist { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.hist li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px dashed var(--line-2); font-size: 14px; }
.hist li:first-child { border-top: 0; }

/* maintenance */
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.col { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: color-mix(in srgb, var(--soft) 70%, transparent); }
.col-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.col-head h2 { font-size: 19px; }
.tickets { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.ticket { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; padding: 12px; border-left: 3px solid var(--line-2); border-radius: var(--r-s); background: var(--card); box-shadow: var(--shadow); }
.ticket.pr-high { border-left-color: var(--bad); }
.ticket.pr-normal { border-left-color: var(--brass); }
.col-done .ticket { opacity: .78; }
.cat-ico { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: var(--r-s); background: var(--accent-soft); color: var(--accent); }
.cat-ico svg { width: 18px; height: 18px; }
.cat-ico.lg { width: 56px; height: 56px; }
.cat-ico.lg svg { width: 26px; height: 26px; }
.tk-main { min-width: 0; }
.tk-title { display: block; max-width: 100%; padding: 0; border: 0; background: none; font-weight: 600; text-align: left; }
.tk-title:hover { color: var(--accent); text-decoration: underline; }
.tk-main > small { display: block; color: var(--muted); font-size: 12.5px; }
.tk-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 7px; }
.tk-meta small { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; }
.tk-meta svg { width: 13px; height: 13px; }
.moves { display: flex; flex-direction: column; gap: 4px; }
.moves button { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 1px solid var(--line); border-radius: 4px; background: none; color: var(--muted); }
.moves button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.moves button:disabled { opacity: .3; cursor: default; }
.moves svg { width: 15px; height: 15px; }
.radios { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: 0; }
.radios legend { width: 100%; margin-bottom: 5px; padding: 0; color: var(--muted); font-size: 13px; font-weight: 600; }
.radios label { position: relative; }
.radios input { position: absolute; opacity: 0; }
.radios span { display: block; padding: 7px 14px; border: 1px solid var(--line-2); border-radius: var(--r-s); font-size: 14px; cursor: pointer; }
.radios input:checked + span { border-color: var(--accent); background: var(--accent); color: #fff; }
[data-theme="dark"] .radios input:checked + span { color: #10201a; }
.radios input:focus-visible + span { outline: 2px solid var(--brass); outline-offset: 2px; }
.note { padding: 12px 14px; border-left: 3px solid var(--brass); background: var(--soft); font-size: 14px; }
.timeline { display: grid; gap: 0; margin: 0; padding: 0 0 0 16px; border-left: 2px solid var(--line); list-style: none; font-size: 14px; }
.timeline li { position: relative; padding: 6px 0; }
.timeline li::before { content: ""; position: absolute; left: -22px; top: 13px; width: 10px; height: 10px; border-radius: 50%; background: var(--card); box-shadow: inset 0 0 0 2px var(--accent); }
.timeline small { display: block; color: var(--muted); font-size: 12px; }

/* viewings */
.vw-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 18px; align-items: start; }
.vw-layout .rows li { grid-template-columns: auto minmax(0, 1fr) auto; }
.week-wrap { overflow-x: auto; margin: 0 -6px; padding: 0 6px 4px; }
.week { display: grid; grid-template-columns: 50px repeat(7, minmax(88px, 1fr)); grid-template-rows: 46px repeat(20, 23px); min-width: 690px; }
.wk-corner { grid-row: 1; grid-column: 1; }
.wk-day { display: grid; justify-items: center; align-content: center; grid-row: 1; border-bottom: 1px solid var(--line-2); }
.wk-day b { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.wk-day small { font: 400 18px/1.1 var(--display); }
.wk-day.is-today small { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; }
[data-theme="dark"] .wk-day.is-today small { color: #10201a; }
.wk-time { grid-column: 1; padding-right: 8px; color: var(--faint); font-size: 11px; text-align: right; transform: translateY(-7px); }
.wk-col { border-left: 1px solid var(--line); background: repeating-linear-gradient(180deg, transparent 0 45px, var(--line) 45px 46px); }
.wk-col.is-today { background-color: var(--accent-soft); }
.wk-ev { z-index: 1; display: grid; align-content: start; min-width: 0; margin: 1px 3px; padding: 3px 7px; border: 0; border-left: 3px solid var(--accent); border-radius: 3px; background: var(--card); box-shadow: 0 4px 10px -6px rgba(0, 0, 0, .5); font-size: 11.5px; text-align: left; overflow: hidden; }
.wk-ev b, .wk-ev small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wk-ev b { font-weight: 600; }
.wk-ev small { color: var(--muted); }
.wk-ev.vs-planned { background: var(--accent-soft); }
.wk-ev.vs-done { border-left-color: var(--faint); opacity: .75; }
.wk-ev.vs-applied { border-left-color: var(--ok); background: var(--ok-soft); color: var(--text); }
.wk-ev.vs-noshow { border-left-color: var(--bad); background: repeating-linear-gradient(135deg, var(--bad-soft) 0 6px, transparent 6px 10px); color: var(--text); }

/* settings */
.settings { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 18px; align-items: start; }
.set-nav { display: grid; gap: 2px; padding: 8px; }
.set-nav::before, .set-nav::after { display: none; }
.set-nav button { padding: 10px 14px; border: 0; border-radius: var(--r-s); background: none; text-align: left; font-weight: 600; color: var(--muted); }
.set-nav button[aria-selected="true"] { background: var(--accent-soft); color: var(--accent); }
.set-panels { display: grid; gap: 18px; min-width: 0; }
.edit-list { display: grid; gap: 10px; margin: 0 0 16px; padding: 0; list-style: none; }
.edit-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.4fr) auto; align-items: end; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-s); }
[data-ct-list] li { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; }
.edit-list b { display: block; font-weight: 600; }
.edit-list small { color: var(--muted); font-size: 12.5px; }
.add-row { grid-template-columns: repeat(3, minmax(0, 1fr)) auto; align-items: end; padding-top: 14px; border-top: 1px dashed var(--line-2); }
.switches { display: grid; margin: 0; padding: 0; list-style: none; }
.switches li { border-top: 1px dashed var(--line-2); }
.switches li:first-child { border-top: 0; }
.switches label { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; cursor: pointer; }
.switches b { display: block; font-weight: 600; }
.switches small { color: var(--muted); font-size: 13px; }
.switch { -webkit-appearance: none; appearance: none; position: relative; width: 46px; height: 26px; flex: none; margin: 0; border-radius: 13px; background: var(--line-2); transition: background .2s; cursor: pointer; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); }
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(20px); }
.danger-zone { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); }
.danger-zone h2 { font-size: 19px; }
.danger-zone p { margin-top: 4px; color: var(--muted); font-size: 14px; }

/* forms + buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 9px 18px; border: 0; border-radius: var(--r-s); background: var(--soft); font-weight: 600; font-size: 14.5px; text-decoration: none; white-space: nowrap; transition: background .2s, transform .1s; }
.btn:hover { background: var(--line); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); }
[data-theme="dark"] .btn-primary { color: #10201a; }
.btn-light { background: var(--card); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn-ok { background: var(--ok-soft); color: var(--ok); }
.btn-ok:hover { background: var(--ok); color: #fff; }
.btn-no { background: var(--bad-soft); color: var(--bad); }
.btn-no:hover { background: var(--bad); color: #fff; }
.btn-danger { background: var(--bad); color: #fff; }
.btn-danger:hover { background: color-mix(in srgb, var(--bad) 85%, #000); }
.btn-sm { min-height: 34px; padding: 5px 12px; font-size: 13.5px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .45; cursor: default; }
.field { display: grid; gap: 5px; min-width: 0; }
.field > span, .field > label { color: var(--muted); font-size: 13px; font-weight: 600; }
.input, .select { width: 100%; min-width: 0; padding: 10px 13px; border: 1px solid var(--line-2); border-radius: var(--r-s); background: var(--card); outline: none; transition: border-color .2s, box-shadow .2s; }
textarea.input { resize: vertical; line-height: 1.5; }
.input[type="date"] { -webkit-appearance: none; appearance: none; display: block; max-width: 100%; min-height: 44px; }
.input[type="date"]::-webkit-date-and-time-value { min-height: 1.4em; text-align: left; }
.select { -webkit-appearance: none; appearance: none; padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.input:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field.is-invalid .input, .field.is-invalid .select, .input.is-invalid { border-color: var(--bad); }
.field-error { color: var(--bad); font-size: 12.5px; font-weight: 600; }
.field-search { position: relative; display: block; }
.field-search svg { position: absolute; left: 13px; top: 50%; width: 17px; height: 17px; margin-top: -8.5px; color: var(--faint); pointer-events: none; }
.field-search .input { padding-left: 38px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid.one { grid-template-columns: minmax(0, 1fr); }
.form-grid .wide { grid-column: 1 / -1; }
.form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.mini-field { display: grid; gap: 3px; min-width: 0; }
.mini-field > span { color: var(--muted); font-size: 12px; font-weight: 600; }
.mini-field .select { padding-top: 8px; padding-bottom: 8px; }
.seg { display: inline-flex; max-width: 100%; padding: 3px; overflow-x: auto; scrollbar-width: none; border: 1px solid var(--line-2); border-radius: var(--r-s); background: var(--card); }
.seg button { padding: 6px 13px; border: 0; border-radius: 4px; background: none; color: var(--muted); font-weight: 600; font-size: 13.5px; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--accent); color: #fff; }
[data-theme="dark"] .seg button[aria-pressed="true"] { color: #10201a; }
.balance { padding: 10px 14px; border-radius: var(--r-s); background: var(--accent-soft); color: var(--accent-ink); font-size: 14px; }

/* overlays */
dialog.modal { width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 40px); padding: 0; border: 0; border-radius: var(--r); background: var(--card); color: var(--text); box-shadow: var(--shadow); }
dialog.modal::backdrop { background: rgba(20, 28, 24, .5); }
dialog.modal[open] { animation: pop .2s var(--ease); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px 0; }
.modal-head h2 { font-size: 23px; }
.modal-body { display: grid; gap: 14px; padding: 18px 24px; }
.modal-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding: 0 24px 22px; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 60; display: flex; flex-direction: column; width: min(440px, 100vw); background: var(--card); box-shadow: -20px 0 50px -30px rgba(0, 0, 0, .6); animation: slide .25s var(--ease); }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.drawer-scrim { position: fixed; inset: 0; z-index: 55; background: rgba(20, 28, 24, .35); }
.drawer-head { position: relative; display: grid; justify-items: start; gap: 6px; padding: 24px 24px 20px; border-bottom: 1px solid var(--line); background: var(--soft); }
.drawer-head h2 { font-size: 25px; padding-right: 40px; overflow-wrap: anywhere; }
.drawer-head p { color: var(--muted); }
.drawer-head .icon-btn { position: absolute; top: 12px; right: 12px; }
.drawer-head .unit-badge { min-width: 64px; height: 50px; font-size: 22px; }
.drawer-body { display: grid; align-content: start; gap: 18px; padding: 20px 24px 30px; overflow-y: auto; }
.drawer-body h3 { font-size: 17px; }
.drawer-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.palette { position: fixed; inset: 0; z-index: 90; display: grid; justify-items: center; align-items: start; padding: 14vh 12px 12px; background: rgba(20, 28, 24, .45); }
.palette-box { width: min(600px, 100%); border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); overflow: hidden; animation: pop .18s var(--ease); }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.palette-input input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 17px; }
.palette-list { max-height: 52vh; margin: 0; padding: 6px; list-style: none; overflow-y: auto; }
.palette-list li { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: var(--r-s); cursor: pointer; }
.palette-list li[aria-selected="true"] { background: var(--accent-soft); color: var(--accent-ink); }
.palette-list li > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-list li small { margin-left: auto; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.palette-list .avatar { width: 28px; height: 28px; font-size: 10px; }
.palette-group { padding: 8px 12px 4px; color: var(--faint); font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; cursor: default !important; }
.toasts { position: fixed; right: 22px; bottom: 22px; z-index: 95; display: grid; gap: 10px; width: min(380px, calc(100vw - 32px)); }
.toast { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--r-s); background: var(--tower); color: var(--tower-ink); box-shadow: var(--shadow); font-size: 14px; animation: pop .25s var(--ease); }
.toast span { flex: 1; }
.toast svg { width: 18px; height: 18px; color: var(--lit); }
.toast button { padding: 4px 11px; border: 0; border-radius: 4px; background: var(--lit); color: #1e2622; font-weight: 600; font-size: 13px; }
.toast.is-out { opacity: 0; transform: translateY(10px); transition: .25s; }

/* login + 404 */
.desk-only { background-color: var(--bg); }
.auth { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.auth-box { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); width: min(1000px, 100%); border: 1px solid var(--line); border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); overflow: hidden; }
.auth-form { display: grid; align-content: center; gap: 22px; padding: 44px 48px; }
.auth-form h1 { font-size: 36px; }
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.auth-top .brand { padding: 0; color: var(--text); }
.auth-form .link { justify-self: center; }
.auth-art { position: relative; display: grid; align-content: end; gap: 22px; min-height: 520px; padding: 40px; background: var(--tower); color: var(--tower-ink); overflow: hidden; }
.skyline { position: absolute; left: 0; right: 0; bottom: 140px; width: 100%; height: 62%; }
.sk-b rect { fill: var(--tower-2); stroke: color-mix(in srgb, var(--tower-ink) 30%, transparent); stroke-width: 1.5; }
.sk-w rect { fill: color-mix(in srgb, var(--tower-ink) 10%, transparent); }
.sk-w rect.on { fill: var(--lit); animation: glow 4s ease-in-out infinite alternate; }
.sk-w rect.on:nth-child(3n) { animation-delay: 1.3s; }
@keyframes glow { to { opacity: .55; } }
.auth-quote { position: relative; display: grid; gap: 10px; font: 400 21px/1.4 var(--display); }
.auth-quote small { font: 400 13px/1.4 var(--font); opacity: .75; }
.lost-lang { position: fixed; top: 18px; right: 18px; }
.lost { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.lost-card { display: grid; justify-items: center; gap: 16px; max-width: 520px; text-align: center; }
.lost-card h1 { font-size: clamp(28px, 4vw, 38px); }
.lost-card p { color: var(--muted); }
.lost-door { width: 150px; height: auto; }
.frame-l { fill: var(--soft); stroke: var(--line-2); stroke-width: 2; }
.door-l { fill: var(--accent); }
.knob { fill: var(--brass); }
.plate { fill: var(--card); stroke: var(--brass); stroke-width: 2; }
.lost-door text { fill: var(--text); font: 400 17px var(--display); }

/* responsive */
@media (max-width: 1280px) {
    .grid-ov > .chart-card { grid-column: 1 / -1; }
    .grid-ov > :nth-child(n+2) { grid-column: span 3; }
    .grid-ov > :last-child { grid-column: 1 / -1; }
    .pr-layout { grid-template-columns: minmax(0, 1fr); }
    .sums { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .sum-cell:nth-child(4) { border-left: 0; }
    .sum-cell:nth-child(n+4) { border-top: 1px solid var(--line); }
}
@media (max-width: 1100px) {
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .vw-layout { grid-template-columns: minmax(0, 1fr); }
    .board { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 960px) {
    .tower { inset: auto 0 0 0; width: auto; height: 66px; flex-direction: row; padding: 0; border-top: 2px solid var(--brass); }
    .tower .brand { position: fixed; top: 9px; left: 12px; z-index: 31; padding: 0; color: var(--text); }
    .brand-roof { width: 34px; height: 34px; }
    .brand-word small, .ground { display: none; }
    .brand-word { font-size: 20px; }
    .floors { display: flex; flex: 1; padding: 0; border: 0; background: none; overflow-x: auto; scrollbar-width: none; }
    .floor { flex: 1 0 64px; display: grid; grid-template-columns: 1fr; justify-items: center; align-content: center; gap: 3px; height: 64px; padding: 0 4px; }
    .fl-no, .shaft { display: none; }
    .fl-name { max-width: 100%; font-size: 11px; }
    .fl-badge { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 18px; padding: 0 4px; font-size: 10.5px; line-height: 16px; }
    .floor[aria-current="page"]::before { left: 12px; right: 12px; top: 0; bottom: auto; width: auto; height: 3px; }
    .floor[aria-current="page"] { background: linear-gradient(180deg, color-mix(in srgb, var(--lit) 20%, transparent), transparent); }
    .frame { margin-left: 0; padding-bottom: 66px; }
    .top { padding: 9px 12px 9px 128px; backdrop-filter: none; background: var(--bg); }
    .search { flex: 0 0 auto; width: 40px; height: 40px; padding: 0; justify-content: center; margin-left: auto; }
    .search span, .search kbd { display: none; }
    .top-actions { margin-left: 0; gap: 2px; }
    .top .menu { position: fixed; top: 64px; left: 12px; right: 12px; width: auto; }
    .key-btn { padding: 0 9px; }
    .key-btn > svg, .key-btn [data-lang-code] { display: none; }
    .main { padding: 20px 14px 30px; gap: 18px; }
    .foot { padding: 14px 14px 20px; }
    .toasts { bottom: 80px; right: 12px; }
    .settings { grid-template-columns: minmax(0, 1fr); }
    .set-nav { display: flex; overflow-x: auto; scrollbar-width: none; }
    .set-nav button { flex: none; }
    .auth-box { grid-template-columns: minmax(0, 1fr); }
    .auth-art { display: none; }
}
@media (max-width: 640px) {
    .stats { grid-template-columns: minmax(0, 1fr); }
    .grid-ov { grid-template-columns: minmax(0, 1fr); }
    .grid-ov > * { grid-column: 1 / -1 !important; }
    .hero { padding-bottom: 14px; }
    .head-actions { width: 100%; }
    .head-actions .btn { flex: 1 1 auto; white-space: normal; text-align: center; }
    .card { padding: 16px; }
    .card.flat { padding: 0; }
    .tools .seg { order: 3; }
    .tools-note { margin-left: 0; width: 100%; }
    .sums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sum-cell:nth-child(n) { border-left: 0; border-top: 1px solid var(--line); }
    .sum-cell:nth-child(-n+2) { border-top: 0; }
    .sum-cell:nth-child(even) { border-left: 1px solid var(--line); }
    .sum-cell:last-of-type { grid-column: 1 / -1; border-left: 0; }
    .facade { padding: 0 6px; }
    .roof, .plinth { margin: 0 -6px; }
    .storey { gap: 4px; padding-right: 4px; }
    .storey-no { width: 22px; font-size: 11px; }
    .win { min-height: 58px; padding: 6px; }
    .win small, .win-who { display: none; }
    .form-grid { grid-template-columns: minmax(0, 1fr); }
    .add-row { grid-template-columns: minmax(0, 1fr); }
    .edit-list li { grid-template-columns: minmax(0, 1fr); }
    .edit-list li .unit-badge { justify-self: start; }
    .facts { grid-template-columns: minmax(0, 1fr); }
    .ticket { grid-template-columns: minmax(0, 1fr) auto; }
    .ticket .cat-ico { display: none; }
    .rows li { grid-template-columns: auto minmax(0, 1fr) auto; }
    .rows li > .pill, .rows li > .btn { grid-column: 2 / -1; justify-self: start; }
    .auth-form { padding: 28px 22px; }
    .auth-form h1 { font-size: 30px; }
    .month-nav h2, .tools .month-nav h2 { min-width: 0; flex: 1; font-size: 19px; }
    .month-nav { width: 100%; }
    .key-board { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 14px; background: var(--soft); }
    .modal-head, .modal-body { padding-left: 18px; padding-right: 18px; }
    .modal-foot { padding: 0 18px 18px; }
}
@media (max-width: 380px) {
    .brand-word { display: none; }
    .top { padding-left: 60px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
    .tower, .top, .foot, .head-actions, .toasts, .tools .seg { display: none !important; }
    .frame { margin: 0; }
    body { background: #fff; }
    .card, .stat { box-shadow: none; }
}
