﻿:root {
  color-scheme: light;
  --bg: #eef1f4;
  --surface: #ffffff;
  --surface-2: #f7f9fb;
  --ink: #17202a;
  --muted: #687383;
  --line: #d8dee6;
  --text: #17202a;
  --border: #d8dee6;
  --blue: #2364aa;
  --blue-soft: #e6f0fb;
  --teal: #0f8b8d;
  --green: #287d4b;
  --amber: #b56b13;
  --red: #b33b3b;
  --violet: #6457a6;
  --shadow: 0 16px 36px rgba(20, 31, 46, 0.08);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111820;
  --surface: #182332;
  --surface-2: #202c3b;
  --ink: #e8f0f8;
  --muted: #a9b7c7;
  --line: #334357;
  --text: #e8f0f8;
  --border: #334357;
  --blue: #4d90d9;
  --blue-soft: #203752;
  --teal: #39b9b9;
  --green: #57b77f;
  --amber: #e0a044;
  --red: #e16d6d;
  --violet: #9a90de;
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 1280px;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

button,
select {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  transition: grid-template-columns 180ms ease;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 68px minmax(0, 1fr);
}

.sidebar-collapsed-persisted .app-shell {
  grid-template-columns: 68px minmax(0, 1fr);
  transition: none;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 100vh;
  overflow: visible;
  background: #142132;
  color: #eef5fb;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
}

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

.brand-title {
  font-size: 15px;
  font-weight: 750;
  line-height: 1.2;
}

.brand-subtitle {
  margin-top: 2px;
  color: #a9b8c9;
  font-size: 12px;
}

.sidebar-toggle {
  position: absolute;
  top: 96px;
  right: -15px;
  z-index: 35;
  width: 30px;
  min-height: 64px;
  border: 1px solid #344b67;
  border-radius: 0 8px 8px 0;
  background: #1a2a3d;
  color: #dce7f3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  cursor: pointer;
  box-shadow: 8px 0 18px rgba(20, 31, 46, 0.12);
  transition: background 140ms ease, border-color 140ms ease;
}

.sidebar-toggle-icon {
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.sidebar-toggle:hover {
  background: #223349;
  border-color: #46617f;
}

.app-shell.sidebar-collapsed .sidebar {
  padding: 22px 6px;
  align-items: center;
}

.sidebar-collapsed-persisted .sidebar {
  padding: 22px 6px;
  align-items: center;
}

.app-shell.sidebar-collapsed .brand {
  justify-content: center;
}

.sidebar-collapsed-persisted .brand {
  justify-content: center;
}

.app-shell.sidebar-collapsed .brand > div:not(.brand-mark),
.app-shell.sidebar-collapsed .nav-label,
.app-shell.sidebar-collapsed .nav-arrow,
.app-shell.sidebar-collapsed .sidebar-status div:last-child,
.sidebar-collapsed-persisted .brand > div:not(.brand-mark),
.sidebar-collapsed-persisted .nav-label,
.sidebar-collapsed-persisted .nav-arrow,
.sidebar-collapsed-persisted .sidebar-status div:last-child {
  display: none;
}

.app-shell.sidebar-collapsed .brand-mark {
  width: 44px;
  height: 44px;
}

.sidebar-collapsed-persisted .brand-mark {
  width: 44px;
  height: 44px;
}

.app-shell.sidebar-collapsed .sidebar-toggle {
  width: 30px;
}

.sidebar-collapsed-persisted .sidebar-toggle {
  width: 30px;
}

.app-shell.sidebar-collapsed .sidebar-toggle-icon::before {
  content: ">";
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.sidebar-collapsed-persisted .sidebar-toggle-icon::before {
  content: ">";
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.app-shell.sidebar-collapsed .sidebar-toggle-icon {
  font-size: 0;
}

.sidebar-collapsed-persisted .sidebar-toggle-icon {
  font-size: 0;
}

.app-shell.sidebar-collapsed .nav-list {
  width: 100%;
}

.sidebar-collapsed-persisted .nav-list {
  width: 100%;
}

.app-shell.sidebar-collapsed .nav-group {
  width: 100%;
}

.sidebar-collapsed-persisted .nav-group {
  width: 100%;
}

.app-shell.sidebar-collapsed .nav-item {
  width: 100%;
  min-width: 0;
  flex-shrink: 0;
  position: relative;
}

.sidebar-collapsed-persisted .nav-item {
  width: 100%;
  min-width: 0;
  flex-shrink: 0;
  position: relative;
}

.app-shell.sidebar-collapsed .nav-item.active::after {
  content: "";
  position: absolute;
  right: -7px;
  top: 12px;
  width: 3px;
  height: 30px;
  border-radius: 8px;
  background: #5aa2ff;
}

.sidebar-collapsed-persisted .nav-item.active::after {
  content: "";
  position: absolute;
  right: -7px;
  top: 12px;
  width: 3px;
  height: 30px;
  border-radius: 8px;
  background: #5aa2ff;
}

.app-shell.sidebar-collapsed .sidebar-status {
  width: 100%;
  min-height: 46px;
  justify-content: center;
  padding: 0 10px;
}

.sidebar-collapsed-persisted .sidebar-status {
  width: 100%;
  min-height: 46px;
  justify-content: center;
  padding: 0 10px;
}

.nav-list {
  display: grid;
  gap: 6px;
}

.nav-group {
  position: relative;
}

.nav-group.has-submenu::after {
  content: "";
  position: absolute;
  left: 100%;
  top: 0;
  width: 18px;
  height: max(100%, 46px);
}

.nav-item {
  width: 100%;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  color: #cbd8e7;
  cursor: pointer;
  text-align: left;
  font-size: 80%;
}

.nav-label {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-arrow {
  margin-left: auto;
  color: #8fa2b8;
  font-size: 18px;
  line-height: 1;
}

.nav-item:hover,
.nav-item.active,
.nav-group:hover .nav-item {
  background: #223349;
  border-color: #344b67;
  color: #ffffff;
}

.nav-flyout {
  position: absolute;
  left: calc(100% + 8px);
  top: 0;
  z-index: 80;
  width: 250px;
  max-height: min(520px, calc(100vh - 32px));
  overflow-y: auto;
  border: 1px solid #2d4058;
  border-radius: 0 10px 10px 0;
  background: #182231;
  box-shadow: 18px 18px 36px rgba(10, 18, 30, 0.22);
  padding: 12px;
  display: grid;
  gap: 6px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-6px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.nav-group:hover .nav-flyout {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.nav-flyout-title {
  display: none;
}

.submenu-item {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #cbd8e7;
  padding: 0 10px;
  text-align: left;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.submenu-item:hover,
.submenu-item.active {
  background: #275eb8;
  border-color: #366fca;
  color: #ffffff;
}

.nav-icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  flex: 0 0 26px;
}

.sidebar-status {
  margin-top: auto;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid #344b67;
  background: #1a2a3d;
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #54d17a;
  box-shadow: 0 0 0 4px rgba(84, 209, 122, 0.15);
}

.status-title {
  font-size: 13px;
  font-weight: 750;
}

.status-note {
  margin-top: 2px;
  color: #a9b8c9;
  font-size: 12px;
}

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

.finance-page-loading .workspace {
  visibility: hidden;
}

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

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 25px;
  line-height: 1.15;
}

.topbar p,
.panel-header p {
  color: var(--muted);
  margin-top: 4px;
  font-size: 12px;
}

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

select {
  min-width: 210px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 0 12px;
}

.segmented {
  min-height: 28px;
  display: flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.segment {
  min-width: 58px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.segment.active {
  background: var(--blue);
  box-shadow: none;
  color: #ffffff;
  font-weight: 650;
}

.store-strip {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin-bottom: 12px;
  overflow: hidden;
}

.store-chip {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 12px;
  background: var(--surface);
  display: grid;
  gap: 4px;
  text-align: left;
  cursor: pointer;
  align-content: center;
  transition:
    min-height 260ms ease,
    padding 260ms ease,
    background 140ms ease,
    border-color 140ms ease;
}

.store-chip[hidden] {
  display: none;
}

.store-strip:hover .store-chip {
  min-height: 50px;
  padding: 8px 12px;
  align-content: start;
}

.store-chip span {
  color: #4d5a6a;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-chip strong {
  max-height: 0;
  opacity: 0;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition:
    max-height 240ms ease,
    opacity 220ms ease;
}

.store-strip:hover .store-chip strong {
  max-height: 18px;
  opacity: 1;
}

.store-chip.active {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.store-chip.warn {
  border-color: #e4c07b;
  background: #fff8e8;
}

.store-add-button {
  position: relative;
  flex: 0 0 46px;
  min-width: 0;
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  background: var(--surface);
  color: var(--blue);
  display: grid;
  place-items: center;
  font-size: 0;
  line-height: 1;
  font-weight: 850;
  cursor: pointer;
  transition:
    min-height 260ms ease,
    background 140ms ease,
    border-color 140ms ease;
}

.store-add-button::before,
.store-add-button::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 13px;
  height: 3px;
  border-radius: 3px;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.store-add-button::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.store-strip:hover .store-add-button {
  min-height: 50px;
}

.store-add-button:hover {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.store-delete {
  position: absolute;
  top: 5px;
  right: 6px;
  width: 22px;
  height: 22px;
  min-height: 22px;
  border: 0;
  border-radius: 4px;
  padding: 0;
  background: transparent;
  color: var(--muted);
  display: block;
  opacity: 0;
  transform: scale(0.86);
  pointer-events: none;
  cursor: pointer;
  transition:
    opacity 140ms ease,
    transform 140ms ease,
    background 140ms ease,
    color 140ms ease,
    border-color 140ms ease;
}

.store-delete::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  display: block;
  background: currentColor;
  transform: translate(-50%, -50%);
  -webkit-mask: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16'/%3E%3Cpath d='M9 7V5.6A2.6 2.6 0 0 1 11.6 3h.8A2.6 2.6 0 0 1 15 5.6V7'/%3E%3Cpath d='M6.5 9.5l.8 9.1A2.7 2.7 0 0 0 10 21h4a2.7 2.7 0 0 0 2.7-2.4l.8-9.1'/%3E%3Cpath d='M10 12v5'/%3E%3Cpath d='M14 12v5'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16'/%3E%3Cpath d='M9 7V5.6A2.6 2.6 0 0 1 11.6 3h.8A2.6 2.6 0 0 1 15 5.6V7'/%3E%3Cpath d='M6.5 9.5l.8 9.1A2.7 2.7 0 0 0 10 21h4a2.7 2.7 0 0 0 2.7-2.4l.8-9.1'/%3E%3Cpath d='M10 12v5'/%3E%3Cpath d='M14 12v5'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}

.store-chip:hover .store-delete {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.store-delete:hover {
  background: #fff0f0;
  color: var(--red);
}

.under-development {
  min-height: calc(100vh - 210px);
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
}

.under-development strong {
  color: var(--ink);
  font-size: 24px;
  line-height: 1.2;
}

.rnp-view {
  display: grid;
  gap: 12px;
}

.rnp-view[hidden] {
  display: none;
}

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

.rnp-kpi-card,
.rnp-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 16px 34px rgba(20, 31, 46, 0.06);
}

.rnp-kpi-card {
  min-height: 104px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 16px 18px;
}

.rnp-kpi-card.warn {
  border-color: #efc56f;
  background: #fff9e8;
}

.rnp-kpi-card span,
.rnp-kpi-card small {
  color: var(--muted);
  font-weight: 800;
}

.rnp-kpi-card strong {
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.rnp-panel {
  display: grid;
  gap: 12px;
  padding: 18px 20px 20px;
}

.rnp-dashboard-table-panel {
  padding: 14px 14px 16px;
}

.rnp-dashboard-toolbar {
  display: flex;
  flex-direction: row-reverse;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.rnp-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rnp-period-switch .segment-button {
  min-width: 96px;
}

.rnp-table-settings-button {
  width: 176px;
  min-width: 176px;
  height: 40px;
}

.rnp-table-settings-modal {
  z-index: 70;
}

.rnp-table-settings-panel {
  width: min(720px, calc(100vw - 44px));
  gap: 14px;
}

.rnp-table-settings-panel h3 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.2;
}

.rnp-table-settings-panel p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.rnp-column-settings-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  max-height: min(560px, calc(100vh - 230px));
  overflow: auto;
  padding: 2px 2px 4px;
}

.rnp-column-settings-section {
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #e2e8ef;
  padding: 9px 12px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.rnp-column-settings-section:first-child {
  margin-top: 0;
}

.rnp-column-settings-section input {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
}

.rnp-column-settings-section span {
  text-align: center;
}

.rnp-column-setting {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 8px 10px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.rnp-column-setting:hover {
  border-color: var(--blue);
  background: #eef6ff;
}

.rnp-column-setting.disabled {
  cursor: default;
  opacity: 0.72;
}

.rnp-column-setting.disabled:hover {
  border-color: var(--line);
  background: var(--surface-2);
}

.rnp-column-setting.section-disabled {
  opacity: 0.62;
}

.rnp-column-setting input {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
  flex: 0 0 auto;
}

.rnp-column-setting span {
  min-width: 0;
  white-space: normal;
  line-height: 1.2;
}

.rnp-date-field {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.rnp-date-picker {
  position: relative;
}

.rnp-date-button {
  width: 212px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 850;
  cursor: pointer;
}

.rnp-date-button:hover,
.rnp-date-button[aria-expanded="true"] {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(42, 109, 183, 0.08);
}

.rnp-date-popover {
  width: 274px;
  padding: 10px;
}

.rnp-wide-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  margin-bottom: 384px;
}

.rnp-dashboard-table {
  --rnp-grid-line: #b8c3cf;
  width: max-content;
  min-width: 3240px;
  border-collapse: collapse;
  table-layout: fixed;
}

.rnp-dashboard-table th,
.rnp-dashboard-table td {
  width: 84px;
  min-width: 84px;
  height: 44px;
  padding: 6px 7px;
  border-right: 1px solid var(--rnp-grid-line);
  border-bottom: 1px solid var(--rnp-grid-line);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
  font-size: 11px;
  font-weight: 400;
}

.rnp-dashboard-table thead th {
  height: 48px;
  background: #e2e8ef;
  border-right-color: var(--rnp-grid-line);
  border-bottom-color: var(--rnp-grid-line);
  text-align: center;
  vertical-align: middle;
  white-space: normal;
  line-height: 1.15;
}

.rnp-dashboard-table thead tr:first-child th {
  height: 30px;
  border-top: 0;
  border-right: 1px solid var(--rnp-grid-line);
  border-bottom: 1px solid var(--rnp-grid-line);
  background: #d6dde5;
  font-size: 11px;
  font-weight: 400;
}

.rnp-dashboard-table td {
  text-align: center;
  background: var(--surface);
}

.rnp-dashboard-table td:first-child,
.rnp-dashboard-table td[data-rnp-col="21"],
.rnp-dashboard-table td[data-rnp-col="39"] {
  text-align: left;
}

.rnp-dashboard-table th:first-child,
.rnp-dashboard-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  width: 230px;
  min-width: 230px;
  border-right: 1px solid var(--rnp-grid-line);
  box-shadow: inset -1px 0 0 var(--rnp-grid-line);
}

.rnp-dashboard-table thead th:first-child {
  z-index: 4;
}

.rnp-dashboard-table th:first-child::after,
.rnp-dashboard-table td:first-child::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 1px;
  background: var(--rnp-grid-line);
  pointer-events: none;
  z-index: 8;
}

.rnp-dashboard-table th[data-rnp-col="1"],
.rnp-dashboard-table td[data-rnp-col="1"],
.rnp-dashboard-table th[data-rnp-col="22"],
.rnp-dashboard-table td[data-rnp-col="22"],
.rnp-dashboard-table th[data-rnp-col="35"],
.rnp-dashboard-table td[data-rnp-col="35"] {
  width: 62px;
  min-width: 62px;
}

.rnp-dashboard-table th[data-rnp-col="39"],
.rnp-dashboard-table td[data-rnp-col="39"] {
  width: 230px;
  min-width: 230px;
}

.rnp-dashboard-table td.rnp-combined-cell {
  width: 380px;
  min-width: 380px;
  text-align: left;
}

.rnp-combined-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(110px, 0.58fr);
  gap: 8px;
  align-items: center;
}

.rnp-combined-fields .rnp-cell-input {
  width: 100%;
  min-width: 0;
  text-align: left;
}

.rnp-detail-row .rnp-combined-cell .rnp-cell-value {
  justify-content: flex-start;
}

.rnp-dashboard-table td.rnp-comments-actions-cell {
  width: 230px;
  min-width: 230px;
  text-align: left;
  vertical-align: top;
}

.rnp-dashboard-table th[data-rnp-col="39"],
.rnp-dashboard-table td[data-rnp-col="39"] {
  width: 230px;
  min-width: 230px;
}

.rnp-dashboard-table th[data-rnp-col="1"],
.rnp-dashboard-table td[data-rnp-col="1"],
.rnp-dashboard-table th[data-rnp-col="22"],
.rnp-dashboard-table td[data-rnp-col="22"],
.rnp-dashboard-table th[data-rnp-col="35"],
.rnp-dashboard-table td[data-rnp-col="35"] {
  width: 62px;
  min-width: 62px;
}

.rnp-dashboard-table td.rnp-comments-actions-cell .rnp-cell-input {
  width: 100%;
  min-width: 0;
  text-align: left;
}

.rnp-dashboard-table td.rnp-merged-comments-cell {
  position: relative;
  padding: 0;
}

.rnp-dashboard-table th[data-rnp-col="36"],
.rnp-dashboard-table td[data-rnp-col="36"] {
  border-right: 0;
}

.rnp-dashboard-table th[data-rnp-col="39"],
.rnp-dashboard-table td[data-rnp-col="39"] {
  border-left: 1px solid var(--rnp-grid-line);
}

.rnp-comment-cell-button {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 8px 10px;
  font: inherit;
  font-size: 10px;
  font-weight: 400;
  text-align: left;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  cursor: pointer;
  overflow: auto;
}

.rnp-comment-cell-button span {
  display: block;
  width: 100%;
  min-width: 0;
  text-align: left;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

.rnp-comment-cell-button:hover {
  background: rgba(42, 109, 183, 0.08);
}

.rnp-comment-cell-button.empty {
  color: var(--muted);
  opacity: 0.58;
}

.rnp-detail-row + .rnp-detail-row td.rnp-merged-comments-cell,
.rnp-detail-row td.rnp-merged-comments-cell {
  border-top: 0;
}

.rnp-comment-panel {
  width: min(560px, calc(100vw - 44px));
}

.rnp-comment-panel h3 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.2;
}

.rnp-comment-field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.rnp-comment-field textarea {
  width: 100%;
  min-height: 148px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.35;
  outline: none;
}

.rnp-comment-field textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(42, 109, 183, 0.1);
}

.rnp-row-product-cell {
  grid-template-columns: 20px minmax(0, 1fr) 22px;
  gap: 6px;
}

.rnp-dashboard-table tbody tr.rnp-main-row td {
  height: 44px;
}

.rnp-detail-row {
  height: 28.6px;
}

.rnp-detail-row td {
  height: 28.6px;
  padding-top: 0;
  padding-bottom: 0;
  font-size: 9px;
  line-height: 1;
}

.rnp-detail-first-cell {
  color: var(--muted);
  font-size: 9px;
  font-weight: 400;
}

.rnp-detail-first-cell span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rnp-cell-input {
  height: 28px;
  padding: 0 6px;
  text-align: right;
}

.rnp-row-product-cell .article-drag-handle,
.rnp-row-product-cell .article-drag-placeholder {
  width: 20px;
}

.rnp-row-product-cell .rnp-cell-input {
  width: 100%;
  min-width: 0;
  padding-left: 3px;
  padding-right: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rnp-cell-value {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 28px;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: break-word;
  text-align: center;
  font-size: 10px;
  line-height: 1.15;
}

.rnp-detail-row .rnp-cell-value {
  min-height: 0;
  height: 20px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow-wrap: normal;
  font-size: 9px;
  line-height: 1;
}

.rnp-detail-row td.rnp-readonly-cell {
  padding-top: 0;
  padding-bottom: 0;
}

.rnp-dashboard-table td.rnp-readonly-cell {
  padding: 4px 6px;
  overflow: visible;
  text-align: center;
  white-space: normal;
}

.rnp-article-cell-td .rnp-cell-input,
.rnp-dashboard-table td[data-rnp-col="21"] .rnp-cell-input,
.rnp-dashboard-table td[data-rnp-col="39"] .rnp-cell-input {
  text-align: left;
}

.rnp-empty-row .rnp-cell-input {
  color: var(--muted);
}

.rnp-dashboard-table tbody tr:hover td {
  background: #f7fbff;
}

.rnp-dashboard-table tbody td.rnp-fill-gray {
  background: #d9d9d9;
}

.rnp-dashboard-table tbody td.rnp-fill-peach {
  background: #f6dfc3;
}

.rnp-dashboard-table tbody td.rnp-fill-light-green {
  background: #dcefd7;
}

.rnp-dashboard-table tbody td.rnp-fill-medium-green {
  background: #b9d9ac;
}

.rnp-dashboard-table tbody td.rnp-fill-strong-green {
  background: #94c67e;
}

.rnp-dashboard-table tbody td.rnp-fill-pink {
  background: #ead1dc;
}

.rnp-dashboard-table tbody td.rnp-fill-dark-green {
  background: #6eab52;
}

.rnp-dashboard-table tbody td.rnp-fill-blue-gray {
  background: #d9eaed;
}

.rnp-dashboard-table tbody td.rnp-fill-lilac {
  background: #d9d2e9;
}

.rnp-dashboard-table tbody td.rnp-fill-blue {
  background: #c8dbf5;
}

.rnp-dashboard-table tbody td.rnp-fill-soft-gray {
  background: #f2f2f2;
}

.rnp-dashboard-table tbody td .rnp-cell-input {
  background: transparent;
  font-size: 10px;
  font-weight: 400;
}

.rnp-dashboard-table tr:last-child td {
  border-bottom: 0;
}

.rnp-dashboard-table th:last-child,
.rnp-dashboard-table td:last-child {
  border-right: 0;
}

.rnp-chart {
  min-height: 260px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  padding: 18px 14px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.rnp-chart-scale {
  display: grid;
  align-content: space-between;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-align: right;
}

.rnp-chart-bars {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: end;
  gap: 14px;
  min-height: 215px;
  padding: 0 10px 22px;
  background:
    linear-gradient(to bottom, transparent 24%, var(--line) 24%, transparent calc(24% + 1px)),
    linear-gradient(to bottom, transparent 49%, var(--line) 49%, transparent calc(49% + 1px)),
    linear-gradient(to bottom, transparent 74%, var(--line) 74%, transparent calc(74% + 1px));
}

.rnp-chart-bar {
  position: relative;
  align-self: end;
  height: var(--revenue);
  min-height: 36px;
  border-radius: 6px 6px 0 0;
  background: #76bdc0;
}

.rnp-chart-bar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--ads);
  border-radius: 0;
  background: #c8ced6;
}

.rnp-chart-bar span {
  position: absolute;
  left: 50%;
  bottom: -24px;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.rnp-chart-legend {
  display: flex;
  gap: 16px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

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

.rnp-chart-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.rnp-chart-legend .teal {
  background: #76bdc0;
}

.rnp-chart-legend .gray {
  background: #c8ced6;
}

.rnp-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 12px;
}

.rnp-funnel-list {
  display: grid;
  gap: 12px;
}

.rnp-funnel-list div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 14px;
  align-items: center;
}

.rnp-funnel-list span {
  color: var(--muted);
  font-weight: 800;
}

.rnp-funnel-list strong {
  font-size: 18px;
  text-align: right;
}

.rnp-funnel-list em {
  grid-column: 1 / -1;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--blue) var(--fill), #e6edf5 var(--fill));
}

.rnp-mini-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.rnp-mini-table th,
.rnp-mini-table td {
  height: 42px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 800;
}

.rnp-mini-table th {
  background: #e8edf3;
  text-align: left;
}

.rnp-mini-table th:not(:first-child),
.rnp-mini-table td:not(:first-child) {
  text-align: right;
}

.rnp-mini-table tr:last-child td {
  border-bottom: 0;
}

.rnp-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.rnp-status.good {
  background: #e3f5eb;
  color: #08703f;
}

.rnp-status.warn {
  background: #fff4d9;
  color: #a46100;
}

.rnp-status.bad {
  background: #fde6e6;
  color: #b52b2b;
}

.rnp-campaign-compare-panel {
  gap: 14px;
}

.rnp-sheet-compare-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.rnp-sheet-compare-header h2 {
  margin: 0 0 4px;
  font-size: 22px;
  line-height: 1.15;
}

.rnp-sheet-compare-header p {
  margin: 0;
  color: var(--muted);
}

.rnp-compare-column-control {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 4px 0;
}

.rnp-campaign-search,
.rnp-compare-date-field {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
}

.rnp-compare-column-control .rnp-campaign-search,
.rnp-compare-column-control .rnp-compare-date-field {
  color: var(--text);
  text-transform: none;
  text-align: center;
}

.rnp-compare-column-control .rnp-campaign-search span,
.rnp-compare-column-control .rnp-compare-date-field span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.rnp-date-control,
.rnp-campaign-search input {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 800;
}

.rnp-campaign-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}

.rnp-campaign-search input {
  padding: 0 34px 0 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

.rnp-campaign-dropdown-button {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  transform: translateY(-50%);
  cursor: pointer;
}

.rnp-campaign-dropdown-button::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #5d6b7c;
}

.rnp-campaign-dropdown-button:hover {
  background: #edf3f9;
}

.rnp-campaign-options-popover {
  position: fixed;
  z-index: 55;
  display: grid;
  gap: 4px;
  width: 360px;
  max-height: 260px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.rnp-campaign-options-popover[hidden] {
  display: none;
}

.rnp-campaign-options-popover button {
  min-width: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  padding: 8px 10px;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rnp-campaign-options-popover button:hover {
  background: #eef6ff;
}

.rnp-date-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  gap: 8px;
}

.rnp-date-control strong {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

.rnp-sheet-compare-main {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.rnp-sheet-compare-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.rnp-sheet-compare-table th,
.rnp-sheet-compare-table td {
  border: 1px solid #cfd8e3;
  padding: 13px 14px;
  font-size: 14px;
  line-height: 1.25;
  text-align: right;
  vertical-align: middle;
}

.rnp-sheet-compare-table td:nth-child(2),
.rnp-sheet-compare-table td:nth-child(3),
.rnp-sheet-compare-table td:nth-child(4) {
  text-align: center;
}

.rnp-sheet-compare-table th {
  background: #dbe4ee;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  text-align: center;
  vertical-align: middle;
}

.rnp-sheet-compare-table th small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  text-transform: none;
  font-weight: 700;
}

.rnp-sheet-compare-table thead th {
  padding: 12px 14px;
  vertical-align: middle;
}

.rnp-sheet-compare-table th:first-child,
.rnp-sheet-compare-table td:first-child {
  text-align: left;
  font-weight: 800;
}

.rnp-compare-date-popover {
  position: fixed;
  z-index: 50;
  width: 340px;
}

.rnp-compare-date-popover p {
  margin: 10px 4px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.rnp-compare-date-popover .calendar-day.in-range {
  background: #dbeafe;
  color: var(--text);
}

.rnp-positions-panel {
  gap: 14px;
}

.rnp-positions-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rnp-positions-wrap {
  width: 100%;
  overflow: auto;
  padding-bottom: 260px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.rnp-positions-table-frame {
  display: inline-block;
  width: max-content;
  border: 1px solid var(--rnp-grid-line, #b8c3cf);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
  vertical-align: top;
}

.rnp-positions-table {
  --rnp-grid-line: #b8c3cf;
  width: max-content;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
  background: var(--surface);
}

.rnp-positions-table th,
.rnp-positions-table td {
  height: 44px;
  border: 0;
  border-right: 1px solid var(--rnp-grid-line);
  border-bottom: 1px solid var(--rnp-grid-line);
  background: var(--surface);
  color: var(--ink);
  font-size: 11px;
  font-weight: 400;
  overflow: hidden;
  padding: 6px 7px;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.rnp-positions-table thead tr:first-child th:first-child {
  border-top-left-radius: 8px;
}

.rnp-positions-table thead tr:first-child th:last-child {
  border-top-right-radius: 8px;
}

.rnp-positions-table tbody tr:last-child td:first-child {
  border-bottom-left-radius: 8px;
}

.rnp-positions-table tbody tr:last-child td:last-child {
  border-bottom-right-radius: 8px;
}

.rnp-positions-table tr > :last-child {
  border-right: 0;
}

.rnp-positions-table tbody tr:last-child > td {
  border-bottom: 0;
}

.rnp-positions-table tbody tr {
  height: 44px;
}

.rnp-positions-table tbody tr.rnp-position-article-start > td {
  border-top: 1px solid var(--rnp-grid-line);
}

.rnp-positions-table th {
  height: 48px;
  background: #e2e8ef;
  color: var(--ink);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.15;
  text-align: center;
  text-transform: uppercase;
  white-space: normal;
}

.rnp-positions-table thead tr:first-child th {
  height: 30px;
  background: #d6dde5;
  border-right: 1px solid var(--rnp-grid-line);
  border-bottom: 1px solid var(--rnp-grid-line);
  font-size: 11px;
  font-weight: 400;
}

.rnp-position-history-head {
  width: 90px;
  min-width: 90px;
  max-width: 90px;
}

.rnp-positions-table .rnp-position-history-cell {
  width: 90px;
  min-width: 90px;
  max-width: 90px;
  box-sizing: border-box;
}

.rnp-position-base-head:nth-child(2) {
  width: 225px;
  min-width: 225px;
}

.rnp-position-base-head:nth-child(3) {
  width: 300px;
  min-width: 300px;
}

.rnp-position-base-head:nth-child(4) {
  width: 68px;
  min-width: 68px;
}

.rnp-position-date-head {
  min-width: 100px;
}

.rnp-position-time-head {
  width: 100px;
  min-width: 100px;
}

.rnp-position-action-head {
  width: 118px;
  min-width: 118px;
}

.rnp-position-head-control {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  min-height: 32px;
  padding: 2px 22px 2px 2px;
}

.rnp-position-head-control input,
.rnp-position-article-input,
.rnp-position-key-input,
.rnp-position-depth-input,
.rnp-position-cell-input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 11px;
  font-weight: 400;
  outline: 0;
}

.rnp-position-head-control input {
  height: 22px;
  text-align: center;
}

.rnp-position-article-merged-cell {
  vertical-align: middle;
}

.rnp-position-article-cell {
  position: relative;
  display: grid;
  align-content: center;
  gap: 8px;
  height: 100%;
  min-width: 0;
  min-height: 100%;
  padding: 2px 28px 2px 0;
}

.rnp-position-article-input {
  height: 24px;
  padding-right: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rnp-position-article-cell .rnp-campaign-dropdown-button {
  top: 50%;
  right: 26px;
}

.rnp-position-article-cell .rnp-position-article-delete {
  top: 50%;
  right: 2px;
  transform: translateY(-50%);
}

.rnp-position-article-delete,
.rnp-position-key-delete,
.rnp-position-delete-button {
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease;
}

.rnp-position-article-cell:hover .rnp-position-article-delete,
.rnp-position-key-cell:hover .rnp-position-key-delete,
.rnp-position-head-control:hover .rnp-position-delete-button {
  opacity: .78;
  pointer-events: auto;
}

.rnp-position-key-cell {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 32px;
  padding: 2px 52px 2px 0;
}

.rnp-position-key-input {
  height: 24px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rnp-position-depth-input,
.rnp-position-cell-input {
  height: 24px;
  text-align: center;
}

.rnp-position-history-cell {
  padding-left: 3px;
  padding-right: 3px;
  text-align: center;
  vertical-align: middle;
}

.rnp-position-history-cell-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  min-width: 0;
}

.rnp-position-drag-handle,
.rnp-position-drag-placeholder {
  width: 20px;
  height: 24px;
  flex: 0 0 20px;
}

.rnp-position-drag-handle::before {
  width: 14px;
  height: 14px;
  background-position:
    2px 2px,
    7px 2px,
    12px 2px,
    2px 7px,
    7px 7px,
    12px 7px,
    2px 12px,
    7px 12px,
    12px 12px;
}

.rnp-positions-table .rnp-position-drag-handle,
.rnp-positions-table .rnp-position-drag-placeholder {
  width: 20px;
  height: 24px;
  flex: 0 0 20px;
}

.rnp-positions-table .rnp-position-drag-handle::before {
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  background-position:
    2px 2px,
    7px 2px,
    12px 2px,
    2px 7px,
    7px 7px,
    12px 7px,
    2px 12px,
    7px 12px,
    12px 12px;
  transform: translate(-50%, -50%);
}

.rnp-position-row-action {
  text-align: center;
}

.rnp-position-row-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.rnp-position-history-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 50px;
  min-width: 50px;
  height: 24px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  font: inherit;
  font-size: 10px;
  font-weight: 400;
  line-height: 1;
  padding: 0 3px;
  text-align: left;
  white-space: nowrap;
}

.rnp-position-inline-add {
  position: absolute;
  right: 2px;
  bottom: 2px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  min-height: 22px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  font: inherit;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease, background 140ms ease, border-color 140ms ease;
}

.rnp-position-key-cell:hover .rnp-position-inline-add,
.rnp-position-head-control:hover .rnp-position-inline-add {
  opacity: 1;
  pointer-events: auto;
}

.rnp-position-inline-add:hover {
  background: #eef6ff;
  border-color: #b9cbe0;
}

.rnp-position-time-add {
  right: 2px;
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
}

.rnp-position-head-control .rnp-position-delete-button {
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
}

.rnp-position-key-cell .rnp-position-key-add,
.rnp-position-key-cell .rnp-position-key-delete {
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
}

.rnp-position-key-cell .rnp-position-key-add {
  right: 26px;
}

.rnp-position-key-cell .rnp-position-key-delete {
  right: 2px;
}

.rnp-position-article-delete,
.rnp-position-key-delete,
.rnp-position-delete-button {
  top: 2px;
  right: 2px;
  transform: scale(1);
}

.rnp-position-history-button:hover {
  background: #eef6ff;
  border-color: #b9cbe0;
}

.rnp-position-row-delete {
  opacity: .68;
}

.rnp-position-row-delete:hover,
.rnp-position-delete-button:hover {
  opacity: 1;
}

.rnp-position-article-popover {
  position: fixed;
  z-index: 55;
  display: grid;
  gap: 4px;
  width: 360px;
  max-height: 260px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.rnp-position-article-popover[hidden] {
  display: none;
}

.rnp-position-article-popover button {
  min-width: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  padding: 8px 10px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rnp-position-article-popover button:hover {
  background: #eef6ff;
}

.modal-backdrop.rnp-position-history-modal {
  z-index: 150;
  inset: 0 0 0 250px;
  place-items: center;
  padding: 18px;
}

.app-shell.sidebar-collapsed .rnp-position-history-modal,
.sidebar-collapsed-persisted .rnp-position-history-modal {
  inset: 0 0 0 68px;
}

.rnp-position-confirm-modal {
  z-index: 76;
}

.modal-backdrop .rnp-position-confirm-panel {
  width: min(460px, calc(100vw - 44px));
  max-width: 100%;
  padding: 20px;
  gap: 14px;
  background: var(--surface);
}

.rnp-position-confirm-panel h3 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.25;
}

.rnp-position-confirm-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.rnp-position-confirm-panel .modal-actions {
  margin-top: 2px;
  gap: 10px;
}

.rnp-position-confirm-panel .modal-actions .secondary-action,
.rnp-position-confirm-panel .modal-actions .primary-action {
  box-sizing: border-box;
  width: auto;
  min-width: 92px;
  height: 36px;
  padding: 0 18px;
  font-size: 13px;
}

.modal-backdrop .rnp-position-history-panel {
  width: 100%;
  max-width: none;
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  gap: 14px;
  background: #fff;
  opacity: 1;
  position: relative;
  padding: 20px;
}

.rnp-position-history-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  background: #fff;
}

.rnp-position-history-header h3 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.15;
}

.rnp-position-history-header p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.rnp-position-history-wrap {
  max-height: 460px;
  overflow: auto;
  border: 1px solid #b8c3cf;
  border-radius: 8px;
  background: #fff;
  isolation: isolate;
}

.rnp-position-history-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  background: #fff;
}

.rnp-position-history-table th,
.rnp-position-history-table td {
  height: 44px;
  border: 0;
  border-right: 1px solid #b8c3cf;
  border-bottom: 1px solid #b8c3cf;
  padding: 6px 10px;
  color: var(--text);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.25;
  vertical-align: middle;
}

.rnp-position-history-table th {
  background: #e2e8ef;
  color: var(--ink);
  font-size: 11px;
  font-weight: 400;
  text-align: center;
  text-transform: uppercase;
}

.rnp-position-history-table thead tr:first-child th {
  height: 30px;
  background: #d6dde5;
}

.rnp-position-history-table tr > :last-child {
  border-right: 0;
}

.rnp-position-history-table tbody tr:last-child > td {
  border-bottom: 0;
}

.rnp-position-history-key-head,
.rnp-position-history-key-cell {
  width: 300px;
  min-width: 300px;
  max-width: 300px;
  text-align: left;
}

.rnp-position-history-key-cell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rnp-position-history-depth-head,
.rnp-position-history-depth-cell {
  width: 150px;
  min-width: 150px;
  max-width: 150px;
}

.rnp-position-history-date-head,
.rnp-position-history-time-head,
.rnp-position-history-value-cell {
  width: 100px;
  min-width: 100px;
  max-width: 100px;
}

.rnp-position-history-depth-cell,
.rnp-position-history-value-cell {
  text-align: center;
}

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

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

.planfact-view[hidden] {
  display: none;
}

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

.planfact-toolbar h2 {
  margin: 0 0 4px;
}

.planfact-toolbar p {
  margin: 0;
  color: var(--muted);
}

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

.segmented-control {
  min-height: 34px;
  display: flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.segment-button {
  min-width: 88px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #5c6878;
  font-weight: 850;
  cursor: pointer;
}

.segment-button.active {
  background: var(--blue);
  color: white;
}

.planfact-select-label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.planfact-select-label select {
  min-width: 120px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 10px;
  font-weight: 800;
}

.planfact-plan-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.planfact-plan-toolbar h2 {
  margin: 0 0 4px;
}

.planfact-plan-toolbar p {
  margin: 0;
  color: var(--muted);
}

.planfact-summary-panel {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.planfact-period-card {
  display: grid;
  gap: 12px;
  padding: 18px 20px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 16px 34px rgba(20, 31, 46, 0.06);
}

.planfact-period-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.planfact-period-switch {
  flex-shrink: 0;
}

.planfact-period-switch .segment-button {
  min-width: 82px;
}

.planfact-summary-card {
  min-height: 104px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 16px 34px rgba(20, 31, 46, 0.06);
}

.planfact-summary-card span,
.planfact-summary-card small {
  color: var(--muted);
  font-weight: 800;
}

.planfact-summary-card strong {
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.planfact-dashboard-card {
  display: grid;
  gap: 12px;
  padding: 18px 20px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 16px 34px rgba(20, 31, 46, 0.06);
}

.planfact-week-overview {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 1fr);
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.planfact-week-card {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9fc;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.planfact-week-card:hover {
  border-color: var(--blue);
  background: #f1f7ff;
}

.planfact-week-card span,
.planfact-week-card small,
.planfact-week-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.planfact-week-card strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.1;
}

.planfact-progress,
.planfact-cell-progress span {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6edf5;
}

.planfact-progress span,
.planfact-cell-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.planfact-dashboard-table {
  min-width: 1160px;
}

.planfact-dashboard-table th,
.planfact-dashboard-table td {
  height: 48px;
}

.planfact-dashboard-table th:first-child,
.planfact-dashboard-table td:first-child {
  width: 24%;
}

.planfact-dashboard-table th:last-child,
.planfact-dashboard-table td:last-child {
  overflow: visible;
  text-overflow: clip;
}

.planfact-cell-progress {
  display: grid;
  gap: 5px;
}

.planfact-cell-progress strong {
  font-size: 13px;
  line-height: 1;
}

.planfact-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.planfact-status.good {
  background: #e3f5eb;
  color: #08703f;
}

.planfact-status.warn {
  background: #fff4d9;
  color: #a46100;
}

.planfact-status.bad {
  background: #fde6e6;
  color: #b52b2b;
}

.planfact-status.neutral {
  background: #edf1f6;
  color: var(--muted);
}

.modal-backdrop.plan-week-detail-modal {
  z-index: 150;
  inset: 0 0 0 250px;
  place-items: center;
  padding: 18px;
}

.modal-backdrop.plan-week-detail-modal .plan-week-detail-panel {
  width: 100%;
  max-width: none;
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
}

.app-shell.sidebar-collapsed .modal-backdrop.plan-week-detail-modal,
.sidebar-collapsed-persisted .modal-backdrop.plan-week-detail-modal {
  inset: 0 0 0 68px;
}

.plan-week-detail-subtitle {
  margin: -4px 0 14px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

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

#planFactPlan > .settings-card:not(.planfact-plan-toolbar) {
  display: grid;
  gap: 12px;
  padding: 18px 20px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 16px 34px rgba(20, 31, 46, 0.06);
}

#planFactPlan > .settings-card + .settings-card {
  margin-top: 6px;
}

#planFactPlan > .settings-card:last-child {
  margin-bottom: 384px;
}

#planFactPlan .section-heading {
  margin-bottom: 0;
}

#planFactPlan .section-heading h2 {
  margin: 0 0 6px;
}

#planFactPlan .section-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
}

.plan-table-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.plan-save-button {
  min-width: 118px;
  min-height: 34px;
  flex-shrink: 0;
  font-weight: 900;
  white-space: nowrap;
}

.plan-save-question {
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.35;
}

.plan-save-modal {
  z-index: 120;
}

.planfact-table {
  width: 100%;
  min-width: 980px;
  table-layout: fixed;
  border-collapse: collapse;
}

.planfact-table th,
.planfact-table td {
  height: 42px;
  padding: 8px 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 800;
}

.planfact-table th {
  background: #e8edf3;
  color: var(--ink);
  text-align: center;
}

.planfact-table td:not(:first-child),
.planfact-table tbody td:not(:first-child) {
  text-align: right;
}

.planfact-table tbody td:first-child {
  text-align: left;
}

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

.planfact-table th:last-child,
.planfact-table td:last-child {
  border-right: 0;
}

.planfact-total-row td {
  background: #e8edf3;
  color: var(--ink);
  font-weight: 900;
}

.planfact-week-table {
  min-width: 100%;
}

.planfact-month-table {
  min-width: 1080px;
}

.planfact-week-table thead th {
  text-align: center;
  vertical-align: middle;
}

.planfact-week-table .week-title {
  display: block;
  margin-bottom: 4px;
}

.planfact-week-table th small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
}

.planfact-week-table tbody td:first-child {
  text-align: left;
}

.week-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

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

.plan-week-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}

.plan-week-title-row h2 {
  margin: 0;
}

.plan-week-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.week-nav .text-button {
  min-height: 34px;
  padding: 0 14px;
  font-weight: 900;
  white-space: nowrap;
}

.week-nav .text-button:disabled {
  opacity: 0.45;
  cursor: default;
}

.planfact-number-input {
  width: 100%;
  height: 30px;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  padding: 0 6px;
  text-align: right;
  font: inherit;
  font-weight: 850;
}

.planfact-number-input:hover,
.planfact-number-input:focus {
  outline: 0;
  border-color: var(--blue);
  background: var(--surface);
}

.planfact-date-input {
  width: 100%;
  height: 30px;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-align: center;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.planfact-date-input:hover,
.planfact-date-input:focus {
  outline: 0;
  border-color: var(--blue);
  background: var(--surface);
}

.plan-date-popover {
  position: fixed;
  z-index: 140;
  width: 292px;
}

.planfact-money-edit {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 0.32em;
}

.planfact-money-edit .planfact-number-input {
  padding-right: 0;
  -moz-appearance: textfield;
  appearance: textfield;
}

.planfact-money-edit .planfact-number-input::-webkit-outer-spin-button,
.planfact-money-edit .planfact-number-input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.planfact-money-edit span {
  color: var(--ink);
  font: inherit;
  font-weight: 850;
  line-height: 1;
}

.period-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.period-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.date-range-wrap {
  position: relative;
  display: inline-flex;
}

.fulfillment-toggle {
  min-height: 28px;
  display: flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  flex: 0 0 auto;
}

.fulfillment-option {
  min-width: 52px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.fulfillment-option.active {
  background: var(--blue);
  color: #ffffff;
  font-weight: 650;
}

.date-range-button {
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: var(--surface);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.calendar-trigger-button {
  justify-content: space-between;
}

.calendar-icon {
  position: relative;
  display: inline-block;
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  color: var(--ink);
  border: 2px solid currentColor;
  border-radius: 3px;
}

.calendar-icon::before {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  top: 3px;
  border-top: 2px solid currentColor;
}

.calendar-icon::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  top: -4px;
  height: 4px;
  border-left: 2px solid currentColor;
  border-right: 2px solid currentColor;
}

.date-range-button .calendar-icon {
  margin-left: 2px;
}

.chevron {
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
}

.date-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 8;
  width: 292px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 12px;
}

.date-popover p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.calendar-head {
  display: grid;
  grid-template-columns: 30px 1fr 30px;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.calendar-head strong {
  text-align: center;
  font-size: 13px;
}

.calendar-head button {
  width: 30px;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 750;
  cursor: pointer;
}

.calendar-head button:disabled {
  cursor: default;
  opacity: 0.4;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-weekdays {
  margin-bottom: 5px;
}

.calendar-weekdays span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-align: center;
}

.calendar-day {
  min-height: 30px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #f3f7fb;
  color: var(--ink);
  font-size: 12px;
  cursor: pointer;
}

.calendar-day:hover:not(:disabled) {
  background: var(--blue-soft);
}

.calendar-day:disabled {
  color: #bdc6d1;
  cursor: default;
}

.calendar-day.outside {
  color: #9aa7b6;
  background: transparent;
}

.calendar-day.in-range {
  background: #dbeafe;
}

.calendar-day.selected {
  background: var(--blue);
  color: #ffffff;
}

.metrics-grid {
  display: grid;
  grid-template-columns: 1.42fr 1.12fr 0.8fr 0.46fr;
  gap: 10px;
  margin-bottom: 12px;
}

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

.metric-card {
  padding: 13px;
}

.metric-card.accent {
  border-color: #d5c77d;
  background: #fffbe8;
}

.plan-metric-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(96px, 0.82fr);
  gap: 12px;
  align-items: stretch;
}

.metric-main {
  min-width: 0;
}

.metric-snapshot {
  min-width: 0;
  padding-left: 10px;
  border-left: 1px solid var(--line);
  display: grid;
  align-content: center;
  gap: 6px;
}

.metric-snapshot-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.metric-snapshot-line span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.metric-snapshot-line strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.1;
}

.drr-metric-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: stretch;
}

.drr-snapshot {
  display: grid;
  gap: 6px;
  align-content: center;
  padding-left: 10px;
  border-left: 1px solid rgba(181, 107, 19, 0.22);
}

.drr-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.drr-line span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.drr-line strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
}

.drr-period {
  min-width: 0;
}

.metric-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.metric-value {
  margin-top: 7px;
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
}

.metric-trend {
  margin-top: 8px;
  font-size: 11px;
  font-weight: 700;
}

.metric-plan {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.metric-completion {
  font-weight: 850;
}

.metric-completion.good {
  color: var(--green);
}

.metric-completion.medium {
  color: var(--amber);
}

.metric-completion.bad {
  color: var(--red);
}

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

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

.warning {
  color: var(--amber);
}

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

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

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

.sales-panel {
  grid-column: 1 / -1;
}

.ratios-panel {
  grid-column: 1 / -1;
  padding: 0;
  overflow: hidden;
}

.stock-panel {
  grid-column: 1 / -1;
}

.table-panel {
  grid-column: 1 / -1;
}

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

h2 {
  font-size: 16px;
  line-height: 1.2;
}

.icon-button,
.text-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 30px;
  background: var(--surface-2);
  color: var(--ink);
  cursor: pointer;
}

.icon-button {
  width: 32px;
  font-size: 16px;
}

.chart-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chart-mode-toggle {
  min-height: 30px;
  display: flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.chart-mode {
  min-width: 74px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.chart-mode.active {
  background: var(--blue);
  color: #ffffff;
}

.chart-summary {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}

.ratios-panel .chart-summary {
  margin-top: 0;
  border: 0;
}

.chart-summary.orders-summary {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.summary-item {
  min-height: 82px;
  padding: 11px 13px;
  border-right: 1px solid var(--line);
  display: grid;
  align-content: start;
  gap: 6px;
}

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

.finance-ratios {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.orders-summary .summary-item {
  min-height: 74px;
  padding: 11px 12px;
  gap: 4px;
}

.summary-item:nth-child(4n),
.summary-item:last-child {
  border-right: 0;
}

.orders-summary .summary-item:nth-child(4n) {
  border-right: 1px solid var(--line);
}

.orders-summary .summary-item:nth-child(6n),
.orders-summary .summary-item:last-child {
  border-right: 0;
}

.summary-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.summary-value {
  color: var(--ink);
  font-size: 19px;
  font-weight: 850;
  line-height: 1.1;
}

.orders-summary .summary-value {
  font-size: 16px;
}

.summary-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.summary-trend {
  font-size: 12px;
  font-weight: 800;
}

[data-tooltip] {
  cursor: help;
}

.ui-tooltip {
  position: fixed;
  z-index: 20;
  max-width: 260px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 9px 11px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
  white-space: pre-line;
  pointer-events: none;
}

.summary-trend.up {
  color: var(--green);
}

.summary-trend.down {
  color: var(--red);
}

.stock-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}

.stock-item {
  min-height: 122px;
  padding: 14px 16px;
  border-right: 1px solid var(--line);
  display: grid;
  align-content: start;
  gap: 7px;
}

.stock-item:last-child {
  border-right: 0;
}

.stock-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.stock-value {
  color: var(--ink);
  font-size: 22px;
  font-weight: 850;
  line-height: 1.1;
}

.stock-percent,
.stock-note {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.digit-tabs {
  min-height: 32px;
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.digit-tab {
  flex: 1;
  min-width: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
}

.digit-tab.active {
  background: var(--blue);
  color: #ffffff;
}

.digit-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.digit-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 12px;
  align-items: start;
}

.digit-panel-main,
.digit-table-panel {
  grid-column: 1 / -1;
}

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

.digit-work-card {
  min-height: 108px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 12px;
  display: grid;
  align-content: start;
  gap: 7px;
  text-align: left;
  cursor: pointer;
}

.digit-work-card.active,
.digit-work-card:hover {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.digit-work-card span {
  color: var(--blue);
  font-size: 11px;
  font-weight: 850;
}

.digit-work-card strong {
  font-size: 15px;
}

.digit-work-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}

.digit-check-list {
  display: grid;
  gap: 10px;
}

.digit-check-list div {
  border-radius: 8px;
  background: var(--surface-2);
  padding: 11px 12px;
  display: grid;
  gap: 4px;
}

.digit-check-list strong {
  font-size: 13px;
}

.digit-check-list span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.4fr) minmax(0, 0.6fr);
  gap: 12px;
  align-items: start;
}

.settings-layout[hidden] {
  display: none;
}

.loans-view {
  display: grid;
  gap: 12px;
}

.operations-view {
  display: grid;
  gap: 12px;
}

.dds-view {
  display: grid;
  gap: 12px;
}

.monthly-cost-view {
  display: grid;
  gap: 12px;
}

.pl-view {
  display: grid;
  gap: 12px;
}

.loans-view[hidden] {
  display: none;
}

.operations-view[hidden] {
  display: none;
}

.dds-view[hidden] {
  display: none;
}

.monthly-cost-view[hidden] {
  display: none;
}

.pl-view[hidden] {
  display: none;
}

.loans-panel {
  width: 100%;
  overflow: hidden;
}

.operations-panel {
  width: 100%;
  overflow: hidden;
}

.dds-panel {
  width: 100%;
  overflow: hidden;
}

.monthly-cost-panel {
  width: 100%;
  overflow: hidden;
}

.pl-panel {
  width: 100%;
  overflow: hidden;
}

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

.cost-summary-card {
  min-height: 120px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(172px, 0.72fr);
  grid-template-rows: 1fr;
  align-items: stretch;
  gap: 8px 14px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.cost-summary-main {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-self: stretch;
  gap: 4px;
}

.cost-summary-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.cost-summary-card strong {
  align-self: center;
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.cost-summary-card p {
  align-self: end;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
}

.cost-summary-breakdown {
  min-width: 0;
  width: 100%;
  display: grid;
  grid-auto-rows: minmax(0, 1fr);
  gap: 0;
  border-left: 1px solid var(--line);
  padding: 0 0 0 14px;
  align-self: stretch;
}

.cost-summary-breakdown div {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(60px, 1fr) minmax(92px, auto);
  gap: 12px;
  align-items: center;
}

.cost-summary-breakdown span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.cost-summary-breakdown strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.1;
  text-align: right;
  white-space: nowrap;
}

.cost-summary-card.warning {
  border-color: #e6c36f;
  background: #fff9e8;
}

.cost-summary-card-simple {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 4px;
}

.cost-alert-panel {
  display: grid;
  gap: 10px;
}

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

.cost-alert-list div {
  min-height: 58px;
  display: grid;
  align-content: center;
  gap: 5px;
  border-radius: 8px;
  background: var(--surface-2);
  padding: 10px 12px;
}

.cost-alert-list strong {
  color: var(--ink);
  font-size: 13px;
}

.cost-alert-list span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.monthly-cost-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.monthly-cost-table {
  width: 100%;
  min-width: 1680px;
  table-layout: fixed;
  border-collapse: collapse;
}

.monthly-cost-table th,
.monthly-cost-table td {
  height: 26px;
  padding: 4px 6px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}

.monthly-cost-filter-row td {
  position: relative;
  background: #eef2f6;
  padding: 3px 5px;
  overflow: visible;
}

.monthly-cost-filter-button {
  width: 100%;
  min-width: 0;
  height: 22px;
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 6px;
  font-size: 10px;
  font-weight: 750;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  box-sizing: border-box;
}

.monthly-cost-filter-button .filter-icon {
  width: 10px;
  height: 10px;
  background: var(--muted);
  -webkit-mask: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M2 3.5C2 2.7 2.7 2 3.5 2h9c.8 0 1.5.7 1.5 1.5 0 .4-.2.8-.4 1.1L10 8.7V13c0 .4-.2.7-.5.9-.3.2-.7.2-1 0l-2-1.1c-.3-.2-.5-.5-.5-.9V8.7L2.4 4.6C2.1 4.3 2 3.9 2 3.5Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M2 3.5C2 2.7 2.7 2 3.5 2h9c.8 0 1.5.7 1.5 1.5 0 .4-.2.8-.4 1.1L10 8.7V13c0 .4-.2.7-.5.9-.3.2-.7.2-1 0l-2-1.1c-.3-.2-.5-.5-.5-.9V8.7L2.4 4.6C2.1 4.3 2 3.9 2 3.5Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.monthly-cost-filter-button [data-filter-label] {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monthly-cost-filter-button:focus {
  outline: 2px solid rgba(35, 100, 170, 0.18);
  border-color: var(--blue);
}

.monthly-cost-filter-menu {
  position: fixed;
  z-index: 100;
  max-height: 300px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 8px;
  display: grid;
  gap: 7px;
}

.monthly-cost-filter-menu-actions {
  display: flex;
  gap: 6px;
}

.monthly-cost-filter-menu-actions button {
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink);
  padding: 0 8px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.monthly-cost-filter-options {
  max-height: 244px;
  overflow: auto;
  display: grid;
  gap: 3px;
}

.monthly-cost-filter-options label {
  min-width: 0;
  min-height: 24px;
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  border-radius: 6px;
  padding: 3px 5px;
  cursor: pointer;
}

.monthly-cost-filter-options label:hover {
  background: var(--surface-2);
}

.monthly-cost-filter-options input {
  width: 13px;
  height: 13px;
  accent-color: var(--blue);
}

.monthly-cost-filter-options span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
  font-size: 10px;
  font-weight: 750;
}

.monthly-cost-table th {
  background: #aeb9c8;
  color: var(--ink);
  text-align: center;
  font-style: italic;
  font-weight: 850;
}

.monthly-cost-table th:first-child,
.monthly-cost-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  width: 96px;
  background: var(--surface);
  box-shadow: 8px 0 12px rgba(20, 31, 46, 0.08);
}

.monthly-cost-table th:first-child {
  z-index: 3;
  background: #aeb9c8;
}

.monthly-cost-table th:nth-child(2),
.monthly-cost-table td:nth-child(2),
.monthly-cost-table th:nth-child(11),
.monthly-cost-table td:nth-child(11) {
  width: 82px;
}

.monthly-cost-table th:nth-child(3),
.monthly-cost-table td:nth-child(3),
.monthly-cost-table th:nth-child(4),
.monthly-cost-table td:nth-child(4) {
  width: 160px;
}

.monthly-cost-table th:nth-child(5),
.monthly-cost-table td:nth-child(5) {
  width: 190px;
}

.monthly-cost-table th:nth-child(6),
.monthly-cost-table td:nth-child(6) {
  width: 96px;
}

.monthly-cost-table th:nth-child(7),
.monthly-cost-table td:nth-child(7) {
  width: 270px;
}

.monthly-cost-table th:nth-child(8),
.monthly-cost-table td:nth-child(8) {
  width: 56px;
  text-align: center;
}

.monthly-cost-table th:nth-child(9),
.monthly-cost-table td:nth-child(9),
.monthly-cost-table th:nth-child(10),
.monthly-cost-table td:nth-child(10),
.monthly-cost-table th:nth-child(17),
.monthly-cost-table td:nth-child(17) {
  width: 104px;
  text-align: right;
}

.planfact-product-input {
  width: 100%;
  min-width: 0;
  height: 30px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  padding: 0 6px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
}

.planfact-product-input:hover,
.planfact-product-input:focus {
  border-color: var(--line);
  background: var(--surface);
  outline: none;
}

.planfact-product-cell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: center;
  gap: 6px;
}

.planfact-product-cell:hover .plan-product-delete,
.planfact-product-cell:focus-within .plan-product-delete {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

#planFactArticles .settings-card {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  padding-bottom: 32px;
}

.article-matrix-heading {
  align-items: flex-start;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}

.article-matrix-heading h2 {
  margin: 0 0 6px;
}

.article-matrix-heading p {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
  line-height: 1.35;
}

.article-matrix-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.article-matrix-actions .text-button {
  min-height: 34px;
  padding: 0 14px;
  font-weight: 800;
}

.article-matrix-wrap {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  isolation: isolate;
  padding-bottom: 0;
  margin-bottom: 384px;
  box-sizing: border-box;
}

.article-matrix-table {
  width: max-content;
  min-width: max(100%, 1180px);
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.article-matrix-table th,
.article-matrix-table td {
  position: relative;
  width: 220px;
  min-width: 220px;
  height: 48px;
  padding: 7px 8px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.article-matrix-table th {
  background: #e8edf3;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  text-align: left;
}

.article-matrix-table tr:last-child td {
  border-bottom: 0;
}

.article-matrix-table th:last-child,
.article-matrix-table td:last-child {
  border-right: 0;
}

.article-product-head,
.article-matrix-table td:first-child {
  position: sticky !important;
  left: 0;
  z-index: 2;
  width: 300px;
  min-width: 300px;
  background: var(--surface);
  box-shadow: none;
}

.article-product-head {
  background: #e8edf3;
  z-index: 3;
}

.article-product-head::after,
.article-matrix-table td:first-child::after {
  content: "";
  position: absolute;
  top: 0;
  right: -1px;
  bottom: 0;
  width: 1px;
  background: var(--line);
  pointer-events: none;
  z-index: 4;
}

.article-column-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}

.article-product-cell {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 6px;
}

.article-drag-handle,
.article-drag-placeholder {
  width: 26px;
  height: 26px;
}

.article-drag-handle {
  position: relative;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: grab;
}

.article-drag-handle:active {
  cursor: grabbing;
}

.article-drag-handle::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  background-image:
    radial-gradient(circle, currentColor 1px, transparent 1.15px),
    radial-gradient(circle, currentColor 1px, transparent 1.15px),
    radial-gradient(circle, currentColor 1px, transparent 1.15px),
    radial-gradient(circle, currentColor 1px, transparent 1.15px),
    radial-gradient(circle, currentColor 1px, transparent 1.15px),
    radial-gradient(circle, currentColor 1px, transparent 1.15px),
    radial-gradient(circle, currentColor 1px, transparent 1.15px),
    radial-gradient(circle, currentColor 1px, transparent 1.15px),
    radial-gradient(circle, currentColor 1px, transparent 1.15px);
  background-position:
    3px 3px,
    8px 3px,
    13px 3px,
    3px 8px,
    8px 8px,
    13px 8px,
    3px 13px,
    8px 13px,
    13px 13px;
  background-repeat: no-repeat;
  background-size: 2px 2px;
  transform: translate(-50%, -50%);
}

.article-drag-handle:hover {
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--blue);
}

.article-row-dragging td {
  background: var(--blue-soft);
}

.rnp-position-drag-handle,
.rnp-position-drag-placeholder {
  width: 22px;
  height: 24px;
  flex: 0 0 22px;
}

.rnp-position-drag-handle::before {
  width: 14px;
  height: 14px;
  background-position:
    2px 2px,
    7px 2px,
    12px 2px,
    2px 7px,
    7px 7px,
    12px 7px,
    2px 12px,
    7px 12px,
    12px 12px;
}

.article-row-dragging td:first-child {
  background: var(--blue-soft);
}

.article-row-dragging .article-drag-handle {
  border-color: var(--blue);
  background: var(--surface);
  color: var(--blue);
}

.article-cell-input {
  width: 100%;
  min-width: 0;
  height: 32px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  padding: 0 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
}

.article-head-input {
  font-weight: 900;
}

.article-head-label {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.article-cell-input:hover,
.article-cell-input:focus {
  border-color: var(--line);
  background: var(--surface);
  outline: none;
}

.article-delete-button {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  position: relative;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.86);
  transition:
    opacity 140ms ease,
    transform 140ms ease,
    background 140ms ease,
    color 140ms ease,
    border-color 140ms ease;
}

.article-delete-button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  background: currentColor;
  transform: translate(-50%, -50%);
  -webkit-mask: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16'/%3E%3Cpath d='M9 7V5.6A2.6 2.6 0 0 1 11.6 3h.8A2.6 2.6 0 0 1 15 5.6V7'/%3E%3Cpath d='M6.5 9.5l.8 9.1A2.7 2.7 0 0 0 10 21h4a2.7 2.7 0 0 0 2.7-2.4l.8-9.1'/%3E%3Cpath d='M10 12v5'/%3E%3Cpath d='M14 12v5'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16'/%3E%3Cpath d='M9 7V5.6A2.6 2.6 0 0 1 11.6 3h.8A2.6 2.6 0 0 1 15 5.6V7'/%3E%3Cpath d='M6.5 9.5l.8 9.1A2.7 2.7 0 0 0 10 21h4a2.7 2.7 0 0 0 2.7-2.4l.8-9.1'/%3E%3Cpath d='M10 12v5'/%3E%3Cpath d='M14 12v5'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}

.article-delete-button:hover {
  border-color: #f0b9b9;
  background: #fdeaea;
  color: var(--red);
}

.article-product-cell:hover .article-delete-button,
.article-product-cell:focus-within .article-delete-button {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.monthly-cost-table th:nth-child(12),
.monthly-cost-table td:nth-child(12),
.monthly-cost-table th:nth-child(13),
.monthly-cost-table td:nth-child(13),
.monthly-cost-table th:nth-child(14),
.monthly-cost-table td:nth-child(14),
.monthly-cost-table th:nth-child(15),
.monthly-cost-table td:nth-child(15),
.monthly-cost-table th:nth-child(16),
.monthly-cost-table td:nth-child(16) {
  width: 74px;
  text-align: center;
}

.monthly-cost-table td:last-child {
  border-left: 2px solid #1f2630;
}

.monthly-cost-table tr:nth-child(even) td:not(:first-child) {
  background: #fbfcfd;
}

.monthly-cost-table tr.monthly-cost-missing-cost-row td {
  background: #ffe7e7 !important;
  color: #9f1d1d;
}

.monthly-cost-table tr.monthly-cost-missing-cost-row td:first-child {
  background: #ffdada !important;
}

.monthly-cost-counter {
  min-width: 116px;
  display: grid;
  justify-items: end;
  gap: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.monthly-cost-counter strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
}

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

.dds-table {
  width: 100%;
  min-width: 1500px;
  table-layout: fixed;
  border-collapse: collapse;
}

.dds-table th,
.dds-table td {
  height: 24px;
  padding: 4px 6px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}

.dds-table th:last-child,
.dds-table td:last-child {
  border-right: 0;
}

.dds-table th {
  background: #aeb9c8;
  color: var(--ink);
  text-align: center;
  font-style: italic;
  font-weight: 850;
}

.dds-table th:first-child,
.dds-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  width: 210px;
  text-align: left;
  background: var(--surface);
  box-shadow: 8px 0 12px rgba(20, 31, 46, 0.08);
}

.dds-table th:first-child {
  z-index: 3;
  background: #aeb9c8;
}

.dds-table td:not(:first-child) {
  text-align: right;
}

.dds-year-select {
  width: 100%;
  min-width: 0;
  height: 22px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  padding: 0 6px;
  font-size: 11px;
  font-weight: 850;
}

.dds-total-cell {
  border-left: 2px solid #1f2630;
}

.dds-cash-row td,
.dds-cash-row td:first-child {
  background: #b9c2cf;
  color: #b88700;
  font-style: italic;
  font-weight: 850;
}

.dds-cash-row td:first-child {
  color: var(--ink);
}

.dds-activity-row td,
.dds-activity-row td:first-child {
  background: #e9ecef;
  font-weight: 850;
}

.dds-income-row td,
.dds-income-row td:first-child {
  background: #dbeed3;
  font-weight: 850;
}

.dds-expense-row td,
.dds-expense-row td:first-child {
  background: #f6caca;
  font-weight: 850;
}

.dds-turnover-row td,
.dds-turnover-row td:first-child {
  background: #ffe4c4;
  font-weight: 850;
}

.dds-spacer-row td,
.dds-spacer-row td:first-child {
  height: 24px;
  background: var(--surface);
}

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

.pl-table {
  width: 100%;
  min-width: 1500px;
  table-layout: fixed;
  border-collapse: collapse;
}

.pl-table th,
.pl-table td {
  height: 24px;
  padding: 4px 6px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}

.pl-table th:last-child,
.pl-table td:last-child {
  border-right: 0;
}

.pl-table th {
  background: #aeb9c8;
  color: var(--ink);
  text-align: center;
  font-style: italic;
  font-weight: 850;
  text-transform: none;
}

.pl-table .pl-name-cell {
  width: 225px;
  text-align: left;
}

.pl-table th:first-child,
.pl-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  border-right: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 8px 0 12px rgba(20, 31, 46, 0.08);
}

.pl-table th:first-child {
  z-index: 3;
  background: #aeb9c8;
}

.pl-total-row td:first-child {
  background: #f3f7fb;
}

.pl-spacer-row td:first-child {
  background: var(--surface);
}

.pl-year-select {
  width: 100%;
  min-width: 0;
  height: 22px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  padding: 0 6px;
  font-size: 11px;
  font-weight: 850;
}

.pl-table td:not(:first-child) {
  text-align: right;
}

.pl-table td:last-child {
  border-left: 2px solid #1f2630;
}

.pl-head-row th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.pl-total-row td {
  background: #f3f7fb;
  font-weight: 850;
}

.pl-row-graphite td,
.pl-row-graphite td:first-child {
  background: #b9c2cf;
  color: var(--ink);
  font-style: italic;
  font-weight: 850;
}

.pl-row-red td,
.pl-row-red td:first-child {
  background: #f6caca;
  font-weight: 850;
}

.pl-row-green-soft td,
.pl-row-green-soft td:first-child {
  background: #dbeed3;
  font-weight: 850;
}

.pl-row-green td,
.pl-row-green td:first-child {
  background: #9fcd90;
  font-weight: 850;
}

.pl-percent-row td,
.pl-percent-row td:first-child {
  background: #ffe4c4;
  font-weight: 850;
}

.pl-spacer-row td {
  height: 24px;
  padding: 4px 6px;
  background: var(--surface);
}

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

.operations-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: collapse;
}

