/* =====================================================================
   Homewall — admin panel. Colours of homewall.nl and the client form:
   warm beige, tan accent (#c8ab88), near-black ink.
   Theme: <html data-theme="light|dark"> (set before the first paint, see base.html).
   Layout: blocks adapt to the width of their own column (container queries), not only to the window.
   ===================================================================== */
:root {
  color-scheme: light;
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --bg: #f7f4f0;
  --surface: #ffffff;
  --surface-2: #fbf9f6;
  --surface-3: #f4eee8;
  --text: #0b1613;
  --text-2: #353c39;
  --muted: #69706c;
  --line: #ece6de;
  --line-2: #dcd3c7;
  --accent: #c8ab88;
  --accent-ink: #8a6a43;
  --accent-soft: #f4eee8;
  --on-accent: #1d150c;
  --primary: #0b1613;
  --primary-hover: #000;
  --on-primary: #fff;
  --ok: #2f7a50;      --ok-soft: #e9f4ee;
  --warn: #8a5a12;    --warn-soft: #fbf1df;
  --danger: #b8402f;  --danger-soft: #fbece9;
  --info: #2c5d8a;    --info-soft: #e8f0f8;
  --violet: #6a4c9c;  --violet-soft: #f0ebf8;
  --shadow: 0 1px 2px rgba(31, 22, 12, .05), 0 8px 24px -16px rgba(31, 22, 12, .18);
  --shadow-lg: 0 2px 6px rgba(31, 22, 12, .08), 0 18px 40px -12px rgba(31, 22, 12, .28);
  --r-sm: 8px;
  --r: 12px;
  --r-pill: 999px;
  --topbar-h: 58px;
  --gutter: 24px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #141311;
  --surface: #1c1a17;
  --surface-2: #211f1b;
  --surface-3: #2a2621;
  --text: #f3efe9;
  --text-2: #d8d2c9;
  --muted: #a19b92;
  --line: #2f2b25;
  --line-2: #3d382f;
  --accent: #c8ab88;
  --accent-ink: #dcc1a0;
  --accent-soft: #2c261f;
  --primary: #f3efe9;
  --primary-hover: #fff;
  --on-primary: #141311;
  --ok: #7cc79c;      --ok-soft: #1c2c22;
  --warn: #e7b866;    --warn-soft: #2e2617;
  --danger: #ee8a7b;  --danger-soft: #331f1b;
  --info: #8db9e3;    --info-soft: #1a2633;
  --violet: #b9a2e3;  --violet-soft: #251f31;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, .4), 0 18px 40px -12px rgba(0, 0, 0, .7);
}
[data-theme="dark"] .brand img, [data-theme="dark"] .login__logo { filter: invert(.92) hue-rotate(180deg) saturate(.6); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.5 var(--font); font-feature-settings: 'tnum' 1, 'cv11' 1;
  overflow-wrap: break-word;
}
a { color: inherit; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
a:hover { color: var(--accent-ink); text-decoration-color: currentColor; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: clamp(21px, 2.4vw, 26px); font-weight: 750; }
p { margin: 0 0 8px; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.strong { font-weight: 700; }
.nowrap { white-space: nowrap; }
.prewrap { white-space: pre-wrap; }
.break { overflow-wrap: anywhere; }
.ico { flex: none; vertical-align: -3px; }
.ico--sm { width: 15px; height: 15px; vertical-align: -2px; }

/* ------------------------------------------------------------ top bar */
.topbar {
  position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.topbar__in {
  max-width: 1400px; margin: 0 auto; padding: 8px var(--gutter); min-height: var(--topbar-h);
  display: flex; align-items: center; gap: 8px 20px; flex-wrap: wrap;
}
.brand { flex: none; display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { height: 20px; width: auto; display: block; }
.brand__tag {
  font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-ink);
  border-left: 1px solid var(--line-2); padding-left: 10px; white-space: nowrap;
}
/* the nav shrinks (and scrolls) instead of pushing the buttons on the right out of the window */
.nav { flex: 1 1 auto; min-width: 0; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  flex: none; padding: 7px 12px; border-radius: var(--r-pill); text-decoration: none; color: var(--text-2);
  font-weight: 550; white-space: nowrap; position: relative;
}
.nav a:hover { background: var(--surface-3); color: var(--text); }
.nav a.is-active { background: var(--primary); color: var(--on-primary); }
.nav__count {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px;
  border-radius: var(--r-pill); background: var(--danger); color: #fff; font-size: 11px; font-weight: 750; vertical-align: 1px;
}
.nav__count[hidden] { display: none; }
.topbar__end { flex: none; margin-left: auto; display: flex; align-items: center; gap: 8px; }
.topbar__user {
  color: var(--muted); font-size: 13px; white-space: nowrap; margin: 0 2px; padding: 6px 10px; border-radius: var(--r-pill);
  text-decoration: none; display: inline-flex; align-items: center; gap: 4px;
}
.topbar__user:hover, .topbar__user.is-active { background: var(--surface-3); color: var(--text); }
.icon-btn {
  flex: none; width: 34px; height: 34px; display: inline-grid; place-items: center; padding: 0;
  border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2); cursor: pointer;
}
.icon-btn:hover { border-color: var(--text); color: var(--text); }
.icon-btn.is-off { color: var(--muted); }
.icon-btn .ico { width: 17px; height: 17px; }
.theme-ico--dark { display: none; }
[data-theme="dark"] .theme-ico--dark { display: block; }
[data-theme="dark"] .theme-ico--light { display: none; }
.lang-switch { flex: none; display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--r-pill); padding: 2px; }
.lang-switch a { padding: 4px 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 650; text-decoration: none; color: var(--muted); }
.lang-switch a.is-active { background: var(--accent); color: var(--on-accent); }
.lang-switch--center { margin: 16px auto 0; display: flex; width: max-content; }
.logout .btn__text { display: inline; }
.logout .ico { display: none; }

/* ------------------------------------------------------------ layout */
.page { max-width: 1400px; margin: 0 auto; padding: 24px var(--gutter) 64px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head > * { min-width: 0; }
.back { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); text-decoration: none; margin-bottom: 6px; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px;
  box-shadow: var(--shadow); margin-bottom: 16px; min-width: 0; container-type: inline-size;
}
.card--flush { padding: 0; overflow: hidden; }
.card__title { font-size: 15px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card__title--pad { padding: 16px 20px 4px; }
.sec-no {
  flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px;
  background: var(--accent-soft); color: var(--accent-ink); font-size: 12px; font-weight: 750;
}
.section { margin-bottom: 8px; }
.section__title { font-size: 15px; font-weight: 750; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0 4px; }
.section__meta { font-weight: 500; color: var(--muted); font-size: 13px; }
.sub-title { font-size: 13px; font-weight: 700; margin: 16px 0 8px; color: var(--text-2); }

/* ------------------------------------------------------------ buttons, fields */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px;
  border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--surface); color: var(--text);
  font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; line-height: 1.2; max-width: 100%;
}
.btn:hover { border-color: var(--text); color: var(--text); }
.btn--primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn--primary:hover { background: var(--primary-hover); color: var(--on-primary); }
.btn--ghost { background: transparent; }
.btn--danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); background: transparent; }
.btn--danger:hover { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
.btn--sm { padding: 5px 10px; font-size: 12.5px; }
.btn--block { width: 100%; }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
summary:focus-visible, .icon-btn:focus-visible, .seg__btn:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; min-width: 0; }
.field__label { font-size: 12px; font-weight: 600; color: var(--muted); }
input:not([type=checkbox]):not([type=radio]), select, textarea {
  width: 100%; max-width: 100%; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: var(--r-sm);
  background: var(--surface); min-height: 36px;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; }
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 12px; }
.form-grid .field--wide { grid-column: span 2; }
.form-grid .field--full { grid-column: 1 / -1; }
.form-grid > .btn { grid-column: 1 / -1; justify-self: start; }
@container (max-width: 520px) {
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container (max-width: 300px) {
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .form-grid .field--wide { grid-column: auto; }
}
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.inline { display: inline; }

/* ------------------------------------------------------------ flash, banners */
.flash { padding: 10px 14px; border-radius: var(--r-sm); margin-bottom: 14px; background: var(--ok-soft); color: var(--ok); font-weight: 550; }
.flash--error { background: var(--danger-soft); color: var(--danger); }
.banner {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: var(--r);
  margin-bottom: 14px; border: 1px solid transparent;
}
.banner > div { min-width: 0; }
.banner ul { margin: 4px 0 0; padding-left: 18px; }
.banner p { margin: 6px 0 0; }
.banner .ico { margin-top: 2px; }
.banner--warn { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 22%, transparent); }
.banner--info { background: var(--info-soft); color: var(--info); border-color: color-mix(in srgb, var(--info) 22%, transparent); }
.banner b { color: inherit; }
.notice { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-3); color: var(--text-2); }
.notice--warn { background: var(--warn-soft); color: var(--warn); }

