@import url('../vendor/roboto/roboto.css');

:root {
  --d360-accent: #ED1C24;
  --d360-accent-hover: #c2161c;
  --d360-text: #111827;
  --d360-muted: #6b7280;
  --d360-surface: #ffffff;
  --d360-page: #f4f4f4;
  --d360-border: #e5e7eb;
  --d360-info: #475569;
  --d360-info-bg: #eef1f5;
  --d360-hint-accent: #FBBF24;
  --d360-hint-accent-hover: #F59E0B;
  --d360-hint-bg: #FFFBEB;
  --d360-hint-border: #FCD34D;
  --bs-primary: #ED1C24;
  --bs-primary-rgb: 237, 28, 36;
  --bs-danger: #ED1C24;
  --bs-danger-rgb: 237, 28, 36;
  --bs-body-font-family: 'Roboto', sans-serif;
  --bs-border-radius: 4px;
  --bs-border-radius-sm: 3px;
  --bs-border-radius-lg: 6px;
  --bs-border-radius-xl: 8px;
  --sidebar-w: 240px;
  --hdr-el-h: 31px;
}

body {
  min-height: 100vh;
  background: var(--d360-page);
  color: var(--d360-text);
}

.btn-primary {
  --bs-btn-bg: var(--d360-accent);
  --bs-btn-border-color: var(--d360-accent);
  --bs-btn-hover-bg: var(--d360-accent-hover);
  --bs-btn-hover-border-color: var(--d360-accent-hover);
  --bs-btn-active-bg: var(--d360-accent-hover);
  --bs-btn-focus-shadow-rgb: 237, 28, 36;
}
.btn-outline-primary {
  --bs-btn-color: var(--d360-accent);
  --bs-btn-border-color: var(--d360-accent);
  --bs-btn-hover-bg: var(--d360-accent);
  --bs-btn-hover-border-color: var(--d360-accent);
  --bs-btn-focus-shadow-rgb: 237, 28, 36;
}
.btn-danger, .btn-outline-danger {
  --bs-btn-focus-shadow-rgb: 237, 28, 36;
}
.text-primary { color: var(--d360-accent) !important; }
.bg-primary { background-color: var(--d360-accent) !important; }
.border-primary { border-color: var(--d360-accent) !important; }
.progress-bar { background-color: var(--d360-accent); }

.btn-link { color: var(--d360-accent); }
.btn-link:hover, .btn-link:focus { color: var(--d360-accent-hover); }

.page-link { color: var(--d360-text); }
.page-link:hover, .page-link:focus { color: var(--d360-accent); background-color: var(--d360-info-bg); box-shadow: none; }
.page-item.active .page-link { background-color: var(--d360-accent); border-color: var(--d360-accent); color: #fff; }

.min-w-0 {
  min-width: 0 !important;
}

:focus-visible {
  outline: 3px solid rgba(237,28,36,.35);
  outline-offset: 2px;
  box-shadow: 0 0 0 1px var(--d360-accent);
}

.sidebar {
  width: var(--sidebar-w);
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 1040;
  overflow-y: auto;
  transition: transform .25s ease;
}

.main-wrapper {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  background: var(--d360-page);
}

.nav-side {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  font-size: 13.5px;
  color: rgba(255,255,255,.55);
  border-left: 3px solid transparent;
  text-decoration: none;
  border-radius: 0;
  transition: color .15s, background .15s, border-color .15s;
}
.nav-side:hover {
  color: #fff;
  background: rgba(255,255,255,.07);
  text-decoration: none;
}
.nav-side.active {
  color: #fff;
  background: rgba(237,28,36,.12);
  border-left-color: var(--d360-accent);
  font-weight: 500;
}
.nav-side .bi {
  font-size: 15px;
  opacity: .7;
  flex-shrink: 0;
}
.nav-side.active .bi { opacity: 1; }

.nav-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 10px;
  padding: 8px 18px 8px 15px;
  border: none;
  border-left: 3px solid transparent;
  background: transparent;
  color: rgba(255,255,255,.5);
  text-transform: uppercase;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: .08em;
  cursor: pointer;
  transition: color .15s, background .15s;
}
.nav-group-toggle:hover {
  color: #fff;
  background: rgba(255,255,255,.07);
}
.nav-group-toggle .bi {
  font-size: 12px;
  transition: transform .15s ease;
  flex-shrink: 0;
}
.nav-group-toggle[aria-expanded="true"] .bi {
  transform: rotate(180deg);
}
.nav-group-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .2s ease;
}
.nav-group-panel-inner {
  overflow: hidden;
}
.nav-group[data-open="true"] .nav-group-panel {
  grid-template-rows: 1fr;
}
.nav-group:has(.nav-side.active) .nav-group-toggle {
  color: #fff;
}

.sidebar-gear-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--bs-border-radius-sm);
  transition: background .15s, border-color .15s;
  cursor: pointer;
}
.sidebar-gear-btn:hover {
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.18);
}

.sidebar-footer-link {
  color: rgba(255,255,255,.28) !important;
  transition: color .15s ease, opacity .15s ease;
}
.sidebar-footer-link:hover {
  color: rgba(255,255,255,.5) !important;
}

.hdr-icon-btn {
  width: var(--hdr-el-h);
  height: var(--hdr-el-h);
  padding: 0;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.soft-icon-btn {
  border-color: transparent;
  background: #f8fafc;
  color: #4b5563;
  box-shadow: none;
}

.soft-icon-btn:hover,
.soft-icon-btn:focus {
  border-color: transparent;
  background: #fff1f2;
  color: var(--d360-accent);
}

.soft-icon-btn:active,
.soft-icon-btn.show {
  border-color: transparent !important;
  background: #ffe4e6 !important;
  color: var(--d360-accent) !important;
}

.soft-icon-btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(237,28,36,.16);
}

.soft-icon-btn .bi {
  color: currentColor;
}

.topbar-unread-dot {
  width: 9px;
  height: 9px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--d360-accent);
}

.hdr-search .form-control,
.hdr-search .input-group-text {
  height: var(--hdr-el-h);
}
.hdr-search {
  width: min(360px, 32vw);
  flex: 0 1 360px;
  min-width: 180px;
}

.topbar-v2 {
  overflow: visible;
}

.topbar-breadcrumbs {
  min-width: 0;
}
.topbar-breadcrumbs .breadcrumb {
  flex-wrap: nowrap;
  white-space: nowrap;
  overflow: hidden;
}
.topbar-breadcrumbs .breadcrumb-item,
.topbar-breadcrumbs .breadcrumb-item.active {
  color: #6b7280;
  font-size: 12px;
}
.topbar-breadcrumbs .breadcrumb-item + .breadcrumb-item::before {
  color: #b6bcc8;
}
.topbar-breadcrumbs a {
  color: #6b7280;
  text-decoration: none;
}
.topbar-breadcrumbs a:hover {
  color: #111827;
}

.topbar-actions {
  flex: 1 1 auto;
  min-width: 0;
  justify-content: flex-end;
}

.topbar-action-btn {
  min-height: var(--hdr-el-h);
  height: var(--hdr-el-h);
  padding: 0 11px;
  border: 1px solid #edf0f3;
  border-radius: 8px;
  background: #f8fafc;
  color: #374151;
  font-size: 13px;
  font-weight: 700;
  box-shadow: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.topbar-action-btn:hover,
.topbar-action-btn:focus {
  border-color: #ffe4e6;
  background: #fff7f7;
  color: var(--d360-text);
}

.topbar-action-btn:active,
.topbar-action-btn.show,
.topbar-action-btn[aria-expanded="true"] {
  border-color: #fecdd3 !important;
  background: #fff1f2 !important;
  color: var(--d360-accent) !important;
  box-shadow: 0 0 0 3px rgba(237,28,36,.12);
}

.topbar-action-btn .bi {
  color: #6b7280;
  font-size: 16px;
}

.topbar-action-btn:hover .bi,
.topbar-action-btn:focus .bi,
.topbar-action-btn--accent .bi {
  color: var(--d360-accent);
}

.topbar-action-btn--accent {
  border-color: #ffe4e6;
  background: #fff7f7;
  color: var(--d360-text);
}

.topbar-action-icon {
  width: var(--hdr-el-h);
  min-width: var(--hdr-el-h);
  padding: 0;
  justify-content: center;
}

.topbar-cart-trigger {
  white-space: nowrap;
}

.topbar-cart-count {
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #ED1C24;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}

.topbar-user-avatar {
  width: 31px;
  height: 31px;
  font-size: 12px;
}

.topbar-user-trigger {
  border-radius: 999px;
  padding: 4px 2px 4px 4px;
}

.topbar-cart-menu,
.topbar-user-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 280px;
  background: #fff;
  border: 1px solid rgba(17,24,39,.08);
  border-radius: 10px;
  padding: 8px;
  display: none;
  z-index: 1080;
}
.topbar-cart-menu.open,
.topbar-user-menu.open {
  display: block;
}

.topbar-cart-menu-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 6px 8px 10px;
  border-bottom: 1px solid #edf0f4;
  margin-bottom: 6px;
  font-size: 12px;
}

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

.topbar-cart-item {
  width: 100%;
  border: 1px solid transparent;
  background: #fff;
  text-align: left;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 13px;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .12s ease;
}
.topbar-cart-item:hover {
  background: #f8fafc;
  border-color: #dbe3ee;
}
.topbar-cart-item:active {
  transform: translateY(1px);
}
.topbar-cart-item.is-active {
  background: linear-gradient(180deg, #fff5f5 0%, #fff0f0 100%);
  border-color: rgba(237,28,36,.28);
  box-shadow: inset 0 0 0 1px rgba(237,28,36,.06);
}

.topbar-cart-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 2px;
}