.operations-table th {
  background: #e8ebef;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  text-transform: none;
}

.operations-table th:nth-child(1) {
  width: 82px;
}

.operations-table th:nth-child(2) {
  width: 126px;
}

.operations-table th:nth-child(3) {
  width: 132px;
}

.operations-table th:nth-child(4) {
  width: 242px;
}

.operations-table th:nth-child(5) {
  width: 145px;
}

.operations-table th:nth-child(6) {
  width: auto;
}

.operations-table th:nth-child(7) {
  width: 42px;
}

.operations-table td {
  height: 46px;
  padding: 6px 8px;
  vertical-align: middle;
  border-right: 1px solid var(--line);
}

.operations-table td:last-child {
  border-right: 0;
}

.operations-table td[hidden],
.operations-table th[hidden] {
  display: none;
}

.operations-table input,
.operations-table select {
  width: 100%;
  min-width: 0;
  height: 32px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  padding: 0 8px;
  font-size: 12px;
  font-weight: 750;
}

.operations-table .operation-date-input {
  padding-left: 6px;
  padding-right: 6px;
  text-align: center;
}

.operations-table input {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operations-table .operation-combo-input {
  min-width: 10ch;
}

.operations-table select {
  border-color: var(--line);
  background: var(--surface);
}

.operations-table input:hover,
.operations-table input:focus,
.operations-table select:hover,
.operations-table select:focus {
  outline: 0;
  border-color: var(--blue);
  background: var(--surface);
}

.operations-table .money-input.currency-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 0.32em;
  align-items: center;
}

