:root {
  --bg: #f5f6f8;
  --panel: #ffffff;
  --text: #1f2328;
  --muted: #667085;
  --line: #d7dde7;
  --accent: #1769e0;
  --accent-dark: #1254b3;
  --good: #e7f4df;
  --warn: #fff2cc;
  --bad: #fce4d6;
  --blue: #ddebf7;
  --soft: #eef2f7;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
}

header {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  padding: 16px 24px;
  position: sticky;
  top: 0;
  z-index: 4;
}

h1 { margin: 0; font-size: 20px; }
h2 { margin: 0 0 12px; font-size: 17px; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.auth-screen {
  max-width: 420px;
  margin: 72px auto;
}

.account-menu {
  display: none;
  gap: 8px;
  align-items: center;
}
.account-popover {
  display: none;
  position: fixed;
  right: auto;
  top: 0;
  z-index: 30;
  min-width: 220px;
  max-width: calc(100vw - 16px);
  overflow: auto;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  box-shadow: 0 12px 36px rgba(16, 24, 40, .18);
  padding: 12px;
}

.account-popover button {
  width: 100%;
  margin-top: 10px;
}

main {
  max-width: 1480px;
  margin: 0 auto;
  padding: 20px 24px 36px;
}

section { margin-bottom: 18px; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px;
}

.grid {
  display: grid;
  grid-template-columns: 240px 180px 1fr;
  gap: 12px;
  align-items: end;
}

label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 9px 10px;
  font: inherit;
  background: #fff;
  color: var(--text);
}

select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 9px 10px;
  font: inherit;
  background: #fff;
  color: var(--text);
}

.field-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.field-row input,
.field-row select {
  min-width: 0;
}

.icon-button {
  width: 34px;
  min-width: 34px;
  padding: 0;
}

.icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.action-button {
  width: 28px;
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  border-radius: 4px;
}

.action-button:disabled {
  cursor: default;
}

.action-button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

textarea {
  min-height: 150px;
  resize: vertical;
  line-height: 1.35;
  font-family: Consolas, "Courier New", monospace;
}

button, .download {
  border: 0;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 12px;
  text-decoration: none;
  font-weight: 600;
}

button:hover, .download:hover { background: var(--accent-dark); }
button.secondary { background: #475467; }
button.secondary:hover { background: #344054; }
button.ghost { background: var(--soft); color: var(--text); }
button.ghost:hover { background: #dfe5ee; }
button.nav-active { background: #475467; color: #fff; }
button.nav-active:hover { background: #344054; }
button.danger { background: #b42318; }
button.danger:hover { background: #912018; }
button:disabled { opacity: .6; cursor: wait; }

.toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 12px;
}

.controls-grid {
  display: grid;
  grid-template-columns: 240px 190px 150px 1fr;
  gap: 12px;
  align-items: end;
  margin-bottom: 12px;
}

.inline-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(44px, 1fr));
  gap: 6px;
}

.inline-fields input {
  min-width: 0;
}

.inline-check {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.inline-check input[type="checkbox"] {
  width: auto;
  flex: 0 0 auto;
  margin: 0;
}

.small {
  font-size: 12px;
}

.supplier-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px 14px;
  align-items: end;
  margin-bottom: 12px;
}

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

.supplier-form-grid textarea {
  min-height: 104px;
}

.settings-panel {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  background: #fff;
  margin-top: 12px;
}

.settings-panel h3 {
  margin: 0 0 10px;
  font-size: 14px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  min-width: 180px;
}

.brand-link img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  display: block;
}

.brand-link span {
  font-weight: 700;
  font-size: 16px;
}

.settings-tabs {
  float: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 190px;
  margin: 4px 18px 16px 0;
  border-right: 1px solid var(--line);
  padding-right: 12px;
  padding-bottom: 10px;
}

.account-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 24px; }
.account-navigation { display: flex; flex-direction: column; gap: 8px; border-right: 1px solid var(--line); padding-right: 12px; align-self: start; }
.account-navigation button { width: 100%; justify-content: flex-start; }
[data-account-tab][hidden], [data-account-panel][hidden] { display: none !important; }
.account-content { min-width: 0; }
.account-permission-group { min-width: 0; margin: 0; padding: 10px 0; border: 0; border-bottom: 1px solid var(--line); }
.account-permission-group legend { font-weight: 600; padding: 0; }
.account-permission-group label { display: flex; align-items: start; gap: 8px; }
#rolesDialog .modal-dialog { max-width: 760px; }
#rolesDialog .controls-grid { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; }
#rolesDialog #roleNameInput { max-width: 360px; }
#rolePermissionsList { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; width: 100%; }
#rolePermissionsList label { display: flex; width: 100%; min-width: 0; white-space: normal; overflow-wrap: anywhere; align-items: flex-start; }
#rolePermissionsList input { flex-shrink: 0; }
@media (max-width: 720px) {
  .account-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .account-navigation { flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 12px; }
  .account-navigation button { width: auto; }
  #rolePermissionsList { grid-template-columns: minmax(0, 1fr); }
}

.settings-tabs button {
  justify-content: flex-start;
  width: 100%;
}

.settings-tab-panel {
  margin-left: 208px;
  min-height: 240px;
}

.settings-tab-panel > .embedded-section {
  border: 0;
  padding: 0;
  margin: 0;
}

#settingsIntegrationsPanel > .settings-tab-panel {
  margin-left: 0;
  min-width: 0;
}

.language-table { table-layout: fixed; width: 100%; }
.language-table th, .language-table td { overflow-wrap: anywhere; }
.language-table th:last-child { width: 48px; }
.language-table input { width: 100%; min-width: 0; }

.department-bonus { margin: 12px 0; }
.department-bonus summary { cursor: pointer; overflow-wrap: anywhere; }
.group-bonus-dialog { width: min(720px, calc(100vw - 24px)); }
.group-bonus-dialog textarea { width: 100%; min-height: 80px; height: 96px; }
.group-bonus-dialog .controls-grid { grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); }
.group-bonus-dialog h3 { overflow-wrap: anywhere; }