.topbar-cart-chip {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(237,28,36,.12);
  color: #b42318;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .01em;
}

.topbar-cart-chip-muted {
  background: #eef2f7;
  color: #667085;
}

.topbar-cart-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
}

.topbar-cart-summary-label {
  font-size: 11px;
  color: #6b7280;
}

.topbar-cart-summary-value {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
}

.topbar-cart-menu-actions {
  padding: 8px 2px 2px;
}

.topbar-cart-menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.topbar-user-meta {
  min-width: 190px;
}

.interactive-row {
  cursor: pointer;
}

.interactive-row.is-selected > * {
  background: rgba(237,28,36,.05) !important;
}

.claim-service-detail-stack {
  display: grid;
  gap: 12px;
}

.detail-panel {
  display: none;
}

.detail-panel.is-active {
  display: block;
}

.detail-title {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}

.detail-label {
  display: block;
  margin-bottom: 2px;
  font-size: 11px;
  color: #6b7280;
  text-transform: uppercase;
}

.detail-value {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #111827;
}

.status-timeline {
  display: grid;
  gap: 10px;
}

.status-step {
  position: relative;
  padding-left: 18px;
  font-size: 13px;
}

.status-step::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d0d5dd;
}

.status-step.is-done::before {
  background: #16a34a;
}

.status-step.is-current::before {
  background: #ED1C24;
  box-shadow: 0 0 0 4px rgba(237,28,36,.14);
}

.status-step-title {
  font-weight: 600;
  color: #111827;
}

.status-step-meta {
  font-size: 12px;
  color: #6b7280;
}

.comment-feed {
  display: grid;
  gap: 10px;
}

.comment-item {
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
}

.file-attach-box {
  padding: 12px;
  border: 1px dashed #d0d5dd;
  border-radius: 8px;
  background: #fcfcfd;
}

.file-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.file-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef2f7;
  color: #344054;
  font-size: 12px;
  font-weight: 500;
}

.order-summary-list {
  display: grid;
  gap: 10px;
}

.order-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
}

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

.schedule-lane {
  min-height: 100%;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f8fafc;
}

.schedule-lane-title {
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #111827;
}

.schedule-card {
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}

.schedule-card + .schedule-card {
  margin-top: 10px;
}

.schedule-meta {
  font-size: 12px;
  color: #6b7280;
}

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

  .schedule-board {
    grid-template-columns: 1fr;
  }

}

.topbar-user-name {
  font-size: 13px;
}

.topbar-user-company {
  width: 100%;
  font-size: 11px;
}

.topbar-user-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border-radius: 8px;
  color: #111827;
  text-decoration: none;
  font-size: 13px;
  transition: background .15s ease, color .15s ease;
}
.topbar-user-menu-item:hover {
  background: #f3f4f6;
  color: #111827;
}
.topbar-user-menu-item .bi {
  width: 14px;
  text-align: center;
  color: #6b7280;
}
.topbar-user-menu-item.text-danger .bi,
.topbar-user-menu-item.text-danger:hover {
  color: #dc2626 !important;
}

.metric-card {
  min-height: 116px;
}
.metric-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.page-kicker {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #888;
  font-weight: 700;
}

.dashboard-card {
  height: 100%;
  border: 1px solid rgba(15,23,42,.06);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(15,23,42,.05);
}

.dashboard-card-body {
  padding: 22px;
}

.dashboard-widget-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.dashboard-widget-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dashboard-widget-info-btn {
  width: var(--hdr-el-h);
  height: var(--hdr-el-h);
  flex: 0 0 var(--hdr-el-h);
}

.dashboard-widget-info-btn,
.dashboard-widget-menu summary {
  border-color: #edf0f3;
  border-radius: 8px;
  background: #f8fafc;
  color: #374151;
  box-shadow: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.dashboard-widget-info-btn:hover,
.dashboard-widget-info-btn:focus,
.dashboard-widget-menu summary:hover,
.dashboard-widget-menu summary:focus {
  border-color: #ffe4e6;
  background: #fff7f7;
  color: var(--d360-text);
}

.dashboard-widget-info-btn .bi,
.dashboard-widget-menu summary .bi {
  color: #6b7280;
  font-size: 16px;
}

.dashboard-widget-info-btn:hover .bi,
.dashboard-widget-info-btn:focus .bi,
.dashboard-widget-menu summary:hover .bi,
.dashboard-widget-menu summary:focus .bi {
  color: var(--d360-accent);
}

.dashboard-widget-with-footer {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.dashboard-widget-footer-link {
  margin-top: auto;
  padding-top: 16px;
  align-self: flex-start;
}

.dashboard-widget-menu {
  position: relative;
  flex: 0 0 auto;
}

.dashboard-widget-menu summary {
  list-style: none;
  cursor: pointer;
}

.dashboard-widget-menu summary::-webkit-details-marker {
  display: none;
}

.dashboard-widget-menu[open] summary {
  border-color: #fecdd3 !important;
  background: #fff1f2 !important;
  color: var(--d360-accent) !important;
  box-shadow: 0 0 0 3px rgba(237,28,36,.12);
}

.dashboard-widget-menu-popover {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  right: 0;
  min-width: 160px;
  padding: 6px;
  border: 1px solid var(--d360-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15,23,42,.14);
}

.dashboard-widget-menu-popover button {
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--d360-text);
  font-size: 13px;
  text-align: left;
}

.dashboard-widget-menu-popover button:hover,
.dashboard-widget-menu-popover button:focus-visible {
  background: #fff1f2;
  color: var(--d360-accent);
}

.dashboard-grid {
  align-items: stretch;
}

.dashboard-priority-manager { order: 0; }
.dashboard-priority-balance { order: 1; }
.dashboard-priority-kpis { order: 2; }
.dashboard-priority-chart { order: 3; }
.dashboard-priority-recommendations { order: 4; }
.dashboard-priority-orders { order: 5; }
.dashboard-priority-promotions { order: 6; }
.dashboard-priority-actions { order: 7; }

.dashboard-eyebrow,
.dashboard-label {
  color: var(--d360-muted);
  font-size: 12px;
}

.dashboard-eyebrow {
  margin-bottom: 12px;
  font-weight: 600;
}

.dashboard-company-avatar {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff1f2;
  color: var(--d360-accent);
  font-size: 30px;
}

.dashboard-welcome .dashboard-card-body {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.dashboard-welcome-main {
  flex: 1;
}

.dashboard-welcome-main > .flex-grow-1 {
  display: flex;
  flex-direction: column;
}

.dashboard-manager {
  display: grid;
  gap: 2px;
  font-size: 13px;
}

.dashboard-manager-links {
  display: grid;
  gap: 6px;
}

.dashboard-manager-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.dashboard-manager a,
.dashboard-link,
.dashboard-item-title {
  color: var(--d360-text);
  text-decoration: none;
}

.dashboard-manager a:hover,
.dashboard-link:hover,
.dashboard-item-title:hover {
  color: var(--d360-accent);
}

.dashboard-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.dashboard-balance-grid {
  display: grid;
  grid-template-columns: minmax(220px, .95fr) 1.05fr;
  gap: 28px;
  align-items: start;
}

.dashboard-balance-value {
  color: var(--d360-text);
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.05;
  font-weight: 800;
}

.dashboard-balance-available {
  color: var(--d360-text);
  font-size: 21px;
  line-height: 1.15;
  font-weight: 800;
}

.dashboard-balance-list {
  display: grid;
  gap: 12px;
  padding-left: 28px;
  border-left: 1px solid var(--d360-border);
}

.dashboard-balance-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.dashboard-balance-list dt {
  color: var(--d360-muted);
  font-size: 12px;
  font-weight: 500;
}

.dashboard-balance-list dd {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.dashboard-progress {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #f1f2f4;
}

.dashboard-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--d360-accent);
}

.dashboard-metric-card {
  min-height: 96px;
  height: 100%;
  border: 1px solid rgba(15,23,42,.06);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(15,23,42,.05);
  padding: 18px;
}

.dashboard-metric-heading {
  min-height: var(--hdr-el-h);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.dashboard-metric-primary {
  min-width: 0;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.dashboard-metric-value {
  margin-top: 0;
  color: var(--d360-text);
  font-size: 24px;
  line-height: 1.15;
  font-weight: 800;
}

.dashboard-trend {
  margin-top: 4px;
  font-size: 12px;
}

.dashboard-progress {
  margin-top: 10px;
}

.dashboard-metric-icon {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #fecdd3;
  border-radius: 50%;
  background: #fff1f2;
  color: var(--d360-accent);
  font-size: 24px;
}

.dashboard-chart-wrap {
  height: 260px;
}

.dashboard-chart-legend {
  display: flex;
  gap: 18px;
  margin-top: 8px;
  color: var(--d360-muted);
  font-size: 12px;
}

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

.dashboard-chart-heading {
  align-items: center;
}

.ft-segmented.dashboard-period-switch {
  box-sizing: border-box;
  height: var(--hdr-el-h);
  min-height: var(--hdr-el-h);
  flex-wrap: nowrap;
  padding: 2px;
  border: 1px solid var(--d360-border);
  border-radius: 8px;
  background: #f8fafc;
}

.ft-segmented.dashboard-period-switch [data-segment] {
  height: auto;
  min-height: 0;
  padding: 0 8px;
  line-height: 1;
}

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

.dashboard-legend-line {
  width: 18px;
  border-top: 2px solid currentColor;
}

.dashboard-legend-plan {
  color: #4b5563;
  border-top-style: dashed;
}

.dashboard-legend-fact {
  color: var(--d360-accent);
}

.dashboard-chart-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--d360-border);
}

.dashboard-chart-summary div {
  padding: 0 18px;
  border-left: 1px solid var(--d360-border);
}

.dashboard-chart-summary div:first-child {
  padding-left: 0;
  border-left: 0;
}

.dashboard-chart-summary span {
  display: block;
  color: var(--d360-muted);
  font-size: 12px;
}

.dashboard-chart-summary strong {
  display: block;
  margin-top: 4px;
  color: var(--d360-text);
  font-size: 18px;
}

.dashboard-recommendations,
.dashboard-feed,
.dashboard-orders {
  display: grid;
  gap: 12px;
}

.dashboard-recommendation-item {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--d360-border);
}

