@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/inter-400.ttf") format("truetype");
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/inter-500.ttf") format("truetype");
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/inter-600.ttf") format("truetype");
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/inter-700.ttf") format("truetype");
}

:root {
  --page: #f5f5f5;
  --card: #ffffff;
  --ink: #333333;
  --muted: #94a3b8;
  --line: #e2e8f0;
  --nav: #2c3e50;
  --nav-active: rgb(255 255 255 / 20%);
  --blue: #3498db;
  --blue-dark: #286bb0;
  --good: #2e9b65;
  --bad: #cf4d58;
  font-family: Inter, -apple-system, "system-ui", sans-serif;
  color: var(--ink);
  background: var(--page);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
}

button, input, select { font: inherit; }

.topbar {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  color: white;
  background: var(--nav);
}

.brand {
  display: flex;
  align-items: center;
  gap: 6px;
  color: white;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 6px;
  background: #0077ff center / 20px 20px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath d='M25.54 34.58c-10.95 0-17.2-7.5-17.45-20h5.48c.17 9.17 4.23 13.05 7.43 13.85V14.58h5.16v7.9c3.16-.34 6.48-3.93 7.6-7.9h5.16c-.86 4.88-4.46 8.47-7.02 9.95 2.56 1.18 6.63 4.32 8.19 10.05h-5.68c-1.22-3.8-4.26-6.74-8.25-7.14v7.14h-.62z' fill='%23fff'/%3E%3C/svg%3E");
  color: transparent;
  font-size: 0;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
}

