.overview-readiness-card {
  overflow: hidden;
  border: 1px solid var(--next-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .06);
}

.overview-actions-panel {
  scroll-margin-top: calc(var(--ops-mobile-bar-height, 66px) + 12px);
}

.overview-load-error {
  grid-column: 1 / -1;
}

.overview-readiness-head {
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--next-line);
}

.overview-readiness-head h2,
.overview-readiness-role h2 {
  margin: 0;
  font-weight: 850;
}

.overview-readiness-head h2 {
  font-size: 18px;
}

.overview-readiness-head p {
  margin: 3px 0 0;
  color: var(--next-muted);
  font-size: 13px;
}

.overview-readiness-rows {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.overview-readiness-row {
  position: relative;
  min-width: 0;
  display: grid;
  gap: 14px;
  padding: 16px 18px 18px;
  border-left: 4px solid #94a3b8;
}

.overview-readiness-row + .overview-readiness-row {
  border-top: 1px solid var(--next-line);
}

.overview-readiness-row.overview-card-error {
  border-left-color: #ef4444;
}

.overview-readiness-row.overview-card-warning {
  border-left-color: #f59e0b;
}

.overview-readiness-row.overview-card-ok {
  border-left-color: #22c55e;
}

.overview-readiness-row.overview-card-neutral {
  border-left-color: #64748b;
}

.overview-status-chip {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

button.overview-status-chip {
  border: 0;
  cursor: pointer;
  transition: box-shadow .16s ease, transform .16s ease;
}

button.overview-status-chip:hover {
  box-shadow: 0 0 0 3px rgba(15, 23, 42, .08);
}

button.overview-status-chip:active {
  transform: translateY(1px);
}

button.overview-status-chip:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .24);
  outline-offset: 2px;
}

.overview-chip-error {
  background: #fee2e2;
  color: #991b1b;
}

.overview-chip-warning {
  background: #fef3c7;
  color: #92400e;
}

.overview-chip-ok {
  background: #dcfce7;
  color: #166534;
}

.overview-chip-neutral {
  background: #e2e8f0;
  color: #334155;
}

.overview-readiness-role {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.overview-readiness-role > div {
  min-width: 0;
}

.overview-readiness-role h2 {
  font-size: 16px;
}

.overview-readiness-role small,
.overview-mini-metric span {
  color: var(--next-muted);
}

.overview-readiness-role small {
  display: block;
  margin-top: 2px;
  font-size: 12px;
}

.overview-readiness-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
  gap: 8px;
}

.overview-mini-metric {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid var(--next-line);
  border-radius: 10px;
  background: #f8fafc;
}

.overview-mini-metric span,
.overview-mini-metric strong {
  display: block;
}

.overview-mini-metric strong {
  overflow-wrap: normal;
  word-break: normal;
  font-size: 16px;
  line-height: 1.15;
}

.overview-mini-metric small {
  display: block;
  margin-top: 4px;
  color: var(--next-muted);
  font-size: 11px;
  line-height: 1.35;
}

.overview-plan-details {
  border-top: 1px solid var(--next-line);
}

.overview-plan-details > summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  min-height: 38px;
  color: var(--next-text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  list-style: none;
}

.overview-plan-details > summary::-webkit-details-marker {
  display: none;
}

.overview-plan-details > summary::before {
  content: "›";
  flex: 0 0 auto;
  color: var(--next-muted);
  font-size: 19px;
  line-height: 1;
  transform: rotate(0deg);
  transition: transform .16s ease;
}

.overview-plan-details[open] > summary::before {
  transform: rotate(90deg);
}

.overview-plan-details > summary > span {
  flex: 1 1 auto;
}

.overview-plan-details > summary > small {
  color: var(--next-muted);
  font-size: 11px;
  font-weight: 700;
  text-align: right;
}

.overview-plan-store-list {
  border-top: 1px solid var(--next-line);
}

.overview-plan-store-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 9px 0;
}

.overview-plan-store-row + .overview-plan-store-row {
  border-top: 1px solid var(--next-line);
}

