
:root {
  color-scheme: light;
  font-family: Arial, sans-serif;
  color: #182026;
  background: #f4f7f8;
}
body { margin: 0; }
.plain-fieldset { border: 0; margin: 0; min-width: 0; padding: 0; }
.top {
  display: flex;
  gap: 10px 18px;
  flex-wrap: wrap;
  align-items: center;
  padding: 10px 20px;
  background: #12343b;
  color: #fff;
}
.top nav { display: flex; gap: 2px; flex-wrap: wrap; flex: 1 1 auto; align-items: center; min-width: 0; }
.top a { color: #d9f2f0; text-decoration: none; }
.brand-title {
  align-items: baseline;
  display: inline-flex;
  gap: 8px;
  white-space: nowrap;
}
.app-version {
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 999px;
  color: #d9f2f0;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  padding: 4px 7px;
}
.navgroup {
  position: relative;
  display: inline-block;
}
.navsubgroup {
  position: relative;
  display: block;
}
.top nav > a, .navtrigger {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 32px;
  padding: 6px 10px;
  margin: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #d9f2f0;
  font: 400 14px/20px Arial, sans-serif;
  text-align: left;
  white-space: nowrap;
  letter-spacing: 0;
}
.navtrigger::after, .navitemtrigger::after {
  content: "";
  box-sizing: border-box;
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  margin-left: auto;
  opacity: .7;
}
.navtrigger::after { transform: rotate(45deg); margin-top: -3px; }
.top nav > a:hover, .navtrigger:hover, .navtrigger[aria-expanded="true"] { background: #ffffff18; color: #fff; }
.top nav :is(a, button):focus-visible { outline: 2px solid #31989b; outline-offset: -2px; }
.navmenu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 20;
  display: none;
  box-sizing: border-box;
  width: 282px;
  max-width: calc(100vw - 16px);
  padding: 6px;
  background: #fff;
  border: 1px solid #d8e2e4;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(24, 32, 38, 0.14);
}
.navsubmenu {
  position: absolute;
  top: 0;
  left: 100%;
  z-index: 30;
  display: none;
  box-sizing: border-box;
  width: 282px;
  max-width: calc(100vw - 16px);
  padding: 6px;
  background: #fff;
  border: 1px solid #d8e2e4;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(24, 32, 38, 0.14);
}
.navmenu a,
.navitemtrigger {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  width: 100%;
  min-height: 32px;
  box-sizing: border-box;
  color: #182026;
  padding: 6px 10px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  font: 400 14px/20px Arial, sans-serif;
  letter-spacing: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: left;
  margin: 0;
}
.navmenu a:hover,
.navmenu a:focus,
.navitemtrigger:hover,
.navitemtrigger:focus-visible,
.navitemtrigger[aria-expanded="true"] {
  background: #eaf1f2;
  color: #0f5f62;
}
.top nav:not(.navigation-ready) .navgroup:hover > .navmenu,
.top nav:not(.navigation-ready) .navgroup:focus-within > .navmenu {
  display: block;
}
.top nav:not(.navigation-ready) .navsubgroup:hover > .navsubmenu,
.top nav:not(.navigation-ready) .navsubgroup:focus-within > .navsubmenu {
  display: block;
}
.navigation-ready [data-nav-open] > .navmenu,
.navigation-ready [data-nav-open] > .navsubmenu { display: block; }
.navigation-ready :is(.navmenu, .navsubmenu) { position: fixed; overflow-y: auto; overscroll-behavior: contain; }
.navigation-ready [data-nav-side="left"] > .navitemtrigger::after { transform: rotate(135deg); }
@media (max-width: 1100px) {
  .top nav { order: 3; flex-basis: 100%; }
}
@media (max-width: 760px), (pointer: coarse) {
  .top .navsubmenu, .navigation-ready .navsubmenu {
    position: static;
    width: auto;
    max-width: none;
    margin: 2px 0 4px 10px;
    padding: 0 0 0 6px;
    border: 0;
    border-left: 2px solid #d8e2e4;
    border-radius: 0;
    box-shadow: none;
  }
  .navitemtrigger::after { transform: rotate(45deg); }
  .navitemtrigger[aria-expanded="true"]::after { transform: rotate(225deg); }
}
.logout { margin: 0; }
.switcher { width: 260px; max-width: 100%; min-width: 0; margin: 0; }
.switcher select { padding: 6px 8px; margin: 0; font-size: 14px; }
main { max-width: 1180px; margin: 0 auto; padding: 24px; }
.app-footer { color: #65767a; font-size: 13px; margin-top: 36px; padding: 18px 0 4px; text-align: center; }
h1 { font-size: 30px; margin: 0 0 18px; }
h2 { font-size: 20px; margin-top: 0; }
.panel, .vote {
  background: #fff;
  border: 1px solid #d8e2e4;
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 22px;
}
.narrow { max-width: 420px; }
.alert { background: #fff3f2; border: 1px solid #d28a82; padding: 12px; border-radius: 6px; }
.alert-inline { color: #9d332c; font-size: 12px; }
.context { background: #eaf1f2; border: 1px solid #d8e2e4; border-radius: 6px; padding: 10px 12px; }
.system-alerts { border: 1px solid #b42318; background: #fff1f0; padding: 14px 18px; margin: 0 0 18px; }
.system-alerts h2 { margin-top: 0; color: #8f1710; }
.system-alerts p { margin: 7px 0; }
.button-link { display: inline-flex; align-items: center; min-height: 34px; box-sizing: border-box; padding: 6px 11px; border: 1px solid #0f5f62; background: #0f5f62; color: #fff; text-decoration: none; border-radius: 4px; }
.button-link.secondary { background: #fff; color: #0f5f62; }
.success { border: 1px solid #4c8b52; background: #eef8ef; color: #285c2d; padding: 10px; }
.compact-stats article span { font-size: 22px; }
button.small { min-height: 30px; padding: 4px 8px; font-size: 13px; }
.sync-result { display: block; margin-top: 6px; font-size: 12px; line-height: 1.35; }
.sync-result progress { display: block; width: min(360px, 100%); height: 12px; margin-top: 5px; }
.portal-sync-progress {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  min-width: 220px;
}
.portal-sync-progress progress { height: 12px; width: 100%; }
.portal-sync-progress strong { color: #34484d; font-size: 12px; }
.portal-sync-progress span { color: #68777b; font-size: 12px; overflow-wrap: anywhere; }
.portal-sync-progress.status-succeeded strong { color: #23633f; }
.portal-sync-progress.status-failed strong,
.portal-sync-progress.status-failed span { color: #9b2c2c; }
.integrity-warning {
  background: #fff7e6;
  border: 1px solid #d6a64d;
  border-radius: 8px;
  margin: 14px 0;
  padding: 14px;
}
.integrity-warning h3 { margin-top: 0; }
.sync-result.ok { color: #1d6b3a; }
.sync-result.error { color: #9d332c; }
.muted { color: #667579; font-size: 13px; }
.badge { display: inline-block; padding: 6px 8px; border-radius: 6px; background: #eaf1f2; color: #0f5f62; font-weight: 700; }
.vote-summary {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  gap: 22px;
  align-items: center;
  padding: 10px 24px;
  background: #fff;
  border-bottom: 1px solid #d8e2e4;
  box-shadow: 0 8px 20px rgba(24, 32, 38, 0.12);
}
.summary-spacer { height: 54px; }
.manual-votes { margin-bottom: 76px; }
.manual-row.saving { opacity: 0.65; }
[data-manual-sort] { cursor: pointer; user-select: none; }
.threshold {
  margin-left: auto;
  color: #7a2f00;
  font-weight: 800;
}
.has-history { background: #fffdf4; }
.history-owner { color: #8a5a20; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 18px;
  align-items: start;
}
.calendar-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.calendar-toolbar h2 { margin: 0 auto 0 0; }
.calendar-jump {
  display: flex;
  align-items: end;
  gap: 8px;
  margin: 0;
}
.calendar-jump label { margin: 0; min-width: 120px; }
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(88px, 1fr));
  border: 1px solid #d8e2e4;
  border-radius: 8px;
  overflow: visible;
  background: #d8e2e4;
  gap: 1px;
}
.calendar-panel { overflow: visible; }
.calendar-head {
  background: #eaf1f2;
  color: #0f5f62;
  font-weight: 800;
  padding: 9px;
  text-align: center;
}
.calendar-day {
  position: relative;
  min-height: 118px;
  padding: 8px;
  background: #fff;
}
.calendar-day.outside {
  background: #f3f6f7;
  color: #8a9699;
}
.calendar-day.today .calendar-date {
  background: #12343b;
  color: #fff;
}
.calendar-day.has-event {
  background: #fffaf0;
}
.calendar-date {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  font-weight: 800;
}
.calendar-items {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}
.calendar-item {
  position: relative;
  z-index: 1;
  border-left: 4px solid #0f5f62;
  border-radius: 6px;
  background: #eaf1f2;
  padding: 6px 7px;
  font-size: 13px;
}
.calendar-item:hover,
.calendar-item:focus,
.calendar-item:focus-within {
  z-index: 120;
}
.calendar-item.done {
  border-left-color: #276749;
  background: #ecf8f1;
}
.calendar-item:not(.public) {
  border-left-color: #667579;
}
.calendar-item.due-soon {
  background: #fff7df;
  border-left-color: #b07812;
}
.calendar-item.overdue {
  background: #fff0f0;
  border-left-color: #b42318;
}
.calendar-item a {
  color: #12343b;
  font-weight: 800;
  text-decoration: none;
}
.calendar-tooltip {
  display: none;
  position: absolute;
  z-index: 999;
  left: 0;
  top: calc(100% + 8px);
  width: min(320px, 70vw);
  padding: 12px;
  background: #182026;
  color: #fff;
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(24, 32, 38, 0.28);
  white-space: pre-wrap;
  font: inherit;
  pointer-events: none;
}
.calendar-item:hover .calendar-tooltip,
.calendar-item:focus .calendar-tooltip,
.calendar-item:focus-within .calendar-tooltip {
  display: block;
}
.calendar-form-panel {
  position: sticky;
  top: 16px;
}
.stats article {
  background: #fff;
  border: 1px solid #d8e2e4;
  border-radius: 8px;
  padding: 16px;
}
.dashboard-stat {
  position: relative;
  display: block;
  min-height: 82px;
  box-sizing: border-box;
  padding: 16px 42px 16px 16px;
  border: 1px solid #b9cfd1;
  border-left: 4px solid #0f5f62;
  border-radius: 8px;
  background: #fff;
  color: #182026;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}
.dashboard-stat::after {
  content: "\2192";
  position: absolute;
  top: 15px;
  right: 16px;
  color: #0f5f62;
  font-size: 20px;
  font-weight: 700;
}
.dashboard-stat:hover {
  border-color: #0f5f62;
  background: #f1f8f8;
  box-shadow: 0 4px 12px rgba(24, 32, 38, .12);
  transform: translateY(-1px);
}
.dashboard-stat:focus-visible {
  outline: 3px solid #f2b84b;
  outline-offset: 2px;
  border-color: #0f5f62;
}
.stats span { display: block; font-size: 28px; font-weight: 700; margin-bottom: 6px; color: #0f5f62; }
.import-tiles article {
  background: #fff;
  border: 1px solid #d8e2e4;
  border-radius: 8px;
  padding: 12px;
}
.import-tiles strong { display: block; margin-bottom: 6px; color: #0f5f62; }
.import-tiles span { display: block; color: #526166; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.cols.four { grid-template-columns: repeat(4, minmax(120px, 1fr)); }
.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin: 14px 0; }
.summary-grid > div { border: 1px solid #d8e2e4; border-radius: 6px; padding: 10px; }
.summary-grid span { display: block; color: #526268; font-size: .82rem; }
.summary-grid strong { display: block; font-size: 1.25rem; margin-top: 4px; }
.unit-accessories,
.unit-grouping {
  margin-top: 18px;
  border-top: 1px solid #d8e2e4;
  padding-top: 14px;
}
.accessory-rows { display: grid; gap: 10px; margin-bottom: 10px; }
.accessory-row {
  align-items: end;
  padding: 10px;
  border: 1px solid #d8e2e4;
  border-radius: 8px;
  background: #f7fafb;
}
label { display: grid; gap: 6px; margin: 8px 0; font-weight: 600; }
input, select, textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #b8c7ca;
  border-radius: 6px;
  padding: 10px;
  font: inherit;
  background: #fff;
}
.file-drop {
  border: 2px dashed #9ab0b5;
  border-radius: 8px;
  padding: 16px;
  background: #f7fafb;
  cursor: pointer;
}
.file-drop input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.file-drop.dragover {
  border-color: #0f5f62;
  background: #eaf1f2;
}
.file-drop span {
  color: #526166;
  font-weight: 500;
}
.file-list {
  display: grid;
  gap: 8px;
  padding: 0;
  list-style: none;
}
.playground-description {
  max-width: 540px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.playground-inspection-form {
  max-width: 1180px;
}
.playground-defects-head {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-top: 22px;
}
.playground-defects-head h2 {
  margin: 0;
}
.playground-defects {
  display: grid;
  gap: 14px;
  margin-top: 12px;
}
.playground-defect {
  border: 1px solid #cbd7da;
  border-radius: 6px;
  margin: 0;
  min-width: 0;
  padding: 14px;
}
.playground-defect legend {
  font-weight: 700;
  padding: 0 6px;
}
.playground-defect-fields {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(240px, 1fr) minmax(150px, 220px) minmax(150px, 200px) 38px;
}
.playground-remove-defect {
  margin-bottom: 2px;
}
.playground-photo-columns {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}
.playground-existing-files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}
.playground-existing-file {
  align-items: center;
  display: inline-flex;
  gap: 4px;
  max-width: 100%;
}
.playground-existing-file .link-button {
  max-width: min(420px, calc(100vw - 150px));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 820px) {
  .playground-defect-fields,
  .playground-photo-columns {
    grid-template-columns: 1fr;
  }
  .playground-remove-defect {
    justify-self: end;
  }
}
.file-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #d8e2e4;
  border-radius: 6px;
  padding: 8px 10px;
  background: #fff;
}
.file-list button {
  padding: 6px 10px;
  background: #667579;
}
.recipient-list {
  display: grid;
  gap: 8px;
  max-height: 300px;
  overflow: auto;
  border: 1px solid #d8e2e4;
  border-radius: 8px;
  padding: 10px;
  background: #f7fafb;
}
.recipient-item {
  display: flex;
  grid-template-columns: auto 1fr;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 8px;
  border-radius: 6px;
  background: #fff;
}
.document-recipient-table {
  max-height: 460px;
  overflow: auto;
  border: 1px solid #d8e2e4;
  border-radius: 6px;
}
.document-recipient-table table { margin: 0; }
.document-recipient-table thead {
  position: sticky;
  top: 0;
  z-index: 4;
  background: #edf3f4;
}
.document-recipient-table .filters { top: 43px; }
.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 6px 12px;
}
.document-fields-help { margin: 12px 0; }
.document-fields-help code {
  display: inline-block;
  margin: 4px 4px 0 0;
  padding: 4px 6px;
  border: 1px solid #d8e2e4;
  border-radius: 4px;
  background: #f7fafb;
}
.recipient-item input { width: auto; margin-top: 3px; }
.recipient-item small {
  display: block;
  margin-top: 3px;
  color: #526166;
  font-weight: 500;
}
.editor-toolbar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 6px 0;
}
.editor-toolbar button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 34px;
  padding: 6px 9px;
  border-radius: 6px;
  border: 0;
  background: #0f5f62;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.editor-toolbar select {
  width: min(330px, 100%);
  margin: 0;
  padding: 6px 9px;
}
.icon-button.danger { background: #a33a2b; }
.rich-editor {
  min-height: 220px;
  border: 1px solid #b8c7ca;
  border-radius: 6px;
  padding: 12px;
  background: #fff;
}
.rich-editor:focus {
  outline: 2px solid #8fc9ca;
  outline-offset: 1px;
}
.info-board-editor {
  min-height: 300px;
  white-space: pre-wrap;
}
.info-board-editor:empty::before {
  color: #6a777b;
  content: attr(data-placeholder);
  pointer-events: none;
}
.legal-documents-form { overflow: hidden; }
.legal-document-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 18px 0 0;
  border-bottom: 1px solid #b8c7ca;
}
.legal-document-tabs button {
  background: #e7edef;
  color: #26363b;
  border: 1px solid #b8c7ca;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  margin: 0;
}
.legal-document-tabs button.active {
  background: #0f5f62;
  color: #fff;
}
.legal-editor-panel { padding-top: 12px; }
.legal-html-editor {
  min-height: 520px;
  max-height: 68vh;
  overflow: auto;
  line-height: 1.6;
}
.legal-html-editor section + section { border-top: 1px solid #d8e2e4; margin-top: 20px; padding-top: 18px; }
.legal-html-editor table,
.legal-preview-document table { min-width: 620px; }
.legal-preview-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(13, 27, 32, 0.68);
  display: grid;
  place-items: center;
  padding: 24px;
}
.legal-preview-backdrop[hidden] { display: none; }
.legal-preview-box {
  width: min(1060px, 96vw);
  height: min(860px, 94vh);
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}
.legal-preview-box > header {
  align-items: center;
  border-bottom: 1px solid #d8e2e4;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
}
.legal-preview-scroll { overflow: auto; padding: 24px; background: #f3f6f7; }
.legal-preview-document { background: #fff; border: 1px solid #d8e2e4; border-radius: 8px; margin: 0 auto; max-width: 900px; overflow: hidden; }
.legal-preview-document > header,
.legal-preview-document > section { padding: 22px 26px; }
.legal-preview-document > header { border-top: 5px solid #0f5f62; }
.legal-preview-document > header > p { color: #0f5f62; font-size: .82rem; font-weight: 700; margin: 0; text-transform: uppercase; }
.legal-preview-document > header h1 { margin: 4px 0 12px; }
.legal-preview-document > header dl { display: flex; gap: 24px; margin: 0; }
.legal-preview-document > header dt { color: #526166; font-size: .78rem; font-weight: 700; text-transform: uppercase; }
.legal-preview-document > header dd { margin: 0; font-weight: 700; }
.legal-preview-document > section { border-top: 1px solid #d8e2e4; }
.legal-preview-document > section h2 { margin-top: 0; }
.mail-preview {
  border: 1px solid #d8e2e4;
  border-radius: 6px;
  padding: 14px;
  background: #f7fafb;
}
.unread-row td {
  background: #eef7f3;
  font-weight: 700;
}
.unread-row .muted { font-weight: 400; }
.attachment-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.attachment-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #d8e2e4;
}
.attachment-list li:last-child { border-bottom: 0; }
progress {
  width: 100%;
  height: 22px;
}
.progress-log {
  max-height: 260px;
  overflow: auto;
  padding-left: 20px;
}
button {
  border: 0;
  border-radius: 6px;
  background: #0f5f62;
  color: #fff;
  padding: 10px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
margin-bottom: 5px;
}
button.danger {
  background: #a33a2b;
}
button.secondary {
  background: #667579;
}
.button-link {
  display: inline-block;
  border-radius: 6px;
  background: #0f5f62;
  color: #fff;
  padding: 10px 14px;
  font-weight: 700;
  text-decoration: none;
}
.button-link.secondary { background: #667579; }
table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid #d8e2e4;
}
th, td {
  padding: 10px;
  border-bottom: 1px solid #e4ecee;
  text-align: left;
  vertical-align: top;
}
th { background: #eaf1f2; }
.filters th { padding: 6px; }
.filters input, .filters select {
  min-width: 120px;
  padding: 7px;
  font-size: 13px;
}
.filters button { padding: 7px 10px; margin-top: 6px; }
.hash { max-width: 260px; overflow-wrap: anywhere; font-family: Consolas, monospace; font-size: 12px; }
.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.actions form {
  display: inline-flex;
  margin: 0;
}
.actions .inline-status-form {
  align-items: center;
  display: grid;
  gap: 4px;
  grid-template-columns: minmax(120px, 1fr);
  min-width: 180px;
}
.inline-status-form input,
.inline-status-form select {
  font-size: 12px;
  min-height: 28px;
  padding: 4px 6px;
}
.actions a,
.actions button,
.actions .icon-button,
.actions .link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 5px;
  font-size: 12px;
  line-height: 1.2;
  margin: 0;
  text-decoration: none;
}
.actions a:not(.icon-button) {
  background: #0f5f62;
  color: #fff;
  font-weight: 700;
}
.actions .badge {
  align-self: center;
}
.link-button {
  border: 0;
  background: transparent;
  color: #0f5f62;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 0;
  text-decoration: underline;
}
.link-button:hover { color: #123c42; }
.actions .link-button {
  background: #0f5f62;
  color: #fff;
  text-decoration: none;
}
.actions .link-button:hover {
  background: #123c42;
  color: #fff;
}
.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 18px 0;
}
.pager a,
.pager .current,
.pager .disabled,
.pager .gap {
  border: 1px solid #d8e2e4;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 36px;
  padding: 7px 10px;
  text-decoration: none;
}
.pager a {
  background: #fff;
  color: #0f5f62;
  font-weight: 800;
}
.pager a:hover {
  background: #eaf1f2;
}
.pager .current {
  background: #0f5f62;
  border-color: #0f5f62;
  color: #fff;
  font-weight: 800;
}
.pager .disabled {
  color: #87969a;
  font-weight: 700;
  background: #f3f6f7;
}
.pager .gap {
  border-color: transparent;
  min-width: 24px;
  padding-left: 4px;
  padding-right: 4px;
}
.pager-pages {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.details-row td {
  background: #f7fafb;
}
.details-box {
  border: 1px solid #d8e2e4;
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}
.modal-open { overflow: hidden; }
.file-preview-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(13, 27, 32, 0.62);
  display: grid;
  place-items: center;
  padding: 24px;
}
.file-preview-backdrop[hidden] { display: none; }
.file-preview-box {
  width: min(1080px, 96vw);
  height: min(820px, 92vh);
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}
.file-preview-box header {
  align-items: center;
  border-bottom: 1px solid #d8e2e4;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px 14px;
}
.file-preview-box iframe {
  border: 0;
  height: 100%;
  width: 100%;
  background: #f7fafb;
}
.file-preview-message {
  align-self: center;
  justify-self: center;
  padding: 28px;
  text-align: center;
}
.status-reason-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(13, 27, 32, 0.62);
  display: grid;
  place-items: center;
  padding: 24px;
}
.status-reason-backdrop[hidden] { display: none; }
.status-reason-box {
  width: min(720px, 96vw);
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}
.status-reason-box header {
  align-items: center;
  border-bottom: 1px solid #d8e2e4;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px 14px;
}
.status-reason-content { padding: 16px; }
.status-reason-content textarea {
  min-height: 180px;
  resize: vertical;
}
.status-note-preview {
  color: #526166;
  display: inline-block;
  font-size: 12px;
  min-width: 78px;
}
.event-description-summary {
  display: -webkit-box;
  max-width: 420px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.inline-status-form [data-event-status-result] {
  display: block;
  max-width: 260px;
  white-space: normal;
}
.owner-history-cell {
  min-width: 72px;
  text-align: center;
}
.owner-history-trigger {
  align-items: center;
  background: #8a5a12;
  display: inline-flex;
  gap: 5px;
  justify-content: center;
  min-width: 48px;
}
.owner-history-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(13, 27, 32, 0.62);
  display: grid;
  place-items: center;
  padding: 24px;
}
.owner-history-backdrop[hidden] { display: none; }
.owner-history-box {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: 92vh;
  overflow: hidden;
  width: min(1120px, 96vw);
}
.owner-history-box > header {
  align-items: center;
  border-bottom: 1px solid #d8e2e4;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px 14px;
}
.owner-history-content {
  min-height: 0;
  overflow: auto;
  padding: 16px;
}
.change-history-backdrop {
  position: fixed;
  inset: 0;
  z-index: 74;
  background: rgba(13, 27, 32, 0.62);
  display: grid;
  place-items: center;
  padding: 24px;
}
.change-history-backdrop[hidden] { display: none; }
.change-history-box {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: 92vh;
  overflow: hidden;
  width: min(1220px, 96vw);
}
.change-history-box > header {
  align-items: center;
  border-bottom: 1px solid #d8e2e4;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px 14px;
}
.change-history-content {
  min-height: 0;
  overflow: auto;
  padding: 16px;
}
.change-history-content table { min-width: 880px; }
.change-history-content td { vertical-align: top; }
.change-history-value {
  max-width: 380px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.unit-note-cell {
  min-width: 72px;
  text-align: center;
}
.unit-note-trigger {
  align-items: center;
  display: inline-flex;
  gap: 5px;
  justify-content: center;
  min-width: 48px;
}
.unit-note-trigger:not(.has-notes) {
  background: #667579;
}
.unit-note-trigger.has-notes {
  background: #526166;
}
.unit-note-trigger.has-active-notes {
  background: #8a5a12;
}
.unit-note-count {
  align-items: center;
  background: #fff;
  border-radius: 8px;
  color: #182026;
  display: inline-flex;
  font-size: 11px;
  font-weight: 700;
  justify-content: center;
  min-height: 18px;
  min-width: 18px;
  padding: 0 4px;
}
.unit-notes-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(13, 27, 32, 0.62);
  display: grid;
  place-items: center;
  padding: 24px;
}
.unit-notes-backdrop[hidden] { display: none; }
.unit-notes-box {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: 92vh;
  overflow: hidden;
  width: min(1120px, 96vw);
}
.unit-notes-box > header {
  align-items: center;
  border-bottom: 1px solid #d8e2e4;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px 14px;
}
.unit-notes-content {
  min-height: 0;
  overflow: auto;
  padding: 16px;
}
.unit-notes-list {
  max-height: 46vh;
  overflow: auto;
}
.unit-notes-list table {
  margin-bottom: 0;
}
.unit-note-content {
  max-width: 460px;
  min-width: 240px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.unit-note-form {
  border-top: 1px solid #d8e2e4;
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
}
.unit-note-form h3 {
  margin: 0;
}
.unit-note-form textarea {
  min-height: 130px;
  resize: vertical;
}
.kv {
  display: grid;
  grid-template-columns: minmax(140px, 220px) 1fr;
  gap: 8px 12px;
  margin: 0 0 14px;
}
.kv dt {
  font-weight: 700;
  color: #526166;
}
.kv dd {
  margin: 0;
  overflow-wrap: anywhere;
}
pre {
  white-space: pre-wrap;
  background: #f7fafb;
  border: 1px solid #d8e2e4;
  border-radius: 6px;
  padding: 14px;
}
fieldset { border: 1px solid #d8e2e4; border-radius: 8px; margin: 16px 0; }
fieldset label, .check { display: block; font-weight: 500; }
fieldset input, .check input { width: auto; }
.permission-editor { background: #f7fafb; border: 1px solid #d8e2e4; border-radius: 8px; margin: 14px 0; padding: 10px 12px; }
.permission-editor > summary { cursor: pointer; }
.permission-editor.compact { margin: 0; min-width: 260px; }
.permission-groups { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin: 10px 0; }
.permission-groups fieldset { background: #fff; margin: 0; padding: 8px 10px; }
.permission-row { align-items: flex-start; display: flex !important; gap: 8px; margin: 7px 0; }
.permission-row input { flex: 0 0 auto; margin-top: 3px; }
.permission-row span { display: grid; gap: 2px; }
.permission-row small { color: #667579; font-weight: 400; line-height: 1.25; }
.survey-question { padding: 16px; }
.survey-question-head { align-items: center; display: flex; justify-content: space-between; margin-bottom: 10px; }
.survey-question > .survey-question-prompt { width: 100%; }
.survey-question > .survey-question-prompt input { width: 100%; }
.survey-question [hidden] { display: none !important; }
.survey-question-invalid { border-color: #b42318; }
.survey-question-error { background: #fff1f0; border-left: 4px solid #b42318; color: #7a1f1a; margin: 10px 0 0; padding: 9px 11px; }
.survey-existing-files p { align-items: center; display: flex; gap: 8px; margin: 6px 0; }
.survey-scale { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
.survey-preview-backdrop { align-items: center; background: rgba(20, 31, 35, .72); display: flex; inset: 0; justify-content: center; padding: 18px; position: fixed; z-index: 120; }
.survey-preview-backdrop[hidden] { display: none !important; }
.survey-preview-box { background: #fff; border-radius: 8px; box-shadow: 0 18px 48px rgba(0, 0, 0, .28); display: flex; flex-direction: column; max-height: calc(100vh - 36px); width: min(840px, 100%); }
.survey-preview-box > header { align-items: center; border-bottom: 1px solid #d8e2e4; display: flex; justify-content: space-between; padding: 12px 16px; }
.survey-preview-scroll { overflow: auto; padding: 20px; }
.survey-preview-sheet { margin: 0 auto; max-width: 700px; }
.survey-preview-sheet > h2 { font-size: 26px; margin-top: 0; }
.survey-preview-description { border-bottom: 1px solid #d8e2e4; margin-bottom: 8px; padding-bottom: 12px; }
.survey-preview-description > :first-child { margin-top: 0; }
.survey-preview-warning p { margin: 4px 0; }
.survey-preview-form { display: grid; gap: 0; }
.survey-preview-question { border-bottom: 1px solid #d8e2e4; padding: 18px 0; }
.survey-preview-question h3 { font-size: 17px; margin: 0 0 12px; }
.survey-preview-question > input[type="text"], .survey-preview-question > select, .survey-preview-question > textarea { width: 100%; }
.survey-preview-choice { align-items: flex-start; display: flex; font-weight: 400; gap: 9px; margin: 8px 0; }
.survey-preview-choice input { flex: 0 0 auto; margin-top: 3px; width: auto; }
.survey-preview-question-invalid { background: #fff1f0; box-shadow: -8px 0 0 #b42318; }
.survey-preview-test-result { align-self: center; font-weight: 600; }
.success-text { color: #285c2d; }
.error-text { color: #8f1d18; }
.survey-results-grid { display: grid; gap: 16px; }
.survey-result h2 { font-size: 20px; }
.survey-charts { align-items: center; display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr) 180px; }
.survey-charts-bars-only { grid-template-columns: minmax(0, 1fr); }
.survey-bars { display: grid; gap: 12px; }
.survey-bars label { display: grid; gap: 5px; }
.survey-bars label span { display: flex; gap: 12px; justify-content: space-between; }
.survey-bars progress { accent-color: #7a1f2b; height: 18px; width: 100%; }
.survey-pie { aspect-ratio: 1; border-radius: 50%; border: 1px solid #cbd4d8; width: 180px; }
.survey-average { font-size: 20px; }
.survey-text-answers { max-height: 320px; overflow: auto; }
@media (max-width: 700px) {
  .top { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .top .brand-title, .top nav { grid-column: 1 / -1; }
  .top .switcher { width: 100%; }
  main { padding: 16px; }
  table { display: block; overflow-x: auto; }
  .calendar-layout { grid-template-columns: 1fr; }
  .calendar-panel { overflow-x: auto; overflow-y: visible; }
  .calendar-grid { min-width: 720px; }
  .calendar-form-panel { position: static; }
  .calendar-jump { width: 100%; }
  .cols.four { grid-template-columns: 1fr 1fr; }
  .owner-history-backdrop { padding: 8px; }
  .owner-history-box { max-height: 96vh; width: 100%; }
  .owner-history-content { padding: 10px; }
  .unit-notes-backdrop { padding: 8px; }
  .unit-notes-box { max-height: 96vh; width: 100%; }
  .unit-notes-content { padding: 10px; }
  .survey-preview-backdrop { padding: 8px; }
  .survey-preview-box { max-height: calc(100vh - 16px); }
  .survey-preview-scroll { padding: 14px; }
  .survey-preview-box > header { gap: 10px; }
  .survey-charts { grid-template-columns: 1fr; }
  .survey-pie { width: 150px; }
}
/* Wspolny rozmiar komend Go/PHP. Miniatury zalacznikow pozostaja pelnowymiarowe.
   Dlugie etykiety moga sie zawijac; nie narzucamy jednakowej szerokosci tekstom. */
:root { --command-size: 28px; --command-font: 13px; }
body :is(button, input[type="submit"], input[type="button"], .button-link, .button, .icon-button, .row-icon, .editor-tool, :where(.actions) a, :where(.pager) a, :where(.pager) .current, :where(.pager) .disabled, :where(.pager) .gap):not([hidden]):not(.event-attachment-preview-trigger):not(:where(.navtrigger, .navitemtrigger, .resident-nav-trigger)) {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: var(--command-size);
  min-height: var(--command-size);
  height: auto;
  max-width: 100%;
  padding: 4px 8px;
  margin-bottom: 0;
  border-radius: 4px;
  font-family: inherit;
  font-size: var(--command-font);
  line-height: 18px;
  letter-spacing: 0;
  text-align: center;
  vertical-align: middle;
  white-space: normal;
  overflow-wrap: anywhere;
}
body :is(.icon-button, .row-icon, .editor-tool, .help-button, .help-close):not([hidden]):not(.event-attachment-preview-trigger) {
  width: var(--command-size);
  height: var(--command-size);
  min-width: var(--command-size);
  padding: 0;
  flex: 0 0 var(--command-size);
}
body :is(.icon-button, .row-icon, .editor-tool) svg { width: 16px; height: 16px; }
input[type="file"]::file-selector-button {
  box-sizing: border-box;
  min-height: var(--command-size);
  padding: 4px 8px;
  border: 1px solid #b8c7ca;
  border-radius: 4px;
  font: 600 var(--command-font)/18px Arial, sans-serif;
  cursor: pointer;
}
