@import url("tokens.css");

/* ── Base ── */
body {
  background-color: var(--color-bg);
  font-family: var(--font-family);
  color: var(--color-text);
  margin: 0;
}

Label {
  font-size: 14px;
  color: var(--color-text-muted);
}

/* ── App shell ── */
.app-root {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Collapsible top panel ── */
.app-top-panel {
  position: sticky;
  top: 0;
  z-index: 1100;
  max-width: var(--content-max-width);
  width: 100%;
  margin: 0 auto;
  padding: 20px 24px 0;
  box-sizing: border-box;
  background: var(--color-bg);
}

.app-top-panel__body {
  overflow: hidden;
  max-height: 520px;
  opacity: 1;
  transition: max-height 0.28s ease, opacity 0.2s ease, margin 0.28s ease;
}

.app-top-panel--collapsed {
  display: none;
}

.app-header {
  background: var(--color-primary);
  color: #fff;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px 0 24px;
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.app-header__brand {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1;
}

.app-panel-toggle {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  padding: 6px 12px;
  flex-shrink: 0;
  box-shadow: none;
  min-height: 0;
  min-width: 0;
  width: auto;
  margin: 0;
  transition: background-color 0.15s ease;
}

.app-panel-toggle:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: none;
  box-shadow: none;
}

.app-panel-toggle--top {
  white-space: nowrap;
}

.app-header__title {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  letter-spacing: 0.02em;
}

.app-header__subtitle {
  font-size: 13px;
  opacity: 0.85;
  margin-left: 12px;
  font-weight: 400;
}

.app-main {
  flex: 1;
  max-width: var(--content-max-width);
  width: 100%;
  margin: 0 auto;
  padding: 12px 24px 40px;
  box-sizing: border-box;
}

.app-root--top-collapsed .app-main {
  padding-top: 8px;
}

/* ── Toolbar ── */
.app-toolbar {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
}

.app-toolbar__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px 24px;
}

.app-toolbar__group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.app-toolbar__group--period {
  flex: 0 0 auto;
}

.app-toolbar__group--auth {
  flex: 1 1 280px;
  max-width: 420px;
}

.app-toolbar__label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}

.app-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

.app-toolbar__loading {
  width: 100%;
}

.app-toolbar__buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.app-toolbar__excel-group {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  max-width: 100%;
}

.app-toolbar__excel-label {
  white-space: nowrap;
  flex-shrink: 0;
}

.app-toolbar__cost-link {
  margin-left: auto;
  flex-shrink: 0;
}

.app-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 16px;
  padding: 0 4px;
}

.app-status__item {
  margin: 0;
}

.app-status__item--warning {
  color: var(--color-warning);
  font-weight: 500;
}

#output_text {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: 0;
}

/* ── Inputs ── */
.app-input {
  width: 100%;
  max-width: 200px;
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  box-sizing: border-box;
}

.app-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.app-input--short {
  max-width: 100px;
}

/* DatePickerRange — календарь поверх всего интерфейса */
.app-toolbar .SingleDatePickerInput,
.app-toolbar .DateRangePickerInput {
  border-radius: var(--radius-sm);
}

.app-toolbar .DateRangePicker,
.app-toolbar .SingleDatePicker {
  position: relative;
  z-index: 1;
}

.DateRangePicker_picker,
.SingleDatePicker_picker,
.DateRangePicker__picker--portal,
.SingleDatePicker__picker--portal {
  z-index: 10000 !important;
}

.DateRangePicker_picker__portal,
.SingleDatePicker_picker__portal {
  z-index: 10000 !important;
}

/* Быстрый выбор месяца / года в календаре */
.date-quick-nav {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
}

.date-quick-nav__select {
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 3px 6px;
  cursor: pointer;
  outline: none;
  appearance: auto;
}

.date-quick-nav__select:hover {
  border-color: var(--color-primary);
}

.date-quick-nav__select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-primary-light);
}