.overview-plan-store-name {
  min-width: 0;
}

.overview-plan-store-name strong,
.overview-plan-store-name small {
  display: block;
}

.overview-plan-store-name strong {
  overflow: hidden;
  color: var(--next-text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-plan-store-name small {
  margin-top: 2px;
  color: var(--next-muted);
  font-size: 11px;
}

.overview-plan-store-percent,
.overview-plan-store-missing,
.overview-plan-store-neutral {
  font-size: 12px;
  white-space: nowrap;
}

.overview-plan-store-reached .overview-plan-store-percent {
  color: #15803d;
}

.overview-plan-store-progress .overview-plan-store-percent {
  color: #9a3412;
}

.overview-plan-store-missing {
  color: #b45309;
}

.overview-plan-store-neutral {
  color: var(--next-muted);
  font-weight: 700;
}

.overview-kpi-periods {
  border-top: 1px solid var(--next-line);
}

.overview-kpi-periods-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  padding: 10px 0;
}

.overview-kpi-periods-head strong {
  font-size: 13px;
}

.overview-kpi-periods-head small {
  color: var(--next-muted);
  font-size: 11px;
  text-align: right;
}

.overview-kpi-period-list {
  border: 1px solid var(--next-line);
  border-radius: 8px;
  overflow: hidden;
}

.overview-kpi-period + .overview-kpi-period {
  border-top: 1px solid var(--next-line);
}

.overview-kpi-period > summary {
  position: relative;
  display: grid;
  grid-template-columns: minmax(170px, 1.4fr) repeat(3, minmax(110px, 1fr));
  gap: 12px;
  align-items: center;
  min-height: 64px;
  padding: 10px 34px 10px 12px;
  background: #fff;
  cursor: pointer;
  list-style: none;
}

.overview-kpi-period > summary::-webkit-details-marker {
  display: none;
}

.overview-kpi-period > summary::after {
  position: absolute;
  right: 13px;
  content: "›";
  color: var(--next-muted);
  font-size: 20px;
  line-height: 1;
  transform: rotate(0deg);
  transition: transform .16s ease;
}

.overview-kpi-period[open] > summary::after {
  transform: rotate(90deg);
}

.overview-kpi-period > summary:hover {
  background: #f8fafc;
}

.overview-kpi-period > summary > span,
.overview-kpi-person-row > div {
  min-width: 0;
}

.overview-kpi-period > summary small,
.overview-kpi-period > summary strong,
.overview-kpi-person-row small,
.overview-kpi-person-row strong {
  display: block;
}

.overview-kpi-period > summary small,
.overview-kpi-person-row small {
  color: var(--next-muted);
  font-size: 11px;
}

.overview-kpi-period > summary strong {
  margin-top: 2px;
  font-size: 13px;
}

.overview-kpi-period-name strong {
  margin-top: 0 !important;
  font-size: 14px !important;
}

.overview-kpi-period-result {
  text-align: right;
}

.overview-kpi-period-result strong {
  font-size: 16px !important;
}

.overview-kpi-period-ok .overview-kpi-period-result strong {
  color: #15803d;
}

.overview-kpi-period-warning .overview-kpi-period-result strong {
  color: #b45309;
}

.overview-kpi-period-body {
  padding: 0 12px 12px;
  border-top: 1px solid var(--next-line);
  background: #f8fafc;
}

.overview-kpi-period-note,
.overview-kpi-period-deviation,
.overview-kpi-empty {
  margin: 0;
  padding: 9px 0;
  color: var(--next-muted);
  font-size: 12px;
}

.overview-kpi-period-note-warning {
  color: #92400e;
}

.overview-kpi-period-deviation {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--next-text);
}

.overview-kpi-people {
  border-top: 1px solid var(--next-line);
}

.overview-kpi-person-row {
  display: grid;
  grid-template-columns: minmax(170px, 1.4fr) repeat(3, minmax(110px, 1fr));
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 8px 0;
}