.ofd-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.ofd-settings-grid > div { min-width: 0; }

.ofd-settings-grid .wide {
  grid-column: 1 / -1;
}

.ofd-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.ofd-status-item {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px;
  background: var(--soft);
  min-width: 0;
}

.ofd-status-item strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.ofd-register-controls {
  display: grid;
  grid-template-columns: minmax(105px, 135px) minmax(130px, 160px) minmax(150px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.ofd-register-controls label {
  margin: 0;
}

#settingsSection::after {
  content: "";
  display: block;
  clear: both;
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(260px, 1fr);
  gap: 12px;
  align-items: start;
}

.accounting-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.accounting-settings-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 12px;
}

.accounting-settings-card h4 {
  margin: 0 0 10px;
}

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

.accounting-section-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.accounting-quick-row input {
  min-width: 120px;
  padding: 8px;
}

.accounting-quick-row td {
  background: #fbfcff;
}

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

.section-head h2 {
  margin-bottom: 4px;
}

.sticky-order-total {
  position: sticky;
  top: 73px;
  z-index: 3;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.order-total-box {
  min-width: 180px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  background: #fbfcfe;
  text-align: right;
}

.order-total-box span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.order-total-box strong {
  font-size: 18px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.summary-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  background: #fff;
}

.summary-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}

.summary-card strong {
  font-size: 20px;
}

.salary-groups,
.accounting-groups {
  display: grid;
  gap: 12px;
}

.accounting-section-editor {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  padding: 10px;
  margin: 0 0 12px;
}

.accounting-section-editor-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.accounting-section-editor-title {
  font-weight: 700;
}

.accounting-section-editor-list {
  display: grid;
  gap: 6px;
}

.accounting-section-editor-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto auto;
  gap: 6px;
  align-items: center;
}
.accounting-personnel-review-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(220px, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
}
.accounting-personnel-review-row > * { min-width: 0; }
.accounting-personnel-review-row > span { overflow-wrap: anywhere; }
@media (max-width: 700px) {
  .accounting-personnel-review-row { grid-template-columns: minmax(0, 1fr); }
  .accounting-personnel-review-row > button { justify-self: end; }
}

.accounting-section-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 10px;
}

.accounting-section-toolbar {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 12px;
}

.salary-group-card,
.accounting-group-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}

.salary-group-head,
.accounting-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
}

.salary-group-head h4,
.accounting-group-head h4 {
  margin: 0;
  font-size: 16px;
}