/* ── Buttons ── */
.app-button,
.start_button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 20px;
  width: auto;
  min-width: 160px;
  max-width: 100%;
  background-color: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
  margin: 0;
}

.app-button:hover,
.start_button:hover {
  background-color: var(--color-primary-dark);
  color: #fff;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.app-button:active,
.start_button:active {
  transform: translateY(0);
}

.app-button--secondary {
  background-color: var(--color-surface);
  color: var(--color-primary-dark);
  border: 1px solid var(--color-primary);
}

.app-button--secondary:hover {
  background-color: var(--color-primary-light);
  color: var(--color-primary-dark);
}

.app-button--instr {
  min-width: 200px;
  margin-bottom: 0;
}

.app-button--sm {
  min-width: 0;
  min-height: 34px;
  padding: 6px 14px;
  font-size: 13px;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

/* ── Filter panel & fields ── */
.filter-panel {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 18px;
}

.filter-panel__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 12px;
  letter-spacing: 0.01em;
}

.filter-panel .filter-row {
  margin-top: 0;
  margin-bottom: 0;
  max-width: none;
  width: 100%;
  gap: 16px;
}

.filter-panel > .filter-field + .filter-field,
.filter-panel > .filter-row + .filter-field {
  margin-top: 12px;
}

.filter-field {
  flex: 1 1 240px;
  min-width: 200px;
}

.filter-field--wide {
  flex: 1 1 100%;
  width: 100%;
  min-width: 0;
}

.filter-field__label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  margin: 0 0 6px;
  letter-spacing: 0.02em;
}

.filter-field__control {
  width: 100%;
}

.filter-field__control .app-dropdown,
.filter-field__control .Select {
  width: 100%;
}

/* ── Toggle chips (чеклист показателей) ── */
.dyn-checklist {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin: 0;
}

.dyn-checklist .dyn-checklist__label {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  margin: 0;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.dyn-checklist .dyn-checklist__label:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.dyn-checklist .dyn-checklist__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
  pointer-events: none;
}

.dyn-checklist .dyn-checklist__label:has(.dyn-checklist__input:checked) {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.dyn-checklist .dyn-checklist__label:has(.dyn-checklist__input:checked):hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
}

.filter-panel .dyn-checklist {
  margin: 0;
}

#excel_ready_label {
  color: var(--color-success) !important;
  font-weight: 600 !important;
  font-size: 13px;
  margin: 0 !important;
}

/* ── Content area ── */
.app-content {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.app-workspace {
  display: flex;
  align-items: stretch;
  min-height: 520px;
}

.app-root--top-collapsed .app-main {
  padding-top: 8px;
}

.app-root--top-collapsed .app-workspace {
  min-height: calc(100vh - 80px);
}

.app-root--sidebar-collapsed .app-workspace {
  min-height: calc(100vh - 160px);
}

.app-root--top-collapsed.app-root--sidebar-collapsed .app-workspace {
  min-height: calc(100vh - 60px);
}

.app-root--top-collapsed .app-sidebar {
  max-height: calc(100vh - 80px);
}

/* ── Sidebar navigation ── */
.app-sidebar {
  width: 252px;
  flex-shrink: 0;
  background: var(--color-primary);
  padding: 8px 0 16px;
  overflow-x: hidden;
  overflow-y: auto;
  max-height: calc(100vh - 220px);
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  transition: width 0.28s ease, padding 0.28s ease;
}

.app-sidebar--collapsed {
  width: 0;
  min-width: 0;
  padding: 0;
  border: none;
  overflow: hidden;
}

.app-root--top-collapsed .app-sidebar {
  max-height: calc(100vh - 130px);
}

.app-sidebar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 14px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 4px;
}

.app-sidebar__head-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-panel-toggle--sidebar {
  padding: 4px 8px;
  font-size: 15px;
  line-height: 1;
  border-color: rgba(255, 255, 255, 0.28);
}

.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
}

.section-header .section-title {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: none;
}

.app-view-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-primary-dark);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
  width: auto;
  min-width: 0;
  margin: 0;
  white-space: nowrap;
}

