:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #1f2933;
  --muted: #667085;
  --border: #d9dee7;
  --accent: #1f6feb;
  --accent-dark: #1756b8;
  --danger: #b42318;
  --content-width: 1440px;
}

* {
  box-sizing: border-box;
}

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

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.topbar-row {
  max-width: var(--content-width);
  margin: 0 auto;
  padding-left: 32px;
  padding-right: 32px;
}

.topbar-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 18px;
  padding-bottom: 12px;
}

.topbar-subrow {
  padding-top: 0;
  padding-bottom: 14px;
}

.brand {
  color: var(--text);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

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

.topnav a,
.topnav span,
.button-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  text-decoration: none;
}

.topnav a.is-active,
.topnav span.is-active {
  border-color: var(--accent);
  color: var(--accent);
}

.topnav .is-disabled {
  background: #f8fafc;
  color: var(--muted);
  cursor: default;
}

.topnav-main {
  margin-left: auto;
}

.topnav-main a,
.topnav-main span {
  min-height: 36px;
  padding: 7px 12px;
  font-weight: 700;
}

.topnav-submenu a,
.topnav-submenu span {
  min-height: 38px;
}

.button-link:hover,
.topnav a:hover {
  background: #eef2f7;
}

.port {
  padding-top: 4px;
  color: var(--muted);
  white-space: nowrap;
}

.topbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}

.topbar-actions form {
  margin: 0;
}

.topbar-logout {
  min-height: 36px;
  padding: 7px 12px;
}

.layout {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 24px 32px 40px;
}

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

.ozon-reports-section h1 {
  margin: 0 0 8px;
}

.ozon-reports-section .section-heading {
  margin-bottom: 18px;
}

.ozon-reports-table a {
  color: var(--accent);
  font-weight: 700;
}

.ozon-reports-table .actions-cell {
  width: 180px;
  text-align: right;
}

.ozon-reports-table form {
  margin: 0;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgb(15 23 42 / 55%);
}

.report-modal {
  width: min(760px, 100%);
  max-height: calc(100vh - 48px);
  padding: 24px;
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 20px 50px rgb(15 23 42 / 25%);
  overflow-y: auto;
}

.report-modal-header,
.report-modal-actions,
.report-group-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.report-modal-header h2,
.report-modal-header p {
  margin: 0 0 6px;
}

.modal-close {
  color: var(--muted);
  font-size: 34px;
  line-height: 1;
  text-decoration: none;
}

.report-modal-actions {
  justify-content: flex-start;
  margin: 18px 0;
}