.salary-group-totals {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.salary-group-totals span {
  white-space: nowrap;
  background: #eef2f7;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
}

.accounting-group-total,
.accounting-group-totals {
  color: var(--muted);
  font-weight: 600;
  margin-left: auto;
}

.accounting-group-totals {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  font-size: 13px;
}

.accounting-group-totals span {
  white-space: nowrap;
  background: #eef2f7;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
}

.accounting-overview-breakdown {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.accounting-overview-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 12px;
}

.accounting-overview-card h4 {
  margin: 0 0 10px;
  font-size: 16px;
}

.accounting-overview-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 7px 0;
  border-top: 1px solid #eef2f7;
  cursor: pointer;
}

.accounting-overview-row:first-of-type {
  border-top: 0;
}

.accounting-overview-row:hover {
  background: #f8fafc;
}

.accounting-overview-row strong {
  white-space: nowrap;
}

.accounting-recent-card {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 12px;
}

.accounting-recent-card h4 {
  margin: 0 0 10px;
  font-size: 16px;
}

.accounting-cashflow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.accounting-cashflow-item {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
  padding: 10px;
}

.accounting-cashflow-item span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 5px;
}

.accounting-cashflow-item strong {
  font-size: 18px;
}

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

.accounting-recent-row {
  display: grid;
  grid-template-columns: 130px 120px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid #eef2f7;
}

.accounting-recent-row:first-child {
  border-top: 0;
}

.accounting-recent-row strong {
  white-space: nowrap;
}

.accounting-recent-row .money-negative {
  color: #b42318;
}

.salary-advance-mismatch {
  color: #b42318;
  font-weight: 700;
}

.accounting-recent-row .money-positive {
  color: #047857;
}

@media (max-width: 800px) {
  .accounting-recent-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

.salary-group-card .table-wrap,
.accounting-group-card .table-wrap {
  border: 0;
  border-radius: 0;
}

.salary-report-profile {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) repeat(3, minmax(140px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.salary-report-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 12px;
}

.salary-report-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}

.salary-report-card strong {
  font-size: 18px;
}

.salary-calc-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.salary-calc-preview div {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  padding: 10px;
}

.salary-calc-preview span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.segmented-control {
  display: grid;
  width: 100%;
  padding: 4px;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
}

.segmented-control button {
  width: auto;
  min-width: 0;
  min-height: 36px;
  background: #fff;
  color: var(--text);
  border: 1px solid #d5dce8;
  border-radius: 4px;
  box-shadow: none;
  white-space: nowrap;
}

.segmented-control button.active {
  background: #344054;
  border-color: #344054;
  color: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.12);
}

.segmented-control.three-options {
  grid-template-columns: repeat(3, 1fr);
}

.segmented-control.two-options {
  grid-template-columns: repeat(2, 1fr);
}

#accountingEntryDialog .controls-grid .wide {
  grid-column: 1 / -1;
}

#accountingEntryDialog .modal-dialog.salary-work-dialog .controls-grid {
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) minmax(170px, 0.8fr) minmax(170px, 0.8fr);
  align-items: start;
}

#accountingEntryDialog .modal-dialog.salary-work-dialog [data-accounting-field="shifts"] {
  grid-column: 1;
  grid-row: 1;
}

#accountingEntryDialog .modal-dialog.salary-work-dialog [data-accounting-field="turnover"] {
  grid-column: 1;
  grid-row: 2;
}

#accountingEntryDialog .modal-dialog.salary-work-dialog [data-accounting-field="bonus"] {
  grid-column: 2;
  grid-row: 1;
}

#accountingEntryDialog .modal-dialog.salary-work-dialog [data-accounting-field="deduction"] {
  grid-column: 2;
  grid-row: 2;
}

#accountingEntryDialog .modal-dialog.salary-work-dialog [data-accounting-field="comment"] {
  grid-column: 1 / 3;
  grid-row: 3;
}

#accountingEntryDialog .modal-dialog.salary-work-dialog #salaryCalculationPreview {
  grid-column: 3 / 5;
  grid-row: 1 / 4;
  margin-top: 0;
  align-self: stretch;
}

#accountingEntryDialog .modal-dialog.salary-payment-dialog .controls-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
}

#accountingEntryDialog .modal-dialog.salary-payment-dialog [data-accounting-field="comment"] {
  grid-column: 1 / 3;
}