.operations-table .money-input input {
  text-align: right;
  padding-right: 0;
}

.operations-table .money-input::after {
  display: none;
}

.operation-add-row {
  background: var(--surface-2);
}

.operation-add-cell {
  position: relative;
}

.operation-delete[hidden] {
  display: none;
}

.dds-tag {
  display: inline-flex;
  max-width: 100%;
  min-height: 28px;
  align-items: center;
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--muted);
  padding: 0 8px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.loan-table {
  width: 100%;
  overflow-x: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.loan-row {
  display: grid;
  grid-template-columns: 64px repeat(12, minmax(0, 1fr));
  align-items: center;
  border-bottom: 1px solid var(--line);
}

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

.loan-row > * {
  min-width: 0;
  min-height: 38px;
  border-right: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 6px 8px;
}

.loan-row > *:last-child {
  border-right: 0;
}

.loan-head {
  background: #e8ebef;
}

.loan-head strong,
.loan-head span,
.loan-head b {
  justify-content: center;
  color: var(--ink);
  font-size: 11px;
  font-weight: 850;
  text-align: center;
}

.loan-row strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.loan-year {
  position: relative;
  justify-content: center;
  gap: 4px;
  padding-right: 22px;
}

.loan-year-delete {
  position: absolute;
  right: 4px;
  top: 50%;
  width: 17px;
  height: 17px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity 140ms ease, background 140ms ease, color 140ms ease;
}

.loan-year-delete::before {
  content: "";
  position: absolute;
  inset: 2px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16'/%3E%3Cpath d='M9 7V5.6A2.6 2.6 0 0 1 11.6 3h.8A2.6 2.6 0 0 1 15 5.6V7'/%3E%3Cpath d='M6.5 9.5l.8 9.1A2.7 2.7 0 0 0 10 21h4a2.7 2.7 0 0 0 2.7-2.4l.8-9.1'/%3E%3Cpath d='M10 12v5'/%3E%3Cpath d='M14 12v5'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16'/%3E%3Cpath d='M9 7V5.6A2.6 2.6 0 0 1 11.6 3h.8A2.6 2.6 0 0 1 15 5.6V7'/%3E%3Cpath d='M6.5 9.5l.8 9.1A2.7 2.7 0 0 0 10 21h4a2.7 2.7 0 0 0 2.7-2.4l.8-9.1'/%3E%3Cpath d='M10 12v5'/%3E%3Cpath d='M14 12v5'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}

.loan-row:hover .loan-year-delete,
.loan-year-delete:focus-visible {
  opacity: 1;
}

.loan-year-delete:hover {
  background: #fde8e8;
  color: var(--red);
}

.loan-row label {
  position: relative;
}

.loan-row label.currency-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 0.32em;
  align-items: center;
}