.dashboard-recommendation-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.dashboard-product-thumb {
  width: 74px;
  height: 74px;
  display: block;
  overflow: hidden;
  border: 1px solid var(--d360-border);
  border-radius: 8px;
  background: #f8fafc;
}

.dashboard-product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dashboard-item-title {
  display: block;
  color: var(--d360-text);
  font-size: 13px;
  font-weight: 700;
}

.dashboard-recommendation-meta {
  margin-top: 2px;
  color: var(--d360-muted);
  font-size: 12px;
}

.dashboard-recommendation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dashboard-favorite-btn.is-active {
  background: #fff1f2;
  color: var(--d360-accent);
}

.dashboard-feed-item,
.dashboard-order-row {
  display: grid;
  align-items: center;
  gap: 12px;
  color: var(--d360-text);
  text-decoration: none;
}

.dashboard-feed-item {
  grid-template-columns: 42px minmax(0, 1fr) auto;
}

.dashboard-order-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--d360-border);
}

.dashboard-order-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.dashboard-next-action {
  grid-column: 1 / -1;
  width: fit-content;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f9fafb;
  color: var(--d360-text);
  font-size: 12px;
  font-weight: 700;
}

.dashboard-feed-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: var(--d360-accent);
  color: #fff;
  font-size: 20px;
}

.dashboard-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-action-grid a,
.dashboard-action-grid button {
  min-height: 64px;
  display: grid;
  place-items: center;
  gap: 6px;
  border: 1px solid var(--d360-border);
  border-radius: 8px;
  background: #fff;
  color: var(--d360-text);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.dashboard-action-grid .dashboard-action-primary {
  border-color: rgba(237,28,36,.35);
  background: #fff7f7;
}

.dashboard-action-grid button {
  cursor: pointer;
}

.dashboard-action-grid a:hover,
.dashboard-action-grid button:hover {
  border-color: rgba(237,28,36,.28);
  color: var(--d360-text);
  box-shadow: 0 4px 14px rgba(15,23,42,.06);
}

.dashboard-action-grid i {
  color: var(--d360-accent);
  font-size: 20px;
}

@media (min-width: 576px) {
  .dashboard-action-grid--catalog { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (min-width: 992px) {
  .dashboard-action-grid--catalog { grid-template-columns: repeat(6, minmax(0,1fr)); }
}

.dashboard-page .ft-status--info {
  background: #f3f4f6;
  color: #374151;
}

/* Правила Push CRM (lk-push-rules.php) */
.push-rules-page-head {
  margin-bottom: 16px;
}

/* .hdr-icon-btn (31px, унаследованный размер иконки из btn-sm) даёт на 100%
   масштабе браузера смазанный «гамбургер» — глиф попадает на полупиксель.
   Увеличиваем кнопку и иконку явно, чтобы рендер был чётким на любом зуме. */
.rule-action-btn {
  width: 36px;
  height: 36px;
  font-size: 20px;
  line-height: 1;
}

.rule-action-btn .bi {
  font-size: 20px;
  line-height: 1;
}

.link-button {
  border: 0;
  padding: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.rule-name-link {
  color: var(--d360-text);
  font-weight: 700;
  text-align: left;
  text-decoration-line: underline;
  text-decoration-style: dashed;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.rule-name-link:hover {
  color: var(--d360-accent);
}

.rule-trigger-box {
  background: var(--d360-hint-bg);
  border: 1px solid var(--d360-hint-border);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 13.5px;
}

.rule-trigger-box .rule-trigger-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--d360-muted);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.rule-roles-grid,
.rule-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 20px;
}

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

.rule-modal-dialog {
  max-height: calc(100vh - 128px);
  display: flex;
  flex-direction: column;
}

.rule-modal-dialog .v2-modal__body {
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}

.rule-modal-dialog .v2-modal__header,
.rule-modal-dialog .v2-modal__footer {
  flex-shrink: 0;
}

/* Показатели дилерской сети (lk-bi-dealer-network.php) */
.bi-network-page-head {
  margin-bottom: 16px;
}

.network-bars {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.network-bar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2fr auto;
  gap: 12px;
  align-items: center;
  font-size: 13px;
}

.network-bar-row strong {
  color: var(--d360-text);
  font-weight: 600;
}

.network-bar-track {
  height: 22px;
  overflow: hidden;
  border-radius: 4px;
  background: #f0f0f0;
}

.network-bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: rgba(237, 28, 36, .82);
}

.network-bar-row > span:last-child {
  min-width: 28px;
  text-align: right;
  color: var(--d360-muted);
  font-weight: 600;
}

/* Заголовки таблиц с подсказкой (нативный title) — визуально подсвечены пунктиром. */
th[title] {
  cursor: help;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}

.sales-guide-page {
  color: var(--d360-text);
}

.sales-guide-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.sales-guide-date-control {
  flex: 0 0 auto;
}

/* Select-фильтры на BI/Push CRM/«Планирование периода» — тот же внешний вид,
   что у .sales-guide-date-control на «Кабинет менеджера»: белая рамка, мягкий
   розовый hover/focus, тот же шрифт и высота, что у .topbar-action-btn. */
.filter-select-control {
  height: var(--hdr-el-h);
  min-height: var(--hdr-el-h);
  border: 1px solid #edf0f3;
  border-radius: 8px;
  background: #fff;
  color: #374151;
  font-size: 13px;
  font-weight: 700;
  box-shadow: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.filter-select-control:hover,
.filter-select-control:focus {
  border-color: #ffe4e6;
  background: #fff7f7;
  color: var(--d360-text);
  box-shadow: none;
}

.sales-guide-date-control .topbar-action-btn {
  background: #fff;
}

.sales-guide-kpi-row > [class*="col"] {
  display: flex;
}

.sales-guide-kpi-card {
  width: 100%;
  min-height: 116px;
  padding: 18px;
}

.sales-guide-kpi-icon {
  font-size: 20px;
}

.sales-guide-kpi-chart {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sales-guide-kpi-sparkline {
  width: 42px;
  height: 42px;
  overflow: visible;
}

.sales-guide-kpi-area {
  fill: rgba(237,28,36,.12);
}

.sales-guide-kpi-sparkline polyline {
  fill: none;
  stroke: var(--d360-accent);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sales-guide-kpi-sparkline circle {
  fill: #fff;
  stroke: var(--d360-accent);
  stroke-width: 3;
}

.sales-guide-sparkline,
.sales-guide-table-sparkline {
  overflow: visible;
}

.sales-guide-sparkline {
  width: 92px;
  height: 34px;
  flex: 0 0 92px;
}

.sales-guide-sparkline polyline,
.sales-guide-table-sparkline polyline {
  fill: none;
  stroke: #2563eb;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sales-guide-table-sparkline.is-negative polyline {
  stroke: var(--d360-accent);
}

.sales-guide-plan-ring {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #fff 58%, transparent 59%),
    conic-gradient(#22c55e calc(var(--value) * 1%), #e5e7eb 0);
  box-shadow: inset 0 0 0 1px rgba(15,23,42,.04);
}

.sales-guide-card-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.sales-guide-card-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sales-guide-filter-preset-select {
  width: 150px;
  min-height: var(--hdr-el-h);
  border-color: #edf0f3;
  border-radius: 8px;
  background-color: #f8fafc;
  color: #374151;
  font-size: 12px;
  font-weight: 700;
  box-shadow: none;
}

.dashboard-widget-menu-button {
  border-color: #edf0f3;
  border-radius: 8px;
  background: #f8fafc;
  color: #374151;
  box-shadow: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.dashboard-widget-menu-button:hover,
.dashboard-widget-menu-button:focus {
  border-color: #ffe4e6;
  background: #fff7f7;
  color: var(--d360-text);
}

.dashboard-widget-menu-button:active,
.dashboard-widget-menu-button.is-active,
.dashboard-widget-menu-button[aria-pressed="true"] {
  border-color: #fecdd3 !important;
  background: #fff1f2 !important;
  color: var(--d360-accent) !important;
  box-shadow: 0 0 0 3px rgba(237,28,36,.12);
}

.dashboard-widget-menu-button .bi {
  color: #6b7280;
  font-size: 16px;
}

.dashboard-widget-menu-button:hover .bi,
.dashboard-widget-menu-button:focus .bi,
.dashboard-widget-menu-button.is-active .bi,
.dashboard-widget-menu-button[aria-pressed="true"] .bi {
  color: var(--d360-accent);
}

.sales-guide-recommendation-list,
.sales-guide-filter-form,
.sales-guide-activity-list {
  display: grid;
  gap: 12px;
}

.sales-guide-recommendation-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto 31px;
  align-items: center;
  gap: 12px;
  min-height: 70px;
  padding: 12px;
  border: 1px solid var(--d360-border);
  border-radius: 8px;
  background: #fff;
}

.sales-guide-row-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #fecdd3;
  border-radius: 50%;
  background: #fff7f7;
  color: var(--d360-accent);
  font-size: 18px;
}

.sales-guide-recommendation-type,
.sales-guide-potential span {
  color: var(--d360-muted);
  font-size: 12px;
}

.sales-guide-potential {
  min-width: 104px;
  display: grid;
  gap: 2px;
  text-align: right;
  white-space: nowrap;
}

.sales-guide-potential strong {
  font-size: 13px;
}

.sales-guide-growth {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #ecfdf3;
  color: #027a48;
  font-size: 11px;
}

.sales-guide-filter-form .form-label {
  margin-bottom: 4px;
  color: var(--d360-muted);
}

.sales-guide-filter-form .form-select {
  min-height: 34px;
  border-color: var(--d360-border);
  font-size: 13px;
}

.sales-guide-filter-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
}

.sales-guide-filter-actions .btn {
  width: 100%;
  justify-content: center;
}

.sales-guide-filter-actions .btn-outline-secondary {
  white-space: nowrap;
}

.sales-guide-activity-row {
  display: grid;
  grid-template-columns: 44px 38px minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--d360-border);
}

.sales-guide-activity-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.sales-guide-activity-row time {
  grid-column: 1;
  grid-row: 1;
  padding-top: 7px;
  color: var(--d360-muted);
  font-size: 13px;
  white-space: nowrap;
}

.sales-guide-activity-row .sales-guide-row-icon {
  grid-column: 2;
  grid-row: 1;
}

.sales-guide-activity-row .min-w-0 {
  grid-column: 3;
  grid-row: 1;
  padding-top: 2px;
}

.sales-guide-activity-row .ft-status {
  grid-column: 4;
  grid-row: 1;
  width: fit-content;
  max-width: 100%;
  justify-content: center;
  justify-self: end;
  text-align: center;
}

.sales-guide-risk--warning {
  background: #fffbeb;
  color: #b45309;
}

.sales-guide-clients-card .dashboard-card-body {
  padding-bottom: 0;
}

.sales-guide-client-table {
  width: 100%;
  min-width: 920px;
  table-layout: fixed;
  border-top: 1px solid var(--d360-border);
}

.sales-guide-client-table th:nth-child(2) { width: 20%; }
.sales-guide-client-table th:nth-child(3) { width: 12%; }
.sales-guide-client-table th:nth-child(4) { width: 13%; }
.sales-guide-client-table th:nth-child(5) { width: 11%; }
.sales-guide-client-table th:nth-child(6) { width: 11%; }
.sales-guide-client-table th:nth-child(7) { width: 15%; }
.sales-guide-client-table th:nth-child(8) { width: 12%; }

.sales-guide-client-table thead th {
  padding-top: .61rem;
  padding-bottom: .61rem;
  border-bottom: 1px solid var(--d360-border);
  background: #f8fafc;
  color: #374151;
  font-size: 12px;
  font-weight: 700;
  vertical-align: middle;
  white-space: nowrap;
}

.sales-guide-client-table thead th span {
  color: var(--d360-muted);
  font-size: 11px;
  font-weight: 500;
}

.sales-guide-client-table td {
  padding-top: .61rem;
  padding-bottom: .61rem;
  font-size: 13px;
  line-height: 1.25;
  vertical-align: middle;
}

.sales-guide-client-cell {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 180px;
}

.sales-guide-client-logo {
  width: 76px;
  height: 28px;
  border-radius: 4px;
  object-fit: contain;
  background: #fff;
}

.sales-guide-client-table .form-check-input {
  width: 18px;
  height: 18px;
  margin: 0;
  border-color: #cbd5e1;
  accent-color: var(--d360-accent);
  box-shadow: none;
}

.sales-guide-client-table .form-check-input:checked {
  background-color: var(--d360-accent);
  border-color: var(--d360-accent);
}

.sales-guide-client-table .form-check-input:focus {
  border-color: rgba(237,28,36,.55);
  box-shadow: 0 0 0 3px rgba(237,28,36,.14);
}

.sales-guide-delta {
  display: block;
  margin-bottom: 2px;
  font-weight: 800;
  white-space: nowrap;
}

.sales-guide-table-sparkline {
  width: 78px;
  height: 24px;
  display: block;
}

.sales-guide-risk {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.sales-guide-risk--danger {
  background: #fff1f2;
  color: var(--d360-accent);
}

.sales-guide-risk--success {
  background: #ecfdf3;
  color: #027a48;
}

.sales-guide-matrix {
  min-width: 92px;
}

.sales-guide-matrix strong {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
}

.sales-guide-matrix span {
  display: block;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2f7;
}

.sales-guide-matrix i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #22c55e;
}

.sales-guide-matrix--warning i {
  background: #f59e0b;
}

.sales-guide-matrix--danger i {
  background: var(--d360-accent);
}

.sales-guide-client-table td:last-child {
  white-space: nowrap;
}

.sales-guide-row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}

.sales-guide-row-actions .btn {
  flex: 0 0 var(--hdr-el-h);
}

.sales-guide-client-details {
  padding: 16px 0 18px;
  border-top: 1px solid var(--d360-border);
}

@media (min-width: 1200px) {
  .sales-guide-priority-col {
    flex: 0 0 40%;
    max-width: 40%;
  }

  .sales-guide-activities-col {
    flex: 0 0 35%;
    max-width: 35%;
  }
}

.ft-section-card {
  border: 1px solid var(--d360-border);
  border-radius: 8px;
  background: var(--d360-surface);
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}

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

.ft-segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--d360-border);
  border-radius: 8px;
  background: #f8fafc;
}