#accountingEntryDialog .modal-dialog.salary-payment-dialog .segmented-control button {
  min-height: 34px;
  padding: 7px 6px;
  font-size: 14px;
}

.salary-receipt-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
}

.salary-receipt-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.salary-receipt-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

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

.salary-receipt-actions button {
  min-height: 34px;
  padding: 7px 10px;
  white-space: nowrap;
}

#salaryReceiptsTable td,
#salaryReceiptsTable th {
  font-size: 13px;
  padding: 7px 8px;
}

.receipt-ai-note {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.receipt-ai-warning {
  color: #9a3412;
}

.missing-receipt-amount {
  color: #b42318;
  font-weight: 700;
}

.receipt-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e8eef7;
  color: #344054;
  font-size: 12px;
  font-weight: 700;
}

.receipt-status.confirmed {
  background: #dcfce7;
  color: #166534;
}

.receipt-status.review {
  background: #fff7d6;
  color: #7c5c00;
}

.receipt-status.rejected {
  background: #fee2e2;
  color: #991b1b;
}

.receipt-status.running,
.receipt-status.pending {
  background: #e0f2fe;
  color: #075985;
}

#deleteSalaryEmployeeBtn {
  display: none;
  margin-right: auto;
}

.salary-employee-dialog .controls-grid {
  display: block;
}
.employee-form-section {
  border: 0;
  border-top: 1px solid #d4dce8;
  padding: 14px 0;
  margin: 0;
  min-width: 0;
}
.employee-form-section legend, .employee-form-section summary {
  font-weight: 600;
  padding: 0 8px 0 0;
  margin-bottom: 8px;
}
.employee-form-section summary { cursor: pointer; }
.employee-form-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.employee-form-section:first-of-type .employee-form-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.employee-form-fields > div { min-width: 0; }
.employee-form-fields [data-accounting-field="minimumPay"],
.employee-form-fields [data-accounting-field="comment"] { grid-column: 1 / -1; }
@media (max-width: 650px) {
  .employee-form-fields, .employee-form-section:first-of-type .employee-form-fields {
    grid-template-columns: 1fr;
  }
}
#accountingEntryDialog .modal-dialog.salary-employee-dialog #deleteSalaryEmployeeBtn {
  display: inline-flex;
}

.currency-input {
  padding-right: 28px;
  background-image: linear-gradient(90deg, transparent calc(100% - 24px), #f8fafc calc(100% - 24px));
}

[data-accounting-field="cash"],
[data-accounting-field="cashless"],
[data-accounting-field="rate"],
[data-accounting-field="percent"],
[data-accounting-field="accrued"],
[data-accounting-field="advancePlanned"],
[data-accounting-field="advancePaid"],
[data-accounting-field="deduction"],
[data-accounting-field="bonus"],
[data-accounting-field="turnover"],
[data-accounting-field="founderSupplierAmount"] {
  position: relative;
}

[data-accounting-field="cash"]::after,
[data-accounting-field="cashless"]::after,
[data-accounting-field="rate"]::after,
[data-accounting-field="percent"]::after,
[data-accounting-field="accrued"]::after,
[data-accounting-field="advancePlanned"]::after,
[data-accounting-field="advancePaid"]::after,
[data-accounting-field="deduction"]::after,
[data-accounting-field="bonus"]::after,
[data-accounting-field="turnover"]::after,
[data-accounting-field="founderSupplierAmount"]::after {
  content: "₽";
  position: absolute;
  right: 10px;
  bottom: 11px;
  color: var(--muted);
  pointer-events: none;
}

[data-accounting-field="paymentAmount"] {
  position: relative;
}

[data-accounting-field="paymentAmount"]::after {
  content: "₽";
  position: absolute;
  right: 10px;
  bottom: 11px;
  color: var(--muted);
  pointer-events: none;
}

.object-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.object-switch button {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 58px;
  justify-content: flex-start;
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  padding: 12px 14px;
}

.object-switch button span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.object-switch button.active {
  background: #344054;
  color: #fff;
  border-color: #344054;
}

.object-switch button.active span {
  color: rgba(255, 255, 255, 0.78);
}

.accounting-shell {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-top: 12px;
}

.accounting-shell.nav-collapsed {
  grid-template-columns: 54px minmax(0, 1fr);
}

.accounting-tabs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-right: 1px solid var(--line);
  padding-right: 12px;
}