.main-nav a {
  display: flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 4px;
  color: #d6dde5;
  font-size: 13px;
  line-height: 1.5;
  text-decoration: none;
  white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.active {
  color: white;
  background: var(--nav-active);
}

.main-nav a[aria-disabled="true"] { cursor: default; }

.topbar-meta {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 0;
  white-space: nowrap;
}

.account-button {
  height: 30px;
  padding: 0 16px;
  border: 1px solid #647287;
  border-radius: 7px;
  color: white;
  background: #47566a;
  font-size: 13px;
  font-weight: 400;
}

.sync-time { margin-left: auto; color: #b9c1cc; font-size: 10px; }
.user-name { color: #c9d0d9; font-size: 10px; }
.logout-link { margin-left: -4px; color: #e58b91; font-size: 10px; text-decoration: none; }
.logout-link:hover { color: #ffb1b6; }

.dashboard-shell {
  width: min(1600px, calc(100% - 48px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

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

.toolbar-spacer { flex: 1; }

.period-picker { position: relative; z-index: 25; }
.period-picker > summary {
  min-width: 226px;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  box-shadow: 0 1px 3px rgb(20 30 50 / 5%);
  cursor: pointer;
  list-style: none;
  font-size: 13px;
}
.page-daily .toolbar { margin-bottom: 27px; }
.period-picker > summary::-webkit-details-marker { display: none; }
.period-picker[open] > summary {
  border-color: #dfa92d;
  box-shadow: 0 0 0 1px rgb(223 169 45 / 15%);
}
.period-calendar-icon {
  width: 16px;
  height: 16px;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Crect x='2.5' y='4' width='13' height='11' rx='1.6' fill='none' stroke='%23545e6b' stroke-width='1.5'/%3E%3Cpath d='M2.8 7h12.4M6 2.8v3M12 2.8v3' fill='none' stroke='%23545e6b' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
}
.period-chevron {
  width: 8px;
  height: 8px;
  border-right: 1.5px solid #5e6673;
  border-bottom: 1.5px solid #5e6673;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .15s ease;
}
.period-picker[open] .period-chevron { transform: rotate(225deg) translate(-2px, -1px); }

.period-popover {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  left: 0;
  width: 780px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  background: white;
  box-shadow: 0 8px 32px rgb(0 0 0 / 15%);
}
.calendar-date-form { margin: 0; }
.date-picker-main {
  position: relative;
  height: 350px;
}
.date-preset-list {
  position: absolute;
  z-index: 2;
  inset: 0 auto 0 0;
  width: 174px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border-right: 1px solid #e4e6ea;
}
.date-preset-list button {
  min-height: 0;
  padding: 8px 12px;
  border: 0;
  border-radius: 5px;
  color: #333b48;
  background: transparent;
  font-size: 13px;
  line-height: 15.5px;
  text-align: left;
  cursor: pointer;
}
.date-preset-list button:hover { background: #f3f5f7; }
.date-calendars {
  width: 100%;
  height: 350px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  padding: 16px 16px 16px 180px;
}
.date-calendar header {
  height: 32px;
  display: grid;
  grid-template-columns: 28px 1fr 28px;
  align-items: center;
  padding: 0 4px;
  text-align: center;
}
.date-calendar header strong { font-size: 15px; font-weight: 600; line-height: 22.5px; }
.calendar-nav {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  color: #66707c;
  background: transparent;
  cursor: pointer;
}
.calendar-nav:hover { background: #f1f3f6; }
.calendar-weekdays,
.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
}
.calendar-weekdays { margin: 12px 0 8px; }
.calendar-weekdays span {
  height: 26px;
  display: grid;
  place-items: center;
  padding: 4px 0;
  color: #858c97;
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
}
.calendar-days > button,
.calendar-blank {
  height: 38.3px;
  min-width: 0;
}
.calendar-days > button {
  position: relative;
  padding: 0;
  border: 0;
  color: #333b47;
  background: transparent;
  font-size: 13px;
  line-height: 19.5px;
  cursor: pointer;
}
.calendar-days > button:hover:not(:disabled) { background: #edf4fb; }
.calendar-days > button.in-range { background: #edf5fc; }
.calendar-days > button.range-edge {
  z-index: 1;
  border-radius: 999px;
  color: white;
  background: #4e97d3;
}
.calendar-days > button:disabled { color: #c8ccd1; cursor: default; }
.date-picker-footer {
  width: 620px;
  height: 60px;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-left: 160px;
  padding: 12px 16px;
  border-top: 1px solid #e4e6ea;
  color: #666e7b;
  font-size: 14px;
  line-height: 21px;
}
.date-picker-footer > div { display: flex; gap: 9px; }
.date-picker-footer button { height: 35px; min-height: 35px; }
.date-picker-footer .primary-button { min-width: 118px; }
.date-cancel-button {
  min-width: 86px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #5b6471;
  background: white;
  font-size: 14px;
  line-height: 17px;
  cursor: pointer;
}
.date-picker-footer .primary-button { padding: 8px 20px; font-size: 14px; font-weight: 500; line-height: 17px; }

.primary-button,
.secondary-button {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 7px;
  cursor: pointer;
}

.primary-button { border: 1px solid var(--blue); color: white; background: var(--blue); }
.secondary-button { border: 1px solid var(--line); color: #3f4858; background: white; }
.secondary-button:disabled { opacity: .72; cursor: default; }
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
}
.secondary-link:hover { border-color: #b7cbe2; color: var(--blue-dark); }
.secondary-link.active { border-color: #b9d7f5; color: var(--blue-dark); background: #eef6ff; }

.segmented {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.segmented button {
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-right: 1px solid var(--line);
  color: #404858;
  background: white;
  font-size: 14px;
  cursor: pointer;
}
.segmented button:last-child { border-right: 0; }
.segmented button.active { color: white; background: var(--blue); }

.data-note {
  min-height: 18px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 11px;
}

.data-note.error { color: var(--bad); }
.data-note.table-note { margin: 9px 0 0; }

.account-balance-card {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
  padding: 10px 18px;
  border: 1px solid #a9d5b5;
  border-radius: 8px;
  background: #f1faf3;
  box-shadow: 0 1px 3px rgb(0 0 0 / 8%);
}
.account-balance-card > div { display: grid; gap: 2px; }
.account-balance-card span {
  color: #657080;
  font-size: 11px;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.account-balance-card strong {
  color: #237b43;
  font-size: 21px;
  line-height: 28px;
  font-variant-numeric: tabular-nums;
}
.account-balance-card small { color: #7c8797; font-size: 11px; }
#account-balance-updated { margin-left: 14px; }
.account-balance-actions {
  margin-left: auto;
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}
.account-top-up-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 13px;
  border-radius: 6px;
  background: var(--blue);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.account-top-up-link:hover { background: #176cc3; color: #fff; }

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

.kpi-card {
  min-height: 66px;
  display: grid;
  place-items: center;
  align-content: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  box-shadow: 0 1px 3px rgb(0 0 0 / 10%);
  text-align: center;
}

.kpi-card strong {
  margin-bottom: 4px;
  color: #1e293b;
  font-size: 16px;
  line-height: 24px;
  font-variant-numeric: tabular-nums;
}

.kpi-card span {
  color: var(--muted);
  font-size: 11px;
  line-height: 16.5px;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.report-section { margin-top: 24px; }

.report-controls {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 10px;
}
.report-controls.compact { justify-content: flex-end; }

.report-controls h1 { margin: 0 0 4px; font-size: 16px; }
.report-controls p { margin: 0; color: var(--muted); font-size: 11px; }
.mode-switch button { min-width: 0; min-height: 31px; padding: 5px 18px; font-size: 13px; line-height: 19px; }
.mode-switch button.active { background: #0969da; }

.table-scroll {
  overflow-x: auto;
  border: 0;
  border-radius: 8px;
  background: white;
  box-shadow: 0 1px 3px rgb(0 0 0 / 10%);
}

.report-table {
  width: 100%;
  min-width: 1540px;
  border-collapse: collapse;
  color: #333;
  font-size: 13px;
  line-height: 19.5px;
  font-variant-numeric: tabular-nums;
}

.report-table th,
.report-table td {
  height: auto;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}

.report-table th {
  color: #666;
  background: #f8f9fa;
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.sort-button {
  position: relative;
  width: 100%;
  min-height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  white-space: nowrap;
  cursor: pointer;
}

.report-table th:first-child .sort-button { justify-content: flex-start; }
.sort-arrow {
  position: absolute;
  right: 0;
  min-width: 0;
  color: #aeb4bf;
  font-size: 11px;
  line-height: 1;
  opacity: 0;
}
.sort-button.active .sort-arrow,
.sort-button:hover .sort-arrow { color: var(--blue-dark); opacity: 1; }
.sort-button:hover { color: var(--blue-dark); }

.report-table td { font-size: 13px; line-height: 19.5px; }
.report-table th:first-child,
.report-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 110px;
  text-align: left;
  background: white;
}
.report-table th:first-child { z-index: 3; background: #f8f9fa; }
.report-table tr:last-child td { border-bottom: 0; }
.report-table tr.total-row td { font-weight: 700; background: #e8eaf6; }
.report-table tr.total-row td:first-child { background: #e8eaf6; }

.page-daily .report-table { min-width: 1580px; table-layout: fixed; }
.page-daily .report-table th { overflow: hidden; }
.page-daily .sort-button { gap: 5px; }
.page-daily .sort-arrow {
  position: static;
  flex: 0 0 12px;
  width: 12px;
  text-align: center;
}
.page-daily .sort-button .help {
  flex: 0 0 14px;
  margin-left: 0;
}
.page-daily .report-table th:nth-child(1), .page-daily .report-table td:nth-child(1) { width: 88px; min-width: 88px; }
.page-daily .report-table th:nth-child(2), .page-daily .report-table td:nth-child(2) { width: 102px; min-width: 102px; }
.page-daily .report-table th:nth-child(3), .page-daily .report-table td:nth-child(3) { width: 84px; min-width: 84px; }
.page-daily .report-table th:nth-child(4), .page-daily .report-table td:nth-child(4) { width: 62px; min-width: 62px; }
.page-daily .report-table th:nth-child(5), .page-daily .report-table td:nth-child(5) { width: 58px; min-width: 58px; }
.page-daily .report-table th:nth-child(6), .page-daily .report-table td:nth-child(6) { width: 66px; min-width: 66px; }
.page-daily .report-table th:nth-child(7), .page-daily .report-table td:nth-child(7) { width: 68px; min-width: 68px; }
.page-daily .report-table th:nth-child(8), .page-daily .report-table td:nth-child(8) { width: 55px; min-width: 55px; }
.page-daily .report-table th:nth-child(9), .page-daily .report-table td:nth-child(9) { width: 98px; min-width: 98px; }
.page-daily .report-table th:nth-child(10), .page-daily .report-table td:nth-child(10) { width: 95px; min-width: 95px; }
.page-daily .report-table th:nth-child(11), .page-daily .report-table td:nth-child(11) { width: 85px; min-width: 85px; }
.page-daily .report-table th:nth-child(12), .page-daily .report-table td:nth-child(12) { width: 85px; min-width: 85px; }
.page-daily .report-table th:nth-child(13), .page-daily .report-table td:nth-child(13) { width: 105px; min-width: 105px; }
.page-daily .report-table th:nth-child(14), .page-daily .report-table td:nth-child(14) { width: 80px; min-width: 80px; }
.page-daily .report-table th:nth-child(15), .page-daily .report-table td:nth-child(15) { width: 75px; min-width: 75px; }
.page-daily .report-table th:nth-child(16), .page-daily .report-table td:nth-child(16) { width: 85px; min-width: 85px; }
.page-daily .report-table th:nth-child(17), .page-daily .report-table td:nth-child(17) { width: 95px; min-width: 95px; }
.page-daily .report-table th:nth-child(18), .page-daily .report-table td:nth-child(18) { width: 108px; min-width: 108px; }
.page-daily .report-table th:nth-child(19), .page-daily .report-table td:nth-child(19) { width: 75px; min-width: 75px; }
.page-daily .report-table th.lead-gap-column,
.page-daily .report-table th.lead-gap-column .sort-button {
  text-align: center;
  line-height: 14px;
  white-space: normal;
}
.page-daily .report-table th.lead-gap-column,
.page-daily .report-table td:nth-child(9),
.page-daily .report-table td:nth-child(10) {
  padding-right: 6px;
  padding-left: 6px;
  text-align: center;
}
.page-daily .report-table th.lead-gap-column .sort-button {
  justify-content: center;
  overflow: hidden;
}
.page-daily .report-table th.lead-gap-column .sort-arrow {
  position: absolute;
  right: 0;
}
.page-daily .report-table th.started-orders-column .sort-button {
  justify-content: center;
  line-height: 14px;
  white-space: normal;
}
.page-daily .report-table th.started-orders-column .sort-arrow {
  position: absolute;
  right: 0;
}
.page-daily .report-table th.cpl-column,
.page-daily .report-table th.cpl-column .sort-button {
  text-align: center;
  line-height: 14px;
  white-space: normal;
}
.page-daily .report-table th.cpl-column,
.page-daily .report-table td:nth-child(11),
.page-daily .report-table td:nth-child(12) {
  padding-right: 5px;
  padding-left: 5px;
  text-align: center;
}
.page-daily .report-table th.cpl-column .sort-button { justify-content: center; }
.page-daily .report-table th.cpl-column .sort-arrow {
  position: absolute;
  right: 0;
}
.page-daily.group-week .report-table { min-width: 1700px; }
.page-daily.group-week .report-table th:nth-child(1),
.page-daily.group-week .report-table td:nth-child(1) {
  width: 210px;
  min-width: 210px;
}
.page-daily .report-table tr.good-row { background: #d9ead3; }
.page-daily .report-table tr.good-row td,
.page-daily .report-table tr.good-row td:first-child { background: transparent; }

.discrepancy-shell { display: block; min-width: 0; }
.discrepancy-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
  padding: 4px 2px 0;
}
.discrepancy-heading h1 { margin: 3px 0 5px; color: #26384d; font-size: 25px; line-height: 1.25; }
.discrepancy-heading p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.section-kicker {
  color: var(--blue-dark);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .7px;
  text-transform: uppercase;
}
.discrepancy-report { margin-top: 28px; }
.discrepancy-report-heading { margin-bottom: 12px; }
.discrepancy-report-heading h2 { color: #28394d; }
.discrepancy-table { min-width: 820px; table-layout: fixed; }
.discrepancy-table th:first-child,
.discrepancy-table td:first-child { width: 190px; min-width: 190px; }
.discrepancy-table th:nth-child(2),
.discrepancy-table td:nth-child(2),
.discrepancy-table th:nth-child(3),
.discrepancy-table td:nth-child(3) { width: 155px; }
.discrepancy-table th:nth-child(4),
.discrepancy-table td:nth-child(4) { width: 125px; }
.discrepancy-table th:nth-child(5),
.discrepancy-table td:nth-child(5) { width: 155px; }
.discrepancy-table th:nth-child(6),
.discrepancy-table td:nth-child(6) { width: 160px; }
.page-discrepancy .sort-button { gap: 6px; }
.page-discrepancy .sort-arrow {
  position: static;
  flex: 0 0 12px;
  width: 12px;
  text-align: center;
}
.page-discrepancy .sort-button .help { flex: 0 0 14px; margin-left: 0; }
.discrepancy-value {
  display: inline-flex;
  min-width: 68px;
  justify-content: flex-end;
  padding: 2px 7px;
  border-radius: 999px;
  font-weight: 600;
}
.discrepancy-value.positive { color: #a33a3a; background: #fdecec; }
.discrepancy-value.negative { color: #2469a8; background: #eaf4ff; }
.discrepancy-value.zero { color: #267247; background: #eaf7ef; }
.discrepancy-kpis strong[data-kind="positive"] { color: #b33f3f; }
.discrepancy-kpis strong[data-kind="negative"] { color: #2469a8; }
.discrepancy-kpis strong[data-kind="zero"] { color: #267247; }

.metric-detail-button,
.metric-detail-value {
  display: inline-flex;
  min-width: 24px;
  align-items: center;
  justify-content: center;
  padding: 0 2px;
  font: inherit;
  font-weight: inherit;
  line-height: inherit;
}
.metric-detail-button {
  border: 0;
  border-bottom: 1px dashed currentColor;
  color: #176bb7;
  background: transparent;
  cursor: pointer;
}
.metric-detail-value {
  border-bottom: 1px solid transparent;
}
.metric-detail-button:hover,
.metric-detail-button[aria-expanded="true"] {
  color: #0b5ca5;
  background: rgba(52, 152, 219, 0.09);
  border-radius: 4px;
}
.metric-detail-button:focus-visible {
  outline: 2px solid #3498db;
  outline-offset: 2px;
  border-radius: 4px;
}

.crm-detail-popover {
  position: fixed;
  z-index: 1200;
  width: min(340px, calc(100vw - 24px));
  max-height: min(390px, calc(100vh - 24px));
  padding: 14px;
  overflow: hidden;
  border: 1px solid #dce3eb;
  border-radius: 12px;
  background: white;
  box-shadow: 0 14px 38px rgba(33, 45, 61, 0.2);
}
.crm-detail-popover[hidden] { display: none; }
.crm-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #edf0f4;
}
.crm-detail-header > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}
.crm-detail-header strong {
  color: #26364a;
  font-size: 14px;
  line-height: 19px;
}
.crm-detail-header span {
  color: var(--muted);
  font-size: 12px;
  line-height: 17px;
}
.crm-detail-header button {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  color: #6f7d90;
  background: #f1f4f7;
  font-size: 21px;
  line-height: 28px;
  cursor: pointer;
}
.crm-detail-list {
  display: grid;
  max-height: 292px;
  margin-top: 10px;
  padding-right: 3px;
  gap: 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.crm-detail-link {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 9px;
  border: 1px solid #e3e8ee;
  border-radius: 8px;
  color: #176bb7;
  background: #f8fafc;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.crm-detail-link:hover { border-color: #9dc8eb; background: #eef7fd; }
.crm-detail-link small {
  flex: 0 0 auto;
  color: #66768a;
  font-size: 11px;
}
.crm-detail-note {
  margin: 2px 0 0;
  color: #8a5b13;
  font-size: 11px;
  line-height: 16px;
}

@media (max-width: 640px) {
  .crm-detail-popover {
    width: calc(100vw - 24px);
    max-height: min(58vh, 420px);
    border-radius: 14px;
  }
  .crm-detail-list { max-height: calc(min(58vh, 420px) - 90px); }
  .crm-detail-link { min-height: 40px; }
}

.help {
  display: inline-grid;
  width: 14px;
  height: 14px;
  place-items: center;
  margin-left: 2px;
  border-radius: 50%;
  color: white;
  background: #aeb5bf;
  font-size: 9px;
}

.empty-cell {
  height: 90px !important;
  color: var(--muted);
  text-align: center !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.creatives-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.distribution-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.distribution-card {
  min-height: 66px;
  display: grid;
  place-items: center;
  align-content: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  text-align: center;
}

.distribution-card.good { border-color: #65b985; background: #f2fbf5; }
.distribution-card.medium { border-color: #d9b864; background: #fffaf0; }
.distribution-card.bad { border-color: #d8767d; background: #fff5f5; }
.distribution-card strong { margin-bottom: 4px; color: #1e293b; font-size: 16px; line-height: 24px; }
.distribution-card span { color: var(--muted); font-size: 11px; line-height: 16.5px; letter-spacing: .5px; text-transform: uppercase; }

.preset-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 24px;
  padding: 12px 16px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.preset-bar button {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #4a5363;
  background: white;
  font-size: 12px;
  line-height: 18px;
  cursor: pointer;
}
.preset-bar button.active { color: white; border-color: var(--blue); background: var(--blue); }
.preset-bar button:disabled { opacity: .65; cursor: wait; }
.preset-label { flex: 0 0 auto; margin: 0 2px 0 6px; color: #333; font-size: 11px; font-weight: 600; line-height: 16.5px; letter-spacing: .5px; text-transform: uppercase; }
.preset-label.danger { color: var(--bad); }
.preset-label.success { color: var(--good); }

.custom-filter { margin-top: 16px; }
.custom-filter > summary {
  width: 153px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fafc;
  color: #334155;
  cursor: pointer;
  list-style: none;
  font-size: 13px;
  font-weight: 600;
  line-height: 15.5px;
}
.custom-filter > summary::-webkit-details-marker { display: none; }
.custom-filter form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}
.custom-filter label { display: grid; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 700; }
.custom-filter input, .custom-filter select {
  min-height: 35px;
  width: 100%;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: white;
}
.custom-filter button { align-self: end; min-height: 35px; border: 1px solid var(--line); border-radius: 6px; background: #f8f9fb; cursor: pointer; }

.creatives-report { margin-top: 16px; }
.breadcrumbs { min-height: 25px; display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.breadcrumbs[hidden] { display: none; }
.breadcrumbs button { padding: 0; border: 0; color: var(--blue-dark); background: transparent; cursor: pointer; }
.creatives-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "levels search"
    ". mode";
  align-items: end;
  column-gap: 12px;
  row-gap: 13px;
  margin-bottom: 12px;
}
.level-tabs { grid-area: levels; display: flex; align-items: end; gap: 6px; border-bottom: 1px solid var(--line); }
.level-tabs button {
  min-height: 44.5px;
  padding: 10px 20px;
  border: 0;
  border-bottom: 2px solid transparent;
  color: #687184;
  background: transparent;
  font-size: 15px;
  line-height: 22.5px;
  cursor: pointer;
}
.level-tabs button.active { color: #1e293b; border-bottom-color: var(--nav); font-weight: 600; }
.search-input {
  grid-area: search;
  width: min(250px, 30vw);
  min-height: 35px;
  padding: 8px 12px 8px 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: #000;
  background-color: #f1f5f9;
  font-size: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Ccircle cx='7.5' cy='7.5' r='4.8' fill='none' stroke='%23aeb5bf' stroke-width='1.6'/%3E%3Cpath d='m11.2 11.2 4 4' stroke='%23aeb5bf' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 12px center;
  background-size: 15px;
  align-self: end;
  margin-bottom: 6px;
}
.search-input { height: 35px; min-height: 35px; line-height: 17px; }
.creatives-controls .mode-switch { grid-area: mode; justify-self: end; }
.creatives-controls .mode-switch button { min-width: 0; min-height: 31px; padding: 5px 18px; }
.creatives-table { min-width: 1600px; }
.creatives-table th,
.creatives-table td { padding: 6px 10px; font-size: 12px; line-height: 18px; }
.creatives-table th { height: 31px; font-size: 12px; font-weight: 600; }
.creatives-table tr.total-row td { height: 32px; }
.creatives-table tr.campaign-entity-row td { height: 37px; }
.creatives-table th:first-child, .creatives-table td:first-child { width: 280px; min-width: 280px; max-width: 280px; }
.creatives-table th:nth-child(2), .creatives-table td:nth-child(2) { width: 80px; min-width: 80px; }
.creatives-table th:nth-child(3), .creatives-table td:nth-child(3) { width: 129px; min-width: 129px; }
.creatives-table th:nth-child(4), .creatives-table td:nth-child(4) { width: 63px; min-width: 63px; }
.creatives-table[data-level="campaign"] { min-width: 1652px; }
.creatives-table[data-level="campaign"] th:nth-child(2), .creatives-table[data-level="campaign"] td:nth-child(2) { width: 80px; min-width: 80px; max-width: 80px; }
.creatives-table[data-level="campaign"] th:nth-child(4), .creatives-table[data-level="campaign"] td:nth-child(4) { width: 63px; min-width: 63px; max-width: 63px; }
.creatives-table[data-level="campaign"] th:nth-child(5), .creatives-table[data-level="campaign"] td:nth-child(5) { width: 104px; min-width: 104px; max-width: 104px; }
.creatives-table[data-level="campaign"] th:nth-child(6), .creatives-table[data-level="campaign"] td:nth-child(6) { width: 86px; min-width: 86px; max-width: 86px; }
.creatives-table[data-level="campaign"] th:nth-child(7), .creatives-table[data-level="campaign"] td:nth-child(7) { width: 67px; min-width: 67px; max-width: 67px; }
.creatives-table[data-level="campaign"] th:nth-child(8), .creatives-table[data-level="campaign"] td:nth-child(8) { width: 59px; min-width: 59px; max-width: 59px; }
.creatives-table[data-level="campaign"] th:nth-child(9), .creatives-table[data-level="campaign"] td:nth-child(9) { width: 70px; min-width: 70px; max-width: 70px; }
.creatives-table[data-level="campaign"] th:nth-child(10), .creatives-table[data-level="campaign"] td:nth-child(10) { width: 70px; min-width: 70px; max-width: 70px; }
.creatives-table[data-level="campaign"] th:nth-child(11), .creatives-table[data-level="campaign"] td:nth-child(11) { width: 61px; min-width: 61px; max-width: 61px; }
.creatives-table[data-level="campaign"] th:nth-child(12), .creatives-table[data-level="campaign"] td:nth-child(12) { width: 80px; min-width: 80px; max-width: 80px; }
.creatives-table[data-level="campaign"] th:nth-child(13), .creatives-table[data-level="campaign"] td:nth-child(13) { width: 75px; min-width: 75px; max-width: 75px; }
.creatives-table[data-level="campaign"] th:nth-child(14), .creatives-table[data-level="campaign"] td:nth-child(14) { width: 69px; min-width: 69px; max-width: 69px; }
.creatives-table[data-level="campaign"] th:nth-child(15), .creatives-table[data-level="campaign"] td:nth-child(15) { width: 87px; min-width: 87px; max-width: 87px; }
.creatives-table[data-level="campaign"] th:nth-child(16), .creatives-table[data-level="campaign"] td:nth-child(16) { width: 91px; min-width: 91px; max-width: 91px; }
.creatives-table[data-level="campaign"] th:nth-child(17), .creatives-table[data-level="campaign"] td:nth-child(17) { width: 112px; min-width: 112px; max-width: 112px; }
.creatives-table[data-level="campaign"] th:nth-child(18), .creatives-table[data-level="campaign"] td:nth-child(18) { width: 70px; min-width: 70px; max-width: 70px; }

.creatives-table[data-level="group"] { min-width: 1812px; }
.creatives-table[data-level="group"] th:nth-child(2), .creatives-table[data-level="group"] td:nth-child(2) { width: 86px; min-width: 86px; max-width: 86px; }
.creatives-table[data-level="group"] th:nth-child(4), .creatives-table[data-level="group"] td:nth-child(4) { width: 122px; min-width: 122px; max-width: 122px; }
.creatives-table[data-level="group"] th:nth-child(5), .creatives-table[data-level="group"] td:nth-child(5) { width: 91px; min-width: 91px; max-width: 91px; }
.creatives-table[data-level="group"] th:nth-child(6), .creatives-table[data-level="group"] td:nth-child(6) { width: 104px; min-width: 104px; max-width: 104px; }
.creatives-table[data-level="group"] th:nth-child(7), .creatives-table[data-level="group"] td:nth-child(7) { width: 86px; min-width: 86px; max-width: 86px; }
.creatives-table[data-level="group"] th:nth-child(8), .creatives-table[data-level="group"] td:nth-child(8) { width: 67px; min-width: 67px; max-width: 67px; }
.creatives-table[data-level="group"] th:nth-child(9), .creatives-table[data-level="group"] td:nth-child(9) { width: 59px; min-width: 59px; max-width: 59px; }
.creatives-table[data-level="group"] th:nth-child(10), .creatives-table[data-level="group"] td:nth-child(10) { width: 73px; min-width: 73px; max-width: 73px; }
.creatives-table[data-level="group"] th:nth-child(11), .creatives-table[data-level="group"] td:nth-child(11) { width: 70px; min-width: 70px; max-width: 70px; }
.creatives-table[data-level="group"] th:nth-child(12), .creatives-table[data-level="group"] td:nth-child(12) { width: 61px; min-width: 61px; max-width: 61px; }
.creatives-table[data-level="group"] th:nth-child(13), .creatives-table[data-level="group"] td:nth-child(13) { width: 82px; min-width: 82px; max-width: 82px; }
.creatives-table[data-level="group"] th:nth-child(14), .creatives-table[data-level="group"] td:nth-child(14) { width: 75px; min-width: 75px; max-width: 75px; }
.creatives-table[data-level="group"] th:nth-child(15), .creatives-table[data-level="group"] td:nth-child(15) { width: 70px; min-width: 70px; max-width: 70px; }
.creatives-table[data-level="group"] th:nth-child(16), .creatives-table[data-level="group"] td:nth-child(16) { width: 87px; min-width: 87px; max-width: 87px; }
.creatives-table[data-level="group"] th:nth-child(17), .creatives-table[data-level="group"] td:nth-child(17) { width: 91px; min-width: 91px; max-width: 91px; }
.creatives-table[data-level="group"] th:nth-child(18), .creatives-table[data-level="group"] td:nth-child(18) { width: 112px; min-width: 112px; max-width: 112px; }
.creatives-table[data-level="group"] th:nth-child(19), .creatives-table[data-level="group"] td:nth-child(19) { width: 67px; min-width: 67px; max-width: 67px; }

.creatives-table[data-level="banner"] { min-width: 1601px; }
.creatives-table[data-level="banner"] th:nth-child(2), .creatives-table[data-level="banner"] td:nth-child(2) { width: 88px; min-width: 88px; max-width: 88px; }
.creatives-table[data-level="banner"] th:nth-child(4), .creatives-table[data-level="banner"] td:nth-child(4) { width: 104px; min-width: 104px; max-width: 104px; }
.creatives-table[data-level="banner"] th:nth-child(5), .creatives-table[data-level="banner"] td:nth-child(5) { width: 86px; min-width: 86px; max-width: 86px; }
.creatives-table[data-level="banner"] th:nth-child(6), .creatives-table[data-level="banner"] td:nth-child(6) { width: 67px; min-width: 67px; max-width: 67px; }
.creatives-table[data-level="banner"] th:nth-child(7), .creatives-table[data-level="banner"] td:nth-child(7) { width: 59px; min-width: 59px; max-width: 59px; }
.creatives-table[data-level="banner"] th:nth-child(8), .creatives-table[data-level="banner"] td:nth-child(8) { width: 73px; min-width: 73px; max-width: 73px; }
.creatives-table[data-level="banner"] th:nth-child(9), .creatives-table[data-level="banner"] td:nth-child(9) { width: 70px; min-width: 70px; max-width: 70px; }
.creatives-table[data-level="banner"] th:nth-child(10), .creatives-table[data-level="banner"] td:nth-child(10) { width: 61px; min-width: 61px; max-width: 61px; }
.creatives-table[data-level="banner"] th:nth-child(11), .creatives-table[data-level="banner"] td:nth-child(11) { width: 82px; min-width: 82px; max-width: 82px; }
.creatives-table[data-level="banner"] th:nth-child(12), .creatives-table[data-level="banner"] td:nth-child(12) { width: 75px; min-width: 75px; max-width: 75px; }
.creatives-table[data-level="banner"] th:nth-child(13), .creatives-table[data-level="banner"] td:nth-child(13) { width: 70px; min-width: 70px; max-width: 70px; }
.creatives-table[data-level="banner"] th:nth-child(14), .creatives-table[data-level="banner"] td:nth-child(14) { width: 87px; min-width: 87px; max-width: 87px; }
.creatives-table[data-level="banner"] th:nth-child(15), .creatives-table[data-level="banner"] td:nth-child(15) { width: 91px; min-width: 91px; max-width: 91px; }
.creatives-table[data-level="banner"] th:nth-child(16), .creatives-table[data-level="banner"] td:nth-child(16) { width: 112px; min-width: 112px; max-width: 112px; }
.creatives-table[data-level="banner"] th:nth-child(17), .creatives-table[data-level="banner"] td:nth-child(17) { width: 67px; min-width: 67px; max-width: 67px; }
.creatives-table td:first-child { white-space: normal; }
.creative-group-checkbox {
  margin: 0 8px 0 0;
  accent-color: var(--blue);
  vertical-align: middle;
  cursor: pointer;
}
.creative-name-main {
  display: flex;
  align-items: center;
  min-width: 0;
}
.creative-name-main .drill-link {
  position: relative;
  min-width: 0;
  flex: 1;
  overflow: hidden;
  padding-right: 24px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.creative-name-main + small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.creatives-table tr.group-entity-row td,
.creatives-table tr.banner-entity-row td { height: 55px; }
.creatives-table tr.good-row td { background: #e8f5e9; }
.creatives-table tr.bad-row td { background: #ffebee; }
.creatives-table tr.good-row td:first-child { background: #e8f5e9; }
.creatives-table tr.bad-row td:first-child { background: #ffebee; }
.id-cell { font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.drill-link { padding: 0; border: 0; color: var(--blue-dark); background: transparent; text-align: left; cursor: pointer; font-weight: 650; }
.drill-link::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 12px;
  width: 15px;
  height: 12px;
  transform: translateY(-50%);
  opacity: .72;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 15 12'%3E%3Cpolyline points='1,10 5,5 8,8 14,1' fill='none' stroke='%238b95a4' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.creatives-table td small {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.status-badge.active::before { content: "◉ "; font-size: 9px; }
.status-badge { display: inline-block; padding: 2px 8px; border-radius: 999px; color: #666f7d; background: #eef0f3; font-size: 12px; line-height: 18px; }
.status-badge.active { color: #277d4b; background: #e8f7ed; }
.status-badge.stopped, .status-badge.deleted { color: #a34a52; background: #fbecee; }

.budget-report { margin-top: 24px; }
.budget-controls { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.budget-controls .mode-switch button { width: auto; min-width: 0; padding: 0 18px; }
.budget-table { min-width: 1675px; table-layout: fixed; }
.budget-table th:nth-child(-n+6),
.budget-table td:nth-child(-n+6) { text-align: left; }
.budget-table th:nth-child(-n+6) .sort-button { justify-content: flex-start; }
.budget-table th:nth-child(1), .budget-table td:nth-child(1) { width: 118px; min-width: 118px; max-width: 118px; }
.budget-table th:nth-child(2), .budget-table td:nth-child(2) { width: 240px; min-width: 240px; max-width: 240px; }
.budget-table th:nth-child(3), .budget-table td:nth-child(3) { width: 95px; min-width: 95px; max-width: 95px; }
.budget-table th:nth-child(4), .budget-table td:nth-child(4) { width: 240px; min-width: 240px; max-width: 240px; }
.budget-table th:nth-child(5), .budget-table td:nth-child(5) { width: 115px; min-width: 115px; max-width: 115px; }
.budget-table th:nth-child(6), .budget-table td:nth-child(6) { width: 126px; min-width: 126px; max-width: 126px; }
.budget-table th:nth-child(7), .budget-table td:nth-child(7) { width: 110px; min-width: 110px; max-width: 110px; }
.budget-table th:nth-child(8), .budget-table td:nth-child(8) { width: 96px; min-width: 96px; max-width: 96px; }
.budget-table th:nth-child(9), .budget-table td:nth-child(9) { width: 79px; min-width: 79px; max-width: 79px; }
.budget-table th:nth-child(10), .budget-table td:nth-child(10) { width: 125px; min-width: 125px; max-width: 125px; }
.budget-table th:nth-child(11), .budget-table td:nth-child(11) { width: 101px; min-width: 101px; max-width: 101px; }
.budget-table th:nth-child(12), .budget-table td:nth-child(12) { width: 74px; min-width: 74px; max-width: 74px; }
.budget-table th:nth-child(13), .budget-table td:nth-child(13) { width: 149px; min-width: 149px; max-width: 149px; }
.budget-table tr.good-row { background: #d9ead3; }
.budget-table tr.bad-row { background: #ffebee; }
.budget-table tr.good-row td,
.budget-table tr.good-row td:first-child,
.budget-table tr.bad-row td,
.budget-table tr.bad-row td:first-child { background: transparent; }
.budget-table tr.good-row td:first-child,
.budget-table tr.bad-row td:first-child { box-shadow: none; }
.budget-table tr.total-row td { border-bottom-color: #8f939c; }
.budget-table thead th:nth-child(1),
.budget-table tbody tr:not(.total-row) td:nth-child(1) {
  position: sticky;
  left: 0;
  z-index: 4;
}
.budget-table thead th:nth-child(2),
.budget-table tbody tr:not(.total-row) td:nth-child(2) {
  position: sticky;
  left: 118px;
  z-index: 4;
  border-right: 1px solid #d9dee7;
  box-shadow: 7px 0 10px rgb(31 42 58 / 8%);
}
.budget-table thead th:nth-child(-n+2) {
  z-index: 5;
  background-color: #f8f9fa;
}
.budget-table tbody tr:not(.total-row) td:nth-child(-n+2) {
  background-color: #fff;
}
.budget-table tbody tr.good-row:not(.total-row) td:nth-child(-n+2) {
  background-color: #d9ead3;
}
.budget-table tbody tr.bad-row:not(.total-row) td:nth-child(-n+2) {
  background-color: #ffebee;
}
.budget-table th:nth-child(2),
.budget-table td:nth-child(2) {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.entity-name-cell { overflow: hidden; text-overflow: ellipsis; }

.selectable-header {
  display: flex;
  align-items: center;
  gap: 8px;
}
.selectable-header .sort-button { width: auto; flex: 1; }
.selectable-header input,
.budget-group-name input,
.creative-group-checkbox {
  box-sizing: border-box;
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  accent-color: var(--blue);
  cursor: pointer;
}

.copy-id-button {
  padding: 0;
  border: 0;
  border-bottom: 1px dashed #9aa2af;
  color: var(--ink);
  background: transparent;
  font-variant-numeric: tabular-nums;
  cursor: copy;
}
.copy-id-button.copied { color: var(--good); border-bottom-color: var(--good); }

.budget-group-name {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}
.budget-group-name > span {
  overflow: hidden;
  color: var(--blue-dark);
  font-weight: 650;
  text-overflow: ellipsis;
}
.dynamics-button {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  margin-left: auto;
  padding: 0;
  border: 0;
  opacity: .72;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 15 12'%3E%3Cpolyline points='1,10 5,5 8,8 14,1' fill='none' stroke='%238b95a4' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  cursor: pointer;
}
.dynamics-button:hover { opacity: 1; }

.budget-value-cell { display: flex; align-items: center; gap: 8px; }
.budget-edit-button {
  padding: 0 0 1px;
  border: 0;
  border-bottom: 1px dashed #73a4d7;
  color: var(--blue-dark);
  background: transparent;
  cursor: pointer;
}
.budget-type {
  padding: 2px 6px;
  border-radius: 3px;
  color: white;
  background: #4dae72;
  font-size: 10px;
  font-weight: 700;
  line-height: 15px;
}

.creator-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 16px;
}
.creator-filter-tabs button {
  min-height: 31px;
  padding: 0 14px;
  border: 1px solid #d4d8df;
  border-radius: 6px;
  color: #3e4655;
  background: #f7f8fa;
  font-size: 13px;
  cursor: pointer;
}
.creator-filter-tabs button:first-child { min-width: 208px; }
.creator-filter-tabs button:not(:first-child) { min-width: 46px; }
.creator-filter-tabs button.active {
  border-color: var(--blue);
  color: white;
  background: var(--blue);
}
.creator-kpis .payment-kpi {
  border-color: #77bc86;
  background: #f3fbf4;
  box-shadow: 0 2px 5px rgb(43 130 68 / 10%);
}
.creator-report { margin-top: 24px; }
.creator-controls {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 10px;
}
.creator-controls .mode-switch button { min-width: 0; min-height: 31px; padding: 5px 18px; }
.video-toggle { width: 156px; min-width: 156px; height: 32px; min-height: 32px; padding: 6px 12px; font-size: 13px; line-height: 18px; white-space: nowrap; }
.video-toggle.active { border-color: var(--blue); color: white; background: var(--blue); }
.creators-table {
  --creator-name-column-width: 355px;
  --creator-status-column-width: 154px;
  width: 2083px;
  min-width: 2083px;
  table-layout: fixed;
}
.creators-table.video-columns-visible { width: 2824px; min-width: 2824px; }
.creator-scroll-hint { display: none; }
.creators-table th:nth-child(-n+4),
.creators-table td:nth-child(-n+4) { text-align: left; }
.creators-table th:nth-child(-n+4) .sort-button { justify-content: flex-start; }
.creators-table th:first-child,
.creators-table td:first-child {
  width: var(--creator-name-column-width);
  min-width: var(--creator-name-column-width);
  max-width: var(--creator-name-column-width);
}
.creators-table th:nth-child(2),
.creators-table td:nth-child(2) {
  width: var(--creator-status-column-width);
  min-width: var(--creator-status-column-width);
  max-width: var(--creator-status-column-width);
  overflow: hidden;
  white-space: nowrap;
}
.creators-table th:nth-child(3),
.creators-table td:nth-child(3) { width: 87px; min-width: 87px; max-width: 87px; }
.creators-table th:nth-child(4),
.creators-table td:nth-child(4) { width: 93px; min-width: 93px; max-width: 93px; }
.creators-table th:nth-child(5), .creators-table td:nth-child(5) { width: 118px; min-width: 118px; max-width: 118px; }
.creators-table th:nth-child(6), .creators-table td:nth-child(6) { width: 93px; min-width: 93px; max-width: 93px; }
.creators-table th:nth-child(7), .creators-table td:nth-child(7) { width: 71px; min-width: 71px; max-width: 71px; }
.creators-table th:nth-child(8), .creators-table td:nth-child(8) { width: 66px; min-width: 66px; max-width: 66px; }
.creators-table th:nth-child(9), .creators-table td:nth-child(9) { width: 74px; min-width: 74px; max-width: 74px; }
.creators-table th:nth-child(10), .creators-table td:nth-child(10) { width: 65px; min-width: 65px; max-width: 65px; }
.creators-table th:nth-child(11), .creators-table td:nth-child(11) { width: 82px; min-width: 82px; max-width: 82px; }
.creators-table th:nth-child(12), .creators-table td:nth-child(12) { width: 79px; min-width: 79px; max-width: 79px; }
.creators-table th:nth-child(13), .creators-table td:nth-child(13) { width: 124px; min-width: 124px; max-width: 124px; }
.creators-table th:nth-child(14), .creators-table td:nth-child(14) { width: 100px; min-width: 100px; max-width: 100px; }
.creators-table th:nth-child(15), .creators-table td:nth-child(15) { width: 74px; min-width: 74px; max-width: 74px; }
.creators-table th:nth-child(16), .creators-table td:nth-child(16) { width: 96px; min-width: 96px; max-width: 96px; }
.creators-table th:nth-child(17), .creators-table td:nth-child(17) { width: 93px; min-width: 93px; max-width: 93px; }
.creators-table th:nth-child(18), .creators-table td:nth-child(18) { width: 127px; min-width: 127px; max-width: 127px; }
.creators-table th:nth-child(19), .creators-table td:nth-child(19) { width: 73px; min-width: 73px; max-width: 73px; }
.creators-table th:nth-child(20), .creators-table td:nth-child(20) { width: 68px; min-width: 68px; max-width: 68px; }
.creators-table th:nth-child(21), .creators-table td:nth-child(21) { width: 74px; min-width: 74px; max-width: 74px; }
.creators-table th:nth-child(22), .creators-table td:nth-child(22) { width: 71px; min-width: 71px; max-width: 71px; }
.creators-table th:nth-child(23), .creators-table td:nth-child(23) { width: 65px; min-width: 65px; max-width: 65px; }
.creators-table th:nth-child(24), .creators-table td:nth-child(24) { width: 66px; min-width: 66px; max-width: 66px; }
.creators-table th:nth-child(25), .creators-table td:nth-child(25) { width: 85px; min-width: 85px; max-width: 85px; }
.creators-table th:first-child,
.creators-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  box-shadow: 5px 0 8px rgb(25 35 50 / 8%);
}
.creators-table th:nth-child(2),
.creators-table td:nth-child(2) {
  position: sticky;
  left: var(--creator-name-column-width);
  z-index: 2;
  box-shadow: 5px 0 8px rgb(25 35 50 / 8%);
}
.creators-table th:first-child,
.creators-table th:nth-child(2) { z-index: 4; background: #f6f7f9; }
.creators-table td:first-child,
.creators-table td:nth-child(2) { background: white; }
.creators-table .total-row td:first-child,
.creators-table .total-row td:nth-child(2) { background: #e8e9f7; }
.creators-table .creative-row td:first-child,
.creators-table .creative-row td:nth-child(2) { background: #f1f3f5; }
.creators-table .group-row td:first-child,
.creators-table .group-row td:nth-child(2) { background: #fdfdfe; }
/* Колонки после закреплённых: постоянный порядок, а префикс и ставка всегда в конце. */
.creators-table th:nth-child(3), .creators-table td:nth-child(3) { width: 118px; min-width: 118px; max-width: 118px; }
.creators-table th:nth-child(4), .creators-table td:nth-child(4) { width: 93px; min-width: 93px; max-width: 93px; }
.creators-table th:nth-child(5), .creators-table td:nth-child(5) { width: 71px; min-width: 71px; max-width: 71px; }
.creators-table th:nth-child(6), .creators-table td:nth-child(6) { width: 66px; min-width: 66px; max-width: 66px; }
.creators-table th:nth-child(7), .creators-table td:nth-child(7) { width: 74px; min-width: 74px; max-width: 74px; }
.creators-table th:nth-child(8), .creators-table td:nth-child(8) { width: 65px; min-width: 65px; max-width: 65px; }
.creators-table th:nth-child(9), .creators-table td:nth-child(9) { width: 82px; min-width: 82px; max-width: 82px; }
.creators-table th:nth-child(10), .creators-table td:nth-child(10) { width: 88px; min-width: 88px; max-width: 88px; }
.creators-table th:nth-child(11), .creators-table td:nth-child(11) { width: 79px; min-width: 79px; max-width: 79px; }
.creators-table th:nth-child(12), .creators-table td:nth-child(12) { width: 124px; min-width: 124px; max-width: 124px; }
.creators-table th:nth-child(13), .creators-table td:nth-child(13) { width: 100px; min-width: 100px; max-width: 100px; }
.creators-table th:nth-child(14), .creators-table td:nth-child(14) { width: 74px; min-width: 74px; max-width: 74px; }
.creators-table th:nth-child(15), .creators-table td:nth-child(15) { width: 96px; min-width: 96px; max-width: 96px; }
.creators-table th:nth-child(16), .creators-table td:nth-child(16) { width: 136px; min-width: 136px; max-width: 136px; }
.creators-table th:nth-child(17), .creators-table td:nth-child(17) { width: 128px; min-width: 128px; max-width: 128px; }
.creators-table th:nth-last-child(2), .creators-table td:nth-last-child(2) { width: 87px; min-width: 87px; max-width: 87px; }
.creators-table th:last-child, .creators-table td:last-child { width: 93px; min-width: 93px; max-width: 93px; }
.creator-data-row.creator-row td { font-weight: 700; }
.creator-data-row.creative-row td { background: #f1f3f5; }
.creator-data-row.group-row td { color: #4d5665; background: #fdfdfe; }
.creator-data-row.creative-row td:first-child { padding-left: 28px; }
.creator-data-row.group-row td:first-child {
  display: flex;
  align-items: center;
  gap: 0;
  padding-left: 48px;
}
.creator-entity-cell {
  overflow: hidden;
  text-overflow: ellipsis;
}
.creator-entity-cell strong { vertical-align: middle; }
.creative-cost-control {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 8px;
  padding: 1px 5px;
  border: 1px solid #d9dee6;
  border-radius: 6px;
  color: #526077;
  background: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 20px;
  vertical-align: middle;
}
.creative-cost-control input {
  width: 62px;
  min-height: 20px;
  padding: 0;
  border: 0;
  outline: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.creative-cost-caption { color: #8791a1; font-weight: 600; }
.creative-cost-control input:not([readonly]):focus { color: #176fba; }
.creative-cost-control:focus-within { border-color: #3498db; box-shadow: 0 0 0 2px rgb(52 152 219 / 14%); }
.creative-cost-control:has(input[readonly]) { background: #e9ecef; }
.creative-cost-control.saving { opacity: 0.65; }
.hierarchy-toggle {
  width: 18px;
  margin-right: 3px;
  padding: 0;
  border: 0;
  color: #9aa1aa;
  background: transparent;
  font-size: 13px;
  cursor: pointer;
}
.creator-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 16.5px;
  vertical-align: middle;
}
.creator-badge.count { color: #6a717d; background: #e8e9eb; }
.creator-prefix-cell { font-weight: 800; }
.creator-status-pill {
  display: inline-block;
  margin-right: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 18px;
}
.creator-status-pill.active { color: #2c9253; background: #e9f7ed; }
.creator-status-pill.inactive { color: #cc5a62; background: #fbecee; }
.creator-group-budget {
  display: inline-block;
  min-width: 0;
  padding: 2px 6px;
  border: 0;
  border-radius: 6px;
  color: #445069;
  background: #eef1f5;
  font-size: 12px;
  font-weight: 700;
  line-height: 18px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.creator-group-budget.active { color: #2c9253; background: #e9f7ed; }
.creator-group-budget.inactive { color: #cc5a62; background: #fbecee; }
.creator-group-budget.active:hover { color: #1f7b42; background: #dff2e5; }
.creator-group-budget.inactive:hover { color: #b84951; background: #f8dfe3; }
.creator-budget-inline-editor { gap: 3px; }
.creator-budget-inline-editor input { width: 58px; }
.creator-budget-inline-editor button { width: 24px; min-height: 24px; }
.group-branch { flex: 0 0 auto; margin-right: 6px; color: #a1a7b0; }
.creator-group-checkbox {
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 0 8px 0 0;
  padding: 0;
  vertical-align: middle;
}
.group-name {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  color: var(--blue-dark);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.creator-group-id {
  flex: 0 0 auto;
  margin-left: 8px;
  padding: 2px 5px;
  border: 1px solid #d7dbe1;
  border-radius: 4px;
  color: #6f7785;
  background: #f1f3f5;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  cursor: copy;
}
.creator-group-id.copied { border-color: var(--good); color: var(--good); }
.creator-payment-cell { font-weight: 750; }
.creator-period-cost-cell { font-weight: 750; white-space: nowrap; font-variant-numeric: tabular-nums; }
.creator-created-date-cell { color: #5e6878; white-space: nowrap; font-variant-numeric: tabular-nums; }

.settings-shell { max-width: 1600px; }
.page-creators .account-button,
.page-settings .account-button,
.page-dialog-attribution .account-button { display: none; }

.dialog-toolbar { margin-bottom: 24px; }
.dialog-candidates { margin: 0 0 28px; }
.dialog-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.dialog-candidate-heading-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }
.dialog-section-heading h2, .dialog-applied-title { margin: 0 0 5px; color: #2c3e50; font-size: 18px; }
.dialog-section-heading p { margin: 0; color: #77869b; font-size: 12px; line-height: 18px; }
.dialog-candidate-count { min-width: 32px; padding: 5px 10px; border-radius: 16px; color: #176ba5; background: #eaf5fc; text-align: center; font-weight: 700; }
.dialog-bulk-confirm-button { border: 0; border-radius: 6px; padding: 7px 12px; color: white; background: #2f9e63; cursor: pointer; font-weight: 700; }
.dialog-bulk-confirm-button:disabled { color: #8c98a8; background: #e7ebef; cursor: not-allowed; }
.dialog-candidate-table { min-width: 1520px; }
.dialog-candidate-table th, .dialog-candidate-table td { padding: 9px 11px; text-align: left; }
.dialog-candidate-table .dialog-candidate-select-cell { width: 38px; min-width: 38px; padding-left: 13px; padding-right: 5px; text-align: center; }
.dialog-candidate-select-cell input { width: 16px; height: 16px; margin: 0; accent-color: #2f9e63; cursor: pointer; }
.dialog-candidate-select-cell input:disabled { cursor: not-allowed; }
.dialog-candidate-table tr.dialog-candidate-selected td { background: #f0faf5; }
.dialog-candidate-actions { display: flex; gap: 6px; white-space: nowrap; }
.dialog-direct-link a { white-space: nowrap; }
.dialog-candidate-revenue { font-weight: 700; white-space: nowrap; }
.dialog-apply-button, .dialog-reject-button { border: 0; border-radius: 5px; padding: 6px 9px; color: white; cursor: pointer; font-weight: 650; }
.dialog-apply-button { background: #2f9e63; }
.dialog-reject-button { background: #d65b5b; }
.dialog-apply-button:disabled, .dialog-reject-button:disabled { opacity: .55; cursor: not-allowed; }
.dialog-applied-title { margin-bottom: 8px; }
.dialog-mode-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}
.dialog-mode-row .mode-switch {
  height: 32px;
  border-color: #d0d7de;
  border-radius: 6px;
}
.dialog-mode-row .mode-switch button {
  width: auto;
  min-width: 0;
  min-height: 30px;
  padding: 5px 18px;
  line-height: 19px;
}
.dialog-attribution-table {
  width: 100%;
  min-width: 1120px;
  table-layout: fixed;
}
.dialog-attribution-table th,
.dialog-attribution-table td {
  height: auto;
  padding: 10px 12px;
  text-align: left;
}
.dialog-attribution-table th { height: 39px; }
.dialog-attribution-table tr.total-row td { padding-bottom: 11px; }
.dialog-attribution-table th:first-child,
.dialog-attribution-table td:first-child {
  position: static;
  z-index: auto;
  min-width: 0;
  text-align: left;
}
.dialog-attribution-table th:nth-child(1),
.dialog-attribution-table td:nth-child(1) { width: 5%; }
.dialog-attribution-table th:nth-child(2),
.dialog-attribution-table td:nth-child(2) { width: 12%; }
.dialog-attribution-table th:nth-child(3),
.dialog-attribution-table td:nth-child(3) { width: 14%; }
.dialog-attribution-table th:nth-child(4),
.dialog-attribution-table td:nth-child(4) { width: 12%; }
.dialog-attribution-table th:nth-child(5),
.dialog-attribution-table td:nth-child(5) { width: 17%; }
.dialog-attribution-table th:nth-child(6),
.dialog-attribution-table td:nth-child(6) { width: 13%; }
.dialog-attribution-table th:nth-child(7),
.dialog-attribution-table td:nth-child(7) { width: 15%; }
.dialog-attribution-table th:nth-child(8),
.dialog-attribution-table td:nth-child(8),
.dialog-attribution-table th:nth-child(9),
.dialog-attribution-table td:nth-child(9) { width: 12%; }
.dialog-attribution-table a {
  color: #0000ee;
  text-decoration: underline;
}
.dialog-attribution-table.mode-actual .col-expected,
.dialog-attribution-table.mode-expected .col-actual { display: none; }
.dialog-candidate-source,
.dialog-discovery-source {
  min-width: 118px;
  color: #53657a;
  font-size: 12px;
  line-height: 16px;
}
.dialog-source-badge {
  display: inline-block;
  max-width: 100%;
  padding: 3px 7px;
  overflow: hidden;
  border-radius: 999px;
  color: #53657a;
  background: #edf2f7;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}
.dialog-candidate-banner-select {
  min-width: 128px;
  padding: 5px 7px;
  border: 1px solid #cfd8e3;
  border-radius: 5px;
  background: #fff;
  font: inherit;
}
.dialog-capture-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 16px;
  background: #f3f5f7;
}
.dialog-capture-card {
  width: min(100%, 560px);
  padding: 34px;
  border: 1px solid #e3e7ec;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(32, 48, 68, 0.11);
}
.dialog-capture-kicker {
  color: #2389cc;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.dialog-capture-card h1 { margin: 7px 0 8px; color: #27384d; font-size: 27px; }
.dialog-capture-intro { margin: 0 0 24px; color: #65758a; font-size: 14px; line-height: 21px; }
.dialog-capture-card form { display: grid; gap: 16px; }
.dialog-capture-card form[hidden] { display: none; }
.dialog-capture-card label { display: grid; gap: 7px; color: #34465b; font-size: 13px; font-weight: 650; }
.dialog-capture-card input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #ccd5df;
  border-radius: 7px;
  color: #27384d;
  background: #fff;
  font: inherit;
}
.dialog-capture-card input[readonly] { color: #637187; background: #f6f8fa; }
.dialog-capture-notice {
  padding: 10px 12px;
  border-radius: 7px;
  color: #4d647c;
  background: #eef6fb;
  font-size: 12px;
  line-height: 18px;
}
.dialog-capture-status { min-height: 20px; margin: 0; color: #65758a; font-size: 13px; }
.dialog-capture-status.success { color: #21844a; }
.dialog-capture-status.error { color: #c33f49; }
.dialog-capture-actions { display: flex; align-items: center; gap: 14px; margin-top: 2px; }
.dialog-capture-actions button {
  min-height: 40px;
  padding: 0 17px;
  border: 0;
  border-radius: 7px;
  color: #fff;
  background: #2d98da;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}
.dialog-capture-actions button:disabled { cursor: default; opacity: .65; }
.dialog-capture-actions a { color: #2479b8; font-size: 13px; }
.dialog-capture-queue { display: grid; gap: 14px; }
.dialog-capture-queue[hidden] { display: none; }
.dialog-capture-queue-summary,
.dialog-capture-next-card {
  padding: 13px 14px;
  border-radius: 8px;
  color: #50657c;
  background: #eef5fa;
  font-size: 13px;
  line-height: 20px;
}
.dialog-capture-queue-summary.error { color: #c33f49; background: #fff0f1; }
.dialog-capture-next-card { display: grid; gap: 3px; background: #f6f8fa; }
.dialog-capture-next-card[hidden] { display: none; }
.dialog-capture-next-card a,
.dialog-capture-queue-link { color: #2479b8; }
.dialog-capture-queue > button,
.dialog-capture-continue {
  min-height: 43px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: #2998dc;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}
.dialog-capture-queue > button:disabled { cursor: default; opacity: .55; }
.dialog-capture-queue-link { justify-self: start; font-size: 13px; }
.dialog-capture-skip-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.dialog-capture-skip-actions button {
  min-height: 38px;
  padding: 7px 8px;
  border: 1px solid #d6dee7;
  border-radius: 7px;
  color: #56687c;
  background: #f7f9fb;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 650;
}
.dialog-capture-skip-actions button:disabled { cursor: default; opacity: .55; }
.dialog-capture-continue { width: auto; }
@media (max-width: 560px) {
  .dialog-capture-card { padding: 24px 18px; }
  .dialog-capture-actions { align-items: stretch; flex-direction: column; }
  .dialog-capture-actions button { width: 100%; }
  .dialog-capture-skip-actions { grid-template-columns: 1fr; }
}
.settings-alert {
  margin: 0 0 20px;
  padding: 12px 16px;
  border: 1px solid #ead17a;
  border-left: 4px solid #dcad24;
  border-radius: 8px;
  color: #68571b;
  background: #fffaf0;
  font-size: 13px;
  line-height: 18.85px;
}
.settings-section { margin: 0 0 26px; }
.settings-section h2 {
  margin: 0 0 16px;
  color: #2c3e50;
  font-size: 18px;
  font-weight: 600;
  line-height: 27px;
}
.settings-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 2px 5px rgb(26 36 54 / 5%);
}
.sync-actions { display: grid; justify-items: start; gap: 14px; }
.sync-actions > div { display: flex; align-items: center; gap: 12px; }
.sync-actions span, .settings-help {
  color: #697281;
  font-size: 11px;
}
.settings-help { margin: 8px 0 12px; }
.settings-status {
  min-height: 18px;
  margin: 8px 0 0;
  color: #477357;
  font-size: 12px;
}
.settings-status:empty { display: none; }
.settings-status.error { color: var(--bad); }
.settings-button {
  min-height: 33px;
  padding: 8px 15px;
  border: 1px solid #d4d8df;
  border-radius: 5px;
  color: #3f4755;
  background: #e9eaec;
  font-size: 14px;
  line-height: 15px;
  cursor: pointer;
}
.settings-button:hover { background: #dfe2e6; }
.settings-button.primary { border-color: #3498db; color: white; background: #3498db; }
.settings-button.primary:hover { background: #3b84c0; }
.settings-button.small { min-height: 0; margin: 0 4px 0 0; padding: 4px 10px; border: 0; font-size: 12px; line-height: normal; }
.settings-button.danger { border-color: #df5b4d; color: white; background: #df5b4d; }
.settings-button:disabled { opacity: .58; cursor: wait; }
.settings-inline-form {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 16px;
}
.settings-inline-form.telegram-balance-form label { align-items: flex-start; flex-direction: column; gap: 8px; white-space: normal; }
.settings-inline-form.telegram-balance-form label:has(input[type="checkbox"]) { align-items: center; flex-direction: row; }
.telegram-balance-form input[type="password"] { width: 270px; max-width: 100%; }
.telegram-balance-form input[readonly] { width: 145px; background: #f5f6f8; }
.telegram-balance-subscribers { margin: 8px 0 12px; padding-left: 20px; color: #697281; font-size: 13px; line-height: 1.6; }
.telegram-balance-subscribers:empty { display: none; }
@media (max-width: 560px) {
  .telegram-balance-form label { width: 100%; min-width: 0; }
  .telegram-balance-form input[type="password"] { width: 100%; }
}
#coefficient-form {
  display: grid;
  grid-template-columns: 204px 247px 267px 290px minmax(98px, auto);
  align-items: end;
}
#coefficient-form label { min-width: 0; }
#coefficient-form input { width: 100%; }
.settings-inline-form label {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #666;
  font-size: 14px;
  white-space: nowrap;
}
.settings-inline-form input,
.settings-inline-form select,
.settings-table input,
.settings-table select {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid #dce0e6;
  border-radius: 5px;
  color: #333;
  background: white;
}
.settings-inline-form input[type="checkbox"],
.settings-table input[type="checkbox"] { width: 13px; height: 13px; min-height: 0; padding: 0; }
.settings-inline-form input:focus,
.settings-inline-form select:focus,
.settings-table input:focus,
.settings-table select:focus { outline: 2px solid rgb(62 130 199 / 18%); border-color: var(--blue); }
.account-create-form input { width: 186px; max-width: 186px; }
.settings-table-wrap {
  margin-top: 22px;
  overflow-x: auto;
  border: 0;
  border-radius: 8px;
  background: white;
  box-shadow: 0 1px 3px rgb(0 0 0 / 10%);
}
.settings-table {
  width: 100%;
  border-collapse: collapse;
  color: #333;
  font-size: 13px;
  line-height: 19.5px;
  font-variant-numeric: tabular-nums;
}
.settings-table th,
.settings-table td {
  min-height: 0;
  padding: 10px 12px;
  border-bottom: 1px solid #e6e8ec;
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
  line-height: 19.5px;
}
.settings-table th {
  color: #666;
  background: #f8f9fa;
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.settings-table tr:last-child td { border-bottom: 0; }
.coefficients-table th:nth-child(1), .coefficients-table td:nth-child(1) { width: 243px; min-width: 243px; max-width: 243px; }
.coefficients-table th:nth-child(2), .coefficients-table td:nth-child(2) { width: 185px; min-width: 185px; max-width: 185px; }
.coefficients-table th:nth-child(3), .coefficients-table td:nth-child(3) { width: 243px; min-width: 243px; max-width: 243px; }
.coefficients-table th:nth-child(4), .coefficients-table td:nth-child(4) { width: 325px; min-width: 325px; max-width: 325px; }
.coefficients-table th:nth-child(5), .coefficients-table td:nth-child(5) { width: 236px; min-width: 236px; max-width: 236px; }
.settings-table input { width: 130px; min-height: 30px; }
.settings-table select { min-height: 30px; }
.settings-table td small { display: block; margin-top: 5px; font-size: 10px; }

.settings-section-heading-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.settings-subtitle { margin: -6px 0 0; color: var(--muted); font-size: 13px; }
.audit-log-table { min-width: 1280px; }
.audit-outcome { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 9px; font-size: 12px; font-weight: 700; }
.audit-outcome.success { background: #e8f7ed; color: #238c4d; }
.audit-outcome.failed { background: #fdeaea; color: #c44747; }
.audit-outcome.denied { background: #fff2d5; color: #9a6800; }
.audit-details summary { color: var(--blue); cursor: pointer; white-space: nowrap; }
.audit-details pre { max-width: 420px; max-height: 220px; overflow: auto; margin: 8px 0 0; padding: 10px; border-radius: 8px; background: #f3f6fa; color: #41516a; font-size: 11px; line-height: 1.45; white-space: pre-wrap; }
.safe-state { color: var(--good); }
.warning-state { color: #b37a19; }
.settings-users-cell { min-width: 230px; line-height: 1.5; }
.accounts-table td:nth-child(4),
.accounts-table td:nth-child(5) { white-space: nowrap; }
.accounts-table td:nth-child(4) input,
.accounts-table td:nth-child(5) input { width: 118px; margin-right: 5px; }
.account-user-controls {
  min-width: 235px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 10px;
}
.account-user-controls label { display: inline-flex; align-items: center; gap: 4px; }
.settings-button.account-create-link {
  min-height: auto;
  padding: 0;
  border: 0;
  color: #596273;
  background: transparent;
  font-size: 12px;
  font-weight: 400;
}
.settings-pages-picker { position: relative; }
.settings-pages-picker > summary { color: var(--blue-dark); cursor: pointer; }
.settings-pages-picker > div {
  position: absolute;
  z-index: 15;
  top: calc(100% + 5px);
  left: 0;
  min-width: 230px;
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  box-shadow: 0 12px 28px rgb(20 30 50 / 18%);
}
.settings-pages-picker label { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.accounts-table { min-width: 1120px; }
.users-table { min-width: 1080px; }
.creators-settings-table { min-width: 1120px; }
.accounts-table th:nth-child(1), .accounts-table td:nth-child(1) { width: 37px; min-width: 37px; }
.accounts-table th:nth-child(2), .accounts-table td:nth-child(2) { width: 153px; min-width: 153px; }
.accounts-table th:nth-child(3), .accounts-table td:nth-child(3) { width: 134px; min-width: 134px; }
.accounts-table th:nth-child(4), .accounts-table td:nth-child(4) { width: 187px; min-width: 187px; }
.accounts-table th:nth-child(5), .accounts-table td:nth-child(5) { width: 187px; min-width: 187px; }
.accounts-table th:nth-child(6), .accounts-table td:nth-child(6) { width: 87px; min-width: 87px; }
.accounts-table th:nth-child(7), .accounts-table td:nth-child(7) { width: 353px; min-width: 353px; }
.accounts-table th:nth-child(8), .accounts-table td:nth-child(8) { width: 93px; min-width: 93px; }
.users-table th:nth-child(1), .users-table td:nth-child(1) { width: 54px; min-width: 54px; }
.users-table th:nth-child(2), .users-table td:nth-child(2) { width: 236px; min-width: 236px; }
.users-table th:nth-child(3), .users-table td:nth-child(3) { width: 163px; min-width: 163px; }
.users-table th:nth-child(4), .users-table td:nth-child(4) { width: 124px; min-width: 124px; }
.users-table th:nth-child(5), .users-table td:nth-child(5) { width: 143px; min-width: 143px; }
.users-table th:nth-child(6), .users-table td:nth-child(6) { width: 148px; min-width: 148px; }
.users-table th:nth-child(7), .users-table td:nth-child(7) { width: 230px; min-width: 230px; }
.users-table th:nth-child(8), .users-table td:nth-child(8) { width: 134px; min-width: 134px; }
.creators-settings-table th:nth-child(1), .creators-settings-table td:nth-child(1) { width: 104px; min-width: 104px; }
.creators-settings-table th:nth-child(2), .creators-settings-table td:nth-child(2) { width: 208px; min-width: 208px; }
.creators-settings-table th:nth-child(3), .creators-settings-table td:nth-child(3) { width: 112px; min-width: 112px; }
.creators-settings-table th:nth-child(4), .creators-settings-table td:nth-child(4) { width: 196px; min-width: 196px; }
.creators-settings-table th:nth-child(5), .creators-settings-table td:nth-child(5) { width: 148px; min-width: 148px; }
.creators-settings-table th:nth-child(6), .creators-settings-table td:nth-child(6) { width: 181px; min-width: 181px; }
.creators-settings-table th:nth-child(7), .creators-settings-table td:nth-child(7) { width: 169px; min-width: 169px; }
.creators-settings-table th:nth-child(8), .creators-settings-table td:nth-child(8) { width: 115px; min-width: 115px; }
.creators-settings-table td:nth-child(2) input { width: 150px; }
.creators-settings-table td:nth-child(3) input { width: 86px; }
.creators-settings-table td:nth-child(4) input { width: 135px; }
.creators-settings-table td:nth-child(5) { white-space: nowrap; }
.creators-settings-table td:nth-child(5) input { margin-right: 7px; }
.creator-account-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  color: #376b9d;
  background: #eaf3fc;
  font-size: 10px;
  font-weight: 700;
}
.sync-log-table { min-width: 3018px; }
.sync-log-table th:nth-child(1), .sync-log-table td:nth-child(1) { width: 161px; min-width: 161px; max-width: 161px; }
.sync-log-table th:nth-child(2), .sync-log-table td:nth-child(2) { width: 161px; min-width: 161px; max-width: 161px; }
.sync-log-table th:nth-child(3), .sync-log-table td:nth-child(3) { width: 89px; min-width: 89px; max-width: 89px; }
.sync-log-table th:nth-child(4), .sync-log-table td:nth-child(4) { width: 2607px; min-width: 2607px; max-width: 2607px; }
.sync-details-cell { white-space: normal; line-height: 1.45; }
.sync-status-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  color: #697180;
  background: #eef0f3;
  font-size: 10px;
  font-weight: 800;
}
.sync-status-badge.completed { color: #287c4b; background: #e8f7ed; }
.sync-status-badge.failed { color: #a1434c; background: #fbecee; }
.sync-status-badge.running { color: #8a6818; background: #fff6d9; }
.budget-inline-editor { display: flex; align-items: center; gap: 4px; }
.budget-inline-editor input {
  width: 88px;
  min-height: 28px;
  padding: 0 6px;
  border: 1px solid var(--blue);
  border-radius: 4px;
}
.budget-inline-editor button {
  width: 28px;
  min-height: 28px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: white;
  cursor: pointer;
}
.reset-selection-button {
  margin-left: 10px;
  padding: 2px 8px;
  border: 1px solid #cbd0d9;
  border-radius: 4px;
  color: #9ca3ae;
  background: #f3f4f7;
  font-size: 10px;
  line-height: 15px;
  cursor: pointer;
}

.bulk-action-bar {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: 24px;
  width: min(640px, calc(100% - 32px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 13px 18px;
  border-radius: 14px;
  color: white;
  background: #202b3d;
  box-shadow: 0 16px 38px rgb(22 30 45 / 34%);
  transform: translateX(-50%);
}
.bulk-action-bar[hidden] { display: none; }
.bulk-action-bar > div { display: grid; gap: 3px; }
.bulk-action-bar > div span { color: #c9d0dc; font-size: 12px; }
.bulk-action-bar button {
  min-height: 34px;
  padding: 0 15px;
  border: 0;
  border-radius: 7px;
  color: white;
  font-weight: 700;
  cursor: pointer;
}
.bulk-action-bar .danger-action { background: #d84f52; }
.bulk-action-bar .success-action { background: #45a963; }
.bulk-action-bar .clear-action {
  grid-column: 1 / -1;
  width: fit-content;
  min-height: auto;
  padding: 2px 0;
  color: #d7dce5;
  background: transparent;
  font-weight: 500;
}
.creator-group-bulk-bar { width: min(780px, calc(100% - 32px)); }
.creator-bulk-budget {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto 140px auto;
  gap: 8px;
  align-items: center;
  color: #d7dce5;
  font-size: 12px;
}
.creator-bulk-budget input {
  width: 140px;
  min-height: 34px;
  padding: 5px 8px;
  border: 1px solid #667087;
  border-radius: 7px;
  color: #202b3d;
  background: white;
}
.creator-bulk-budget button { background: var(--blue); }

.side-dialog {
  width: calc(100% - 190px);
  max-width: none;
  height: 100vh;
  max-height: none;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: white;
}
.side-dialog::backdrop { background: rgb(20 28 40 / 48%); }
.side-dialog > header {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
}
.side-dialog > header > div { display: grid; gap: 6px; }
.side-dialog > header strong { font-size: 16px; }
.side-dialog > header span { color: var(--muted); font-size: 11px; }
.dialog-close {
  border: 0;
  color: #657080;
  background: transparent;
  font-size: 25px;
  cursor: pointer;
}
.dynamics-content { padding: 12px 20px 28px; }
.dynamics-tabs { margin-bottom: 28px; }
.dynamics-tabs button { min-height: 32px; padding: 0 16px; }
.dynamics-table { min-width: 1162px; }
.dynamics-table th:nth-child(1), .dynamics-table td:nth-child(1) { width: 91px; min-width: 91px; }
.dynamics-table th:nth-child(2), .dynamics-table td:nth-child(2) { width: 98px; min-width: 98px; }
.dynamics-table th:nth-child(3), .dynamics-table td:nth-child(3) { width: 72px; min-width: 72px; }
.dynamics-table th:nth-child(4), .dynamics-table td:nth-child(4) { width: 63px; min-width: 63px; }
.dynamics-table th:nth-child(5), .dynamics-table td:nth-child(5) { width: 61px; min-width: 61px; }
.dynamics-table th:nth-child(6), .dynamics-table td:nth-child(6) { width: 70px; min-width: 70px; }
.dynamics-table th:nth-child(7), .dynamics-table td:nth-child(7) { width: 73px; min-width: 73px; }
.dynamics-table th:nth-child(8), .dynamics-table td:nth-child(8) { width: 58px; min-width: 58px; }
.dynamics-table th:nth-child(9), .dynamics-table td:nth-child(9) { width: 77px; min-width: 77px; }
.dynamics-table th:nth-child(10), .dynamics-table td:nth-child(10) { width: 71px; min-width: 71px; }
.dynamics-table th:nth-child(11), .dynamics-table td:nth-child(11) { width: 68px; min-width: 68px; }
.dynamics-table th:nth-child(12), .dynamics-table td:nth-child(12) { width: 87px; min-width: 87px; }
.dynamics-table th:nth-child(13), .dynamics-table td:nth-child(13) { width: 96px; min-width: 96px; }
.dynamics-table th:nth-child(14), .dynamics-table td:nth-child(14) { width: 104px; min-width: 104px; }
.dynamics-table th:nth-child(15), .dynamics-table td:nth-child(15) { width: 73px; min-width: 73px; }
.dynamics-table-wrap { max-height: calc(100vh - 136px); overflow: auto; }

.guard-dialog {
  width: min(480px, calc(100% - 32px));
  padding: 24px;
  border: 0;
  border-radius: 12px;
  color: var(--ink);
  box-shadow: 0 22px 60px rgb(20 30 50 / 24%);
}
.guard-dialog::backdrop { background: rgb(20 28 40 / 48%); }
.guard-dialog h2 { margin: 0 0 12px; font-size: 19px; }
.guard-dialog p { color: #596273; font-size: 13px; line-height: 1.5; }
.guard-dialog .primary-button { margin-top: 8px; }

@media (max-width: 900px) {
  .creatives-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .distribution-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .custom-filter form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .creatives-controls {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "levels" "search" "mode";
    row-gap: 10px;
  }
  .level-tabs { width: 100%; overflow-x: auto; }
  .search-input { width: 100%; }
  .side-dialog { width: 100%; }
}

@media (max-width: 1100px) {
  .topbar { height: auto; min-height: 48px; flex-wrap: wrap; padding-bottom: 7px; }
  .brand { min-height: 48px; }
  .main-nav { order: 3; width: 100%; height: 40px; }
  .topbar-meta { margin-left: auto; }
  .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  body.page-creators { overflow-x: hidden; }
  .dashboard-shell { width: min(100% - 24px, 1600px); padding-top: 16px; }
  .sync-time { display: none; }
  .toolbar { flex-wrap: wrap; }
  .toolbar-spacer { display: none; }
  .period-picker { width: 100%; }
  .period-picker > summary { width: 100%; }
  .period-popover { width: min(780px, calc(100vw - 24px)); }
  .date-calendars { grid-template-columns: 1fr; }
  .date-calendar[data-calendar="right"] { display: none; }
  .date-picker-footer { width: calc(100% - 160px); }
  #coefficient-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .report-controls { align-items: stretch; flex-direction: column; }
  .mode-switch { align-self: flex-end; }
  .page-creators .creator-controls {
    justify-content: space-between;
    gap: 8px;
  }
  .page-creators .creator-controls .mode-switch button { padding-inline: 13px; }
  .page-creators .video-toggle { width: 142px; min-width: 142px; padding-inline: 8px; font-size: 12px; }
  .page-creators .creator-filter-tabs {
    flex-wrap: nowrap;
    margin-inline: -12px;
    padding: 0 12px 6px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .page-creators .creator-filter-tabs::-webkit-scrollbar { display: none; }
  .page-creators .creator-filter-tabs button { flex: 0 0 auto; }
  .page-creators .creators-table-wrap {
    position: relative;
    width: calc(100% + 24px);
    max-width: 100vw;
    margin-inline: -12px;
    overflow-x: scroll;
    overflow-y: hidden;
    border-radius: 0;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #aeb8c7 #eef1f5;
  }
  .page-creators .creators-table-wrap::-webkit-scrollbar { height: 8px; }
  .page-creators .creators-table-wrap::-webkit-scrollbar-track { background: #eef1f5; }
  .page-creators .creators-table-wrap::-webkit-scrollbar-thumb {
    border: 2px solid #eef1f5;
    border-radius: 999px;
    background: #aeb8c7;
  }
  .page-creators .creators-table {
    --creator-name-column-width: 250px;
    width: 1761px;
    min-width: 1761px;
    font-size: 12px;
  }
  .page-creators .creators-table.video-columns-visible { width: 2502px; min-width: 2502px; }
  .page-creators .creators-table th:first-child,
  .page-creators .creators-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    width: var(--creator-name-column-width);
    min-width: var(--creator-name-column-width);
    max-width: var(--creator-name-column-width);
    box-shadow: 5px 0 8px rgb(25 35 50 / 8%);
  }
  .page-creators .creators-table th:nth-child(2),
  .page-creators .creators-table td:nth-child(2) {
    position: static;
    left: auto;
    z-index: auto;
    width: var(--creator-status-column-width);
    min-width: var(--creator-status-column-width);
    max-width: var(--creator-status-column-width);
    box-shadow: none;
  }
  .page-creators .creators-table th:first-child { z-index: 4; background: #f6f7f9; }
  .page-creators .creators-table td:first-child { background: white; }
  .page-creators .creators-table .total-row td:first-child { background: #e8e9f7; }
  .page-creators .creators-table .creative-row td:first-child { background: #f1f3f5; }
  .page-creators .creators-table .group-row td:first-child { background: #fdfdfe; }
  .page-creators .creator-data-row.creative-row td:first-child { padding-left: 16px; }
  .page-creators .creator-data-row.group-row td:first-child { padding-left: 12px; }
  .page-creators .creator-entity-cell { gap: 4px; }
  .page-creators .creator-entity-cell .creator-badge { font-size: 10px; }
  .page-creators .creative-cost-control { margin-left: 4px; padding-inline: 3px; }
  .page-creators .creative-cost-control input { width: 48px; }
  .creator-scroll-hint {
    display: block;
    margin: 8px 0 0;
    color: #8190a6;
    font-size: 11px;
    text-align: center;
  }
}

@media (max-width: 520px) {
  .dashboard-shell { width: min(100% - 16px, 1600px); }
  .account-balance-card {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
  }
  .account-balance-actions {
    width: 100%;
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }
  #account-balance-updated { margin-left: 0; }
  .page-creators .creator-filter-tabs {
    margin-inline: -8px;
    padding-inline: 8px;
  }
  .page-creators .creators-table-wrap {
    width: calc(100% + 16px);
    margin-inline: -8px;
  }
  .page-creators .creators-table {
    --creator-name-column-width: 232px;
    width: 1696px;
    min-width: 1696px;
  }
  .page-creators .creators-table.video-columns-visible { width: 2437px; min-width: 2437px; }
  .page-creators .creators-table th:first-child,
  .page-creators .creators-table td:first-child {
    width: var(--creator-name-column-width);
    min-width: var(--creator-name-column-width);
    max-width: var(--creator-name-column-width);
  }
  .page-creators .creator-data-row.creative-row td:first-child { padding-left: 10px; }
  .page-creators .creator-data-row.group-row td:first-child { padding-left: 8px; }
  .date-picker-main { height: auto; }
  .date-preset-list {
    position: static;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .date-preset-list button { min-height: 34px; }
  .date-calendars { height: auto; padding: 16px; }
  .date-picker-footer { width: 100%; margin-left: 0; flex-wrap: wrap; height: auto; min-height: 60px; }
  #coefficient-form { grid-template-columns: 1fr; }
  .kpi-grid,
  .creatives-kpis,
  .distribution-grid { grid-template-columns: 1fr; }
  .main-nav { overflow-x: auto; }
  .creator-group-bulk-bar { grid-template-columns: 1fr 1fr; }
  .creator-group-bulk-bar > div { grid-column: 1 / -1; }
  .creator-bulk-budget { grid-template-columns: 1fr; }
  .creator-bulk-budget input { width: 100%; }
  .creator-bulk-budget button { width: 100%; }
}

@media (max-width: 360px) {
  .page-creators .creators-table {
    --creator-name-column-width: 190px;
    width: 1654px;
    min-width: 1654px;
  }
  .page-creators .creators-table.video-columns-visible { width: 2395px; min-width: 2395px; }
  .page-creators .creators-table th:first-child,
  .page-creators .creators-table td:first-child {
    width: var(--creator-name-column-width);
    min-width: var(--creator-name-column-width);
    max-width: var(--creator-name-column-width);
  }
}

.crm-statuses-shell { display: grid; gap: 20px; }
.crm-statuses-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 6px 2px 0;
}
.crm-statuses-heading h1 { margin: 5px 0 8px; font-size: 30px; line-height: 1.15; }
.crm-statuses-heading p { max-width: 980px; margin: 0; color: #65758c; line-height: 1.55; }
.crm-statuses-kicker {
  color: #238bd0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.crm-statuses-run {
  flex: 0 0 auto;
  padding: 10px 14px;
  border: 1px solid #dce4ed;
  border-radius: 10px;
  background: white;
  color: #65758c;
  font-size: 13px;
  white-space: nowrap;
}
.crm-statuses-run.error { border-color: #f0b8bd; color: #b7333d; background: #fff3f4; }
.crm-statuses-note {
  padding: 13px 16px;
  border: 1px solid #a9d6b9;
  border-left: 4px solid #2fa160;
  border-radius: 10px;
  background: #f0faf4;
  color: #395a46;
}
.crm-statuses-kpis { margin: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.crm-statuses-report {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  box-shadow: var(--shadow);
}
.crm-statuses-table-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px 14px;
}
.crm-statuses-table-heading h2 { margin: 0 0 4px; font-size: 20px; }
.crm-statuses-table-heading p { margin: 0; color: #8998ad; font-size: 13px; }
.crm-statuses-count {
  min-width: 36px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e7f3fb;
  color: #217db8;
  font-weight: 800;
  text-align: center;
}
.crm-statuses-table-wrap { border-top: 1px solid var(--line); }
.crm-statuses-table { min-width: 1420px; }
.crm-statuses-table th { white-space: nowrap; }
.crm-statuses-table td { vertical-align: middle; }
.crm-statuses-table .crm-status-excerpt {
  width: 390px;
  max-width: 390px;
  color: #53647b;
  line-height: 1.35;
  white-space: normal;
}
.crm-statuses-table .crm-status-orders { max-width: 210px; color: #596a80; white-space: normal; }
.crm-statuses-table .crm-status-current { font-weight: 700; }
.crm-statuses-table .crm-status-id a,
.crm-statuses-table .crm-status-dialog a { font-weight: 700; }
.crm-status-actions { white-space: nowrap; }
.crm-status-exclude-button {
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid #e7a8ad;
  border-radius: 8px;
  background: #fff5f5;
  color: #c74750;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.crm-status-exclude-button:hover { border-color: #d65a62; background: #fdebed; }
.crm-status-exclude-button:disabled { cursor: wait; opacity: .65; }
.crm-status-row.evidence-delivered { background: #effaf3; }
.crm-status-row.evidence-shipped { background: #f6fbff; }
.crm-status-row.evidence-paid { background: #fffaf0; }
.crm-status-evidence {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.crm-status-evidence.delivered { background: #dff4e6; color: #25834d; }
.crm-status-evidence.shipped { background: #e2f2fc; color: #267eaf; }
.crm-status-evidence.paid { background: #fff0cb; color: #986a00; }

@media (max-width: 900px) {
  .crm-statuses-heading { align-items: flex-start; flex-direction: column; }
  .crm-statuses-run { white-space: normal; }
  .crm-statuses-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .crm-statuses-table-wrap {
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 520px) {
  .crm-statuses-heading h1 { font-size: 26px; }
  .crm-statuses-kpis { grid-template-columns: 1fr; }
  .crm-statuses-report {
    width: calc(100% + 16px);
    margin-inline: -8px;
    border-radius: 0;
  }
  .crm-statuses-table-heading { padding-inline: 12px; }
}
