* {
  box-sizing: border-box;
}

:root {
  --color-bg: #f8fafd;
  --color-surface: #ffffff;
  --color-surface-subtle: #fbfcff;
  --color-border: #dadce0;
  --color-border-soft: #e8eaed;
  --color-text: #202124;
  --color-text-muted: #5f6368;
  --color-text-soft: #80868b;
  --color-placeholder: #8995a6;
  --color-primary: #1a73e8;
  --color-primary-hover: #185abc;
  --color-primary-soft: #eaf1ff;
  --color-primary-selected: #d3e3fd;
  --color-danger: #c5221f;
  --color-danger-soft: #fce8e6;
  --color-success: #188038;
  --color-success-soft: #e6f4ea;
  --color-warning: #b06000;
  --color-warning-soft: #fef7e0;
  --shadow-sm: 0 1px 2px rgba(60, 64, 67, 0.18), 0 1px 3px rgba(60, 64, 67, 0.1);
  --shadow-md: 0 4px 10px rgba(60, 64, 67, 0.14), 0 1px 3px rgba(60, 64, 67, 0.1);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --shell-sidebar-width: 280px;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: var(--color-primary);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  color: currentColor;
  fill: none;
  vertical-align: middle;
}

.icon__stroke {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon__fill {
  fill: currentColor;
}

.app-layout {
  display: grid;
  grid-template-columns: var(--shell-sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.app-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: var(--color-surface);
  border-right: 1px solid var(--color-border-soft);
  color: var(--color-text-muted);
}

.app-sidebar__brand {
  display: flex;
  min-height: 68px;
  align-items: center;
  gap: var(--space-3);
  padding: 0 var(--space-5);
  border-bottom: 1px solid var(--color-border-soft);
}

.app-sidebar__brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  flex: 0 0 auto;
  background:
    linear-gradient(135deg, #4285f4 0 45%, #34a853 45% 62%, #fbbc04 62% 78%, #ea4335 78%);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-weight: 900;
}

.app-sidebar__brand-text {
  display: grid;
  gap: 2px;
}

.app-sidebar__logo {
  color: var(--color-text);
  font-size: 1rem;
  font-weight: 760;
  letter-spacing: 0;
  text-decoration: none;
}

.app-sidebar__brand-version {
  color: var(--color-text-muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.app-sidebar__nav {
  display: grid;
  flex: 1 1 auto;
  gap: var(--space-4);
  min-height: 0;
  overflow-y: auto;
  padding: var(--space-3) var(--space-3) var(--space-5);
}

.app-sidebar__group {
  display: grid;
  gap: 4px;
}

.app-sidebar__group-title {
  padding: 10px 12px 6px;
  color: var(--color-text-soft);
  font-size: 0.69rem;
  font-weight: 760;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.app-sidebar__nav a {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  min-height: 42px;
  align-items: center;
  padding: 0 12px;
  border-radius: 22px;
  color: var(--color-text-muted);
  font-size: 0.91rem;
  font-weight: 650;
  text-decoration: none;
}

.app-sidebar__nav a:hover,
.app-sidebar__nav a.is-active {
  background: #f1f3f4;
  color: var(--color-text);
}

.app-sidebar__nav a.is-active {
  background: var(--color-primary-selected);
  color: #174ea6;
  font-weight: 760;
  box-shadow: none;
}

.app-sidebar__nav-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #f1f3f4;
  color: var(--color-text-muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.app-sidebar__nav a.is-active .app-sidebar__nav-icon {
  background: var(--color-surface);
  color: var(--color-primary);
}

.app-sidebar__account {
  display: grid;
  gap: var(--space-3);
  margin: auto var(--space-4) var(--space-4);
  padding: 14px;
  background: var(--color-bg);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-lg);
}

.app-sidebar__account strong,
.app-sidebar__account span {
  display: block;
}

.app-sidebar__account strong {
  color: var(--color-text);
  font-size: 0.94rem;
}

.app-sidebar__account span {
  margin-top: 2px;
  color: var(--color-text-muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.app-main {
  min-width: 0;
}

@media (min-width: 701px) {
  .app-main--work-fill {
    display: flex;
    height: 100dvh;
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
  }

  .app-main--work-fill .app-mainbar {
    flex: 0 0 auto;
  }
}

.app-mainbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 68px;
  align-items: center;
  gap: var(--space-5);
  padding: 0 28px;
  background: rgba(248, 250, 253, 0.92);
  border-bottom: 1px solid var(--color-border-soft);
  backdrop-filter: blur(14px);
}

.app-mainbar__search {
  display: flex;
  width: min(680px, 100%);
  min-height: 44px;
  align-items: center;
  gap: 10px;
  padding: 0 var(--space-4);
  background: #edf2fa;
  border: 1px solid transparent;
  border-radius: 24px;
  color: var(--color-text-muted);
  font-weight: 620;
}

.app-mainbar__search input {
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--color-text);
  outline: 0;
}

.app-mainbar__meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-text-muted);
  font-size: 0.88rem;
}

.app-mainbar--page {
  grid-template-columns: minmax(0, 1fr) auto;
  background: var(--color-surface);
  border-bottom-color: var(--color-border);
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.10);
}

.app-mainbar__title {
  min-width: 0;
}

.app-mainbar__title h1 {
  margin: 0;
  color: var(--color-text);
  font-size: 1.45rem;
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1.15;
}

.app-mainbar__title p {
  margin: 4px 0 0;
  max-width: 760px;
  color: var(--color-text-soft);
  font-size: 0.86rem;
  font-weight: 560;
  line-height: 1.35;
}

.app-mainbar__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
}

.page-kicker {
  margin: 0 0 6px;
  color: var(--color-primary);
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.page-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: flex-start;
  gap: var(--space-6);
  margin-bottom: var(--space-5);
}

.page-title-row h1 {
  margin: 0;
  font-size: 1.9rem;
  font-weight: 720;
  letter-spacing: 0;
  line-height: 1.15;
}

.page-title-row p {
  max-width: 760px;
}

.surface-grid {
  display: grid;
  gap: var(--space-5);
}

.surface-grid--two {
  grid-template-columns: minmax(0, 1fr) 360px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.metric-card {
  position: relative;
  display: grid;
  min-height: 140px;
  gap: var(--space-3);
  padding: 18px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.metric-card::after {
  content: "";
  position: absolute;
  right: -26px;
  bottom: -28px;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  background: var(--color-primary-soft);
}

.metric-card--good::after {
  background: var(--color-success-soft);
}

.metric-card--warn::after {
  background: var(--color-warning-soft);
}

.metric-card--bad::after {
  background: var(--color-danger-soft);
}

.metric-card span,
.metric-card strong,
.metric-card small {
  position: relative;
  z-index: 1;
}

.metric-card span {
  color: var(--color-text-muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.metric-card strong {
  color: var(--color-text);
  font-size: 1.9rem;
  font-weight: 760;
  line-height: 1;
}

.metric-card small {
  color: var(--color-text-soft);
}

.toolbar-card {
  padding: var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.toolbar-card + .panel,
.toolbar-card + .surface-grid,
.metric-grid + .panel {
  margin-top: var(--space-5);
}

.toolbar-card__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.toolbar-card__title h2 {
  margin: 0;
  font-size: 1rem;
}

.filter-form--compact {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr)) auto;
  gap: var(--space-3);
  padding: 0;
  align-items: end;
}

.filter-form--compact .field {
  min-width: 0;
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.auth-panel {
  width: min(420px, 100%);
  padding: 28px;
  background: #fff;
  border: 1px solid #dfe3ea;
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(31, 40, 51, 0.12);
}

.auth-panel__header {
  margin-bottom: 22px;
}

.auth-panel__header h1 {
  margin: 0;
}

.app-topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  min-height: 64px;
  padding: 0 24px;
  background: #fff;
  border-bottom: 1px solid #dfe3ea;
}

.app-brand {
  color: #17202c;
  font-size: 1.05rem;
  font-weight: 800;
  text-decoration: none;
}

.app-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.app-nav span,
.app-nav a {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 10px;
  color: #4b5563;
  background: #f3f5f8;
  border: 1px solid #e1e6ee;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
}

.app-nav a[aria-current="page"] {
  color: #174ea6;
  background: #eaf2ff;
  border-color: #c7dcff;
}

.page-shell {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
}

.page-shell.page-shell--work {
  width: calc(100% - 24px);
  max-width: none;
  padding: 28px 0 44px;
}

@media (min-width: 701px) {
  .page-shell.page-shell--work-fill {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    flex-direction: column;
    padding: 22px 0 12px;
  }

  .page-shell--work-fill .page-title-row {
    flex: 0 0 auto;
    margin-bottom: var(--space-4);
  }
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.page-header h1,
.panel-heading h2 {
  margin: 0;
}

.page-description {
  margin: 8px 0 0;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.eyebrow {
  margin: 0 0 6px;
  color: #5b6573;
  font-size: 0.84rem;
  font-weight: 700;
  text-transform: uppercase;
}

.panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

@media (min-width: 701px) {
  .panel--fill {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    flex-direction: column;
  }

  .panel--fill .panel-heading,
  .panel--fill .filter-bar,
  .panel--fill .buildings-table-region,
  .panel--fill .billing-table-region,
  .panel--fill .building-work-content,
  .panel--fill .table-statusbar {
    flex: 0 0 auto;
  }

  .panel--fill .buildings-table-region,
  .panel--fill .billing-table-region,
  .panel--fill .building-work-content {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    flex-direction: column;
  }
}

#customers-summary {
  margin-bottom: 18px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.summary-item {
  display: grid;
  gap: 6px;
  padding: 16px;
  background: #fff;
  border: 1px solid #dfe3ea;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(31, 40, 51, 0.06);
}

.summary-item span {
  color: #5b6573;
  font-size: 0.84rem;
  font-weight: 700;
  text-transform: uppercase;
}

.summary-item strong {
  color: #17202c;
  font-size: 1.6rem;
  line-height: 1;
}

.panel-heading {
  min-height: 64px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--color-border-soft);
  background: var(--color-surface);
}

.panel-heading--split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.action-panel {
  margin-bottom: 18px;
}

.filter-form,
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 14px;
  padding: 18px 20px;
}

.filter-form .field {
  min-width: min(260px, 100%);
}

.filter-form.filter-form--compact {
  display: grid;
  grid-template-columns: 1.35fr 0.8fr 0.85fr 0.85fr 0.85fr auto;
  gap: 10px;
  align-items: end;
  padding: 14px 18px;
  background: var(--color-surface-subtle);
  border-bottom: 1px solid var(--color-border-soft);
}

.filter-form.filter-form--compact .field {
  min-width: 0;
}

.filter-bar {
  display: grid;
  gap: 10px;
  align-items: end;
  padding: 14px 18px;
  background: var(--color-surface-subtle);
  border-bottom: 1px solid var(--color-border-soft);
}

.filter-bar .field {
  min-width: 0;
}

.filter-bar .filter-form {
  padding: 0;
  background: transparent;
  border-bottom: 0;
}

.filter-bar--input-documents {
  grid-template-columns: minmax(260px, 0.7fr) minmax(420px, 1.3fr);
}

.filter-bar--billing {
  grid-template-columns: minmax(260px, 0.7fr) minmax(420px, 1.3fr);
}

.filter-bar--buildings {
  grid-template-columns: minmax(240px, 420px);
}

.filter-bar--building-work {
  grid-template-columns: minmax(260px, 1fr) max-content;
}

.filter-bar--directory {
  grid-template-columns: minmax(240px, 420px);
}

.filter-form.filter-form--server {
  grid-template-columns: minmax(240px, 1fr) max-content;
}

.searchable-select {
  position: relative;
}

.searchable-select.is-enhanced > select,
.form-readonly:disabled .searchable-select.is-enhanced > select {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  opacity: 0;
  pointer-events: none;
}

.searchable-select__button {
  display: grid;
  width: 100%;
  min-height: 40px;
  grid-template-columns: minmax(0, 1fr) 20px;
  align-items: center;
  gap: var(--space-2);
  padding: 0 10px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  color: var(--color-text);
  cursor: pointer;
  font: inherit;
  font-weight: 650;
  text-align: left;
}

.searchable-select__button span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.searchable-select__button:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.14);
  outline: none;
}

.searchable-select__button:disabled {
  background: #f8fafd;
  color: #354052;
  cursor: default;
  opacity: 1;
}

.searchable-select__button:disabled .searchable-select__chevron {
  opacity: 0.55;
}

.searchable-select__chevron {
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  justify-self: center;
  transform: translateY(-2px) rotate(45deg);
}

.searchable-select__panel {
  position: fixed;
  z-index: 900;
  box-sizing: border-box;
  display: grid;
  gap: var(--space-2);
  padding: var(--space-2);
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.searchable-select__search {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  color: var(--color-text);
  font-weight: 650;
}

.searchable-select__list {
  display: grid;
  grid-auto-rows: minmax(36px, auto);
  min-width: 0;
  overflow-x: hidden;
  max-height: var(--searchable-select-list-max-height, 260px);
  overflow-y: auto;
}

.searchable-select__option {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-height: 36px;
  padding: 0 10px;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--color-text);
  cursor: pointer;
  font: inherit;
  font-weight: 650;
  text-align: left;
}

.searchable-select__option:hover,
.searchable-select__option:focus,
.searchable-select__option.is-active {
  background: var(--color-primary-soft);
  color: var(--color-primary-hover);
  outline: none;
}

.month-picker {
  min-width: 0;
}

.month-picker__controls {
  display: grid;
  grid-template-columns: 40px 82px 90px 40px;
  align-items: center;
  gap: var(--space-2);
}

.month-picker__button {
  width: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 20px;
}

.month-picker__button .icon {
  width: 20px;
  height: 20px;
}

.month-picker__year,
.month-picker__month {
  min-height: 40px;
}

.month-picker__year {
  text-align: center;
}

.field input,
.field select,
.table-input,
textarea {
  border-color: var(--color-border);
  border-radius: 10px;
  color: var(--color-text);
  font-weight: 650;
}

input::placeholder,
textarea::placeholder {
  color: var(--color-placeholder);
  opacity: 1;
  font-weight: 400;
}

.field-help {
  color: var(--color-text-muted);
  font-size: 0.75em;
  font-weight: 400;
  line-height: 1.4;
}

.field input[type="date"].is-empty {
  color: #cccccc;
  font-weight: 500;
}

.field input[type="date"].is-empty:focus {
  color: var(--color-text);
}

.field input:focus,
.field select:focus,
.table-input:focus,
textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.14);
  outline: none;
}