.accounting-tabs button {
  justify-content: flex-start;
  width: 100%;
  gap: 9px;
  min-height: 38px;
  white-space: nowrap;
  overflow: hidden;
}

.accounting-tab-icon {
  display: inline-flex;
  width: 18px;
  min-width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
}

.accounting-tab-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.accounting-nav-toggle {
  justify-content: flex-end !important;
  color: var(--muted);
  background: transparent;
  border: 0;
  padding-right: 9px;
}

.accounting-shell.nav-collapsed .accounting-tabs {
  padding-right: 8px;
}

.accounting-shell.nav-collapsed .accounting-tabs button {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

.accounting-shell.nav-collapsed .accounting-tab-label {
  display: none;
}

.accounting-shell.nav-collapsed .accounting-nav-toggle svg {
  transform: rotate(180deg);
}

.accounting-month-toolbar {
  margin-top: 0;
  justify-content: flex-end;
  align-items: end;
}

.accounting-month-toolbar > div {
  min-width: 170px;
}

.accounting-pane {
  display: none;
  min-width: 0;
}

.accounting-pane.active {
  display: block;
}

.timesheet-wrap {
  overflow: auto;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.timesheet-grid {
  border-collapse: collapse;
  width: max-content;
}

.timesheet-grid th,
.timesheet-grid td {
  border: 1px solid var(--line);
  padding: 2px;
  text-align: center;
  vertical-align: middle;
  min-width: 38px;
  font-size: 11px;
}

.timesheet-grid .timesheet-day,
.timesheet-grid .timesheet-cell {
  width: 38px;
  min-width: 38px;
  max-width: 38px;
  padding-left: 1px;
  padding-right: 1px;
}

.timesheet-grid .timesheet-cell {
  position: relative;
}

.timesheet-grid .timesheet-cell.editing {
  z-index: 6;
}

.timesheet-grid .employee-col {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 122px;
  max-width: 148px;
  padding: 4px 6px;
  text-align: left;
  background: #fff;
  box-shadow: 1px 0 0 var(--line);
}

.timesheet-grid thead .employee-col {
  z-index: 3;
  background: #eef3f8;
}

.timesheet-day.weekend {
  background: #ffedd5;
}

.timesheet-day.today {
  background: #dbeafe;
  color: #1e3a8a;
}

.timesheet-day-label {
  display: grid;
  gap: 0;
  align-items: center;
  white-space: nowrap;
  line-height: 1.05;
}

.timesheet-day-label span {
  font-size: 8px;
  color: var(--muted);
  font-weight: 400;
}

.timesheet-cell.weekend {
  background: #fff4e5;
}

.timesheet-cell.today {
  background: #eff6ff;
}

.timesheet-employee-name {
  font-weight: 700;
  font-size: 12px;
  line-height: 1.15;
}

.timesheet-employee-meta {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.15;
  margin-top: 1px;
}

.timesheet-group-row th {
  padding: 4px 7px;
  text-align: left;
  background: #e8eef6;
  color: #344054;
  font-size: 12px;
  font-weight: 700;
  position: relative;
  z-index: 1;
}

.timesheet-grid .timesheet-group-name {
  z-index: 3;
  background: #e8eef6;
}

.timesheet-group-row .timesheet-group-day {
  width: 38px;
  min-width: 38px;
  max-width: 38px;
  padding: 0;
  background: #e8eef6;
}

.timesheet-group-row .timesheet-group-day.weekend {
  background: #f8dfbf;
}

.timesheet-group-row .timesheet-group-day.today {
  background: #cfe2fb;
}

.timesheet-group-row .timesheet-group-total {
  padding: 0;
  background: #e8eef6;
}

.timesheet-shift-toggle {
  width: 18px;
  min-width: 18px;
  max-width: 18px;
  height: 18px;
  min-height: 18px;
  max-height: 18px;
  display: block;
  margin: 2px auto;
  padding: 0;
  border: initial;
}

.timesheet-hour-button {
  display: grid;
  width: 34px;
  min-width: 34px;
  min-height: 31px;
  margin: 0 auto;
  padding: 1px 0;
  align-content: center;
  gap: 0;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--text);
  font-size: 9px;
  font-weight: 400;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.timesheet-hour-button:hover,
.timesheet-hour-button:focus-visible {
  background: rgba(23, 105, 224, 0.1);
  color: var(--accent-dark);
}

.timesheet-hour-button.empty {
  min-height: 24px;
  color: var(--muted);
  font-size: 15px;
}

.timesheet-time-box {
  display: grid;
  gap: 0;
  min-width: 44px;
  justify-content: center;
  padding: 1px 0;
}

.timesheet-cell.editing .timesheet-time-box {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 7;
  min-width: 68px;
  padding: 6px;
  transform: translate(-50%, -50%);
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.18);
}

.timesheet-time-row {
  display: grid;
  grid-template-columns: 12px 50px;
  gap: 2px;
  align-items: center;
  margin: 0;
}

.timesheet-time-row span {
  color: var(--muted);
  font-size: 9px;
  text-align: right;
}

.timesheet-time-box input {
  width: 50px;
  min-width: 50px;
  min-height: 22px;
  height: 22px;
  padding: 1px 2px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.timesheet-time-box input:focus {
  outline: 1px solid var(--accent);
  background: #fff;
}

.timesheet-time-box input::-webkit-calendar-picker-indicator {
  display: none;
}

.timesheet-time-actions {
  display: flex;
  justify-content: flex-end;
  gap: 3px;
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.timesheet-time-actions button {
  width: 22px;
  min-width: 22px;
  min-height: 22px;
  padding: 0;
  font-size: 12px;
}

.founder-dashboard {
  display: grid;
  gap: 14px;
}

.founder-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.founder-summary-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 11px 12px;
}

.founder-summary-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 5px;
}

.founder-summary-card strong {
  display: block;
  font-size: 20px;
  line-height: 1.2;
}

.founder-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 14px;
  align-items: start;
}