.ft-segmented [data-segment],
.ft-segment {
  min-height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--d360-muted);
  font-size: 13px;
  font-weight: 500;
  padding: 4px 10px;
}

.ft-segmented [data-segment].is-active,
.ft-segmented [data-tab-target].is-active,
.ft-segment.is-active {
  background: var(--d360-surface);
  color: var(--d360-text);
  box-shadow: 0 1px 2px rgba(15,23,42,.08);
}

.ft-info-panel {
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: var(--d360-info-bg);
  color: #1e3a8a;
  padding: 12px 14px;
}

.ft-catalog-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
}
.ft-catalog-toolbar-row--primary { border-bottom: 1px solid var(--d360-border); }
.ft-catalog-toolbar-spacer { flex: 1 1 auto; }

.ft-product-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border: 1px solid var(--d360-border);
  border-radius: 8px;
  background: var(--d360-surface);
  transition: border-color .15s ease, box-shadow .15s ease, transform .12s ease;
}

.ft-product-card:hover {
  border-color: rgba(237,28,36,.35);
  box-shadow: 0 8px 24px rgba(15,23,42,.08);
  transform: translateY(-1px);
}

.ft-product-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 120px;
  overflow: hidden;
}

.ft-product-thumb img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  object-fit: contain;
}

.ft-product-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ft-product-media {
  position: relative;
}

.ft-product-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 1;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1;
  padding: 3px 7px;
  border-radius: 999px;
}