.loan-row label::after {
  content: "✎";
  position: absolute;
  right: 4px;
  top: 50%;
  color: var(--muted);
  font-size: 12px;
  opacity: 0;
  transform: translateY(-50%);
  pointer-events: none;
}

.loan-row label:hover::after,
.loan-row label:focus-within::after {
  opacity: 0.75;
}

.loan-row label.currency-input::after {
  display: none;
}

.loan-row label.currency-input::before {
  position: static;
  grid-column: 2;
  grid-row: 1;
  transform: none;
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
}

.loan-row input {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  height: 26px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  padding: 0;
  font-size: 11px;
  font-weight: 800;
  text-align: right;
}

.loan-row input:focus {
  outline: 2px solid rgba(35, 100, 170, 0.18);
  border-color: var(--blue);
  background: var(--surface);
  padding-left: 6px;
}

.loan-row b {
  justify-content: flex-end;
  color: var(--ink);
  font-size: 11px;
  font-weight: 850;
  text-align: right;
}

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

.settings-main-stack {
  grid-column: 1 / 2;
  display: grid;
  gap: 12px;
  align-self: start;
}

.settings-side-stack {
  grid-column: 2 / 3;
  display: grid;
  gap: 12px;
  align-self: start;
}

.income-map-card {
  margin-top: 0;
}