.overview-kpi-person-row + .overview-kpi-person-row {
  border-top: 1px solid var(--next-line);
}

.overview-kpi-person-name strong {
  overflow-wrap: anywhere;
  font-size: 13px;
}

.overview-kpi-person-name small {
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.overview-kpi-person-row > div > strong {
  margin-top: 2px;
  font-size: 12px;
}

.overview-kpi-person-result {
  text-align: right;
}

.overview-kpi-unavailable {
  border-color: #fcd34d;
  background: #fffbeb;
}

.overview-kpi-loading {
  border-color: #bfdbfe;
  background: #eff6ff;
}

@media (max-width: 840px) {
  .overview-readiness-row + .overview-readiness-row {
    border-top: 1px solid var(--next-line);
  }

  .overview-readiness-role {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 680px) {
  .overview-kpi-periods-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .overview-kpi-periods-head small {
    text-align: left;
  }

  .overview-kpi-period > summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px 12px;
    padding-right: 30px;
  }

  .overview-kpi-period-name {
    grid-column: 1 / -1;
  }

  .overview-kpi-period-result {
    text-align: left;
  }

  .overview-kpi-person-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
  }

  .overview-kpi-person-name {
    grid-column: 1 / -1;
  }

  .overview-kpi-person-result {
    text-align: left;
  }
}

@media (max-width: 480px) {
  .overview-readiness-head,
  .overview-readiness-row {
    padding-right: 14px;
    padding-left: 14px;
  }

  .overview-plan-store-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .overview-plan-store-row .btn {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .overview-plan-store-name strong {
    white-space: normal;
  }
}

.overview-product-modal .modal-dialog {
  width: min(1180px, calc(100vw - 32px));
  max-width: none;
}

.overview-product-modal .modal-content {
  max-height: min(900px, calc(100dvh - 32px));
  border: 0;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgb(15 23 42 / 24%);
}

.overview-product-modal-header {
  align-items: flex-start;
  padding: 22px 24px 18px;
}

.overview-product-modal-header .btn-close {
  flex: 0 0 auto;
  margin-top: 2px;
}

.overview-product-modal-body {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 20px 24px 24px;
  background: #f8fafc;
}

.overview-product-status {
  display: block;
  padding: 13px 15px;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  background: #fff;
  color: #334155;
}

.overview-product-status strong,
.overview-product-status span:last-child {
  display: block;
}

.overview-product-status strong {
  margin-bottom: 3px;
}

.overview-product-status-loading {
  display: flex;
  gap: 10px;
  align-items: center;
}

.overview-product-status-loading span:last-child {
  display: inline;
}

.overview-product-status-warning {
  border-color: #f5d58d;
  background: #fffbeb;
  color: #78350f;
}

.overview-product-status-info {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
}

.overview-product-status-error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.overview-product-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 12px;
}

.overview-product-summary:empty {
  display: none;
}

.overview-product-summary-card {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 15px 16px;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  background: #fff;
}

.overview-product-summary-card span,
.overview-product-summary-card small {
  color: #64748b;
  font-size: 12px;
}

.overview-product-summary-card strong {
  white-space: nowrap;
  color: #0f172a;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.overview-product-summary-card-down strong,
.overview-product-summary-card-down small {
  color: #b42318;
}

.overview-product-summary-card-up strong,
.overview-product-summary-card-up small {
  color: #067647;
}

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

.overview-product-tabs {
  width: fit-content;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 4px;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  background: #fff;
}

.overview-product-tab {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 13px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #475569;
  font-weight: 700;
}

.overview-product-tab b {
  min-width: 22px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #eef2f7;
  color: #475569;
  font-size: 11px;
}

.overview-product-tab-active {
  background: #e8f7ee;
  color: #087443;
}

.overview-product-tab-active b {
  background: #fff;
  color: #087443;
}

.overview-product-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(230px, .55fr);
  gap: 12px;
}