/* ------------------------------------------------------------ pills, tags */
.pill {
  display: inline-block; padding: 3px 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 650;
  white-space: nowrap; vertical-align: middle; background: var(--surface-3); color: var(--text-2);
}
.pill--sm { padding: 1px 8px; font-size: 11px; }
.pill--blue { background: var(--info-soft); color: var(--info); }
.pill--sand { background: var(--accent-soft); color: var(--accent-ink); }
.pill--violet { background: var(--violet-soft); color: var(--violet); }
.pill--green { background: var(--ok-soft); color: var(--ok); }
.pill--red { background: var(--danger-soft); color: var(--danger); }
.pill--gray { background: var(--surface-3); color: var(--muted); }
.tag {
  display: inline-block; padding: 1px 8px; border-radius: var(--r-pill); font-size: 11.5px; font-weight: 600;
  background: var(--surface-3); color: var(--text-2); margin: 2px 2px 2px 0;
}
.tag--warn { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); }
.tag--ok { background: var(--ok-soft); color: var(--ok); }
.tag--quick { background: var(--violet-soft); color: var(--violet); vertical-align: middle; }
.tag--profile { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; }
/* profile colour of a room: white / black / silver */
.swatch { width: 11px; height: 11px; border-radius: 50%; border: 1px solid var(--line-2); flex: none; }
.swatch--white { background: #fff; }
.swatch--black { background: #1c1c1c; }
.swatch--silver { background: linear-gradient(135deg, #f1f1f1, #a7abb0); }
.code {
  display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 5px;
  border: 1px solid var(--line-2); color: var(--muted); vertical-align: middle; margin-left: 4px;
}
.lang-badge { font-size: 10.5px; font-weight: 750; padding: 1px 5px; border-radius: 4px; border: 1px solid var(--line-2); color: var(--muted); }

/* ------------------------------------------------------------ KPIs, toolbar */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px;
  text-decoration: none; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow); min-width: 0;
}
.kpi:hover { border-color: var(--accent); color: inherit; }
.kpi__label { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.kpi__value { font-size: 26px; font-weight: 750; letter-spacing: -.02em; }
.kpi--warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.kpi--warn .kpi__label, .kpi--warn .kpi__value { color: var(--warn); }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar select { width: auto; max-width: 100%; flex: 0 1 auto; min-width: 0; }
.search { position: relative; flex: 1 1 240px; max-width: 460px; min-width: 0; display: flex; align-items: center; }
.search .ico { position: absolute; left: 11px; color: var(--muted); }
.search input { padding-left: 34px !important; }
.pager { display: flex; gap: 10px; align-items: center; justify-content: center; margin-top: 14px; }

/* ------------------------------------------------------------ tables */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; position: relative; }  /* relative: hidden labels stay inside */
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2);
}
.table td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; white-space: nowrap; }
.table .sub { color: var(--muted); font-size: 12px; }
.table .empty { text-align: center; color: var(--muted); padding: 36px 14px; }
.table--compact th, .table--compact td { padding: 6px 10px; }
.table--compact td:first-child { white-space: nowrap; }
.table--compact { border: 1px solid var(--line); border-radius: var(--r-sm); border-collapse: separate; border-spacing: 0; overflow: hidden; }
.row-link { cursor: pointer; }
.row-link:hover td { background: var(--surface-2); }
.order-no { font-weight: 750; text-decoration: none; white-space: nowrap; }
.order-no.is-none { font-weight: 550; font-style: italic; color: var(--muted); }
.flags { white-space: nowrap; text-align: right; }
.flag { display: inline-flex; align-items: center; gap: 2px; color: var(--muted); margin-left: 6px; font-size: 12px; }
.flag--warn { color: var(--warn); }
.cell-label { display: none; }