.old-money-articles-card {
  display: none;
}

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

.accounts-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.accounts-total {
  min-height: 28px;
  margin: -4px 0 8px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.accounts-total span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.accounts-total strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
  line-height: 1;
}

.settings-list.compact {
  gap: 7px;
}

.contractor-list .settings-row {
  grid-template-columns: minmax(220px, 1.5fr) minmax(92px, 0.5fr) minmax(118px, 0.58fr) 28px;
}

.contractor-list .settings-row b {
  min-width: 0;
  text-align: right;
}

.contractor-list .settings-head {
  grid-template-columns: minmax(220px, 1.5fr) minmax(92px, 0.5fr) minmax(118px, 0.58fr) 28px;
}

.settings-row {
  min-height: 44px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(90px, 0.72fr) minmax(95px, 0.72fr) 28px;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 8px;
  background: var(--surface-2);
}

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

.settings-head {
  min-height: 32px;
  background: transparent;
  padding-top: 0;
  padding-bottom: 0;
}

.settings-head strong,
.settings-head span,
.settings-head b {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-align: left;
}

.settings-head b {
  text-align: right;
}

.settings-row strong {
  font-size: 13px;
}

.settings-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.settings-row b {
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  text-align: right;
}

.money-positive {
  color: var(--green) !important;
}

.money-negative {
  color: var(--red) !important;
}

.money-zero {
  color: var(--muted) !important;
}

td,
th,
.summary-label,
.summary-value,
.summary-note,
.metric-label,
.metric-value,
.metric-plan,
.metric-snapshot-line span,
.metric-snapshot-line strong,
.drr-line span,
.drr-line strong,
.stock-label,
.stock-value,
.stock-percent,
.stock-note,
.settings-row span,
.settings-row strong,
.settings-row b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.working-capital {
  display: grid;
  gap: 8px;
}

.working-capital h3 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.2;
}

.working-capital-list {
  display: grid;
  gap: 7px;
}

.working-capital-row {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 8px;
  background: var(--surface-2);
  padding: 8px 10px;
}

.working-capital-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.working-capital-row strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  text-align: right;
  white-space: nowrap;
}

.working-capital-row.total {
  border: 1px solid var(--line);
  background: var(--surface);
}

.working-capital-row.total span,
.working-capital-row.total strong {
  font-size: 14px;
}

.cost-calc-settings {
  display: grid;
  gap: 12px;
}

.cost-calc-settings h3 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.2;
}

.cost-calc-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, auto);
  gap: 16px;
  align-items: start;
  border-radius: 8px;
  background: var(--surface-2);
  padding: 12px;
}

.cost-calc-row > strong {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
}

.cost-calc-switches {
  display: grid;
  gap: 9px;
}

.toggle-switch-row {
  display: grid;
  grid-template-columns: minmax(42px, 1fr) 44px;
  gap: 12px;
  align-items: center;
  cursor: pointer;
}

.toggle-switch-row span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.toggle-switch-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-switch-row i {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: #cbd1d8;
  transition: background 160ms ease;
}

.toggle-switch-row i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 5px rgba(20, 31, 46, 0.18);
  transition: transform 160ms ease;
}

.toggle-switch-row input:checked + i {
  background: #39d36b;
}

.toggle-switch-row input:checked + i::after {
  transform: translateX(20px);
}

.money-input {
  display: block;
}

.name-input {
  display: block;
}

.name-input,
.money-input,
.editable-value {
  position: relative;
  display: block;
  min-width: 0;
}

.currency-input::before {
  content: "₽";
  position: static;
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  pointer-events: none;
  z-index: 1;
}

.money-input.currency-input,
.editable-value.currency-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 0.32em;
  align-items: center;
}

.money-input.currency-input::after,
.editable-value.currency-input::after {
  right: 0;
}

.name-input::after,
.money-input::after,
.editable-value::after {
  content: "✎";
  position: absolute;
  right: 2px;
  top: 50%;
  color: var(--muted);
  font-size: 15px;
  font-weight: 850;
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity 140ms ease;
  pointer-events: none;
}

.name-input:hover::after,
.money-input:hover::after,
.editable-value:hover::after,
.name-input:focus-within::after,
.money-input:focus-within::after,
.editable-value:focus-within::after {
  opacity: 0.8;
}

.name-input input,
.money-input input,
.editable-value input {
  width: 100%;
  height: 30px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  padding: 0 18px 0 0;
  font-size: 12px;
  font-weight: 850;
  text-align: right;
}

.money-input.currency-input input,
.editable-value.currency-input input {
  grid-column: 1;
  grid-row: 1;
  padding-right: 0;
}

.money-input.currency-input::before,
.editable-value.currency-input::before {
  grid-column: 2;
  grid-row: 1;
}

.name-input input {
  text-align: left;
  padding-left: 0;
}

.name-input input:focus,
.money-input input:focus,
.editable-value input:focus {
  outline: 2px solid rgba(35, 100, 170, 0.18);
  border-color: var(--blue);
  background: var(--surface);
  padding-left: 8px;
}

.settings-delete {
  position: relative;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.settings-delete::before {
  content: "";
  position: absolute;
  inset: 5px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16'/%3E%3Cpath d='M9 7V5.6A2.6 2.6 0 0 1 11.6 3h.8A2.6 2.6 0 0 1 15 5.6V7'/%3E%3Cpath d='M6.5 9.5l.8 9.1A2.7 2.7 0 0 0 10 21h4a2.7 2.7 0 0 0 2.7-2.4l.8-9.1'/%3E%3Cpath d='M10 12v5'/%3E%3Cpath d='M14 12v5'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16'/%3E%3Cpath d='M9 7V5.6A2.6 2.6 0 0 1 11.6 3h.8A2.6 2.6 0 0 1 15 5.6V7'/%3E%3Cpath d='M6.5 9.5l.8 9.1A2.7 2.7 0 0 0 10 21h4a2.7 2.7 0 0 0 2.7-2.4l.8-9.1'/%3E%3Cpath d='M10 12v5'/%3E%3Cpath d='M14 12v5'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}

.settings-delete:hover {
  background: #fff0f0;
  color: var(--red);
}

.settings-params {
  display: grid;
  gap: 4px;
}

.settings-params label {
  min-height: 24px;
  border-radius: 8px;
  background: var(--surface-2);
  padding: 3px 10px;
  display: grid;
  align-content: center;
  gap: 1px;
}

.settings-params span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.settings-params strong {
  font-size: 18px;
  line-height: 1;
}

.income-map-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.income-map-head,
.income-map-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
}

.expense-map-head,
.expense-map-row,
.articles-income-head,
.articles-income-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr) 48px;
}

.income-map-head {
  background: #e8ebef;
  border-bottom: 1px solid var(--line);
}

.articles-map-table .income-map-section,
.articles-map-table .expense-map-head {
  background: #f3f5f7;
}

.income-map-head strong {
  padding: 8px 10px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  text-align: center;
}

.articles-income-head strong:nth-child(2),
.articles-income-row label:nth-child(2) {
  grid-column: 2 / 4;
}

.expense-map-title {
  grid-column: span 2;
}

.income-map-head strong + strong,
.income-map-row b {
  border-left: 1px solid var(--line);
}

.expense-map-head strong + strong,
.expense-map-row label + label {
  border-left: 1px solid var(--line);
}

.income-map-section {
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  padding: 7px 10px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  text-align: center;
}

.income-map-row {
  min-height: 34px;
  border-bottom: 1px solid var(--line);
}

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

.income-map-row label {
  display: flex;
  align-items: center;
  padding: 3px 6px;
}

.income-map-row label + label {
  border-left: 1px solid var(--line);
}

.income-map-row .pl-check {
  justify-content: center;
  padding: 0;
}

.pl-check input {
  width: 14px;
  height: 14px;
  min-height: 14px;
  accent-color: var(--blue);
}

.income-map-row input[type="text"] {
  width: 100%;
  min-height: 26px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--ink);
  padding: 0 5px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
}

.income-map-row input[type="text"]:hover,
.income-map-row input[type="text"]:focus {
  outline: 0;
  border-color: var(--blue);
  background: var(--surface);
}

.money-article-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.money-article-summary div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 11px 12px;
  display: grid;
  gap: 4px;
}

.money-article-summary strong {
  font-size: 13px;
}

.money-article-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}

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

.money-article-card {
  position: relative;
  min-height: 70px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px 28px;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 10px;
}

.money-article-main {
  display: grid;
  grid-template-columns: 112px minmax(180px, 1fr) minmax(190px, 1fr);
  gap: 10px;
  align-items: center;
}

.money-article-side {
  display: grid;
  justify-items: start;
  gap: 7px;
}

.article-field {
  display: grid;
  gap: 4px;
}

.article-field span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.article-field input {
  width: 100%;
  height: 31px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink);
  padding: 0 8px;
  font-size: 12px;
  font-weight: 800;
}

.article-field input:hover,
.article-field input:focus {
  outline: 0;
  border-color: var(--blue);
  background: var(--surface);
}

.simple-check {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.simple-check input {
  width: 15px;
  height: 15px;
  accent-color: var(--blue);
}

.simple-pill {
  border-radius: 999px;
  background: var(--surface-2);
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 850;
}

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

.article-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 2px 0 10px;
}

.article-hints span {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--muted);
  padding: 6px 9px;
  font-size: 11px;
  font-weight: 750;
}

.article-hints b {
  color: var(--blue);
  margin-right: 4px;
}

.article-hints,
.articles-table-wrap,
.article-note {
  display: none;
}

.articles-table-wrap {
  overflow-x: auto;
}

.legacy-articles-table {
  display: none;
}

.articles-table {
  min-width: 980px;
}

.articles-table th:nth-child(1) {
  width: 112px;
}

.articles-table th:nth-child(4),
.articles-table th:nth-child(7) {
  width: 58px;
  text-align: center;
}

.articles-table td {
  vertical-align: middle;
}

.article-group {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.article-group.income {
  background: #e8f6ef;
  color: #08733f;
}

.article-group.expense {
  background: #fff0df;
  color: #a85500;
}

.article-group.funding {
  background: #e8effc;
  color: var(--blue);
}

.article-group.service {
  background: #eef2f6;
  color: var(--muted);
}

.article-input {
  width: 100%;
  min-width: 150px;
  height: 31px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  padding: 0 7px;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
}

.article-input:hover,
.article-input:focus {
  outline: 0;
  border-color: var(--line);
  background: var(--surface);
}

.pl-lock {
  display: block;
  color: var(--muted);
  text-align: center;
  font-weight: 850;
}

.pl-toggle {
  display: flex;
  justify-content: center;
  cursor: pointer;
}

.pl-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pl-toggle span {
  width: 32px;
  height: 20px;
  border-radius: 999px;
  background: #d8e0ea;
  position: relative;
  transition: background 160ms ease;
}

.pl-toggle span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform 160ms ease;
}

.pl-toggle input:checked + span {
  background: var(--blue);
}

.pl-toggle input:checked + span::after {
  transform: translateX(12px);
}

.impact-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.impact-tags span {
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  padding: 4px 7px;
  font-size: 10px;
  font-weight: 850;
}

.article-note {
  margin-top: 10px;
  border-radius: 8px;
  background: #fff8e8;
  color: #9a5b00;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.editable-value input {
  height: 34px;
  padding-left: 0;
  font-size: 22px;
  line-height: 1;
  text-align: left;
}

.summary-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 7px;
  background: var(--blue);
}

.summary-dot.green {
  background: var(--teal);
}

.summary-dot.gray {
  background: #7d8491;
}

.summary-dot.orange {
  background: #e56b1f;
}

.summary-dot.red {
  background: #d9363e;
}

.text-button {
  padding: 0 12px;
  font-weight: 750;
}

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

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(20, 31, 46, 0.38);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-panel {
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 16px;
  display: grid;
  gap: 14px;
}

.modal-backdrop .plan-week-detail-panel {
  width: 100%;
  max-width: none;
  max-height: min(760px, calc(100vh - 48px));
}

.modal-backdrop .plan-week-detail-panel .planfact-dashboard-table {
  min-width: 100%;
}

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

.modal-close {
  position: relative;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  cursor: pointer;
}

.modal-close::before,
.modal-close::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--muted);
}

.modal-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.modal-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.modal-field {
  display: grid;
  gap: 6px;
}

.modal-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.modal-field input {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 11px;
  font-size: 13px;
  font-weight: 750;
}

.modal-field.currency-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 0.32em;
  align-items: end;
}

.modal-field.currency-input::before {
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
  grid-column: 2;
  grid-row: 2;
  padding-bottom: 12px;
}

.modal-field.currency-input input {
  grid-column: 1;
  grid-row: 2;
  padding-right: 11px;
}

.modal-field input:focus {
  outline: 2px solid rgba(35, 100, 170, 0.18);
  border-color: var(--blue);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 8px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.badge.ok {
  background: #e7f6ed;
  color: var(--green);
}

.badge.warn {
  background: #fff0d6;
  color: var(--amber);
}

.badge.danger {
  background: #fbe6e6;
  color: var(--red);
}

.chart-wrap {
  position: relative;
  height: 250px;
  border-radius: 8px;
  background: linear-gradient(180deg, #fbfcfd 0%, #f2f6fa 100%);
  border: 1px solid var(--line);
  padding: 10px;
}

canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.chart-tooltip {
  position: absolute;
  z-index: 5;
  min-width: 176px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 10px 12px;
  pointer-events: none;
  color: var(--ink);
}

.chart-tooltip strong {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
}

.tooltip-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 8px;
  align-items: baseline;
  margin-top: 6px;
}

.tooltip-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-top: 3px;
}

.tooltip-dot-pair {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.tooltip-dot-pair .tooltip-dot {
  margin-top: 0;
}

.tooltip-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.tooltip-value {
  grid-column: 2;
  font-size: 13px;
  font-weight: 800;
}

.timeline {
  display: grid;
  gap: 9px;
}

.timeline-row {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 4px 10px;
  padding: 10px;
  border-radius: 8px;
  background: var(--surface-2);
}

.timeline-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.timeline-row strong {
  font-size: 13px;
}

.timeline-row em {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.ad-stack {
  display: grid;
  gap: 13px;
}

.ad-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px 12px;
  align-items: center;
}

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

.ad-row strong {
  font-size: 14px;
}

.bar {
  grid-column: 1 / 3;
  height: 9px;
  border-radius: 8px;
  background: #e9eef4;
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.bar.teal i {
  background: var(--teal);
}

.bar.amber i {
  background: var(--amber);
}

.formula-box {
  border: 1px solid #e6c36f;
  background: #fff8e6;
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 6px;
}

.formula-box span {
  color: var(--amber);
  font-size: 12px;
  font-weight: 800;
}

.formula-box strong {
  line-height: 1.35;
  font-size: 14px;
}

.decision-list {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.decision-list div {
  display: flex;
  gap: 9px;
  align-items: center;
}

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

.choice-dot {
  width: 12px;
  height: 12px;
  border: 2px solid var(--line);
  border-radius: 50%;
  flex: 0 0 auto;
}

.choice-dot.active {
  border-color: var(--blue);
  background: var(--blue);
}

.table-wrap {
  overflow-x: auto;
}

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

th,
td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 13px;
}

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

td strong {
  font-weight: 800;
}

.status-pill {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 8px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 800;
}

.status-pill.red {
  background: #fbe6e6;
  color: var(--red);
}

.status-pill.amber {
  background: #fff0d6;
  color: var(--amber);
}

.status-pill.green {
  background: #e7f6ed;
  color: var(--green);
}

.drr-view {
  display: grid;
  gap: 12px;
}

.drr-view[hidden] {
  display: none;
}

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

.drr-kpi-card {
  min-height: 104px;
  display: grid;
  align-content: space-between;
  gap: 8px;
}

.drr-kpi-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.drr-kpi-card strong {
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
}

.drr-kpi-card p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}

.drr-kpi-card.warning {
  border-color: #e6c36f;
  background: #fff9e8;
}

.drr-panel,
.drr-settings-panel {
  display: grid;
  gap: 12px;
}

.drr-table th:nth-child(1) {
  width: 34%;
}

.drr-buyout-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.drr-buyout-control h2 {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.1;
  margin: 0;
}

.drr-buyout-control p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin: 6px 0 0;
}

.drr-buyout-options {
  display: grid;
  grid-template-columns: minmax(250px, auto) minmax(210px, auto);
  gap: 10px;
}

.drr-buyout-option {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 8px 10px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  cursor: pointer;
}

.drr-buyout-option.active {
  border-color: var(--blue);
  background: #eef6ff;
}

.drr-buyout-option input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
}

.drr-buyout-option span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.drr-buyout-global-input {
  width: 72px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  text-align: center;
  font-size: 14px;
  font-weight: 900;
}

.drr-buyout-global-input:disabled {
  color: var(--muted);
  background: #eef2f6;
}

.drr-api-report {
  display: grid;
  gap: 12px;
  padding-bottom: min(68vh, 520px);
}

.drr-api-report .panel-header {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}

.drr-api-report .panel-header > div:first-child p {
  font-size: 0;
}