.field--wide {
  flex: 1 1 100%;
}

textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  resize: vertical;
}

.lock-form {
  border-top: 1px solid #edf0f4;
}

.compact-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 0 20px 18px;
}

.compact-summary .summary-item {
  box-shadow: none;
}

.message-list {
  display: grid;
  gap: 8px;
  padding: 0 20px 18px;
}

.page-message-list {
  padding: 0;
  margin-bottom: 18px;
}

.message {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #d5dde8;
  border-radius: 6px;
  background: #f8fafc;
  color: #344054;
  font-weight: 650;
}

.message--critical {
  border-color: #f1b8b1;
  background: #fff1ef;
  color: #9f1d14;
}

.data-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--color-border-soft);
  color: #303134;
  font-weight: 620;
  text-align: left;
  vertical-align: middle;
}

.data-table th {
  color: var(--color-text-muted);
  background: var(--color-surface-subtle);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.sortable-column {
  padding: 0;
}

.sort-link {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  color: inherit;
  text-decoration: none;
}

.amount-cell .sort-link {
  justify-content: flex-end;
}

.sort-link:hover {
  color: var(--color-primary);
}

.sortable-column.is-sorted {
  color: var(--color-primary-hover);
  background: var(--color-primary-soft);
}

.sort-link__icon {
  width: 22px;
  height: 22px;
  flex-basis: 22px;
  color: var(--color-text-soft);
  opacity: 0.7;
}

.sort-link:hover .sort-link__icon {
  color: var(--color-primary);
  opacity: 1;
}

.sort-link__icon.is-active {
  color: var(--color-primary);
  opacity: 1;
}

.sort-link__path {
  fill: currentColor;
}

.sort-link__icon.is-asc .sort-link__path--down,
.sort-link__icon.is-desc .sort-link__path--up {
  color: var(--color-text-soft);
  opacity: 0.35;
}

.data-table tbody tr:hover {
  background: #fbfdff;
}

.data-table__row--clickable {
  cursor: pointer;
}

.data-table__row--clickable:focus {
  outline: 3px solid rgba(26, 115, 232, 0.16);
  outline-offset: -3px;
}

.data-table__row--clickable:hover td:not(.actions) {
  color: var(--color-primary-hover);
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.table-wrap {
  overflow-x: auto;
}

.table-statusbar {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 0 14px;
  background: var(--color-surface-subtle);
  border-top: 1px solid var(--color-border-soft);
  color: var(--color-text-muted);
  font-size: 0.78rem;
  font-weight: 720;
  line-height: 1;
}

.table-statusbar__group {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: var(--space-3);
}

.table-statusbar__group--end {
  margin-left: auto;
  color: var(--color-text);
}

.segmented-control {
  display: inline-grid;
  grid-auto-flow: column;
  align-items: center;
  padding: 3px;
  background: var(--color-bg);
  border: 1px solid var(--color-border-soft);
  border-radius: 8px;
}

.segmented-control__item {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 6px;
  color: var(--color-text-muted);
  font-size: 0.86rem;
  font-weight: 760;
  text-decoration: none;
  white-space: nowrap;
}

.segmented-control__item:hover {
  color: var(--color-primary);
}

.segmented-control__item.is-active {
  background: var(--color-surface);
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

@media (min-width: 701px) {
  .table-wrap--fill {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
  }

  .table-wrap--fill .data-table th {
    position: sticky;
    top: 0;
    z-index: 4;
  }

  .table-wrap--fill .data-table--sticky-actions th.actions {
    z-index: 6;
  }

  .table-wrap--fill .data-table--sticky-actions td.actions {
    z-index: 3;
  }

  .table-wrap--fill .empty-row {
    height: 120px;
  }
}

.data-table--sticky-actions th.actions,
.data-table--sticky-actions td.actions {
  position: sticky;
  right: 0;
  z-index: 2;
  background: var(--color-surface);
  box-shadow: -1px 0 0 var(--color-border-soft);
}

.data-table--sticky-actions th.actions {
  z-index: 3;
  background: var(--color-surface-subtle);
}

.data-table tbody tr:hover .actions {
  background: #fbfdff;
}

.data-table--input-documents {
  min-width: 760px;
  table-layout: fixed;
}

.input-documents-col--document {
  width: 36%;
}

.input-documents-col--vendor {
  width: 26%;
}

.input-documents-col--category {
  width: 15%;
}

.input-documents-col--amount {
  width: 11%;
}

.input-documents-col--actions {
  width: 58px;
}

.data-table--input-documents th.actions,
.data-table--input-documents td.actions {
  padding-right: 18px;
  text-align: right;
}

.data-table--input-documents .row-actions {
  justify-content: flex-end;
}

.data-table--billing {
  min-width: 860px;
  table-layout: fixed;
}

.billing-col--unit {
  width: 16%;
}

.billing-col--payer {
  width: 24%;
}

.billing-col--status {
  width: 12%;
}

.billing-col--document {
  width: 25%;
}

.billing-col--amount {
  width: 13%;
}

.billing-col--actions {
  width: 58px;
}

.data-table--billing th.actions,
.data-table--billing td.actions {
  padding-right: 18px;
  text-align: right;
}

.data-table--billing .row-actions {
  justify-content: flex-end;
}

.data-table--buildings {
  min-width: 820px;
  table-layout: fixed;
}

.buildings-col--building {
  width: 28%;
}

.buildings-col--factors {
  width: 34%;
}

.buildings-col--closed-month {
  width: 20%;
}

.buildings-col--status {
  width: 12%;
}

.buildings-col--actions {
  width: 58px;
}

.data-table--buildings th.actions,
.data-table--buildings td.actions {
  padding-right: 18px;
  text-align: right;
}

.data-table--buildings .row-actions {
  justify-content: flex-end;
}

.data-table--building-units,
.data-table--building-entrances {
  min-width: 820px;
  table-layout: fixed;
}

.building-unit-col--label {
  width: 18%;
}

.building-unit-col--payer {
  width: 24%;
}

.building-unit-col--people {
  width: 11%;
}

.building-unit-col--area {
  width: 13%;
}

.building-unit-col--actions,
.building-entrance-col--actions {
  width: 74px;
}

.building-entrance-col--name {
  width: 42%;
}

.building-entrance-col--count {
  width: 14%;
}

.building-entrance-col--area {
  width: 22%;
}

.data-table--building-units th.actions,
.data-table--building-units td.actions,
.data-table--building-entrances th.actions,
.data-table--building-entrances td.actions {
  text-align: right;
}

.data-table--building-units .row-actions,
.data-table--building-entrances .row-actions {
  display: flex;
  justify-content: flex-end;
}

.data-table--copy-source {
  min-width: 760px;
}

.copy-source-col--select {
  width: 48px;
}

.copy-source-col--date {
  width: 118px;
}

.copy-source-col--amount {
  width: 126px;
}

.selection-checkbox {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  cursor: pointer;
}

.selection-checkbox input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--color-primary);
}

.data-table--directory {
  min-width: 760px;
  table-layout: fixed;
}

.directory-col--name {
  width: 30%;
}

.directory-col--tax {
  width: 14%;
}

.directory-col--email {
  width: 22%;
}

.directory-col--phone {
  width: 14%;
}

.directory-col--status {
  width: 10%;
}

.directory-col--actions {
  width: 112px;
}

.data-table--directory td:first-child strong,
.data-table--directory td:first-child .muted-cell,
.data-table--directory td:nth-child(2),
.data-table--directory td:nth-child(3),
.data-table--directory td:nth-child(4) {
  overflow: hidden;
  text-overflow: ellipsis;
}

.data-table--directory td:first-child strong,
.data-table--directory td:nth-child(2),
.data-table--directory td:nth-child(3),
.data-table--directory td:nth-child(4) {
  white-space: nowrap;
}

.amount-cell {
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.data-table .amount-cell {
  text-align: right;
}

.data-table--compact {
  min-width: 520px;
}

.data-table--compact th,
.data-table--compact td {
  padding: 10px 12px;
}

.table-cell-note {
  display: block;
  margin-top: 3px;
  color: var(--color-text-muted);
  font-size: 0.79rem;
  font-weight: 500;
}

.document-cell__title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.document-cell__title > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attention-marker {
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
  flex: 0 0 auto;
  color: var(--color-warning);
}

.attention-marker .icon {
  width: 17px;
  height: 17px;
}

.data-table--input-documents .document-cell__title,
.data-table--input-documents .document-cell .muted-cell,
.data-table--input-documents td:nth-child(2),
.data-table--input-documents td:nth-child(3) {
  overflow: hidden;
  text-overflow: ellipsis;
}

.data-table--input-documents .document-cell__title,
.data-table--input-documents td:nth-child(2),
.data-table--input-documents td:nth-child(3) {
  white-space: nowrap;
}

.table-actions {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: var(--space-2);
}

.table-actions .inline-form {
  margin-left: 0;
}

.data-table .btn {
  min-height: 32px;
  padding: 0 12px;
}

.input-documents-panel {
  margin-top: var(--space-5);
}

.billing-panel {
  margin-top: var(--space-5);
}

.billing-message-list {
  max-height: 118px;
  overflow: auto;
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border-soft);
  background: var(--color-surface-subtle);
}

.billing-preview-modal__body {
  background: var(--color-surface-subtle);
  padding: 18px;
}

.app-modal--document-preview .app-modal__panel {
  max-height: min(920px, calc(100vh - 32px));
}

.billing-preview-modal__body .billing-document {
  max-width: 820px;
  margin: 0 auto;
  padding: 34px 38px;
  background: #fff;
  border: 1px solid var(--color-border-soft);
  border-radius: 6px;
  box-shadow: 0 12px 28px rgba(23, 32, 44, 0.08);
}

.billing-document {
  color: #20242b;
  font-size: 0.86rem;
  line-height: 1.45;
  overflow-x: auto;
}

.billing-document h1 {
  margin: 0 0 8px;
  font-size: 1.45rem;
  letter-spacing: 0;
}

.billing-document h2 {
  margin: 24px 0 8px;
  font-size: 1rem;
  letter-spacing: 0;
}

.billing-document__muted {
  color: var(--color-text-muted);
}

.billing-document__meta {
  display: grid;
  gap: 0;
  margin: 18px 0;
}

.billing-document__meta-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  padding: 4px 0;
}