/* lists as cards on a narrow screen: every row becomes a small card */
.only-cards, .only-cards-inline { display: none; }
@container (max-width: 640px) {
  .table--cards thead { display: none; }
  .table--cards, .table--cards tbody { display: block; }
  .table--cards tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .table--cards tbody tr:last-child { border-bottom: 0; }
  .table--cards td { display: block; padding: 0; border: 0; text-align: left; min-width: 0; }
  .table--cards td.num { text-align: left; }
  .table--cards .c-top { grid-column: 1; grid-row: 1; }
  .table--cards .c-side { grid-column: 2; grid-row: 1; text-align: right; justify-self: end; }
  .table--cards .c-wide { grid-column: 1 / -1; }
  .table--cards .only-table { display: none; }
  .table--cards .only-cards { display: block; }
  .table--cards .only-cards-inline { display: inline; color: var(--muted); }
  .table--cards .flags { text-align: left; }
  .table--cards .flag { margin: 0 8px 0 0; }
  .table--cards .empty { grid-column: 1 / -1; }
  .table--cards .metrics { display: flex; gap: 4px 14px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); }
  .table--cards .metrics b { color: var(--text); }
  .table--cards .c-date { font-size: 12px; color: var(--muted); }
  .table--cards td:empty { display: none; }
}