.app-view-toggle:hover {
  background: var(--color-primary-light);
}

.app-root--top-collapsed .app-content-main,
.app-root--sidebar-collapsed .app-content-main {
  max-width: 100%;
}

.app-root--top-collapsed.app-root--sidebar-collapsed .app-content-main {
  padding-top: 12px;
}

.app-sidebar__group-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.5);
  padding: 12px 18px 4px;
  margin: 0;
  border: none;
}

.app-sidebar__group-title:not(:first-child) {
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.app-sidebar__link {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 18px;
  margin: 0;
  border: none;
  border-left: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  cursor: pointer;
  box-shadow: none;
  min-height: 0;
  min-width: 0;
  max-width: 100%;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  user-select: none;
}

.app-sidebar__link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.app-sidebar__link--active {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-weight: 600;
  border-left-color: #fff;
}

.app-sidebar__link--active:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.app-sidebar__link:focus,
.app-sidebar__link:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.35);
  outline-offset: -2px;
}

.app-content-main {
  flex: 1;
  min-width: 0;
  padding: 20px 24px 32px;
}

.section-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
  line-height: 1.3;
}

.tab-panel {
  padding-top: 4px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

#tabs_all .tab-content {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Скрываем встроенную полосу вкладок Dash (#tabs_all = .tab-container) —
   навигация идёт через боковое меню, поэтому пустая панель не нужна. */
#tabs_all,
.my_tabs--sidebar.tab-container {
  display: none !important;
}

/* Контент вкладки — соседний элемент .tab-content, остаётся видимым. */
.tab-parent .tab-content,
.my_tabs--sidebar.tab-container ~ .tab-content,
#tabs_all-parent .tab-content,
.tab-content {
  display: block !important;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border: none !important;
}


/* ── Graph rows ── */
.graph-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-top: 24px;
  margin-bottom: 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 12px;
  background: var(--color-bg);
}

.graph-row > * {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.graph-row--single {
  grid-template-columns: 1fr;
}

.graph-row--charts-tall .my_graphs {
  height: 540px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 12px;
  margin-bottom: 12px;
  width: 100%;
  max-width: none;
}

.filter-row > .filter-field,
.filter-row > div {
  flex: 1 1 280px;
  min-width: 200px;
}

.my_graphs,
.big_graphs {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0;
  height: 420px;
  background-color: var(--color-surface);
  border-radius: var(--radius-sm);
}

.graph-row .dash-graph,
.graph-row .js-plotly-plot,
.graph-row .plot-container.plotly,
.graph-row .svg-container {
  width: 100% !important;
  max-width: 100% !important;
}

/* ── KPI cards ── */
/* Тот же фрейм, что и у .graph-row ниже: рамка + padding 12px,
   чтобы карточки выравнивались по левому и правому краю с графиками. */
.kpi-dashboard {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 24px 0 12px 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 12px;
  background: var(--color-bg);
}

.card_div {
  display: grid;
  border: none;
  margin: 0;
  height: auto;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.card_div--kpi {
  display: grid !important;
  grid-template-columns: repeat(10, minmax(0, 1fr)) !important;
  gap: 4px;
  width: 100%;
  max-width: 100%;
  margin: 0 !important;
  box-sizing: border-box;
}

.card_div--kpi > .card {
  width: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  flex: 0 1 auto !important;
  margin: 0 !important;
  padding: 7px 3px;
  box-sizing: border-box !important;
}

/* dbc.Card добавляет .card-body с отступами Bootstrap — убираем для KPI */
.card_div--kpi .card-body {
  padding: 0 !important;
  margin: 0;
}

.card {
  font-size: 12px;
  font-family: var(--font-family);
  word-wrap: break-word;
  overflow-wrap: anywhere;
  hyphens: auto;
  height: auto;
  min-height: 74px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-sm);
  padding: 8px 6px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transform: none;
  margin-bottom: 0;
  background: var(--color-surface);
}

.card .card-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 2px;
  color: var(--color-text);
  line-height: 1.15;
}