.ft-product-badge.is-new { color: var(--d360-info); background: var(--d360-info-bg); }
.ft-product-badge.is-promo { color: #027a48; background: #ecfdf3; }
.ft-product-badge.is-hit { color: var(--d360-muted); background: #f1f5f9; }

.ft-product-fav {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 1;
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  box-shadow: 0 1px 2px rgba(15,23,42,.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ft-product-fav[aria-pressed="true"] {
  color: var(--d360-accent);
  border-color: var(--d360-accent);
  background: #fdecec;
}

.ft-product-stock {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
}

.ft-product-stock .ft-stock-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ft-product-stock.is-in { color: #027a48; }
.ft-product-stock.is-in .ft-stock-dot { background: #027a48; }
.ft-product-stock.is-low { color: #d97706; }
.ft-product-stock.is-low .ft-stock-dot { background: #d97706; }
.ft-product-stock.is-order { color: var(--d360-info); }
.ft-product-stock.is-order .ft-stock-dot { background: var(--d360-info); }

.ft-product-buy {
  display: flex;
  gap: 6px;
  --buy-h: 38px;
}

.ft-qty-stepper {
  display: flex;
  align-items: stretch;
  flex-shrink: 0;
  width: 84px;
  height: var(--buy-h);
  border: 1px solid var(--d360-border);
  border-radius: 6px;
  overflow: hidden;
}

.ft-qty-stepper button {
  width: 24px;
  border: none;
  background: var(--d360-page);
  color: var(--d360-muted);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ft-qty-stepper button:hover {
  background: var(--d360-border);
  color: var(--d360-text);
}

.ft-qty-stepper input {
  width: 36px;
  border: none;
  border-left: 1px solid var(--d360-border);
  border-right: 1px solid var(--d360-border);
  text-align: center;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--d360-text);
  background: var(--d360-surface);
  font-variant-numeric: tabular-nums;
  padding: 0;
}

.ft-qty-stepper input:focus {
  outline: none;
}

.ft-product-add {
  flex: 1;
  height: var(--buy-h);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ft-product-add.is-added {
  background: #027a48 !important;
  border-color: #027a48 !important;
}

.ft-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f3f4f6;
  color: var(--d360-text);
  font-size: 12px;
  font-weight: 600;
}

.ft-status--info {
  background: var(--d360-info-bg);
  color: var(--d360-info);
}

.ft-status--success {
  background: #ecfdf3;
  color: #027a48;
}

.ft-status--danger {
  background: #fff0f0;
  color: var(--d360-accent);
}

.ft-status--warning {
  background: #fffbeb;
  color: #d97706;
}

.ft-composite-bar {
  display: flex;
  height: 20px;
  border-radius: 999px;
  overflow: hidden;
  background: #eef0f4;
}

.ft-composite-bar span {
  display: block;
  height: 100%;
}

.ft-composite-bar .is-new { background: #22c55e; }
.ft-composite-bar .is-core { background: #2563eb; }
.ft-composite-bar .is-phaseout { background: #f59e0b; }

.ft-composite-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 12px;
  text-align: center;
}

.ft-composite-stats > div {
  padding: 0 8px;
  border-left: 1px solid var(--d360-border);
}

.ft-composite-stats > div:first-child {
  padding-left: 0;
  border-left: 0;
}

.ft-composite-stats strong {
  display: block;
  font-size: 22px;
  color: var(--d360-text);
}

.ft-composite-stats span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  color: var(--d360-muted);
  font-size: 12px;
}

.ft-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.ft-dot.is-new { background: #22c55e; }
.ft-dot.is-core { background: #2563eb; }
.ft-dot.is-phaseout { background: #f59e0b; }

.ft-carousel-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding-bottom: 4px;
  margin: 0 -4px;
}

.ft-carousel-track > * {
  scroll-snap-align: start;
}

.ft-carousel-card {
  flex: 0 0 220px;
  padding: 4px;
  display: flex;
}

.ft-carousel-card > .ft-product-card {
  flex: 1 1 auto;
  min-width: 0;
}

.ft-product-card.ft-carousel-item {
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
}

.ft-carousel-thumb {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
}

.ft-carousel-media {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
}

.ft-product-fav--sm {
  width: 18px;
  height: 18px;
  top: 3px;
  right: 3px;
  font-size: 9px;
}

.ft-product-buy--sm {
  --buy-h: 30px;
  gap: 4px;
}

.ft-qty-stepper--sm {
  width: 60px;
}

.ft-qty-stepper--sm button {
  width: 18px;
  font-size: 12px;
}

.ft-qty-stepper--sm input {
  width: 24px;
  font-size: 11px;
}

.ft-product-add--sm {
  font-size: 11px;
  padding: 0 4px;
}

.ft-carousel-nav-btn {
  position: absolute;
  top: 50%;
  right: .5rem;
  transform: translateY(-50%);
  z-index: 2;
  background: #fff;
}

.reco-row {
  display: grid;
  grid-template-columns: 72px minmax(160px, 1.3fr) minmax(160px, 1.4fr) minmax(140px, 1fr) minmax(160px, auto);
  gap: 16px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--d360-border);
}

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

.reco-row-thumb {
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  background: #f8f9fb;
}

.reco-row-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.reco-row-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--d360-muted);
  font-weight: 600;
  margin-bottom: 4px;
}

.reco-row-actions {
  text-align: right;
}

.reco-row-actions .h6 {
  margin-bottom: 8px;
}

.reco-row-actions .reco-row-buttons {
  justify-content: flex-end;
}

.reco-row-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 991.98px) {
  .reco-row {
    grid-template-columns: 1fr;
  }

  .reco-row-actions {
    text-align: left;
  }

  .reco-row-actions .reco-row-buttons {
    justify-content: flex-start;
  }
}

.ft-empty-state {
  border: 1px dashed #d0d5dd;
  border-radius: 8px;
  background: #fcfcfd;
  color: var(--d360-muted);
  padding: 18px;
  text-align: center;
}

.ft-skeleton {
  min-height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, #eef2f7 0%, #f8fafc 50%, #eef2f7 100%);
  background-size: 200% 100%;
  animation: ft-skeleton-pulse 1.3s ease-in-out infinite;
}

@keyframes ft-skeleton-pulse {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

.ft-mobile-stack {
  display: grid;
  gap: 12px;
}

@media (min-width: 768px) {
  .ft-mobile-stack {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
  }
}

.chart-wrap { height: 220px; }
.chart-wrap-sm { height: 170px; }

.plan-fact-page {
  width: 100%;
  max-width: none;
}

.plan-fact-filters {
  min-width: 0;
}

.plan-fact-filter-select {
  width: 260px;
  max-width: 100%;
}

.plan-fact-filter-select-wide {
  width: 340px;
}

.plan-fact-filter-select:hover,
.plan-fact-filter-select:focus {
  border-color: #fecdd3;
  background-color: #fff7f7;
  color: var(--d360-text);
  box-shadow: 0 0 0 3px rgba(237,28,36,.12);
}

.plan-fact-export {
  min-height: var(--hdr-el-h);
}

.plan-fact-kpi .dashboard-metric-value {
  font-size: 23px;
}

.matrix-index-value {
  font-size: 46px;
  line-height: 1;
}

.plan-fact-chart.matrix-dynamics-chart {
  height: 190px;
}

.plan-fact-metric-primary {
  grid-template-columns: minmax(0, 1fr);
}

.plan-fact-chart {
  height: 260px;
}

.plan-fact-table {
  border: 1px solid var(--d360-border);
  border-radius: 8px;
  overflow: hidden;
}

.plan-fact-table th {
  color: var(--d360-muted);
  font-size: 12px;
  font-weight: 600;
}

.plan-fact-table td {
  height: 42px;
  font-size: 13px;
}

.plan-fact-table td:last-child {
  width: 136px;
}

.plan-fact-table .sales-guide-matrix {
  min-width: 112px;
}

.marketing-page {
  width: 100%;
  max-width: none;
}

.marketing-kpi-card .dashboard-metric-value {
  font-size: 22px;
}

.marketing-calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

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

.marketing-calendar-grid span {
  color: var(--d360-muted);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.marketing-calendar-grid button {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--d360-text);
  font-size: 12px;
}

.marketing-calendar-grid button:hover,
.marketing-calendar-grid button:focus-visible {
  background: #fff1f2;
  color: var(--d360-accent);
}

.marketing-calendar-grid button.is-muted {
  color: #b6bcc8;
}

.marketing-calendar-grid button.is-active {
  background: var(--d360-accent);
  color: #fff;
  font-weight: 800;
}

.marketing-calendar-grid button.has-active::after,
.marketing-calendar-grid button.has-plan::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 4px;
  height: 4px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--d360-accent);
}

.marketing-calendar-grid button.has-plan::after {
  background: #2563eb;
}

.marketing-calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  color: var(--d360-muted);
  font-size: 11px;
}

.marketing-calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.marketing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.marketing-dot-active {
  background: var(--d360-accent);
}

.marketing-dot-plan {
  background: #2563eb;
}

.marketing-promo-table {
  border: 1px solid var(--d360-border);
  border-radius: 8px;
  overflow: hidden;
}

.marketing-promo-row {
  display: grid;
  grid-template-columns: 86px minmax(190px, 1.4fr) minmax(118px, .6fr) minmax(150px, .8fr) 140px;
  gap: 14px;
  align-items: center;
  min-height: 94px;
  padding: 12px;
  border-bottom: 1px solid var(--d360-border);
  background: #fff;
  cursor: pointer;
}

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

.marketing-promo-row:hover,
.marketing-promo-row.is-selected {
  background: #fff7f7;
}

.marketing-promo-row img,
.marketing-action-card img {
  width: 72px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  background: #f8fafc;
}

.marketing-promo-main {
  min-width: 0;
}

.marketing-promo-row .dashboard-label {
  display: block;
  margin-bottom: 3px;
}

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

.marketing-promo-actions {
  display: grid;
  gap: 8px;
  justify-items: stretch;
}

.marketing-action-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--d360-border);
}

.marketing-action-meta {
  display: grid;
  gap: 3px;
  min-width: 86px;
}

.marketing-action-meta span {
  color: var(--d360-muted);
  font-size: 11px;
}

.marketing-action-layout {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: 22px;
}

.marketing-steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.marketing-steps li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
}

.marketing-steps li > span {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--d360-accent);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.marketing-steps strong,
.marketing-check-list span {
  display: block;
  font-size: 12px;
}

.marketing-steps small {
  display: block;
  margin-top: 2px;
  color: var(--d360-muted);
  font-size: 11px;
}

.marketing-progress-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--d360-muted);
  font-size: 12px;
}

.marketing-progress-row strong {
  color: var(--d360-text);
}

.marketing-check-list {
  display: grid;
  gap: 7px;
}

.marketing-check-list span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--d360-muted);
}

.marketing-check-list .is-done {
  color: var(--d360-text);
}

.marketing-check-list .is-done .bi {
  color: #027a48;
}

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

.marketing-material-list button {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 24px;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 8px;
  border: 1px solid var(--d360-border);
  border-radius: 8px;
  background: #fff;
  color: var(--d360-text);
  text-align: left;
}

.marketing-material-list button:hover,
.marketing-material-list button:focus-visible {
  border-color: #fecdd3;
  background: #fff7f7;
}

.marketing-material-list .bi:first-child {
  color: var(--d360-accent);
  font-size: 18px;
}

.marketing-material-list strong,
.marketing-material-list small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marketing-material-list strong {
  font-size: 12px;
}

.marketing-material-list small {
  color: var(--d360-muted);
  font-size: 11px;
}

.marketing-material-download-all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.marketing-rating-scale {
  display: grid;
  grid-template-columns: repeat(5, 38px);
  gap: 12px;
  margin-bottom: 8px;
}

.marketing-rating-scale button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--d360-border);
  border-radius: 50%;
  background: #fff;
  color: var(--d360-text);
  font-weight: 700;
}