.founder-layout > .founder-table-card:first-child {
  grid-column: 1 / -1;
}

.founder-table-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}

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

.founder-table-head h4 {
  margin: 0;
}

.founder-table-head .muted {
  font-size: 12px;
}

.founder-table-card .table-wrap {
  border: 0;
  border-radius: 0;
}

.calculation-note {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfe;
  color: var(--muted);
  margin-bottom: 12px;
}

.order-quantity-input {
  width: 96px;
  min-width: 96px;
  text-align: right;
}

.mode-settings {
  display: grid;
  gap: 10px;
}

.mode-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  background: #fbfcfe;
}

.mode-card textarea {
  min-height: 106px;
  font-size: 12px;
}

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

.dialog-actions .toolbar {
  margin-top: 0;
}

.wide-actions {
  grid-column: 1 / -1;
  margin-top: 0;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.table-wrap.tiny-horizontal-overflow {
  overflow-x: hidden;
}

.table-wrap.tiny-horizontal-overflow table {
  width: calc(100% - 1px);
  min-width: calc(100% - 1px);
}

.table-tools {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  align-items: end;
  margin: 8px 0;
  flex-wrap: wrap;
}

.table-search {
  width: min(320px, 100%);
  margin: 0;
}

.table-filter {
  width: min(240px, 100%);
  margin: 0;
}

.sortable-header {
  cursor: pointer;
  user-select: none;
}

.sortable-header[data-sort-direction="asc"]::after {
  content: " ↑";
  color: var(--accent);
}

.sortable-header[data-sort-direction="desc"]::after {
  content: " ↓";
  color: var(--accent);
}

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

th {
  position: relative;
}

.column-resizer {
  position: absolute;
  top: 0;
  right: -3px;
  width: 7px;
  height: 100%;
  cursor: col-resize;
  user-select: none;
  touch-action: none;
  z-index: 2;
}

.column-resizer:hover {
  background: rgba(23, 105, 224, .18);
}

body.resizing-column {
  cursor: col-resize;
  user-select: none;
}

#pricebookTable {
  width: max-content;
  min-width: 100%;
  table-layout: auto;
}

th, td {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 7px;
  vertical-align: top;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
}