/* ------------------------------------------------------------ order page */
.order-head { display: flex; justify-content: space-between; gap: 12px 16px; align-items: flex-end; margin-bottom: 16px; flex-wrap: wrap; }
.order-head > div { min-width: 0; }
.order-head__title { font-size: clamp(24px, 3vw, 30px); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.order-head__none { color: var(--muted); font-weight: 600; }
.order-head__meta { color: var(--muted); margin: 4px 0 0; }
.order-head__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.order-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.order-main { min-width: 0; container: main / inline-size; }
.order-side { position: sticky; top: calc(var(--topbar-h) + 16px); min-width: 0; }
.side-card { padding: 16px; }
.side-card__title { font-size: 13.5px; font-weight: 700; margin-bottom: 10px; display: flex; gap: 6px; align-items: center; }
.assign-number { margin: -2px 0 12px; }
.assign-number .check { font-size: 13.5px; font-weight: 600; }
.assign-number p { margin: 4px 0 0 24px; }

.tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.tile {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 4px; box-shadow: var(--shadow); min-width: 0;
}
.tile__label { font-size: 11.5px; color: var(--muted); font-weight: 600; line-height: 1.3; }
.tile__value { font-size: 22px; font-weight: 750; letter-spacing: -.02em; line-height: 1.15; }
.tile__value small { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.tile--key { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
@container main (max-width: 900px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container main (max-width: 640px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-col { grid-template-columns: minmax(0, 1fr); }
}

.kv { margin: 0; display: grid; gap: 6px; }
.kv > div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 10px; }
.kv dt { color: var(--muted); font-size: 12.5px; padding-top: 1px; }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.kv a { text-decoration: none; }
.kv--small > div { grid-template-columns: 110px minmax(0, 1fr); font-size: 12px; }
@container (max-width: 330px) {
  .kv > div, .kv--small > div { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
details.edit { margin-top: 12px; }
details.edit summary, details.meta summary { cursor: pointer; color: var(--accent-ink); font-weight: 600; font-size: 13px; }
details.edit form { margin-top: 12px; }

/* room */
.room { padding: 0; overflow: hidden; scroll-margin-top: calc(var(--topbar-h) + 16px); container: room / inline-size; }
.room__head {
  display: flex; justify-content: space-between; gap: 10px 16px; align-items: flex-start; flex-wrap: wrap;
  padding: 16px 20px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2);
}
.room__head > div { min-width: 0; }
.room__title { font-size: 16px; font-weight: 750; }
.room__facts { margin: 4px 0 0; color: var(--text-2); font-size: 13px; }
.room__panels { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; min-width: 0; }
.panel-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border: 1px solid var(--line-2);
  border-radius: var(--r-sm); background: var(--surface); text-decoration: none; line-height: 1.2; max-width: 100%; min-width: 0;
}
.panel-chip > span { min-width: 0; }
.panel-chip img { width: 30px; height: 40px; object-fit: cover; border-radius: 4px; flex: none; }
.panel-chip b { display: block; font-size: 12.5px; }
.panel-chip small { color: var(--muted); font-size: 11px; }
.room__top { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; padding: 16px 20px 0; }
.room > .table-scroll, .room > .notice, .room__tables { margin: 14px 20px 0; }
.room__tables { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.room__tables > div { min-width: 0; }
.room__tables .sub-title { margin-top: 0; }
/* kitchen backsplash: the zones (rows of "PVC SPC Кухня") and its result; the settings in the calculator */
.room__kitchen .sub-title { display: flex; align-items: center; gap: 6px; }
.room__kitchen .notice { margin-bottom: 10px; }
.kitchen-note { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.kitchen-table td.small { min-width: 170px; }
.kitchen-sums { margin-top: 12px; max-width: 560px; }
.kitchen-set { margin-top: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); scroll-margin-top: 80px; }
.kitchen-set h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; font-size: 14px; }
.kitchen-set__row { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: end; }
.kitchen-set__row .field { min-width: 150px; }
.kitchen-set__row .field--wide { min-width: 280px; }
.kitchen-set [data-kitchen-walls][hidden] { display: none; }
.kitchen-set p { margin: 10px 0 0; }
.grid { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13px; }
.grid th, .grid td { padding: 7px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.grid thead th { font-size: 11.5px; color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: .03em; }
.grid tbody th { text-align: left; font-weight: 600; color: var(--text-2); position: sticky; left: 0; background: var(--surface); z-index: 1; }
.grid .num { text-align: right; }
.grid__sum { background: var(--surface-2); font-weight: 700; }
.grid__key td { font-weight: 700; }
.grid [data-wall] { cursor: default; }
.grid .is-hl { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.box { color: var(--muted); }
.box--on { color: var(--ok); font-weight: 700; }
.room__sums { margin: 0; display: grid; align-content: start; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.room__sums > div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 7px 12px; border-bottom: 1px solid var(--line); font-size: 13px; }
.room__sums > div:last-child { border-bottom: 0; }
.room__sums dt { color: var(--muted); min-width: 0; }
.room__sums dd { margin: 0; font-weight: 650; white-space: nowrap; }
.room__sums small { color: var(--muted); font-weight: 500; }
.room__sums .is-key { background: var(--accent-soft); }
.room__sums .is-key dt { color: var(--accent-ink); font-weight: 650; }
.room__sums .is-total { background: var(--surface-2); }
.room__sums .is-total dt { color: var(--text); font-weight: 650; }
.room__foot { display: flex; gap: 10px 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 14px 20px 16px; }
.remark { margin: 0; font-size: 13px; color: var(--text-2); min-width: 0; }
.seg { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.seg__label { font-weight: 600; font-size: 13px; margin-right: 4px; }
.seg__btn {
  padding: 5px 14px; border: 1px solid var(--line-2); background: var(--surface); border-radius: var(--r-pill);
  font-weight: 650; font-size: 12.5px; cursor: pointer; color: var(--text-2);
}
.seg__btn:hover { border-color: var(--text); }
.seg__btn.is-yes { background: var(--ok-soft); color: var(--ok); border-color: var(--ok); }
.seg__btn.is-no { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
.seg__result { font-weight: 700; color: var(--ok); font-size: 13px; }
.warnings { list-style: none; margin: 0; padding: 10px 20px 14px; display: grid; gap: 4px; color: var(--warn); font-size: 12.5px; }
.card > .warnings { padding: 10px 0 0; }
.room .warnings { background: var(--warn-soft); }
@container room (max-width: 760px) {
  .room__top { grid-template-columns: minmax(0, 1fr); }
}
@container room (max-width: 520px) {
  .room__head, .room__top, .room__foot { padding-left: 14px; padding-right: 14px; }
  .room > .table-scroll, .room > .notice, .room__tables { margin-left: 14px; margin-right: 14px; }
  .warnings { padding-left: 14px; padding-right: 14px; }
}

/* 3D preview (renderer: static/vendor/room3d.js, colours: static/r3.css) */
.viz {
  position: relative; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden;
  background: radial-gradient(90% 70% at 50% 35%, var(--surface) 0%, transparent 70%), linear-gradient(180deg, var(--surface-2), var(--surface-3));
}
.viz__stage { position: relative; aspect-ratio: 4 / 3; max-height: 440px; width: 100%; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.viz__stage.is-dragging { cursor: grabbing; }
.viz__stage .r3 { position: absolute; inset: 0; width: 100%; height: 100%; }
.viz__bar { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; z-index: 2; }
.viz__bar .icon-btn { width: 30px; height: 30px; background: color-mix(in srgb, var(--surface) 88%, transparent); }
.viz__bar .icon-btn.is-on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.viz__hint { position: absolute; left: 10px; bottom: 8px; font-size: 11.5px; color: var(--muted); pointer-events: none; }
.viz__empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 13px; text-align: center; padding: 16px; }

/* object details */
.qa { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 28px; }
.qa__group { padding: 4px 0 10px; min-width: 0; }
.qa__title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent-ink); margin-bottom: 6px; }
.qa__list { list-style: none; margin: 0; padding: 0; }
.qa__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.qa__q { font-size: 13px; min-width: 0; }
.qa__notice { color: var(--muted); font-size: 12.5px; margin: 0; }
.qa__other { font-size: 12.5px; margin: 6px 0 0; }
.qa__span { grid-column: 1 / -1; }
.internal { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line-2); }
.internal__hint { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 12.5px; margin: 0 0 8px; }
.answer { flex: none; font-size: 12px; font-weight: 700; padding: 1px 9px; border-radius: var(--r-pill); white-space: nowrap; }
.answer--yes { background: var(--ok-soft); color: var(--ok); }
.answer--no { background: var(--danger-soft); color: var(--danger); }
.answer--unknown { background: var(--warn-soft); color: var(--warn); }
.answer--none { color: var(--muted); }
@container (max-width: 600px) { .qa { grid-template-columns: minmax(0, 1fr); } }

/* calculator */
.calc-settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0 10px; align-items: end; margin-bottom: 4px; }
.calc-settings__actions { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; grid-column: 1 / -1; }
.calc-table td:first-child { font-weight: 550; }
.calc-table .is-key td { background: var(--accent-soft); font-weight: 750; }
.calc-table .is-total td { background: var(--surface-2); font-weight: 650; }
.calc-table .num { font-size: 15px; font-weight: 700; }
.calc-table__note { display: none; font-weight: 400; font-size: 12px; color: var(--muted); }
@container (max-width: 600px) {
  .calc-table .col-note { display: none; }
  .calc-table__note { display: block; }
  .calc-table td, .calc-table th { padding-left: 10px; padding-right: 10px; }
}

/* files */
.files { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.files a { text-decoration: none; font-weight: 550; overflow-wrap: anywhere; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(130px, 45%), 1fr)); gap: 8px; }
.gallery__item {
  aspect-ratio: 4 / 3; border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--line); background: var(--surface-3);
  display: block;
}
.gallery__item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.gallery__item:hover img { transform: scale(1.04); }
.gallery__file { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 4px; padding: 6px; text-align: center; color: var(--muted); }
.gallery__file small { font-size: 10.5px; word-break: break-all; }

/* sidebar */
.copy { display: flex; gap: 6px; }
.copy input { font-size: 12px; min-height: 32px; min-width: 0; }
.note-form { display: grid; gap: 6px; margin-bottom: 12px; }
.note-form .btn { justify-self: end; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-height: 420px; overflow: auto; }
.timeline__item { padding-left: 12px; border-left: 2px solid var(--line-2); min-width: 0; }
.timeline__item--note { border-left-color: var(--accent); }
.timeline__item--created, .timeline__item--resubmitted { border-left-color: var(--info); }
.timeline__meta { font-size: 11.5px; color: var(--muted); }
.timeline__text { font-size: 13px; overflow-wrap: anywhere; }
.versions, .mini-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.versions li { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.danger-zone { margin-top: 8px; text-align: right; }

/* client page */
.client-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 20px; align-items: start; }
.client-grid > * { min-width: 0; }

/* login, errors */
.is-login .page { min-height: 100vh; display: grid; place-items: center; }
.login { width: 100%; max-width: 380px; position: relative; }
.login__card { padding: 28px; }
.login__logo { display: block; margin: 4px auto 18px; height: 26px; width: auto; }
.login__title { font-size: 18px; text-align: center; margin-bottom: 18px; }
.login__theme { position: absolute; top: 12px; right: 12px; }
.empty-state { text-align: center; padding: 80px 20px; }
.empty-state__code { font-size: 56px; font-weight: 800; color: var(--accent); }

/* ------------------------------------------------------------ new-order notifications */
.refresh-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; padding: 8px 12px;
  border-radius: var(--r); background: var(--info-soft); color: var(--info); font-size: 13px;
}
.refresh-bar[hidden] { display: none; }
.refresh-bar .btn { margin-left: auto; }
.toasts {
  position: fixed; right: 16px; bottom: 16px; z-index: 60; display: grid; gap: 8px;
  width: min(340px, calc(100vw - 32px)); pointer-events: none;
}
.toast {
  pointer-events: auto; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: start;
  background: var(--surface); color: var(--text); border: 1px solid var(--line-2); border-left: 4px solid var(--accent);
  border-radius: var(--r); box-shadow: var(--shadow-lg); padding: 10px 10px 10px 12px; font-size: 13px;
  animation: toast-in .28s cubic-bezier(.2, .8, .2, 1) both;
}
.toast.is-leaving { animation: toast-out .2s ease-in both; }
.toast__icon { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.toast__title { font-weight: 700; }
.toast__text { color: var(--text-2); margin: 1px 0 6px; overflow-wrap: anywhere; }
.toast__open { font-weight: 650; font-size: 12.5px; }
.toast__close { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 2px; border-radius: 6px; line-height: 0; }
.toast__close:hover { color: var(--text); background: var(--surface-3); }
.toast--call { border-left-color: var(--warn); }
.toast--ms { border-left-color: var(--info); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .toast, .toast.is-leaving { animation: none; } }

/* sections reached by an #anchor stay clear of the sticky top bar */
[id] { scroll-margin-top: calc(var(--topbar-h) + 16px); }

.notify-hint {
  max-width: 1400px; margin: 12px auto 0; padding: 0 var(--gutter); display: flex; align-items: center; gap: 8px 10px;
  flex-wrap: wrap; font-size: 13px; color: var(--info);
}
.notify-hint[hidden] { display: none; }
.notify-hint > span { flex: 1 1 260px; min-width: 0; }
.toast--ok, .toast--error { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.toast--ok { border-left-color: var(--ok); }
.toast--error { border-left-color: var(--danger); }
.toast__text--only { margin: 0; color: var(--text); font-weight: 550; }

/* ------------------------------------------------------------ order list: managers, tasks, new rows */
.kpi--task .kpi__label, .kpi--task .kpi__value { color: var(--info); }
.flag--task { color: var(--info); font-weight: 650; }
@container (min-width: 641px) {     /* the table (not the cards): ten columns have to fit */
  .table--orders th, .table--orders td { padding-left: 10px; padding-right: 10px; }
  .table--orders th { white-space: normal; }
  .table--orders .c-date { min-width: 84px; }
  .table--orders .c-manager { font-size: 13px; min-width: 90px; }
}
@container (max-width: 1100px) { .table--orders .c-rooms { display: none; } }
@container (max-width: 640px) { .table--cards .c-manager { font-size: 12.5px; color: var(--text-2); } }
/* a new order that came in while the list was open: highlighted until the page is left */
.table tr.is-fresh td { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); }
.table tr.is-fresh td:first-child { box-shadow: inset 4px 0 0 var(--accent); }
.table--cards tr.is-fresh { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); box-shadow: inset 4px 0 0 var(--accent); }
.row-link.is-fresh:hover td { background: color-mix(in srgb, var(--accent) 24%, var(--surface)); }
tr.is-arriving { animation: row-in .9s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes row-in { from { opacity: 0; transform: translateY(-6px); } 40% { opacity: 1; } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { tr.is-arriving { animation: none; } }

/* ------------------------------------------------------------ order page: the call, tasks, history */
.banner__body { flex: 1 1 auto; }
.banner__action { flex: none; margin-left: auto; align-self: center; }
.banner__action .btn { background: var(--surface); }
.call-done {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: -4px 0 14px; font-size: 13px; color: var(--ok);
}
.link-btn {
  border: 0; background: none; padding: 0; color: var(--accent-ink); font-weight: 600; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2);
}
.link-btn:hover { text-decoration-color: currentColor; }

.tasks .count {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-pill);
  background: var(--info-soft); color: var(--info); font-size: 11.5px; font-weight: 750;
}
.task-add { display: flex; gap: 6px; margin-bottom: 10px; }
.task-add input { min-height: 34px; font-size: 13px; }
.task-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.task { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: start; padding: 6px 0; border-top: 1px dashed var(--line); }
.task:first-child { border-top: 0; }
.task__check, .task__delete {
  border: 0; background: none; padding: 2px; cursor: pointer; color: var(--muted); border-radius: 6px; line-height: 0;
}
.task__check:hover { color: var(--ok); background: var(--ok-soft); }
.task__delete { opacity: .55; }
.task:hover .task__delete, .task__delete:focus-visible { opacity: 1; }
.task__delete:hover { color: var(--danger); background: var(--danger-soft); }
.task__text { font-size: 13px; overflow-wrap: anywhere; }
.task__meta { font-size: 11.5px; color: var(--muted); }
.task.is-done .task__check { color: var(--ok); }
.task.is-done .task__text { text-decoration: line-through; color: var(--muted); }
.tasks-done { margin-top: 8px; }
.tasks-done summary { cursor: pointer; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.timeline__changes { list-style: none; margin: 3px 0 0; padding: 0; display: grid; gap: 1px; font-size: 12px; color: var(--text-2); }
.timeline__changes li { overflow-wrap: anywhere; }
.timeline__changes li::before { content: '· '; color: var(--muted); }
.timeline__item--edit, .timeline__item--settings, .timeline__item--corner { border-left-color: var(--violet); }
.timeline__item--call { border-left-color: var(--ok); }

/* ------------------------------------------------------------ editing an order (rooms, section 6) */
.edit-toggle {
  cursor: pointer; display: inline-flex; align-items: center; gap: 6px; list-style: none; user-select: none;
  color: var(--accent-ink); font-weight: 650; font-size: 13px; padding: 6px 12px; border-radius: var(--r-pill);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
}
.edit-toggle::-webkit-details-marker { display: none; }
.edit-toggle:hover { background: var(--accent-soft); }
details[open] > .edit-toggle { background: var(--accent-soft); }
.room-edit { padding: 12px 20px 16px; border-top: 1px solid var(--line); }
.room-edit[open] { background: var(--surface-2); }
.room-edit .danger-zone { margin-top: 0; }
.room-new { padding: 14px 20px; }
.room-new[open] { background: var(--surface-2); }
.edit--panel { margin-top: 14px; }
.edit-form { margin-top: 14px; display: grid; gap: 4px; }
.edit-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(190px, 100%), 1fr)); gap: 0 12px; }
.edit-row--inline { display: flex; flex-wrap: wrap; gap: 0 12px; margin-top: 10px; }
.edit-row--inline .field { width: auto; }
.field--narrow input { width: 90px; }
.edit-list { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px 12px; margin: 0 0 10px; min-width: 0; background: var(--surface); }
.edit-list--plain { margin-top: -10px; border-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; padding-top: 4px; }
.edit-list legend { font-size: 12px; font-weight: 700; color: var(--muted); padding: 0 4px; }
.edit-list [data-rows]:not(:empty) { margin-bottom: 8px; }
.walls-edit { display: flex; flex-wrap: wrap; gap: 6px; }
.wall-input {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 2px 2px 8px; border: 1px solid var(--line-2);
  border-radius: var(--r-sm); background: var(--surface);
}
.wall-input b { font-size: 11.5px; color: var(--muted); min-width: 12px; }
.wall-input input { width: 84px; min-height: 30px !important; padding: 4px 6px !important; border: 0 !important; }
.edit-item {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 8px; padding: 6px 0; border-top: 1px dashed var(--line);
}
.edit-item:first-child { border-top: 0; }
.edit-item__name { flex: 0 0 100%; font-size: 12.5px; font-weight: 650; color: var(--text-2); }
.mini { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--muted); }
.mini input, .mini select { color: var(--text); }
.mini input { width: 84px; min-height: 32px !important; padding: 5px 8px !important; }
.mini select { width: auto; min-height: 32px; padding: 4px 8px; }
.mini--wide input { width: 220px; }
fieldset[hidden] { display: none; }
.mini input::placeholder { font-size: 10.5px; }
.row-remove {
  align-self: center; border: 0; background: none; color: var(--muted); padding: 4px; border-radius: 6px; cursor: pointer; line-height: 0;
}
.row-remove:hover { color: var(--danger); background: var(--danger-soft); }
.edit-group { border: 0; margin: 0; padding: 4px 0 10px; min-width: 0; }
.edit-group legend { padding: 0; }
.edit-check { display: flex; padding: 4px 0; font-size: 13px; }
.edit-yn { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 3px 0; font-size: 13px; }
.edit-yn > span { min-width: 0; }
.edit-yn select { width: auto; min-width: 110px; min-height: 32px; padding: 4px 8px; flex: none; }
@container room (max-width: 520px) {
  .room-edit, .room-new { padding-left: 14px; padding-right: 14px; }
}