.marketing-rating-scale button:hover,
.marketing-rating-scale button:focus-visible {
  border-color: #fecdd3;
  background: #fff1f2;
  color: var(--d360-accent);
}

.marketing-proposal-card {
  background: #f8fafc;
}

.rating-page {
  width: 100%;
  max-width: none;
}

.rating-toolbar-action {
  min-height: var(--hdr-el-h);
}

.rating-summary-widget .dashboard-card-body,
.rating-kpi-card .dashboard-card-body {
  min-height: 100%;
}

.rating-summary-widget .dashboard-widget-title,
.rating-kpi-card .dashboard-widget-title,
.rating-page .dashboard-widget-title {
  min-width: 0;
}

.rating-summary-widget h2,
.rating-kpi-card h2,
.rating-page .dashboard-widget-title h2 {
  min-width: 0;
  overflow-wrap: anywhere;
}

.rating-summary-card {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.15fr 1.25fr;
  border: 1px solid rgba(15,23,42,.06);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(15,23,42,.05);
}

.rating-summary-segment {
  min-width: 0;
  padding: 22px;
  border-left: 1px solid var(--d360-border);
}

.rating-summary-segment:first-child {
  border-left: 0;
}

.rating-summary-segment[data-rating-summary-level] {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 16px;
}

.rating-summary-widget {
  min-height: 100%;
}

.rating-level-icon {
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff1f2;
  color: var(--d360-accent);
  font-size: 28px;
}

.rating-summary-value {
  margin: 8px 0 4px;
  color: var(--d360-text);
  font-size: 23px;
  line-height: 1.15;
  font-weight: 800;
}

.rating-next-level {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #374151;
  font-size: 13px;
  font-weight: 700;
}

.rating-next-level .bi {
  color: var(--d360-muted);
}

.rating-place {
  color: var(--d360-text);
  font-size: 20px;
  font-weight: 700;
}

.rating-place span {
  color: var(--d360-accent);
  font-size: 28px;
  font-weight: 800;
}

.rating-trend {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #027a48;
  font-size: 12px;
  font-weight: 700;
}

.rating-rank-chart {
  min-width: 168px;
  display: grid;
  grid-template-columns: repeat(5, 24px);
  gap: 12px;
  align-items: end;
}

.rating-rank-bar {
  position: relative;
  border-radius: 5px 5px 0 0;
  background: #edf0f3;
}

.rating-rank-bar.is-active {
  background: var(--d360-accent);
}

.rating-rank-bar span {
  position: absolute;
  top: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%);
  color: var(--d360-muted);
  font-size: 11px;
}

.rating-rank-bar.is-active span {
  color: var(--d360-accent);
  font-weight: 800;
}

.rating-benefit-list {
  display: grid;
  gap: 12px;
}

.rating-benefit-row,
.rating-kpi-row,
.rating-factor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.rating-benefit-row {
  color: #374151;
  font-size: 13px;
}

.rating-benefit-row .bi {
  width: 18px;
  flex: 0 0 18px;
  color: var(--d360-muted);
  text-align: center;
}

.rating-benefit-row span {
  min-width: 0;
  flex: 1;
}

.rating-benefit-row strong,
.rating-kpi-row strong,
.rating-factor-head span {
  color: var(--d360-text);
  font-size: 12px;
  white-space: nowrap;
}

.rating-indicators-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.rating-indicator {
  min-width: 0;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 16px;
  padding: 0 24px;
  border-left: 1px solid var(--d360-border);
}

.rating-indicator:first-child {
  padding-left: 0;
  border-left: 0;
}

.rating-kpi-card {
  min-height: 100%;
}

.rating-kpi-body {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.rating-donut {
  --value: 0;
  width: 64px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: conic-gradient(var(--d360-accent) calc(var(--value) * 1%), #edf0f3 0);
}

.rating-donut span {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
  color: var(--d360-text);
  font-size: 13px;
  font-weight: 800;
}

.rating-kpi-row {
  margin-bottom: 3px;
  color: var(--d360-muted);
  font-size: 12px;
}

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

.rating-factor {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
}

.rating-factor > .bi {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #fff1f2;
  color: var(--d360-accent);
  font-size: 17px;
}

.rating-factor-head {
  margin-bottom: 3px;
  font-size: 13px;
}

.rating-factor-head span {
  color: var(--d360-accent);
}

.rating-upgrade-card {
  overflow: hidden;
  background: linear-gradient(135deg, #fff 0%, #fff7f7 100%);
}

.rating-upgrade-content {
  min-height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 116px;
  gap: 18px;
  align-items: center;
}

.rating-upgrade-content .btn {
  grid-column: 1 / -1;
}

.rating-upgrade-visual {
  width: 116px;
  height: 116px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
  color: var(--d360-accent);
  font-size: 58px;
  box-shadow: 0 14px 34px rgba(237,28,36,.15);
}

@media (max-width: 575.98px) {
  .plan-fact-filter-select,
  .plan-fact-filter-select-wide {
    width: 100%;
  }

  .plan-fact-filters,
  .plan-fact-export {
    width: 100%;
  }

  .plan-fact-chart {
    height: 230px;
  }

  .plan-fact-chart.matrix-dynamics-chart {
    height: 170px;
  }
}

@media (max-width: 1199.98px) {
  .marketing-promo-row {
    grid-template-columns: 72px minmax(0, 1fr) 120px;
  }

  .marketing-promo-row > div:nth-of-type(2),
  .marketing-promo-row > div:nth-of-type(3) {
    display: none;
  }

  .marketing-action-card,
  .marketing-action-layout {
    grid-template-columns: 1fr;
  }

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

  .rating-summary-segment:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--d360-border);
  }

  .rating-summary-segment:nth-child(4) {
    border-top: 1px solid var(--d360-border);
  }

  .rating-indicators-grid,
  .rating-factor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 0;
  }

  .rating-indicator:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }
}

@media (max-width: 767.98px) {
  .marketing-promo-row {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .marketing-promo-actions {
    grid-column: 1 / -1;
  }

  .marketing-rating-scale {
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
  }

  .marketing-rating-scale button {
    width: 100%;
  }

  .rating-summary-card,
  .rating-indicators-grid,
  .rating-factor-grid {
    grid-template-columns: 1fr;
  }

  .rating-summary-segment,
  .rating-summary-segment:nth-child(4),
  .rating-indicator,
  .rating-indicator:nth-child(3) {
    padding: 18px;
    border-left: 0;
    border-top: 1px solid var(--d360-border);
  }

  .rating-summary-segment:first-child,
  .rating-indicator:first-child {
    border-top: 0;
  }

  .rating-summary-segment[data-rating-summary-level],
  .rating-indicator,
  .rating-kpi-body,
  .rating-factor,
  .rating-upgrade-content {
    grid-template-columns: 1fr;
  }

  .rating-toolbar-action {
    width: 100%;
    justify-content: center;
  }

  .rating-rank-chart {
    min-width: 150px;
    grid-template-columns: repeat(5, 22px);
    gap: 10px;
  }
}

.hdr-search {
  width: 320px;
}

.topbar-search-suggest {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  min-width: 320px;
  max-width: 420px;
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  display: none;
  z-index: 1040;
}

.topbar-search-suggest.open {
  display: block;
}

.topbar-search-suggest-head,
.topbar-search-suggest-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topbar-search-suggest-head {
  padding: 2px 2px 10px;
  font-size: 12px;
}

.topbar-search-suggest-group + .topbar-search-suggest-group {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #f0f2f5;
}

.topbar-search-suggest-title {
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #6b7280;
}

.topbar-search-suggest-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 10px;
  color: #111827;
  text-decoration: none;
}

.topbar-search-suggest-item:hover {
  background: #f8fafc;
  color: #111827;
}

.topbar-search-suggest-main {
  font-size: 13px;
  font-weight: 600;
}

.topbar-search-suggest-meta {
  font-size: 12px;
  color: #6b7280;
}

.topbar-search-suggest-empty {
  display: none;
  padding: 8px 2px 4px;
  font-size: 12px;
}

.topbar-search-suggest-empty.open {
  display: block;
}

.topbar-search-suggest-foot {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #f0f2f5;
}

.bdg-new { background: #eff6ff; color: #2563eb; }
.bdg-production { background: #fffbeb; color: #d97706; }
.bdg-ready { background: #f0fdf4; color: #16a34a; }
.bdg-shipped { background: #f0f0f0; color: #666; }
.bdg-cancelled { background: #fff0f0; color: #ED1C24; }

.notif-panel {
  width: 360px;
  position: fixed;
  top: 0;
  right: -380px;
  bottom: 0;
  z-index: 1060;
  background: #fff;
  box-shadow: -4px 0 24px rgba(0,0,0,.15);
  transition: right .28s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
}
.notif-panel.open { right: 0; }

.ft-filters-panel {
  width: 400px;
  position: fixed;
  top: 0;
  right: -420px;
  bottom: 0;
  z-index: 1060;
  background: #fff;
  box-shadow: -4px 0 24px rgba(0,0,0,.15);
  transition: right .28s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
}
.ft-filters-panel.open { right: 0; }

.ft-filter-count-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--d360-accent);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.ft-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--d360-border);
  background: #fff;
  color: var(--d360-text);
  padding: 5px 12px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s ease;
}
.ft-chip:hover { border-color: var(--d360-accent); color: var(--d360-accent); }
.btn-check:checked + .ft-chip,
.ft-chip.is-active {
  background: var(--d360-accent);
  border-color: var(--d360-accent);
  color: #fff;
}

.ft-filters-panel .form-check-input:checked {
  background-color: var(--d360-accent);
  border-color: var(--d360-accent);
}
.ft-filters-panel .form-check-input:focus {
  border-color: rgba(237,28,36,.55);
  box-shadow: 0 0 0 3px rgba(237,28,36,.14);
}
.ft-filters-panel .form-range { accent-color: var(--d360-accent); }
.ft-filters-panel .form-range::-webkit-slider-thumb { background-color: var(--d360-accent); }
.ft-filters-panel .form-range::-moz-range-thumb { background-color: var(--d360-accent); border-color: var(--d360-accent); }

.ft-catalog-table-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  overflow: hidden;
}
.ft-catalog-table-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.notif-unread-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ED1C24;
  flex-shrink: 0;
  margin-top: 4px;
}
.v2-overlay {
  position: fixed;
  inset: 0;
  z-index: 1035;
  background: rgba(0,0,0,.5);
  display: none;
}
.v2-overlay.open { display: block; }