.card .card-text {
  font-size: 12px;
  margin: 0;
  color: rgba(26, 26, 26, 0.72);
  line-height: 1.2;
}

/* Цветовые группы KPI-карточек (как первоначально) */
.kpi-group-a { background: #9966CC; }
.kpi-group-b { background: #78DBE2; }
.kpi-group-c { background: #A8E4A0; }
.kpi-group-d { background: #FBCEB1; }
.kpi-group-e { background: #E0B8C4; }
.kpi-group-f { background: #E8D8A8; }

.kpi-group-a .card-title,
.kpi-group-a .card-text {
  color: #ffffff;
}

.card-accent-primary  { border-left: 3px solid var(--color-primary); }
.card-accent-success  { border-left: 3px solid var(--color-success); }
.card-accent-warning  { border-left: 3px solid var(--color-warning); }
.card-accent-danger   { border-left: 3px solid var(--color-danger); }
.card-accent-neutral  { border-left: 3px solid var(--color-border); }

/* ── Tables ── */
.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner table thead tr th:first-child,
.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner table tbody tr td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background-color: white;
  box-shadow: 2px 0 4px rgba(0, 0, 0, 0.06);
}

.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner table thead tr th:first-child {
  z-index: 3;
}

/* ── Dropdowns (react-select v1 + v5) ── */
.app-dropdown {
  width: 100%;
  font-family: var(--font-family);
  font-size: 13px;
}

/* Legacy react-select */
.app-dropdown .Select-control,
.tab-panel .Select-control {
  min-height: 40px !important;
  border-radius: 10px !important;
  border: 1px solid var(--color-border) !important;
  background: var(--color-surface) !important;
  box-shadow: none !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.app-dropdown .Select-control:hover,
.tab-panel .Select-control:hover {
  border-color: #c5cad0 !important;
}

.app-dropdown .Select.is-focused > .Select-control,
.app-dropdown .Select.is-open > .Select-control,
.tab-panel .Select.is-focused > .Select-control {
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 0 3px var(--color-primary-light) !important;
}

.app-dropdown .Select-placeholder,
.app-dropdown .Select-value-label,
.app-dropdown .Select-input > input,
.tab-panel .Select-value-label {
  color: var(--color-text) !important;
  font-size: 13px !important;
}

.app-dropdown .Select-placeholder,
.tab-panel .Select-placeholder {
  color: var(--color-text-muted) !important;
}

.app-dropdown .Select-menu-outer,
.tab-panel .Select-menu-outer {
  border-radius: 10px !important;
  border: 1px solid var(--color-border) !important;
  box-shadow: var(--shadow-md) !important;
  margin-top: 4px !important;
  overflow: hidden;
  background: var(--color-surface) !important;
  z-index: 1200 !important;
}

.app-dropdown .Select-option,
.tab-panel .Select-option {
  color: var(--color-text) !important;
  font-size: 13px !important;
  padding: 10px 12px !important;
}

.app-dropdown .Select-option.is-focused,
.tab-panel .Select-option.is-focused {
  background: var(--color-primary-light) !important;
  color: var(--color-primary-dark) !important;
}

.app-dropdown .Select-option.is-selected,
.tab-panel .Select-option.is-selected {
  background: var(--color-primary) !important;
  color: #fff !important;
}

.app-dropdown .Select-value,
.app-dropdown .Select-value-icon {
  border-color: rgba(75, 144, 114, 0.25) !important;
}

.app-dropdown--multi .Select-value {
  background: var(--color-primary-light) !important;
  border-radius: 999px !important;
  border: none !important;
  color: var(--color-primary-dark) !important;
  margin: 3px 4px 3px 0 !important;
}

.app-dropdown--multi .Select-value-icon {
  border-right: 1px solid rgba(75, 144, 114, 0.2) !important;
  border-radius: 999px 0 0 999px !important;
}

.app-dropdown--multi .Select-value-icon:hover,
.app-dropdown--multi .Select-value-icon:focus {
  background: var(--color-primary) !important;
  color: #fff !important;
}

/* react-select v5 (Dash 3 async-dropdown) */
.app-dropdown [class*="-control"],
.tab-panel [class*="-control"] {
  min-height: 40px !important;
  border-radius: 10px !important;
  border-color: var(--color-border) !important;
  background: var(--color-surface) !important;
  box-shadow: none !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.app-dropdown [class*="-control"]:hover {
  border-color: #c5cad0 !important;
}

.app-dropdown [class*="-control"][class*="-focused"],
.app-dropdown [class*="-control"][class*="-menu-is-open"] {
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 0 3px var(--color-primary-light) !important;
}

.app-dropdown [class*="-placeholder"],
.app-dropdown [class*="-singleValue"],
.app-dropdown [class*="-Input"] input {
  font-size: 13px !important;
  color: var(--color-text) !important;
}

.app-dropdown [class*="-placeholder"] {
  color: var(--color-text-muted) !important;
}

.app-dropdown [class*="-menu"] {
  border-radius: 10px !important;
  border: 1px solid var(--color-border) !important;
  box-shadow: var(--shadow-md) !important;
  overflow: hidden;
  z-index: 1200 !important;
}

.app-dropdown [class*="-option"] {
  font-size: 13px !important;
  padding: 10px 12px !important;
  cursor: pointer;
}

.app-dropdown [class*="-option"][class*="-focused"] {
  background: var(--color-primary-light) !important;
  color: var(--color-primary-dark) !important;
}

.app-dropdown [class*="-option"][class*="-selected"] {
  background: var(--color-primary) !important;
  color: #fff !important;
}

.app-dropdown--multi [class*="-multiValue"] {
  background: var(--color-primary-light) !important;
  border-radius: 999px !important;
}

.app-dropdown--multi [class*="-multiValueLabel"] {
  color: var(--color-primary-dark) !important;
  font-size: 12px !important;
  font-weight: 500;
  padding: 2px 4px 2px 8px !important;
}

.app-dropdown--multi [class*="-multiValueRemove"]:hover {
  background: var(--color-primary) !important;
  color: #fff !important;
  border-radius: 0 999px 999px 0 !important;
}

.app-dropdown [class*="-indicatorSeparator"] {
  background: var(--color-border) !important;
}

.app-dropdown [class*="-indicatorContainer"] {
  color: var(--color-text-muted) !important;
}

.app-dropdown [class*="-indicatorContainer"]:hover {
  color: var(--color-primary) !important;
}

/* ── Таблица со строкой «Итого», закреплённой сверху ── */
.dash-table-stack {
  width: 100%;
  margin-bottom: 20px;
}

/* ── Product photos in tables ── */
.photo-container {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 60px;
  overflow: visible;
  z-index: 1;
}

.product-photo {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

/* ── Loading overlay ── */
.app-loading-wrapper {
  min-height: 48px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .graph-row {
    grid-template-columns: 1fr;
  }

  .graph-row--charts-tall .my_graphs {
    height: 460px;
  }

  .my_graphs,
  .big_graphs {
    height: 380px;
  }

  .app-workspace {
    flex-direction: column;
  }

  .app-sidebar {
    width: 100%;
    max-height: none;
    padding-bottom: 8px;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .app-content-main {
    padding: 16px;
  }

  .app-main {
    padding: 12px 12px 32px;
  }

  .app-toolbar {
    padding: 16px;
  }

  .app-content {
    padding: 16px;
  }

  .app-button,
  .start_button {
    width: 100%;
    min-width: 0;
  }

  .app-toolbar__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .app-toolbar__buttons {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .app-toolbar__cost-link {
    margin-left: 0;
    width: 100%;
  }

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

  .card {
    min-height: 58px;
    padding: 5px 2px;
  }

  .card .card-title {
    font-size: 12px;
  }

  .card .card-text {
    font-size: 8px;
  }
}

/* asset-version: charts-tall-wf-1 */