.drr-api-report .panel-header > div:first-child p::before {
  content: "Сводный отчет по товарам,\A рекламе, заказам, выкупу, остаткам и воронке.";
  white-space: pre-line;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.drr-api-actions {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  min-width: 0;
  width: 100%;
}

.drr-api-period {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: visible;
}

.drr-api-period .period-option {
  box-sizing: border-box;
  width: 88px;
  min-height: 34px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface);
  color: var(--muted);
  padding: 0 13px;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.drr-api-period .period-option:first-child {
  border-radius: 8px 0 0 8px;
}

.drr-api-period .period-option.active {
  background: var(--blue);
  color: #ffffff;
}

.drr-api-period .date-range-button {
  box-sizing: border-box;
  min-height: 34px;
  min-width: 0;
  width: auto;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0 8px 8px 0;
  background: var(--surface);
  color: var(--ink);
  padding: 0 14px;
  font-size: 13px;
  font-weight: 900;
  justify-content: flex-start;
  white-space: nowrap;
  cursor: pointer;
}

.drr-api-period .date-range-button:hover,
.drr-api-period .period-option:hover:not(.active) {
  background: #eef6ff;
  color: var(--blue);
}

.drr-date-range-wrap {
  position: relative;
  display: inline-flex;
}

.drr-date-popover {
  left: 0;
  top: calc(100% + 8px);
  z-index: 120;
}

.primary-action.compact {
  box-sizing: border-box;
  min-width: 170px;
  width: 170px;
  height: 36px;
  white-space: nowrap;
}

.drr-article-filter {
  position: relative;
}

.drr-article-filter-button {
  min-width: 160px;
  width: 160px;
  display: inline-grid;
  grid-template-columns: 13px auto;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.drr-article-filter-button .filter-icon {
  width: 13px;
  height: 13px;
  background: var(--blue);
  -webkit-mask: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M2 3.5C2 2.7 2.7 2 3.5 2h9c.8 0 1.5.7 1.5 1.5 0 .4-.2.8-.4 1.1L10 8.7V13c0 .4-.2.7-.5.9-.3.2-.7.2-1 0l-2-1.1c-.3-.2-.5-.5-.5-.9V8.7L2.4 4.6C2.1 4.3 2 3.9 2 3.5Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M2 3.5C2 2.7 2.7 2 3.5 2h9c.8 0 1.5.7 1.5 1.5 0 .4-.2.8-.4 1.1L10 8.7V13c0 .4-.2.7-.5.9-.3.2-.7.2-1 0l-2-1.1c-.3-.2-.5-.5-.5-.9V8.7L2.4 4.6C2.1 4.3 2 3.9 2 3.5Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.drr-article-filter-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 60;
  width: 300px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 38px rgba(20, 35, 55, 0.18);
  padding: 10px;
  display: grid;
  gap: 8px;
}

.drr-article-filter-menu[hidden] {
  display: none;
}

.drr-filter-actions {
  display: flex;
  gap: 6px;
}

.drr-filter-actions button {
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.drr-article-search {
  width: 100%;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 750;
}

.drr-article-search:focus {
  outline: 2px solid rgba(35, 100, 170, 0.18);
  border-color: var(--blue);
}

.drr-article-search::placeholder {
  color: var(--muted);
  font-weight: 700;
}

.drr-article-filter-menu label {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.drr-article-filter-menu label[hidden] {
  display: none;
}

.drr-article-filter-menu input {
  accent-color: var(--blue);
}

.drr-api-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.drr-api-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
}

.drr-api-table th,
.drr-api-table td {
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background-clip: padding-box;
  padding: 8px 9px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  text-align: right;
  white-space: nowrap;
}

.drr-api-table th {
  min-width: 126px;
  max-width: 170px;
  height: 74px;
  background: #eaf1f8;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  text-align: center;
  white-space: normal;
}

.drr-api-table tbody tr {
  height: 98px;
}

.drr-api-table tbody tr:hover td {
  background: #f8fbff;
}

.drr-api-table .drr-api-summary-row {
  height: 56px;
}

.drr-api-table .drr-api-summary-row td {
  background: #f8f9fb;
  font-weight: 950;
}

.drr-api-table th:nth-child(1),
.drr-api-table td:nth-child(1) {
  min-width: 112px;
  max-width: 112px;
  position: sticky;
  left: 0;
  z-index: 4;
  text-align: center;
  background: var(--surface);
  border-bottom: 0;
  box-shadow: inset 0 -1px 0 var(--line);
}

.drr-api-table th:nth-child(2),
.drr-api-table td:nth-child(2) {
  min-width: 300px;
  max-width: 300px;
  position: sticky;
  left: 112px;
  z-index: 4;
  text-align: left;
  background: var(--surface);
  border-bottom: 0;
  box-shadow: inset 0 -1px 0 var(--line);
}

.drr-api-table thead th:nth-child(1),
.drr-api-table thead th:nth-child(2) {
  z-index: 6;
  background: #eaf1f8;
}

.drr-api-table th:nth-child(n + 3),
.drr-api-table td:nth-child(n + 3) {
  min-width: 124px;
  max-width: 124px;
}

.drr-product-thumb {
  width: 62px;
  height: 72px;
  margin: 0 auto;
  border-radius: 8px;
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(43, 104, 184, 0.16), rgba(255, 190, 42, 0.2)),
    #ffffff;
  color: #1b3c61;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 10px;
  font-weight: 950;
  line-height: 1.15;
  overflow: hidden;
}

.drr-product-cell {
  vertical-align: middle;
}

.drr-product-cell strong,
.drr-product-cell span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drr-product-cell strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
  margin-bottom: 5px;
}

.drr-product-cell span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.drr-buyout-input {
  width: 82px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  text-align: center;
  font-size: 15px;
  font-weight: 900;
}

.drr-columns-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(14, 29, 47, 0.28);
  display: grid;
  place-items: center;
  padding: 22px;
}

.drr-columns-modal[hidden] {
  display: none;
}

.drr-columns-dialog {
  position: relative;
  width: min(1040px, 100%);
  max-height: min(820px, calc(100vh - 44px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 26px 70px rgba(16, 33, 55, 0.28);
  padding: 26px 28px;
}

.drr-columns-dialog h2 {
  color: var(--ink);
  font-size: 22px;
  line-height: 1.1;
  margin: 0 40px 18px 0;
}

.drr-columns-dialog p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.55;
  margin: 0 0 8px;
}

.drr-columns-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 32px;
  height: 32px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

.drr-columns-close::before,
.drr-columns-close::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: var(--muted);
}

.drr-columns-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.drr-columns-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.drr-column-settings-list {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  display: grid;
  gap: 8px;
}

.drr-column-group {
  display: grid;
  gap: 8px;
}

.drr-column-group-header {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--surface-2);
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 850;
  cursor: pointer;
}

.drr-column-group-header input,
.drr-column-group-body input {
  width: 14px;
  height: 14px;
  accent-color: #159447;
}

.drr-column-group-header span {
  text-align: center;
}

.drr-column-group-header i {
  font-style: normal;
  transform: rotate(0deg);
}

.drr-column-group-header.open i {
  transform: rotate(90deg);
}

.drr-column-group-body {
  display: grid;
  gap: 16px;
  padding: 4px 0 10px 34px;
}

.drr-column-group-body[hidden] {
  display: none;
}

.drr-column-group-body label {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  color: #2d5275;
  font-size: 14px;
  font-weight: 850;
}

.drr-column-group-body label.disabled {
  color: #8b9aaa;
}

.drr-column-group-body label.disabled input {
  opacity: 0.45;
}

.drr-upload-panel {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 22px 28px;
}

.drr-upload-heading {
  display: grid;
  justify-items: center;
  text-align: center;
}

.drr-upload-heading h2 {
  color: var(--ink);
  font-size: 23px;
  line-height: 1.1;
  margin: 0;
}

.drr-upload-heading p {
  max-width: 640px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  margin: 8px 0 0;
}

.drr-upload-controls {
  display: grid;
  grid-template-columns: 190px;
  justify-content: center;
}

.drr-number-field {
  display: grid;
  gap: 8px;
}

.drr-number-field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  text-align: center;
}

.drr-number-field input {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  text-align: center;
  font-size: 20px;
  font-weight: 850;
}

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

.drr-dropzone {
  position: relative;
  min-height: 132px;
  border: 1px dashed #a8c6ef;
  border-radius: 8px;
  background: #f7fbff;
  padding: 14px 18px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 7px;
  text-align: center;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.drr-dropzone:hover {
  border-color: var(--blue);
  background: #eef6ff;
  transform: translateY(-1px);
}

.drr-dropzone.is-uploaded {
  border-style: solid;
  border-color: #abdcb9;
  background: #e7f7ec;
}

.drr-dropzone.is-uploaded:hover {
  border-color: #5ec579;
  background: #ddf2e4;
}

.drr-dropzone.is-uploaded .drr-step {
  background: #16803a;
}

.drr-dropzone.is-uploaded small {
  color: #0c7832;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0;
}

.drr-dropzone.is-uploaded em {
  max-width: 100%;
  color: #0b6d2d;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drr-file-size {
  color: #3f6f4d;
  font-size: 11px;
  font-weight: 800;
}

.drr-remove-file {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #9b3535;
  font-size: 20px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}

.drr-remove-file::before {
  content: "×";
  display: block;
  width: 20px;
  height: 20px;
  line-height: 18px;
  text-align: center;
}

.drr-remove-file:hover {
  background: #ffe8e8;
  border-color: #f3b3b3;
}

.drr-dropzone input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.drr-step {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--blue);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 900;
}

.drr-dropzone strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.2;
}

.drr-dropzone small {
  min-height: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.drr-dropzone em {
  color: #2b66b1;
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.drr-upload-footer {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.primary-action {
  min-width: 210px;
  height: 40px;
  border: 1px solid var(--blue);
  border-radius: 8px;
  background: var(--blue);
  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(43, 104, 184, 0.16);
}

.primary-action:hover {
  background: #1f5da8;
}

.drr-upload-footer p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin: 0;
  text-align: center;
}

.drr-generated-report {
  display: grid;
  gap: 12px;
  padding-bottom: min(68vh, 520px);
}

.drr-generated-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.drr-generated-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
}

.drr-generated-table th,
.drr-generated-table td {
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background-clip: padding-box;
  padding: 7px 8px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drr-generated-table th {
  min-width: 124px;
  max-width: 180px;
}

.drr-generated-table th {
  background: #e6ebf1;
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
  white-space: normal;
}

.drr-generated-table .drr-generated-group-row th {
  background: #2b68b8;
  color: #ffffff;
  font-size: 12px;
  letter-spacing: 0;
}

.drr-generated-table td:nth-child(1),
.drr-generated-table td:nth-child(2) {
  text-align: left;
}

.drr-generated-table th:nth-child(1),
.drr-generated-table td:nth-child(1) {
  min-width: 260px;
  max-width: 260px;
  position: sticky;
  left: 0;
  z-index: 3;
  border-bottom: 0;
  box-shadow: inset 0 -1px 0 var(--line);
}

.drr-generated-table th:nth-child(2),
.drr-generated-table td:nth-child(2) {
  min-width: 220px;
  max-width: 220px;
  position: sticky;
  left: 260px;
  z-index: 3;
  border-bottom: 0;
  box-shadow: inset 0 -1px 0 var(--line);
}

.drr-generated-table thead th:nth-child(1),
.drr-generated-table thead th:nth-child(2) {
  z-index: 5;
}

.drr-generated-table tbody td:nth-child(1),
.drr-generated-table tbody td:nth-child(2) {
  background: var(--surface);
}

.drr-generated-table thead tr:nth-child(2) th:nth-child(1),
.drr-generated-table thead tr:nth-child(2) th:nth-child(2) {
  background: #e6ebf1;
}

.drr-generated-table th:nth-child(n + 3),
.drr-generated-table td:nth-child(n + 3) {
  min-width: 128px;
  max-width: 128px;
}

.secondary-action {
  box-sizing: border-box;
  min-width: 170px;
  width: 170px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 14px;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.secondary-action:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: #eef6ff;
}

.secondary-action.drr-article-filter-button {
  min-width: 160px;
  width: 160px;
}

/* Products: cost reference */
.products-workspace {
  align-content: start;
}

.products-cost-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 16px 34px rgba(20, 31, 46, 0.06);
  padding: 18px 20px 20px;
}

.products-cost-header {
  align-items: center;
}

.products-history-button {
  width: auto;
  min-width: 170px;
}

.products-cost-table-wrap,
.products-history-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.products-cost-table,
.products-history-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.products-cost-table th,
.products-cost-table td,
.products-history-table th,
.products-history-table td {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 0 12px;
}

.products-cost-table tr > :last-child,
.products-history-table tr > :last-child {
  border-right: 0;
}

.products-cost-table tbody tr:last-child td,
.products-history-table tbody tr:last-child td {
  border-bottom: 0;
}

.products-cost-table th,
.products-history-table th {
  height: 46px;
  background: #e6ebf1;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  text-align: center;
}

.products-cost-table td {
  height: 52px;
  background: var(--surface);
}

.products-cost-table th:nth-child(1),
.products-cost-table td:nth-child(1) {
  width: 32%;
}

.products-cost-table th:nth-child(2),
.products-cost-table td:nth-child(2) {
  width: 43%;
}

.products-cost-table th:nth-child(3),
.products-cost-table td:nth-child(3) {
  width: 25%;
}

.products-product-identity-cell,
.products-product-name-cell {
  padding: 8px 12px !important;
}

.products-product-identity-line {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}

.products-product-identity-line + .products-product-identity-line {
  margin-top: 4px;
}

.products-product-identity-line span {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.products-product-sku-line span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.products-copy-button {
  position: relative;
  width: 22px;
  height: 22px;
  min-height: 22px;
  flex: 0 0 22px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  opacity: 0;
  cursor: pointer;
}

.products-product-identity-line:hover .products-copy-button,
.products-copy-button:focus-visible {
  opacity: 1;
}

.products-copy-button::before,
.products-copy-button::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 9px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
  background: var(--surface);
}

.products-copy-button::before {
  left: 6px;
  top: 5px;
}

.products-copy-button::after {
  left: 9px;
  top: 8px;
}

.products-copy-button:hover {
  border-color: #b9d2f2;
  background: #eef6ff;
  color: var(--blue);
}

.products-product-name-cell strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.products-cost-empty-row td {
  height: 72px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.products-cost-value-cell {
  position: relative;
  padding-left: 46px !important;
  padding-right: 46px !important;
}

.products-cost-display {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  text-align: right;
}

.products-cost-display strong {
  color: inherit;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.15;
}

.products-cost-display span {
  max-width: 100%;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.15;
  white-space: normal;
}

.products-cost-display.positive-value {
  color: #15803d;
}

.products-cost-display.missing-value {
  color: var(--muted);
}

.products-cost-edit-button,
.products-row-history-button {
  position: absolute;
  top: 50%;
  right: 10px;
  width: 28px;
  height: 28px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  opacity: 0;
  transform: translateY(-50%);
  cursor: pointer;
}

.products-cost-edit-button {
  right: 10px;
}

.products-row-history-button {
  left: 10px;
  right: auto;
}

.products-cost-edit-button,
.products-cost-table tr:hover .products-row-history-button,
.products-cost-edit-button:focus-visible,
.products-row-history-button:focus-visible {
  opacity: 1;
}

.products-cost-edit-button::before {
  content: "";
  position: absolute;
  inset: 5px;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667588' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z'/%3E%3Cpath d='m15 5 3 3'/%3E%3C/svg%3E");
}

.products-cost-edit-button::after {
  content: none;
}

.products-row-history-button::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 2px solid var(--muted);
  border-radius: 50%;
}

.products-row-history-button::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 8px;
  width: 4px;
  height: 6px;
  border-left: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
}

.products-cost-edit-button:hover,
.products-row-history-button:hover {
  border-color: #b9d2f2;
  background: #eef6ff;
}

.products-cost-date-picker {
  position: relative;
  z-index: 3;
}

