/* Obzor Beach Resort — owners' portal
   Identity: seafront building signage. Each block has its own colour, used wherever a block is meant
   (apartment plates, board sections, document scope). Buoy yellow is reserved for the main action.
   Golos Text for reading; Unbounded only for apartment codes and page titles. */

:root {
  --ink: #0e3b43;
  --ink-2: #1d5560;
  --paper: #eef3f3;
  --surface: #ffffff;
  --surface-2: #f6f9f9;
  --line: #cfdcdd;
  --line-2: #e2eaea;
  --text: #102a2f;
  --muted: #55707a;
  --buoy: #f2b705;
  --buoy-ink: #1b1600;
  --ok: #2e7d4f;
  --warn: #a8660b;
  --err: #b3261e;
  --focus: #1a73e8;
  --A: #2f6f9f; --B: #2f8573; --C: #b5543c; --D: #7a5ba6; --E: #a87812; --F: #4f7a3a; --G: #a03e6b; --X: #0e3b43;
  --r-s: 6px; --r-m: 10px; --r-l: 16px;
  --shadow: 0 1px 0 rgba(14, 59, 67, .06), 0 6px 18px -10px rgba(14, 59, 67, .25);
  --font: 'Golos Text', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --display: 'Unbounded', 'Golos Text', system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #0a2328; --ink-2: #123840; --paper: #0d2227; --surface: #12313a; --surface-2: #163a44;
    --line: #2a4f58; --line-2: #22454e; --text: #e4efef; --muted: #9bb6bc; --buoy: #f5c22f;
    --ok: #6fcf97; --warn: #f0b354; --err: #ff8a80; --focus: #8ab4f8;
    --A: #5b9bd0; --B: #4fb39d; --C: #e07b62; --D: #a98bd6; --E: #d9a63a; --F: #84b067; --G: #d16d9b; --X: #6fb6c2;
    --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 8px 20px -12px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--text);
  font: 400 16.5px/1.55 var(--font); font-feature-settings: 'tnum' 0;
}
a { color: var(--ink-2); text-underline-offset: 2px; }
@media (prefers-color-scheme: dark) { a { color: #8fd0db; } }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font: 700 clamp(1.45rem, 1.15rem + 1.1vw, 2rem)/1.18 var(--font); letter-spacing: -.015em; text-wrap: balance; }
h2 { font-size: 1.25rem; font-weight: 650; }
h3 { font-size: 1.05rem; font-weight: 650; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ------------------------------------------------------------------ top bar: brand + tools, navigation on its own row */
.top { background: var(--ink); color: #e9f3f3; }
.top a { color: inherit; text-decoration: none; }
.top-in { max-width: 1180px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; flex-wrap: wrap; column-gap: 18px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: .01em; white-space: nowrap; min-height: 62px; }
.brand-mark { width: 30px; height: 30px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; flex: none; }
.brand-mark i { border-radius: 2px; }
.brand-mark i:nth-child(1) { background: var(--A); } .brand-mark i:nth-child(2) { background: var(--B); }
.brand-mark i:nth-child(3) { background: var(--C); } .brand-mark i:nth-child(4) { background: var(--D); }
.brand-mark i:nth-child(5) { background: var(--E); } .brand-mark i:nth-child(6) { background: var(--F); }
.brand-mark i:nth-child(7) { background: var(--G); } .brand-mark i:nth-child(8) { background: var(--buoy); }
.brand small { display: block; font-weight: 400; opacity: .7; font-size: .78rem; }
.top-tools { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.nav { order: 3; flex-basis: 100%; display: flex; gap: 2px; overflow-x: auto; border-top: 1px solid rgba(255, 255, 255, .1); padding: 4px 0; scrollbar-width: none; }
.nav a { padding: 9px 12px; border-radius: var(--r-s); opacity: .84; font-size: .95rem; white-space: nowrap; }
.nav a:hover { background: rgba(255, 255, 255, .08); opacity: 1; }
.nav a[aria-current="page"] { opacity: 1; background: rgba(255, 255, 255, .1); box-shadow: inset 0 -3px 0 var(--buoy); }
.lang { display: flex; border: 1px solid rgba(255, 255, 255, .25); border-radius: 999px; overflow: hidden; font-size: .8rem; }
.lang a { padding: 4px 9px; opacity: .75; }
.lang a[aria-current="true"] { background: rgba(255, 255, 255, .18); opacity: 1; }
.who { font-size: .9rem; display: flex; align-items: center; gap: 10px; }
.menu-btn { display: none; background: none; border: 1px solid rgba(255,255,255,.3); color: inherit; border-radius: var(--r-s); padding: 6px 10px; font: inherit; }
@media (max-width: 720px) {
  .top-in { padding: 0 16px; column-gap: 10px; }
  .brand > span:last-child small { display: none; }
  .menu-btn { display: inline-block; }
  .nav { display: none; flex-direction: column; padding-bottom: 10px; }
  .nav.open { display: flex; }
  .who .who-name { display: none; }
  .top-tools { gap: 8px; }
}

.viewas { background: var(--buoy); color: var(--buoy-ink); }
.viewas .wrap { display: flex; gap: 12px; align-items: center; padding: 8px 20px; flex-wrap: wrap; }
.viewas a { color: inherit; font-weight: 600; }

/* ------------------------------------------------------------------ page */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
main.wrap { padding-top: 28px; padding-bottom: 64px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } main.wrap { padding-top: 18px; } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head p { margin: 0; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 960px) { .grid-2 { grid-template-columns: 1fr; } }
.stack > * + * { margin-top: 28px; }

.panel { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-m); box-shadow: var(--shadow); }
.panel-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 16px 20px 0; }
.panel-h h2, .panel-h h3 { margin: 0; }
.panel-b { padding: 14px 20px 18px; }
.panel-b > :last-child { margin-bottom: 0; }

/* flashes */
.flash { padding: 12px 16px; border-radius: var(--r-s); margin-bottom: 16px; border-left: 4px solid; background: var(--surface); }
.flash.ok { border-color: var(--ok); }
.flash.warn { border-color: var(--warn); }
.flash.err { border-color: var(--err); }

/* ------------------------------------------------------------------ the apartment plate (signature) */
.plate {
  --c: var(--X);
  display: inline-flex; flex-direction: column; justify-content: space-between;
  background: var(--c); color: #fff; border-radius: var(--r-m);
  padding: 14px 18px 12px; min-width: 168px; position: relative;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .18), var(--shadow);
}
.plate::after { content: ''; position: absolute; inset: 7px; border: 1.5px solid rgba(255, 255, 255, .45); border-radius: 6px; pointer-events: none; }
.plate .code { font: 600 2.6rem/1 var(--display); letter-spacing: .02em; }
.plate .sub { font-size: .82rem; opacity: .9; margin-top: 8px; }
.plate.sm { min-width: 0; padding: 8px 12px 7px; border-radius: var(--r-s); }
.plate.sm::after { inset: 4px; border-radius: 4px; }
.plate.sm .code { font-size: 1.15rem; }
.blk-A { --c: var(--A); } .blk-B { --c: var(--B); } .blk-C { --c: var(--C); } .blk-D { --c: var(--D); }
.blk-E { --c: var(--E); } .blk-F { --c: var(--F); } .blk-G { --c: var(--G); } .blk-X, .blk-complex { --c: var(--X); }

.hero { display: flex; gap: 26px; align-items: stretch; flex-wrap: wrap; margin-bottom: 30px; }
.hero-text { flex: 1; min-width: 260px; display: flex; flex-direction: column; justify-content: center; }
.hero-text h1 { margin-bottom: 12px; max-width: 30ch; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 10px; margin: 0; padding: 0; list-style: none; }
.facts li { background: var(--surface); border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 12px; font-size: .9rem; }
.facts li.on { border-color: var(--ok); color: var(--ok); }

/* block tile (letter square) */
.tile { display: inline-grid; place-items: center; width: 1.7em; height: 1.7em; border-radius: 5px; background: var(--c, var(--X)); color: #fff; font: 600 .78rem/1 var(--display); flex: none; }
.tile.personal { background: transparent; color: var(--ink-2); border: 1.5px solid currentColor; }
@media (prefers-color-scheme: dark) { .tile.personal { color: #8fd0db; } }
.tile.board { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--c, var(--X)); }

/* ------------------------------------------------------------------ document list */
.docs { list-style: none; margin: 0; padding: 0; }
.doc { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line-2); }
.docs > .doc:first-child { border-top: 0; }
.doc-title { font-weight: 500; overflow-wrap: anywhere; text-decoration: none; color: var(--text); }
.doc-title:hover { text-decoration: underline; }
.doc.new .doc-title { font-weight: 700; }
.doc-meta { grid-column: 2; font-size: .84rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.doc-ext { font-size: .72rem; font-weight: 700; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; }
.badge-new { background: var(--buoy); color: var(--buoy-ink); border-radius: 4px; padding: 0 7px; font-size: .76rem; font-weight: 700; }
.doc-actions { grid-row: 1 / span 2; grid-column: 3; display: flex; gap: 6px; }
.doc .tile { grid-row: 1 / span 2; }
@media (max-width: 560px) {
  .doc { grid-template-columns: auto minmax(0, 1fr); }
  .doc-actions { grid-row: 3; grid-column: 2; }
}
/* a box of offers with the same tag */
.doc-group { border-top: 1px solid var(--line-2); padding: 12px 0; }
.docs > .doc-group:first-child { border-top: 0; }
.dg-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 14px; align-items: center; }
.dg-head .tile { grid-row: 1 / span 2; }
.dg-title { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; min-width: 0; }
.dg-title h3 { margin: 0; font-size: 1.02rem; font-weight: 700; overflow-wrap: anywhere; }
.dg-kind { font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.dg-meta { grid-column: 2; font-size: .84rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.dg-list { margin: 10px 0 2px calc(1.7em + 7px); padding: 2px 14px; border: 1px solid var(--line-2); border-left: 3px solid var(--c, var(--X)); border-radius: var(--r-s); background: color-mix(in srgb, var(--c, var(--X)) 4%, var(--surface)); }
.dg-list .doc { padding: 9px 0; }
.dg-num { display: inline-grid; place-items: center; width: 1.7em; height: 1.7em; border-radius: 50%; border: 1.5px solid var(--line); font: 600 .78rem/1 var(--display); color: var(--muted); grid-row: 1 / span 2; }
@media (max-width: 560px) { .dg-list { margin-left: 0; } }
.tag-field input { max-width: 420px; }
.year-h { display: flex; align-items: baseline; gap: 12px; margin: 26px 0 4px; }
.year-h h2 { font: 600 1.05rem var(--display); margin: 0; letter-spacing: .02em; }
.year-h span { color: var(--muted); font-size: .9rem; }

/* filters */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 14px; }
.filters .field { margin: 0; }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: var(--r-s); overflow: hidden; background: var(--surface); }
.seg a { padding: 8px 13px; text-decoration: none; color: var(--text); font-size: .93rem; border-left: 1px solid var(--line); display: flex; align-items: center; gap: 7px; }
.seg a:first-child { border-left: 0; }
.seg a[aria-current="true"] { background: var(--ink); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 18px; }
.chip { display: inline-flex; gap: 6px; align-items: center; padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--text); font-size: .88rem; background: var(--surface); }
.chip b { font-weight: 600; color: var(--muted); }
.chip[aria-current="true"] { border-color: var(--ink-2); background: var(--ink-2); color: #fff; }
.chip[aria-current="true"] b { color: #cfe5e8; }

/* ------------------------------------------------------------------ forms & buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: 600 .95rem/1 var(--font); padding: 11px 16px; border-radius: var(--r-s); border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--ink-2); }
.btn.primary { background: var(--buoy); border-color: #d9a404; color: var(--buoy-ink); }
.btn.primary:hover { filter: brightness(.96); }
.btn.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.danger { color: var(--err); }
.btn.sm { padding: 7px 11px; font-size: .86rem; }
.btn.ghost { background: transparent; }
.btn[disabled] { opacity: .5; cursor: default; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field > span, .field > label { font-size: .9rem; font-weight: 600; }
.field small { color: var(--muted); font-size: .82rem; }
input[type=text], input[type=password], input[type=email], input[type=search], input[type=date], input[type=time], input[type=number], input[type=tel], select, textarea {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s);
  padding: 10px 12px; width: 100%; min-width: 0;
}
textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
select { padding-right: 30px; }
input:focus, select:focus, textarea:focus { border-color: var(--focus); outline: 2px solid color-mix(in srgb, var(--focus) 25%, transparent); }
.check { display: flex; gap: 9px; align-items: flex-start; font-size: .95rem; margin-bottom: 10px; }
.check input { margin-top: 4px; width: 17px; height: 17px; accent-color: var(--ink-2); }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 6px; }

/* ------------------------------------------------------------------ login */
.plain { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.plain-side { background: var(--ink); color: #e9f3f3; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.plain-side h1 { color: #fff; max-width: 16ch; font-size: clamp(1.6rem, 1.1rem + 1.6vw, 2.5rem); }
.plain-side p { opacity: .8; max-width: 42ch; }
.blocks-row { display: flex; gap: 8px; flex-wrap: wrap; }
.blocks-row .plate { min-width: 0; padding: 10px 12px 8px; }
.blocks-row .plate .code { font-size: 1.5rem; }
.plain-main { display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.login-box { width: 100%; max-width: 400px; }
.login-box h2 { font: 700 1.6rem var(--font); margin-bottom: 6px; }
.login-box .lang { border-color: var(--line); }
.login-box .lang a { color: var(--text); text-decoration: none; }
.login-box .lang a[aria-current="true"] { background: var(--ink); color: #fff; }
@media (max-width: 820px) {
  .plain { grid-template-columns: 1fr; }
  .plain-side { padding: 28px 20px; }
  .plain-side h1 { font-size: 1.4rem; }
  .plain-side .hide-sm { display: none; }
}

/* ------------------------------------------------------------------ boards */
.board-head { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin-bottom: 24px; }
.members { list-style: none; margin: 0; padding: 0; }
.members li { display: flex; gap: 12px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line-2); }
.members li:first-child { border-top: 0; }
.role { font-size: .8rem; color: var(--muted); }
.role.chair { color: var(--ink-2); font-weight: 700; }
@media (prefers-color-scheme: dark) { .role.chair { color: #8fd0db; } }
.post { padding: 18px 0; border-top: 1px solid var(--line-2); }
.post:first-child { border-top: 0; padding-top: 4px; }
.post h3 { margin-bottom: 4px; }
.post .by { font-size: .85rem; color: var(--muted); margin-bottom: 10px; }
.post .body { max-width: 70ch; }
.pin { font-size: .78rem; background: var(--line-2); border-radius: 4px; padding: 1px 7px; margin-left: 6px; }
.board-only { font-size: .78rem; border: 1px dashed var(--muted); border-radius: 4px; padding: 0 6px; margin-left: 6px; color: var(--muted); }
.poll { border: 1px solid var(--line); border-radius: var(--r-m); padding: 16px 18px; margin-bottom: 14px; background: var(--surface-2); }
.poll h3 { margin-bottom: 6px; }
.poll .opts { list-style: none; padding: 0; margin: 12px 0; }
.poll .opts li { margin-bottom: 8px; }
.bar { position: relative; border: 1px solid var(--line); border-radius: var(--r-s); padding: 8px 12px; overflow: hidden; background: var(--surface); display: flex; justify-content: space-between; gap: 10px; }
.bar i { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--c, var(--X)) 22%, transparent); }
.bar span { position: relative; }
.bar.mine { border-color: var(--ink-2); font-weight: 600; }
.vote-opt { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: var(--r-s); padding: 10px 12px; background: var(--surface); cursor: pointer; }
.vote-opt:hover { border-color: var(--ink-2); }
.vote-opt input { width: 18px; height: 18px; accent-color: var(--ink-2); }
.status-pill { font-size: .78rem; border-radius: 999px; padding: 2px 9px; border: 1px solid var(--line); }
.status-pill.open { border-color: var(--ok); color: var(--ok); }

.board-cards { display: grid; gap: 12px; }
.board-card { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; align-items: center; text-decoration: none; color: var(--text); padding: 14px 16px; border: 1px solid var(--line-2); border-radius: var(--r-m); background: var(--surface); }
.board-card:hover { border-color: var(--ink-2); }
.board-card .plate { grid-row: 1 / span 2; }
.board-card .muted { grid-column: 2; font-size: .88rem; }

/* news */
.news-item { padding: 14px 0; border-top: 1px solid var(--line-2); }
.news-item:first-child { border-top: 0; }
.news-item a.t { font-weight: 600; text-decoration: none; color: var(--text); }
.news-item a.t:hover { text-decoration: underline; }
.prose { max-width: 72ch; }
.prose img { height: auto; border-radius: var(--r-s); }
.prose table { border-collapse: collapse; }
.prose td, .prose th { border: 1px solid var(--line); padding: 4px 8px; }

/* cameras */
.cams { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.cam { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-m); overflow: hidden; }
.cam-img { aspect-ratio: 16 / 9; background: #0b1f23; display: grid; place-items: center; color: #9bb6bc; font-size: .9rem; text-align: center; }
.cam-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam-b { padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }

.empty { padding: 26px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--r-m); }
.pager { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 18px; align-items: center; }
.pager a, .pager span { padding: 6px 11px; border: 1px solid var(--line); border-radius: var(--r-s); text-decoration: none; color: var(--text); background: var(--surface); }
.pager span.cur { background: var(--ink); color: #fff; border-color: var(--ink); }

.foot { color: var(--muted); font-size: .85rem; padding: 24px 0 40px; border-top: 1px solid var(--line-2); }

/* ------------------------------------------------------------------ admin */
.adm { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--ink); color: #dbe9ea; padding: 18px 12px; position: sticky; top: 0; align-self: start; height: 100vh; overflow-y: auto; }
.side .brand { padding: 4px 8px 18px; color: #fff; }
.side nav a { display: flex; justify-content: space-between; padding: 9px 12px; border-radius: var(--r-s); color: inherit; text-decoration: none; font-size: .95rem; }
.side nav a:hover { background: rgba(255,255,255,.07); }
.side nav a[aria-current="page"] { background: rgba(255,255,255,.13); color: #fff; box-shadow: inset 3px 0 0 var(--buoy); }
.side nav .sep { height: 1px; background: rgba(255,255,255,.12); margin: 10px 8px; }
.side .count { background: var(--buoy); color: var(--buoy-ink); border-radius: 999px; font-size: .75rem; padding: 0 7px; font-weight: 700; }
.adm-main { padding: 26px 30px 60px; min-width: 0; }
@media (max-width: 900px) {
  .adm { grid-template-columns: 1fr; }
  .side { position: static; height: auto; }
  .side nav { display: flex; flex-wrap: wrap; gap: 2px; }
  .adm-main { padding: 18px 16px 50px; }
}
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 26px; }
.stat { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-m); padding: 14px 16px; text-decoration: none; color: var(--text); display: block; }
.stat b { display: block; font: 600 1.6rem/1.1 var(--display); }
.stat span { color: var(--muted); font-size: .88rem; }
.stat.alert { border-color: var(--warn); }
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .93rem; }
.tbl th { text-align: left; font-weight: 600; color: var(--muted); font-size: .84rem; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.tbl tr:hover td { background: var(--surface-2); }
.tbl .t { font-weight: 500; }
.tag { display: inline-block; font-size: .78rem; border-radius: 4px; padding: 1px 7px; background: var(--line-2); color: var(--text); white-space: nowrap; }
.tag.warn { background: color-mix(in srgb, var(--warn) 18%, transparent); }
.tag.ok { background: color-mix(in srgb, var(--ok) 18%, transparent); }
.tag.off { background: color-mix(in srgb, var(--err) 15%, transparent); }

/* upload */
.drop { display: block; cursor: pointer; position: relative; border: 2px dashed var(--line); border-radius: var(--r-l); padding: 34px 20px; text-align: center; background: var(--surface); transition: border-color .15s, background .15s; }
.drop.over { border-color: var(--ink-2); background: color-mix(in srgb, var(--ink-2) 6%, var(--surface)); }
.drop strong { display: block; font-size: 1.1rem; margin-bottom: 4px; }
.up-table td { vertical-align: middle; }
.up-table input, .up-table select { padding: 7px 9px; font-size: .9rem; }
.up-table .code-in { width: 92px; font-weight: 600; text-transform: uppercase; }
/* upload for the boards: picker in step 2, compact per-file toggles in the table */
.board-pick { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.board-pick legend { font-weight: 600; font-size: .9rem; padding: 0; margin-bottom: 8px; }
.board-pick .bp-all { padding-bottom: 8px; border-bottom: 1px solid var(--line-2); }
.board-pick .bp-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 18px; }
.board-pick .bp-list .check { align-items: center; margin: 0; padding: 6px 0; }
.board-pick .bp-list .check input { margin-top: 0; }
.board-pick .bp-list .check.muted { opacity: .6; }
.bpick { display: flex; flex-wrap: wrap; gap: 4px; min-width: 170px; }
.bpick label { position: relative; display: inline-grid; place-items: center; min-width: 2em; height: 2em; padding: 0 6px; border: 1.5px solid var(--c, var(--X)); border-radius: 6px; font: 600 .8rem/1 var(--display); color: var(--c, var(--X)); cursor: pointer; user-select: none; }
.bpick input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.bpick label:has(input:checked) { background: var(--c, var(--X)); color: #fff; }
.bpick label:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.up-status { font-size: .82rem; white-space: nowrap; }
.up-status.err { color: var(--err); }
.up-status.ok { color: var(--ok); }
.progress { height: 6px; background: var(--line-2); border-radius: 3px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--ink-2); width: 0; transition: width .2s; }
.sticky-bar { position: sticky; bottom: 0; background: var(--paper); padding: 14px 0; border-top: 1px solid var(--line); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; z-index: 2; }
.reach { font-size: .82rem; color: var(--muted); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.pw-shown { font: 600 1.3rem var(--display); letter-spacing: .04em; background: var(--buoy); color: var(--buoy-ink); padding: 6px 12px; border-radius: var(--r-s); display: inline-block; }

/* documents page header with the apartment plate */
.docs-head { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.docs-head h1 { margin-bottom: 2px; }
.docs-head .plate { min-width: 140px; }
.docs-head .plate .code { font-size: 2.1rem; }
.chip-new { border-color: #d9a404; }
.chip-new[aria-current="true"] { background: var(--buoy); border-color: #d9a404; color: var(--buoy-ink); }
.chip-new[aria-current="true"] b { color: var(--buoy-ink); }

.pw-box { border: 1px solid var(--line-2); border-radius: var(--r-m); padding: 12px 16px 6px; margin: 4px 0 16px; }
.pw-box legend { font-weight: 600; font-size: .9rem; padding: 0 6px; }
.pw-set { margin: -2px 0 12px 26px; max-width: 340px; }

/* admin document list */
.doc-tbl tr.picked td { background: color-mix(in srgb, var(--buoy) 14%, transparent); }
.doc-tbl tr.saved td { background: color-mix(in srgb, var(--ok) 16%, transparent); transition: background .4s; }
.title-view { display: flex; gap: 6px; align-items: baseline; }
.icon-btn { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 1rem; padding: 0 4px; border-radius: 4px; }
.icon-btn:hover { color: var(--text); background: var(--line-2); }
.rename-form { display: grid; gap: 6px; max-width: 520px; }
.rename-form input { padding: 6px 9px; font-size: .9rem; }
.bulk-bar select, .bulk-bar input[type=text] { width: auto; padding: 8px 10px; font-size: .9rem; }
.bulk-replace { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }

[hidden] { display: none !important; }

/* ---------------------------------------------------------------- version 2 */
.flash.info { border-color: var(--ink-2); }
.email-nudge a { font-weight: 600; }
.facts li.warn { border-color: var(--warn); color: var(--warn); }

/* apartment boxes at the top of the documents page (owners with several apartments) */
.apt-tiles { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 18px; }
.apt-tile { position: relative; display: grid; gap: 2px; min-width: 120px; padding: 10px 14px 9px; border-radius: var(--r-m); text-decoration: none;
  color: var(--c, var(--X)); background: var(--surface); border: 2px solid var(--c, var(--X)); }
.apt-tile .apt-code { font: 600 1.25rem/1.1 var(--display); letter-spacing: .02em; }
.apt-tile .apt-sub { font-size: .8rem; color: var(--muted); }
.apt-tile.cur { background: var(--c, var(--X)); color: #fff; }
.apt-tile.cur .apt-sub { color: rgba(255, 255, 255, .85); }
.apt-tile.all .apt-code { font-family: var(--font); font-weight: 700; font-size: 1.05rem; }
.apt-tile.former { border-style: dashed; }
.apt-tile .badge-new { position: absolute; top: -8px; right: -6px; }
.apt-tile:hover { box-shadow: var(--shadow); }
/* boards and controllers in the same row, after the apartments: a ring like the board marks in the list */
.apt-sep { align-self: stretch; width: 1px; margin: 4px 6px; background: var(--line); }
.apt-tile.role { border-style: double; border-width: 4px; padding: 11px 12px 7px; }
.apt-tile.role .apt-code { font-family: var(--font); font-weight: 700; font-size: 1.05rem; }
.apt-chip.role { border-style: double; border-width: 3px; font-family: var(--font); }

.tile.ctl { border-radius: 50%; }
.tile.personal[class*="blk-"] { color: var(--c, var(--ink-2)); }

/* audience editor on the document page */
.aud-edit { border: 1px solid var(--line-2); border-radius: var(--r-m); padding: 10px 16px 14px; margin: 0 0 16px; }
.aud-edit legend { font-weight: 600; padding: 0 6px; }
.aud-list { list-style: none; margin: 0 0 6px; padding: 0; }
.aud-list li { margin: 2px 0; }
.aud-add { margin-top: 8px; }

/* person page: one block per ownership */
.own-row { border-top: 1px solid var(--line-2); padding: 10px 0; }
.own-row:first-child { border-top: 0; padding-top: 0; }
.own-row.ended { opacity: .55; }
.own-head { display: flex; gap: 12px; align-items: center; }
.merge-group .tbl td, .merge-group .tbl th { vertical-align: middle; }

/* many apartments: one compact row per block */
.apt-compact { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-m); padding: 12px 14px; margin: 0 0 18px; }
.apt-compact-top { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 8px; }
.apt-chosen { font-weight: 600; color: var(--ink-2); }
.apt-find { margin-left: auto; }
.apt-find input { width: 11rem; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--r-s); font: inherit; background: var(--surface); color: var(--text); }
.apt-row { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; border-top: 1px solid var(--line-2); }
.apt-row .tile { margin-top: 3px; }
.apt-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.apt-chip { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1.5px solid var(--c, var(--line)); border-radius: 999px;
  font: 600 .85rem/1.2 var(--display); letter-spacing: .02em; color: var(--c, var(--ink-2)); text-decoration: none; background: var(--surface); }
.apt-chip.all { font-family: var(--font); border-color: var(--ink-2); color: var(--ink-2); }
.apt-chip.cur { background: var(--c, var(--ink-2)); color: #fff; border-color: var(--c, var(--ink-2)); }
.apt-chip.former { border-style: dashed; opacity: .8; }
.apt-chip .dot-new { width: 8px; height: 8px; border-radius: 50%; background: var(--buoy); box-shadow: 0 0 0 1.5px var(--surface); }
.apt-chip:hover { box-shadow: var(--shadow); }
@media (max-width: 600px) {
  .apt-find { margin-left: 0; width: 100%; }
  .apt-find input { width: 100%; }
  /* up to 6 big boxes: three in a row on a phone */
  .apt-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .apt-tile { min-width: 0; padding: 8px 9px 7px; }
  .apt-tile .apt-code { font-size: 1.02rem; }
  .apt-tile .apt-sub { font-size: .72rem; }
  .apt-sep { display: none; }
  .apt-tile.role { padding: 10px 7px 5px; }
  .apt-tile.role .apt-code { font-size: .95rem; }
}

/* ---------------------------------------------------------------- owners' reservations */
.res-h { font-size: 1.15rem; margin: 22px 0 10px; }
.res-past summary { cursor: pointer; list-style: none; }
.res-past summary::-webkit-details-marker { display: none; }
.res-past summary h2::before { content: '▸ '; color: var(--muted); }
.res-past[open] summary h2::before { content: '▾ '; }
.res-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.res-item a { display: grid; grid-template-columns: minmax(170px, 1.1fr) minmax(150px, 1.2fr) minmax(0, 1.4fr) auto; gap: 6px 16px; align-items: center;
  padding: 12px 16px; background: var(--surface); border: 1px solid var(--line-2); border-left: 4px solid var(--line); border-radius: var(--r-s); text-decoration: none; color: var(--text); }
.res-item a:hover { border-color: var(--ink-2); }
.res-item.st-confirmed a { border-left-color: var(--ok); }
.res-item.st-new a, .res-item.st-changed a, .res-item.st-cancel_req a, .res-item.st-draft a { border-left-color: var(--warn); }
.res-item.st-rejected a, .res-item.st-cancelled a { border-left-color: var(--err); opacity: .75; }
.res-when, .res-who { display: flex; flex-direction: column; }
.res-svc .tag { margin: 1px 0; }
.res-state { text-align: right; }
@media (max-width: 720px) { .res-item a { grid-template-columns: 1fr auto; } .res-svc { grid-column: 1 / -1; } }
.res-fs { border: 0; padding: 0; margin: 0 0 18px; }
.res-fs legend { font-weight: 700; font-size: 1.02rem; margin-bottom: 10px; padding: 0; }
.res-fs h4 { margin: 8px 0 8px; font-size: .95rem; }
.res-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 0 18px; }
.seg-radio { display: flex; gap: 18px; margin-bottom: 10px; align-items: center; padding: 4px 6px; border-radius: var(--r-s); }
.seg-radio label { display: flex; gap: 7px; align-items: center; }
.field.has-err input, .field.has-err select, .field.has-err textarea { border-color: var(--err); }
.err-text { color: var(--err) !important; }
.check.has-err { color: var(--err); }
.res-form textarea { width: 100%; }
.res-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 6px 28px; }
.res-details h3 { font-size: .95rem; margin: 6px 0 6px; color: var(--muted); }
.res-details dl { margin: 0 0 10px; }
.res-details dl > div { display: grid; grid-template-columns: minmax(120px, 44%) 1fr; gap: 8px; padding: 5px 6px; border-bottom: 1px solid var(--line-2); border-radius: 4px; }
.res-details dt { color: var(--muted); font-size: .9rem; }
.res-details dd { margin: 0; overflow-wrap: anywhere; }
.res-details s, .chg-was { color: var(--muted); }
/* what the owner changed since the office's last decision / what the office changed from the request */
.chg-owner { background: color-mix(in srgb, var(--err) 14%, transparent) !important; border-radius: 4px; }
.chg-office { background: color-mix(in srgb, #2b6cb0 14%, transparent) !important; border-radius: 4px; }
.field.chg-owner, .field.chg-office, .check.chg-owner, .check.chg-office { padding: 6px 8px; }
.res-legend-row span { display: inline-block; padding: 2px 8px; margin: 0 6px 4px 0; }
.res-legend { padding: 8px 12px; }
.chg-legend ul { margin: 6px 0 0; padding-left: 18px; }
.res-reply { background: var(--surface-2); border-left: 4px solid var(--ink-2); padding: 12px 16px; border-radius: var(--r-s); margin-bottom: 16px; }
.res-reply h2 { font-size: 1rem; margin: 0 0 6px; }
.res-reply p { margin: 0; }
.res-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.res-actions form { margin: 0; }
.res-decide .btn { white-space: normal; }
.office-fs { background: var(--surface-2); padding: 12px 14px 4px; border-radius: var(--r-s); }
.res-log { list-style: none; margin: 0; padding: 0; }
.res-log > li { padding: 7px 0; border-bottom: 1px solid var(--line-2); }
.res-log ul { margin: 4px 0 0; padding-left: 18px; }
.res-tbl tr.st-new td:first-child, .res-tbl tr.st-changed td:first-child, .res-tbl tr.st-cancel_req td:first-child { box-shadow: inset 4px 0 0 var(--warn); }
.res-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; }
.res-day { display: flex; flex-direction: column; gap: 1px; padding: 7px 9px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-s); text-decoration: none; color: var(--text); font-size: .86rem; }
.res-day:hover { border-color: var(--ink-2); }
.res-day .d { color: var(--muted); }
.res-day .d b { color: var(--text); }
.res-day.we { background: var(--surface-2); }
.res-day.today { border-color: var(--ok); }
.res-day.cur { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.res-day .tag { align-self: flex-start; margin-top: 2px; }
.res-day-sec { margin-top: 18px; }
.res-chips .chip { margin: 0 4px 6px 0; }
@media print {
  .top, .nav, .foot, .side, .no-print, .viewas, .email-nudge, .flash.info, .apt-tiles { display: none !important; }
  .adm { display: block !important; }
  .adm-main, main.wrap { padding: 0 !important; margin: 0 !important; max-width: none !important; }
  .panel { box-shadow: none !important; break-inside: avoid; }
  body { background: #fff !important; color: #000 !important; }
  a { color: inherit !important; text-decoration: none !important; }
}
