:root {
  color-scheme: light;
  --ink: #17201b;
  --muted: #65716b;
  --line: #d9e0dc;
  --paper: #f7f6f0;
  --panel: #ffffff;
  --green: #19714f;
  --green-strong: #0f573c;
  --blue: #1f5a8a;
  --amber: #b26819;
  --shadow: 0 18px 55px rgba(24, 38, 31, 0.12);
}

.supplies-norms-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 20px;
}

.supplies-norms-tabs button {
  border: 1px solid var(--line, #d8e1de);
  background: #fff;
  color: var(--ink, #17211e);
  border-radius: 8px;
  padding: 10px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.supplies-norms-tabs button.active {
  background: var(--green, #177b55);
  border-color: var(--green, #177b55);
  color: #fff;
}

.supplies-norms-panel { overflow-x: auto; }
.supplies-norms-note { color: #65736d; margin: 0 0 16px; }
.supplies-apartment-head,
.supplies-apartment-row,
.supplies-norm-head,
.supplies-norm-row,
.supplies-report-head {
  display: grid;
  gap: 10px;
  align-items: center;
  min-width: 760px;
}
.supplies-apartment-head,
.supplies-apartment-row { grid-template-columns: 1.5fr 1fr 1fr 1.2fr auto; }
.supplies-apartment-head.linked,
.supplies-apartment-row.linked { grid-template-columns: 1.5fr 1fr 1fr .7fr 1.2fr; }
.supplies-norm-head,
.supplies-norm-row { grid-template-columns: minmax(220px, 1.6fr) repeat(4, minmax(110px, 1fr)); }
.supplies-report-head { grid-template-columns: 1.5fr repeat(5, 1fr); }
.supplies-apartment-head,
.supplies-norm-head,
.supplies-report-head {
  color: #65736d;
  font-size: 13px;
  font-weight: 800;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line, #d8e1de);
}
.supplies-apartment-row,
.supplies-norm-row {
  padding: 10px 12px;
  border-bottom: 1px solid #edf1ef;
}
.supplies-apartment-row input,
.supplies-apartment-row select,
.supplies-norm-row input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid var(--line, #d8e1de);
  border-radius: 7px;
  padding: 9px 10px;
  font: inherit;
  background: #fff;
}
.supplies-apartment-row button {
  white-space: nowrap;
  border: 0;
  border-radius: 7px;
  padding: 9px 12px;
  background: #177b55;
  color: #fff;
  font-weight: 700;
}
.supplies-norm-row div strong { display: block; }
.supplies-norm-row div span { color: #65736d; font-size: 12px; }
.supplies-apartment-empty,
.supplies-report-empty,
.supplies-report-example {
  color: #65736d;
  padding: 18px 12px;
  text-align: center;
}
.supplies-report-example { background: #f4f8f6; border-radius: 8px; margin-top: 12px; text-align: left; }

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body:not(.is-logged-in) {
  display: block;
}

button {
  font: inherit;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(25, 113, 79, 0.12), transparent 42%),
    var(--paper);
}

body.is-logged-in .login-screen {
  display: none;
}

body:not(.is-logged-in) .sidebar,
body:not(.is-logged-in) .workspace {
  display: none;
}

.login-card {
  width: min(430px, 100%);
  display: grid;
  gap: 16px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.login-brand {
  margin-bottom: 4px;
  color: var(--ink);
}

.login-brand span {
  color: var(--muted);
}

.login-card h1 {
  margin: 0;
  font-size: 30px;
}

.login-card label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.login-card input {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
}

.login-card .primary {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

.login-card .primary:disabled {
  cursor: wait;
  opacity: 0.65;
}

.login-error {
  min-height: 20px;
  margin: 0;
  color: #a8362b;
  font-size: 14px;
  font-weight: 700;
}

.login-hints {
  display: grid;
  gap: 4px;
  padding-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.sidebar {
  min-height: 100vh;
  padding: 24px 18px;
  background: #16241d;
  color: #f7fbf8;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 34px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f0c35b;
  color: #16241d;
  font-weight: 800;
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  margin-top: 3px;
  color: #b8c8bf;
  font-size: 13px;
}

.account-box {
  display: grid;
  gap: 7px;
  margin: -12px 0 22px;
  padding: 12px;
  border: 1px solid #324b3e;
  border-radius: 8px;
  background: #1d3026;
}

.account-box span {
  color: #b8c8bf;
  font-size: 12px;
}

.account-box strong {
  color: #ffffff;
}

.account-box button {
  min-height: 34px;
  border: 1px solid #3d574a;
  border-radius: 8px;
  background: transparent;
  color: #dbe7e0;
  cursor: pointer;
}

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

.role-static-label {
  min-height: 44px;
  display: grid;
  align-items: center;
  padding: 0 14px;
  border: 1px solid #3d574a;
  border-radius: 8px;
  background: #24382e;
  color: #ffffff;
  font-weight: 850;
}

.sidebar-divider {
  height: 1px;
  margin: 22px 0;
  background: #324b3e;
}

.role,
.section-link {
  position: relative;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #dbe7e0;
  text-align: left;
  cursor: pointer;
}

.nav-badge {
  display: none;
  position: absolute;
  top: 7px;
  right: 9px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #d93636;
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  line-height: 18px;
  text-align: center;
}

.nav-badge.visible {
  display: inline-block;
}

.role:hover,
.role.active,
.section-link:hover,
.section-link.active {
  background: #24382e;
  border-color: #3d574a;
  color: #ffffff;
}

.workspace {
  min-width: 0;
  padding: 28px;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

.topbar,
.role-panel,
.map-section {
  max-width: 1180px;
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green-strong);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 0;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.02;
}

h2 {
  margin-bottom: 10px;
  font-size: 28px;
  line-height: 1.12;
}

p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.status-pill {
  flex: 0 0 auto;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--blue);
  font-weight: 700;
}

.role-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 20px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.access-box {
  display: grid;
  align-content: center;
  gap: 6px;
  min-height: 118px;
  padding: 18px;
  border-radius: 8px;
  background: #edf7f1;
}

.access-box span,
.module small {
  color: var(--muted);
  font-size: 13px;
}

.access-box strong {
  color: var(--green-strong);
  font-size: 24px;
}

.grid {
  max-width: 1180px;
  margin: 0 auto 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.module {
  min-height: 118px;
  display: grid;
  align-content: space-between;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.module span {
  width: 34px;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green), var(--amber));
}

.module strong {
  font-size: 18px;
}

.module small {
  display: block;
}

.map-section {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 20px;
  padding-top: 8px;
}

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

.structure div {
  min-height: 54px;
  display: grid;
  place-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.64);
  color: #27332d;
  font-weight: 700;
  text-align: center;
}

.users-topbar,
.users-layout {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

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

.users-panel {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 38px rgba(30, 48, 55, 0.08);
}

.secondary-action {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

.users-table {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.employee-profile-panel {
  order: -1;
}

.employee-profile-table {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.employee-profile-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.1fr) minmax(145px, 0.8fr) minmax(145px, 0.8fr) minmax(130px, 0.75fr) 118px 96px;
  gap: 8px;
  align-items: center;
  min-height: 54px;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.employee-profile-row:last-child {
  border-bottom: 0;
}

.employee-profile-head {
  min-height: 38px;
  background: #edf7f1;
  color: var(--green-strong);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.employee-profile-row input,
.employee-profile-row select {
  min-width: 0;
  width: 100%;
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}

.employee-profile-row button {
  min-height: 34px;
  border: 1px solid var(--green);
  border-radius: 8px;
  background: var(--green);
  color: #ffffff;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.employee-name-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 6px;
  min-width: 0;
}

.employee-name-fields small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.users-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.1fr) minmax(125px, 0.72fr) minmax(140px, 0.82fr) 82px minmax(270px, 1.35fr);
  gap: 8px;
  align-items: center;
  min-height: 66px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.users-row > * {
  min-width: 0;
}

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

.users-row-head {
  min-height: 42px;
  background: #edf7f1;
  color: var(--green-strong);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.users-row-head span {
  white-space: nowrap;
}

.users-row strong,
.users-row small {
  display: block;
}

.users-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.employee-link {
  font-size: 11px;
  opacity: 0.78;
}

.system-user-row {
  background: #fbfcf8;
}

.user-status {
  width: max-content;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.training-status {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.25;
}

.training-status small {
  font-weight: 650;
}

.user-status.active {
  background: #e3f5ec;
  color: var(--green-strong);
}

.user-status.disabled {
  background: #f2e8e5;
  color: #8f352c;
}

.user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-start;
  align-items: center;
}

.user-password-reset {
  display: grid;
  grid-template-columns: minmax(105px, 1fr) auto auto;
  gap: 5px;
  flex: 1 1 100%;
  min-width: 245px;
}

.user-password-reset input {
  min-height: 28px;
  min-width: 0;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  font-size: 11px;
}

.user-actions button {
  min-height: 28px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

.user-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.system-access-note {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  width: 100%;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f5f7ef;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.user-form-panel h2 {
  margin-bottom: 16px;
}

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

.user-form .primary {
  align-self: end;
}

.user-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.user-form input,
.user-form select {
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.password-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
}

.password-field input {
  width: 100%;
}

.password-field button {
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.user-form .primary {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: #ffffff;
  font-weight: 850;
  cursor: pointer;
}

.user-form-note {
  margin-top: 14px;
  padding: 12px;
  border-radius: 8px;
  background: #f6f3e9;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

@media (max-width: 1100px) {
  .users-row {
    grid-template-columns: minmax(180px, 1.15fr) minmax(130px, 0.8fr) minmax(140px, 0.9fr) 82px 104px;
    gap: 7px;
    padding: 10px;
  }

  .users-row small,
  .training-status {
    font-size: 12px;
  }

  .user-actions button,
  .system-access-note {
    font-size: 10px;
    padding: 0 5px;
  }
}

@media (max-width: 900px) {
  .user-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .users-table {
    overflow: visible;
  }

  .users-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-width: 0;
    align-items: start;
  }

  .users-row-head {
    display: none;
  }

  .users-row .user-status {
    justify-self: start;
  }

  .users-row .user-actions,
  .users-row .system-access-note {
    grid-column: 2;
    justify-self: stretch;
  }

  .users-row .user-actions button {
    flex: 1 1 0;
  }
}

@media (max-width: 620px) {
  .users-panel {
    padding: 14px;
  }

  .users-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .users-row .user-actions,
  .users-row .system-access-note {
    grid-column: 1;
  }

  .user-form {
    grid-template-columns: minmax(0, 1fr);
  }
}

.action-log-panel {
  max-width: 1280px;
  margin: 16px auto 0;
}

.action-log-panel .panel-title {
  align-items: center;
  margin-bottom: 10px;
}

.action-log-filters {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.action-log-filters label {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.action-log-filters input {
  min-height: 32px;
  width: 142px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
}

.action-log-filters button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  padding: 0 10px;
  cursor: pointer;
}

.action-log {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.action-log-table {
  min-width: 980px;
}

.action-log-row {
  display: grid;
  grid-template-columns: 190px minmax(170px, 0.8fr) minmax(230px, 1.1fr) minmax(220px, 1fr) 150px;
  align-items: center;
  min-height: 34px;
  border-bottom: 1px solid #e8eceb;
}

.action-log-row:last-child {
  border-bottom: 0;
}

.action-log-row > div {
  min-width: 0;
  padding: 7px 10px;
  color: #42526b;
  font-size: 12px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.action-log-row > div span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.action-log-row.grouped {
  background: #fbfcff;
}

.action-log-head {
  min-height: 32px;
  background: #f0f1f3;
}

.action-log-head > div {
  color: #6b7280;
  font-size: 12px;
  font-weight: 900;
}

.action-log-row button {
  border: 0;
  background: transparent;
  color: #2f67ff;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  padding: 0;
  cursor: pointer;
}

.action-log-row button:hover {
  text-decoration: underline;
}

.payroll-screen {
  background: #f4f7f7;
}

.payroll-header,
.payroll-summary,
.payroll-layout {
  max-width: 1360px;
  margin: 0 auto;
}

.payroll-header {
  display: grid;
  grid-template-columns: minmax(220px, max-content) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.role-housekeeping .payroll-header {
  grid-template-columns: 1fr;
}

.role-housekeeping .payroll-actions:empty {
  display: none;
}

.role-housekeeping .payroll-layout {
  grid-template-columns: 1fr;
}

.role-housekeeping .payroll-side:empty {
  display: none;
}

.payroll-header h1 {
  font-size: 24px;
  line-height: 1.08;
  white-space: nowrap;
}

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

.actions-main,
.actions-secondary {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

.actions-secondary button {
  min-height: 32px;
  font-size: 12px;
}

.payroll-actions button,
.panel-title select {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 700;
}

.payroll-actions button {
  padding: 0 9px;
  cursor: pointer;
  white-space: nowrap;
  font-size: 12px;
}

.payroll-actions .primary {
  background: #0b1a76;
  color: #ffffff;
  border-color: #0b1a76;
}

.payroll-actions .active-action {
  background: #edf7f1;
  border-color: #19714f;
  color: #0f573c;
}

.payroll-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.payroll-summary article,
.payroll-main,
.payroll-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 38px rgba(30, 48, 55, 0.08);
}

.payroll-summary article {
  min-height: 82px;
  display: grid;
  gap: 3px;
  align-content: center;
  padding: 12px;
}

.payroll-summary span,
.payroll-summary small,
.line span,
.notice span,
.access-list span {
  color: var(--muted);
  font-size: 12px;
}

.payroll-summary strong {
  color: #0b1a76;
  font-size: 21px;
  line-height: 1.1;
}

@media (max-width: 1180px) {
  .payroll-summary {
    grid-template-columns: repeat(5, minmax(118px, 1fr));
  }

  .payroll-summary article {
    padding: 10px;
  }

  .payroll-summary strong {
    font-size: 19px;
  }
}

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

.payroll-layout.manager-planner-mode {
  grid-template-columns: 1fr;
}

.payroll-layout.manager-planner-mode .payroll-side {
  order: -1;
  grid-template-columns: 1fr;
}

.payroll-layout.manager-planner-mode .payroll-main {
  width: 100%;
}

.payroll-layout.tariff-mode {
  grid-template-columns: 1fr;
}

.payroll-layout.tariff-mode .payroll-side {
  display: none;
}

.payroll-layout.owner-full-mode {
  grid-template-columns: 1fr;
}

.payroll-layout.owner-full-mode .payroll-side {
  display: none;
}

.payroll-main {
  min-width: 0;
  padding: 18px;
}

.repairs-screen {
  display: none;
  min-width: 0;
  padding: 18px;
}

.repairs-screen.active {
  display: block;
}

.repairs-topbar {
  margin-bottom: 14px;
}

.repairs-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.repairs-tabs button,
.repair-form-actions button,
.repairs-row button,
.repair-dictionary-form button,
.repair-dictionary-row button {
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.repairs-tabs button.active,
.repair-form-actions .primary,
.repair-dictionary-form .primary {
  border-color: var(--green);
  background: var(--green);
  color: #ffffff;
}

.repairs-board {
  display: grid;
  gap: 12px;
}

.repair-district-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.repair-district-switch button {
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.repair-district-switch button.active {
  border-color: var(--green);
  background: #eff8f3;
  color: var(--green-strong);
}

.repairs-layout {
  display: grid;
  grid-template-columns: minmax(330px, 420px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.repairs-layout.single {
  grid-template-columns: 1fr;
}

.repair-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
}

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

.repair-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.repair-form .wide {
  grid-column: 1 / -1;
}

.repair-form input,
.repair-form select,
.repair-form textarea,
.repair-dictionary-form input,
.repair-dictionary-form select {
  width: 100%;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}

.repair-form textarea {
  min-height: 72px;
  resize: vertical;
}

.repair-form-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.repairs-table,
.repair-dictionary-list {
  display: grid;
  gap: 6px;
}

.repairs-row {
  display: grid;
  grid-template-columns: 72px 86px 70px 88px 92px 92px minmax(115px, 1fr) 82px 74px 58px 72px;
  gap: 4px;
  align-items: center;
  min-height: 38px;
  padding: 5px 6px;
  border: 1px solid var(--line);
  border-left: 4px solid #d6ded9;
  border-radius: 8px;
  background: #ffffff;
  font-size: 11px;
}

.repairs-row.repair-cleaning-row {
  grid-template-columns: 82px 86px 78px 96px 110px 110px minmax(180px, 1fr) 82px;
}

.repairs-row.repair-requests-row:not(.repair-cleaning-row) {
  grid-template-columns: 72px 86px 70px 88px 92px 92px minmax(115px, 1fr) 72px;
}

.repair-apartment-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 30px;
  margin-top: 8px;
  padding: 5px 8px;
  border: 1px solid #cfe0d7;
  border-radius: 8px;
  background: #eaf4ef;
  color: var(--green-strong);
  font-size: 12px;
  font-weight: 900;
}

.repair-apartment-group span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.repair-plan-group {
  margin-top: 4px;
}

.repair-plan-picker {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid #cfe0d7;
  border-radius: 8px;
  background: #f7fbf8;
}

.repair-plan-title-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.repair-plan-download {
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid #d6e0dc;
  border-radius: 7px;
  background: #f8fbf9;
  color: var(--ink);
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.repair-plan-download:hover {
  border-color: var(--green-strong);
  color: var(--green-strong);
}

.repair-plan-picker-head {
  display: grid;
  grid-template-columns: max-content max-content 1fr max-content;
  gap: 6px;
  align-items: center;
}

.repair-plan-picker-head strong {
  grid-column: 1 / 4;
  grid-row: 1;
  font-size: 26px;
}

.repair-plan-picker-head select {
  grid-row: 2;
  width: auto;
  min-width: 138px;
  max-width: 190px;
  min-height: 34px;
  font-size: 16px;
  font-weight: 900;
}

.repair-plan-picker-head select[data-plan-picker="district"] {
  grid-column: 1;
}

.repair-plan-picker-head select[data-plan-picker="apartment"] {
  grid-column: 2;
}

.repair-plan-picker-head button {
  grid-column: 4;
  grid-row: 1;
}

.repair-plan-picker-head strong,
.repair-plan-manual-title {
  color: var(--green-strong);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.repair-plan-picker select {
  width: 100%;
  min-height: 30px;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
}

.repair-plan-picker-head strong {
  font-size: 18px !important;
}

.repair-plan-picker-head select[data-plan-picker="district"],
.repair-plan-picker-head select[data-plan-picker="apartment"] {
  font-size: 13px !important;
  font-weight: 900;
}

.repair-plan-picker-head button {
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.repair-plan-picker.collapsed .repair-plan-picker-head {
  grid-template-columns: minmax(160px, 1fr) 92px;
}

.repair-plan-picker.collapsed .repair-plan-picker-head strong {
  grid-column: 1;
}

.repair-plan-picker.collapsed .repair-plan-picker-head button {
  grid-column: 2;
}

.repair-plan-picker.collapsed .repair-plan-picker-head select,
.repair-plan-picker.collapsed .repair-plan-pick-list {
  display: none;
}

.repair-plan-pick-list {
  display: grid;
  gap: 4px;
}

.repair-plan-pick-row {
  display: grid;
  grid-template-columns: 82px 76px 74px 92px 100px 110px minmax(180px, 1fr) 70px;
  gap: 4px;
  align-items: center;
  min-height: 34px;
  padding: 5px 6px;
  border: 1px solid var(--line);
  border-left: 4px solid #d6ded9;
  border-radius: 8px;
  background: #ffffff;
  font-size: 12px;
}

.repair-plan-pick-row > div {
  min-width: 0;
}

.repair-plan-pick-row > div {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.repair-cell-wrap {
  display: block;
  min-width: 0;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
  line-height: 1.2;
}

.repair-plan-row .repair-cell-wrap {
  display: block;
  min-width: 0;
  white-space: normal !important;
  overflow: visible;
}

.repair-plan-pick-row button {
  width: 100%;
  min-height: 27px;
  padding: 4px 6px;
  border: 1px solid var(--green);
  border-radius: 8px;
  background: var(--green);
  color: #ffffff;
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
}

.repair-plan-pick-row button:disabled {
  border-color: var(--line);
  background: #eef2f0;
  color: var(--muted);
  cursor: default;
}

.repair-plan-manual-title {
  margin-top: 4px;
  font-size: 22px;
  font-weight: 900;
}

.repairs-row > div,
.repairs-row > form {
  min-width: 0;
}

.repairs-row > div {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  line-height: 1.25;
}

.repair-cleaning-row:not(.repairs-head) > div:nth-child(7) {
  min-height: 28px;
}

.repairs-row button {
  width: 100%;
  min-height: 28px;
  padding: 4px 6px;
  font-size: 10px;
}

.repairs-head {
  min-height: 30px;
  border-left-color: var(--line);
  background: #edf2ef;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.repair-entry-row {
  position: sticky;
  top: 0;
  z-index: 2;
  align-items: center;
  border-color: #bfd4ca;
  border-left-color: var(--green);
  background: #f7fbf8;
  box-shadow: 0 8px 24px rgba(24, 38, 31, 0.08);
}

.repair-entry-row input,
.repair-entry-row select {
  width: 100%;
  min-width: 0;
  height: 34px;
  min-height: 34px;
  padding: 5px 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 11px;
}

.repair-entry-row > div {
  display: flex;
  align-items: center;
  min-height: 34px;
}

.repair-entry-row .repair-row-actions {
  display: flex;
  gap: 4px;
}

.repair-entry-row .repair-row-actions button {
  min-height: 28px;
  padding: 4px 6px;
  font-size: 10px;
}

.repair-entry-row .repair-row-actions .primary {
  border-color: var(--green);
  background: var(--green);
  color: #ffffff;
}

.supplies-screen {
  display: none;
}

.supplies-screen.active {
  display: block;
}

.supplies-topbar {
  display: grid;
  grid-template-columns: minmax(220px, max-content) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

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

.supplies-header-tabs:empty {
  display: none;
}

.supplies-board {
  display: grid;
  gap: 12px;
}

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

.supplies-summary article {
  display: grid;
  gap: 4px;
  min-height: 82px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.supplies-summary span,
.supplies-summary small,
.supplies-stock-row span,
.supplies-history-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.supplies-summary strong {
  color: var(--green-strong);
  font-size: 24px;
  line-height: 1;
}

.supplies-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.supplies-tabs button {
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.supplies-tabs button.active {
  border-color: var(--green);
  background: var(--green);
  color: #ffffff;
}

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

.supplies-form-card {
  display: grid;
  gap: 10px;
}

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

.supplies-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.supplies-form input,
.supplies-form select {
  width: 100%;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}

.supplies-form button {
  align-self: end;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--green);
  border-radius: 8px;
  background: var(--green);
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.supplies-purchase-form {
  display: grid;
  gap: 10px;
}

.supplies-inner-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.supplies-inner-tabs button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.supplies-inner-tabs button.active {
  border-color: var(--green);
  background: var(--green);
  color: #ffffff;
}

.supplies-purchase-meta {
  display: grid;
  grid-template-columns: 220px minmax(220px, 1fr);
  gap: 8px;
}

.supplies-purchase-meta label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.supplies-purchase-meta input,
.supplies-purchase-row input {
  width: 100%;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid #dde6e1;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}

.supplies-purchase-table {
  display: grid;
  gap: 5px;
}

.supplies-purchase-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.5fr) 110px 110px 110px 120px 120px;
  gap: 6px;
  align-items: center;
  min-height: 40px;
  padding: 6px 8px;
  border-bottom: 1px solid #eef2f0;
  background: #ffffff;
  font-size: 13px;
}

.supplies-purchase-row span {
  display: inline;
  margin-left: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.supplies-stock-row > div:first-child,
.supplies-purchase-row > div:first-child,
.supplies-correction-row > div:first-child,
.supplies-issue-row > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
}

.supplies-stock-row > div:first-child span,
.supplies-correction-row > div:first-child span,
.supplies-issue-row > div:first-child span {
  display: inline;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.supplies-stock-head,
.supplies-purchase-head,
.supplies-correction-row.head,
.supplies-issue-row.head {
  position: sticky;
  top: 0;
  z-index: 3;
}

.supplies-purchase-head {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #edf2ef;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.supplies-purchase-total {
  justify-self: end;
  padding: 8px 10px;
  border-radius: 8px;
  background: #eef7f2;
  color: var(--green-strong);
  font-size: 14px;
  font-weight: 900;
}

.supplies-correction-form {
  display: grid;
  gap: 10px;
}

.supplies-issue-form {
  display: grid;
  gap: 10px;
}

.supplies-issue-meta {
  display: grid;
  grid-template-columns: 180px 220px 180px minmax(220px, 1fr);
  gap: 8px;
}

.supplies-issue-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 150px;
  gap: 8px;
  align-items: center;
  min-height: 40px;
  padding: 5px 8px;
  border-bottom: 1px solid #eef2f0;
  font-size: 13px;
}

.supplies-issue-row span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.supplies-issue-row input {
  width: 100%;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid #dde6e1;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.supplies-issue-row.head {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #edf2ef;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.supplies-correction-table {
  display: grid;
  gap: 4px;
}

.supplies-correction-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 150px 150px;
  gap: 8px;
  align-items: center;
  min-height: 40px;
  padding: 5px 8px;
  border-bottom: 1px solid #eef2f0;
  font-size: 13px;
}

.supplies-correction-row span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.supplies-correction-row input {
  width: 100%;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid #dde6e1;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.supplies-correction-row.head {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #edf2ef;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.supplies-purchase-month-total {
  justify-self: start;
  padding: 8px 10px;
  border-radius: 8px;
  background: #eef7f2;
  color: var(--green-strong);
  font-size: 14px;
  font-weight: 850;
}

.supplies-purchase-docs {
  display: grid;
  gap: 10px;
}

.supplies-purchase-doc {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.supplies-purchase-doc-head,
.supplies-purchase-doc-item {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 110px 120px 110px 120px;
  gap: 8px;
  align-items: center;
}

.supplies-purchase-doc-head {
  grid-template-columns: minmax(180px, 1fr) 140px;
  color: var(--green-strong);
  font-weight: 900;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.supplies-purchase-doc-head > div:last-child {
  text-align: right;
}

.supplies-purchase-doc-head > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}

.supplies-purchase-doc-head > div:first-child span {
  white-space: nowrap;
}

.supplies-purchase-doc-head.open {
  padding-bottom: 2px;
}

.supplies-purchase-doc-chevron {
  display: inline-block;
  margin-right: 8px;
  color: var(--muted);
  font-size: 18px;
}

.supplies-purchase-doc p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.supplies-purchase-doc span,
.supplies-purchase-doc-item.head {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.supplies-purchase-doc-table {
  display: grid;
  gap: 4px;
}

.supplies-purchase-doc-item {
  min-height: 32px;
  padding: 5px 0;
  border-top: 1px solid #eef2f0;
  font-size: 13px;
}

.supplies-purchase-doc-item > div:first-child span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.supplies-history-table {
  display: grid;
  gap: 8px;
}

.supplies-history-doc {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.supplies-history-doc-head {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) max-content;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 48px;
  padding: 8px 10px;
  border: 0;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.supplies-history-doc-head > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.supplies-history-doc-head span,
.supplies-history-doc-head b {
  color: var(--muted);
  font-size: 11px;
}

.supplies-history-doc-head > div:last-child {
  color: var(--green-strong);
  font-weight: 900;
  white-space: nowrap;
}

.supplies-history-doc-body {
  display: grid;
  gap: 4px;
  padding: 0 10px 8px;
  border-top: 1px solid #eef2f0;
}

.supplies-history-doc-item {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 130px 110px;
  gap: 8px;
  align-items: center;
  min-height: 32px;
  padding: 5px 0;
  border-bottom: 1px solid #eef2f0;
  font-size: 13px;
}

.supplies-history-doc-item span:last-child {
  color: var(--muted);
  text-align: right;
}

.supplies-history-doc-body p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.supplies-purchase-doc-item.head {
  min-height: 28px;
  border-top: 0;
  text-transform: uppercase;
}

.supplies-dictionary-form {
  display: grid;
  gap: 5px;
}

.supplies-dictionary-head,
.supplies-dictionary-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.4fr) 90px 120px minmax(160px, 1fr) 82px;
  gap: 6px;
  align-items: center;
}

.supplies-dictionary-head {
  min-height: 32px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #edf2ef;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.supplies-dictionary-row {
  min-height: 42px;
  padding: 5px 0;
  border-bottom: 1px solid #eef2f0;
  background: #ffffff;
}

.supplies-dictionary-row.new {
  grid-template-columns: minmax(190px, 1.1fr) minmax(190px, 1.4fr) 90px 120px minmax(160px, 1fr);
  margin-top: 4px;
  padding: 8px;
  border: 1px dashed #cfe0d7;
  border-radius: 8px;
  background: #f8fbf9;
}

.supplies-dictionary-row label {
  display: grid;
  gap: 3px;
}

.supplies-dictionary-row span {
  display: none;
}

.supplies-dictionary-row input,
.supplies-dictionary-row select {
  width: 100%;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid #dde6e1;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}

.supplies-dictionary-delete {
  min-height: 32px;
  padding: 5px 8px;
  border: 1px solid #e3b7b7;
  border-radius: 7px;
  background: #fff8f8;
  color: #a33d3d;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.supplies-dictionary-delete:hover {
  background: #ffeaea;
}

.supplies-receipt-form {
  display: grid;
  gap: 10px;
}

.supplies-receipt-date {
  max-width: 220px;
}

.supplies-receipt-date label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.supplies-receipt-date small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.supplies-receipt-date input,
.supplies-receipt-row input {
  width: 100%;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}

.supplies-receipt-table {
  display: grid;
  gap: 5px;
}

.supplies-receipt-selected {
  display: grid;
  gap: 5px;
}

.supplies-receipt-group {
  margin-top: 6px;
  padding: 6px 8px;
  border: 1px solid #cfe0d7;
  border-radius: 8px;
  background: #eaf4ef;
  color: var(--green-strong);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.supplies-receipt-group.selected {
  border-color: #bdd4ff;
  background: #edf3ff;
  color: #1f3f90;
}

.supplies-receipt-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 80px 130px;
  gap: 6px;
  align-items: center;
  min-height: 38px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  font-size: 13px;
}

.supplies-receipt-head {
  min-height: 30px;
  background: #edf2ef;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.supplies-receipt-rest {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.supplies-receipt-rest summary {
  padding: 10px 12px;
  color: var(--green-strong);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.supplies-receipt-rest .supplies-receipt-table {
  padding: 0 8px 8px;
}

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

.supplies-receipt-actions button {
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.supplies-receipt-actions .primary {
  border-color: var(--green);
  background: var(--green);
  color: #ffffff;
}

.supplies-stock,
.supplies-history {
  display: grid;
  gap: 10px;
}

.supplies-stock-table,
.supplies-history-table {
  display: grid;
  gap: 5px;
}

.supplies-stock-table.collapsed {
  display: none;
}

.supplies-collapsible-head button {
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.supplies-stock-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.7fr) repeat(3, minmax(120px, 1fr));
  gap: 6px;
  align-items: center;
  min-height: 44px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-left: 4px solid #d6ded9;
  border-radius: 8px;
  background: #ffffff;
  font-size: 13px;
}

.supplies-stock-row.housekeeping-stock-row {
  grid-template-columns: minmax(190px, 1fr) minmax(120px, 160px);
}

.supplies-stock-row.needs-buy {
  border-left-color: #d58a00;
  background: #fff2bf;
  box-shadow: inset 0 0 0 1px #f0cf69;
}

.supplies-purchase-doc-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.supplies-purchase-doc-actions button {
  min-height: 34px;
  padding: 6px 12px;
}

.supplies-purchase-edit-form {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf8;
}

.supplies-purchase-edit-meta {
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(180px, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.supplies-purchase-edit-meta label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.supplies-purchase-edit-meta input,
.supplies-purchase-edit-row input {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.supplies-purchase-edit-table {
  display: grid;
  gap: 5px;
}

.supplies-purchase-edit-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.8fr) repeat(3, minmax(80px, 1fr));
  gap: 8px;
  align-items: center;
}

.supplies-purchase-edit-row > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
}

.supplies-purchase-edit-row > div:first-child span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.supplies-purchase-edit-row.head {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.supplies-dictionary-section {
  margin: 10px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

.supplies-dictionary-section > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  cursor: pointer;
  list-style: none;
  color: var(--ink);
  font-weight: 900;
  background: #edf5f0;
}

.supplies-dictionary-section > summary::-webkit-details-marker {
  display: none;
}

.supplies-dictionary-section > summary::before {
  content: "⌄";
  width: 16px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}

.supplies-dictionary-section:not([open]) > summary::before {
  content: "›";
}

.supplies-dictionary-section > summary span {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.supplies-dictionary-section > .supplies-dictionary-head,
.supplies-dictionary-section > .supplies-dictionary-row {
  margin-left: 10px;
  margin-right: 10px;
}

@media (max-width: 760px) {
  .supplies-purchase-edit-meta,
  .supplies-purchase-edit-row {
    grid-template-columns: 1fr 1fr;
  }

  .supplies-purchase-edit-row > div:first-child {
    grid-column: 1 / -1;
  }
}

.supplies-stock-row > div,
.supplies-history-row > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.supplies-stock-head,
.supplies-history-head {
  min-height: 32px;
  background: #edf2ef;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.supplies-history-row {
  display: grid;
  grid-template-columns: 110px minmax(170px, 1.5fr) 110px minmax(150px, 1.2fr) minmax(180px, 1.5fr);
  gap: 6px;
  align-items: center;
  min-height: 42px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  font-size: 13px;
}

.repair-plan-table {
  display: grid;
  gap: 6px;
}

.repair-plan-row {
  display: grid;
  grid-template-columns: 82px 76px 76px 86px 92px 96px minmax(170px, 1fr) 92px 74px 58px 68px;
  gap: 4px;
  align-items: center;
  min-height: 38px;
  padding: 5px 6px;
  border: 1px solid var(--line);
  border-left: 4px solid #d6ded9;
  border-radius: 8px;
  background: #ffffff;
  font-size: 12px;
}

.repair-plan-row > div {
  min-width: 0;
}

.repair-plan-row > div {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.repair-plan-head {
  min-height: 30px;
  border-left-color: var(--line);
  background: #edf2ef;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.repair-plan-entry {
  position: sticky;
  top: 0;
  z-index: 2;
  align-items: center;
  border-color: #bfd4ca;
  border-left-color: var(--green);
  background: #f7fbf8;
  box-shadow: 0 8px 24px rgba(24, 38, 31, 0.08);
}

.repair-plan-entry input,
.repair-plan-entry select,
.repair-plan-row select {
  width: 100%;
  min-width: 0;
  height: 34px;
  min-height: 34px;
  padding: 5px 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 11px;
}

.repair-plan-entry > div {
  display: flex;
  align-items: center;
  min-height: 34px;
}

.repair-plan-row button {
  width: 100%;
  min-height: 34px;
  padding: 5px 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
}

.repair-plan-entry .primary {
  border-color: var(--green);
  background: var(--green);
  color: #ffffff;
}

.repair-plan-row.urgency-Высокая {
  border-left-color: #ba3b32;
  background: #ffe8e5;
}

.repair-plan-row.urgency-Средняя {
  border-left-color: #d28b25;
  background: #fff2cc;
}

.repair-plan-row.urgency-Низкая {
  border-left-color: #2e8b63;
  background: #eff8f3;
}

.repair-plan-row.urgency-Срочная {
  border-left-color: #841b19;
  background: #ffe1df;
}

.repair-completed-month {
  display: grid;
  gap: 8px;
}

.repair-completed-month-head,
.repair-completed-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid #cfe0d7;
  border-radius: 8px;
  background: #eaf4ef;
  color: var(--green-strong);
  font-size: 12px;
  font-weight: 900;
}

.repair-completed-day-divider {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 4px 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.repair-completed-day-divider::before {
  content: "";
  flex: 1;
  height: 1px;
  background: #e7eeea;
}

.repair-completed-day-divider span {
  padding: 0 4px;
}

.repair-completed-day-divider::after {
  content: "";
  flex: 3;
  height: 1px;
  background: #e7eeea;
}

.repair-completed-month-head span,
.repair-completed-total span {
  color: var(--muted);
  font-size: 11px;
}

.repair-completed-month-head button {
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.repair-completed-table {
  display: grid;
  gap: 5px;
}

.repair-completed-table.collapsed {
  display: none;
}

.repair-completed-row {
  display: grid;
  grid-template-columns: 86px 78px 94px 90px 110px 78px minmax(180px, 1fr) 72px;
  gap: 4px;
  align-items: center;
  min-height: 38px;
  padding: 5px 6px;
  border: 1px solid var(--line);
  border-left: 4px solid #d6ded9;
  border-radius: 8px;
  background: #ffffff;
  font-size: 11px;
}

.repair-completed-row.editable {
  grid-template-columns: 86px 78px 94px 90px 110px 78px minmax(160px, 1fr) 78px 76px;
}

.repair-completed-row > div {
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  line-height: 1.25;
}

.repair-completed-row input {
  width: 100%;
  min-width: 0;
  height: 32px;
  min-height: 32px;
  padding: 5px 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 11px;
}

.repair-completed-row button {
  width: 100%;
  min-height: 32px;
  padding: 5px 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
}

.repair-completed-head {
  min-height: 30px;
  border-left-color: var(--line);
  background: #edf2ef;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.repair-completed-total {
  justify-content: flex-end;
  background: #f7fbf8;
}

.repair-completed-total strong {
  min-width: 110px;
  text-align: right;
}

.repair-completed-row.urgency-Высокая {
  border-left-color: #ba3b32;
  background: #ffe8e5;
}

.repair-completed-row.urgency-Средняя {
  border-left-color: #d28b25;
  background: #fff2cc;
}

.repair-completed-row.urgency-Низкая {
  border-left-color: #2e8b63;
  background: #eff8f3;
}

.repair-completed-row.urgency-Срочная {
  border-left-color: #841b19;
  background: #ffe1df;
}

.repair-plan-pick-row.urgency-Высокая {
  border-left-color: #ba3b32;
  background: #ffe8e5;
}

.repair-plan-pick-row.urgency-Средняя {
  border-left-color: #d28b25;
  background: #fff2cc;
}

.repair-plan-pick-row.urgency-Низкая {
  border-left-color: #2e8b63;
  background: #eff8f3;
}

.repair-plan-pick-row.urgency-Срочная {
  border-left-color: #841b19;
  background: #ffe1df;
}

.repairs-row strong,
.repairs-row span,
.repair-plan-row strong,
.repair-plan-row span,
.repair-plan-pick-row strong,
.repair-plan-pick-row span,
.repair-completed-row strong,
.repair-completed-row span,
.repair-dictionary-row strong,
.repair-dictionary-row span {
  display: block;
}

.repairs-row span,
.repair-plan-row span,
.repair-plan-pick-row span,
.repair-completed-row span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.repair-dictionary-row span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.repairs-row.urgency-Высокая {
  border-left-color: #ba3b32;
  background: #ffe8e5;
}

.repairs-row.urgency-Средняя {
  border-left-color: #d28b25;
  background: #fff2cc;
}

.repairs-row.urgency-Низкая {
  border-left-color: #2e8b63;
  background: #eff8f3;
}

.repairs-row.urgency-Срочная {
  border-left-color: #841b19;
  background: #ffe1df;
}

.repair-chip {
  display: inline-block;
  width: fit-content;
  padding: 4px 7px;
  border-radius: 999px;
  background: #eef4f0;
  color: var(--green-strong);
  font-size: 11px;
  font-weight: 900;
}

.repair-urgency-note {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  line-height: 1.1;
}

.repair-message {
  width: fit-content;
  padding: 8px 10px;
  border: 1px solid #cfe4d9;
  border-radius: 8px;
  background: #eff8f3;
  color: var(--green-strong);
  font-size: 13px;
  font-weight: 800;
}

.repairs-empty {
  grid-column: 1 / -1;
  padding: 14px 10px;
}

.repair-dictionary-form {
  grid-template-columns: repeat(7, minmax(0, 1fr)) 92px;
  align-items: end;
}

.repair-dictionary-form label {
  display: grid;
  gap: 5px;
  min-width: 0;
  min-height: 68px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.repair-dictionary-form select,
.repair-dictionary-form input {
  width: 100%;
  min-width: 0;
  height: 40px;
  min-height: 40px;
  max-height: 40px;
  line-height: 1.2;
  box-sizing: border-box;
}

.repair-dictionary-form button {
  height: 40px;
  min-height: 40px;
  max-height: 40px;
  box-sizing: border-box;
}

.repair-dictionary-form label.hidden {
  display: none;
}

.repair-dictionary-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(160px, 1fr) 92px 82px;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  font-size: 13px;
}

.repair-dictionary-room {
  display: grid;
  gap: 6px;
  border: 1px solid #dce8e1;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.repair-dictionary-room summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  background: #eaf4ef;
  color: var(--green-strong);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.repair-dictionary-room summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.repair-dictionary-compact-list {
  display: grid;
  gap: 5px;
  padding: 8px;
}

.repair-dictionary-compact-row {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 38px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
  font-size: 12px;
}

.repair-dictionary-compact-row strong,
.repair-dictionary-compact-row span {
  display: block;
}

.repair-dictionary-compact-row span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.repair-dictionary-work-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.repair-dictionary-work-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 3px 5px 3px 8px;
  border: 1px solid #dce8e1;
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  font-size: 11px;
  font-style: normal;
}

.repair-dictionary-work-chip em {
  color: var(--green-strong);
  font-style: normal;
  font-weight: 900;
}

.repair-dictionary-work-chip button {
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 999px;
  background: #eef2f0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 1280px) {
  .repairs-layout {
    grid-template-columns: 1fr;
  }

  .repairs-row {
    grid-template-columns: 68px 82px 68px 82px 86px 86px minmax(100px, 1fr) 76px 68px 54px 68px;
    font-size: 10px;
  }

  .repairs-row.repair-cleaning-row {
    grid-template-columns: 76px 78px 70px 82px 92px 92px minmax(120px, 1fr) 74px;
  }

  .repair-plan-row {
    grid-template-columns: 76px 72px 72px 82px 86px 86px minmax(120px, 1fr) 86px 68px 54px 64px;
    font-size: 12px;
  }

  .repair-plan-picker-head,
  .repair-plan-pick-row,
  .repair-dictionary-compact-row {
    grid-template-columns: 1fr;
  }

  .repair-plan-picker-head strong,
  .repair-plan-picker-head select,
  .repair-plan-picker-head button {
    grid-column: 1;
    grid-row: auto;
  }

  .repair-dictionary-form {
    grid-template-columns: repeat(7, minmax(110px, 1fr)) 92px;
  }
}

.owner-schedule-collapse {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.owner-schedule-collapse-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.owner-schedule-collapse-head h3 {
  margin: 2px 0 0;
  font-size: 18px;
}

.owner-schedule-collapse-head button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  padding: 7px 10px;
  cursor: pointer;
}

.owner-schedule-collapse-content.collapsed {
  display: none;
}

.owner-schedule-table {
  display: contents;
}

.owner-payroll-alerts {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.owner-payroll-alerts:empty {
  display: none;
}

.owner-payroll-accruals {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.owner-payroll-accruals:empty {
  display: none;
}

.owner-accrual-board {
  display: grid;
  gap: 14px;
}

.owner-accrual-section {
  padding: 12px;
  overflow: visible;
}

.owner-accrual-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.owner-accrual-head h3 {
  margin: 2px 0 0;
  font-size: 18px;
}

.owner-accrual-head > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.owner-accrual-table {
  position: relative;
  overflow-x: visible;
  border: 1px solid #eef2f0;
  border-radius: 8px;
}

.month-adjustments-summary-list {
  display: grid;
  gap: 6px;
}

.month-adjustments-summary-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px;
  gap: 12px;
  align-items: center;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid #eef2f0;
  border-radius: 8px;
  background: #fbfcfb;
}

.month-adjustments-summary-row div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.month-adjustments-summary-row strong,
.month-adjustments-summary-total strong {
  color: var(--ink);
  font-size: 13px;
}

.month-adjustments-summary-row span,
.month-adjustments-summary-total span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.month-adjustments-summary-row b {
  justify-self: end;
  color: var(--blue);
  font-size: 13px;
  white-space: nowrap;
}

.month-adjustments-summary-row.subtract b {
  color: #a33a2b;
}

.month-adjustments-summary-total {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #eef2f0;
}

.owner-accrual-row {
  display: grid;
  min-width: 0;
  border-bottom: 1px solid #eef2f0;
}

.admin-accrual-table .owner-accrual-row {
  grid-template-columns: minmax(98px, 1.5fr) repeat(11, minmax(46px, 0.72fr));
}

.manager-accrual-table .owner-accrual-row {
  grid-template-columns: minmax(98px, 1.5fr) 40px minmax(72px, 0.9fr) repeat(10, minmax(44px, 0.7fr));
}

.manager-payroll-accrual-table .owner-accrual-row {
  grid-template-columns: minmax(110px, 1.2fr) repeat(9, minmax(58px, 0.9fr));
}

.owner-accrual-row:last-child {
  border-bottom: 0;
}

.owner-accrual-row > div {
  display: grid;
  align-content: center;
  position: relative;
  min-height: 34px;
  min-width: 0;
  padding: 5px 4px;
  border-right: 1px solid #eef2f0;
  font-size: 11px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.owner-accrual-row > div:last-child {
  border-right: 0;
}

.owner-accrual-row-head {
  background: #eef3f1;
  color: #46534d;
  font-weight: 900;
}

.owner-accrual-row-head > div {
  font-size: 10.5px;
}

.owner-accrual-total-row {
  background: #f7fbf8;
}

.owner-accrual-total-row > div {
  min-height: 36px;
  font-weight: 900;
}

.owner-accrual-total-row > div:first-child {
  color: var(--green-strong);
}

.owner-accrual-row strong {
  color: var(--ink);
}

.payment-mark-cell {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  width: 100%;
  min-height: 26px;
  padding: 3px 5px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.payment-mark-cell span,
.payment-mark-cell strong,
.payment-mark-cell b {
  white-space: nowrap;
}

.payment-mark-cell span {
  min-width: 0;
}

.payment-mark-cell:hover {
  border-color: #cbd8d2;
  background: #f7faf8;
}

.payment-mark-cell.paid {
  border-color: #b9dfc7;
  background: #e8f7ee;
  color: #135c35;
}

.payment-mark-cell.paid strong,
.payment-mark-cell.paid b {
  color: #135c35;
}

.payment-mark-cell b {
  font-size: 12px;
}

.commented-money {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
}

.comment-dot {
  display: inline-grid;
  place-items: center;
  position: relative;
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border-radius: 999px;
  background: #0b1a76;
  color: #ffffff;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  cursor: help;
}

.comment-tooltip {
  display: none;
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 20;
  width: max-content;
  max-width: 260px;
  transform: translateX(-50%);
  padding: 8px 9px;
  border: 1px solid #dce5e1;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  text-align: left;
  white-space: normal;
}

.comment-dot:hover .comment-tooltip,
.comment-dot:focus .comment-tooltip {
  display: block;
}

.panel-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.panel-title select {
  padding: 0 12px;
}

.schedule-table {
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.tariff-table {
  border: 0;
  overflow: visible;
}

.apartments-board {
  display: grid;
  gap: 14px;
}

.apartment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.apartment-logic {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.apartment-logic span {
  padding: 7px 9px;
  border-radius: 8px;
  background: #f1f5f4;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.bnovo-status {
  width: fit-content;
  max-width: 100%;
  padding: 7px 10px;
  border: 1px solid #c8e1d5;
  border-radius: 8px;
  background: #f3faf7;
  color: #2f6b4f;
  font-size: 12px;
  font-weight: 900;
}

.bnovo-status-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.bnovo-status-row button {
  width: fit-content;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  padding: 7px 10px;
  cursor: pointer;
}

.bnovo-status-row button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.bnovo-status.error {
  border-color: #f0c9c9;
  background: #fff6f6;
  color: #9c3d3d;
}

.apartment-set-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 12px;
}

.apartment-set-card {
  display: grid;
  gap: 12px;
}

.apartment-set-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.apartment-set-card h3 {
  margin: 0;
  font-size: 20px;
}

.apartment-rule {
  display: grid;
  gap: 8px;
}

.apartment-rule div {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: 8px;
  background: #f7faf8;
}

.apartment-rule span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.apartment-directory-table {
  overflow: hidden;
}

.apartment-row {
  display: grid;
  grid-template-columns: minmax(210px, 1.35fr) minmax(95px, 0.65fr) minmax(165px, 1fr) minmax(165px, 1fr) 92px;
  min-height: 48px;
  border-bottom: 1px solid #eef2f0;
}

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

.apartment-row > div {
  display: grid;
  align-content: center;
  min-width: 0;
  padding: 9px 10px;
  border-right: 1px solid #eef2f0;
  font-size: 13px;
}

.apartment-row > div:last-child {
  border-right: 0;
}

.apartment-row select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  padding: 8px 9px;
}

.apartment-row-head {
  min-height: 40px;
  background: #eef3f1;
  color: #46534d;
  font-weight: 900;
}

.history-table-mode {
  border: 0;
  overflow: visible;
}

.payroll-layout.history-mode {
  grid-template-columns: 1fr;
}

.payroll-layout.history-mode .payroll-side {
  display: none;
}

.payroll-layout.history-mode .payroll-main > .panel-title {
  display: none;
}

.history-board {
  display: grid;
  gap: 14px;
}

.history-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.review-submit-panel {
  align-items: center;
}

.review-submit-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.review-submit-actions button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
}

.review-submit-actions button.primary {
  border-color: #19714f;
  background: #19714f;
  color: #ffffff;
}

.history-filter h2 {
  margin-bottom: 0;
  font-size: 24px;
}

.history-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.history-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.history-pills button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.history-pills button.active {
  border-color: #0b1a76;
  background: #eef1ff;
  color: #0b1a76;
}

.history-layout,
.salary-history-report {
  display: grid;
  gap: 14px;
}

.salary-history-filters {
  display: grid;
  grid-template-columns: minmax(90px, 0.55fr) repeat(2, minmax(130px, 0.8fr)) minmax(150px, 1fr) minmax(170px, 1.1fr);
  gap: 10px;
}

.salary-history-filters label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.salary-history-filters select {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  padding: 7px 9px;
}

.salary-history-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.salary-history-summary article {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #e5ece8;
  border-radius: 8px;
  background: #f8fbf9;
}

.salary-history-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.salary-history-summary strong {
  color: var(--ink);
  font-size: 17px;
  font-weight: 950;
}

.salary-history-sections {
  display: grid;
  gap: 14px;
}

.salary-history-section {
  display: grid;
  gap: 10px;
  padding: 14px;
  overflow: hidden;
}

.salary-history-section h3 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
}

.salary-history-table {
  display: grid;
  overflow-x: auto;
  border: 1px solid #e8eeee;
  border-radius: 8px;
}

.salary-history-row {
  display: grid;
  min-width: max-content;
  border-bottom: 1px solid #edf2ef;
  background: #ffffff;
}

.salary-history-row:last-child {
  border-bottom: 0;
}

.salary-history-row > div {
  display: grid;
  align-content: center;
  min-width: 0;
  min-height: 38px;
  padding: 7px 8px;
  border-right: 1px solid #edf2ef;
  color: #26312d;
  font-size: 12px;
  font-weight: 750;
}

.salary-history-row > div:last-child {
  border-right: 0;
}

.salary-history-row strong {
  color: var(--ink);
  font-weight: 950;
}

.salary-history-head {
  background: #eef3f1;
}

.salary-history-head > div {
  color: #52605a;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.salary-history-table.housekeeping .salary-history-row {
  grid-template-columns: 96px 126px repeat(9, 82px) 92px 92px 96px;
}

.salary-history-table.management .salary-history-row {
  grid-template-columns: 96px 126px 58px 118px repeat(8, 82px) 92px 92px 96px;
}

.salary-history-table.manager-payroll .salary-history-row {
  grid-template-columns: 96px repeat(9, 88px) 96px;
}

.history-table {
  display: grid;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.history-row {
  display: grid;
  grid-template-columns: minmax(100px, 0.85fr) minmax(120px, 1fr) minmax(120px, 1fr) minmax(120px, 1fr) 58px repeat(5, minmax(82px, 0.75fr)) minmax(88px, 0.8fr);
  gap: 0;
  width: 100%;
  min-height: 48px;
  border: 0;
  border-bottom: 1px solid #eef2f0;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: default;
}

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

.history-row > div {
  display: grid;
  align-content: center;
  min-width: 0;
  padding: 9px 10px;
  border-right: 1px solid #eef2f0;
  font-size: 13px;
}

.history-row > div:last-child {
  border-right: 0;
}

.history-head {
  min-height: 40px;
  background: #eef3f1;
  color: #46534d;
  font-weight: 900;
  cursor: default;
}

.history-row.active {
  background: #f7fbff;
  box-shadow: inset 4px 0 0 #0b1a76;
}

.cleaning-load-board {
  display: grid;
  gap: 14px;
}

.cleaning-load-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.cleaning-load-summary article {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(27, 48, 42, 0.06);
}

.cleaning-load-summary span,
.cleaning-load-summary small {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.cleaning-load-summary strong {
  display: block;
  margin: 8px 0 4px;
  color: #0b1a76;
  font-size: 28px;
  line-height: 1.08;
  overflow-wrap: normal;
}

.cleaning-load-table {
  overflow: hidden;
}

.cleaning-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.1fr) 110px 90px minmax(120px, 0.9fr) minmax(130px, 0.9fr) minmax(180px, 1.3fr);
  min-height: 48px;
  border-bottom: 1px solid #eef2f0;
}

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

.cleaning-row > div {
  display: grid;
  align-content: center;
  min-width: 0;
  padding: 9px 10px;
  border-right: 1px solid #eef2f0;
  font-size: 13px;
}

.cleaning-row > div:last-child {
  border-right: 0;
}

.cleaning-head {
  min-height: 40px;
  background: #eef3f1;
  color: #46534d;
  font-weight: 900;
}

.muted-cell {
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 900px) {
  .history-filter {
    align-items: stretch;
    flex-direction: column;
  }

  .history-controls {
    justify-content: flex-start;
  }

  .cleaning-load-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .cleaning-load-summary strong {
    font-size: 26px;
  }

  .cleaning-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .cleaning-head {
    display: none;
  }

  .cleaning-row > div {
    border-right: 0;
  }

  .cleaning-row > div:nth-child(1) {
    grid-column: 1 / -1;
    background: #f7fbff;
    font-size: 15px;
  }

  .cleaning-row > div:nth-child(6) {
    grid-column: 1 / -1;
  }

  .apartment-head {
    align-items: stretch;
    flex-direction: column;
  }

  .apartment-logic {
    justify-content: flex-start;
  }

  .apartment-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .apartment-row-head {
    display: none;
  }

  .apartment-row > div {
    border-right: 0;
  }

  .apartment-row > div:nth-child(1) {
    grid-column: 1 / -1;
    background: #f7fbff;
    font-size: 15px;
  }
}

.status-chip {
  width: fit-content;
  padding: 5px 8px;
  border-radius: 999px;
  background: #edf7f1;
  color: #0f573c;
  font-size: 12px;
  font-weight: 900;
}

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

.history-detail h2 {
  margin-bottom: 0;
  font-size: 26px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.detail-meta span {
  padding: 6px 8px;
  border-radius: 8px;
  background: #f1f5f4;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.detail-lines {
  display: grid;
  gap: 7px;
}

.detail-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #eef2f0;
}

.detail-line div {
  display: grid;
  gap: 3px;
}

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

.history-note {
  padding: 10px;
  border-radius: 8px;
  background: #eef1ff;
  color: #0b1a76;
  font-size: 13px;
  line-height: 1.35;
}

.review-board {
  display: grid;
  gap: 18px;
}

.review-view-switch {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}

.review-view-switch h2 {
  margin: 2px 0 0;
  font-size: 21px;
}

.review-section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.review-section-title h2 {
  margin: 0;
  font-size: 21px;
}

.review-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 12px;
}

.review-card-grid.managers {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.review-card {
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.review-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
}

.review-card-head-actions {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.review-card-download {
  min-height: 28px;
  padding: 5px 8px;
  border: 1px solid #d6e0dc;
  border-radius: 7px;
  background: #f8fbf9;
  color: var(--ink);
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.review-card-download:hover {
  border-color: #0b1a76;
  color: #0b1a76;
}

.review-card-head h3 {
  margin: 0 0 2px;
  font-size: 18px;
}

.review-card-head span:not(.status-chip) {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.review-card .status-chip {
  padding: 4px 7px;
  font-size: 11px;
}

.review-meta {
  min-height: 22px;
  display: flex;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.review-card .detail-lines {
  align-content: start;
  gap: 2px;
}

.review-card .detail-line {
  padding: 6px 0;
  font-size: 14px;
}

.review-card .detail-line span {
  font-size: 11px;
}

.review-total {
  min-height: 48px;
  align-items: center;
  margin-top: 8px;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: #eef1ff;
}

.review-total > strong {
  color: #0b1a76;
  font-size: 17px;
}

.review-advance,
.review-payout {
  min-height: 44px;
  align-items: center;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
}

.review-advance {
  background: #fff6e6;
}

.review-advance.paid,
.review-payout.paid {
  background: #e8f7ee;
  box-shadow: inset 0 0 0 1px #b9dfc7;
  cursor: pointer;
}

.review-advance.paid strong,
.review-payout.paid strong {
  color: #135c35;
  white-space: nowrap;
}

.review-advance:not(.paid),
.review-payout:not(.paid) {
  cursor: pointer;
}

.review-payout {
  background: #e9f6ef;
}

.review-payout > strong {
  color: var(--green-strong);
  font-size: 17px;
}

.table-row {
  display: grid;
  grid-template-columns: 116px 54px repeat(var(--month-days, 31), minmax(20px, 1fr)) 46px;
  min-width: 0;
  border-bottom: 1px solid #e8eeeb;
}

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

.table-row > div {
  min-height: 36px;
  display: grid;
  place-items: center;
  padding: 4px 3px;
  border-right: 1px solid #e8eeeb;
  font-size: 11px;
  text-align: center;
  min-width: 0;
  overflow: hidden;
}

.table-row > div:nth-child(1),
.table-row > div:nth-child(2) {
  position: sticky;
  z-index: 2;
  background: inherit;
}

.table-row > div:nth-child(1) {
  left: 0;
}

.table-row > div:nth-child(2) {
  left: 116px;
}

.table-head > div:nth-child(1),
.table-head > div:nth-child(2) {
  z-index: 3;
  background: #eef3f1;
}

.table-row > div:last-child {
  border-right: 0;
}

.employee-block {
  grid-template-rows: repeat(var(--employee-rows, 3), minmax(36px, auto));
  border-top: 6px solid #f0f4f2;
  background: #ffffff;
}

.employee-block > div {
  min-height: 36px;
}

.employee-block .person {
  grid-row: 1 / span var(--employee-rows, 3);
  grid-column: 1;
  justify-content: start;
  align-content: center;
  padding-left: 12px;
  color: #17201b;
  font-size: 14px;
  font-weight: 900;
  text-align: left;
}

.employee-block .work-type {
  position: sticky;
  left: 116px;
  z-index: 2;
  background: #ffffff;
  color: #334139;
  font-weight: 700;
}

.table-head {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #eef3f1;
  color: #334139;
  font-weight: 800;
}

.header-spacer {
  background: #f9fbfa;
}

.header-spacer > div {
  min-height: 12px;
  padding: 0;
  border-right-color: transparent;
}

.table-row .person {
  justify-content: start;
  padding-left: 8px;
  font-weight: 800;
}

.muted-row {
  background: #fbfcfb;
}

.group-row {
  background: #16241d;
  color: #ffffff;
  font-weight: 900;
}

.group-row > div {
  min-height: 36px;
  border-color: #30483b;
}

.dot {
  width: 18px;
  height: 18px;
  justify-self: center;
  align-self: center;
  border-radius: 50%;
}

.dot.on {
  background: #19714f;
}

.dot.strong {
  background: #b26819;
}

.mark {
  color: #0b1a76;
  font-weight: 900;
}

.shift-cell,
.money-cell,
.empty-cell {
  cursor: pointer;
  font-weight: 800;
}

.shift-cell {
  color: #19714f;
  background: #edf7f1;
}

.money-cell {
  color: #0b1a76;
  background: #eef1ff;
}

.empty-cell {
  color: transparent;
}

.empty-cell:hover {
  color: #7c8a83;
  background: #f5f8f7;
}

.payroll-side {
  display: grid;
  align-content: start;
  gap: 12px;
}

.payroll-card {
  padding: 18px;
}

.line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 36px;
  border-bottom: 1px solid #eef2f0;
}

.line.total {
  margin-top: 8px;
  padding-top: 8px;
  border-bottom: 0;
}

.line.total strong {
  color: #0b1a76;
  font-size: 22px;
}

.notice {
  display: grid;
  gap: 5px;
  padding: 12px 0;
  border-bottom: 1px solid #eef2f0;
}

.notice:last-child {
  border-bottom: 0;
}

.review-alert-card {
  border-color: #f0c9c9;
  background: #fff8f8;
}

.manager-revision-card {
  border-color: #f0d8aa;
  background: #fffaf0;
}

.review-alert-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.review-alert-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  border: 1px solid #efcccc;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 8px 10px;
}

.review-alert-item > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.review-alert-item span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.review-alert-item small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.review-alert-item button {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  background: #0b1a76;
  color: #ffffff;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  padding: 7px 10px;
  cursor: pointer;
}

.review-alert-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.review-alert-actions button {
  white-space: nowrap;
}

.review-alert-item strong {
  color: #b42323;
  font-size: 12px;
  white-space: nowrap;
}

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

.compact {
  background: #f8fbfa;
}

.editor-card {
  background: #fbfdfd;
}

.planner-card {
  display: grid;
  grid-template-columns: minmax(240px, 290px) max-content minmax(330px, 1fr);
  gap: 12px;
  padding: 12px;
  align-items: start;
}

.planner-head,
.planner-row,
.planner-days-row {
  display: grid;
  gap: 8px;
}

.planner-head {
  grid-column: 1;
  grid-template-columns: 1fr;
  align-content: start;
}

.planner-head h2 {
  margin-bottom: 0;
  font-size: 20px;
}

.planner-help {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
}

.planner-row {
  grid-column: 1;
  grid-template-columns: 1fr;
  align-content: start;
  margin-top: -4px;
}

.planner-days-row {
  grid-column: 2;
  grid-row: 1 / span 2;
  grid-template-columns: max-content;
  align-items: start;
  justify-items: start;
  gap: 0;
}

.planner-calendar-block {
  display: grid;
  gap: 8px;
  width: 326px;
  max-width: 326px;
  min-width: 326px;
}

.editor-card label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.editor-card input,
.editor-card select,
.editor-card textarea,
.adjustment input,
.accrual-grid input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.planner-accruals {
  display: grid;
  grid-column: 3;
  grid-row: 1 / span 2;
  gap: 8px;
  margin-top: 0;
  padding-left: 10px;
  border-left: 1px solid #eef2f0;
}

.planner-accruals .eyebrow {
  margin-bottom: 0;
}

.accrual-workarea {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: start;
}

.accrual-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  align-items: stretch;
}

.accrual-item {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) 34px minmax(150px, 1fr);
  gap: 6px;
  align-items: end;
}

.accrual-item label {
  gap: 4px;
  font-size: 12px;
}

.accrual-item.danger input {
  color: #9f2d20;
}

.accrual-item button {
  width: 34px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: #7b8780;
  font-weight: 900;
  cursor: pointer;
}

.accrual-item button.has-comment {
  border-color: #0b1a76;
  background: #eef1ff;
  color: #0b1a76;
}

.accrual-comment {
  min-height: 38px;
  display: grid;
  align-content: center;
  padding: 7px 8px;
  border-radius: 8px;
  background: #f8fbfa;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.accrual-comment.empty-comment {
  border: 1px dashed #d9e0dc;
  color: #9aa6a0;
}

.secondary-save {
  min-height: 36px;
  border: 1px solid #0b1a76;
  border-radius: 8px;
  background: #ffffff;
  color: #0b1a76;
  font-weight: 800;
  cursor: pointer;
}

.accrual-history {
  display: none;
}

.accrual-history .history-row,
.accrual-history .history-empty {
  padding: 8px;
  border-radius: 8px;
  background: #f8fbfa;
  font-size: 12px;
  line-height: 1.35;
}

.accrual-history .history-row {
  display: grid;
  gap: 2px;
}

.accrual-history .history-row strong {
  color: #0b1a76;
}

.accrual-history .history-row span,
.accrual-history .history-empty {
  color: var(--muted);
}

.history-empty {
  border: 1px dashed #d9e0dc;
}

.editor-card textarea {
  min-height: 78px;
  resize: vertical;
}

.wide-primary {
  width: 326px;
  max-width: 326px;
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  background: #0b1a76;
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

.planner-toolbar {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  margin: 0;
  width: 326px;
}

.planner-toolbar button {
  flex: 1 1 0;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.month-picker {
  display: grid;
  grid-template-columns: repeat(7, 44px);
  gap: 4px;
  width: max-content;
  margin-bottom: 0;
}

.month-picker button {
  aspect-ratio: auto;
  width: 44px;
  min-height: 35px;
  min-width: 0;
  border: 1px solid #dce5e0;
  border-radius: 6px;
  background: #ffffff;
  color: #49564f;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.calendar-weekday,
.calendar-empty {
  width: 44px;
  min-height: 20px;
}

.calendar-weekday {
  display: grid;
  place-items: center;
  color: #6f7d76;
  font-size: 11px;
  font-weight: 900;
}

.calendar-weekday.weekend-label {
  color: #9f6a20;
}

.month-picker button.weekend-day {
  background: #fff8ed;
  border-color: #eed9b7;
}

.month-picker button.weekend-day.active {
  background: #b26819;
  border-color: #b26819;
  color: #ffffff;
}

.month-picker button:hover {
  border-color: #8eb7a5;
  background: #f1f8f5;
}

.month-picker button.active {
  border-color: #19714f;
  background: #19714f;
  color: #ffffff;
}

.planner-total {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 6px 0 0;
  width: 326px;
  max-width: 326px;
  min-width: 326px;
}

.planner-card .save-status {
  grid-column: 1 / -1;
}

.planner-total > span {
  display: grid;
  gap: 2px;
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  align-content: center;
  padding: 7px;
  border-radius: 8px;
  background: #f1f5f4;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  overflow: hidden;
}

.planner-daily-amount {
  display: none;
  position: relative;
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  min-width: 0;
  padding: 0;
  border-radius: 8px;
  background: #f1f5f4;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  text-align: center;
  overflow: hidden;
}

.planner-daily-amount input {
  position: absolute;
  top: 2px;
  left: 7px;
  right: 7px;
  width: calc(100% - 14px);
  min-width: 0;
  max-width: 100%;
  height: 19px;
  line-height: 19px;
  border: 0;
  padding: 0;
  background: transparent;
  color: #0b1a76;
  font: inherit;
  font-size: 16px;
  font-weight: 900;
  text-align: center;
  appearance: textfield;
  -moz-appearance: textfield;
}

.planner-daily-amount input::-webkit-outer-spin-button,
.planner-daily-amount input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.planner-daily-amount input:focus {
  outline: 1px solid #b8c4d8;
  border-radius: 5px;
  background: #ffffff;
}

.planner-daily-amount small {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 12px;
  white-space: nowrap;
  font-weight: 400;
}

.planner-total strong {
  color: #0b1a76;
  font-size: 16px;
}

.rate-source {
  display: grid;
  gap: 4px;
  margin: 2px 0 0;
  padding: 10px;
  border-radius: 8px;
  background: #eef1ff;
}

.rate-source strong {
  color: #0b1a76;
  font-size: 14px;
}

.rate-source span,
.tariff-row span,
.tariff-row small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

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

.tariff-row {
  display: grid;
  gap: 3px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eef2f0;
}

.tariff-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.tariff-inputs {
  display: grid;
  gap: 8px;
  margin-top: 6px;
}

.tariff-inputs.housekeepers {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tariff-inputs.managers {
  grid-template-columns: 1fr;
}

.tariff-input {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.tariff-input input {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.tariff-board {
  display: grid;
  gap: 14px;
}

.tariff-intro {
  display: grid;
  gap: 8px;
}

.tariff-tabs {
  display: flex;
  align-items: end;
  gap: 4px;
  padding-left: 10px;
  border-bottom: 1px solid var(--line);
}

.tariff-tabs button {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #eef3f1;
  color: #4b5b52;
  font-weight: 800;
  cursor: pointer;
}

.tariff-tabs button.active {
  min-height: 48px;
  background: #ffffff;
  color: #0b1a76;
  box-shadow: 0 -8px 24px rgba(30, 48, 55, 0.06);
}

.tariff-tab-panel {
  display: grid;
  gap: 14px;
}

.tariff-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 14px;
}

.tariff-section {
  box-shadow: none;
}

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

.tariff-rule {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.tariff-rule span,
.tariff-rule label {
  color: var(--muted);
  font-size: 13px;
}

.tariff-rule label {
  display: grid;
  gap: 5px;
  font-weight: 700;
}

.tariff-rule input {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.manager-rate-list {
  display: grid;
  gap: 10px;
}

.month-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
}

.month-toolbar label,
.month-toolbar span,
.field-like {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.month-stepper {
  display: inline-grid;
  grid-template-columns: 32px minmax(112px, auto) 32px;
  align-items: center;
  width: max-content;
  max-width: 100%;
  min-height: 36px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
}

.month-stepper-label {
  grid-column: 1 / -1;
  padding: 0 10px 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.month-stepper button {
  width: 32px;
  height: 34px;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.month-stepper button:hover {
  background: #eef4ff;
}

.month-stepper strong {
  padding: 0 10px;
  text-align: center;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 900;
}

.manager-rate-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.1fr) minmax(76px, 0.55fr) minmax(150px, 1fr) repeat(5, minmax(96px, 0.7fr));
  gap: 8px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.manager-rate-row > div {
  display: grid;
  gap: 3px;
}

.manager-rate-row span,
.manager-rate-row small,
.manager-rate-row label {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.manager-rate-row small {
  color: #2f5f48;
  font-weight: 800;
}

.manager-rate-row label {
  display: grid;
  gap: 5px;
  font-weight: 800;
}

.manager-rate-row input,
.manager-rate-row select,
.manager-rate-row textarea {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.manager-rate-row textarea {
  min-height: 62px;
  resize: vertical;
}

.manager-rate-row select {
  cursor: pointer;
}

.checkbox-field {
  justify-items: start;
}

.checkbox-field input {
  width: 24px;
  min-height: 24px;
  accent-color: #0b1a76;
}

.manager-comment {
  grid-column: 1 / -1;
}

.training-plan {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid #dfe8e3;
  border-radius: 8px;
  background: #f6faf8;
}

.training-plan.is-hidden {
  display: none;
}

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

.training-plan-head div {
  display: grid;
  gap: 3px;
}

.training-plan-head strong {
  color: var(--ink);
  font-size: 14px;
}

.training-plan-head button,
.training-shift-row button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  padding: 6px 9px;
  cursor: pointer;
}

.training-shift-list {
  display: grid;
  gap: 7px;
}

.training-shift-row {
  display: grid;
  grid-template-columns: 34px minmax(96px, 0.45fr) minmax(180px, 1fr) 82px;
  gap: 8px;
  align-items: end;
}

.training-shift-row > span {
  display: grid;
  place-items: center;
  min-height: 34px;
  border-radius: 8px;
  background: #e8f0ed;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.manager-rate-row input:disabled {
  background: #f3f5f4;
  color: #9aa6a0;
  cursor: not-allowed;
}

.temporary-housekeepers {
  gap: 10px;
}

.temporary-employee-form {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 150px 130px 160px 110px;
  gap: 8px;
  align-items: end;
}

.temporary-manager-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 170px 110px;
  gap: 8px;
  align-items: end;
}

.temporary-employee-form input,
.temporary-employee-form select,
.temporary-manager-form input,
.temporary-manager-form select,
.temporary-employee-row input,
.temporary-employee-row select {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}

.temporary-employee-form button,
.temporary-manager-form button,
.temporary-employee-row button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 9px;
  background: #ffffff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.temporary-employee-form .primary {
  border-color: #0b1a76;
  background: #0b1a76;
  color: #ffffff;
}

.temporary-manager-form .primary {
  border-color: #0b1a76;
  background: #0b1a76;
  color: #ffffff;
}

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

.temporary-employee-row {
  display: grid;
  grid-template-columns: minmax(185px, 1.05fr) 150px repeat(6, minmax(82px, 0.65fr)) 74px;
  gap: 8px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.temporary-employee-row > div {
  display: grid;
  gap: 3px;
}

.temporary-employee-name label {
  gap: 3px;
}

.temporary-employee-name input {
  min-height: 32px;
}

.temporary-employee-row span,
.temporary-employee-row label {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.temporary-employee-row label {
  display: grid;
  gap: 4px;
  font-weight: 800;
}

.tariff-save-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.tariff-save-row button {
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  padding: 8px 14px;
  background: #0b1a76;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.tariff-save-row button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.tariff-save-row span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.save-status {
  margin-top: 0;
  padding: 10px;
  border-radius: 8px;
  background: #edf7f1;
  color: #305243;
  font-size: 13px;
  line-height: 1.35;
}

.adjustment {
  display: grid;
  grid-template-columns: 1fr 116px;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  border-bottom: 1px solid #eef2f0;
}

.adjustment:last-child {
  border-bottom: 0;
}

.adjustment span {
  color: var(--muted);
  font-size: 14px;
}

.adjustment.danger input {
  color: #9f2d20;
}

.decision {
  display: grid;
  gap: 7px;
  padding: 12px 0;
  border-bottom: 1px solid #eef2f0;
}

.decision:last-child {
  border-bottom: 0;
}

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

.decision small {
  color: #7a857f;
  font-size: 12px;
}

.decision div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.decision button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.empty-note {
  padding: 12px 0;
  color: var(--muted);
  font-size: 14px;
}

.manager-payroll-board {
  display: grid;
  gap: 12px;
  width: 100%;
}

.manager-payroll-head,
.manager-payroll-section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.manager-payroll-head h2,
.manager-payroll-section-head h3 {
  margin: 2px 0 0;
  font-size: 18px;
}

.manager-payroll-total {
  display: grid;
  justify-items: end;
  gap: 2px;
  min-width: 180px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #eef6f2;
}

.manager-payroll-month {
  display: grid;
  gap: 4px;
  min-width: 150px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.manager-payroll-month .month-stepper {
  width: 100%;
}

.manager-payroll-total span,
.manager-payroll-total-lines span,
.manager-payroll-history-row small {
  color: var(--muted);
  font-size: 12px;
}

.manager-payroll-total strong {
  color: var(--blue);
  font-size: 22px;
}

.manager-payroll-lines {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.manager-payroll-rules-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.manager-payroll-rules-content.collapsed {
  display: none;
}

.manager-payroll-history-content.collapsed {
  display: none;
}

.manager-payroll-rules-grid label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.manager-payroll-rules-grid input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 8px;
}

.manager-payroll-line,
.manager-payroll-other-row {
  min-width: 0;
}

.manager-payroll-line {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) 128px minmax(120px, 0.7fr) 110px;
  gap: 8px;
  align-items: center;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid #edf1ef;
  border-radius: 8px;
  background: #fbfcfb;
}

.manager-payroll-line div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.manager-payroll-line strong {
  color: var(--ink);
  font-size: 13px;
}

.manager-payroll-line small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.manager-payroll-line b {
  grid-column: 4;
  justify-self: end;
  color: var(--blue);
  font-size: 14px;
  white-space: nowrap;
}

.readonly-cell {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.manager-payroll-line.danger {
  background: #fff7f5;
  border-color: #f2c9c2;
}

.manager-payroll-line.danger b,
.manager-payroll-line.danger input {
  color: #a33a2b;
}

.manager-payroll-comment {
  display: grid;
  gap: 5px;
  grid-column: 1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.manager-payroll-line input,
.manager-payroll-line select,
.manager-payroll-field-comment,
.manager-payroll-comment textarea,
.manager-payroll-other-row select,
.manager-payroll-other-row input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  padding: 8px 9px;
}

.manager-payroll-field-comment {
  min-height: 32px;
  padding: 6px 8px;
  font-size: 10px;
  font-weight: 700;
}

.manager-payroll-comment textarea {
  resize: vertical;
  min-height: 56px;
  font-weight: 700;
}

.manager-payroll-section-head button,
.manager-payroll-actions button,
.manager-payroll-other-row button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  padding: 7px 10px;
  cursor: pointer;
}

.manager-payroll-actions button.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #ffffff;
}

.manager-payroll-other-list {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.manager-payroll-other-row {
  display: grid;
  grid-template-columns: 34px minmax(120px, 0.75fr) 96px minmax(150px, 1fr) 104px;
  gap: 8px;
  align-items: center;
}

.manager-payroll-other-row button {
  display: grid;
  place-items: center;
  min-width: 34px;
  padding: 0;
  font-size: 17px;
  line-height: 1;
}

.manager-payroll-total-lines,
.manager-payroll-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}

.manager-payroll-actions small {
  color: var(--muted);
  font-size: 12px;
}

.manager-payroll-history {
  display: grid;
  gap: 8px;
}

.manager-payroll-history-row {
  display: grid;
  grid-template-columns: 140px 130px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 34px;
  border-top: 1px solid #eef2f0;
  color: var(--ink);
  font-size: 13px;
}

.manager-payroll-history-row strong {
  color: var(--blue);
}

@media (max-width: 900px) {
  body {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: auto;
  }

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

  .role-panel,
  .map-section {
    grid-template-columns: 1fr;
  }

  .grid,
  .structure,
  .payroll-summary,
  .supplies-summary,
  .supplies-forms,
  .payroll-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .payroll-layout {
    grid-template-columns: 1fr;
  }

  .planner-head,
  .planner-row,
  .planner-days-row,
  .accrual-workarea,
  .accrual-grid,
  .manager-rate-row,
  .manager-payroll-lines,
  .manager-payroll-line,
  .manager-payroll-rules-grid,
  .manager-payroll-other-row,
  .manager-payroll-history-row,
  .supplies-form,
  .supplies-purchase-meta,
  .supplies-dictionary-head,
  .supplies-dictionary-row,
  .tariff-rules,
  .tariff-inputs.housekeepers {
    grid-template-columns: 1fr;
  }

  .manager-payroll-comment {
    grid-column: 1;
  }

  .planner-accruals {
    grid-column: 1;
    grid-row: auto;
    padding-left: 0;
    padding-top: 8px;
    border-left: 0;
    border-top: 1px solid #eef2f0;
  }

  .month-picker {
    grid-template-columns: repeat(7, 40px);
  }

  .planner-toolbar {
    width: 292px;
  }
}

@media (max-width: 560px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .workspace {
    padding: 16px 10px;
    width: 100%;
    max-width: 100%;
  }

  .topbar {
    display: grid;
  }

  .supplies-topbar {
    grid-template-columns: minmax(0, 1fr);
  }

  .supplies-actions,
  .supplies-tabs {
    justify-content: start;
  }

  nav,
  .grid,
  .structure,
  .payroll-summary,
  .supplies-summary,
  .supplies-forms {
    grid-template-columns: 1fr;
  }

  .payroll-header,
  .panel-title {
    display: grid;
  }

  .payroll-header {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .payroll-actions {
    justify-content: start;
  }

  .payroll-screen .panel-title {
    gap: 8px;
    margin-bottom: 10px;
  }

  .payroll-screen .panel-title h2 {
    font-size: 18px;
    line-height: 1.2;
  }

  .role-housekeeping .payroll-header {
    margin-bottom: 10px;
  }

  .role-housekeeping .payroll-header h1 {
    font-size: 21px;
    white-space: normal;
  }

  .role-housekeeping .month-stepper {
    width: 100%;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
  }

  .role-housekeeping .schedule-table {
    max-width: calc(100vw - 20px);
  }

  .role-housekeeping .table-row {
    grid-template-columns: 92px 42px repeat(var(--month-days, 31), 24px) 42px;
    min-width: max-content;
  }

  .role-housekeeping .table-row > div {
    min-height: 32px;
    padding: 3px 2px;
    font-size: 10px;
  }

  .role-housekeeping .table-row > div:nth-child(2) {
    left: 92px;
  }

  .role-housekeeping .employee-block .work-type {
    left: 92px;
    z-index: 2;
    background: #ffffff;
  }


  .role-housekeeping .employee-block {
    grid-template-rows: repeat(var(--employee-rows, 3), minmax(32px, auto));
  }

  .role-housekeeping .employee-block .person {
    padding-left: 7px;
    font-size: 12px;
  }

  .role-housekeeping .employee-block .work-type {
    font-size: 10px;
  }

  .repair-panel {
    padding: 10px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .repairs-screen,
  .repairs-layout,
  .repairs-board,
  .repairs-table,
  .repair-plan-table,
  .repair-completed-table {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .repairs-screen h1,
  .repairs-screen h2,
  .repairs-screen h3,
  .repairs-screen .panel-title {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .repair-panel .panel-title {
    gap: 8px;
  }

  .repair-panel .panel-title h2 {
    font-size: 18px;
    line-height: 1.2;
  }

  .repairs-head.repair-cleaning-row {
    display: none;
  }

  .repairs-row.repair-cleaning-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    align-items: stretch;
    padding: 8px;
    font-size: 12px;
  }

  .repairs-table-cleaning .repairs-row.repair-requests-row:not(.repairs-head) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
  }

  .repairs-table-cleaning .repairs-row.repair-requests-row > div:nth-child(4),
  .repairs-table-cleaning .repairs-row.repair-requests-row > div:nth-child(5),
  .repairs-table-cleaning .repairs-row.repair-requests-row > div:nth-child(6) {
    min-height: 32px;
    display: flex;
    align-items: center;
  }

  .repairs-row.repair-cleaning-row > div,
  .repairs-row.repair-cleaning-row > form {
    min-height: 34px;
    align-content: center;
  }

  .repairs-row.repair-cleaning-row > div:nth-child(7),
  .repairs-row.repair-cleaning-row > div:nth-child(8) {
    grid-column: 1 / -1 !important;
  }

  .repairs-row.repair-cleaning-row input,
  .repairs-row.repair-cleaning-row select {
    width: 100%;
    min-width: 0;
    min-height: 34px;
    font-size: 12px;
  }

  .repairs-row.repair-cleaning-row > div:nth-child(7) input {
    min-height: 40px;
    height: 40px;
  }

  .repairs-row.repair-cleaning-row .repair-comment-field {
    grid-column: 1 / -1 !important;
    width: 100%;
  }

  .repairs-row.repair-cleaning-row .repair-comment-field input {
    width: 100%;
    min-height: 40px;
    height: 40px;
  }

  .repairs-row.repair-cleaning-row .repair-row-actions {
    grid-column: 1 / -1 !important;
    width: 100%;
  }

  /* Repairs stay inside the phone viewport: each desktop row becomes a compact card. */
  .repairs-table:not(.repairs-table-cleaning) .repairs-head,
  .repair-plan-head,
  .repair-completed-head {
    display: none;
  }

  .repairs-table:not(.repairs-table-cleaning) .repairs-row,
  .repair-plan-row,
  .repair-completed-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    min-width: 0;
    padding: 8px;
    font-size: 12px;
  }

  .repairs-table:not(.repairs-table-cleaning) .repairs-row > div,
  .repair-plan-row > div,
  .repair-completed-row > div {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .repairs-table:not(.repairs-table-cleaning) .repairs-row > div:nth-child(7),
  .repairs-table:not(.repairs-table-cleaning) .repairs-row > div:nth-child(8),
  .repair-plan-row > div:nth-child(7),
  .repair-plan-row > div:nth-child(11),
  .repair-completed-row > div:nth-child(7),
  .repair-completed-row > div:nth-child(8),
  .repair-completed-row.editable > div:nth-child(9) {
    grid-column: 1 / -1;
  }

  .repair-plan-row select,
  .repair-completed-row input,
  .repair-completed-row button {
    width: 100%;
    min-width: 0;
  }

  .repair-dictionary-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .repair-dictionary-form button {
    width: 100%;
  }

  .supplies-stock-head,
  .supplies-history-head {
    display: none;
  }

  .supplies-stock-row,
  .supplies-history-row,
  .supplies-receipt-row,
  .supplies-purchase-row,
  .supplies-purchase-doc-head,
  .supplies-purchase-doc-item,
  .supplies-dictionary-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    font-size: 12px;
  }

  .supplies-receipt-head,
  .supplies-purchase-head,
  .supplies-dictionary-head {
    display: none;
  }

  .supplies-dictionary-row span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 850;
  }

  .supplies-receipt-row > div:first-child {
    grid-column: 1 / -1;
  }

  .supplies-stock-row > div:first-child,
  .supplies-history-row > div:nth-child(5),
  .supplies-purchase-row > div:first-child,
  .supplies-dictionary-row label:first-of-type,
  .supplies-dictionary-row label:nth-of-type(4) {
    grid-column: 1 / -1;
  }

  .repair-apartment-group {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .actions-main {
    justify-content: start;
  }

  .month-picker {
    grid-template-columns: repeat(7, 32px);
  }

  .month-picker button {
    width: 32px;
    min-height: 28px;
  }
}