.products-cost-date-button {
  box-sizing: border-box;
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 14px;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.products-cost-date-button:hover,
.products-cost-date-button[aria-expanded="true"] {
  border-color: var(--blue);
}

.products-cost-date-popover {
  top: calc(100% + 6px);
  z-index: 12;
}

.products-cost-note {
  min-height: 18px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.products-cost-note[data-tone="success"] { color: #15803d; }
.products-cost-note[data-tone="warning"] { color: #b56400; }
.products-cost-note[data-tone="error"] { color: #c43838; }

.modal-backdrop.products-cost-edit-modal,
.modal-backdrop.products-history-modal {
  z-index: 150;
  inset: 0 0 0 250px;
}

.app-shell.sidebar-collapsed ~ .products-cost-edit-modal,
.app-shell.sidebar-collapsed ~ .products-history-modal,
.sidebar-collapsed-persisted .products-cost-edit-modal,
.sidebar-collapsed-persisted .products-history-modal {
  inset: 0 0 0 68px;
}

.modal-backdrop .products-cost-edit-panel {
  width: min(440px, 100%);
  padding: 20px;
}

.products-cost-edit-panel .modal-header h3,
.products-history-panel .modal-header h3 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
}

.products-cost-edit-panel .modal-header p,
.products-history-panel .modal-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.products-modal-button {
  width: auto !important;
  min-width: 104px !important;
  height: 36px !important;
}

.modal-backdrop .products-history-panel {
  width: min(1120px, 100%);
  max-height: calc(100vh - 40px);
  padding: 20px;
  overflow: auto;
}

.products-history-table {
  min-width: 850px;
  table-layout: auto;
}

.products-history-table td {
  height: 42px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.products-history-table td:nth-child(n + 3) {
  text-align: right;
}

.products-history-table td.positive-value {
  color: #15803d;
}

.products-history-empty {
  height: 90px !important;
  color: var(--muted) !important;
  text-align: center !important;
}

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

.drr-setting-row,
.drr-toggle-row {
  min-height: 74px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 12px 14px;
  cursor: pointer;
}

.drr-setting-row.active {
  border-color: var(--blue);
  background: #eef6ff;
}

.drr-setting-row div,
.drr-toggle-row div {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.drr-setting-row strong,
.drr-toggle-row strong {
  color: var(--ink);
  font-size: 14px;
}

.drr-setting-row span,
.drr-toggle-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.drr-setting-row input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}

.drr-toggle-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.drr-toggle-row i {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: #cbd1d8;
  transition: background 160ms ease;
}

.drr-toggle-row i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 5px rgba(20, 31, 46, 0.18);
  transition: transform 160ms ease;
}

.drr-toggle-row input:checked + i {
  background: #39d36b;
}

.drr-toggle-row input:checked + i::after {
  transform: translateX(20px);
}

.monthly-cost-table .monthly-cost-filter-row td {
  overflow: visible;
}

.monthly-cost-table .monthly-cost-filter-button {
  max-width: 100%;
  box-sizing: border-box;
}
.account-entry {
  position: fixed;
  top: 10px;
  right: 14px;
  z-index: 1200;
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle-button,
.account-entry-button {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid #cfd9e5;
  border-radius: 6px;
  background: #fff;
  color: #13243a;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(24, 49, 78, 0.07);
}

.theme-toggle-button {
  position: relative;
}

.theme-toggle-icon {
  position: relative;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #f3b629;
  box-shadow: inset -5px -4px 0 rgba(255, 255, 255, 0.95);
}

.theme-toggle-icon::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px solid rgba(243, 182, 41, 0.3);
}

.account-entry-button:hover,
.theme-toggle-button:hover,
.theme-toggle-button.active,
.account-entry-button.active,
.account-entry-button[aria-expanded="true"] {
  border-color: #2b6eb5;
  background: #eef5fd;
}

.account-entry-icon {
  position: relative;
  width: 16px;
  height: 16px;
  border: 1.5px solid #49647f;
  border-radius: 50%;
}

.account-entry-icon::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 4.5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #49647f;
}

.account-entry-icon::after {
  content: "";
  position: absolute;
  left: 3px;
  bottom: 2px;
  width: 8px;
  height: 4px;
  border-radius: 7px 7px 3px 3px;
  background: #49647f;
}

.account-entry-arrow {
  display: none;
}

.account-entry-button > span:nth-child(2) {
  display: none;
}

.account-entry-menu {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  width: 220px;
  padding: 7px;
  border: 1px solid #cfd9e5;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(20, 43, 69, 0.18);
}

.account-entry-menu[hidden] {
  display: none;
}

.account-entry-item {
  width: 100%;
  min-height: 36px;
  padding: 7px 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #243b55;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.account-entry-item:hover,
.account-entry-item.active {
  background: #e8f1fb;
  color: #185ca5;
}

.topbar > div:first-child {
  padding-right: 44px;
}

.account-page-tabs {
  display: grid;
  grid-template-columns: repeat(8, minmax(105px, 1fr));
  gap: 4px;
  padding: 4px;
  overflow-x: auto;
  border: 1px solid #d3dde8;
  border-radius: 7px;
  background: #fff;
}

.account-page-tab {
  min-height: 34px;
  padding: 6px 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #607187;
  font: inherit;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.account-page-tab:hover,
.account-page-tab.active {
  background: #2b6eb5;
  color: #fff;
}

.account-page-content {
  min-height: calc(100vh - 190px);
}

.account-stores-panel {
  margin-top: 14px;
  padding: 18px;
  border: 1px solid #d3dde8;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(30, 55, 82, 0.08);
}

.account-stores-header {
  align-items: flex-start;
  margin-bottom: 15px;
}

.account-stores-header h2,
.account-store-form h2 {
  margin: 0 0 4px;
}

.account-stores-header p,
.account-store-form .modal-header p,
.account-api-fieldset > p {
  margin: 0;
  color: #63758b;
}

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

.account-store-row {
  display: grid;
  grid-template-columns: 38px minmax(190px, 1fr) minmax(260px, auto) 100px 34px 34px;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 8px 10px;
  border: 1px solid #d7e0ea;
  border-radius: 7px;
  background: #f7f9fc;
}

.account-store-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 7px;
  background: #e4edf8;
  color: #174f8c;
  font-size: 12px;
  font-weight: 800;
}

.account-store-identity {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.account-store-identity strong,
.account-store-identity span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-store-identity span {
  color: #6a7b90;
  font-size: 12px;
}

.account-store-api-status {
  display: flex;
  gap: 7px;
}

.account-api-state {
  padding: 5px 8px;
  border-radius: 5px;
  background: #edf1f5;
  color: #65768a;
  font-size: 11px;
  font-weight: 700;
}

.account-api-state.connected {
  background: #e2f4ea;
  color: #087a3b;
}

.account-store-state {
  color: #087a3b;
  font-size: 12px;
  text-align: right;
}

.account-store-settings {
  position: relative;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.account-store-settings::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 2px solid #6b7d91;
  border-radius: 50%;
  box-shadow: 0 -6px 0 -4px #6b7d91, 0 6px 0 -4px #6b7d91, 6px 0 0 -4px #6b7d91, -6px 0 0 -4px #6b7d91;
}

.account-store-delete {
  position: relative;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #6b7d91;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}

.account-store-delete::before {
  content: "";
  position: absolute;
  inset: 7px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16'/%3E%3Cpath d='M9 7V5.6A2.6 2.6 0 0 1 11.6 3h.8A2.6 2.6 0 0 1 15 5.6V7'/%3E%3Cpath d='M6.5 9.5l.8 9.1A2.7 2.7 0 0 0 10 21h4a2.7 2.7 0 0 0 2.7-2.4l.8-9.1'/%3E%3Cpath d='M10 12v5'/%3E%3Cpath d='M14 12v5'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16'/%3E%3Cpath d='M9 7V5.6A2.6 2.6 0 0 1 11.6 3h.8A2.6 2.6 0 0 1 15 5.6V7'/%3E%3Cpath d='M6.5 9.5l.8 9.1A2.7 2.7 0 0 0 10 21h4a2.7 2.7 0 0 0 2.7-2.4l.8-9.1'/%3E%3Cpath d='M10 12v5'/%3E%3Cpath d='M14 12v5'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}

.account-store-delete:hover {
  background: #fff0f0;
  color: var(--red);
}

.account-employees-panel {
  margin-top: 14px;
  padding: 18px;
  border: 1px solid #d3dde8;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(30, 55, 82, 0.08);
}

.account-employee-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  border: 1px solid #d7e0ea;
  border-radius: 7px;
  background: #f7f9fc;
}

.account-employee-roles {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0;
  border: 0;
}

.account-employee-roles legend {
  margin-bottom: 8px;
  color: #607187;
  font-size: 12px;
  font-weight: 800;
}

.account-employee-role-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.account-employee-role-option {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid #d3dde8;
  border-radius: 6px;
  background: #fff;
  color: #14273d;
  font-weight: 700;
  cursor: pointer;
}

.account-employee-role-option input {
  width: 16px;
  height: 16px;
  accent-color: #2b6eb5;
}

.account-employee-form-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.account-employee-form-actions .account-form-message {
  margin: 0;
}

.account-employee-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.account-employee-row {
  display: grid;
  grid-template-columns: 38px minmax(210px, 0.85fr) minmax(260px, 1.15fr) 34px;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 8px 10px;
  border: 1px solid #d7e0ea;
  border-radius: 7px;
  background: #f7f9fc;
}

.account-employee-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 7px;
  background: #e4edf8;
  color: #174f8c;
  font-size: 12px;
  font-weight: 800;
}

.account-employee-identity {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.account-employee-identity strong,
.account-employee-identity span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-employee-identity span {
  color: #6a7b90;
  font-size: 12px;
}

.account-employee-role-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.account-employee-row-role {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid #d3dde8;
  border-radius: 5px;
  background: #fff;
  color: #314a65;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.account-employee-row-role input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #2b6eb5;
}

.account-employee-row-role:has(input:checked) {
  border-color: #b9d0ea;
  background: #e4edf8;
  color: #174f8c;
}

.account-role-chip {
  padding: 5px 8px;
  border-radius: 5px;
  background: #e4edf8;
  color: #174f8c;
  font-size: 11px;
  font-weight: 800;
}

.account-employee-delete {
  position: relative;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #6b7d91;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}

.account-employee-delete::before {
  content: "";
  position: absolute;
  inset: 7px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16'/%3E%3Cpath d='M9 7V5.6A2.6 2.6 0 0 1 11.6 3h.8A2.6 2.6 0 0 1 15 5.6V7'/%3E%3Cpath d='M6.5 9.5l.8 9.1A2.7 2.7 0 0 0 10 21h4a2.7 2.7 0 0 0 2.7-2.4l.8-9.1'/%3E%3Cpath d='M10 12v5'/%3E%3Cpath d='M14 12v5'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16'/%3E%3Cpath d='M9 7V5.6A2.6 2.6 0 0 1 11.6 3h.8A2.6 2.6 0 0 1 15 5.6V7'/%3E%3Cpath d='M6.5 9.5l.8 9.1A2.7 2.7 0 0 0 10 21h4a2.7 2.7 0 0 0 2.7-2.4l.8-9.1'/%3E%3Cpath d='M10 12v5'/%3E%3Cpath d='M14 12v5'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}

.account-employee-delete:hover {
  background: #fff0f0;
  color: var(--red);
}

.account-employee-empty {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px dashed #c7d5e4;
  border-radius: 7px;
  color: #607187;
  background: #f7f9fc;
}

.account-employee-empty strong {
  color: #14273d;
}

.account-employee-delete-modal {
  z-index: 140;
}

.account-employee-delete-panel {
  width: min(520px, calc(100vw - 36px));
  padding: 20px;
}

.account-employee-delete-panel .modal-header h2 {
  margin: 0 0 5px;
  color: #14273d;
  font-size: 22px;
}

.account-employee-delete-panel .modal-header p {
  margin: 0;
  color: #63758b;
  font-size: 14px;
  line-height: 1.45;
}

.account-employee-delete-actions {
  margin-top: 18px;
}

.account-employee-delete-actions .text-button {
  min-width: 96px;
}

.account-subscription-current {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid #d3dde8;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(30, 55, 82, 0.05);
}

.account-subscription-current-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.account-subscription-current-main strong {
  margin: 0;
  color: #10263d;
  font-size: 18px;
  white-space: nowrap;
}

.account-subscription-current-main > span:last-child {
  margin: 0;
  color: #63758b;
  font-size: 13px;
}

.account-subscription-status {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 5px;
  color: #087a3b;
  background: #e3f4ea;
  font-size: 11px;
  font-weight: 800;
}

.account-subscription-period-switch {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 12px;
  border: 1px solid #d3dde8;
  border-radius: 7px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 18px rgba(30, 55, 82, 0.04);
}

.account-subscription-period-switch button {
  min-height: 38px;
  border: 0;
  border-right: 1px solid #d3dde8;
  background: #fff;
  color: #607187;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.account-subscription-period-switch button:last-child {
  border-right: 0;
}

.account-subscription-period-switch button.active {
  background: #2b6eb5;
  color: #fff;
}

.account-subscription-plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.account-subscription-plan {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  border: 1px solid #d3dde8;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(30, 55, 82, 0.06);
}

.account-subscription-plan.active {
  border-color: #2b6eb5;
  background: #f5f9ff;
}

.account-subscription-plan-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-height: 86px;
}

.account-subscription-plan-head h3 {
  margin: 0 0 5px;
  color: #10263d;
  font-size: 22px;
}

.account-subscription-plan-head p {
  margin: 0;
  color: #63758b;
}

.account-subscription-plan-head > span {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 5px;
  background: #e4edf8;
  color: #174f8c;
  font-size: 11px;
  font-weight: 800;
}

.account-subscription-features {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #314a65;
  font-size: 12px;
  font-weight: 700;
  min-height: 69px;
}

.account-subscription-features li {
  position: relative;
  padding-left: 16px;
}

.account-subscription-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2b6eb5;
}

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

.account-subscription-price-single {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 96px;
  margin-top: auto;
  padding: 12px;
  border: 1px solid #d3dde8;
  border-radius: 7px;
  background: #f7f9fc;
}

.account-subscription-price-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.account-subscription-price-main span {
  color: #63758b;
  font-size: 12px;
  font-weight: 800;
}

.account-subscription-price-main strong {
  color: #10263d;
  font-size: 26px;
  line-height: 1;
  white-space: nowrap;
}

.account-subscription-saving {
  display: grid;
  justify-items: end;
  gap: 2px;
  flex: 0 0 auto;
  max-width: 130px;
  padding: 8px 10px;
  border-radius: 7px;
  background: #e8f6ee;
  color: #087b3b;
  text-align: right;
  line-height: 1.15;
}

.account-subscription-saving span {
  color: #23764a;
  font-size: 11px;
  font-weight: 800;
}

.account-subscription-saving strong,
.account-subscription-saving em {
  color: #087b3b;
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
}

.account-subscription-pay {
  align-self: stretch;
  margin-top: 4px;
}

.account-subscription-price,
.account-subscription-period-card {
  display: grid;
  gap: 4px;
  min-height: 58px;
  padding: 9px 10px;
  border: 1px solid #d3dde8;
  border-radius: 7px;
  background: #fff;
  color: #10263d;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.account-subscription-price:hover,
.account-subscription-period-card:hover {
  border-color: #2b6eb5;
  box-shadow: 0 8px 18px rgba(36, 107, 178, 0.12);
}

.account-subscription-price span,
.account-subscription-period-card strong {
  color: #63758b;
  font-size: 12px;
  font-weight: 800;
}

.account-subscription-price strong,
.account-subscription-period-card span {
  color: #10263d;
  font-size: 18px;
  font-weight: 850;
}

.account-subscription-modal {
  z-index: 140;
}

.account-subscription-panel {
  width: min(560px, calc(100vw - 36px));
  padding: 20px;
}

.account-subscription-panel .modal-header h2 {
  margin: 0 0 5px;
  color: #14273d;
  font-size: 22px;
}

.account-subscription-panel .modal-header p {
  margin: 0;
  color: #63758b;
  font-size: 14px;
  line-height: 1.45;
}

.account-subscription-modal-periods {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.account-subscription-payment-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid #d3dde8;
  border-radius: 7px;
  background: #f7f9fc;
}

.account-subscription-payment-summary span {
  color: #63758b;
  font-size: 13px;
  font-weight: 800;
}

.account-subscription-payment-summary strong {
  color: #10263d;
  font-size: 24px;
  line-height: 1;
}

.account-subscription-payment-methods {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.account-subscription-payment-methods legend {
  margin-bottom: 8px;
  color: #63758b;
  font-size: 13px;
  font-weight: 800;
}

.account-subscription-payment-method {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #d3dde8;
  border-radius: 7px;
  background: #fff;
  cursor: pointer;
}

.account-subscription-payment-method input {
  width: 16px;
  height: 16px;
  accent-color: #2b6eb5;
}

.account-subscription-payment-method span {
  display: grid;
  gap: 2px;
}

.account-subscription-payment-method strong {
  color: #10263d;
  font-size: 14px;
}

.account-subscription-payment-method small {
  color: #63758b;
  font-size: 12px;
  font-weight: 700;
}

.account-subscription-promo {
  margin: 0;
}

.account-subscription-payment-actions {
  margin-top: 4px;
}

.account-subscription-payment-actions .text-button {
  min-width: 116px;
}

.account-store-modal[hidden] {
  display: none;
}

.account-store-form {
  width: min(760px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  overflow-y: auto;
}

.account-store-name-field {
  margin-top: 16px;
}

.account-store-inn-field {
  margin-top: 12px;
}

.account-store-inn-field input[readonly] {
  color: #314a65;
  background: #eef2f6;
  cursor: not-allowed;
}

.account-store-inn-field small {
  color: #7a8999;
  font-size: 11px;
  font-weight: 500;
}

.account-api-fieldset {
  margin: 14px 0 0;
  padding: 14px;
  border: 1px solid #d5dfe9;
  border-radius: 7px;
  background: #f7f9fc;
}

.account-api-fieldset legend {
  padding: 0 7px;
  color: #183a61;
  font-weight: 800;
}

.account-api-fieldset > p {
  margin-bottom: 11px;
  font-size: 12px;
}

.account-api-fields {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 12px;
}

.account-secret-field {
  position: relative;
}

.account-secret-field input {
  padding-right: 42px;
}

.account-secret-toggle {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.account-secret-toggle::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 8px;
  width: 17px;
  height: 11px;
  border: 1.5px solid #60758b;
  border-radius: 50% / 60%;
}

.account-secret-toggle::after {
  content: "";
  position: absolute;
  left: 11px;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #60758b;
}

.account-secret-toggle.visible::before {
  border-color: #246bb2;
}

.account-secret-toggle.visible::after {
  background: #246bb2;
}

.account-connection-check {
  min-height: 36px;
  display: flex;
  align-items: center;
  margin-top: 14px;
  padding: 8px 11px;
  border-radius: 6px;
  color: #607187;
  background: #f2f5f8;
}

.account-connection-check:empty {
  display: none;
}

.account-connection-check.success {
  color: #087a3b;
  background: #e5f5ec;
}

.account-connection-check.warning {
  color: #a15c00;
  background: #fff4dd;
}

.account-connection-check.error {
  color: #b62929;
  background: #fdeaea;
}

.account-store-actions {
  flex-wrap: wrap;
}

.account-profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 12px;
  margin-top: 14px;
}

.account-profile-panel,
.account-profile-empty {
  padding: 18px;
  border: 1px solid #d3dde8;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(30, 55, 82, 0.07);
}

.account-profile-details,
.account-password-panel {
  grid-row: span 2;
}

.account-profile-values {
  display: grid;
  gap: 0;
  margin: 12px 0 0;
}

.account-profile-values > div {
  display: grid;
  grid-template-columns: minmax(150px, 0.75fr) minmax(0, 1.25fr);
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid #e1e7ee;
}

.account-profile-values > div:last-child {
  border-bottom: 0;
}

.account-profile-values dt {
  color: #697b8f;
}

.account-profile-values dd {
  margin: 0;
  font-weight: 700;
}

.account-tariff-value {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0;
}

.account-tariff-value strong {
  font-size: 24px;
}

.account-tariff-value span {
  padding: 5px 8px;
  border-radius: 5px;
  color: #087a3b;
  background: #e3f4ea;
  font-size: 11px;
  font-weight: 800;
}

.account-inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  margin-top: 13px;
}

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

.account-password-form > :first-child {
  grid-column: 1 / -1;
}

.account-password-form .text-button {
  justify-self: start;
}

.account-form-message {
  min-height: 17px;
  margin: 8px 0 0;
  color: #087a3b;
  font-size: 11px;
  font-weight: 700;
}

.account-form-message.error {
  color: #b62929;
}

.account-profile-empty {
  display: grid;
  justify-items: start;
  gap: 9px;
  margin-top: 14px;
}

.account-profile-empty p {
  margin: 0;
  color: #63758b;
}

.account-logout-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #ccd7e2;
}

.account-logout-button {
  min-height: 38px;
  padding: 7px 14px;
  border: 1px solid #e1baba;
  border-radius: 6px;
  color: #b62929;
  background: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.account-logout-button:hover {
  background: #fdeeee;
}

.finance-profile-value {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
}

.finance-profile-value input[readonly] {
  color: #10263d;
  background: transparent;
  cursor: default;
}

.finance-profile-value a {
  color: #246bb2;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 760px) {
  .account-store-row {
    grid-template-columns: 38px minmax(0, 1fr) 34px 34px;
  }

  .account-store-api-status,
  .account-store-state {
    grid-column: 2;
    justify-self: start;
    text-align: left;
  }

  .account-store-settings {
    grid-column: 3;
    grid-row: 1;
  }

  .account-store-delete {
    grid-column: 4;
    grid-row: 1;
  }

  .account-employee-form {
    grid-template-columns: 1fr;
  }

  .account-employee-row {
    grid-template-columns: 38px minmax(0, 1fr) 34px;
  }

  .account-employee-role-list {
    grid-column: 2;
  }

  .account-employee-delete {
    grid-column: 3;
    grid-row: 1;
  }

  .account-subscription-current {
    grid-template-columns: 1fr;
  }

  .account-subscription-current .text-button {
    justify-self: start;
  }

  .account-subscription-plans {
    grid-template-columns: 1fr;
  }

  .account-subscription-modal-periods {
    grid-template-columns: 1fr;
  }

  .account-api-fields {
    grid-template-columns: 1fr;
  }

  .account-profile-grid {
    grid-template-columns: 1fr;
  }

  .account-profile-details,
  .account-password-panel {
    grid-row: auto;
  }

  .account-password-form,
  .account-inline-form {
    grid-template-columns: 1fr;
  }
}

.registration-body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: #14273d;
  background: #eef2f6;
}

.registration-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}

.registration-brand-panel {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 30px 24px;
  background: #12253a;
  color: #fff;
}

.registration-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.registration-brand > div:last-child {
  display: grid;
  gap: 3px;
}

.registration-brand strong {
  font-size: 16px;
}

.registration-brand span {
  color: #a9c4df;
  font-size: 12px;
}

.registration-rule {
  padding: 16px 0;
  border-top: 1px solid #34506c;
}

.registration-rule strong {
  color: #f7ba28;
}

.registration-rule p {
  margin: 8px 0 0;
  color: #c1d2e3;
  font-size: 13px;
  line-height: 1.45;
}

.registration-form-area {
  display: flex;
  justify-content: center;
  padding: 34px 28px;
}

.registration-form {
  width: min(760px, 100%);
}

.registration-heading span {
  color: #2b6eb5;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.registration-heading h1 {
  margin: 5px 0 5px;
  font-size: 30px;
}

.registration-heading p {
  margin: 0;
  color: #63758b;
}

.registration-section {
  margin: 18px 0 0;
  padding: 17px;
  border: 1px solid #d3dde8;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 9px 24px rgba(30, 55, 82, 0.07);
}

.registration-section legend {
  padding: 0 7px;
  font-weight: 800;
}

.registration-type-control {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  padding: 4px;
  border-radius: 6px;
  background: #edf2f7;
}

.registration-type-control label {
  cursor: pointer;
}

.registration-type-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.registration-type-control span {
  min-height: 35px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  color: #607187;
  font-weight: 700;
}

.registration-type-control input:checked + span {
  color: #fff;
  background: #2b6eb5;
}

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

.registration-field {
  display: grid;
  gap: 6px;
  color: #5d6f84;
  font-size: 12px;
  font-weight: 700;
}

.registration-field[hidden] {
  display: none;
}

.registration-field-wide {
  grid-column: 1 / -1;
}

.registration-field input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #ccd7e3;
  border-radius: 6px;
  color: #10263d;
  background: #fff;
  font: inherit;
  font-size: 14px;
  box-sizing: border-box;
}

.registration-field input:focus {
  border-color: #2b6eb5;
  outline: 2px solid rgba(43, 110, 181, 0.12);
}

.registration-field small {
  color: #8a98a8;
  font-weight: 500;
}

.registration-consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 16px 0 0;
  color: #5f7185;
  font-size: 12px;
  line-height: 1.4;
}

.registration-consent input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: #2b6eb5;
  flex: 0 0 auto;
}