.overview-product-search,
.overview-product-sort {
  min-width: 0;
  display: grid;
  gap: 6px;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

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

.overview-product-row {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(230px, 1fr) minmax(230px, .75fr) minmax(140px, .45fr);
  gap: 16px;
  align-items: center;
  padding: 15px 16px 15px 19px;
  overflow: hidden;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  background: #fff;
}

.overview-product-row::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #94a3b8;
  content: '';
}

.overview-product-row-down::before {
  background: #e45b52;
}

.overview-product-row-up::before {
  background: #25a36f;
}

.overview-product-row-main,
.overview-product-row-values span,
.overview-product-row-change {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.overview-product-row-main strong,
.overview-product-row-values b,
.overview-product-row-change strong {
  overflow-wrap: anywhere;
  color: #0f172a;
}

.overview-product-row-main small,
.overview-product-row-values small,
.overview-product-row-values em,
.overview-product-row-change small {
  color: #64748b;
  font-size: 12px;
}

.overview-product-row-values em {
  overflow-wrap: anywhere;
  font-style: normal;
  font-variant-numeric: tabular-nums;
}

.overview-product-row-status {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.overview-product-row-values {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.overview-product-row-change {
  justify-items: end;
  text-align: right;
}

.overview-product-row-down .overview-product-row-change strong,
.overview-product-row-down .overview-product-row-change small {
  color: #b42318;
}

.overview-product-row-up .overview-product-row-change strong,
.overview-product-row-up .overview-product-row-change small {
  color: #067647;
}

.overview-product-empty {
  padding: 30px 18px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #64748b;
  text-align: center;
}

.overview-product-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 0 0;
  color: #64748b;
  font-size: 12px;
}

.overview-product-more .btn {
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 700;
}

.overview-product-skeleton {
  display: grid;
  gap: 8px;
}

.overview-product-skeleton i {
  height: 82px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: linear-gradient(90deg, #fff 0%, #f1f5f9 50%, #fff 100%);
  background-size: 200% 100%;
  animation: overview-product-loading 1.3s linear infinite;
}

@keyframes overview-product-loading {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .overview-product-skeleton i {
    animation: none;
  }
}

.overview-product-modal-footer {
  justify-content: space-between;
  padding: 14px 24px;
}

.overview-product-detail-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

@media (max-width: 720px) {
  .overview-product-modal .modal-dialog {
    width: 100%;
    max-width: none;
    min-height: 100dvh;
    margin: 0;
  }

  .overview-product-modal .modal-content {
    min-height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }

  .overview-product-modal-header,
  .overview-product-modal-body,
  .overview-product-modal-footer {
    padding-right: 16px;
    padding-left: 16px;
  }

  .overview-product-modal-body {
    gap: 12px;
    padding-top: 14px;
    padding-bottom: 16px;
  }

  .overview-product-summary {
    grid-template-columns: 1fr;
  }

  .overview-product-summary-card:last-child {
    grid-column: 1 / -1;
  }

  .overview-product-summary-card strong {
    font-size: 20px;
  }

  .overview-product-filters {
    grid-template-columns: 1fr;
  }

  .overview-product-tabs {
    width: 100%;
  }

  .overview-product-tab {
    min-width: 0;
    padding-right: 7px;
    padding-left: 7px;
  }

  .overview-product-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
  }

  .overview-product-row-main {
    grid-column: 1 / -1;
  }

  .overview-product-row-values {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .overview-product-modal-footer {
    flex-wrap: nowrap;
  }

  .overview-product-modal-footer .btn {
    min-width: 0;
  }
}

@media (max-width: 390px) {
  .overview-product-tab {
    flex-direction: column;
    gap: 2px;
    font-size: 12px;
  }

  .overview-product-row {
    grid-template-columns: 1fr;
  }

  .overview-product-row-values {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .overview-product-row-change {
    justify-items: start;
    text-align: left;
  }

  .overview-product-more {
    align-items: stretch;
    flex-direction: column;
    text-align: center;
  }

  .overview-product-modal-footer {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 340px) {
  .overview-product-filters {
    grid-template-columns: 1fr;
  }
}