/* my profile */
.account { max-width: 520px; }
.account__name { margin-top: 14px; }

/* ------------------------------------------------------------ window widths */
@media (max-width: 1200px) {
  .order-grid { grid-template-columns: minmax(0, 1fr) 280px; }
  .brand__tag { display: none; }
}
@media (max-width: 1000px) {
  .order-grid, .client-grid { grid-template-columns: minmax(0, 1fr); }
  .order-side { position: static; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 0 16px; align-items: start; }
  .topbar__name { display: none; }
  .topbar__user { padding: 8px; }
}
@media (max-width: 760px) {
  :root { --gutter: 16px; }
  .page { padding-top: 16px; padding-bottom: 48px; }
  .nav { order: 3; flex-basis: 100%; }
  .logout .btn__text { display: none; }
  .logout .ico { display: block; }
  .logout .btn { width: 34px; height: 34px; padding: 0; }
  .card { padding: 16px; }
  .card--flush { padding: 0; }
  .order-head__actions { width: 100%; }
}
@media (max-width: 380px) {
  .brand img { height: 16px; }
  .topbar__end { gap: 6px; }
  .icon-btn { width: 32px; height: 32px; }
}

/* ------------------------------------------------------------ printing the panel itself (the document has its own page) */
@media print {
  .topbar, .order-side, .order-head__actions, .toasts, .viz__bar, .notify-hint,
  .room-edit, .room-new, .edit--panel, .call-done, .banner__action { display: none !important; }
  .order-grid { display: block; }
  .card { box-shadow: none; break-inside: avoid; }
}

