:root {
  --bg: #f6f7f8;
  --panel: #ffffff;
  --panel-2: #eef2f3;
  --ink: #1b1f23;
  --muted: #68717b;
  --line: #dde2e7;
  --brand: #22313a;
  --brand-2: #2f6f5e;
  --accent: #b94e35;
  --ok: #24764f;
  --bad: #b42318;
  --warn: #a65f00;
  --shadow: 0 1px 2px rgba(20, 30, 40, 0.04);
}


* {
  box-sizing: border-box;
}

html {
  width: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.42;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button,
.btn,
.check-item {
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease, opacity 0.12s ease, border-color 0.12s ease;
}

button:active,
.btn:active,
.check-item:active {
  transform: scale(0.985);
  opacity: 0.9;
}

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
}

.login-art {
  padding: 56px;
  background:
    linear-gradient(rgba(22, 32, 38, 0.68), rgba(22, 32, 38, 0.68)),
    url("https://images.unsplash.com/photo-1503387762-592deb58ef4e?auto=format&fit=crop&w=1400&q=80") center/cover;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.login-art h1 {
  max-width: 720px;
  margin: 0 0 16px;
  font-size: 48px;
  line-height: 1.04;
  letter-spacing: 0;
}

.login-art p {
  max-width: 620px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

.login-panel {
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--panel);
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  margin-bottom: 28px;
}

.login-panel h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.login-panel .hint {
  color: var(--muted);
  margin: 0 0 28px;
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.field label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

input,
select {
  width: 100%;
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

input:focus,
select:focus {
  outline: 2px solid rgba(47, 111, 94, 0.22);
  border-color: var(--brand-2);
}

.check-list {
  display: grid;
  gap: 6px;
  max-height: 220px;
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.field .check-item,
.check-item {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 7px;
  border-radius: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  text-transform: none;
}

.field .check-item:hover,
.check-item:hover {
  background: #f6f8f9;
}

.field .check-item input,
.check-item input {
  width: 18px;
  min-height: 18px;
  height: 18px;
  padding: 0;
  accent-color: var(--brand-2);
}

.empty-checks {
  color: var(--muted);
  font-size: 14px;
}

.btn {
  min-height: 38px;
  padding: 9px 12px;
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--ink);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn.primary {
  background: var(--brand);
  color: #fff;
}

.btn.success {
  background: var(--brand-2);
  color: #fff;
}

.btn.expense {
  background: var(--bad);
  color: #fff;
}

.btn.danger {
  background: #fff1ee;
  color: var(--bad);
}

.btn.ghost {
  background: transparent;
  border: 1px solid var(--line);
}

.btn.block {
  width: 100%;
}

.btn.mini {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 12px;
}

.error {
  min-height: 22px;
  color: var(--bad);
  font-size: 14px;
  margin-top: 12px;
}

.toast-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 2000;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 28px));
  pointer-events: none;
}

.toast {
  padding: 13px 15px;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: 0 14px 36px rgba(20, 30, 40, 0.18);
  font-weight: 700;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.success {
  border-color: rgba(36, 118, 79, 0.28);
  background: #eef8f3;
  color: var(--ok);
}

.toast.error,
.toast.danger {
  border-color: rgba(180, 35, 24, 0.24);
  background: #fff1ee;
  color: var(--bad);
}

.shell {
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  overflow-x: clip;
}

.sidebar {
  min-width: 0;
  background: #fff;
  color: var(--ink);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-right: 1px solid var(--line);
}

.side-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  line-height: 1.18;
}

.side-brand > div:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.side-brand .brand-mark {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  margin: 0;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
}

.nav {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.nav button {
  min-height: 36px;
  border-radius: 8px;
  padding: 8px 10px;
  text-align: left;
  color: var(--muted);
  background: transparent;
  font-weight: 700;
}

.nav button.active,
.nav button:hover {
  color: var(--ink);
  background: var(--panel-2);
}

.side-footer {
  min-width: 0;
  margin-top: auto;
  color: var(--muted);
  font-size: 13px;
}

.side-user {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.side-user strong,
.side-user span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logout-action {
  margin-top: 12px;
}

.notification-center {
  position: relative;
  min-width: 0;
  margin-bottom: 12px;
}

.notification-button {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font-weight: 800;
  box-shadow: var(--shadow);
}

.notification-button strong {
  min-width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  color: #fff;
  background: var(--accent);
  font-size: 12px;
  line-height: 1;
}

.notification-popover {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  z-index: 60;
  width: min(380px, calc(100vw - 24px));
  max-height: min(520px, calc(100vh - 40px));
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(20, 30, 40, 0.22);
}

.notification-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.notification-head > div {
  display: flex;
  gap: 10px;
}

.link-btn {
  padding: 0;
  color: var(--brand-2);
  background: transparent;
  font-size: 13px;
  font-weight: 800;
}

.danger-text {
  color: var(--bad);
}

.notification-list {
  max-height: 420px;
  overflow: auto;
  padding: 6px;
}

.notification-item {
  width: 100%;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.notification-item:hover {
  background: var(--panel-2);
}

.notification-item.unread {
  background: rgba(47, 111, 94, 0.1);
}

.notification-icon {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--brand);
  font-size: 13px;
  font-weight: 900;
}

.notification-body {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.notification-body strong,
.notification-body span,
.notification-body small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notification-body strong {
  font-size: 14px;
}

.notification-body small {
  color: var(--muted);
  font-size: 12px;
}

.notification-body span {
  color: var(--muted);
  font-size: 13px;
}

.notification-empty {
  padding: 22px 12px;
  color: var(--muted);
  text-align: center;
}

.main {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  padding: 20px;
}

.topbar {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.topbar h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.16;
}

.topbar p {
  margin: 4px 0 0;
  color: var(--muted);
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.client-object-topbar {
  padding-left: 58px;
}

.client-back-float {
  position: fixed;
  top: 14px;
  left: 244px;
  z-index: 40;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 999px;
  font-size: 23px;
  line-height: 1;
  box-shadow: 0 10px 28px rgba(20, 30, 40, 0.18);
}

.foreman-topbar .top-actions {
  flex: 1;
}

.project-picker {
  flex: 1;
  min-width: min(680px, 100%);
  min-height: 50px;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 700;
}

.client-project-picker {
  min-height: 46px;
  font-weight: 700;
}

.add-menu {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
}

.add-menu summary {
  list-style: none;
}

.add-menu summary::-webkit-details-marker {
  display: none;
}

.add-trigger {
  min-width: 240px;
  min-height: 50px;
  padding: 12px 18px;
  font-size: 15px;
}

.add-trigger .chevron {
  margin-left: 4px;
  font-size: 17px;
  line-height: 1;
}

.add-menu-list {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 30;
  display: grid;
  gap: 6px;
  min-width: 190px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(20, 30, 40, 0.18);
}

.add-menu-list button,
.add-menu-list a {
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 7px;
  background: #f6f8f9;
  color: var(--ink);
  text-align: left;
  font-weight: 800;
  text-decoration: none;
  display: flex;
  align-items: center;
}

.add-menu-list button[data-add-tab="expense"] {
  background: #fff1ee;
  color: var(--bad);
}

.add-menu-list button[data-add-tab="fund"] {
  background: #eef8f3;
  color: var(--ok);
}

.export-menu .add-trigger {
  min-width: 140px;
}

.bottom-nav {
  display: none;
}

.workspace {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
}

.workspace.narrow {
  grid-template-columns: minmax(0, 720px) minmax(260px, 340px);
}

.foreman-object-workspace {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
}

.compact-workspace {
  max-width: 760px;
}

.side-stack {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 12px;
}

.layout {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 332px;
  gap: 16px;
}

.admin-layout {
  min-width: 0;
  display: grid;
  gap: 16px;
}

.admin-db-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.admin-db-grid div {
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}

.admin-db-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-db-grid strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

.admin-db-panel .panel-head {
  align-items: flex-end;
}

.admin-db-select {
  min-width: 240px;
}

.db-editor-note {
  color: var(--muted);
  background: #f7f9fa;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  font-size: 13px;
  line-height: 1.4;
}

.db-editor-note code {
  color: var(--ink);
  font-weight: 900;
}

.db-record-textarea {
  min-height: min(58vh, 560px);
  resize: vertical;
  font: 13px/1.45 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  tab-size: 2;
}

.db-record-textarea.tall {
  min-height: min(44vh, 420px);
}

.grid {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.grid .full {
  grid-column: 1 / -1;
}

.metrics {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.metrics-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  box-shadow: var(--shadow);
}

.metric span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  margin-top: 5px;
  font-size: 21px;
  line-height: 1.1;
}

.client-metrics {
  gap: 16px;
  margin: 18px 0;
}

.client-metrics .metric {
  min-height: 96px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 9px;
  padding: 18px 20px;
}

.client-metrics .metric span {
  line-height: 1.2;
}

.client-metrics .metric strong {
  margin-top: 0;
  font-size: 24px;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.panel {
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel-head {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.panel-head h2,
.panel-head h3 {
  margin: 0;
}

.panel-head p {
  margin: 4px 0 0;
  color: var(--muted);
}

.panel-body {
  min-width: 0;
  padding: 14px;
}

.section-tabs {
  display: flex;
  gap: 10px;
  margin: 0 0 18px;
  overflow-x: auto;
  scrollbar-width: none;
}

.section-tabs::-webkit-scrollbar {
  display: none;
}

.section-tabs button {
  flex: 0 0 auto;
  min-height: 52px;
  min-width: 210px;
  padding: 13px 34px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 16px;
  font-weight: 800;
}

.section-tabs button.active {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}

.project-tabs {
  align-items: center;
  justify-content: center;
  overflow: visible;
  flex-wrap: nowrap;
}

.project-tabs button {
  flex: 1 1 0;
  min-width: 0;
  padding-left: 16px;
  padding-right: 16px;
}

.add-tabs {
  margin-top: 0;
}

.add-tabs button[data-add-tab="expense"] {
  background: var(--bad);
  border-color: var(--bad);
  color: #fff;
}

.add-tabs button[data-add-tab="fund"] {
  background: var(--brand-2);
  border-color: var(--brand-2);
  color: #fff;
}

.customer-groups,
.object-list,
.people-list,
.action-list {
  display: grid;
  gap: 10px;
}

.customer-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: visible;
}

.customer-head,
.customer-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
}

.customer-head {
  background: #fbfcfd;
  cursor: pointer;
  list-style: none;
  border-radius: 8px;
}

.customer-group[open] .customer-head {
  border-bottom: 1px solid var(--line);
  border-radius: 8px 8px 0 0;
}

.customer-head::-webkit-details-marker {
  display: none;
}

.customer-head h3,
.people-list h3 {
  margin: 0;
}

.customer-head p,
.customer-foot,
.object-card small,
.person-row span {
  color: var(--muted);
}

.customer-head p {
  margin: 3px 0 0;
}

.customer-totals {
  display: grid;
  justify-items: end;
  gap: 2px;
  white-space: nowrap;
}

.customer-totals span,
.customer-totals small {
  color: var(--muted);
  font-size: 12px;
}

.customer-chevron {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 16px;
  transition: transform 0.14s ease;
}

.customer-group[open] .customer-chevron {
  transform: rotate(180deg);
}

.customer-foot {
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.object-list {
  padding: 8px;
}

.object-card {
  width: 100%;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  color: var(--ink);
  text-align: left;
}

.object-card strong,
.object-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.object-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.object-money {
  display: grid;
  justify-items: end;
  gap: 2px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.object-money span {
  color: var(--muted);
  font-size: 12px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--brand-2);
}

.status-dot.paused {
  background: var(--warn);
}

.status-dot.completed {
  background: var(--muted);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.info-grid div,
.mini-feed div {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.info-grid span,
.mini-feed span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.info-grid strong,
.mini-feed strong {
  display: block;
  margin-top: 4px;
}

.mini-feed {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.person-row {
  display: grid;
  gap: 2px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.chart-panel .panel-head {
  align-items: flex-start;
}

.chart-body {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.donut {
  width: 112px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  box-shadow: inset 0 0 0 1px var(--line);
}

.donut::after {
  content: "";
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--line);
}

.donut span {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-weight: 800;
}

.chart-bars {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.chart-row {
  display: grid;
  gap: 5px;
}

.chart-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}

.chart-row-head span {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-row-head i {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
}

.chart-row-head strong {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.bar {
  height: 7px;
  border-radius: 999px;
  background: #eef2f3;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.chart-row small {
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.project-list {
  display: grid;
  gap: 8px;
}

.project-row {
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
}

.project-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.project-row-head > div {
  min-width: 0;
}

.project-row-head .btn {
  flex: 0 0 auto;
}

.project-row h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.muted {
  color: var(--muted);
}

.money {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.positive {
  color: var(--ok);
}

.negative {
  color: var(--bad);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.clients-table-wrap {
  overflow: visible;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  padding: 9px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  background: #f8fafb;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.status-pill.ok {
  color: var(--ok);
  background: rgba(46, 125, 90, 0.1);
}

.status-pill.bad {
  color: var(--bad);
  background: rgba(183, 60, 60, 0.1);
}

.tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.tabs button {
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--panel-2);
  color: var(--muted);
  font-weight: 800;
}

.tabs button.active {
  background: var(--brand);
  color: #fff;
}

.operation-filters {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr)) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
}

.operation-filters .field {
  min-width: 0;
  margin: 0;
}

.operation-filters input,
.operation-filters select {
  min-width: 0;
  width: 100%;
}

.operation-search {
  grid-column: span 2;
}

.filter-reset {
  min-height: 42px;
  white-space: nowrap;
}

.filter-reset:disabled {
  cursor: default;
  opacity: 0.45;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.full {
  grid-column: 1 / -1;
}

.receipt-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.receipt-preview {
  width: 72px;
  height: 72px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.receipt-preview.compact {
  width: 46px;
  height: 46px;
}

.receipt-preview img,
.receipt-thumb {
  width: 68px;
  height: 68px;
  display: block;
  object-fit: cover;
}

.receipt-preview img {
  width: 100%;
  height: 100%;
}

.receipt-mini-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.receipt-card-list {
  display: grid;
  gap: 10px;
}

.receipt-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.receipt-card-preview {
  min-width: 0;
}

.receipt-card-info {
  min-width: 0;
}

.receipt-card-info strong,
.receipt-card-info span {
  display: block;
}

.receipt-card-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.receipt-card-info span {
  margin: 4px 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.qr-scan-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
  padding: 12px;
}

.qr-scan-box strong,
.qr-scan-box span {
  display: block;
}

.qr-scan-box span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.qr-scan-box .qr-status.success {
  color: var(--brand);
}

.qr-scan-box .qr-status.error {
  color: var(--bad);
}

.qr-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.fns-receipt-result {
  overflow: hidden;
  border: 1px solid #cfe1da;
  border-radius: 8px;
  background: #f3f8f6;
}

.fns-receipt-result[hidden] {
  display: none;
}

.fns-receipt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px;
  border-bottom: 1px solid #dce8e3;
}

.fns-receipt-head > div,
.fns-receipt-head small,
.fns-receipt-head strong,
.fns-receipt-head span {
  display: block;
  min-width: 0;
}

.fns-receipt-head small,
.receipt-item-row small {
  color: var(--muted);
  font-size: 11px;
}

.fns-receipt-head strong {
  margin: 2px 0;
}

.fns-receipt-head > b {
  flex: 0 0 auto;
  white-space: nowrap;
}

.receipt-items-details {
  border-top: 1px solid #dce8e3;
}

.receipt-items-details > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 12px;
  cursor: pointer;
  list-style: none;
  color: var(--brand);
  font-size: 13px;
  font-weight: 900;
}

.receipt-items-details > summary::-webkit-details-marker {
  display: none;
}

.receipt-items-details > summary strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  background: #dce8e3;
  color: var(--ink);
  font-size: 12px;
}

.receipt-items-details > summary em {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.receipt-items-details .hide-label,
.receipt-items-details[open] .show-label {
  display: none;
}

.receipt-items-details[open] .hide-label {
  display: inline;
}

.receipt-item-list {
  max-height: 280px;
  overflow: auto;
  padding: 0 12px;
}

.receipt-item-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto auto;
  gap: 12px;
  align-items: center;
  min-height: 44px;
  border-bottom: 1px solid #dce8e3;
}

.receipt-item-row:last-child {
  border-bottom: 0;
}

.receipt-item-name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.receipt-item-row b {
  min-width: 76px;
  text-align: right;
  white-space: nowrap;
}

.expense-description {
  display: grid;
  gap: 8px;
  min-width: 220px;
}

.expense-description .receipt-items-details {
  min-width: min(560px, 65vw);
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fafb;
}

.expense-description .receipt-items-details.open-list {
  padding-top: 0;
}

.expense-description .receipt-item-list {
  max-height: 220px;
}

.fns-receipt-result > p {
  margin: 0;
  padding: 12px;
  color: var(--muted);
}

.works-workspace {
  align-items: start;
}

.add-work-box {
  margin-bottom: 14px;
}

.add-work-box > summary,
.inline-edit > summary {
  cursor: pointer;
  list-style: none;
}

.add-work-box > summary::-webkit-details-marker,
.inline-edit > summary::-webkit-details-marker {
  display: none;
}

.work-form {
  margin-top: 12px;
}

.work-list,
.photo-report-list {
  display: grid;
  gap: 12px;
}

.work-card,
.photo-report-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.work-card-head,
.photo-report-head {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.work-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.status-pill,
.visible-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
  color: #22313a;
  background: #eef2f5;
}

.status-pill.active {
  color: #1d4d3f;
  background: #e6f4ee;
}

.status-pill.completed {
  color: #fff;
  background: var(--brand);
}

.status-pill.paused {
  color: #7a3b24;
  background: #fff0e8;
}

.visible-badge {
  color: #1d4d3f;
  background: #e6f4ee;
  white-space: nowrap;
}

.work-progress {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f4;
  margin: 12px 0;
}

.work-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.work-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.work-stats div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  background: #f8fafb;
}

.work-stats span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.work-stats strong {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.work-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

.work-actions span {
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.work-detail {
  display: grid;
  gap: 12px;
}

.work-detail-head {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.work-detail-head h2 {
  margin: 0;
  font-size: 28px;
}

.work-detail-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.work-tabs {
  margin-bottom: 0;
}

.work-tabs button {
  flex: 1 1 0;
  min-width: 0;
  padding-left: 12px;
  padding-right: 12px;
}

.inline-edit {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.inline-edit > summary {
  color: var(--brand);
  font-weight: 800;
}

.work-photos {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.work-photos > strong {
  font-size: 13px;
}

.photo-mini-list {
  align-items: center;
}

.photo-report-card p {
  margin: 10px 0 12px;
  color: var(--ink);
}

.photo-report-head strong,
.photo-report-head span {
  display: block;
}

.photo-report-head span {
  margin-top: 3px;
  color: var(--muted);
  font-weight: 700;
}

.photo-strip {
  margin-bottom: 10px;
}

.photo-report-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.solo-check {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
}

.receipt-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 20px;
}

.receipt-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 22, 28, 0.72);
}

.receipt-modal-window {
  position: relative;
  z-index: 1;
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.receipt-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.receipt-modal-head > div {
  min-width: 0;
}

.receipt-modal-head strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

.receipt-modal-head span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.receipt-modal-body {
  position: relative;
  touch-action: pan-y;
  min-height: 0;
  overflow: auto;
  padding: 14px;
  background: #f6f7f8;
  text-align: center;
}

.receipt-modal-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  background: #fff;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 44px;
  height: 56px;
  border-radius: 8px;
  background: rgba(16, 24, 32, 0.72);
  color: #fff;
  font-size: 34px;
  font-weight: 900;
  transform: translateY(-50%);
}

.gallery-nav:active {
  transform: translateY(-50%) scale(0.985);
}

.gallery-nav.prev {
  left: 18px;
}

.gallery-nav.next {
  right: 18px;
}

.qr-camera-modal {
  position: fixed;
  inset: 0;
  z-index: 3100;
  display: grid;
  place-items: center;
  padding: 20px;
}

.qr-camera-window {
  position: relative;
  z-index: 1;
  width: min(560px, calc(100vw - 32px));
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.qr-camera-body {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 420px;
  overflow: hidden;
  background: #101820;
}

.qr-camera-body video {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
}

.qr-camera-body p {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  margin: 0;
  border-radius: 8px;
  padding: 10px 12px;
  color: #fff;
  background: rgba(16, 24, 32, 0.72);
  font-weight: 800;
  text-align: center;
}

.qr-frame {
  position: absolute;
  width: min(68vw, 270px);
  aspect-ratio: 1;
  border: 3px solid rgba(255, 255, 255, 0.92);
  border-radius: 18px;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.26);
}

.form-modal {
  position: fixed;
  inset: 0;
  z-index: 2800;
  display: grid;
  place-items: center;
  padding: 20px;
}

.form-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 22, 28, 0.48);
}

.form-modal-window {
  position: relative;
  z-index: 1;
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.form-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.form-modal-head h3 {
  margin: 0;
}

.form-modal-body {
  min-height: 0;
  overflow: visible;
  padding: 14px;
}

.danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(180, 35, 24, 0.24);
  border-radius: 8px;
  background: #fff8f6;
}

.danger-zone p {
  margin: 4px 0 0;
  color: var(--muted);
}

.balance-list {
  display: grid;
  gap: 8px;
}

.balance-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.balance-row small {
  grid-column: 1 / -1;
}

.inline-form {
  display: grid;
  gap: 8px;
  min-width: 220px;
  max-width: 320px;
}

.compact-multi {
  position: relative;
}

.compact-multi[open] {
  z-index: 80;
}

.compact-multi summary {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}

.compact-multi summary::-webkit-details-marker {
  display: none;
}

.compact-multi summary small {
  color: var(--muted);
  font-size: 14px;
}

.compact-multi .check-list {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 90;
  width: min(360px, calc(100vw - 36px));
  max-height: 340px;
  padding: 8px;
  box-shadow: 0 14px 36px rgba(20, 30, 40, 0.18);
}

.compact-select-empty {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.empty {
  padding: 28px;
  text-align: center;
  color: var(--muted);
}

.empty.compact {
  padding: 14px;
}

@media (max-width: 1080px) {
  .shell {
    width: 100%;
    max-width: 100vw;
    grid-template-columns: 1fr;
    grid-auto-rows: max-content;
    align-content: start;
  }

  .sidebar {
    position: sticky;
    top: 0;
    align-self: start;
    z-index: 5;
    padding: 10px 12px;
    gap: 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 1px 8px rgba(20, 30, 40, 0.06);
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
  }

  .side-brand {
    min-width: 0;
  }

  .nav {
    width: 100%;
    max-width: 100%;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav button {
    flex: 0 0 auto;
    min-height: 34px;
    white-space: nowrap;
    background: #f6f8f9;
  }

  .side-footer {
    margin-top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
  }

  .notification-center {
    flex: 0 0 auto;
    margin-bottom: 0;
  }

  .notification-button {
    width: auto;
    min-height: 34px;
    padding: 7px 10px;
  }

  .notification-popover {
    top: calc(100% + 8px);
    bottom: auto;
    max-height: min(460px, calc(100vh - 120px));
  }

  .notification-list {
    max-height: min(380px, calc(100vh - 190px));
  }

  .side-footer .btn {
    flex: 0 0 auto;
    width: auto;
    min-height: 34px;
    padding: 7px 10px;
  }

  .logout-action {
    margin-top: 0;
  }

  .layout,
  .metrics,
  .admin-db-grid,
  .workspace,
  .workspace.narrow,
  .foreman-object-workspace {
    grid-template-columns: 1fr;
  }

  .layout,
  .workspace {
    gap: 12px;
  }

  .operation-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .operation-search {
    grid-column: span 2;
  }

  .filter-reset {
    width: 100%;
  }

  .client-back-float {
    top: 70px;
    left: 12px;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 13px;
  }

  .login-page {
    grid-template-columns: 1fr;
  }

  .login-art {
    min-height: 30vh;
    padding: 24px 18px;
  }

  .login-art h1 {
    font-size: 30px;
  }

  .login-panel {
    padding: 24px 18px;
  }

  .main {
    min-width: 0;
    max-width: 100vw;
    padding: 10px 10px 78px;
  }

  .operation-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
  }

  .operation-search,
  .filter-reset {
    grid-column: 1 / -1;
  }

  .sidebar {
    padding: 9px 10px;
  }

  .side-brand {
    gap: 9px;
    font-size: 13px;
  }

  .side-brand .brand-mark {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    font-size: 12px;
  }

  .side-footer {
    gap: 8px;
  }

  .notification-popover {
    left: 0;
    width: min(360px, calc(100vw - 20px));
  }

  .notification-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .sidebar .nav {
    display: none;
  }

  .side-user {
    max-width: calc(100vw - 110px);
  }

  .bottom-nav {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 20;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 4px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 12px 32px rgba(20, 30, 40, 0.18);
  }

  .bottom-nav button {
    min-width: 0;
    min-height: 42px;
    padding: 6px 5px;
    border-radius: 7px;
    background: transparent;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .bottom-nav button.active {
    color: #fff;
    background: var(--brand);
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
  }

  .client-object-topbar {
    padding-left: 54px;
  }

  .client-back-float {
    top: 92px;
    left: 10px;
    width: 42px;
    min-width: 42px;
    height: 42px;
    min-height: 42px;
    font-size: 22px;
    opacity: 0.86;
  }

  .topbar h1 {
    font-size: 21px;
  }

  .topbar p {
    display: none;
  }

  .topbar .btn,
  .topbar select {
    width: 100%;
    max-width: none !important;
  }

  .top-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .add-menu {
    width: auto;
  }

  .add-trigger {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 10px 14px;
    font-size: 14px;
  }

  .add-menu-list {
    left: auto;
    right: 0;
  }

  .metrics {
    gap: 10px;
    margin-bottom: 12px;
  }

  .metric {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
  }

  .client-metrics {
    gap: 10px;
    margin: 12px 0;
  }

  .client-metrics .metric {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    min-height: auto;
    padding: 12px 14px;
    gap: 14px;
  }

  .metric strong {
    margin-top: 0;
    font-size: 20px;
    text-align: right;
    overflow-wrap: anywhere;
  }

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .panel-body {
    padding: 12px;
  }

  .customer-head,
  .customer-foot,
  .object-card {
    align-items: stretch;
    grid-template-columns: 8px minmax(0, 1fr);
  }

  .customer-head,
  .customer-foot {
    flex-direction: column;
    align-items: stretch;
  }

  .customer-head {
    position: relative;
    padding-right: 42px;
  }

  .customer-totals {
    justify-items: start;
  }

  .customer-chevron {
    position: absolute;
    top: 14px;
    right: 14px;
  }

  .object-money {
    grid-column: 2;
    justify-items: start;
  }

  .object-actions {
    grid-column: 2;
    justify-content: flex-start;
  }

  .info-grid,
  .mini-feed,
  .chart-body {
    grid-template-columns: 1fr;
  }

  .donut {
    width: 132px;
    justify-self: center;
  }

  .section-tabs {
    margin-bottom: 10px;
  }

  .project-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    overflow: visible;
  }

  .section-tabs button {
    min-height: 40px;
    min-width: 0;
    width: 100%;
    padding: 9px 8px;
    font-size: 13px;
  }

  .table-wrap {
    overflow: visible;
  }

  .work-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .work-card-head,
  .photo-report-head {
    align-items: stretch;
    flex-direction: column;
  }

  .work-actions,
  .work-detail-head,
  .qr-scan-box {
    align-items: stretch;
    flex-direction: column;
  }

  .fns-receipt-head {
    align-items: flex-start;
  }

  .receipt-item-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 10px;
    padding: 8px 0;
  }

  .receipt-item-quantity,
  .receipt-item-price {
    grid-column: 1;
  }

  .receipt-item-row b {
    grid-column: 2;
    grid-row: 1 / span 3;
    align-self: center;
  }

  .expense-description {
    min-width: 0;
  }

  .expense-description .receipt-items-details {
    min-width: 0;
    width: 100%;
  }

  .work-detail-head .btn {
    align-self: flex-start;
  }

  .work-detail-head h2 {
    font-size: 22px;
  }

  .work-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .clients-table-wrap {
    overflow: visible;
  }

  .admin-db-panel .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-db-select {
    width: 100%;
    min-width: 0;
  }

  table,
  thead,
  tbody,
  tr,
  td,
  th {
    display: block;
    width: 100%;
    min-width: 0;
  }

  thead {
    display: none;
  }

  tbody {
    display: grid;
    gap: 8px;
  }

  tr {
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
  }

  td {
    display: grid;
    grid-template-columns: minmax(84px, 34%) minmax(0, 1fr);
    gap: 8px;
    padding: 5px 0;
    border-bottom: 0;
    overflow-wrap: anywhere;
  }

  td:empty {
    display: none;
  }

  td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
  }

  td .btn {
    justify-self: start;
  }

  .tabs {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .tabs::-webkit-scrollbar {
    display: none;
  }

  .tabs button {
    flex: 0 0 auto;
  }

  .btn {
    min-height: 40px;
  }

  .project-row h3 {
    font-size: 15px;
  }

  .check-list {
    max-height: 190px;
  }

  .inline-form {
    max-width: none;
  }

  .compact-multi {
    width: 100%;
  }

  .clients-table-wrap td[data-label="Объекты"] {
    grid-template-columns: 1fr;
  }

  .clients-table-wrap td[data-label="Объекты"]::before {
    margin-bottom: 2px;
  }

  .compact-multi .check-list {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 120;
    width: 100%;
    max-width: none;
    max-height: 280px;
    box-shadow: 0 14px 36px rgba(20, 30, 40, 0.18);
  }

  .toast-stack {
    right: 10px;
    bottom: 10px;
  }

  .receipt-modal {
    padding: 10px;
  }

  .receipt-modal-window {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }

  .receipt-modal-body {
    padding: 10px;
  }

  .danger-zone {
    align-items: stretch;
    flex-direction: column;
  }

  .form-modal {
    padding: 10px;
    align-items: start;
    padding-top: 76px;
  }

  .form-modal-window {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 92px);
  }

  .form-modal-body {
    padding: 12px;
    overflow: auto;
  }

  .split,
  .form-grid {
    grid-template-columns: 1fr;
  }
}