.report-groups {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.report-group-row {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

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

.report-group-heading {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  background: #eef2f7;
  font-weight: 700;
}

.report-subtotal {
  background: #f8fafc;
}

.report-total {
  background: #f8fafc;
  font-size: 18px;
}

.report-tax {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.report-tax > div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.price-toolbar {
  display: grid;
  gap: 0;
  width: 100%;
  min-width: 1040px;
  margin: 0;
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #f8fafc;
  overflow-x: auto;
}

.toolbar label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}

.toolbar input {
  width: 180px;
}

.analytics-toolbar {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.analytics-toolbar label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}

.analytics-toolbar input {
  width: 180px;
}

.analytics-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.analytics-summary {
  align-items: flex-start;
}

.product-cell {
  display: grid;
  gap: 4px;
}

.product-cell strong {
  color: var(--text);
}

.product-cell span,
.cell-muted {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.sort-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.sort-button::after {
  content: "↕";
  color: var(--muted);
  font-size: 12px;
}

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

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

.refresh-block {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.price-actions {
  width: 100%;
  margin-bottom: 10px;
}

.price-global-actions {
  padding: 0;
}

.upload-check-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: 16px;
  width: 100%;
  margin: 0 0 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
}

.upload-check-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.upload-check-title {
  color: #344054;
  font-size: 14px;
  font-weight: 700;
}

.upload-check-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  color: #56627a;
  font-size: 14px;
  line-height: 1.35;
}

.upload-check-error {
  max-height: 44px;
  overflow: auto;
  color: var(--danger);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.warehouse-cost-list {
  display: grid;
  gap: 12px;
}

.warehouse-cost-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.warehouse-cost-card summary {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) max-content max-content;
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
  cursor: pointer;
}

.warehouse-cost-card summary:hover {
  background: #f8fafc;
}

.warehouse-cost-title {
  font-size: 18px;
  font-weight: 700;
}

.warehouse-cost-metric {
  display: grid;
  gap: 3px;
  min-width: 140px;
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.warehouse-cost-metric strong {
  color: var(--text);
  font-size: 18px;
}

.warehouse-cost-table-wrap {
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  border-radius: 0;
}

.empty-panel {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  text-align: center;
}

.button-with-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

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

.filter-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  user-select: none;
}

.toolbar .filter-toggle {
  display: inline-flex;
}

.filter-toggle input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  flex: 0 0 auto;
}

.filter-toggle-box {
  display: none;
}

.filter-toggle:hover {
  border-color: #b8c2d0;
  background: #f8fafc;
}

.filter-toggle input:focus-visible {
  outline: 3px solid rgba(31, 111, 235, 0.2);
  outline-offset: 2px;
}

.filter-toggle-text {
  line-height: 1.2;
}

.catalog-updated {
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.counter {
  justify-self: end;
  min-width: max-content;
  padding: 8px 12px;
  border: 1px solid #cfd7e6;
  border-radius: 6px;
  background: #ffffff;
  color: #344054;
  font-size: 14px;
  font-weight: 700;
}

.toolbar-info {
  display: flex;
  align-items: center;
  gap: 18px;
}

.price-toolbar-meta {
  display: grid;
  grid-template-columns: minmax(210px, 280px) max-content max-content minmax(0, 1fr) max-content;
  align-items: end;
  gap: 12px 16px;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.sync-status {
  display: grid;
  grid-column: 4;
  align-self: stretch;
  justify-content: start;
  gap: 2px;
  min-width: 0;
  padding: 7px 14px;
  border-left: 1px solid #cfd7e6;
  color: #56627a;
  font-size: 14px;
  line-height: 1.35;
  text-align: left;
}

.price-toolbar-meta .counter {
  grid-column: 5;
}

.sync-error {
  color: var(--danger);
}

.limit-counter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  white-space: nowrap;
}

.limit-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #12b76a;
}

.limit-counter.is-waiting {
  border-color: #fdb022;
  color: #93370d;
}

.limit-counter.is-waiting .limit-dot {
  background: #f79009;
}

input,
button {
  min-height: 40px;
  border-radius: 6px;
  border: 1px solid var(--border);
  font: inherit;
}

input {
  padding: 8px 10px;
  background: var(--surface);
  color: var(--text);
}

button {
  padding: 8px 14px;
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  cursor: pointer;
}

button:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

button:disabled {
  background: #c8d0dc;
  border-color: #c8d0dc;
  cursor: not-allowed;
}

.button-secondary {
  background: #ffffff;
  border-color: var(--border);
  color: var(--text);
}

.button-secondary:hover {
  background: #eef2f7;
  border-color: #c8d0dc;
}

.inline-button {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prices-table [data-coef-button] {
  white-space: nowrap;
}

.inline-button:hover {
  background: transparent;
  border-color: transparent;
  color: var(--accent-dark);
}

.message {
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  background: var(--surface);
}

.warning {
  border-left-color: var(--danger);
}

.auth-page {
  min-height: 100vh;
  background: #eef2f7;
}

.auth-layout {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
}

.auth-panel {
  display: grid;
  gap: 18px;
  width: min(100%, 420px);
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.auth-heading {
  display: grid;
  gap: 6px;
}

.auth-heading h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
}

.auth-heading p {
  margin: 0;
  color: var(--muted);
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}

.auth-form button {
  width: 100%;
}

.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.prices-table-wrap {
  border-radius: 0 0 8px 8px;
}

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

.prices-table {
  min-width: 100%;
  table-layout: fixed;
}

.prices-table .select-column {
  width: 34px;
}

.prices-table .product-column {
  width: 27%;
}

.prices-table .wb-price-column,
.prices-table .ozon-price-column {
  width: 11%;
}

.prices-table .commission-column {
  width: 8%;
}

.prices-table .logistics-column {
  width: 12%;
}

.prices-table .tax-column,
.prices-table .cost-column {
  width: 7%;
}

.prices-table .profit-column {
  width: 12%;
}

.prices-table .desired-profitability-column,
.prices-table .new-price-column {
  width: 7%;
}

.prices-table th,
.prices-table td {
  overflow-wrap: anywhere;
}

.prices-table th:first-child,
.prices-table td:first-child {
  width: 34px;
  min-width: 34px;
  max-width: 34px;
  padding-left: 4px;
  padding-right: 4px;
  text-align: center;
}

.prices-table th:first-child input,
.prices-table td:first-child input {
  margin: 0;
}

.prices-table th:nth-child(9),
.prices-table td:nth-child(9) {
  border-left: 2px solid #c8d0dc;
}

.prices-table tbody tr:hover {
  background: #f0f7ff;
}

.cell-description.promo-economy-value {
  color: #d92d20;
  font-weight: 700;
}

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

th {
  background: #eef2f7;
  font-size: 14px;
  font-weight: 700;
  color: #344054;
}

tr:last-child td {
  border-bottom: 0;
}

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

.actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.status {
  display: inline-block;
  white-space: nowrap;
}

.status-ok {
  color: #067647;
}

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

.loaded-at {
  color: var(--muted);
  white-space: nowrap;
}

.price-settings {
  margin-bottom: 18px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.settings-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}

.settings-grid input,
.table-input {
  width: 100%;
}

.display-mode-control {
  display: grid;
  gap: 4px;
  color: #56627a;
  font-size: 13px;
  font-weight: 700;
}

.display-mode-control select {
  width: 100%;
  min-width: 210px;
  min-height: 40px;
  padding: 8px 34px 8px 10px;
  border: 1px solid #cfd7e6;
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
}

.price-input {
  max-width: 84px;
}

.profitability-input {
  max-width: 72px;
}

.new-price-hover {
  display: inline-block;
}

.new-price-hover[hidden],
[data-price-mode-fields][hidden] {
  display: none;
}

.new-price-popup {
  position: fixed;
  z-index: 50;
  width: 250px;
  padding: 12px 14px;
  border: 1px solid #b8c2d0;
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.18);
  pointer-events: none;
}

.new-price-popup[hidden] {
  display: none;
}

.new-price-popup .popup-title {
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
}

.popup-price {
  color: var(--text);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
}

.popup-subprice {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.new-price-popup dl {
  display: grid;
  gap: 7px;
  margin: 12px 0 0;
}

.new-price-popup .popup-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.new-price-popup .popup-row-note {
  padding-left: 12px;
}

.new-price-popup dt {
  color: var(--text);
  font-size: 12px;
}

.new-price-popup dd {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.new-price-popup .popup-row-muted dt,
.new-price-popup .popup-row-muted dd {
  color: var(--muted);
  font-weight: 400;
}

.new-price-popup .popup-row-danger dt,
.new-price-popup .popup-row-danger dd {
  color: var(--danger);
}

.new-price-popup .popup-row-success dt,
.new-price-popup .popup-row-success dd {
  color: #067647;
}

.upload-tooltip {
  position: fixed;
  z-index: 70;
  width: min(360px, calc(100vw - 24px));
  padding: 12px 14px;
  border: 1px solid #b8c2d0;
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.18);
  pointer-events: none;
}

.upload-tooltip[hidden] {
  display: none;
}

.upload-tooltip .popup-title {
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
}

.upload-tooltip p {
  margin: 0 0 10px;
  color: #344054;
  font-size: 13px;
  line-height: 1.35;
}

.upload-tooltip dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.upload-tooltip dl > div {
  display: grid;
  gap: 2px;
}

.upload-tooltip dt {
  color: var(--muted);
  font-size: 12px;
}

.upload-tooltip dd {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
}

.settings-meta {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

.cell-value {
  font-weight: 700;
}

.profit-warning {
  color: #b54708;
}

.profit-danger {
  color: var(--danger);
}

.product-title {
  color: var(--text);
  font-size: 15px;
  line-height: 1.3;
}

.cell-description {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.prices-table .product-meta {
  color: #7a8495;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.25;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
  color: var(--muted);
}

.pagination a {
  color: var(--accent);
  text-decoration: none;
}

.selection-bar {
  position: sticky;
  bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding: 14px 16px;
  background: #101828;
  border-radius: 8px;
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.2);
}

.selection-bar[hidden] {
  display: none;
}

.selection-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.bulk-edit {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.bulk-edit label {
  display: grid;
  gap: 4px;
  color: #ffffff;
  font-size: 13px;
}

.bulk-edit input {
  width: 130px;
  min-height: 36px;
}

.button-secondary-dark {
  background: #ffffff;
  border-color: #ffffff;
  color: #101828;
}

.modal {
  width: min(560px, calc(100vw - 32px));
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0;
  color: var(--text);
}

.modal::backdrop {
  background: rgba(16, 24, 40, 0.35);
}

.modal form {
  padding: 18px;
}

.modal > .modal-head {
  padding: 18px 18px 0;
}

.modal > .modal-head form {
  padding: 0;
}

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

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

.modal-list {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 10px 14px;
  margin: 0;
}

.modal-list dt {
  color: var(--muted);
}

.modal-list dd {
  margin: 0;
}

.modal-list .formula-line {
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.modal-body {
  display: grid;
  gap: 18px;
  padding: 0 18px 18px;
}

.upload-form {
  display: grid;
  gap: 14px;
  padding: 0;
}

.upload-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}

.upload-form input {
  color: var(--text);
}

.button-secondary-dark:hover {
  background: #eef2f7;
  border-color: #eef2f7;
}

.summary-panel {
  margin-top: 24px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.summary-panel[hidden] {
  display: none;
}

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

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

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

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

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

.summary-grid section {
  min-width: 0;
}

.summary-panel h3 {
  margin-bottom: 10px;
  font-size: 16px;
}

.summary-panel dl {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  margin: 0;
}

.summary-panel dt {
  color: var(--muted);
}

.summary-panel dd {
  margin: 0;
  font-weight: 700;
  text-align: right;
}

.unprocessed-block {
  margin-top: 22px;
}

.unprocessed-block[hidden] {
  display: none;
}

.summary-table {
  min-width: 1080px;
}

.dashboard-title {
  margin: 0 0 6px;
  font-size: 24px;
}

.dashboard-view-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.dashboard-view-tabs a {
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}

.dashboard-view-tabs a.is-active {
  border-color: var(--accent);
  background: #eef5ff;
  color: var(--accent);
  font-weight: 700;
}

.dashboard-card,
.dashboard-table-section {
  margin-bottom: 24px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

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

.dashboard-card h2,
.dashboard-table-section h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.dashboard-card-head p {
  margin: 0;
  color: var(--muted);
}

.dashboard-legend {
  display: flex;
  gap: 16px;
  color: var(--muted);
  white-space: nowrap;
}

.dashboard-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dashboard-legend i {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.legend-profit,
.dashboard-profit {
  background: #1f9d55;
}

.legend-expenses,
.dashboard-expenses {
  background: #d64545;
}

.dashboard-chart-wrap {
  overflow-x: auto;
  padding: 4px 0 10px;
}

.dashboard-chart {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  min-width: max-content;
  min-height: 380px;
  padding: 10px 8px 0;
  border-bottom: 1px solid var(--border);
}

.dashboard-column {
  display: grid;
  grid-template-rows: 24px 280px 52px;
  gap: 8px;
  width: 85px;
  text-align: center;
}

.dashboard-value {
  align-self: end;
  font-size: 13px;
  font-weight: 700;
}

.dashboard-bar {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-self: end;
  width: 100%;
  height: var(--shipment-share);
  overflow: hidden;
  border-radius: 6px 6px 0 0;
  background: #eef2f7;
}

.dashboard-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  overflow: hidden;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.dashboard-profit {
  height: var(--profit-share);
}

.dashboard-expenses {
  height: var(--expenses-share);
}

.dashboard-period {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.dashboard-table-section {
  padding: 0;
  overflow: hidden;
}

.dashboard-table-section h2 {
  padding: 20px 20px 10px;
}

.dashboard-select-cell {
  width: 72px;
  text-align: center;
}

.dashboard-report-checkbox {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
}

.dashboard-row-selected td {
  background: #eef5ff;
}

.dashboard-selection-summary {
  margin-bottom: 24px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.dashboard-selection-summary[hidden] {
  display: none;
}

.dashboard-summary-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.dashboard-summary-head h2,
.dashboard-summary-head p {
  margin: 0;
}

.dashboard-summary-head p,
.dashboard-summary-grid dt {
  color: var(--muted);
}

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

.dashboard-summary-grid > div {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
}

.dashboard-summary-grid dd {
  margin: 8px 0 0;
  font-size: 20px;
  font-weight: 700;
}

.dashboard-summary-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.money-cell {
  text-align: right;
  white-space: nowrap;
}

.dashboard-is-profit {
  color: #187a43;
  font-weight: 700;
}

.dashboard-is-loss {
  color: var(--danger);
  font-weight: 700;
}

@media (max-width: 720px) {
  .topbar-main,
  .toolbar {
    display: grid;
  }

  .toolbar-info {
    display: grid;
  }

  .refresh-block {
    display: grid;
  }

  .upload-check-panel {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .warehouse-cost-card summary {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .warehouse-cost-metric {
    min-width: 0;
    text-align: left;
  }

  .selection-bar {
    display: grid;
  }

  .selection-actions,
  .summary-head,
  .summary-grid,
  .dashboard-card-head,
  .dashboard-summary-head {
    display: grid;
  }

  .summary-grid,
  .dashboard-summary-grid {
    grid-template-columns: 1fr;
  }

  .layout,
  .topbar-row {
    padding-left: 18px;
    padding-right: 18px;
  }

  .topnav-main {
    margin-left: 0;
  }

  .topbar-actions {
    justify-content: space-between;
  }

  .toolbar input {
    width: 100%;
  }

  .price-toolbar-meta {
    grid-template-columns: 1fr;
    min-width: 0;
    align-items: stretch;
  }

  .sync-status {
    grid-column: auto;
    border-left: 0;
    border-top: 1px solid #cfd7e6;
    padding-left: 0;
  }

  .counter {
    grid-column: auto;
    justify-self: stretch;
  }
}

/* Flowza visual layer. Business controls and table structure remain unchanged. */
:root {
  --app-bg: #f7f8fa;
  --surface: #ffffff;
  --surface-soft: #fafafb;
  --text-primary: #17191c;
  --text-secondary: #667085;
  --text-tertiary: #98a2b3;
  --border: #e4e7ec;
  --border-strong: #d0d5dd;
  --primary: #4b5cf6;
  --primary-dark: #3644d8;
  --primary-soft: #eef0ff;
  --action: #101010;
  --success: #10b981;
  --success-soft: #ecfdf3;
  --danger: #f04438;
  --danger-soft: #fff1f0;
  --warning: #f59e0b;
  --warning-soft: #fffaeb;
  --bg: var(--app-bg);
  --text: var(--text-primary);
  --muted: var(--text-secondary);
  --accent: var(--primary);
  --accent-dark: var(--primary-dark);
  --content-width: none;
}

html {
  background: var(--app-bg);
}

body {
  min-height: 100vh;
  background: var(--app-bg);
  font-family: "Inter Tight", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

@media (min-width: 1024px) {
  body:not(.auth-page) {
    padding-left: 236px;
  }
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-dark);
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

::-webkit-scrollbar-thumb {
  border-radius: 8px;
  background: var(--border-strong);
}

::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-toggle {
  position: fixed;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.sidebar-backdrop {
  display: none;
}

.app-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  display: flex;
  width: 236px;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: var(--surface);
  transition: transform 0.2s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px 14px;
  color: var(--text-primary);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.sidebar-brand:hover {
  color: var(--text-primary);
}

.sidebar-brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: var(--action);
}

.sidebar-brand-mark svg {
  width: 17px;
  height: 17px;
}

.sidebar-brand-mark rect:nth-child(1),
.sidebar-brand-mark rect:nth-child(4) {
  fill: #ffffff;
}

.sidebar-brand-mark rect:nth-child(2),
.sidebar-brand-mark rect:nth-child(3) {
  fill: #8b93ff;
}

.sidebar-nav {
  display: grid;
  gap: 3px;
  padding: 6px 12px 4px;
}

.sidebar-system-nav {
  padding-top: 2px;
}

.sidebar-nav-label {
  padding: 10px 8px 6px;
  color: var(--text-tertiary);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sidebar-nav-item {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 11px;
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 13.5px;
  font-weight: 500;
}

.sidebar-nav-item:hover {
  background: var(--surface-soft);
  color: var(--text-primary);
}

.sidebar-nav-item.is-active,
.sidebar-nav-item.is-active:hover {
  background: var(--primary);
  color: #ffffff;
  font-weight: 600;
}

.sidebar-nav-item.is-disabled,
.sidebar-nav-item.is-disabled:hover {
  background: transparent;
  color: var(--text-tertiary);
  cursor: not-allowed;
}

.sidebar-nav-content {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
}

.sidebar-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.marketplace-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.marketplace-dot-wb {
  background: #8b1e7a;
}

.marketplace-dot-ozon {
  background: #005bff;
}

.sidebar-account {
  margin-top: auto;
  padding: 12px;
}

.sidebar-account::before {
  display: block;
  height: 1px;
  margin-bottom: 12px;
  background: var(--border);
  content: "";
}

.account-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
}

.account-avatar {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
}

.account-copy {
  display: grid;
  min-width: 0;
  flex: 1;
}

.account-copy strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-copy span {
  color: var(--text-secondary);
  font-size: 11px;
}

.account-card form {
  margin: 0;
}

.account-logout {
  display: grid;
  width: 30px;
  min-height: 30px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #ffffff;
  color: var(--text-secondary);
}

.account-logout:hover {
  border-color: var(--border-strong);
  background: var(--surface-soft);
  color: var(--text-primary);
}

.account-logout svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 0;
  background: var(--surface);
}

.topbar-row {
  max-width: none;
  margin: 0;
  padding-right: 24px;
  padding-left: 24px;
}

.topbar-main {
  display: flex;
  min-height: 60px;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  padding-top: 0;
  padding-bottom: 0;
  border-bottom: 1px solid var(--border);
}

.page-title {
  min-width: 0;
  flex: 1;
  margin: 0;
  overflow: hidden;
  color: var(--text-primary);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-burger {
  display: none;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
}

.sidebar-burger svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.topbar-statuses {
  display: flex;
  align-items: center;
  gap: 8px;
}

.local-status,
.topbar .port {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 6px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.local-status {
  background: var(--success-soft);
  color: #067647;
}

.local-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
}

.topbar .port {
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text-secondary);
  font-weight: 500;
}

.topbar-subrow {
  min-height: 46px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
}

.topnav-submenu {
  display: flex;
  min-height: 46px;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.topnav-submenu::-webkit-scrollbar {
  display: none;
}

.topnav-submenu a,
.topnav-submenu span {
  display: inline-flex;
  min-height: 46px;
  flex: 0 0 auto;
  align-items: center;
  padding: 0 15px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
}

.topnav-submenu a:hover {
  border-bottom-color: var(--border-strong);
  background: transparent;
  color: var(--text-primary);
}

.topnav-submenu a.is-active,
.topnav-submenu span.is-active {
  border-color: var(--primary);
  background: transparent;
  color: var(--primary);
  font-weight: 600;
}

.layout {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 24px;
}

input,
select,
textarea,
button {
  border-color: var(--border-strong);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.12s ease, background-color 0.12s ease, color 0.12s ease;
}

input,
select,
textarea {
  background: #ffffff;
  color: var(--text-primary);
}

button {
  border-color: var(--action);
  background: var(--action);
  color: #ffffff;
  font-weight: 600;
}

button:hover {
  border-color: #292929;
  background: #292929;
}

button:disabled {
  border-color: var(--border);
  background: #eaecf0;
  color: var(--text-tertiary);
}

.button-link,
.button-secondary {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text-primary);
  font-weight: 600;
}

.button-link:hover,
.button-secondary:hover {
  border-color: #b8bec8;
  background: var(--surface-soft);
  color: var(--text-primary);
}

.inline-button,
.sort-button {
  min-height: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-weight: inherit;
}

.inline-button:hover,
.sort-button:hover {
  border: 0;
  background: transparent;
  color: var(--primary-dark);
}

.toolbar {
  min-height: 42px;
  align-items: center;
  margin-bottom: 16px;
}

.refresh-block,
.toolbar-info {
  gap: 10px;
}

.catalog-updated {
  color: var(--text-secondary);
  font-size: 12.5px;
}

.counter,
.limit-counter {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 500;
}

.counter {
  display: inline-flex;
  align-items: center;
}

.limit-dot {
  width: 7px;
  height: 7px;
  background: var(--success);
}

.message {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid #b9d4ff;
  border-left: 4px solid var(--primary);
  border-radius: 9px;
  background: #f5f7ff;
  color: #344054;
}

.message.warning {
  border-color: #fecaca;
  border-left-color: var(--danger);
  background: var(--danger-soft);
}

.table-wrap {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgb(16 24 40 / 3%);
}

table {
  color: var(--text-primary);
  font-size: 13px;
}

th,
td {
  padding: 11px 14px;
  border-bottom-color: var(--border);
  line-height: 1.35;
}

th {
  background: var(--surface-soft);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  vertical-align: middle;
}

tbody tr {
  transition: background-color 0.12s ease;
}

tbody tr:hover {
  background: #f8f9ff;
}

.prices-table tbody tr:hover {
  background: #f8f9ff;
}

.dashboard-row-selected td,
.prices-table tr:has(input[type="checkbox"]:checked) {
  background: var(--primary-soft);
}

.status {
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.status-ok {
  background: var(--success-soft);
  color: #067647;
}

.status-muted {
  background: #f2f4f7;
  color: var(--text-secondary);
}

.pagination {
  gap: 10px;
  margin-top: 14px;
  font-size: 13px;
}

.pagination a {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text-secondary);
}

.selection-bar {
  bottom: 16px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--action);
  box-shadow: 0 10px 30px rgb(16 24 40 / 24%);
}

.selection-bar button:not(.button-secondary-dark) {
  border-color: var(--primary);
  background: var(--primary);
}

.selection-bar button:not(.button-secondary-dark):hover {
  border-color: var(--primary-dark);
  background: var(--primary-dark);
}

.button-secondary-dark {
  border-color: rgb(255 255 255 / 20%);
  background: rgb(255 255 255 / 14%);
  color: #ffffff;
}

.button-secondary-dark:hover {
  border-color: rgb(255 255 255 / 32%);
  background: rgb(255 255 255 / 22%);
  color: #ffffff;
}

.price-settings,
.analytics-toolbar,
.summary-panel,
.dashboard-card,
.dashboard-table-section,
.dashboard-selection-summary,
.empty-panel {
  border-color: var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgb(16 24 40 / 3%);
}

.price-settings {
  scroll-margin-top: 124px;
  padding: 18px;
}

.price-settings:target {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgb(75 92 246 / 10%);
}

.settings-grid {
  grid-template-columns: repeat(4, minmax(145px, 1fr));
  gap: 14px;
}

.settings-grid label,
.analytics-toolbar label,
.toolbar label,
.display-mode-control {
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 500;
}

.settings-grid input,
.analytics-toolbar input,
.display-mode-control select {
  border-color: var(--border-strong);
  border-radius: 8px;
}

.settings-meta {
  color: var(--text-secondary);
  font-size: 12.5px;
}

.price-global-actions {
  gap: 8px;
}

.price-toolbar {
  border-color: var(--border);
  border-radius: 12px 12px 0 0;
  background: var(--surface);
}

.price-toolbar-meta {
  background: var(--surface);
}

.prices-table-wrap {
  border-radius: 0 0 12px 12px;
}

.filter-toggle {
  min-height: 40px;
  border-color: var(--border-strong);
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 500;
}

.filter-toggle:hover {
  border-color: #b8bec8;
  background: var(--surface-soft);
}

.table-input,
.price-input,
.profitability-input {
  min-height: 32px;
  border-color: var(--border-strong);
  border-radius: 7px;
  font-size: 13px;
}

.upload-check-panel {
  border-color: var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.warehouse-cost-list {
  gap: 10px;
}

.warehouse-cost-card {
  border-color: var(--border);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgb(16 24 40 / 3%);
}

.warehouse-cost-card[open] {
  border-color: #cbd0ff;
}

.warehouse-cost-card summary {
  padding: 15px 18px;
}

.warehouse-cost-card summary:hover {
  background: var(--surface-soft);
}

.warehouse-cost-title {
  font-size: 15px;
  font-weight: 600;
}

.warehouse-cost-metric strong {
  font-size: 16px;
  font-weight: 600;
}

.dashboard-view-tabs {
  display: inline-flex;
  width: max-content;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
}

.dashboard-view-tabs a {
  padding: 7px 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
}

.dashboard-view-tabs a.is-active {
  border: 0;
  background: var(--primary);
  color: #ffffff;
  font-weight: 600;
}

.dashboard-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.dashboard-card,
.dashboard-selection-summary {
  padding: 18px;
}

.dashboard-card h2,
.dashboard-table-section h2,
.summary-panel h2 {
  font-size: 16px;
  font-weight: 600;
}

.dashboard-card-head p {
  font-size: 12.5px;
}

.dashboard-chart {
  border-bottom-color: var(--border);
}

.legend-profit,
.dashboard-profit {
  background: var(--success);
}

.legend-expenses,
.dashboard-expenses {
  background-color: var(--danger);
  background-image: repeating-linear-gradient(
    -45deg,
    rgb(255 255 255 / 0%) 0,
    rgb(255 255 255 / 0%) 4px,
    rgb(255 255 255 / 30%) 4px,
    rgb(255 255 255 / 30%) 6px
  );
}

.dashboard-bar {
  border-radius: 7px 7px 0 0;
  background: #f2f4f7;
}

.dashboard-table-section {
  overflow: hidden;
}

.dashboard-table-section .table-wrap {
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  border-radius: 0;
  box-shadow: none;
}

.dashboard-summary-grid > div,
.summary-grid > div {
  border-color: var(--border);
  border-radius: 9px;
  background: var(--surface-soft);
}

.dashboard-is-profit {
  color: #067647;
}

.dashboard-is-loss {
  color: var(--danger);
}

.analytics-toolbar {
  padding: 16px;
}

.analytics-summary .counter {
  background: var(--surface);
}

.report-modal,
.modal {
  border-color: var(--border);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgb(16 24 40 / 20%);
}

.modal::backdrop,
.modal-backdrop {
  background: rgb(16 24 40 / 48%);
}

.modal-head,
.report-modal-header {
  border-bottom-color: var(--border);
}

.modal-close {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 7px;
  color: var(--text-secondary);
  font-size: 26px;
}

.modal-close:hover {
  background: var(--surface-soft);
  color: var(--text-primary);
}

.report-groups,
.report-tax {
  border-color: var(--border);
  border-radius: 10px;
}

.report-group-heading,
.report-subtotal,
.report-total {
  background: var(--surface-soft);
}

.auth-page {
  padding-left: 0;
  background: var(--app-bg);
}

.auth-layout {
  padding: 24px;
}

.auth-panel {
  gap: 20px;
  width: min(100%, 400px);
  padding: 28px;
  border-color: var(--border);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgb(16 24 40 / 4%);
}

.auth-heading h1 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.auth-heading p,
.auth-form label {
  color: var(--text-secondary);
  font-size: 13px;
}

.auth-form button {
  background: var(--action);
}

@media (max-width: 1180px) {
  .settings-grid {
    grid-template-columns: repeat(3, minmax(145px, 1fr));
  }

  .price-toolbar-meta {
    grid-template-columns: minmax(190px, 250px) max-content max-content minmax(220px, 1fr) max-content;
  }
}

@media (max-width: 1023px) {
  .app-sidebar {
    transform: translateX(-100%);
  }

  .sidebar-burger {
    display: inline-flex;
  }

  .sidebar-toggle:checked ~ .app-sidebar {
    transform: translateX(0);
    box-shadow: 0 12px 40px rgb(16 24 40 / 18%);
  }

  .sidebar-toggle:checked + .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: block;
    background: rgb(16 24 40 / 40%);
  }

  .price-toolbar {
    min-width: 0;
  }

  .price-toolbar-meta {
    grid-template-columns: minmax(190px, 1fr) max-content max-content;
  }

  .sync-status {
    grid-column: 1 / 3;
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .price-toolbar-meta .counter {
    grid-column: 3;
  }
}

@media (max-width: 760px) {
  .topbar-row {
    padding-right: 16px;
    padding-left: 16px;
  }

  .topbar-main {
    display: flex;
  }

  .topbar-subrow {
    padding: 0 6px;
  }

  .page-title {
    font-size: 19px;
  }

  .topbar .port {
    display: none;
  }

  .layout {
    padding: 16px;
  }

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

  .price-toolbar-meta {
    grid-template-columns: 1fr;
  }

  .sync-status,
  .price-toolbar-meta .counter {
    grid-column: auto;
  }

  .toolbar-info {
    align-items: stretch;
  }

  .counter,
  .limit-counter {
    justify-content: flex-start;
  }

  .dashboard-view-tabs {
    max-width: 100%;
    overflow-x: auto;
  }
}

@media (max-width: 560px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .selection-bar {
    align-items: stretch;
  }

  .selection-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .selection-actions button {
    width: 100%;
  }

  .local-status {
    min-width: 30px;
    padding: 0 9px;
    font-size: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