/* ------------------------------------------------------------ the fitters' measurements ("Замеры менеджера") */
.nav__count--ms { background: var(--info); }
.page-lead { margin: 4px 0 0; max-width: 70ch; }
.tag--master { background: var(--info-soft); color: var(--info); vertical-align: middle; }
.ms-done__number { font-size: 22px; font-weight: 750; margin: 0 0 4px; }
.ms-done .btn { margin-top: 10px; }
.ms-delete { padding-top: 0; text-align: right; }
.order-side > .notice { margin-bottom: 12px; }

/* ------------------------------------------------------------ messages (the envelope; the window itself: chat.js) */
.chat-btn { position: relative; }
.chat-btn__count {
  position: absolute; top: -5px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--r-pill);
  background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 750; display: grid; place-items: center;
  border: 2px solid var(--surface); line-height: 1;
}
.chat-btn__count[hidden] { display: none; }
.chat-btn.has-unread { border-color: var(--accent); color: var(--text); }

/* ------------------------------------------------------------ users of the panel */
.users { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.users--one { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.users__lead { max-width: 70ch; margin-top: 6px; }
.users .check { margin: 2px 0 8px; font-size: 13.5px; }
.users code { font-size: 12.5px; background: var(--surface-3); padding: 1px 6px; border-radius: 6px; }
.table tr.is-inactive td { color: var(--muted); }
.users__danger { border-color: color-mix(in srgb, var(--danger) 30%, var(--line)); }
@media (max-width: 900px) { .users { grid-template-columns: minmax(0, 1fr); } }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.role-fields { border: 0; padding: 0; margin: 0 0 12px; min-width: 0; }
.role-fields legend { padding: 0; margin-bottom: 6px; }
.users .check--hint { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 8px; }
.check--hint input { margin-top: 3px; flex: none; }
.check--hint > span { display: flex; flex-direction: column; gap: 1px; min-width: 0; }

/* ------------------------------------------------------------ start page (/home: the masters' and everyone's overview) */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.tile {
  display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; text-align: left; font: inherit;
  cursor: pointer; margin: 0; transition: border-color .15s, transform .15s;
}
.tile:hover { border-color: var(--accent); color: inherit; transform: translateY(-1px); }
.tile__ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); margin-bottom: 4px; }
.tile__ico .ico { width: 22px; height: 22px; }
.tile__title { font-weight: 700; font-size: 16px; }
.tile__ico { position: relative; }
.tile__count {
  position: absolute; top: -6px; right: -8px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 750; line-height: 20px; text-align: center;
}
.tile__count[hidden] { display: none; }
.home-sec { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 0 0 10px; }
.kpis + .home-sec { margin-top: 8px; }