.billing-document__meta dt,
.billing-document__meta dd {
  margin: 0;
}

.billing-document__meta dt {
  color: var(--color-text-muted);
  font-weight: 700;
}

.billing-document__table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

.billing-document__table th,
.billing-document__table td {
  padding: 7px 8px;
  border-bottom: 1px solid var(--color-border-soft);
  text-align: left;
  vertical-align: top;
}

.billing-document__table th {
  color: #3b4554;
  background: #f3f5f8;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.billing-document__amount {
  text-align: right;
  white-space: nowrap;
}

.billing-document__total {
  margin-top: 18px;
  text-align: right;
  font-size: 1.05rem;
  font-weight: 800;
}

@media (min-width: 701px) {
  .page-shell--work-fill .panel--fill {
    margin-top: 0;
  }
}

.panel-heading__content {
  min-width: 0;
}

.panel-heading__content .page-description {
  margin-top: 4px;
  font-size: 0.84rem;
}

.document-summary {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.document-summary .status-pill {
  min-height: 28px;
}

.manual-allocation-summary {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.unit-inclusion-actions {
  align-self: end;
  justify-items: start;
}

.unit-inclusion-summary {
  align-items: center;
  justify-content: space-between;
}

.unit-inclusion-summary p {
  margin: 0;
}

.manual-allocation-panel {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  gap: var(--space-3);
}

.manual-allocation-panel .form-error {
  flex: 0 0 auto;
  margin-bottom: 0;
}

.manual-allocation-table {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.manual-allocation-table .data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.actions {
  width: 1%;
  text-align: right;
  white-space: nowrap;
}

.row-actions {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.inline-form {
  display: inline-flex;
  margin-left: 8px;
}

.table-input {
  width: min(180px, 100%);
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: #fff;
}

.allocation-input-group {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) auto;
  gap: var(--space-2);
  align-items: center;
  max-width: 260px;
}

.allocation-input-group .table-input {
  width: 100%;
}

.allocation-input-group--shares {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  max-width: none;
}

.allocation-input-group--shares [data-relative-share-fill] {
  margin-inline-start: auto;
}

.allocation-input-group--shares .table-input {
  flex: 0 0 96px;
  min-width: 0;
  width: 96px;
  max-width: 100%;
}

.allocation-input-group--shares .table-cell-note {
  flex: 0 0 100%;
  margin-top: 0;
  white-space: normal;
}

.manual-allocation-data-table {
  table-layout: fixed;
}

.manual-allocation-data-table th:first-child { width: 12%; }
.manual-allocation-data-table th:nth-child(2) { width: 44%; }
.manual-allocation-data-table td { overflow-wrap: anywhere; }
.manual-allocation-table { scrollbar-gutter: stable; }

.allocation-input-group--shares .allocation-share-preview {
  display: grid;
  grid-template-columns: 10ch minmax(0, 1fr);
  column-gap: var(--space-2);
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}

.allocation-share-preview__percent,
.allocation-share-preview__amount {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manual-allocation-summary--shares {
  align-items: center;
  flex-wrap: nowrap;
}

.manual-allocation-summary--shares .status-pill { min-width: 0; }
.manual-allocation-summary--shares .field-help { margin-inline-start: auto; flex-shrink: 0; }
.manual-allocation-summary--shares [data-relative-share-total] {
  width: 12ch;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 420px) {
  .allocation-input-group:not(.allocation-input-group--shares) {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    min-width: 0;
  }
  .allocation-input-group:not(.allocation-input-group--shares) .table-input {
    flex: 0 0 96px;
    width: 96px;
    max-width: 100%;
    min-width: 0;
  }
  .allocation-input-group:not(.allocation-input-group--shares) .btn {
    margin-inline-start: auto;
  }
  .allocation-input-group--shares .allocation-share-preview {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 2px;
  }
  .allocation-share-preview__separator { display: none; }
}

.allocation-input-group .btn {
  min-height: 34px;
  padding-inline: var(--space-3);
  border-radius: 17px;
  font-size: 0.78rem;
}

.table-input.is-invalid {
  border-color: var(--color-danger);
  box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.12);
}

.form-page-actions {
  margin-top: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  gap: var(--space-2);
  padding: 0 var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: 19px;
  background: var(--color-surface);
  cursor: pointer;
  color: var(--color-primary);
  font-weight: 760;
  line-height: 1;
  text-decoration: none;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
  white-space: nowrap;
}

.btn:disabled,
.btn[aria-disabled="true"],
.form.is-submitting .btn[type="submit"] {
  opacity: 0.62;
  cursor: progress;
  pointer-events: none;
}

.form-submit-spinner,
.is-submitting .form-submit-icon {
  display: none;
}

.is-submitting .form-submit-spinner {
  display: block;
  animation: form-submit-spin .8s linear infinite;
}

@keyframes form-submit-spin {
  to { transform: rotate(1turn); }
}

@media (prefers-reduced-motion: reduce) {
  .is-submitting .form-submit-spinner { animation: none; }
}

.btn + .btn {
  margin-left: 0;
}

.btn-primary {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
}

.btn-secondary {
  background: var(--color-surface);
  border-color: var(--color-border);
  color: var(--color-primary);
}

.btn-secondary:hover {
  background: var(--color-bg);
}

.btn-danger {
  background: var(--color-danger-soft);
  border-color: #fad2cf;
  color: var(--color-danger);
}

.btn-danger:hover {
  background: #8f1c13;
}

.btn-warning {
  background: var(--color-warning-soft);
  border-color: #fdd663;
  color: var(--color-warning);
}

.btn-warning:hover {
  background: #fdd663;
  border-color: #f9ab00;
  color: #5f3400;
}

.btn-ghost {
  min-height: 32px;
  background: var(--color-surface);
  border-color: var(--color-border);
  color: var(--color-primary);
}

.btn-ghost:hover {
  background: var(--color-bg);
}

.icon-button {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  color: var(--color-primary);
  cursor: pointer;
  text-decoration: none;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.icon-button--sm {
  width: 34px;
  height: 34px;
  border-radius: 17px;
}

.icon-button--sm .icon {
  width: 19px;
  height: 19px;
}

.icon-button:hover {
  background: var(--color-bg);
}

.icon-button:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.14);
  outline: none;
}

.icon-button--primary {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.icon-button--primary:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
}

.icon-button .icon {
  width: 21px;
  height: 21px;
}

.action-menu {
  display: inline-flex;
}

.action-menu__panel {
  position: fixed;
  z-index: 940;
  display: grid;
  min-width: 228px;
  max-width: min(320px, calc(100vw - 24px));
  overflow-y: auto;
  padding: var(--space-2);
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.action-menu__form {
  margin: 0;
}

.allocation-prefill {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-inline-end: auto;
}

/* Only the designated modal body/table may scroll, including during popover focus. */
.app-modal--allocation-tools .app-modal__panel,
.app-modal--allocation-tools .app-modal__panel > form { overflow: clip; }

.allocation-prefill__panel {
  inset: auto;
  margin: 0;
  width: min(300px, calc(100vw - 48px));
  color: var(--color-text);
  font: inherit;
}

.allocation-prefill__panel .action-menu__item { grid-template-columns: minmax(0, 1fr); }
.allocation-prefill__hint { margin: var(--space-2) 10px var(--space-3); font-size: 0.85rem; color: var(--color-text-muted); }
.allocation-prefill__undo { min-width: 80px; }
.allocation-prefill__undo:disabled { visibility: hidden; }
.allocation-prefill__error {
  position: absolute;
  inset-inline-start: 0;
  bottom: calc(100% + var(--space-2));
  width: min(340px, calc(100vw - 48px));
  margin: 0;
  padding: var(--space-3);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  z-index: 1;
}

@media (max-width: 640px) {
  .app-modal__footer.app-modal__footer--allocation-tools:has(.allocation-prefill:not([hidden])) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .app-modal__footer--allocation-tools .allocation-prefill { grid-column: 1 / -1; width: 100%; }
  .app-modal__footer--allocation-tools .allocation-prefill .btn { width: auto; }
}

.action-menu__separator {
  height: 1px;
  margin: var(--space-2) 0;
  background: var(--color-border-soft);
}

.action-menu__item {
  display: grid;
  width: 100%;
  min-height: 36px;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: var(--space-2);
  padding: 0 10px;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--color-text);
  cursor: pointer;
  font: inherit;
  font-weight: 650;
  text-align: left;
}

.action-menu__item:hover,
.action-menu__item:focus {
  background: var(--color-primary-soft);
  color: var(--color-primary-hover);
  outline: none;
}

.action-menu__item:disabled,
.action-menu__item[aria-disabled="true"] {
  color: var(--color-text-soft);
  cursor: default;
  opacity: 0.72;
}

.action-menu__item:disabled:hover,
.action-menu__item:disabled:focus,
.action-menu__item[aria-disabled="true"]:hover,
.action-menu__item[aria-disabled="true"]:focus {
  background: transparent;
  color: var(--color-text-soft);
}

.action-menu__item--danger {
  color: var(--color-danger);
}

.action-menu__item--danger:hover,
.action-menu__item--danger:focus {
  background: var(--color-danger-soft);
  color: var(--color-danger);
}

.action-menu__item--warning {
  color: var(--color-warning);
}

.action-menu__item--warning:hover,
.action-menu__item--warning:focus {
  background: var(--color-warning-soft);
  color: var(--color-warning);
}

.action-menu__item .icon {
  width: 18px;
  height: 18px;
}

.action-menu__item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 13px;
  background: var(--color-success-soft);
  color: var(--color-success);
  font-size: 0.78rem;
  font-weight: 820;
  white-space: nowrap;
}

.status-pill--muted {
  background: var(--color-primary-soft);
  color: var(--color-primary-hover);
}

.status-pill--danger {
  background: var(--color-danger-soft);
  color: var(--color-danger);
}

.status-pill--warning {
  background: var(--color-warning-soft);
  color: var(--color-warning);
}

.empty-row {
  color: #6b7280;
  text-align: center;
}

.empty-state {
  padding: 18px;
}

.empty-state__title {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.empty-state__description {
  margin: 0;
  color: #5b6573;
}

.empty-state__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.dashboard-rail {
  display: grid;
  gap: var(--space-5);
}

.task-list,
.activity-list {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4);
}

.task-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--color-surface-subtle);
  border: 1px solid var(--color-border-soft);
  border-radius: 14px;
}