th {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

tbody tr:hover td {
  background: #fff8db;
}

th {
  background: #eef3f8;
  color: #344054;
  font-size: 12px;
  text-align: left;
}

td input { border: 0; padding: 6px; min-width: 80px; max-width: 100%; }
td.name input { min-width: 340px; }
td.check { text-align: center; }
td.check input { width: 18px; height: 18px; }

.status {
  display: inline-block;
  border-radius: 4px;
  padding: 4px 7px;
  font-weight: 600;
  white-space: nowrap;
}

.ok { background: var(--good); }
.warn { background: var(--warn); }
.bad { background: var(--bad); }
.blue { background: var(--blue); }
.gray { background: var(--soft); }

.summary {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.pill {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
}

.message {
  display: none;
  border-radius: 6px;
  margin-top: 12px;
  padding: 10px;
}

.message.error { background: var(--bad); border: 1px solid #f4b6aa; }
.message.success { background: var(--good); border: 1px solid #b9ddaa; }
.message.info { background: var(--blue); border: 1px solid #bfd7ee; }
.boot-error {
  display: none;
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 1300;
  padding: 12px 14px;
  border: 1px solid #f4b6aa;
  border-radius: 6px;
  background: var(--bad);
  color: #7f1d1d;
  box-shadow: 0 10px 30px rgba(16, 24, 40, .18);
  white-space: pre-line;
}
.toast-stack {
  position: fixed;
  right: 18px;
  top: 82px;
  z-index: 1200;
  display: grid;
  gap: 10px;
  width: min(380px, calc(100vw - 36px));
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.18);
  padding: 10px 12px;
  white-space: pre-line;
}
.toast.error { border-color: #f4b6aa; background: var(--bad); }
.toast.success { border-color: #b9ddaa; background: var(--good); }
.toast.info { border-color: #bfd7ee; background: var(--blue); }
.notifications-panel {
  display: none;
  position: fixed;
  right: 18px;
  top: 70px;
  z-index: 1300;
  width: min(420px, calc(100vw - 36px));
  max-height: 70vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(16, 24, 40, 0.2);
}
.notifications-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}
.notification-item {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  white-space: pre-line;
}
.notification-item:last-child { border-bottom: 0; }
.notification-time { display: block; margin-bottom: 4px; color: var(--muted); font-size: 12px; }
.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
  display: none;
  position: absolute;
  z-index: 1400;
  top: calc(100% + 6px);
  left: 0;
  min-width: 260px;
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.16);
  padding: 8px;
}
.dropdown-menu.open { display: grid; gap: 6px; }

.inline-editor {
  display: none;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
#pricebookEditor .modal-dialog,
#productCompetitorLinksDialog .modal-dialog {
  width: min(1120px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
}
.modal-body-scroll {
  overflow: auto;
  padding-bottom: 10px;
}
.modal-footer {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.embedded-section {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.embedded-section h2 {
  font-size: 15px;
}

.view-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
}

.view-switch button {
  border-radius: 0;
  background: #fff;
  color: var(--text);
  border-right: 1px solid var(--line);
}

.view-switch button:last-child { border-right: 0; }
.view-switch button.active { background: var(--accent); color: #fff; }
.dev-only { display: none; }

.pending-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  margin-top: 6px;
  background: #fff;
}

.pending-head {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 70px 190px;
  gap: 8px;
  align-items: center;
}

.candidate {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 6px 8px;
  margin-top: 6px;
  background: #fbfcfe;
}

.muted { color: var(--muted); }
.history-list { min-width: 220px; white-space: pre-line; }
.action-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: max-content;
  align-items: center;
  justify-content: flex-start;
}

.action-cell button {
  min-height: 28px;
  padding: 5px 8px;
  font-size: 13px;
}

.action-cell .icon-button {
  width: 28px;
  min-width: 28px;
  padding: 0;
}

td .action-cell {
  white-space: nowrap;
}
.cell-stack {
  display: grid;
  gap: 4px;
  min-width: 260px;
}
.cell-stack span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}
.type-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #f8fafc;
  color: var(--text);
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
}
.type-badge svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}
.type-badge.alcohol { background: #eef6ff; border-color: #bfdbfe; color: #1e40af; }
.type-badge.tobacco { background: #fff7ed; border-color: #fed7aa; color: #9a3412; }
.type-badge.other { background: #f4f4f5; border-color: #d4d4d8; color: #3f3f46; }
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(16, 24, 40, .45);
  padding: 40px 24px;
  overflow: auto;
  align-items: center;
  justify-content: center;
}
.modal-dialog {
  width: min(1100px, 100%);
  margin: 0 auto;
  max-height: calc(100vh - 80px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  padding: 14px;
  box-shadow: 0 20px 50px rgba(16, 24, 40, .22);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}
.compact-head {
  margin: 0 0 12px;
}
.compact-head h3 {
  margin: 0;
}
.login-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}
.password-field {
  position: relative;
  display: flex;
  align-items: center;
}
.password-field input {
  padding-right: 44px;
}
.password-toggle {
  position: absolute;
  right: 6px;
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.password-toggle svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.price-up { color: #b42318; font-weight: 700; }
.price-down { color: #027a48; font-weight: 700; }
.price-same { color: var(--muted); }
.column-picker {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 10px 0 12px;
  color: var(--muted);
  font-size: 12px;
}
.column-picker label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
}
.column-picker input { width: auto; }
.column-details {
  margin: 8px 0 12px;
}
.column-details summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 600;
  width: max-content;
}
.table-pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin: 8px 0;
}
.table-pagination-center {
  grid-column: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}
.table-pagination-center button {
  min-width: 34px;
  padding: 6px 10px;
}
.table-pagination-center button:disabled {
  opacity: .45;
  cursor: default;
}
.table-page-numbers {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}
.table-page-numbers button.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.table-page-gap {
  padding: 0 4px;
  color: var(--muted);
}
.table-page-size {
  grid-column: 3;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}
.table-page-size select {
  width: auto;
  min-width: 76px;
  padding: 6px 8px;
}
#pricebookTable th[data-col="vintage"],
#pricebookTable td[data-col="vintage"] {
  width: 90px;
}
#pricebookTable th[data-col="history"],
#pricebookTable td[data-col="history"] {
  width: 170px;
}
#pricebookTable th[data-col="price"],
#pricebookTable td[data-col="price"],
#pricebookTable th[data-col="date"],
#pricebookTable td[data-col="date"] {
  width: 120px;
}
#pricebookTable th[data-col="supplier"],
#pricebookTable td[data-col="supplier"] { width: 150px; }
#pricebookTable th[data-col="barcode"],
#pricebookTable td[data-col="barcode"] { width: 150px; }
#pricebookTable th[data-col="alcohol"],
#pricebookTable td[data-col="alcohol"] { width: 130px; }
#pricebookTable th[data-col="volume"],
#pricebookTable td[data-col="volume"],
#pricebookTable th[data-col="abv"],
#pricebookTable td[data-col="abv"] { width: 95px; }
#pricebookTable th[data-col="category"],
#pricebookTable td[data-col="category"] { width: 135px; }
#pricebookTable th[data-col="origin"],
#pricebookTable td[data-col="origin"],
#pricebookTable th[data-col="producer"],
#pricebookTable td[data-col="producer"] { width: 165px; }
#pricebookTable th[data-col="change"],
#pricebookTable td[data-col="change"] { width: 130px; }
#pricebookTable th[data-col="action"],
#pricebookTable td[data-col="action"] { width: 190px; }
#pricebookTable th[data-col="product"],
#pricebookTable td[data-col="product"],
#pricebookTable th[data-col="supplierName"],
#pricebookTable td[data-col="supplierName"] {
  width: 320px;
}
#manualReviewSection table input { min-width: 120px; }
#manualReviewSection td.name input { min-width: 360px; }
#aiJsonText { display: none; min-height: 260px; }

@media (max-width: 900px) {
  header { padding: 14px 16px; }
  main { padding: 14px 16px 24px; }
  .grid, .pending-head, .controls-grid, .settings-grid { grid-template-columns: 1fr; }
  .settings-tabs { float: none; width: auto; border-right: 0; border-bottom: 1px solid var(--line); padding-right: 0; }
  .settings-tab-panel { margin-left: 0; }
  .accounting-shell,
  .accounting-shell.nav-collapsed { grid-template-columns: 54px minmax(0, 1fr); gap: 10px; }
  .accounting-shell .accounting-tabs { padding-right: 8px; }
  .accounting-shell .accounting-tabs button { justify-content: center; padding-left: 0; padding-right: 0; }
  .accounting-shell .accounting-tab-label { display: none; }
  .accounting-nav-toggle { display: none; }
}

.scroll-top-button {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 8;
}

.scroll-top-button.visible {
  display: inline-flex;
}