.v2-modal {
  position: fixed;
  inset: 0;
  z-index: 1080;
  display: none;
}
.v2-modal.open {
  display: block;
}
.v2-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.52);
}
.v2-modal__dialog {
  position: relative;
  width: min(640px, calc(100vw - 24px));
  margin: 64px auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,.22);
  overflow: hidden;
}
.v2-modal__header,
.v2-modal__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 24px;
}
.v2-modal__header {
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.v2-modal__body {
  padding: 20px 24px;
}
.v2-modal__footer {
  border-top: 1px solid rgba(0,0,0,.08);
  justify-content: flex-end;
}

.product-gallery {
  display: grid;
  gap: 12px;
}
.product-gallery__viewport {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  border-radius: 12px;
  background: #f8f9fa;
  scrollbar-width: thin;
}
.product-gallery__track {
  display: flex;
}
.product-gallery__slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.product-gallery__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.product-gallery__thumbs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(92px, 120px);
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.product-gallery__thumb {
  display: block;
  border: 1px solid rgba(0,0,0,.1);
  border-radius: 10px;
  overflow: hidden;
  background: #f8f9fa;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.product-gallery__thumb:hover {
  border-color: rgba(237,28,36,.5);
  box-shadow: 0 0 0 1px rgba(237,28,36,.15);
}
.product-gallery__thumb img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.mobile-nav {
  height: 56px;
  z-index: 1030;
}
.mobile-nav a {
  min-width: 54px;
  color: #777;
  text-decoration: none;
  font-size: 11px;
}
.mobile-nav .bi {
  font-size: 18px;
  display: block;
  line-height: 1;
}
.mobile-nav a.active,
.mobile-nav a:hover {
  color: #ED1C24;
}

.table > :not(caption) > * > * {
  padding-top: .72rem;
  padding-bottom: .72rem;
}

@media (max-width: 991.98px) {
  .dashboard-priority-balance { order: 0; }
  .dashboard-priority-actions { order: 1; }
  .dashboard-priority-kpis { order: 2; }
  .dashboard-priority-orders { order: 3; }
  .dashboard-priority-promotions { order: 4; }
  .dashboard-priority-chart { order: 5; }
  .dashboard-priority-recommendations { order: 6; }
  .dashboard-priority-manager { order: 7; }

  .dashboard-balance-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .dashboard-balance-list {
    padding-left: 0;
    padding-top: 16px;
    border-left: 0;
    border-top: 1px solid var(--d360-border);
  }

  .dashboard-chart-summary {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .dashboard-chart-summary div {
    padding: 0;
    border-left: 0;
  }

  .dashboard-order-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .dashboard-order-row strong {
    grid-column: 1 / -1;
  }

  .dashboard-next-action {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1199.98px) {
  .hdr-search {
    width: 220px;
  }

  .topbar-user-meta,
  .topbar-user-trigger .bi-chevron-down {
    display: none !important;
  }
}

@media (max-width: 820px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-wrapper {
    margin-left: 0;
    padding-bottom: 64px;
  }
  .mobile-nav { display: flex !important; }
  .topbar-breadcrumbs { display: none; }
  .hdr-search { display: none !important; }
}

@media (max-width: 600px) {
  .dashboard-card-body {
    padding: 16px;
  }

  .dashboard-chart-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .dashboard-chart-heading .dashboard-chart-actions {
    width: 100%;
    justify-content: space-between;
  }

  .dashboard-recommendation-item {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .dashboard-recommendation-item .hdr-icon-btn {
    grid-column: 2;
    justify-self: start;
  }

  .dashboard-product-thumb {
    width: 58px;
    height: 58px;
  }

  .dashboard-feed-item {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .dashboard-feed-item .ft-status {
    grid-column: 2;
    justify-self: start;
  }

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

  .sales-guide-page-head {
    flex-direction: column;
  }

  .sales-guide-date-control {
    width: 100%;
  }

  .sales-guide-date-control .topbar-action-btn {
    width: 100%;
    justify-content: center;
  }

  .sales-guide-recommendation-row {
    grid-template-columns: 38px minmax(0, 1fr) 31px;
  }

  .sales-guide-recommendation-type {
    grid-column: 2;
  }

  .sales-guide-recommendation-row .min-w-0 {
    grid-column: 2 / -1;
  }

  .sales-guide-potential {
    grid-column: 2 / -1;
    justify-self: start;
    text-align: left;
  }

  .sales-guide-client-table {
    min-width: 0;
  }

  .sales-guide-client-cell {
    justify-content: flex-end;
  }

  .sales-guide-client-table td:last-child {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
  }

  .sales-guide-client-table td:last-child::before {
    margin-right: auto;
  }

  .sales-guide-client-table td:last-child .btn {
    width: var(--hdr-el-h);
  }

  .ft-card-table,
  .ft-card-table tbody,
  .ft-card-table tr,
  .ft-card-table td {
    display: block;
    width: 100%;
  }

  .ft-card-table thead {
    display: none;
  }

  .ft-card-table tr {
    padding: 12px 14px;
    border-bottom: 1px solid var(--d360-border);
  }

  .ft-card-table td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    border: 0;
    text-align: right !important;
  }

  .ft-card-table td::before {
    content: attr(data-label);
    flex: 0 0 86px;
    color: var(--d360-muted);
    font-size: 12px;
    text-align: left;
  }

  .ft-card-table td:last-child {
    display: block;
  }

  .ft-card-table td:last-child::before {
    display: block;
    margin-bottom: 6px;
  }

  .ft-card-table td:last-child .btn {
    width: 100%;
  }

  .sales-guide-client-table td:last-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .ft-card-table td:last-child .sales-guide-row-actions {
    width: auto;
    display: inline-flex;
    gap: 16px;
    justify-content: flex-end;
  }

  .ft-card-table td:last-child .sales-guide-row-actions .btn {
    width: var(--hdr-el-h);
  }

  .notif-panel { width: 100%; right: -105%; }
  .notif-panel.open { right: 0; }
  .ft-filters-panel { width: 100%; right: -105%; }
  .ft-filters-panel.open { right: 0; }
  .v2-modal__dialog {
    width: calc(100vw - 16px);
    margin: 12px auto;
  }
  .v2-modal__header,
  .v2-modal__body,
  .v2-modal__footer {
    padding: 16px;
  }
  .v2-modal__footer {
    flex-direction: column-reverse;
  }
  .v2-modal__footer .btn {
    width: 100%;
  }
  .topbar-actions .vr,
  .topbar-cart-count {
    display: none !important;
  }
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 4px;
}

/* Мини-тулбар переключения демо-стендов: закреплён у левой границы экрана,
   примерно по центру по вертикали. Кнопка подсказок — первая (верхняя). */
.stand-toolbar {
  position: fixed;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1055;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .9);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.stand-toolbar-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

.stand-toolbar-btn {
  background: rgba(255,255,255,.14);
  color: #fff;
}

.stand-toolbar-btn:hover,
.stand-toolbar-btn:focus-visible {
  background: rgba(255,255,255,.34);
  color: #fff;
  transform: scale(1.08);
  box-shadow: 0 0 0 4px rgba(255,255,255,.12);
}

.stand-toolbar-btn:focus-visible {
  outline: 2px solid rgba(255,255,255,.6);
  outline-offset: 2px;
}

.stand-toolbar-btn--play {
  background: var(--d360-hint-accent);
  color: #111827;
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
}

.stand-toolbar-btn--play:hover,
.stand-toolbar-btn--play:focus-visible {
  background: var(--d360-hint-accent-hover);
  color: #111827;
  transform: scale(1.08);
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
}

.stand-toolbar-btn--play:focus-visible {
  outline: 3px solid rgba(251,191,36,.45);
  outline-offset: 2px;
}

/* Пока сценарий активен, кнопка play в тулбаре стендов превращается в стоп —
   тот же элемент, другая иконка и слегка приглушённый акцент. */
.stand-toolbar-btn--play.is-active {
  background: #ef4444;
  color: #fff;
}

.stand-toolbar-btn--play.is-active:hover,
.stand-toolbar-btn--play.is-active:focus-visible {
  background: #dc2626;
  color: #fff;
}

/* Стилизованная всплывающая подсказка вместо нативного title */
.stand-toolbar-btn::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%) translateX(-4px);
  background: #111827;
  color: #fff;
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
  z-index: 1056;
}

.stand-toolbar-btn:hover::after,
.stand-toolbar-btn:focus-visible::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

@media (max-width: 820px) {
  .stand-toolbar { left: 10px; gap: 8px; padding: 6px; }
  .stand-toolbar-btn { width: 34px; height: 34px; font-size: 15px; }
}

@keyframes hints-highlight-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(251,191,36,.35); }
  50% { box-shadow: 0 0 0 10px rgba(251,191,36,.1); }
}