.task-card__icon,
.activity-item__icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-weight: 900;
}

.task-card h3,
.activity-item h3 {
  margin: 0 0 5px;
  color: var(--color-text);
  font-size: 0.92rem;
}

.task-card p,
.activity-item p {
  margin: 0;
  color: var(--color-text-muted);
  line-height: 1.35;
}

.activity-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: var(--space-3);
  align-items: start;
}

.muted-cell {
  display: block;
  margin-top: 4px;
  color: #687385;
  font-size: 0.9rem;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.check-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 18px 20px 20px 38px;
}

.check-list li {
  padding-left: 4px;
}

.check-list--muted {
  color: #5b6573;
}

@media (max-width: 700px) {
  .app-layout {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    position: static;
    height: auto;
  }

  .app-sidebar__brand {
    min-height: 60px;
    padding: var(--space-3) var(--space-4);
  }

  .app-sidebar__nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
    gap: var(--space-2);
    overflow: visible;
    padding: 10px var(--space-4) var(--space-4);
  }

  .app-sidebar__group {
    display: contents;
  }

  .app-sidebar__nav a {
    grid-template-columns: 28px 1fr;
    min-height: 42px;
    padding: 0 12px;
    background: #f1f3f4;
    line-height: 1.15;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .app-sidebar__nav a.is-active {
    box-shadow: none;
  }

  .app-sidebar__group-title,
  .app-sidebar__account {
    display: none;
  }

  .app-mainbar {
    position: static;
    grid-template-columns: 1fr;
    padding: 14px var(--space-4);
  }

  .app-mainbar--page {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .app-mainbar__meta,
  .page-title-row {
    align-items: stretch;
    flex-direction: column;
  }

  .page-shell.page-shell--work {
    width: calc(100% - 24px);
    max-width: none;
    padding: 22px 0 36px;
  }

  .page-title-row {
    grid-template-columns: 1fr;
  }

  .metric-grid,
  .surface-grid--two,
  .filter-form--compact {
    grid-template-columns: 1fr;
  }

  .filter-bar--input-documents,
  .filter-bar--billing,
  .filter-bar--buildings,
  .filter-bar--building-work,
  .filter-form.filter-form--server {
    grid-template-columns: 1fr;
  }

  .app-topbar {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .page-header {
    align-items: stretch;
    flex-direction: column;
  }

  .page-actions {
    justify-content: stretch;
  }

  .page-actions .btn {
    flex: 1;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .module-grid {
    grid-template-columns: 1fr;
  }

  .data-table {
    display: block;
    overflow-x: auto;
  }
}

.searchable-select__detail {
  max-height: 96px;
  overflow-y: auto;
  border-top: 1px solid var(--color-border-soft);
  padding: 8px 10px 0;
  color: var(--color-text-muted);
  font-size: .85rem;
  font-weight: 400;
  overflow-wrap: anywhere;
}