.registration-message {
  min-height: 18px;
  margin: 11px 0;
  color: #087a3b;
  font-size: 12px;
  font-weight: 700;
}

.registration-message.error {
  color: #b62929;
}

.registration-submit {
  min-width: 190px;
  height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: #2b6eb5;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.registration-submit:hover {
  background: #205d9e;
}

.registration-switch {
  margin: 14px 0 0;
  color: #63758b;
  font-size: 13px;
}

.registration-switch a {
  color: #2b6eb5;
  font-weight: 700;
  text-decoration: none;
}

.registration-switch a:hover {
  text-decoration: underline;
}

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

  .registration-brand-panel {
    position: static;
    height: auto;
    padding: 18px;
  }

  .registration-rule {
    margin-top: 28px;
  }

  .registration-form-area {
    padding: 24px 14px;
  }

  .registration-fields {
    grid-template-columns: 1fr;
  }

  .registration-field-wide {
    grid-column: auto;
  }
}

@media (max-width: 900px) {
  .topbar > div:first-child {
    padding-right: 42px;
  }
}

:root[data-theme="dark"] body,
:root[data-theme="dark"] .workspace,
:root[data-theme="dark"] .account-workspace,
:root[data-theme="dark"] .registration-page {
  background: var(--bg);
  color: var(--ink);
}

:root[data-theme="dark"] .sidebar {
  background: #0d1724;
  color: #eef5fb;
}

:root[data-theme="dark"] .sidebar-toggle,
:root[data-theme="dark"] .nav-item,
:root[data-theme="dark"] .nav-icon,
:root[data-theme="dark"] .sidebar-status {
  border-color: #2d4562;
  background-color: #142236;
}

:root[data-theme="dark"] .nav-item:hover,
:root[data-theme="dark"] .nav-item.active,
:root[data-theme="dark"] .sidebar-status {
  background-color: #1b3048;
}

:root[data-theme="dark"] .brand-subtitle,
:root[data-theme="dark"] .topbar p,
:root[data-theme="dark"] .section-subtitle,
:root[data-theme="dark"] .muted,
:root[data-theme="dark"] .account-stores-header p,
:root[data-theme="dark"] .account-store-form .modal-header p,
:root[data-theme="dark"] .account-api-fieldset > p,
:root[data-theme="dark"] .account-page-subtitle,
:root[data-theme="dark"] .account-profile-row span,
:root[data-theme="dark"] .account-subscription-plan p,
:root[data-theme="dark"] .registration-subtitle,
:root[data-theme="dark"] .registration-consent {
  color: var(--muted);
}

:root[data-theme="dark"] :is(
  .topbar,
  .store-selector,
  .period-control,
  .warehouse-toggle,
  .tab-strip,
  .summary-card,
  .chart-card,
  .metric-card,
  .status-card,
  .settings-card,
  .settings-panel,
  .finance-card,
  .account-page-tabs,
  .account-stores-panel,
  .account-employees-panel,
  .account-profile-panel,
  .account-subscription-current,
  .account-subscription-plan,
  .account-subscription-price-single,
  .account-subscription-period-switch,
  .account-entry-menu,
  .modal-panel,
  .registration-card,
  .rnp-panel,
  .rnp-dashboard-card,
  .rnp-sheet-compare-main,
  .rnp-campaign-options-popover,
  .rnp-position-article-popover,
  .rnp-position-history-panel,
  .rnp-position-history-header,
  .rnp-position-history-wrap,
  .rnp-position-history-table,
  .drr-upload-panel,
  .drr-report-panel,
  .drr-settings-card,
  .planfact-panel,
  .planfact-summary-card,
  .planfact-week-card,
  .products-cost-panel,
  .products-cost-table-wrap,
  .products-history-table-wrap,
  .under-development
) {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}

:root[data-theme="dark"] :is(
  input,
  select,
  textarea,
  .store-button,
  .period-button,
  .warehouse-button,
  .account-page-tab,
  .text-button:not(.primary),
  .combo-input,
  .account-entry-button,
  .theme-toggle-button,
  .account-entry-item,
  .account-employee-role-option,
  .account-subscription-payment-method
) {
  border-color: var(--line);
  background: #1b2736;
  color: var(--ink);
}

:root[data-theme="dark"] :is(
  .rnp-date-control,
  .rnp-campaign-search input,
  .rnp-campaign-options-popover button:hover,
  .rnp-position-article-popover button:hover,
  .rnp-position-history-button:hover
) {
  border-color: var(--line);
  background: #1b2736;
  color: var(--ink);
}

:root[data-theme="dark"] :is(input, textarea)::placeholder {
  color: #7f8fa3;
}

:root[data-theme="dark"] :is(
  .store-button.active,
  .period-button.active,
  .warehouse-button.active,
  .account-page-tab.active,
  .account-entry-button:hover,
  .account-entry-button.active,
  .account-entry-button[aria-expanded="true"],
  .theme-toggle-button:hover,
  .theme-toggle-button.active,
  .account-entry-item:hover,
  .account-entry-item.active
) {
  border-color: var(--blue);
  background: #203955;
  color: #eef6ff;
}

:root[data-theme="dark"] .theme-toggle-button.active .theme-toggle-icon {
  background: #dbeafe;
  box-shadow: inset -6px -4px 0 #1f2d3d;
}

:root[data-theme="dark"] .theme-toggle-icon::before {
  border-color: rgba(219, 234, 254, 0.26);
}

:root[data-theme="dark"] .account-entry-icon {
  border-color: #b8c7d8;
}

:root[data-theme="dark"] .account-entry-icon::before,
:root[data-theme="dark"] .account-entry-icon::after {
  background: #b8c7d8;
}

:root[data-theme="dark"] :is(
  table,
  th,
  td,
  .table-cell,
  .settings-table,
  .settings-table th,
  .settings-table td,
  .account-page-content table,
  .account-page-content th,
  .account-page-content td,
  .products-cost-table,
  .products-cost-table th,
  .products-cost-table td,
  .products-history-table,
  .products-history-table th,
  .products-history-table td,
  .planfact-table,
  .planfact-table th,
  .planfact-table td,
  .drr-api-table,
  .drr-api-table th,
  .drr-api-table td,
  .rnp-table,
  .rnp-table th,
  .rnp-table td
) {
  border-color: var(--line);
}

:root[data-theme="dark"] :is(
  th,
  .settings-table th,
  .account-page-content th,
  .products-cost-table th,
  .products-history-table th,
  .planfact-table th,
  .drr-api-table th,
  .rnp-table th,
  .monthly-cost-table th
) {
  background: #243244;
  color: var(--ink);
}

:root[data-theme="dark"] :is(
  .account-store-row,
  .account-employee-row,
  .account-employee-form,
  .account-api-fieldset,
  .account-subscription-payment-summary,
  .registration-field input,
  .registration-field select
) {
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--ink);
}

:root[data-theme="dark"] :is(.account-store-mark, .account-employee-mark) {
  background: #203955;
  color: #d7eaff;
}

:root[data-theme="dark"] .account-subscription-plan.active {
  border-color: var(--blue);
  background: #182b43;
}

:root[data-theme="dark"] .account-subscription-saving {
  background: #153b2a;
  color: #75d39d;
}

:root[data-theme="dark"] .account-api-state,
:root[data-theme="dark"] .status-pill,
:root[data-theme="dark"] .badge {
  background: #253345;
  color: var(--muted);
}

:root[data-theme="dark"] .account-api-state.connected,
:root[data-theme="dark"] .success,
:root[data-theme="dark"] .positive {
  background: #153b2a;
  color: #75d39d;
}

:root[data-theme="dark"] .negative,
:root[data-theme="dark"] .error {
  color: #ff8b8b;
}

:root[data-theme="dark"] .warning,
:root[data-theme="dark"] .account-subscription-status {
  background: #3b2c16;
  color: #f0bc69;
}

:root[data-theme="dark"] .modal-backdrop,
:root[data-theme="dark"] .account-modal-backdrop {
  background: rgba(3, 8, 14, 0.62);
}

:root[data-theme="dark"] {
  --bg: #000000;
}

:root[data-theme="dark"] body,
:root[data-theme="dark"] .workspace,
:root[data-theme="dark"] .account-workspace,
:root[data-theme="dark"] .registration-page {
  background: #000000;
}

:root[data-theme="dark"] .topbar {
  background: #000000;
  border-color: transparent;
  box-shadow: none;
}

:root[data-theme="dark"] .sidebar {
  background: #142132;
  color: #eef5fb;
}

:root[data-theme="dark"] .sidebar-toggle {
  border-color: #344b67;
  background: #1a2a3d;
  color: #dce7f3;
}

:root[data-theme="dark"] .sidebar-toggle:hover {
  border-color: #46617f;
  background: #223349;
}

:root[data-theme="dark"] .brand-subtitle {
  color: #a9b8c9;
}

:root[data-theme="dark"] .nav-item {
  border-color: transparent;
  background: transparent;
  color: #cbd8e7;
}

:root[data-theme="dark"] .nav-icon {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.08);
  color: #eef5fb;
}

:root[data-theme="dark"] .nav-arrow {
  color: #8fa2b8;
}

:root[data-theme="dark"] .nav-item:hover,
:root[data-theme="dark"] .nav-item.active,
:root[data-theme="dark"] .nav-group:hover .nav-item {
  border-color: #344b67;
  background: #223349;
  color: #ffffff;
}

:root[data-theme="dark"] .sidebar-status {
  border-color: #344b67;
  background: #1a2a3d;
  color: #eef5fb;
}

:root[data-theme="dark"] .store-chip.warn {
  border-color: #f0b64d;
  background: #fff2cc;
  color: #17202a;
}

:root[data-theme="dark"] .store-chip.warn span {
  color: #3b4552;
}

:root[data-theme="dark"] .store-chip.warn strong {
  color: #8a4f00;
}

/* Dark theme coverage for pages that were added after the first theme pass. */
:root[data-theme="dark"] .store-chip:not(.warn),
:root[data-theme="dark"] .store-add-button {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

:root[data-theme="dark"] .store-chip:not(.warn) span,
:root[data-theme="dark"] .store-chip:not(.warn) strong {
  color: var(--ink);
}

:root[data-theme="dark"] .store-chip:not(.warn).active {
  border-color: var(--blue);
  background: #203752;
}

:root[data-theme="dark"] .store-chip:not(.warn).active span,
:root[data-theme="dark"] .store-chip:not(.warn).active strong {
  color: #eef6ff;
}

:root[data-theme="dark"] .store-add-button {
  color: #8fbcf0;
}

:root[data-theme="dark"] :is(
  .monthly-cost-panel,
  .monthly-cost-table-wrap,
  .monthly-cost-filter-menu,
  .drr-dropzone,
  .drr-setting-row,
  .account-employee-empty,
  .account-logout-button,
  .account-subscription-current,
  .account-subscription-period-switch,
  .account-subscription-plan,
  .account-subscription-price-single,
  .account-subscription-payment-summary
) {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}

:root[data-theme="dark"] .drr-dropzone:hover {
  border-color: var(--blue);
  background: #203752;
}

:root[data-theme="dark"] .drr-dropzone.is-uploaded {
  border-color: #347a52;
  background: #153b2a;
}

:root[data-theme="dark"] .drr-setting-row.active {
  border-color: var(--blue);
  background: #203752;
}

:root[data-theme="dark"] .monthly-cost-table th,
:root[data-theme="dark"] .monthly-cost-filter-row td {
  background: #243244;
  color: var(--ink);
}

:root[data-theme="dark"] .monthly-cost-table td {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

:root[data-theme="dark"] .monthly-cost-table tr:nth-child(even) td:not(:first-child) {
  background: #1b2736;
}

:root[data-theme="dark"] .monthly-cost-table tr.monthly-cost-missing-cost-row td {
  background: #3b2024;
  color: #ffd0d0;
}

:root[data-theme="dark"] .monthly-cost-filter-button,
:root[data-theme="dark"] .monthly-cost-filter-menu-actions button,
:root[data-theme="dark"] .monthly-cost-filter-options label,
:root[data-theme="dark"] .account-subscription-period-switch button {
  border-color: var(--line);
  background: #1b2736;
  color: var(--ink);
}

:root[data-theme="dark"] .account-subscription-period-switch button.active {
  background: var(--blue);
  color: #ffffff;
}

:root[data-theme="dark"] .account-subscription-plan.active {
  border-color: var(--blue);
  background: #182b43;
}

:root[data-theme="dark"] .account-subscription-plan-head h3,
:root[data-theme="dark"] .account-subscription-current-main strong,
:root[data-theme="dark"] .account-subscription-price-main strong,
:root[data-theme="dark"] .account-subscription-price,
:root[data-theme="dark"] .account-subscription-period-card {
  color: var(--ink);
}

:root[data-theme="dark"] .account-subscription-features,
:root[data-theme="dark"] .account-subscription-current-main > span:last-child,
:root[data-theme="dark"] .account-subscription-price-main span,
:root[data-theme="dark"] .account-employee-empty p,
:root[data-theme="dark"] .account-employee-empty strong {
  color: var(--muted);
}

:root[data-theme="dark"] .account-store-state strong,
:root[data-theme="dark"] .account-api-state.connected strong,
:root[data-theme="dark"] .account-subscription-status {
  color: #75d39d;
}

:root[data-theme="dark"] .drr-api-table tbody td {
  background: var(--surface);
  color: var(--ink);
}

:root[data-theme="dark"] .drr-api-table tbody tr:hover td {
  background: #203752;
}

:root[data-theme="dark"] .drr-api-table .drr-api-summary-row td {
  background: #1b2736;
  color: var(--ink);
}

:root[data-theme="dark"] .rnp-dashboard-table tbody td.rnp-fill-soft-gray,
:root[data-theme="dark"] .rnp-dashboard-table td.rnp-comments-actions-cell,
:root[data-theme="dark"] .rnp-dashboard-table td.rnp-merged-comments-cell {
  background: #1b2736;
  color: var(--ink);
}

:root[data-theme="dark"] .rnp-dashboard-table tbody tr:hover td.rnp-fill-soft-gray,
:root[data-theme="dark"] .rnp-dashboard-table tbody tr:hover td.rnp-comments-actions-cell,
:root[data-theme="dark"] .rnp-dashboard-table tbody tr:hover td.rnp-merged-comments-cell {
  background: #203752;
}