.embed-mode .main-wrapper { margin-left: 0; }

/* apps/lk/lk-sales-guide.php?embed=1 встроен в CRM-приложение «Д360»:
   рядом с контентом выводится тот же сайдбар, что и у остальных страниц приложения. */
body.embed-mode {
  display: flex;
  height: 100vh;
  overflow: hidden;
  background: #fff;
}

body.embed-mode .crm-app-sidebar {
  flex: 0 0 232px;
  border-radius: 0;
}

body.embed-mode .main-wrapper {
  flex: 1 1 auto;
  min-width: 0;
  height: 100vh;
  overflow-y: auto;
}

.scenario-highlight {
  position: relative;
  z-index: 1060;
  outline: 3px solid var(--d360-hint-accent);
  outline-offset: 3px;
  border-radius: 8px;
  animation: hints-highlight-pulse 1.6s ease-in-out infinite;
}

.scenario-badge {
  position: fixed;
  z-index: 1061;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--d360-hint-accent-hover);
  color: #111827;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.scenario-badge .bi {
  font-size: 10px;
  margin-left: 1px;
}

/* Нижняя панель управления сценарием: прогресс по вехам, инструкции к
   текущим шагам. Стоп сценария — кнопкой play/stop в .stand-toolbar, не здесь. */
.scenario-bar {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 1062;
  width: min(680px, calc(100vw - 32px));
  background: rgba(17, 24, 39, .85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
  padding: 14px 18px;
  font-size: 13px;
}

.scenario-bar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.scenario-bar-title {
  font-weight: 600;
  font-size: 13.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scenario-bar-step {
  color: rgba(255, 255, 255, .55);
  font-weight: 400;
}

.scenario-progress {
  margin-top: 12px;
}

.scenario-progress-track {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  display: flex;
}

.scenario-progress-fill {
  position: absolute;
  inset: 0;
  width: 0;
  border-radius: 999px;
  background: var(--d360-hint-accent);
  transition: width .25s ease;
}

.scenario-progress-milestones {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  gap: 4px;
}

.scenario-progress-milestone {
  font-size: 10.5px;
  color: rgba(255, 255, 255, .45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scenario-progress-milestone.is-done,
.scenario-progress-milestone.is-current {
  color: var(--d360-hint-accent);
  font-weight: 600;
}

.scenario-instructions {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.scenario-instruction {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.4;
}

.scenario-instruction-num {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--d360-hint-accent-hover);
  color: #111827;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.scenario-instruction-action {
  color: rgba(255, 255, 255, .55);
  font-weight: 600;
}

.scenario-next-hint {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  color: rgba(255, 255, 255, .8);
  line-height: 1.4;
}

.scenario-next-hint a {
  color: var(--d360-hint-accent);
  font-weight: 600;
}

.scenario-finish-btn {
  margin-top: 8px;
  display: inline-block;
  border: none;
  border-radius: 999px;
  background: var(--d360-hint-accent);
  color: #111827;
  font-weight: 600;
  font-size: 12.5px;
  padding: 7px 16px;
  cursor: pointer;
  transition: background .15s ease;
}

.scenario-finish-btn:hover,
.scenario-finish-btn:focus-visible {
  background: var(--d360-hint-accent-hover);
}

.scenario-bar--offtrack .scenario-instructions {
  display: none;
}

/* Разовое сообщение о завершении сценария — показывается вместо обычного
   бара, когда пользователь уходит со страницы последнего шага, и само
   исчезает через несколько секунд (см. scenario-engine.js renderDoneBanner). */
.scenario-bar--done {
  background: rgba(16, 122, 66, .92);
  text-align: center;
}

.scenario-bar--done .scenario-bar-head {
  justify-content: center;
}

.scenario-bar--done .scenario-bar-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  white-space: normal;
}

.scenario-bar--done .bi-check-circle-fill {
  color: #6ee7b7;
}

@media (max-width: 640px) {
  .scenario-bar { padding: 12px 14px; }
  .scenario-progress-milestone:not(.is-current):not(.is-done) { display: none; }
}

/* Выпадающий список множественного выбора для фильтров (Правило/Статус/Ответственный
   на «Список созданных подсказок», Дилер/Менеджер на BI-страницах) — нативный
   <details>, без JS, в том же визуальном языке, что .filter-select-control /
   .action-menu. Отображение фильтра, без логики фильтрации. */
.filter-multiselect {
  position: relative;
  display: inline-block;
}

.filter-multiselect > summary {
  list-style: none;
  cursor: pointer;
  height: var(--hdr-el-h);
  min-height: var(--hdr-el-h);
  padding: 0 12px;
  border: 1px solid #edf0f3;
  border-radius: 8px;
  background: #fff;
  color: #374151;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.filter-multiselect > summary::-webkit-details-marker { display: none; }

.filter-multiselect > summary::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1.5px solid #9aa1ae;
  border-bottom: 1.5px solid #9aa1ae;
  transform: rotate(45deg);
  margin-left: 2px;
  flex-shrink: 0;
}

.filter-multiselect > summary:hover,
.filter-multiselect > summary:focus {
  border-color: #ffe4e6;
  background: #fff7f7;
  color: var(--d360-text);
}

.filter-multiselect[open] > summary {
  border-color: #fecdd3;
  background: #fff1f2;
  color: var(--d360-accent);
}

.filter-multiselect-count {
  color: var(--d360-muted);
  font-weight: 500;
}

.filter-multiselect[open] > summary .filter-multiselect-count {
  color: inherit;
}

.filter-multiselect-panel {
  position: absolute;
  left: 0;
  top: calc(100% + 4px);
  z-index: 20;
  min-width: 240px;
  max-height: 280px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--d360-border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .12);
  padding: 6px;
}

.filter-multiselect-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 400;
  color: var(--d360-text);
  cursor: pointer;
  margin: 0;
}

.filter-multiselect-item:hover {
  background: #f3f4f6;
}

.filter-multiselect-item input {
  flex-shrink: 0;
}

/* Раскрывающиеся строки таблиц «Показатели дилеров» / «Показатели менеджеров» —
   детализация по кварталам (Период = Год/Полугодие) или по месяцам (Период =
   Квартал). Видимая группа переключается атрибутом data-detail-mode на странице. */
.bi-row-toggle {
  width: 26px;
  height: 26px;
  border: none;
  background: transparent;
  color: var(--d360-muted);
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, color .15s ease;
}

.bi-row-toggle:hover {
  background: #f3f4f6;
  color: var(--d360-text);
}

.bi-row-toggle[aria-expanded="true"] {
  transform: rotate(90deg);
  color: var(--d360-accent);
}

.bi-detail-row > td {
  background: #f8fafc;
  padding: 14px 16px;
}

.bi-detail-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.bi-detail-group {
  flex: 1 1 320px;
  min-width: 280px;
}

.bi-detail-group--months {
  display: none;
}

[data-detail-mode="month"] .bi-detail-group--quarters {
  display: none;
}

[data-detail-mode="month"] .bi-detail-group--months {
  display: block;
}

.bi-detail-table {
  background: #fff;
  border: 1px solid var(--d360-border);
  border-radius: 8px;
  font-size: 12.5px;
}

.bi-detail-table th,
.bi-detail-table td {
  padding: 6px 10px;
}

/* Раскрывающееся меню действий в таблицах BI/Push CRM (нативный <details>, без JS).
   Внешний вид совпадает с кнопкой действий на «Правила Push CRM» (.rule-action-btn) —
   36px, без рамки, мягкий серый фон, красный акцент при hover/open. */
.action-menu {
  position: relative;
  display: inline-block;
}

.action-menu > summary {
  list-style: none;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  color: #4b5563;
  background: #f8fafc;
  border: none;
}

.action-menu > summary .bi {
  font-size: 20px;
  line-height: 1;
  color: currentColor;
}

.action-menu > summary::-webkit-details-marker { display: none; }

.action-menu > summary:hover,
.action-menu > summary:focus {
  background: #fff1f2;
  color: var(--d360-accent);
}

.action-menu[open] > summary {
  background: #ffe4e6;
  color: var(--d360-accent);
}

.action-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 20;
  min-width: 200px;
  background: #fff;
  border: 1px solid var(--d360-border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .12);
  padding: 6px;
  display: flex;
  flex-direction: column;
}

.action-menu-item {
  border: none;
  background: none;
  text-align: left;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--d360-text);
}

.action-menu-item:hover {
  background: #f3f4f6;
}

/* Настройки — вкладка «Маппинг ролей» */
.role-mapping-intro {
  font-size: 13px;
  color: var(--d360-muted);
  margin-bottom: 16px;
}

.role-mapping-intro code {
  background: #f3f4f6;
  padding: 1px 5px;
  border-radius: 4px;
}

.role-mapping-block {
  padding: 14px 0;
  border-top: 1px solid var(--d360-border);
}

.role-mapping-block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.role-mapping-block__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px 5px 12px;
  border-radius: 999px;
  background: #f3f4f6;
  font-size: 12.5px;
  color: var(--d360-text);
}

.chip-remove {
  border: none;
  background: rgba(0, 0, 0, .06);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 11px;
  line-height: 1;
  color: var(--d360-muted);
}

.role-mapping-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--d360-border);
}

.v2-modal__dialog--sm { width: min(480px, calc(100vw - 24px)); }
