:root {
  --next-bg: #f5f7fb;
  --next-sidebar: #111827;
  --next-sidebar-soft: #1f2937;
  --next-text: #111827;
  --next-muted: #6b7280;
  --next-line: #e5e7eb;
}

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

.next-main,
#workspace,
.next-section {
  min-width: 0;
  max-width: 100%;
}

.next-section {
  overflow-x: hidden;
}

.next-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  align-content: start;
}

.next-sidebar {
  position: sticky;
  top: 0;
  z-index: 100;
  isolation: isolate;
  align-self: start;
  min-height: var(--ops-mobile-bar-height);
  display: block;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px;
  overflow: visible;
  overflow-anchor: none;
  background: var(--next-sidebar);
  color: #fff;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: #22c55e;
  color: #052e16;
  font-weight: 800;
}

.brand-block small {
  display: block;
  color: #cbd5e1;
}

.next-sidebar-head {
  display: flex;
}

.next-module-switch {
  width: 100%;
  margin-bottom: 0;
}

.mobile-nav-toggle {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #475569;
  border-radius: 10px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-weight: 800;
}

.mobile-nav-toggle:hover,
.mobile-nav-toggle:focus-visible,
.mobile-nav-toggle[aria-expanded="true"] {
  border-color: #86efac;
  background: var(--next-sidebar-soft);
}

.mobile-nav-toggle-icon {
  font-size: 18px;
  line-height: 1;
}

.mobile-nav-toggle[hidden] {
  display: none !important;
}

.next-nav-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.next-sidebar .nav-link {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  padding: 9px 10px;
  background: transparent;
  color: #cbd5e1;
  text-align: left;
  font-weight: 700;
}

.next-sidebar .next-nav-group .nav-link::before {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: transparent;
  content: "";
}

.next-sidebar .nav-link:hover {
  background: #1e293b;
  color: #fff;
}

.next-sidebar .nav-link.active {
  background: #1e293b;
  color: #fff;
  box-shadow: none;
}

.next-sidebar .next-nav-group .nav-link.active::before {
  background: #4ade80;
}

.nav-group-label {
  display: block;
  margin: 10px 10px 2px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.next-main {
  min-width: 0;
  padding: 24px;
}

body.next-guest .next-shell {
  display: block;
  min-height: 100vh;
}

body.next-guest .next-sidebar,
body.next-guest .next-topbar {
  display: none;
}

body.next-guest .next-main {
  width: min(100%, 760px);
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(20px, 8vh, 72px) 20px;
  display: grid;
  align-content: center;
}

body.next-guest .auth-card {
  box-shadow: 0 24px 70px rgba(15, 23, 42, .12);
}

body.next-restricted .next-shell {
  grid-template-columns: minmax(0, 1fr);
}

body.next-restricted .next-sidebar {
  display: none;
}

body.next-restricted .next-main {
  width: min(100%, 760px);
  margin: 0 auto;
}

.plan-modal .modal-content {
  border: 0;
  border-radius: 18px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, .22);
}

.plan-modal .modal-header {
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--next-line);
}

.plan-modal .modal-body {
  padding: 22px 24px 24px;
}

.plan-modal .modal-dialog-scrollable .modal-content > form:not(.modal-body) {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  overflow: hidden;
}

.plan-modal .modal-dialog-scrollable .modal-content > form.modal-body {
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.plan-modal .modal-dialog-scrollable .modal-content > form > .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.plan-form-footer {
  z-index: 2;
  flex: 0 0 auto;
  margin: 0;
  padding: 14px 24px;
  border-top: 1px solid var(--next-line);
  background: #fff;
  box-shadow: 0 -8px 20px rgba(15, 23, 42, .06);
}

.plan-form-feedback {
  flex: 0 0 auto;
  max-height: 30dvh;
  overflow-y: auto;
  background: #fff;
}

.plan-form-feedback .alert {
  margin: 12px 24px 0;
}

@media (max-width: 575.98px) {
  .plan-editor-modal .modal-dialog {
    width: 100%;
    height: 100dvh;
    min-height: 100dvh;
    margin: 0;
  }

  .plan-editor-modal .modal-content {
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }

  .plan-editor-modal .modal-header {
    flex: 0 0 auto;
    padding: 18px 16px 14px;
  }

  .plan-editor-modal .plan-form-scroll {
    padding: 18px 16px 14px;
  }

  .plan-editor-modal .plan-form-feedback .alert {
    margin-inline: 16px;
  }

  .plan-editor-modal .plan-form-footer {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    padding: 12px 16px max(12px, env(safe-area-inset-bottom));
  }

  .plan-editor-modal .plan-form-footer .btn {
    min-width: 0;
    white-space: normal;
  }

}

.modal-eyebrow {
  color: #15803d;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.plan-switch {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.next-topbar > div:first-child {
  min-width: 0;
}

.next-topbar h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.next-eyebrow {
  margin: 0 0 4px;
  color: #15803d;
  text-transform: uppercase;
  font-weight: 800;
  font-size: 12px;
}

.next-user {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
  flex: 0 0 auto;
}

.control-card,
.auth-card,
.card {
  border: 1px solid var(--next-line);
  box-shadow: 0 10px 30px rgba(15, 23, 42, .04);
}

.period-range {
  min-height: 58px;
  display: grid;
  align-content: center;
  padding: 8px 12px;
  border: 1px solid var(--next-line);
  border-radius: 10px;
  background: #fff;
}

.period-range span {
  color: var(--next-muted);
  font-size: 13px;
}

.period-range strong {
  font-size: 16px;
}

.period-icon-button {
  width: 42px;
  flex: 0 0 42px;
  font-weight: 800;
}

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

.local-date-control {
  position: relative;
}

.local-date-control > .form-control {
  padding-right: 2.75rem;
}

.local-date-picker-button {
  position: absolute;
  top: 50%;
  right: .35rem;
  display: inline-grid;
  width: 2rem;
  height: 2rem;
  padding: 0;
  place-items: center;
  color: #526174;
  background: transparent;
  border: 0;
  border-radius: .4rem;
  transform: translateY(-50%);
}

.local-date-picker-button:hover,
.local-date-picker-button:focus-visible,
.local-date-input-group-button:hover,
.local-date-input-group-button:focus-visible {
  color: #146c43;
  background: #edf8f1;
}

.local-date-picker-button:focus-visible,
.local-date-input-group-button:focus-visible {
  outline: 2px solid rgba(20, 108, 67, .3);
  outline-offset: 1px;
}

.local-date-picker-button:disabled {
  color: #9aa6b2;
  cursor: default;
  background: transparent;
}

.local-date-picker-icon {
  position: relative;
  display: block;
  width: 1rem;
  height: .9rem;
  border: 1.7px solid currentColor;
  border-radius: .16rem;
}

.local-date-picker-icon::before {
  position: absolute;
  top: .18rem;
  right: 0;
  left: 0;
  content: '';
  border-top: 1.7px solid currentColor;
}

.local-date-picker-icon::after {
  position: absolute;
  top: -.22rem;
  left: .18rem;
  width: .44rem;
  height: .32rem;
  content: '';
  border-right: 1.7px solid currentColor;
  border-left: 1.7px solid currentColor;
}

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

.calculation-type-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.calculation-type-button {
  min-width: 0;
  min-height: 58px;
  padding: 9px 12px;
  border: 1px solid var(--next-line);
  border-radius: 10px;
  background: #fff;
  color: var(--next-text);
  text-align: left;
  font-weight: 800;
}

.calculation-type-button:hover {
  border-color: #86efac;
  background: #f0fdf4;
}

.calculation-type-button.active,
.calculation-type-button[aria-pressed="true"] {
  border-color: #15803d;
  background: #dcfce7;
  color: #052e16;
}

.calculation-type-button span,
.calculation-type-button small {
  display: block;
  overflow: visible;
  overflow-wrap: normal;
  text-overflow: clip;
  word-break: normal;
  white-space: normal;
}

.calculation-type-button small {
  margin-top: 2px;
  color: var(--next-muted);
  font-size: 12px;
  font-weight: 700;
}

.calculation-type-button[aria-pressed="true"] small {
  color: #166534;
}

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

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

.metric-grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metric-card {
  border: 1px solid var(--next-line);
  border-radius: 14px;
  background: #fff;
  padding: 16px;
  min-height: 118px;
  min-width: 0;
  display: grid;
  gap: 6px;
}

.metric-card span {
  color: var(--next-muted);
  font-size: 13px;
}

.metric-card strong {
  font-size: 24px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.metric-card small {
  color: var(--next-muted);
  min-width: 0;
  overflow-wrap: anywhere;
}

.seller-kpi-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 14px;
}

.seller-kpi-hero-card,
.seller-kpi-detail-card {
  border: 1px solid var(--next-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.06);
  min-width: 0;
}

.seller-kpi-hero-card {
  padding: 20px;
  display: grid;
  gap: 8px;
}

.seller-kpi-hero-single {
  grid-column: 1 / -1;
}

.seller-kpi-hero-today {
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 62%);
  border-color: #bbf7d0;
}

.seller-kpi-hero-card span,
.seller-kpi-detail-head span {
  color: var(--next-muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.seller-kpi-hero-card strong {
  color: var(--next-text);
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.seller-kpi-hero-card small,
.seller-kpi-note {
  color: var(--next-muted);
}

.seller-kpi-hero-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 6px 0 0;
  padding: 14px 0 0;
  border-top: 1px solid #dcfce7;
}

.seller-kpi-hero-metrics div {
  min-width: 0;
}

.seller-kpi-hero-metrics dt {
  margin-bottom: 3px;
  color: var(--next-muted);
  font-size: 12px;
  font-weight: 700;
}

.seller-kpi-hero-metrics dd {
  margin: 0;
  color: var(--next-text);
  font-size: 18px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.seller-kpi-panel {
  min-width: 0;
}

.seller-kpi-detail-card {
  padding: 18px;
  display: grid;
  gap: 16px;
}

.seller-kpi-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  min-width: 0;
}

.seller-kpi-detail-head h3 {
  margin: 4px 0 0;
  font-size: 22px;
  line-height: 1.15;
}

.seller-kpi-detail-head strong {
  font-size: 24px;
  color: #166534;
  white-space: nowrap;
}

.seller-kpi-progress {
  height: 12px;
  border-radius: 999px;
  background: #edf4ee;
  overflow: hidden;
}

.seller-kpi-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e, #15803d);
}

.seller-kpi-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.seller-kpi-facts div {
  border: 1px solid var(--next-line);
  border-radius: 14px;
  padding: 12px;
  background: #f8faf8;
  min-width: 0;
}

.seller-kpi-facts dt {
  margin: 0 0 4px;
  color: var(--next-muted);
  font-size: 12px;
  font-weight: 800;
}

.seller-kpi-facts dd {
  margin: 0;
  color: var(--next-text);
  font-size: 18px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.seller-kpi-day-store {
  padding: 14px;
  border-radius: 14px;
  background: #f0fdf4;
  color: #14532d;
  font-size: 20px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.seller-kpi-note {
  margin: 0;
  font-size: 14px;
}

.seller-kpi-preview-note {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: #eff6ff;
  color: #1e3a5f;
  font-size: 14px;
  line-height: 1.45;
}

.seller-kpi-preview-note strong {
  color: #1d4ed8;
}

.seller-period-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--next-line);
  border-radius: 16px;
  background: #f8faf8;
}

.seller-period-summary {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.seller-period-summary span {
  color: var(--next-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.seller-period-summary strong {
  color: var(--next-text);
  font-size: 18px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.seller-period-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.seller-period-actions .btn {
  min-width: 44px;
  min-height: 40px;
  border-radius: 12px;
  font-weight: 800;
}

.manager-week-progress-card {
  height: 100%;
  align-content: start;
}

.manager-month-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 18px;
  margin: 0;
}

.manager-month-summary > div {
  min-width: 0;
  padding: 10px 0;
  border-bottom: 1px solid var(--next-line);
}

.manager-month-summary dt {
  color: var(--next-muted);
  font-size: 12px;
  font-weight: 800;
}

.manager-month-summary dd {
  margin: 3px 0 0;
  color: var(--next-text);
  font-size: 18px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  overflow-wrap: normal;
  white-space: nowrap;
}

.manager-month-summary small {
  display: block;
  margin-top: 3px;
  color: var(--next-muted);
  font-size: 11px;
  line-height: 1.4;
}

.manager-month-projection {
  grid-column: 1 / -1;
}

.manager-kpi-action-note,
.manager-kpi-official-note {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.45;
}

.manager-kpi-action-note {
  background: #fff7ed;
  color: #9a3412;
}

.manager-kpi-action-note-muted,
.manager-kpi-official-note {
  background: #f8fafc;
  color: var(--next-muted);
}

.manager-week-progress-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}

.manager-week-progress-head > div:first-child {
  min-width: 0;
}

.manager-week-progress-head span {
  color: var(--next-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.manager-week-progress-head h3 {
  margin: 4px 0 0;
  font-size: 20px;
  line-height: 1.2;
}

.manager-week-switcher {
  display: grid;
  grid-template-columns: 42px minmax(150px, 1fr) 42px;
  gap: 6px;
  flex: 0 1 300px;
  min-width: 0;
}

.manager-week-switcher .btn,
.manager-week-switcher .form-select {
  min-height: 42px;
}

.manager-week-switcher .btn {
  padding: 6px;
}

.manager-week-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.manager-week-summary div {
  min-width: 0;
  padding: 10px 0;
  border-bottom: 1px solid var(--next-line);
}

.manager-week-summary dt,
.manager-week-day-metrics dt {
  color: var(--next-muted);
  font-size: 11px;
  font-weight: 800;
}

.manager-week-summary dd,
.manager-week-day-metrics dd {
  margin: 3px 0 0;
  color: var(--next-text);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.manager-week-warning,
.manager-week-note {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
}

.manager-week-warning {
  background: #fff7ed;
  color: #9a3412;
}

.manager-week-note {
  background: #f8fafc;
  color: var(--next-muted);
}

.manager-week-days {
  display: grid;
  border-bottom: 1px solid var(--next-line);
}

.manager-week-day {
  min-width: 0;
  border-top: 1px solid var(--next-line);
}

.manager-week-day summary,
.manager-week-day-empty {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(0, 2fr) auto;
  gap: 16px;
  align-items: center;
  padding: 13px 2px;
  list-style: none;
}

.manager-week-day summary {
  cursor: pointer;
}

.manager-week-day summary::-webkit-details-marker {
  display: none;
}

.manager-week-day summary::after {
  content: "⌄";
  grid-column: 3;
  color: var(--next-muted);
  font-size: 18px;
}

.manager-week-day[open] summary::after {
  transform: rotate(180deg);
}

.manager-week-day-date {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.manager-week-day-date strong {
  color: var(--next-text);
  font-size: 15px;
}

.manager-week-day-date small {
  color: var(--next-muted);
  font-size: 11px;
  line-height: 1.35;
}

.manager-week-day-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.manager-week-day-metrics div {
  min-width: 0;
}

.manager-week-store-list {
  display: grid;
  margin: 0 0 12px 18px;
  border-left: 2px solid #bbf7d0;
}

.manager-week-store-row {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  min-width: 0;
}

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

.manager-week-store-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.manager-week-store-head > div {
  min-width: 0;
}

.manager-week-store-head strong,
.manager-week-store-head small {
  display: block;
  overflow-wrap: anywhere;
}

.manager-week-store-head small,
.manager-week-seller-row small,
.manager-week-no-sellers {
  margin: 3px 0 0;
  color: var(--next-muted);
  font-size: 11px;
}

.manager-week-store-plan {
  flex: 0 0 auto;
  text-align: right;
}

.manager-week-seller-list {
  display: grid;
  gap: 6px;
}

.manager-week-seller-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 10px;
  padding-top: 7px;
  border-top: 1px dashed #dbe7dd;
  min-width: 0;
}

.manager-week-seller-row span,
.manager-week-seller-row strong {
  min-width: 0;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.manager-week-seller-row small {
  grid-column: 1 / -1;
}

.seller-kpi-breakdown {
  border: 1px solid var(--next-line);
  border-radius: 16px;
  background: #fbfdfb;
  overflow: hidden;
}

.seller-kpi-breakdown summary {
  cursor: pointer;
  padding: 14px 16px;
  color: #166534;
  font-weight: 900;
  list-style: none;
}

.seller-kpi-breakdown summary::-webkit-details-marker {
  display: none;
}

.seller-kpi-breakdown summary::after {
  content: "↓";
  float: right;
  color: var(--next-muted);
}

.seller-kpi-breakdown[open] summary::after {
  content: "↑";
}

.seller-kpi-breakdown-body {
  display: grid;
  gap: 14px;
  padding: 0 16px 16px;
}

.seller-kpi-breakdown-total {
  display: grid;
  gap: 10px;
  margin: 0;
}

.seller-kpi-breakdown-total div,
.seller-kpi-breakdown-row {
  display: grid;
  gap: 3px;
  padding: 12px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--next-line);
}

.seller-kpi-breakdown-total dt,
.seller-kpi-breakdown-row small {
  margin: 0;
  color: var(--next-muted);
  font-size: 12px;
  font-weight: 800;
}

.seller-kpi-breakdown-total dd {
  margin: 0;
  color: var(--next-text);
  font-weight: 900;
  overflow-wrap: anywhere;
}

.seller-kpi-breakdown-result {
  border-color: #bbf7d0 !important;
  background: #f0fdf4 !important;
}

.seller-kpi-breakdown-note {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 13px;
  font-weight: 800;
}

.seller-kpi-breakdown-section {
  display: grid;
  gap: 8px;
}

.seller-kpi-breakdown-section h4 {
  margin: 0;
  font-size: 14px;
}

.seller-kpi-breakdown-list {
  display: grid;
  gap: 8px;
}

.seller-kpi-breakdown-row span {
  color: var(--next-text);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.seller-kpi-breakdown-row strong {
  color: #166534;
  font-size: 18px;
}

.seller-kpi-breakdown-row .manager-plan-formula {
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.seller-kpi-list-card {
  border-radius: 18px;
  overflow: hidden;
}

.seller-shift-week-group {
  display: grid;
  gap: 10px;
}

.seller-shift-week-group + .seller-shift-week-group {
  margin-top: 4px;
}

.seller-shift-week-title {
  color: var(--next-muted);
  font-size: 13px;
  font-weight: 900;
}

.seller-shift-card {
  display: grid;
  grid-template-columns: minmax(96px, 0.8fr) minmax(0, 1.4fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--next-line);
  border-radius: 14px;
  background: #fff;
  padding: 14px;
  min-width: 0;
}

.seller-shift-card strong,
.seller-shift-card span {
  color: var(--next-text);
  font-weight: 900;
}

.seller-shift-card small {
  display: block;
  margin-top: 3px;
  color: var(--next-muted);
  font-size: 12px;
}

.seller-shift-status {
  border-radius: 999px;
  background: #ecfdf5;
  color: #166534 !important;
  padding: 6px 10px;
  font-size: 12px;
  white-space: nowrap;
}

.overview-dashboard {
  width: min(100%, 1760px);
  margin-inline: auto;
  display: grid;
  gap: 16px;
}

.next-main:has(#overviewSection:not(.d-none)) > .next-topbar {
  width: min(100%, 1760px);
  margin-inline: auto;
}

.overview-work-grid {
  display: grid;
  gap: 16px;
}

.overview-analytics {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(340px, .85fr);
  gap: 16px;
  align-items: start;
}

.overview-trend-analytics {
  grid-template-columns: 1fr;
}

.overview-period-toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 16px 18px;
  border: 1px solid var(--next-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .04);
}

.overview-period-toolbar-text {
  display: grid;
  gap: 8px;
  min-width: min(100%, 320px);
}

.overview-period-toolbar-text span {
  color: var(--next-muted);
  font-size: 13px;
}

.overview-period-toolbar-text > strong {
  color: var(--next-text);
  font-size: 14px;
  line-height: 1.35;
}

.overview-month-navigator {
  width: min(100%, 320px);
  min-height: 46px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  overflow: hidden;
  border: 1px solid #d6e3d6;
  border-radius: 12px;
  background: #f8fbf8;
}

.overview-month-label {
  min-width: 0;
  padding: 0 10px;
  color: var(--next-text);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}

.overview-month-button {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #166534;
  font-size: 30px;
  font-weight: 500;
  line-height: 1;
  transition: background .16s ease, color .16s ease;
}

.overview-month-button:hover:not(:disabled) {
  background: #e8f5eb;
  color: #14532d;
}

.overview-month-button:focus-visible {
  position: relative;
  z-index: 1;
  outline: 3px solid rgba(21, 128, 61, .22);
  outline-offset: -3px;
}

.overview-month-button:disabled {
  cursor: not-allowed;
  color: #a8b4aa;
  opacity: .7;
}

.overview-period-controls {
  display: grid;
  gap: 12px;
  align-items: start;
  min-width: 0;
}

.overview-period-filter-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(170px, 220px);
  gap: 10px;
  align-items: end;
  min-width: 0;
}

.overview-period-controls .form-label {
  margin-bottom: 4px;
  color: var(--next-muted);
  font-size: 13px;
}

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

.overview-period-option {
  position: relative;
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid #d6e3d6;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  font-weight: 800;
  line-height: 1;
  transition: background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.overview-period-option:hover:not(:disabled) {
  border-color: #86c49a;
  box-shadow: 0 8px 20px rgba(21, 128, 61, .12);
  transform: translateY(-1px);
}

.overview-period-option-active {
  border-color: #15803d;
  background: #15803d;
  color: #fff;
  box-shadow: 0 10px 24px rgba(21, 128, 61, .18);
}

.overview-period-option:disabled {
  cursor: wait;
  opacity: .72;
}

.overview-period-option-loading {
  padding-right: 34px;
}

.overview-period-option-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 12px;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: overview-spin .75s linear infinite;
}

.sales-period-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, .34fr) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid #dbe7dc;
  border-radius: 16px;
  background: #f8fbf8;
}

.sales-workspace-head .card-body {
  padding: 22px;
}

.sales-sync-action {
  flex: 0 0 auto;
  white-space: nowrap;
}

.sales-pagination {
  display: flex;
  min-height: 58px;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-top: 1px solid var(--next-line);
  color: var(--next-muted);
  font-size: 13px;
}

.sales-pagination-actions {
  display: flex;
  gap: 8px;
}

.sales-period-presets {
  justify-content: flex-end;
}

.sales-import-scope {
  margin-top: 6px;
  color: #166534;
  font-size: 13px;
  font-weight: 800;
}

.overview-detail-control,
.overview-store-control {
  min-width: 0;
}

@keyframes overview-spin {
  to { transform: rotate(360deg); }
}

@keyframes overview-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.overview-loading-line,
.overview-loading-pill,
.overview-loading-box,
.overview-loading-button,
.overview-loading-chart,
.overview-loading-donut {
  display: block;
  background: linear-gradient(90deg, #eef4f0 0%, #f8fafc 45%, #e2efe7 75%, #eef4f0 100%);
  background-size: 200% 100%;
  animation: overview-shimmer 1.15s ease-in-out infinite;
}

.overview-loading-line {
  height: 12px;
  border-radius: 999px;
}

.overview-loading-line-1 {
  width: 76%;
}

.overview-loading-line-2 {
  width: 58%;
}

.overview-loading-line-3 {
  width: 42%;
}

.overview-loading-pill {
  width: 96px;
  height: 30px;
  border-radius: 999px;
}

.overview-loading-box {
  min-height: 54px;
  border-radius: 14px;
}

.overview-loading-button {
  width: 132px;
  height: 36px;
  border-radius: 999px;
}

.overview-loading-chart {
  min-height: 260px;
  border-radius: 18px;
}

.overview-loading-donut {
  width: min(100%, 260px);
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 999px;
}

.overview-loading-card {
  border-left-color: #cbd5e1;
}

.overview-loading-card::after {
  opacity: .45;
}

.overview-loading-overlay {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 18px;
  border-radius: inherit;
  background: rgba(255, 255, 255, .78);
  color: #0f172a;
  text-align: center;
  font-weight: 800;
  backdrop-filter: blur(2px);
}

.overview-card-busy {
  position: relative;
  overflow: hidden;
}

.overview-card-busy > :not(.overview-loading-overlay) {
  opacity: .42;
  pointer-events: none;
}

.overview-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #bbf7d0;
  border-top-color: #15803d;
  border-radius: 999px;
  animation: overview-spin .75s linear infinite;
}

.overview-spinner-inline {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 6px;
  vertical-align: -2px;
}

.overview-loading-inline {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.overview-range-modal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(250px, .8fr);
  gap: 20px;
  align-items: start;
}

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

.overview-calendar-panel,
.overview-range-fields {
  min-width: 0;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #f8fafc;
}

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

.overview-calendar-head strong {
  color: #0f172a;
  font-size: 18px;
}

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

.overview-calendar-weekdays {
  margin-bottom: 8px;
  color: var(--next-muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.overview-calendar-day {
  min-width: 0;
  aspect-ratio: 1;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  font-weight: 800;
  line-height: 1;
}

.overview-calendar-day:hover {
  border-color: #86c49a;
  background: #ecfdf3;
}

.overview-calendar-day-muted {
  color: #94a3b8;
  background: #f8fafc;
}

.overview-calendar-day-range,
.overview-calendar-day-range:hover {
  border-color: #bbf7d0;
  background: #dcfce7;
  color: #14532d;
}

.overview-calendar-day-edge,
.overview-calendar-day-edge:hover {
  border-color: #15803d;
  background: #15803d;
  color: #fff;
}

.overview-calendar-day-disabled,
.overview-calendar-day-disabled:hover {
  cursor: not-allowed;
  border-color: transparent;
  background: #f1f5f9;
  color: #cbd5e1;
  box-shadow: none;
}

.overview-range-fields {
  display: grid;
  gap: 14px;
}

.overview-range-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.overview-analytics-card {
  position: relative;
  min-width: 0;
  display: grid;
  gap: 16px;
  overflow: hidden;
  align-content: start;
  padding: clamp(16px, 1.2vw, 22px);
  border: 1px solid var(--next-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .04);
}

.overview-revenue-dashboard-card {
  container: overview-revenue / inline-size;
}

.overview-store-summary-card {
  container: overview-store-summary / inline-size;
}

.overview-analytics-card-wide {
  min-height: 360px;
}

.overview-analytics-card-full {
  grid-column: 1 / -1;
}

.overview-store-trend-card {
  gap: 18px;
}

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

.overview-store-trend-context {
  display: flex;
  min-width: 0;
  gap: 10px 20px;
  align-items: center;
  flex: 1 1 auto;
}

.overview-store-trend-context-period {
  display: flex;
  min-width: 0;
  gap: 5px 8px;
  align-items: baseline;
  flex-wrap: wrap;
}

.overview-store-trend-context-period span,
.overview-store-trend-context-period small {
  color: var(--next-muted);
  font-size: 12px;
}

.overview-store-trend-context-period strong {
  color: var(--next-text);
  font-size: 13px;
  font-weight: 800;
}

.overview-store-trend-context-period small {
  padding-left: 8px;
  border-left: 1px solid var(--next-line);
}

.overview-store-trend-context-current {
  padding-right: 20px;
  border-right: 1px solid var(--next-line);
}

.overview-store-trend-context-period .overview-store-trend-context-warning {
  color: #9a3412;
}

.overview-store-cohort-details {
  flex: 1 0 100%;
  margin-top: 2px;
}

.overview-store-cohort-details > summary {
  width: fit-content;
  cursor: pointer;
  color: #166534;
  font-size: 12px;
  font-weight: 750;
  list-style-position: inside;
}

.overview-store-cohort-details > div {
  display: flex;
  gap: 6px 14px;
  align-items: baseline;
  flex-wrap: wrap;
  margin-top: 7px;
  padding: 9px 10px;
  border: 1px solid var(--next-line);
  border-radius: 6px;
  background: #f8fafc;
}

.overview-store-cohort-details span {
  color: var(--next-muted);
  font-size: 12px;
}

.overview-store-cohort-details span strong {
  margin-left: 3px;
  color: var(--next-text);
}

.overview-store-cohort-details small {
  flex: 1 0 100%;
  padding: 0;
  border: 0;
}

.overview-product-detail-action {
  flex: 0 0 auto;
  min-height: 36px;
  white-space: nowrap;
}

.overview-store-trend-back {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  margin: 0 0 9px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #047857;
  font-size: 13px;
  font-weight: 750;
}

.overview-store-trend-back:hover {
  color: #065f46;
}

.overview-store-trend-back:focus-visible {
  outline: 2px solid #22c55e;
  outline-offset: 4px;
}

.overview-analytics-head .overview-store-trend-back > span {
  color: inherit;
  font-size: 17px;
  line-height: 1;
}

.overview-store-trend-ranking {
  min-width: 0;
}

.overview-store-trend-ranking-head {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 2px 12px 12px;
}

.overview-store-trend-ranking-head > div:first-child {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.overview-store-trend-ranking-head h3 {
  margin: 0;
  font-size: 17px;
}

.overview-store-trend-ranking-head small {
  color: var(--next-muted);
  font-size: 12px;
}

.overview-store-trend-ranking-actions {
  display: flex;
  min-width: 0;
  gap: 9px;
  align-items: end;
}

.overview-store-trend-sort-control {
  display: grid;
  min-width: 170px;
  gap: 3px;
}

.overview-store-trend-sort-control > span {
  color: var(--next-muted);
  font-size: 11px;
  font-weight: 700;
}

.overview-store-trend-sort-control select {
  width: 100%;
  min-height: 34px;
  padding: 5px 30px 5px 9px;
  border: 1px solid var(--next-line);
  border-radius: 7px;
  background-color: #fff;
  color: var(--next-text);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}

.overview-store-trend-sort-control select:focus-visible {
  border-color: #4ade80;
  outline: 2px solid #bbf7d0;
  outline-offset: 1px;
}

.overview-store-trend-count {
  flex: 0 0 auto;
  padding: 4px 9px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.overview-store-trend-table-head {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, .8fr) minmax(92px, auto);
  gap: 20px;
  padding: 8px 12px;
  border-top: 1px solid var(--next-line);
  border-bottom: 1px solid var(--next-line);
  color: var(--next-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.overview-store-trend-table-head > :last-child {
  text-align: right;
}

.overview-store-trend-list {
  display: grid;
}

.overview-store-trend-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, .8fr) minmax(92px, auto);
  gap: 20px;
  align-items: center;
  width: 100%;
  min-width: 0;
  min-height: 58px;
  padding: 11px 12px;
  border: 0;
  border-bottom: 1px solid #edf1f5;
  border-radius: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.overview-store-trend-row:hover,
.overview-store-trend-row:focus-visible,
.overview-store-trend-row.overview-store-hover-active,
.overview-store-trend-row-active {
  background: #f8fafc;
  box-shadow: none;
  outline: 2px solid transparent;
}

.overview-store-trend-row:focus-visible {
  outline-color: #86efac;
  outline-offset: 2px;
}

.overview-store-trend-row-name {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
}

.overview-store-trend-row-title {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.overview-store-trend-row-title small {
  color: #9a3412;
  font-size: 11px;
  font-weight: 700;
}

.overview-store-trend-row-values {
  display: flex;
  min-width: 0;
  gap: 8px 18px;
  align-items: baseline;
  flex-wrap: wrap;
}

.overview-store-trend-row-values small {
  color: var(--next-muted);
  font-size: 12px;
}

.overview-store-trend-row-values b {
  color: var(--next-text);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.overview-store-trend-row-change {
  display: grid;
  gap: 1px;
  justify-self: end;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.overview-store-trend-row-change strong {
  font-size: 15px;
  font-weight: 900;
}

.overview-store-trend-row-change small {
  color: currentColor;
  font-size: 11px;
  font-weight: 750;
  opacity: .78;
}

.overview-store-trend-row-down .overview-store-trend-row-change {
  color: #be123c;
}

.overview-store-trend-row-up .overview-store-trend-row-change {
  color: #047857;
}

.overview-store-trend-row-unavailable {
  color: #64748b;
}

.overview-store-trend-row-unavailable .overview-store-trend-row-change {
  color: #94a3b8;
}

.overview-store-trend-unavailable {
  padding: 14px 0 2px;
  color: var(--next-muted);
}

.overview-store-trend-loading {
  min-height: 52px;
}

.overview-store-trend-scope-status {
  display: flex;
  min-width: 0;
  gap: 8px 18px;
  align-items: baseline;
  justify-content: space-between;
  padding: 11px 14px;
  border-left: 3px solid #64748b;
  background: #f8fafc;
}

.overview-store-trend-scope-status span {
  color: var(--next-muted);
  font-size: 12px;
}

.overview-store-trend-scope-status-declining {
  border-color: #e11d48;
  background: #fff7f8;
}

.overview-store-trend-scope-status-growing {
  border-color: #16a34a;
  background: #f5fcf7;
}

.overview-analytics-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
}

.overview-analytics-head span,
.overview-analytics-metrics span {
  display: block;
  color: var(--next-muted);
  font-size: 13px;
}

.overview-analytics-head h2 {
  margin: 4px 0 0;
  font-size: 30px;
  line-height: 1.08;
}

.overview-analytics-head small {
  max-width: 260px;
  color: var(--next-muted);
  text-align: right;
}

.overview-revenue-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  gap: 18px;
  align-items: start;
}

.overview-revenue-card-title small {
  display: block;
  margin-top: 5px;
  color: var(--next-muted);
  font-size: 12px;
  text-align: left;
}

.overview-data-freshness {
  font-variant-numeric: tabular-nums;
}

.overview-executive-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 13px 0;
  border-top: 1px solid var(--next-line);
  border-bottom: 1px solid var(--next-line);
}

.overview-executive-metric {
  min-width: 0;
  padding: 0 14px;
}

.overview-executive-metric:first-child {
  padding-left: 0;
}

.overview-executive-metric + .overview-executive-metric {
  border-left: 1px solid var(--next-line);
}

.overview-executive-metric dt,
.overview-executive-metric dd {
  margin: 0;
}

.overview-executive-metric dt,
.overview-executive-metric small {
  display: block;
  color: var(--next-muted);
  font-size: 11px;
  line-height: 1.25;
}

.overview-executive-metric dd {
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: var(--next-text);
  font-size: 18px;
  font-weight: 850;
  line-height: 1.15;
}

.overview-executive-metric small {
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.overview-executive-metric-up small {
  color: #047857;
}

.overview-executive-metric-down small {
  color: #be123c;
}

.overview-executive-insight {
  display: flex;
  gap: 10px 24px;
  align-items: baseline;
  justify-content: space-between;
  padding: 10px 12px;
  border-left: 3px solid #0f766e;
  background: #f6faf9;
}

.overview-executive-insight > div {
  min-width: 0;
}

.overview-executive-insight span,
.overview-executive-insight small {
  display: block;
  color: var(--next-muted);
  font-size: 11px;
}

.overview-executive-insight strong {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  line-height: 1.35;
}

.overview-executive-insight small {
  flex: 0 0 auto;
  text-align: right;
}

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

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

.overview-chart-segmented {
  display: inline-grid;
  grid-auto-columns: minmax(112px, 1fr);
  grid-auto-flow: column;
  padding: 3px;
  border: 1px solid #dbe3ed;
  border-radius: 8px;
  background: #f8fafc;
}

.overview-chart-segmented-button {
  min-height: 34px;
  padding: 7px 13px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  transition: background .16s ease, color .16s ease, box-shadow .16s ease, opacity .16s ease;
}

.overview-chart-segmented-button:hover:not(:disabled) {
  color: #0f172a;
  background: #fff;
}

.overview-chart-segmented-button:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .2);
  outline-offset: 1px;
}

.overview-chart-segmented-button-active {
  background: #0f172a;
  color: #fff;
  box-shadow: 0 3px 8px rgba(15, 23, 42, .18);
}

.overview-chart-segmented-button-active:hover:not(:disabled) {
  background: #0f172a;
  color: #fff;
}

.overview-chart-segmented-button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.overview-chart-peak {
  display: inline-flex;
  gap: 7px;
  align-items: baseline;
  color: var(--next-muted);
  font-size: 11px;
}

.overview-chart-peak strong {
  color: var(--next-text);
  font-size: 12px;
}

.overview-compare-toolbar {
  min-width: min(100%, 280px);
  position: relative;
}

.overview-compare-toolbar > summary {
  display: inline-flex;
  min-height: 36px;
  gap: 8px;
  align-items: center;
  padding: 7px 12px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #f8fafc;
  color: #0f172a;
  cursor: pointer;
  font-weight: 800;
  list-style: none;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease;
}

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

.overview-compare-toolbar > summary:hover {
  border-color: #93c5fd;
  background: #eff6ff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, .12);
}

.overview-compare-toolbar[aria-busy="true"] > summary {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
  cursor: wait;
}

.overview-compare-toolbar > summary::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .16s ease;
}

.overview-compare-toolbar[open] > summary::after {
  transform: rotate(225deg) translate(-2px, -1px);
}

.overview-compare-toolbar > summary span {
  color: var(--next-muted);
  font-size: 13px;
}

.overview-compare-toolbar > summary strong {
  color: #0f172a;
  font-size: 13px;
}

.overview-compare-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.overview-compare-button {
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #f8fafc;
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  transition: background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.overview-compare-button:hover:not(:disabled) {
  border-color: #93c5fd;
  background: #eff6ff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, .12);
}

.overview-compare-button-active {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
  box-shadow: 0 10px 22px rgba(37, 99, 235, .18);
}

.overview-comparison-summary {
  min-width: 0;
  padding: 4px 0 4px 16px;
  border-left: 2px solid #94a3b8;
}

.overview-comparison-summary span,
.overview-comparison-summary small {
  display: block;
  color: var(--next-muted);
  font-size: 12px;
}

.overview-comparison-summary strong {
  display: block;
  margin: 2px 0;
  color: #0f172a;
  font-size: 20px;
  line-height: 1.1;
}

.overview-comparison-summary-up strong {
  color: #047857;
}

.overview-comparison-summary-up {
  border-color: #16a34a;
}

.overview-comparison-summary-down strong {
  color: #be123c;
}

.overview-comparison-summary-down {
  border-color: #e11d48;
}

.overview-comparison-summary-muted {
  border-color: #cbd5e1;
}

.overview-comparison-summary-partial {
  border-color: #f59e0b;
}

.overview-comparison-summary .overview-comparison-whole-network {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--next-line);
  color: #334155;
}

.overview-trend-chart {
  display: grid;
  gap: 10px;
  min-height: 300px;
}

.overview-company-chart-modebar {
  flex-wrap: wrap;
}

.overview-company-delta-toolbar {
  display: flex;
  justify-content: flex-end;
}

.overview-comparison-histograms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--next-line);
  border-bottom: 1px solid var(--next-line);
}

.overview-comparison-histogram {
  min-width: 0;
  padding: 18px 18px 14px 0;
}

.overview-comparison-histogram + .overview-comparison-histogram {
  padding-right: 0;
  padding-left: 18px;
  border-left: 1px solid var(--next-line);
}

.overview-delta-panel-head {
  display: flex;
  min-height: 52px;
  gap: 14px;
  align-items: start;
  justify-content: space-between;
}

.overview-delta-panel-head > div:first-child {
  min-width: 0;
}

.overview-delta-panel-head span {
  display: block;
  color: var(--next-muted);
  font-size: 11px;
  font-weight: 750;
}

.overview-delta-panel-head h3 {
  margin: 3px 0 0;
  color: var(--next-text);
  font-size: 17px;
  line-height: 1.2;
}

.overview-delta-total {
  flex: 0 0 auto;
  text-align: right;
}

.overview-delta-total strong,
.overview-delta-total small {
  display: block;
}

.overview-delta-total strong {
  color: var(--next-text);
  font-size: 18px;
  line-height: 1.15;
}

.overview-delta-total small {
  margin-top: 3px;
  color: var(--next-muted);
  font-size: 11px;
}

.overview-delta-total-positive strong {
  color: #047857;
}

.overview-delta-total-negative strong {
  color: #be123c;
}

.overview-delta-chart-plot {
  min-height: 274px;
}

.overview-delta-histogram {
  display: block;
  width: 100%;
  height: 272px;
}

.overview-delta-zero-line {
  stroke: #334155;
  stroke-width: 2.2;
}

.overview-delta-bar {
  stroke: rgba(255, 255, 255, .72);
  stroke-width: 1;
  transition: filter .16s ease, opacity .16s ease, stroke-width .16s ease;
}

.overview-delta-bar-neutral {
  fill: #94a3b8;
}

.overview-delta-point:hover .overview-delta-bar,
.overview-delta-point:focus-visible .overview-delta-bar,
.overview-delta-point.overview-chart-point-active .overview-delta-bar {
  filter: saturate(1.15) drop-shadow(0 3px 4px rgba(15, 23, 42, .18));
  stroke-width: 1.6;
}

.overview-delta-bar-partial {
  stroke: #b45309;
  stroke-width: 1.5;
  opacity: .82;
  vector-effect: non-scaling-stroke;
}

.overview-delta-unavailable {
  fill: #cbd5e1;
  stroke: #94a3b8;
  stroke-width: 1;
  rx: 2;
}

.overview-delta-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 14px;
  justify-content: center;
  color: var(--next-muted);
  font-size: 11px;
  font-weight: 750;
}

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

.overview-delta-key {
  display: inline-block;
  width: 18px;
  height: 8px;
  border-radius: 2px;
}

.overview-delta-key-positive {
  background: linear-gradient(90deg, #86efac, #047857);
}

.overview-delta-key-negative {
  background: linear-gradient(90deg, #fecdd3, #be123c);
}

.overview-delta-key-partial {
  border: 1px solid #b45309;
  background: #fef3c7;
}

.overview-delta-note {
  margin: 7px 0 0;
  color: var(--next-muted);
  font-size: 11px;
  text-align: center;
}

.overview-delta-empty {
  display: grid;
  min-height: 210px;
  align-content: center;
  gap: 5px;
  padding: 18px;
  color: var(--next-muted);
  text-align: center;
}

.overview-delta-empty strong {
  color: var(--next-text);
  font-size: 15px;
}

.overview-delta-empty span {
  font-size: 13px;
  line-height: 1.45;
}

.overview-revenue-chart > .overview-chart-segmented {
  justify-self: start;
}

.overview-chart-plot {
  position: relative;
  min-height: 290px;
}

.overview-trend-chart svg {
  width: 100%;
  height: 290px;
  display: block;
}

.overview-trend-chart .overview-delta-histogram {
  height: 272px;
}

.overview-chart-plot.overview-delta-chart-plot {
  min-height: 274px;
}

.overview-revenue-chart-stores svg {
  height: 310px;
}

.overview-chart-axis,
.overview-chart-grid {
  stroke: #e2e8f0;
  stroke-width: 1.5;
}

.overview-chart-grid {
  stroke-dasharray: 4 6;
}

.overview-chart-zero-line {
  stroke: #64748b;
  stroke-width: 1.8;
  pointer-events: none;
}

.overview-chart-x-tick {
  stroke: #cbd5e1;
  stroke-width: 1.2;
}

.overview-chart-y-label,
.overview-chart-x-label {
  fill: #64748b;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  pointer-events: none;
}

.overview-chart-y-label {
  fill: #475569;
}

.overview-chart-x-tick-group-hidden {
  display: none;
}

.overview-revenue-total-bar {
  fill: #15803d;
}

.overview-revenue-total-bar-negative {
  fill: #be123c;
}

.overview-store-series-line,
.overview-store-series-comparison,
.overview-store-series-label-leader {
  fill: none;
  vector-effect: non-scaling-stroke;
}

.overview-store-series-line {
  stroke: var(--series-color, #15803d);
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
  cursor: pointer;
  pointer-events: stroke;
  transition: opacity .16s ease, stroke-width .16s ease, filter .16s ease;
}

.overview-store-series-line[data-selected="true"] {
  stroke-width: 3.8;
  filter: drop-shadow(0 2px 3px rgba(15, 23, 42, .18));
}

.overview-store-series-line:focus-visible,
.overview-store-series-line.overview-store-series-hover-active {
  stroke-width: 4;
  filter: drop-shadow(0 2px 4px rgba(15, 23, 42, .22));
  outline: none;
}

.overview-store-series-line-muted,
.overview-store-series-dot-muted,
.overview-store-series-hover-muted {
  opacity: .18;
}

.overview-store-series-legend-item-muted {
  color: #475569;
}

.overview-store-series-legend-item-muted .overview-store-series-swatch {
  opacity: .45;
}

.overview-store-series-comparison {
  stroke: var(--series-color, #64748b);
  stroke-width: 2.2;
  stroke-dasharray: 6 6;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .55;
  pointer-events: none;
}

.overview-store-series-history-dot {
  fill: #fff;
  stroke: var(--series-color, #64748b);
  stroke-width: 1.8;
  vector-effect: non-scaling-stroke;
  opacity: .72;
  pointer-events: none;
}

.overview-store-series-history-dot-partial {
  fill: #fffbeb;
  stroke-width: 2.4;
  opacity: 1;
}

.overview-store-series-dot {
  fill: var(--series-color, #15803d);
  stroke: #fff;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  opacity: .35;
  pointer-events: none;
  transition: opacity .16s ease;
}

.overview-store-series-dot-partial {
  fill: #fff;
  stroke: var(--series-color, #15803d);
  stroke-width: 2.4;
  opacity: 1;
}

.overview-store-series-label-leader {
  stroke: var(--series-color, #15803d);
  stroke-width: 1;
  opacity: .62;
  pointer-events: none;
}

.overview-store-series-label {
  fill: var(--series-color, #15803d);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  pointer-events: none;
}

.overview-store-series-hover-active {
  opacity: 1;
}

.overview-store-series-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px 18px;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}

.overview-store-series-legend-scroll {
  max-height: 320px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.overview-store-series-legend-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  min-width: 0;
  min-height: 40px;
  padding: 7px 4px;
  border: 0;
  border-bottom: 1px solid #eef2f7;
  background: transparent;
  color: #334155;
  text-align: left;
  transition: background .16s ease, opacity .16s ease;
}

.overview-store-series-legend-item:hover,
.overview-store-series-legend-item:focus-visible,
.overview-store-series-legend-item[data-selected="true"] {
  background: #f1f5f9;
  outline: none;
}

.overview-store-series-legend-item[data-selected="true"] {
  color: #0f172a;
  box-shadow: inset 3px 0 var(--series-color, #15803d);
}

.overview-store-series-legend-item > span:nth-child(2) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-store-series-legend-item strong {
  color: #0f172a;
  font-size: 12px;
  white-space: nowrap;
}

.overview-store-series-swatch {
  width: 24px;
  height: 3px;
  border-radius: 2px;
  background: var(--series-color, #15803d);
}

.overview-store-chart-focus {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 7px 4px;
  border-bottom: 1px solid #e2e8f0;
}

.overview-store-chart-focus > span:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.overview-store-chart-focus small {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.overview-store-chart-focus strong {
  overflow: hidden;
  color: #0f172a;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-store-chart-focus b {
  color: #0f172a;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (max-width: 420px) {
  .overview-store-chart-focus {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .overview-store-chart-focus b {
    grid-column: 2;
    white-space: normal;
  }
}

.overview-store-series-caption {
  gap: 12px;
  align-items: center;
}

.overview-store-series-caption button {
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #0f172a;
  font-size: 12px;
  font-weight: 800;
}

.overview-store-series-caption button:hover,
.overview-store-series-caption button:focus-visible {
  border-color: #94a3b8;
  background: #f8fafc;
  outline: none;
}

.overview-chart-compare-line {
  fill: none;
  stroke: #2563eb;
  stroke-width: 2.6;
  stroke-dasharray: 7 7;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .82;
  pointer-events: none;
}

.overview-chart-compare-dot {
  fill: #2563eb;
  stroke: #fff;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.overview-chart-selected-line {
  stroke: #64748b;
  stroke-dasharray: 5 6;
  stroke-width: 1.5;
}

.overview-chart-point {
  cursor: pointer;
  outline: none;
}

.overview-chart-hit {
  fill: transparent;
  pointer-events: all;
}

.overview-revenue-chart-stores .overview-chart-point:focus-visible .overview-chart-hit,
.overview-revenue-chart-stores .overview-chart-point-active .overview-chart-hit {
  fill: rgba(37, 99, 235, .08);
  stroke: #2563eb;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.overview-revenue-bar {
  fill: var(--segment-color, #93c5fd);
  stroke: rgba(255, 255, 255, .88);
  stroke-width: 0;
  transition: opacity .16s ease, stroke-width .16s ease;
}

.overview-revenue-empty-bar {
  fill: #dbe3ed;
  stroke: #b8c4d2;
  stroke-width: 1;
  rx: 2;
  opacity: .72;
  transition: opacity .16s ease, fill .16s ease;
}

.overview-chart-point-best .overview-revenue-bar {
  stroke-width: 1.4;
}

.overview-chart-point-active .overview-revenue-empty-bar,
.overview-chart-point:hover .overview-revenue-empty-bar,
.overview-chart-point:focus-visible .overview-revenue-empty-bar {
  fill: #cbd5e1;
  opacity: 1;
}

.overview-chart-point-active .overview-revenue-bar {
  stroke-width: 1.6;
  opacity: 1;
}

.overview-chart-point:hover .overview-revenue-bar,
.overview-chart-point:focus-visible .overview-revenue-bar {
  opacity: .9;
  stroke-width: 1.5;
}

.overview-revenue-segment-muted {
  opacity: .22;
}

.overview-revenue-segment-negative {
  stroke: #991b1b;
  stroke-width: 1.2;
  opacity: .84;
}

.overview-revenue-segment-hover-muted {
  opacity: .14;
}

.overview-revenue-segment-hover-active {
  opacity: 1;
  stroke-width: 2;
  filter: drop-shadow(0 3px 5px rgba(15, 23, 42, .18));
}

.overview-chart-tooltip {
  position: absolute;
  left: clamp(136px, var(--tooltip-x), calc(100% - 136px));
  top: clamp(130px, var(--tooltip-y), calc(100% - 24px));
  z-index: 2;
  width: min(280px, calc(100% - 24px));
  padding: 12px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 16px 36px rgba(15, 23, 42, .16);
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 12px));
}

.overview-chart-tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 12px;
  height: 12px;
  border-right: 1px solid #bfdbfe;
  border-bottom: 1px solid #bfdbfe;
  background: #fff;
  transform: translateX(-50%) rotate(45deg);
}

.overview-chart-tooltip-head {
  display: flex;
  gap: 8px;
  align-items: baseline;
  justify-content: space-between;
}

.overview-chart-tooltip-head span,
.overview-chart-tooltip-meta,
.overview-store-detail span {
  color: var(--next-muted);
  font-size: 12px;
}

.overview-chart-tooltip-head strong,
.overview-store-detail strong {
  color: var(--next-text);
  font-size: 13px;
}

.overview-chart-tooltip-value {
  margin-top: 4px;
  color: var(--next-text);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.08;
}

.overview-chart-tooltip-comparison {
  display: grid;
  gap: 3px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px dashed #bfdbfe;
}

.overview-chart-tooltip-comparison div {
  display: flex;
  gap: 10px;
  align-items: baseline;
  justify-content: space-between;
}

.overview-chart-tooltip-comparison span,
.overview-chart-tooltip-comparison small {
  color: var(--next-muted);
  font-size: 12px;
}

.overview-chart-tooltip-comparison strong {
  color: var(--next-text);
  font-size: 13px;
}

.overview-chart-tooltip-stores {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #dbeafe;
}

.overview-chart-tooltip-stores-all {
  max-height: 240px;
  overflow: auto;
  overscroll-behavior: contain;
}

.overview-chart-tooltip-store-active {
  padding: 5px 6px;
  border-radius: 5px;
  background: #ecfdf5;
}

.overview-chart-tooltip-stores div {
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.overview-chart-tooltip-stores span {
  min-width: 0;
  overflow: hidden;
  color: var(--next-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-chart-tooltip-stores strong {
  flex: 0 0 auto;
  font-size: 12px;
}

.overview-chart-scale {
  display: flex;
  justify-content: center;
  color: var(--next-muted);
  font-size: 12px;
  text-align: center;
}

.overview-chart-scale span {
  color: var(--next-text);
  font-weight: 800;
}

.overview-company-chart-legend {
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: center;
}

.overview-company-chart-legend > span {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  font-weight: 750;
}

.overview-company-chart-key {
  position: relative;
  display: inline-block;
  flex: 0 0 28px;
  width: 28px;
  height: 12px;
}

.overview-company-chart-key-bars::before {
  position: absolute;
  inset: 0 9px;
  border-radius: 1px 1px 0 0;
  background: #93c5fd;
  content: "";
}

.overview-company-chart-key-comparison::before {
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  border-top: 2px dashed #2563eb;
  content: "";
  transform: translateY(-50%);
}

.overview-revenue-bar.overview-revenue-total-bar {
  fill: #93c5fd;
}

.overview-revenue-bar.overview-revenue-total-bar-negative {
  fill: #be123c;
}

.overview-revenue-bar.overview-revenue-total-bar-partial {
  stroke: #b45309;
  stroke-width: 1.5;
  fill-opacity: .78;
  vector-effect: non-scaling-stroke;
}

.overview-company-chart-key-partial::before {
  position: absolute;
  inset: 0 7px;
  border: 1px solid #b45309;
  background: rgb(147 197 253 / 78%);
  content: "";
}

.overview-chart-empty {
  display: grid;
  min-height: 180px;
  place-items: center;
  padding: 18px;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  background: #f8fafc;
  color: var(--next-muted);
  text-align: center;
}

.overview-donut-layout {
  display: grid;
  gap: 16px;
}

.overview-donut-stage {
  position: relative;
  width: min(100%, 260px);
  margin: 0 auto;
  aspect-ratio: 1;
}

.overview-donut-chart {
  width: 100%;
  height: 100%;
  display: block;
}

.overview-donut-slice {
  cursor: pointer;
  stroke: #fff;
  stroke-width: 2;
  transition: opacity .16s ease, stroke-width .16s ease, filter .16s ease;
}

.overview-donut-slice:hover,
.overview-donut-slice:focus-visible {
  opacity: .82;
  outline: none;
  stroke-width: 4;
}

.overview-donut-slice-active {
  opacity: .96;
  stroke: #dbeafe;
  stroke-width: 5;
  filter: drop-shadow(0 3px 8px rgba(15, 23, 42, .14));
}

.overview-donut-center {
  position: absolute;
  inset: 25%;
  display: grid;
  place-content: center;
  gap: 2px;
  min-width: 0;
  pointer-events: none;
  text-align: center;
}

.overview-donut-center span,
.overview-donut-center small {
  display: block;
  color: var(--next-muted);
  font-size: 11px;
  line-height: 1.2;
}

.overview-donut-center strong {
  display: block;
  max-width: 100%;
  color: var(--next-text);
  font-size: 17px;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
  white-space: normal;
}

.overview-store-signed-breakdown {
  display: grid;
  gap: 14px;
}

.overview-store-signed-notice {
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  background: #fff7ed;
  color: #7c2d12;
}

.overview-store-signed-notice strong {
  font-size: 13px;
}

.overview-store-signed-notice span {
  color: #9a3412;
  font-size: 12px;
  line-height: 1.4;
}

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

.overview-store-signed-row {
  display: grid;
  gap: 7px;
  width: 100%;
  min-width: 0;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  color: var(--next-text);
  text-align: left;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.overview-store-signed-row:hover,
.overview-store-signed-row:focus-visible,
.overview-store-signed-row.overview-store-hover-active {
  border-color: #93c5fd;
  background: #f8fafc;
  box-shadow: 0 7px 18px rgba(15, 23, 42, .07);
  outline: none;
}

.overview-store-signed-row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.overview-store-signed-row-head strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.overview-store-signed-row-head b {
  flex: 0 0 auto;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.overview-store-signed-row-negative .overview-store-signed-row-head b {
  color: #be123c;
}

.overview-store-signed-row-positive .overview-store-signed-row-head b {
  color: #047857;
}

.overview-store-signed-track {
  position: relative;
  display: block;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2f7;
}

.overview-store-signed-track::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 50%;
  width: 1px;
  background: #94a3b8;
}

.overview-store-signed-track i {
  position: absolute;
  top: 1px;
  bottom: 1px;
  width: var(--overview-signed-width);
  max-width: 50%;
  border-radius: 999px;
  background: #15803d;
}

.overview-store-signed-row-positive .overview-store-signed-track i,
.overview-store-signed-row-zero .overview-store-signed-track i {
  left: 50%;
}

.overview-store-signed-row-negative .overview-store-signed-track i {
  right: 50%;
  background: #e11d48;
}

.overview-store-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.overview-store-legend-row {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  text-align: left;
}

.overview-store-legend-row:hover,
.overview-store-legend-row:focus-visible,
.overview-store-legend-row-active,
.overview-store-hover-active {
  border-color: #bfdbfe;
  background: #eff6ff;
  outline: none;
}

.overview-store-hover-active {
  box-shadow: inset 0 0 0 1px #bfdbfe;
}

.overview-store-swatch {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--share-color);
}

.overview-store-legend-main {
  min-width: 0;
}

.overview-store-legend-main strong,
.overview-store-legend-main small {
  display: block;
  overflow-wrap: anywhere;
}

.overview-store-legend-main strong {
  font-size: 13px;
}

.overview-store-legend-main small {
  color: var(--next-muted);
  font-size: 12px;
}

.overview-store-legend-share {
  font-size: 13px;
  font-weight: 800;
}

.overview-store-detail {
  display: grid;
  gap: 2px;
  padding: 10px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #eff6ff;
}

.overview-store-detail small {
  display: block;
  margin-top: 4px;
  color: var(--next-muted);
}

.overview-store-benchmark {
  display: grid;
  gap: 16px;
}

.overview-store-benchmark-unavailable {
  display: grid;
  gap: 5px;
  padding: 16px;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  background: #fff7ed;
  color: #7c2d12;
}

.overview-store-benchmark-unavailable strong {
  font-size: 15px;
}

.overview-store-benchmark-unavailable span {
  color: #9a3412;
  font-size: 13px;
  line-height: 1.45;
}

.overview-data-coverage-warning {
  display: flex;
  align-items: baseline;
  gap: 8px 12px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  background: #fff7ed;
  color: #7c2d12;
  font-size: 12px;
  line-height: 1.4;
}

.overview-data-coverage-warning strong {
  flex: 0 0 auto;
}

.overview-data-coverage-warning span {
  color: #9a3412;
}

.overview-store-benchmark-rank {
  display: grid;
  gap: 4px;
  padding: 18px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: #eff6ff;
}

.overview-store-benchmark-rank span,
.overview-store-benchmark-rank small,
.overview-store-benchmark-metrics span,
.overview-store-benchmark-metrics small {
  color: var(--next-muted);
  font-size: 12px;
}

.overview-store-benchmark-rank strong {
  color: var(--next-text);
  font-size: 30px;
  line-height: 1.05;
}

.overview-store-benchmark-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.overview-store-benchmark-metrics > div {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.overview-store-benchmark-metrics strong {
  overflow-wrap: anywhere;
  font-size: 20px;
  line-height: 1.1;
}

.overview-store-share-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.overview-store-share-track span {
  display: block;
  width: var(--overview-store-share);
  height: 100%;
  border-radius: inherit;
  background: #15803d;
}

.overview-panel,
.overview-history-card {
  overflow: hidden;
  border: 1px solid var(--next-line);
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .04);
}

.overview-panel .card-header,
.overview-history-card .card-header {
  padding: 16px 18px;
  border-bottom-color: var(--next-line);
}

.overview-panel .list-group-item {
  padding: 16px 18px;
  border-color: var(--next-line);
}

.overview-actions-panel {
  border-left: 4px solid #f59e0b;
}

.overview-actions-panel .list-group-item > .d-flex > div {
  min-width: 0;
  flex: 1;
}

.overview-actions-panel .btn {
  min-height: 42px;
}

@media (min-width: 760px) {
  .overview-actions-panel .list-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    align-items: stretch;
  }

  .overview-actions-panel .list-group-item > .d-flex {
    height: 100%;
  }
}

@container overview-revenue (max-width: 760px) {
  .overview-comparison-histograms {
    grid-template-columns: 1fr;
  }

  .overview-comparison-histogram,
  .overview-comparison-histogram + .overview-comparison-histogram {
    padding: 16px 0;
    border-left: 0;
  }

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

  .overview-executive-insight {
    display: grid;
    gap: 5px;
  }

  .overview-executive-insight small {
    text-align: left;
  }
}

@container overview-revenue (max-width: 680px) {
  .overview-revenue-card-head {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .overview-chart-toolbar,
  .overview-chart-modebar {
    display: grid;
  }

  .overview-company-delta-toolbar,
  .overview-company-delta-toolbar .overview-chart-segmented,
  .overview-chart-segmented {
    width: 100%;
  }
}

@container overview-store-summary (max-width: 520px) {
  .overview-donut-stage {
    width: min(100%, 220px);
  }

  .overview-store-legend,
  .overview-store-benchmark-metrics {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1240px) {
  .overview-analytics {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 840px) {
  .overview-period-toolbar {
    grid-template-columns: 1fr;
  }
}

.status-dot {
  width: 10px;
  height: 10px;
  display: inline-block;
  border-radius: 999px;
  margin-right: 8px;
}

.status-ok { background: #22c55e; }
.status-warning { background: #f59e0b; }
.status-error { background: #ef4444; }
.status-empty { background: #94a3b8; }

.table {
  margin: 0;
}

#salesTable {
  max-height: 560px;
  overflow: auto;
}

#shiftsTable {
  max-height: 560px;
  overflow: auto;
}

.mobile-table-footer {
  display: none;
}

[data-mobile-table-expanded] {
  display: none;
}

#salesTable thead th,
#shiftsTable thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff;
}

.table th {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--next-muted);
  white-space: nowrap;
}

.table td {
  vertical-align: middle;
}

.text-clip {
  max-width: 340px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-block {
  padding: 28px;
  color: var(--next-muted);
  text-align: center;
}

.ui-loading-surface {
  position: relative;
  pointer-events: none;
}

.ui-loading-surface > * {
  opacity: .42;
  transition: opacity 140ms ease;
}

.ui-loading-surface::after {
  position: absolute;
  z-index: 21;
  top: 16px;
  left: 50%;
  max-width: calc(100% - 32px);
  padding: 8px 12px;
  border: 1px solid rgba(13, 110, 253, .22);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 4px 18px rgba(15, 23, 42, .1);
  color: var(--next-muted);
  content: attr(data-loading-label);
  font-size: .875rem;
  line-height: 1.25;
  text-align: center;
  transform: translateX(-50%);
}

.ui-loading-surface:not([data-loading-label])::after {
  display: none;
}

.shift-queue {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 10px;
  padding: 14px;
}

.shift-priority-card {
  border-color: #bbf7d0;
}

.shift-workflow-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.shift-workflow-tab {
  display: grid;
  min-width: 0;
  min-height: 64px;
  gap: 3px;
  padding: 11px 14px;
  border: 1px solid #d7dee8;
  border-radius: 8px;
  background: #fff;
  color: #475569;
  text-align: left;
}

.shift-workflow-tab strong,
.shift-workflow-tab span {
  overflow-wrap: anywhere;
}

.shift-workflow-tab strong {
  color: #172033;
  font-size: 15px;
}

.shift-workflow-tab span {
  color: #64748b;
  font-size: 12px;
  line-height: 1.3;
}

.shift-workflow-tab:hover {
  border-color: #86b99a;
  background: #f8fcf9;
}

.shift-workflow-tab.active {
  border-color: #4ba66c;
  background: #ecfdf3;
  box-shadow: inset 3px 0 0 #15803d;
}

.shift-workflow-tab.active strong {
  color: #166534;
}

.shift-workflow-tab:focus-visible {
  outline: 3px solid rgba(22, 101, 52, .22);
  outline-offset: 2px;
}

.shift-schedule-view-controls {
  display: grid;
  max-width: 720px;
  gap: 6px;
}

.shift-schedule-view-label {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.shift-view-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  max-width: 720px;
  padding: 5px;
  border: 1px solid #d7dee8;
  border-radius: 8px;
  background: #f4f6f8;
}

.shift-view-tab {
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #475569;
  font-weight: 800;
  line-height: 1.2;
}

.shift-view-tab:hover {
  background: #fff;
  color: #172033;
}

.shift-view-tab.active {
  border-color: #b8dec7;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .08);
  color: #166534;
}

.shift-view-tab:focus-visible {
  outline: 3px solid rgba(22, 101, 52, .22);
  outline-offset: 2px;
}

.shift-filter-card {
  overflow: hidden;
}

.shift-period-toolbar {
  display: grid;
  grid-template-columns: minmax(190px, .32fr) minmax(0, 1fr);
  gap: 16px;
  align-items: end;
  padding: 14px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background: #f8fafc;
}

.shift-period-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.shift-period-stepper {
  display: flex;
  gap: 8px;
  align-items: center;
}

.shift-period-stepper .btn {
  min-width: 44px;
  min-height: 42px;
  border-radius: 14px;
  font-size: 22px;
  line-height: 1;
}

.shift-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(250px, 1.18fr);
  gap: 14px;
  align-items: end;
}

.shift-filter-grid.is-detailed {
  grid-template-columns: minmax(280px, 520px);
}

.shift-filter-grid.is-attention {
  grid-template-columns: minmax(280px, 520px);
}

.shift-filter-grid.is-history {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.shift-range-hidden-fields {
  display: none;
}

.shift-gantt-card {
  overflow: hidden;
  border-color: #bfdbfe;
}

.shift-gantt-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 14px;
  color: var(--next-muted);
  font-size: 12px;
  font-weight: 800;
}

.shift-gantt-legend span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  white-space: nowrap;
}

.shift-gantt-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.shift-gantt-legend-dot.is-filled {
  background: #bbf7d0;
  border-color: #86efac;
}

.shift-gantt-legend-dot.is-planned {
  background: #dbeafe;
  border-color: #93c5fd;
}

.shift-gantt-legend-dot.is-missing {
  background: #fee2e2;
  border-color: #fca5a5;
}

.shift-gantt-legend-dot.is-empty {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.shift-gantt-legend-dot.is-closed {
  background: #e2e8f0;
  border-color: #94a3b8;
}

.shift-gantt {
  background: #fff;
}

.schedule-calendar {
  padding: 18px;
}

.schedule-calendar-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.schedule-calendar-head > div {
  min-width: 0;
  text-align: center;
}

.schedule-calendar-head strong,
.schedule-calendar-head small {
  display: block;
}

.schedule-calendar-head strong {
  overflow: hidden;
  color: #172033;
  font-size: 20px;
  text-overflow: ellipsis;
  text-transform: capitalize;
  white-space: nowrap;
}

.schedule-calendar-head small {
  margin-top: 2px;
  color: #64748b;
  font-size: 12px;
}

.schedule-calendar-nav {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #d7dee8;
  border-radius: 8px;
  background: #fff;
  color: #172033;
  font-size: 26px;
  line-height: 1;
}

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

.schedule-calendar-weekdays {
  margin-bottom: 6px;
}

.schedule-calendar-weekdays span {
  padding: 5px;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.schedule-calendar-day,
.schedule-calendar-spacer {
  min-width: 0;
  min-height: 104px;
}

.schedule-calendar-day {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
  padding: 9px;
  border: 1px solid #dfe5ec;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  text-align: left;
}

.schedule-calendar-day:hover {
  border-color: #94a3b8;
  background: #fff;
}

.schedule-calendar-day:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .28);
  outline-offset: 1px;
}

.schedule-calendar-day.is-selected {
  border-color: #166534;
  box-shadow: inset 0 0 0 2px #166534;
}

.schedule-calendar-day.is-counted {
  border-color: #9ed7b4;
  background: #edf9f1;
  color: #166534;
}

.schedule-calendar-day.is-planned {
  border-color: #a9c8ee;
  background: #eff6ff;
  color: #1d4ed8;
}

.schedule-calendar-day.is-missing {
  border-color: #f3b7bd;
  background: #fff3f4;
  color: #9f1239;
}

.schedule-calendar-day.is-review {
  border-color: #f3cf81;
  background: #fffbeb;
  color: #92400e;
}

.schedule-calendar-day.is-excluded {
  background: #f1f5f9;
  color: #64748b;
}

.schedule-calendar-day.is-closed,
.schedule-calendar-day.is-inactive {
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #94a3b8;
}

.schedule-calendar-day:disabled {
  cursor: default;
}

.schedule-calendar-day-top {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  align-items: center;
}

.schedule-calendar-day time {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-weight: 900;
}

.schedule-calendar-day.is-today time {
  background: #172033;
  color: #fff;
}

.schedule-calendar-count {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 12px;
  background: #475569;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.schedule-calendar-day.is-counted .schedule-calendar-count {
  background: #168348;
}

.schedule-calendar-day.is-planned .schedule-calendar-count {
  background: #2563eb;
}

.schedule-calendar-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
}

.schedule-calendar-day.is-missing .schedule-calendar-dot {
  background: #e11d48;
}

.schedule-calendar-day-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.schedule-calendar-day-copy strong,
.schedule-calendar-day-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
}

.schedule-calendar-day-copy strong {
  display: -webkit-box;
  font-size: 12px;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.schedule-calendar-day-copy small {
  color: #64748b;
  font-size: 11px;
  white-space: nowrap;
}

.schedule-day-detail {
  border-top: 1px solid #dfe5ec;
  background: #fff;
}

.schedule-day-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
}

.schedule-day-detail-head span,
.schedule-day-detail-head h3 {
  display: block;
  margin: 0;
}

.schedule-day-detail-head span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.schedule-day-detail-head h3 {
  margin-top: 2px;
  color: #172033;
  font-size: 20px;
}

.schedule-day-rows {
  display: grid;
  gap: 1px;
  border-top: 1px solid #edf0f4;
  background: #edf0f4;
}

.schedule-day-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  min-width: 0;
  padding: 13px 18px;
  background: #fff;
}

.schedule-day-row > div:first-child {
  min-width: 0;
}

.schedule-day-row strong,
.schedule-day-row small {
  display: block;
}

.schedule-day-row strong {
  overflow-wrap: anywhere;
  color: #172033;
}

.schedule-day-row small {
  margin-top: 2px;
  color: #64748b;
}

.schedule-day-empty,
.schedule-day-note {
  display: grid;
  gap: 3px;
  padding: 14px 18px 18px;
  color: #64748b;
}

.schedule-day-empty strong {
  color: #334155;
}

.schedule-day-note {
  border-top: 1px solid #edf0f4;
  background: #f8fafc;
  font-size: 13px;
}

.schedule-calendar-empty {
  padding: 32px 18px;
  color: #64748b;
  text-align: center;
}

.seller-schedule-calendar-card {
  overflow: hidden;
  border-color: #cbd5e1;
}

.seller-schedule-calendar-head {
  padding: 16px 18px;
}

.shift-store-readiness-list {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid var(--next-line);
  background: #f8fafc;
}

.shift-store-readiness-card {
  overflow: hidden;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.shift-store-readiness-card > button {
  display: grid;
  width: 100%;
  gap: 11px;
  padding: 14px;
  border: 0;
  background: transparent;
  color: #172033;
  text-align: left;
}

.shift-store-readiness-card > button:hover {
  background: #f8fafc;
}

.shift-store-readiness-card > button:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .3);
  outline-offset: -3px;
}

.shift-store-readiness-card.is-missing {
  border-color: #fecdd3;
}

.shift-store-readiness-card.is-review {
  border-color: #f3cf81;
}

.shift-store-readiness-card.is-ready {
  border-color: #bbdfc8;
}

.shift-store-readiness-head {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.shift-store-readiness-head > span:first-child {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.shift-store-readiness-head strong {
  overflow-wrap: anywhere;
  font-size: 15px;
}

.shift-store-readiness-head small {
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}

.shift-store-readiness-status {
  flex: 0 0 auto;
  max-width: 118px;
  padding: 5px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}

.shift-store-readiness-card.is-missing .shift-store-readiness-status {
  background: #fff1f2;
  color: #be123c;
}

.shift-store-readiness-card.is-review .shift-store-readiness-status {
  background: #fffbeb;
  color: #92400e;
}

.shift-store-readiness-card.is-ready .shift-store-readiness-status {
  background: #ecfdf3;
  color: #166534;
}

.shift-store-readiness-progress {
  display: flex;
  width: 100%;
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: #e2e8f0;
}

.shift-store-readiness-progress i {
  display: block;
  height: 100%;
}

.shift-store-readiness-progress .is-filled {
  background: #22c55e;
}

.shift-store-readiness-progress .is-planned {
  background: #3b82f6;
}

.shift-store-readiness-progress .is-review {
  background: #f59e0b;
}

.shift-store-readiness-progress .is-missing {
  background: #fb7185;
}

.shift-store-readiness-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(62px, 1fr));
  gap: 8px;
}

.shift-store-readiness-metrics > span {
  display: grid;
  min-width: 0;
  gap: 1px;
  padding: 7px 8px;
  border-radius: 6px;
  background: #f8fafc;
}

.shift-store-readiness-metrics strong {
  font-size: 16px;
  line-height: 1.1;
}

.shift-store-readiness-metrics small {
  overflow: hidden;
  color: #64748b;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shift-store-readiness-metrics .is-missing strong {
  color: #be123c;
}

.shift-store-readiness-metrics .is-review strong {
  color: #b45309;
}

.shift-store-readiness-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid #edf0f4;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 800;
}

.shift-store-readiness-action > span:last-child {
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
}

.shift-gantt-scroll {
  max-height: 640px;
  overflow: auto;
  border-top: 1px solid var(--next-line);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .98), rgba(255, 255, 255, 0)) 0 0 / 28px 100% no-repeat,
    #fff;
}

.shift-gantt-grid {
  display: grid;
  grid-template-columns: var(--shift-gantt-template);
  min-width: max-content;
}

.shift-gantt-more {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-top: 1px solid var(--next-line);
  color: var(--next-muted);
  font-size: 13px;
}

.shift-gantt-corner,
.shift-gantt-date,
.shift-gantt-store {
  border-right: 1px solid var(--next-line);
  border-bottom: 1px solid var(--next-line);
  background: #fff;
}

.shift-gantt-corner,
.shift-gantt-date {
  position: sticky;
  top: 0;
  z-index: 4;
  min-height: 62px;
  padding: 10px 8px;
  text-align: center;
}

.shift-gantt-corner {
  left: 0;
  z-index: 6;
  text-align: left;
}

.shift-gantt-corner strong,
.shift-gantt-corner small,
.shift-gantt-date strong,
.shift-gantt-date small,
.shift-gantt-store strong,
.shift-gantt-store small {
  display: block;
}

.shift-gantt-corner small,
.shift-gantt-date small,
.shift-gantt-store small {
  color: var(--next-muted);
  font-size: 11px;
}

.shift-gantt-date strong {
  font-size: 16px;
  line-height: 1.1;
}

.shift-gantt-store {
  position: sticky;
  left: 0;
  z-index: 3;
  min-height: 58px;
  padding: 10px 12px;
  background: #fff;
}

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

.shift-gantt-cell {
  display: grid;
  place-items: center;
  gap: 2px;
  min-width: 44px;
  min-height: 58px;
  padding: 6px 4px;
  border: 0;
  border-right: 1px solid #eef2f7;
  border-bottom: 1px solid #eef2f7;
  background: #f8fafc;
  color: #475569;
  font-size: 11px;
  line-height: 1;
}

.shift-gantt-cell:hover {
  box-shadow: inset 0 0 0 2px #2563eb;
}

.shift-gantt-cell:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .35);
  outline-offset: -3px;
}

.shift-gantt-cell[disabled] {
  cursor: not-allowed;
  opacity: .7;
}

.shift-gantt-cell-day,
.shift-gantt-cell-week {
  display: none;
}

.shift-gantt-cell strong,
.shift-gantt-cell i {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  font-style: normal;
  font-weight: 900;
}

.shift-gantt-cell.is-filled,
.shift-gantt-cell.is-multi {
  background: #ecfdf5;
  color: #166534;
}

.shift-gantt-cell.is-filled strong,
.shift-gantt-cell.is-multi strong {
  background: #22c55e;
  color: #fff;
}

.shift-gantt-cell.is-planned,
.shift-gantt-cell.is-planned-multi {
  background: #eff6ff;
  color: #1d4ed8;
}

.shift-gantt-cell.is-planned strong,
.shift-gantt-cell.is-planned-multi strong {
  background: #3b82f6;
  color: #fff;
}

.shift-gantt-cell.is-missing {
  background: #fff1f2;
  color: #be123c;
}

.shift-gantt-cell.is-missing i {
  background: #fb7185;
}

.shift-gantt-cell.is-review {
  background: #fffbeb;
  color: #92400e;
}

.shift-gantt-cell.is-review strong {
  background: #f59e0b;
  color: #fff;
}

.shift-gantt-cell.is-locked,
.shift-gantt-cell.is-excluded,
.shift-gantt-cell.is-closed,
.shift-gantt-cell.is-inactive {
  background: #f1f5f9;
  color: #64748b;
}

.shift-gantt-cell.is-empty {
  background: #f8fafc;
  color: #94a3b8;
}

.calculation-history-card {
  overflow: hidden;
}

.overview-history-card {
  overflow: hidden;
}

.shift-filter-summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  list-style: none;
}

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

details.shift-filter-card .shift-filter-summary {
  cursor: pointer;
}

details.shift-filter-card .shift-filter-summary::after,
.calculation-history-card .shift-filter-summary::after,
.overview-history-card .shift-filter-summary::after {
  content: "Раскрыть";
  color: #166534;
  font-size: 13px;
  font-weight: 800;
}

.shift-filter-card[open] .shift-filter-summary::after {
  content: "Скрыть";
}

.calculation-history-card[open] .shift-filter-summary::after {
  content: "Скрыть";
}

.overview-history-card[open] .shift-filter-summary::after {
  content: "Скрыть";
}

.shift-filter-summary strong,
.shift-filter-summary small {
  display: block;
}

.shift-filter-summary small {
  color: var(--next-muted);
  font-weight: 400;
}

.shift-queue-head,
.shift-queue-footer,
.shift-queue-toggle {
  grid-column: 1 / -1;
}

.shift-queue-head,
.shift-queue-footer {
  color: var(--next-muted);
  font-size: 13px;
}

.shift-queue-head strong {
  display: block;
  color: var(--next-text);
  font-size: 15px;
}

.shift-attention-groups {
  display: grid;
  grid-column: 1 / -1;
  gap: 12px;
}

.shift-attention-group {
  overflow: hidden;
  border: 1px solid var(--next-line);
  border-radius: 8px;
  background: #fff;
}

.shift-attention-group > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 13px 15px;
  cursor: pointer;
  list-style: none;
}

.shift-attention-group > summary::-webkit-details-marker {
  display: none;
}

.shift-attention-group > summary:hover {
  background: #f8fafc;
}

.shift-attention-group > summary > span:first-child {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.shift-attention-group > summary strong {
  color: var(--next-text);
  font-size: 15px;
}

.shift-attention-group > summary small {
  color: var(--next-muted);
  font-size: 12px;
}

.shift-attention-count {
  padding: 5px 9px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.shift-attention-group.is-overdue {
  border-color: #fecaca;
}

.shift-attention-group.is-overdue .shift-attention-count {
  background: #fef2f2;
  color: #b91c1c;
}

.shift-attention-group.is-today,
.shift-attention-group.is-soon {
  border-color: #fde68a;
}

.shift-attention-group.is-today .shift-attention-count,
.shift-attention-group.is-soon .shift-attention-count {
  background: #fffbeb;
  color: #92400e;
}

.shift-attention-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
  padding: 12px;
  border-top: 1px solid var(--next-line);
  background: #f8fafc;
}

.shift-queue-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--next-line);
  border-radius: 12px;
  background: #fff;
  color: inherit;
  text-align: left;
}

.shift-queue-item:hover {
  border-color: #93c5fd;
  background: #f8fbff;
}

.shift-queue-item strong,
.shift-queue-item small {
  display: block;
}

.shift-queue-item small {
  color: var(--next-muted);
}

.shift-queue-store-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 96px;
}

.shift-queue-store-card > span:first-child {
  min-width: 0;
}

.shift-queue-card-meta {
  display: grid;
  justify-items: center;
  min-width: 64px;
  padding: 8px 10px;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  background: #f0fdf4;
  color: #166534;
}

.shift-queue-card-meta strong {
  font-size: 20px;
  line-height: 1;
}

.shift-queue-card-meta small {
  color: #166534;
  font-size: 11px;
  font-weight: 800;
}

.shift-queue-store-card .btn {
  grid-column: 1 / -1;
  justify-self: start;
}

.shift-form-scroll {
  display: grid;
  gap: 14px;
  scrollbar-gutter: stable;
}

.shift-replacement-fields {
  min-width: 0;
  border: 0;
  padding: 0;
  margin: 0;
}

.shift-replacement-summary {
  display: grid;
  gap: 6px;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid #dce3ea;
  overflow-wrap: anywhere;
}

.shift-replacement-summary small { color: #526273; }
.shift-replacement-confirm {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-weight: 400;
}
.shift-replacement-confirm input { flex-shrink: 0; }
.shift-row-actions { flex-wrap: wrap; gap: 6px; }
.shift-row-actions > .btn { flex: 0 1 auto; margin: 0 !important; border-radius: 6px !important; white-space: normal; }
#shiftReplacementSeller, #shiftReplacementEmail { min-height: 44px; font-size: 16px; }

#shiftFormModal.shift-replacement-modal .modal-dialog,
#shiftFormModal.shift-day-modal .modal-dialog {
  width: calc(100% - 24px);
  max-width: 640px;
  min-height: calc(100% - 24px);
  height: auto;
  margin: 12px auto;
}
#shiftFormModal.shift-replacement-modal .modal-content,
#shiftFormModal.shift-day-modal .modal-content {
  height: auto;
  max-height: calc(100dvh - 24px);
  border-radius: 8px;
}

#shiftFormModal.shift-day-modal .modal-header > div { min-width: 0; }
#shiftFormModal.shift-day-modal .modal-title { font-size: 20px; overflow-wrap: anywhere; }
#shiftFormModal.shift-day-modal .modal-body { padding: 16px; }
#shiftFormModal.shift-day-modal .schedule-day-rows { border: 0; background: transparent; gap: 0; }
#shiftFormModal.shift-day-modal .schedule-day-row {
  flex-direction: column;
  align-items: stretch;
  padding: 16px 0;
  border-bottom: 1px solid #dfe5ec;
  gap: 12px;
}
#shiftFormModal.shift-day-modal .schedule-day-row:first-child { padding-top: 0; }
#shiftFormModal.shift-day-modal .schedule-day-row small { overflow-wrap: anywhere; font-size: 14px; }
#shiftFormModal.shift-day-modal .schedule-day-row strong { font-size: 18px; }
#shiftFormModal.shift-day-modal .shift-row-actions { display: flex; }
#shiftFormModal.shift-day-modal .shift-row-actions .btn { width: auto; min-height: 44px; font-size: 14px; }
#shiftFormModal.shift-day-modal [data-shift-calendar-add] { width: 100%; min-height: 44px; margin-top: 16px; }
#shiftFormModal.shift-day-modal .schedule-day-empty { padding: 8px 0; }
.shift-day-comment { margin: 8px 0 0; overflow-wrap: anywhere; }
.shift-day-context { margin-bottom: 16px; color: #526171; overflow-wrap: anywhere; }
.shift-day-confirm-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.shift-day-availability { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: #526171; }
#shiftFormModal.shift-day-quick-assign #shiftScheduleFields > .col-md-6 { width: 100%; }
#shiftFormModal.shift-day-quick-assign .shift-modal-calendar { padding: 0; border: 0; background: transparent; }
#shiftFormModal.shift-day-quick-assign .shift-modal-calendar:empty { display: none; }
#shiftFormModal.shift-day-modal .form-select,
#shiftFormModal.shift-day-modal .form-control { min-height: 44px; font-size: 16px; }

.shift-modal-calendar {
  container: shift-calendar / inline-size;
  padding: 12px;
  border: 1px solid var(--next-line);
  border-radius: 16px;
  background: #fbfefb;
}

#shiftModalCalendar [data-shift-modal-date] { touch-action: none; user-select: none; }
#shiftModalCalendar .is-transfer { border-color: #b7791f; background: #fff8e6; }
#shiftTransferConsent, #shiftEditConsent { padding: 12px; border-left: 3px solid #b7791f; background: #fff8e6; font-size: 14px; }

.seller-transfers-panel { margin: 0 0 12px; padding: 8px 0; border-bottom: 1px solid #dce3e8; }
.seller-transfers-panel:not([open]) .seller-transfers-heading { margin-bottom: 0; }
.seller-transfers-heading { cursor: pointer; list-style: none; }
.seller-transfers-heading::-webkit-details-marker { display: none; }
.seller-transfers-toggle { font-size: 24px; line-height: 1; }
.seller-transfers-panel[open] .seller-transfers-toggle { transform: rotate(180deg); }
.seller-transfers-panel[open] #sellerTransfersList { max-height: 400px; overflow-y: auto; overscroll-behavior: contain; }
.shift-day-pending, .shift-replacement-availability { display: grid; gap: 8px; padding: 12px; margin-bottom: 12px; border-left: 3px solid #b7791f; background: #fff8e6; overflow-wrap: anywhere; }
.shift-replacement-availability { margin: 12px 0 0; }
.shift-replacement-availability.is-free { border-color: #168244; background: #effaf3; }
.shift-day-pending small, .shift-replacement-availability small { color: #526171; }
.shift-store-pending-note { display: block; padding-top: 8px; color: #895814; font-size: 13px; }
.has-pending-transfer { box-shadow: inset 0 -4px #b7791f; }
.schedule-calendar-day.has-pending-transfer:is(.is-missing, .is-empty),
.shift-gantt-cell.has-pending-transfer:is(.is-missing, .is-empty) { background: #fff8e6; border-color: #e4bd70; color: #78480e; }
.schedule-calendar-day.has-pending-transfer:is(.is-missing, .is-empty) .schedule-calendar-dot { background: #b7791f; border-radius: 2px; }
.shift-gantt-cell.has-pending-transfer::after { content: ''; position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; border-radius: 50%; background: #b7791f; }
.shift-gantt-cell.has-pending-transfer { position: relative; }
.shift-gantt-cell.has-pending-transfer:is(.is-missing, .is-empty)::after { display: none; }
.shift-gantt-cell.has-pending-transfer:is(.is-missing, .is-empty) i { background: transparent; border: 2px solid #b7791f; border-radius: 4px; }

.shift-pending-legend { display: inline-block; width: 12px; height: 12px; border: 2px solid #b7791f; border-radius: 3px; background: #fff8e6; }
.search-select { position: relative; min-width: 0; width: 100%; }
.search-select > input { width: 100%; min-height: 44px; padding-right: 40px; font-size: 16px; }
.search-select-toggle { position: absolute; right: 0; top: 0; width: 40px; height: 44px; background: transparent; border: 0; color: #526171; font-size: 24px; }
.search-select-options { position: fixed; z-index: 1080; overflow-y: auto; overscroll-behavior: contain; border: 1px solid #cbd5df; border-radius: 6px; background: white; box-shadow: 0 6px 18px #10203024; padding: 4px; }
.search-select-option { min-height: 44px; padding: 10px; cursor: pointer; display: grid; gap: 2px; overflow-wrap: anywhere; }
.search-select-option small { color: #617180; font-size: 13px; }
.search-select-option:hover, .search-select-option.is-active { background: #eaf5ee; }
.search-select-empty { padding: 12px; color: #617180; }

#shiftsSection { display: flex; flex-direction: column; }
#shiftsSection > * { order: 4; }
#shiftsSection > .shift-workspace-intro { order: 1; }
#shiftsSection > .shift-filter-card { order: 2; }
#shiftsSection > #sellerTransfersPanel { order: 3; }
#shiftsSection .shift-workspace-intro > .card-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 0 0 12px; }
#shiftsSection .shift-workspace-intro > .card-body > .d-flex { grid-column: 2; grid-row: 1; margin: 0 !important; }
#shiftsSection .shift-workspace-intro #shiftWorkflowTabs { grid-column: 1; grid-row: 1; }
#shiftsSection .shift-workspace-intro #shiftScheduleViewControls { grid-column: 1 / -1; margin-top: 0 !important; }
#shiftsSection .shift-workflow-tabs { display: flex; gap: 4px; }
#shiftsSection .shift-workflow-tab { flex: 0 1 auto; min-height: 44px; padding: 8px 14px; }
#shiftsSection .shift-workflow-tab span, #shiftsSection .shift-schedule-view-label { display: none; }
#shiftsSection .shift-view-tabs { width: fit-content; max-width: 100%; }
#shiftsSection .shift-view-tab { min-height: 40px; padding: 6px 14px; }
#showShiftFormButton { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.shift-add-icon { font-size: 22px; line-height: 1; }
#shiftsSection .shift-filter-card { border-top: 1px solid #dce3e8; margin-bottom: 12px; }
#shiftsSection .shift-filter-card > .card-body { padding: 12px 0; }
#shiftsSection .shift-period-toolbar { display: grid; grid-template-columns: minmax(220px, 1fr) auto auto; align-items: center; gap: 12px; border: 0; background: transparent; padding: 0; }
#shiftsSection .shift-period-controls { display: contents; }
#shiftsSection #shiftRangeLabel { font-size: 14px; }
#shiftsSection #shiftPresetGroup { display: flex; flex-wrap: nowrap; gap: 4px; min-width: 0; overflow-x: auto; max-width: 100%; padding: 2px; }
#shiftsSection #shiftPresetGroup .overview-period-option { flex: 0 0 auto; width: auto; min-height: 40px; padding: 6px 10px; font-size: 14px; white-space: nowrap; border-radius: 6px; box-shadow: none; }
#shiftsSection .shift-period-stepper { display: flex; gap: 4px; }
#shiftsSection .shift-period-stepper .btn { width: 40px; min-height: 40px; padding: 0; }
#shiftsSection #shiftFilterGrid:not(:has(> :not(.d-none):not([aria-hidden="true"]))) { display: none; }
#shiftsSection .shift-filter-grid .form-label { margin-bottom: 4px; }
@media (max-width: 1100px) {
  #shiftsSection .shift-period-toolbar { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  #shiftsSection #shiftPresetGroup { grid-column: 1 / -1; grid-row: 2; }
  #shiftsSection .shift-period-stepper { grid-column: 2; grid-row: 1; }
}
@media (max-width: 575.98px) {
  #shiftsSection .shift-workspace-intro > .card-body { gap: 8px; }
  #shiftsSection .shift-workspace-intro #shiftWorkflowTabs { grid-column: 1 / -1; }
  #shiftsSection .shift-workspace-intro > .card-body > .d-flex { grid-row: 2; }
  #shiftsSection .shift-workspace-intro #shiftScheduleViewControls { grid-column: 1; grid-row: 2; min-width: 0; }
  #shiftsSection .shift-workspace-intro #showShiftFormButton { padding: 0; width: 44px; height: 44px; }
  #showShiftFormButton .shift-add-label { display: none; }
  #shiftsSection .shift-view-tabs { width: 100%; }
  #shiftsSection .shift-view-tab { padding: 6px; font-size: 13px; min-width: 0; }
  #shiftsSection .shift-view-tabs { gap: 2px; padding: 3px; grid-template-columns: minmax(0, .55fr) minmax(0, 1fr) minmax(0, 1.15fr); }
  #shiftsSection .shift-view-tab { padding: 6px 2px; }
  #shiftsSection .shift-workflow-tab { flex: 1; padding: 8px 4px; font-size: 12px; }
  #shiftsSection .shift-workflow-tab strong { font-size: inherit; overflow-wrap: normal; }
  #shiftCalendarLegend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; gap: 6px 10px; font-weight: 600; }
  #shiftCalendarLegend span { white-space: normal; }
  #shiftCalendarLegend i { flex: 0 0 auto; }
  #shiftFormModal .form-control:not([type="checkbox"]), #shiftFormModal .form-select { font-size: 16px; min-height: 44px; }
  #shiftFormModal .shift-modal-footer-actions .btn { min-height: 44px; }
}
.seller-transfers-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.seller-transfers-heading .badge:empty { display: none; }
.seller-transfers-heading button { width: 44px; height: 44px; padding: 0; flex: 0 0 44px; }
.seller-transfer-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(130px, .4fr) auto; gap: 16px; padding: 16px 0; border-top: 1px solid #dce3e8; }
.seller-transfer-row.is-incoming { border-left: 3px solid #157a46; padding-left: 12px; }
.seller-transfer-person, .seller-transfer-state { display: flex; flex-direction: column; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.seller-transfer-person small, .seller-transfer-state small { color: #64748b; }
.seller-transfer-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.seller-transfers-history { margin: 12px 0; }
.seller-transfers-history summary { padding: 8px 0; cursor: pointer; }
.seller-transfer-modal .modal-dialog { max-width: 560px; }
.seller-transfer-modal form { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.seller-transfer-modal .modal-body { overflow-y: auto; }
.seller-transfer-modal .modal-footer { gap: 8px; }
.seller-transfer-modal .modal-footer > * { margin: 0; }
.seller-transfer-identity { display: grid; gap: 4px; margin-bottom: 16px; overflow-wrap: anywhere; }
.seller-transfer-identity strong { font-size: 18px; }
.seller-transfer-identity span { color: #64748b; }
.seller-transfer-consequence { font-size: 14px; margin: 16px 0 0; padding: 12px; border-left: 3px solid #18734c; background: #f2f8f5; }
.seller-transfer-context { overflow-wrap: anywhere; white-space: pre-wrap; }
.seller-transfer-confirm { display: flex; align-items: flex-start; gap: 10px; margin-top: 16px; }
.seller-transfer-confirm input { flex: 0 0 20px; width: 20px; height: 20px; }
@media (max-width: 640px) {
  .seller-transfer-row { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .seller-transfer-state { flex-direction: row; flex-wrap: wrap; gap: 6px 12px; }
  .seller-transfer-actions button { min-height: 44px; }
  .seller-transfer-modal .modal-dialog { margin: 8px; }
  .seller-transfer-modal .modal-body, .seller-transfer-modal .modal-header, .seller-transfer-modal .modal-footer { padding: 16px; }
  .seller-transfer-modal input, .seller-transfer-modal select, .seller-transfer-modal textarea, .seller-transfer-modal button { font-size: 16px; }
  .seller-transfer-modal select, .seller-transfer-modal .modal-footer button { min-height: 44px; }
}
@media (max-width: 360px) {
  .seller-transfer-modal .modal-footer { display: grid; grid-template-columns: minmax(0, 1fr); }
}

.shift-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.shift-modal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-bottom: 10px;
  color: var(--next-muted);
  font-size: 11px;
  font-weight: 700;
}

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

.shift-modal-legend i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #cbd5e1;
}

.shift-modal-legend .is-unplanned {
  background: #fb7185;
}

.shift-modal-legend .is-planned {
  background: #3b82f6;
}

.shift-modal-legend .is-filled {
  background: #22c55e;
}

.shift-modal-legend .is-conflict {
  background: #f59e0b;
}

.shift-modal-legend .is-closed {
  background: #94a3b8;
}

.shift-modal-empty {
  padding: 18px;
  border: 1px dashed var(--next-line);
  border-radius: 12px;
  color: var(--next-muted);
  text-align: center;
}

.shift-modal-load-error {
  display: grid;
  gap: 8px;
  justify-items: start;
  margin: 12px 0 0;
}

.shift-modal-load-error span {
  color: inherit;
  font-size: 13px;
}

.shift-modal-calendar-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.shift-modal-calendar-head > div {
  display: grid;
  gap: 2px;
  min-width: 0;
  text-align: center;
}

.shift-modal-calendar-head strong,
.shift-modal-calendar-head small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shift-modal-calendar-head strong {
  font-size: 16px;
}

.shift-modal-calendar-head small {
  color: var(--next-muted);
  font-size: 12px;
}

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

.shift-modal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 5px;
  color: var(--next-muted);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.shift-modal-day-spacer {
  min-width: 0;
}

.shift-modal-day {
  display: grid;
  gap: 3px;
  min-height: 98px;
  padding: 10px;
  border: 1px solid var(--next-line);
  border-radius: 14px;
  background: #fff;
  color: var(--next-text);
  text-align: left;
  user-select: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease, transform .15s ease;
}

.shift-modal-day:hover {
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, .12);
}

.shift-modal-day.is-selected {
  border-color: #15803d;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, .24);
  transform: translateY(-1px);
}

.shift-modal-day-date {
  font-size: 13px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.shift-modal-day-top {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  align-items: center;
}

.shift-modal-day-marker {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  border: 1px solid #fecaca;
  border-radius: 999px;
  background: #fff;
  color: #be123c;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.shift-modal-day strong,
.shift-modal-day small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shift-modal-day strong {
  display: -webkit-box;
  min-height: 2.3em;
  font-size: 12px;
  line-height: 1.15;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.shift-modal-day small {
  color: var(--next-muted);
  font-size: 11px;
  white-space: nowrap;
}

.shift-modal-day.is-missing {
  border-color: #fecaca;
  background: #fff5f5;
}

.shift-modal-day.is-filled {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.shift-modal-day.is-filled .shift-modal-day-marker,
.shift-modal-day.is-multi .shift-modal-day-marker {
  border-color: #22c55e;
  background: #22c55e;
  color: #fff;
}

.shift-modal-day.is-multi {
  border-color: #86efac;
  background: linear-gradient(135deg, #ecfdf5 0%, #eff6ff 100%);
}

.shift-modal-day.is-planned {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.shift-modal-day.is-planned .shift-modal-day-marker,
.shift-modal-day.is-planned-multi .shift-modal-day-marker {
  border-color: #3b82f6;
  background: #3b82f6;
  color: #fff;
}

.shift-modal-day.is-planned-multi {
  border-color: #93c5fd;
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
}

.shift-modal-day.is-unplanned {
  border-color: #e2e8f0;
  background: #ffffff;
}

.shift-modal-day.is-review {
  border-color: #fde68a;
  background: #fffbeb;
}

.shift-modal-day.is-review .shift-modal-day-marker {
  border-color: #f59e0b;
  background: #f59e0b;
  color: #fff;
}

.shift-modal-day.is-conflict {
  border-color: #fcd34d;
  background: #fffbeb;
}

.shift-modal-day.is-conflict .shift-modal-day-marker {
  border-color: #f59e0b;
  background: #f59e0b;
  color: #fff;
}

.shift-modal-day.is-locked {
  border-color: #cbd5e1;
  background: #f1f5f9;
  color: #64748b;
}

.shift-modal-day.is-locked .shift-modal-day-marker,
.shift-modal-day.is-excluded .shift-modal-day-marker {
  border-color: #94a3b8;
  background: #94a3b8;
  color: #fff;
}

.shift-modal-day.is-excluded,
.shift-modal-day.is-empty,
.shift-modal-day.is-closed,
.shift-modal-day.is-inactive {
  color: #94a3b8;
  background: #f8fafc;
}

.shift-modal-day[aria-disabled="true"] {
  cursor: default;
}

.shift-selected-summary {
  padding: 11px 13px;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  background: #f0fdf4;
  color: #166534;
  font-size: 13px;
  font-weight: 800;
}

.shift-manual-range {
  border: 1px solid var(--next-line);
  border-radius: 12px;
  background: #fff;
}

.shift-manual-range summary {
  padding: 10px 12px;
  cursor: pointer;
  color: #166534;
  font-size: 13px;
  font-weight: 800;
}

.shift-manual-range-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0 12px 12px;
}

.shift-modal-footer {
  z-index: 6;
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin: 0;
  padding: 12px 24px !important;
  border-top: 1px solid var(--next-line);
  background: #fff;
  box-shadow: 0 -10px 24px rgba(15, 23, 42, .08);
}

.shift-modal-footer .shift-selected-summary {
  min-width: 0;
  padding: 8px 10px;
}

.shift-modal-footer-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

@container shift-calendar (max-width: 600px) {
  .shift-modal-weekdays,
  .shift-modal-calendar-grid {
    gap: 3px;
  }

  .shift-modal-day {
    min-height: 52px;
    gap: 2px;
    padding: 5px 3px;
    border-radius: 9px;
    text-align: center;
  }

  .shift-modal-day-top {
    display: grid;
    justify-content: center;
    justify-items: center;
    gap: 2px;
  }

  .shift-modal-day-marker {
    width: 14px;
    height: 14px;
    font-size: 8px;
  }

  .shift-modal-day > strong,
  .shift-modal-day > small {
    display: none;
  }

  .shift-modal-weekdays {
    font-size: 9px;
  }

}

.import-run-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  color: var(--next-muted);
  font-size: 13px;
}

.import-run-grid strong {
  color: var(--next-text);
}

#salesImportStatus {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.import-run-error {
  padding: 12px 14px;
  border-left: 3px solid #b4233a;
  background: #fff5f6;
  color: #7d1b2e;
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.import-run-error p {
  margin: 4px 0 0;
  white-space: pre-wrap;
}

.import-run-error details {
  margin-top: 8px;
}

.import-run-error summary {
  cursor: pointer;
}

.import-run-response {
  margin-top: 8px;
  color: var(--next-muted);
  font-size: 13px;
}

.import-row-error {
  display: block;
  max-width: 36rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.import-log-card {
  overflow: hidden;
}

.import-log-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
}

.import-log-summary::-webkit-details-marker {
  display: none;
}

.import-log-summary > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.import-log-summary strong {
  color: var(--next-text);
  font-size: 15px;
}

.import-log-summary small {
  color: var(--next-muted);
  font-size: 13px;
}

.import-log-summary::after {
  content: "+";
  width: 28px;
  height: 28px;
  display: inline-grid;
  flex: 0 0 28px;
  place-items: center;
  border: 1px solid var(--next-line);
  border-radius: 50%;
  color: var(--next-muted);
  font-size: 18px;
  line-height: 1;
}

.import-log-card[open] > .import-log-summary {
  border-bottom: 1px solid var(--next-line);
}

.import-log-card[open] > .import-log-summary::after {
  content: "−";
}

.import-log-card.import-log-attention {
  border-color: #f3c98b;
}

.import-log-card.import-log-attention > .import-log-summary {
  background: #fffaf0;
}

.import-history-disclosure > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  color: var(--next-text);
  cursor: pointer;
  list-style: none;
  font-weight: 700;
}

.import-history-disclosure > summary::-webkit-details-marker {
  display: none;
}

.import-history-disclosure > summary::after {
  content: "+";
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--next-line);
  border-radius: 50%;
  color: var(--next-muted);
}

.import-history-disclosure[open] > summary::after {
  content: "−";
}

.import-history-disclosure[open] > summary {
  border-bottom: 1px solid var(--next-line);
}

.import-history-disclosure > summary strong {
  margin-left: auto;
  color: var(--next-muted);
  font-size: 13px;
}

.import-history-list .list-group-item {
  border-right: 0;
  border-left: 0;
}

.plan-list {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.store-directory-list {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.store-directory-list > .empty-block {
  grid-column: 1 / -1;
}

.store-directory-card {
  position: relative;
  min-width: 0;
  align-content: start;
  gap: 14px;
}

.store-directory-card-head {
  min-width: 0;
  align-items: flex-start;
}

.store-directory-card-head > div:first-child {
  min-width: 0;
}

.store-directory-card h3 {
  margin-bottom: 4px;
  overflow-wrap: anywhere;
}

.plan-card-details.store-directory-card-details {
  grid-template-columns: 1fr;
}

.store-directory-card-details dd {
  min-width: 0;
  overflow-wrap: anywhere;
}

.store-card-menu {
  position: relative;
  flex: 0 0 auto;
}

.store-card-menu > summary {
  list-style: none;
}

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

.store-card-menu-trigger {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--next-line);
  border-radius: 9px;
  background: #fff;
  color: var(--next-muted);
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.store-card-menu-trigger:hover,
.store-card-menu-trigger:focus-visible,
.store-card-menu[open] .store-card-menu-trigger {
  border-color: #86b99a;
  background: #f0f8f3;
  color: var(--next-primary);
}

.store-card-menu-popover {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  right: 0;
  width: max-content;
  max-width: min(280px, calc(100vw - 56px));
  padding: 6px;
  border: 1px solid var(--next-line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .14);
}

.store-card-menu-action {
  width: 100%;
  padding: 9px 11px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--next-text);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.store-card-menu-action:hover,
.store-card-menu-action:focus-visible {
  background: #edf7f0;
  color: var(--next-primary);
  outline: 0;
}

.plans-workspace {
  border: 1px solid var(--next-line);
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
}

.plans-page-head {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.plans-page-head > div:first-child {
  min-width: 0;
}

.plan-month-toolbar {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: minmax(128px, 168px) minmax(170px, 220px) minmax(128px, 168px);
  gap: 8px;
  align-items: end;
}

.plan-month-arrow {
  min-width: 0;
  min-height: 58px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  padding: 7px 10px;
  line-height: 1.15;
  text-align: left;
}

#planNextMonthButton {
  grid-template-columns: minmax(0, 1fr) auto;
  text-align: right;
}

.plan-month-arrow > span:not(.plan-month-button-arrow) {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.plan-month-arrow strong,
.plan-month-arrow small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plan-month-arrow strong {
  font-size: 12px;
}

.plan-month-arrow small {
  color: var(--next-muted);
  font-size: 11px;
}

.plan-month-button-arrow {
  font-size: 24px;
  line-height: 1;
}

.plan-month-field {
  display: grid;
  gap: 5px;
  margin: 0;
  color: var(--next-muted);
  font-size: 12px;
  font-weight: 700;
}

.plan-month-field .form-select {
  min-height: 44px;
  font-weight: 750;
}

.plans-workspace-head {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--next-line);
}

.plan-store-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
}

.plan-store-card {
  display: grid;
  min-width: 0;
  min-height: 190px;
  grid-template-rows: auto 1fr auto;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--next-line);
  border-radius: 14px;
  background: #fff;
}

.plan-store-card-missing {
  border-color: #fed7aa;
  background: #fffdf9;
}

.plan-store-card-head {
  display: flex;
  min-width: 0;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.plan-store-card h3 {
  margin: 5px 0 0;
  color: var(--next-text);
  font-size: 18px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.plan-store-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.plan-store-status-ready {
  background: #dcfce7;
  color: #166534;
}

.plan-store-status-neutral {
  background: #eef2f7;
  color: #526173;
}

.plan-store-status-missing {
  background: #ffedd5;
  color: #9a3412;
}

.plan-store-amount {
  flex: 0 0 auto;
  color: var(--next-text);
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.1;
  white-space: nowrap;
}

.plan-store-meta {
  display: grid;
  align-content: start;
  gap: 5px;
  color: var(--next-muted);
  font-size: 13px;
}

.plan-store-meta span {
  overflow-wrap: anywhere;
}

.plan-distribution-preview {
  display: grid;
  gap: 12px;
  padding: 16px 0 2px;
  border-top: 1px solid #dbe4df;
}

.plan-source-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.plan-source-actions .btn {
  margin: 0;
}

.plan-distribution-preview-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: end;
  justify-content: space-between;
}

.plan-distribution-preview-head > div {
  display: grid;
  gap: 2px;
}

.plan-distribution-preview-head .plan-reference-title {
  color: #15803d;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.plan-distribution-preview-head strong {
  color: var(--next-text);
  font-size: 18px;
}

.plan-distribution-preview-head small {
  max-width: 360px;
  color: var(--next-muted);
  font-size: 12px;
  text-align: right;
}

.plan-distribution-help {
  width: fit-content;
  max-width: 100%;
  color: var(--next-muted);
  font-size: 12px;
}

.plan-distribution-help summary {
  color: #166534;
  cursor: pointer;
  font-weight: 800;
}

.plan-distribution-help p {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--next-muted);
  line-height: 1.5;
}

.plan-distribution-weeks {
  border-block: 1px solid #e2e8f0;
}

.plan-distribution-week + .plan-distribution-week {
  border-top: 1px solid #e2e8f0;
}

.plan-distribution-week > summary {
  display: grid;
  grid-template-columns: minmax(118px, .8fr) minmax(120px, 1.8fr) max-content;
  gap: 5px 14px;
  align-items: center;
  min-width: 0;
  padding: 12px 4px;
  color: var(--next-text);
  cursor: pointer;
  list-style: none;
}

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

.plan-distribution-week > summary::before {
  content: "›";
  grid-column: 1;
  grid-row: 1;
  width: 14px;
  color: #15803d;
  font-size: 20px;
  line-height: 1;
  transform: translateX(-2px);
  transition: transform .16s ease;
}

.plan-distribution-week[open] > summary::before {
  transform: translateX(-2px) rotate(90deg);
}

.plan-distribution-week-period {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  padding-left: 18px;
  font-size: 14px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.plan-distribution-week-bar {
  grid-column: 2;
  grid-row: 1;
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.plan-distribution-week-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #22a55a;
}

.plan-distribution-week > summary > strong {
  grid-column: 3;
  grid-row: 1;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.plan-distribution-week > summary > small {
  grid-column: 1 / -1;
  padding-left: 18px;
  color: var(--next-muted);
  font-size: 12px;
}

.plan-distribution-days {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px 20px;
  padding: 0 4px 12px 22px;
}

.plan-distribution-days > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 2px 10px;
  min-width: 0;
  padding: 8px 0;
  border-bottom: 1px solid #edf2f7;
}

.plan-distribution-days span {
  min-width: 0;
  color: var(--next-text);
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.plan-distribution-days strong {
  color: var(--next-text);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.plan-distribution-days small {
  grid-column: 1 / -1;
  color: var(--next-muted);
  font-size: 11px;
}

@media (max-width: 575.98px) {
  .plan-source-actions .btn {
    flex: 1 1 100%;
    min-width: 0;
    white-space: normal;
  }

  .plan-distribution-preview-head {
    align-items: start;
  }

  .plan-distribution-preview-head small {
    max-width: none;
    text-align: left;
  }

  .plan-distribution-week > summary {
    grid-template-columns: minmax(0, 1fr) max-content;
    gap: 6px 10px;
    padding-block: 13px;
  }

  .plan-distribution-week-bar {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-left: 18px;
  }

  .plan-distribution-week > summary > strong {
    grid-column: 2;
  }

  .plan-distribution-week > summary > small {
    grid-row: 3;
  }

  .plan-distribution-days {
    grid-template-columns: 1fr;
    padding-left: 22px;
  }
}

.plan-store-recommendation {
  display: grid;
  align-content: start;
  gap: 2px;
}

.plan-store-recommendation span,
.plan-store-no-forecast {
  margin: 0;
  color: var(--next-muted);
  font-size: 13px;
}

.plan-store-recommendation strong {
  color: var(--next-text);
  font-size: 20px;
  line-height: 1.2;
}

.plan-store-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.plan-store-create {
  justify-self: start;
}

.plans-workspace-controls {
  display: flex;
  gap: 12px;
  align-items: center;
}

.plan-type-group {
  width: min(360px, 52vw);
}

.plan-role-sections {
  display: grid;
  gap: 18px;
}

.plan-role-section {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--next-line);
  border-radius: 18px;
  background: #fbfefb;
}

.plan-role-section-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
}

.plan-role-label {
  display: inline-flex;
  margin-bottom: 6px;
  color: #15803d;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.plan-role-section h3,
.plan-subgroup h4 {
  margin: 0;
  font-weight: 800;
}

.plan-role-section h3 {
  font-size: 22px;
}

.plan-role-section p {
  margin: 4px 0 0;
  color: var(--next-muted);
}

.plan-role-body,
.plan-subgroup {
  display: grid;
  gap: 12px;
}

.plan-subgroup {
  padding-top: 14px;
  border-top: 1px solid var(--next-line);
}

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

.plan-subgroup h4 {
  font-size: 16px;
}

.plan-subgroup-head span {
  color: var(--next-muted);
  font-size: 13px;
  font-weight: 700;
}

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

.plan-history-disclosure > summary {
  display: flex;
  min-height: 48px;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  list-style: none;
  color: var(--next-text);
  cursor: pointer;
}

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

.plan-history-disclosure > summary > span:first-child {
  display: grid;
  gap: 2px;
}

.plan-history-disclosure > summary strong {
  font-size: 16px;
}

.plan-history-disclosure > summary small {
  color: var(--next-muted);
  font-size: 13px;
  font-weight: 500;
}

.plan-history-count {
  display: inline-grid;
  min-width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--next-line);
  border-radius: 50%;
  background: #fff;
  color: var(--next-muted);
  font-size: 13px;
  font-weight: 800;
}

.plan-history-summary-action {
  display: inline-flex;
  gap: 9px;
  align-items: center;
}

.plan-history-toggle {
  min-width: 66px;
  color: var(--next-primary);
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}

.plan-history-toggle::after {
  content: "Показать";
}

.plan-history-disclosure[open] .plan-history-toggle::after {
  content: "Скрыть";
}

.plan-history-disclosure[open] > summary {
  border-bottom: 1px solid var(--next-line);
}

.plan-history-disclosure[open] .plan-history-count {
  border-color: #86b99a;
  background: #edf7f0;
  color: var(--next-primary);
}

.plan-history-list {
  display: grid;
  gap: 12px;
  padding-top: 12px;
}

.people-directory-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
}

.people-directory-head-actions,
.directory-section-heading {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.people-directory-head-actions {
  flex: 0 0 auto;
}

.directory-section-heading > div {
  min-width: 0;
}

.people-directory-controls {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(240px, 1fr) minmax(150px, 190px);
  gap: 14px;
  align-items: center;
  padding-bottom: 14px;
}

.store-directory-controls {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(150px, 190px);
  gap: 12px;
  border-bottom: 1px solid var(--next-line);
}

.people-role-tabs {
  width: 100%;
}

.people-role-tabs .calculation-type-button {
  display: flex;
  min-height: 48px;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.people-role-tabs .calculation-type-button small {
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.people-search {
  display: flex;
  min-width: 0;
  gap: 8px;
}

.people-search .form-control {
  min-width: 0;
}

.people-search .btn {
  width: 44px;
  min-width: 44px;
  padding: 0;
  font-size: 24px;
  line-height: 1;
}

.people-directory-hint {
  padding: 0 16px 12px;
  color: var(--next-muted);
  font-size: 13px;
  font-weight: 700;
}

.people-directory-hint:empty {
  display: none;
}

.people-directory-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0 16px 16px;
}

.people-directory-list > .empty-block {
  grid-column: 1 / -1;
}

.people-employee-card {
  min-width: 0;
  border: 1px solid var(--next-line);
  border-radius: 12px;
  background: #fff;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.people-employee-card:hover,
.people-employee-card[open] {
  border-color: #86b99a;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .07);
}

.people-employee-card summary {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto 18px;
  min-height: 68px;
  gap: 10px;
  align-items: center;
  padding: 12px;
  list-style: none;
  cursor: pointer;
}

.people-employee-card summary::-webkit-details-marker {
  display: none;
}

.people-avatar {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  background: #e8f5ec;
  color: #166534;
  font-size: 13px;
  font-weight: 800;
}

.people-employee-main {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.people-employee-main strong {
  overflow: hidden;
  color: var(--next-text);
  font-size: 15px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.people-employee-main small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--next-muted);
  font-size: 13px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.people-employee-status {
  align-self: center;
}

.people-employee-chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid #64748b;
  border-bottom: 2px solid #64748b;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 140ms ease;
}

.people-employee-card[open] .people-employee-chevron {
  transform: rotate(225deg) translate(-1px, -1px);
}

.people-employee-details {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 12px;
  margin: 0;
  padding: 12px 14px 14px 62px;
  border-top: 1px solid var(--next-line);
  background: #f8fafc;
}

.people-employee-details div {
  min-width: 0;
}

.people-employee-details dt {
  margin-bottom: 3px;
  color: var(--next-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.people-employee-details dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.people-employee-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  padding: 0 14px 14px 62px;
  background: #f8fafc;
}

.seller-store-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.seller-store-fieldset.is-disabled .seller-store-checklist {
  opacity: 0.68;
}

.seller-store-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.seller-store-toolbar span {
  font-size: 13px;
  font-weight: 700;
}

.seller-store-checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 280px;
  padding: 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.seller-store-option {
  display: grid;
  min-width: 0;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--next-line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.seller-store-option:hover,
.seller-store-option.is-selected {
  border-color: #86b99a;
  background: #f0f8f3;
}

.seller-store-option.is-disabled {
  border-color: var(--next-line);
  background: #f4f6f5;
  cursor: not-allowed;
  opacity: 0.72;
}

.seller-store-option.is-disabled:hover {
  border-color: var(--next-line);
  background: #f4f6f5;
}

.seller-store-option input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--next-primary);
}

.seller-store-option span {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.seller-store-option strong,
.seller-store-option small {
  overflow-wrap: anywhere;
}

.seller-store-option strong {
  color: var(--next-text);
  font-size: 14px;
}

.seller-store-option small,
.seller-store-empty {
  color: var(--next-muted);
  font-size: 12px;
}

.seller-store-plan {
  width: fit-content;
  margin-top: 3px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #e5f5eb;
  color: #176b3a !important;
  font-weight: 800;
}

.seller-store-plan.is-missing {
  background: #fff3cd;
  color: #805500 !important;
}

.seller-store-plan.is-loading {
  background: #eef2f6;
  color: var(--next-muted) !important;
}

.employee-account-fields {
  display: contents;
}

.directory-assignment-intro {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #cfe5d7;
  border-radius: 12px;
  background: #f3faf6;
}

.directory-assignment-intro > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.directory-assignment-intro strong,
.directory-assignment-intro small {
  overflow-wrap: anywhere;
}

.directory-assignment-intro small {
  color: var(--next-muted);
}

.directory-schedule-decision {
  display: grid;
  gap: 18px;
  padding: 4px 0;
}

.directory-schedule-decision-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  background: #fff3cd;
  color: #8a5800;
  font-size: 25px;
  font-weight: 900;
}

.directory-schedule-decision h4,
.directory-schedule-decision p {
  margin: 0;
}

.directory-schedule-decision h4 {
  font-size: 20px;
}

.directory-schedule-decision p:not(.modal-eyebrow, .form-text) {
  margin-top: 5px;
  color: var(--next-muted);
}

.directory-schedule-store-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.directory-schedule-store-list li {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border: 1px solid var(--next-line);
  border-radius: 10px;
  background: #f8fafc;
}

.directory-schedule-store-list strong {
  overflow-wrap: anywhere;
}

.directory-schedule-store-list span {
  flex: 0 0 auto;
  color: var(--next-muted);
  font-weight: 800;
}

.directory-schedule-mapping-list {
  display: grid;
  gap: 10px;
}

.directory-schedule-mapping-row {
  display: grid;
  grid-template-columns: minmax(150px, .8fr) 24px minmax(220px, 1.2fr);
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--next-line);
  border-radius: 10px;
  background: #f8fafc;
}

.directory-schedule-mapping-source {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.directory-schedule-mapping-source strong,
.directory-schedule-mapping-source small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.directory-schedule-mapping-source small {
  color: var(--next-muted);
}

.directory-schedule-mapping-arrow {
  color: var(--next-muted);
  text-align: center;
}

.directory-schedule-decision-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  padding-top: 4px;
}

.seller-store-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 18px;
  border: 1px dashed var(--next-line);
  border-radius: 10px;
  text-align: center;
}

.seller-password-control .btn {
  white-space: nowrap;
}

.directory-create-success {
  display: grid;
  gap: 18px;
  justify-items: start;
  padding: 8px 0;
}

.directory-create-success-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  background: #dcfce7;
  color: #166534;
  font-size: 24px;
  font-weight: 900;
}

.directory-create-success h4,
.directory-create-success p {
  margin: 0;
}

.directory-create-success p {
  margin-top: 4px;
  color: var(--next-muted);
}

.directory-create-success dl {
  display: grid;
  width: 100%;
  gap: 10px;
  margin: 0;
}

.directory-create-success dl div {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--next-line);
  border-radius: 10px;
  background: #f8fafc;
}

.directory-create-success dt {
  color: var(--next-muted);
  font-size: 12px;
}

.directory-create-success dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  font-weight: 800;
}

.directory-create-success-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.directory-assignment-result {
  display: grid;
  gap: 18px;
  padding: 8px 0;
}

.directory-assignment-result h4,
.directory-assignment-result p {
  margin: 0;
}

.directory-assignment-result > div:nth-child(2) > p:last-child {
  margin-top: 5px;
  color: var(--next-muted);
}

.directory-assignment-plan-list {
  display: grid;
  gap: 8px;
}

.directory-assignment-plan-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--next-line);
  border-radius: 10px;
  background: #f8fafc;
}

.directory-assignment-plan-row > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.directory-assignment-plan-row strong,
.directory-assignment-plan-row small {
  overflow-wrap: anywhere;
}

.directory-assignment-plan-row small {
  color: var(--next-muted);
}

.directory-store-start {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 220px);
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid #cfe5d7;
  border-radius: 10px;
  background: #f3faf6;
}

.directory-store-start .form-control {
  min-height: 44px;
}

.directory-store-closure {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #efc67d;
  border-radius: 10px;
  background: #fff9eb;
}

.directory-store-closure-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.directory-store-closure-head > span {
  display: grid;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: #f6d98f;
  color: #714800;
  font-weight: 900;
}

.directory-store-closure-head strong,
.directory-store-closure-head p {
  margin: 0;
}

.directory-store-closure-head p {
  margin-top: 3px;
  color: #6d5a32;
  font-size: 13px;
}

.directory-store-closure-list {
  display: grid;
  gap: 8px;
}

.directory-store-closure-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #ead7ac;
  border-radius: 8px;
  background: #fff;
}

.directory-store-closure-row > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.directory-store-closure-row strong,
.directory-store-closure-row small {
  overflow-wrap: anywhere;
}

.directory-store-closure-row small {
  color: var(--next-muted);
}

.people-employee-actions .btn {
  min-height: 38px;
}

.people-directory-footer {
  display: flex;
  min-height: 58px;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-top: 1px solid var(--next-line);
  color: var(--next-muted);
  font-size: 13px;
}

.plan-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--next-line);
  border-radius: 14px;
  background: #fff;
}

.plan-card-history {
  background: #f8fafc;
}

.plan-card-main {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  align-items: flex-start;
}

.plan-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 800;
}

.plan-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.plan-card-amount {
  flex: 0 0 auto;
  font-size: 22px;
  line-height: 1.1;
  white-space: nowrap;
}

.plan-card-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.plan-card-details div {
  display: grid;
  gap: 2px;
}

.plan-card-details dt {
  color: var(--next-muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.plan-card-details dd {
  margin: 0;
}

.result-breakdown {
  display: grid;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--next-line);
}

.result-breakdown-head,
.result-breakdown-row {
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.result-breakdown-head {
  align-items: center;
  color: var(--next-muted);
  font-size: 13px;
}

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

.result-breakdown-row {
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
}

.result-breakdown-row div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.result-breakdown-row div:last-child {
  justify-items: end;
  text-align: right;
}

.result-breakdown-row strong,
.result-breakdown-row span {
  overflow-wrap: anywhere;
}

.result-breakdown-row small {
  color: var(--next-muted);
  font-size: 12px;
}

.seller-preview-result {
  display: grid;
  gap: 12px;
}

.seller-preview-card .metric-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.seller-preview-breakdown-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  text-align: right;
}

.seller-preview-missing-plan {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 8px;
  border: 1px solid #fde68a;
  border-radius: 999px;
  background: #fffbeb;
  color: #92400e;
  font-weight: 800;
}

.plan-reference-period {
  display: block;
  color: var(--next-muted);
  font-size: 12px;
}

.plan-reference-callout {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid #bbf7d0;
  border-radius: 14px;
  background: #f0fdf4;
}

#planFormHint.plan-reference-callout {
  padding: 0;
  border: 0;
  background: transparent;
}

#planFormHint .plan-forecast-card {
  border-radius: 8px;
}

.plan-history-details {
  min-width: 0;
  border-top: 1px solid #d8e2dd;
  padding-top: 8px;
}

.plan-history-details > summary,
#planFormHint .plan-forecast-details > summary {
  min-height: 44px;
  padding: 10px 0;
  cursor: pointer;
  font-weight: 600;
}

#planFormHint .plan-forecast-grid > div {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 8px 0;
}

@media (max-width: 575px) {
  #planFormModal :is(.form-control, .form-select, .modal-footer .btn) {
    min-height: 44px;
    font-size: 16px;
  }
}

.plan-reference-callout .plan-reference-title {
  color: #166534;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.plan-reference-callout strong {
  color: #052e16;
  font-size: 26px;
  line-height: 1.1;
}

.plan-reference-callout small {
  margin: 0;
  color: #166534;
  font-size: 13px;
}

.plan-forecast-card {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid #bbf7d0;
  border-radius: 14px;
  background: #f0fdf4;
}

.plan-card .plan-forecast-card {
  margin-top: 2px;
}

.plan-forecast-note {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  justify-self: start;
  max-width: 100%;
  margin-top: -2px;
  padding: 4px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}

.plan-forecast-note span {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.plan-forecast-note strong {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.plan-forecast-note small {
  color: #94a3b8;
  font-size: 12px;
}

.plan-forecast-note small::before {
  content: "·";
  margin-right: 8px;
  color: #cbd5e1;
}

.plan-forecast-card-empty {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.plan-forecast-card > strong {
  color: #052e16;
  font-size: 24px;
  line-height: 1.1;
}

.plan-forecast-card-empty > strong {
  color: #475569;
}

.plan-forecast-card > small {
  color: #166534;
}

.plan-forecast-card .plan-forecast-comparison {
  color: #166534;
  font-weight: 700;
}

.plan-forecast-details {
  border-top: 1px solid rgba(21, 128, 61, .16);
  padding-top: 8px;
}

.plan-forecast-details summary {
  width: max-content;
  max-width: 100%;
  color: #166534;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  list-style-position: outside;
}

.plan-forecast-details[open] summary {
  margin-bottom: 8px;
}

.plan-forecast-status {
  display: block;
  margin-top: 8px;
  color: #64748b !important;
}

.plan-forecast-explanation {
  margin: 0;
  padding: 10px 12px;
  border-left: 3px solid #22c55e;
  background: rgba(255, 255, 255, .62);
  color: #334155;
  font-size: 13px;
  line-height: 1.45;
}

.plan-forecast-policy {
  margin: 0;
  padding: 10px 12px;
  border-left: 3px solid #0284c7;
  background: #f0f9ff;
  color: #0c4a6e;
  font-size: 13px;
  line-height: 1.45;
}

.plan-forecast-card-empty > small {
  color: #64748b;
}

.plan-forecast-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.plan-forecast-grid div {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(21, 128, 61, .16);
  border-radius: 10px;
  background: rgba(255, 255, 255, .72);
}

.plan-forecast-grid span,
.plan-forecast-card .plan-reference-title {
  color: #166534;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.plan-forecast-grid strong {
  color: #0f172a;
  font-size: 15px;
}

.plan-forecast-grid small {
  color: #64748b;
  overflow-wrap: anywhere;
}

.plan-history-card {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: linear-gradient(180deg, #eff6ff 0%, #fff 100%);
  overflow: visible;
}

.plan-history-card-empty {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.plan-history-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.plan-history-head span {
  display: block;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.plan-history-head strong {
  display: block;
  margin-top: 2px;
  color: #0f172a;
  font-size: 16px;
}

.plan-history-head small {
  flex: 0 0 auto;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.plan-history-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.plan-history-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.plan-history-swatch {
  width: 18px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .08);
}

.plan-history-swatch-complete {
  background: linear-gradient(90deg, #22c55e 0%, #2563eb 100%);
}

.plan-history-swatch-reference {
  border: 2px solid #2563eb;
  background: #eff6ff;
  box-shadow: none;
}

.plan-history-swatch-partial {
  background: repeating-linear-gradient(135deg, #93c5fd 0 5px, #bfdbfe 5px 10px);
}

.plan-history-swatch-missing {
  border: 1px dashed #94a3b8;
  background: #f8fafc;
  box-shadow: none;
}

.plan-history-swatch-closed {
  border: 1px solid #94a3b8;
  background: repeating-linear-gradient(135deg, #e2e8f0 0 5px, #f8fafc 5px 10px);
  box-shadow: none;
}

.plan-history-swatch-inactive {
  background: #cbd5e1;
}

.plan-history-chart {
  min-height: 158px;
  display: grid;
  grid-template-columns: repeat(var(--history-count, 1), minmax(44px, 1fr));
  gap: 10px;
  align-items: end;
  padding: 4px 2px 8px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}

.plan-history-chart-single {
  grid-template-columns: minmax(96px, 180px);
  justify-content: start;
}

.plan-history-bar {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  min-width: 0;
  padding: 0;
  display: grid;
  grid-template-rows: 104px auto auto;
  gap: 6px;
  text-align: center;
  scroll-snap-align: start;
}

.plan-history-bar:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .28);
  outline-offset: 4px;
  border-radius: 10px;
}

.plan-history-bar-active .plan-history-column::before {
  box-shadow: 0 0 0 3px rgba(22, 163, 74, .28), 0 12px 24px rgba(37, 99, 235, .24);
  filter: saturate(1.08);
}

.plan-history-column {
  display: flex;
  align-items: end;
  min-height: 104px;
  padding: 4px;
  border: 1px solid transparent;
  border-radius: 10px;
}

.plan-history-column::before {
  content: "";
  display: block;
  width: 100%;
  height: var(--bar-h, 2%);
  min-height: 3px;
  border-radius: 10px 10px 4px 4px;
  background: linear-gradient(180deg, #22c55e 0%, #2563eb 100%);
  box-shadow: 0 8px 18px rgba(37, 99, 235, .16);
}

.plan-history-bar-partial .plan-history-column::before {
  opacity: .55;
  background: repeating-linear-gradient(135deg, #93c5fd 0 6px, #bfdbfe 6px 12px);
}

.plan-history-bar-reference .plan-history-column {
  border-color: #93c5fd;
  background: rgba(239, 246, 255, .84);
}

.plan-history-bar-reference > span:not(.plan-history-column) {
  color: #1d4ed8;
}

.plan-history-bar-missing .plan-history-column::before {
  min-height: 2px;
  border-radius: 999px;
  background: #cbd5e1;
  box-shadow: none;
}

.plan-history-bar-missing small {
  color: #64748b;
}

.plan-history-bar-closed .plan-history-column::before {
  min-height: 3px;
  border-radius: 999px;
  background: repeating-linear-gradient(135deg, #cbd5e1 0 5px, #e2e8f0 5px 10px);
  box-shadow: none;
}

.plan-history-bar-closed small {
  color: #64748b;
}

.plan-history-bar-inactive {
  cursor: default;
}

.plan-history-bar-inactive .plan-history-column::before {
  min-height: 2px;
  border-radius: 999px;
  background: #cbd5e1;
  box-shadow: none;
}

.plan-history-bar-inactive small {
  color: #94a3b8;
}

.plan-history-bar > span:not(.plan-history-column),
.plan-history-bar small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plan-history-bar > span:not(.plan-history-column) {
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.plan-history-bar small {
  color: #64748b;
  font-size: 11px;
}

.plan-history-tooltip {
  --tooltip-arrow-x: 50%;
  position: absolute;
  z-index: 30;
  width: max-content;
  max-width: min(280px, calc(100% - 24px));
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 12px;
  background: rgba(15, 23, 42, .96);
  box-shadow: 0 18px 44px rgba(15, 23, 42, .22);
  color: #e2e8f0;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(4px) scale(.98);
  transition: opacity .14s ease, transform .14s ease;
}

.plan-history-tooltip::after {
  content: "";
  position: absolute;
  left: var(--tooltip-arrow-x);
  bottom: -6px;
  width: 12px;
  height: 12px;
  background: rgba(15, 23, 42, .96);
  border-right: 1px solid rgba(255, 255, 255, .12);
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  transform: translateX(-50%) rotate(45deg);
}

.plan-history-tooltip-below::after {
  top: -6px;
  bottom: auto;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, .12);
  border-top: 1px solid rgba(255, 255, 255, .12);
}

.plan-history-tooltip-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

.plan-history-tooltip strong {
  color: #fff;
  font-size: 13px;
}

.plan-history-tooltip span {
  color: #bfdbfe;
  font-weight: 900;
}

.plan-history-tooltip small {
  color: #cbd5e1;
}

.plan-history-tooltip .plan-history-tooltip-reference {
  color: #93c5fd;
  font-weight: 800;
}

.plan-history-tooltip .plan-history-tooltip-missing {
  color: #fde68a;
}

@media (max-width: 575.98px) {
  .plan-history-head {
    display: grid;
    gap: 6px;
  }

  .plan-history-head small {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

.plan-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.action-stack {
  display: grid;
  gap: 10px;
}

.calculation-primary-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.calculation-primary-actions .btn {
  min-height: 52px;
  font-weight: 800;
  white-space: normal;
}

.calculation-issue-intro {
  padding: 12px 14px;
  border-left: 3px solid #16a34a;
  background: #f0fdf4;
  color: #365746;
  font-size: 14px;
}

.calculation-issue-groups {
  display: grid;
  gap: 12px;
}

.calculation-issue-group {
  border: 1px solid #fecaca;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.calculation-issue-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
}

.calculation-issue-copy {
  min-width: 0;
}

.calculation-issue-title {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.calculation-issue-title h3 {
  min-width: 0;
  margin: 0;
  font-size: 17px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.calculation-issue-meta,
.calculation-issue-count {
  padding: 3px 8px;
  border-radius: 999px;
  background: #fef2f2;
  color: #991b1b;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.calculation-issue-copy p {
  margin: 7px 0 0 22px;
  color: var(--next-muted);
  font-size: 14px;
}

.calculation-issue-details {
  border-top: 1px solid #fee2e2;
}

.calculation-issue-details > summary {
  position: relative;
  padding: 11px 42px 11px 16px;
  color: #475569;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  list-style: none;
  user-select: none;
}

.calculation-issue-details > summary::-webkit-details-marker {
  display: none;
}

.calculation-issue-details > summary::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 18px;
  width: 8px;
  height: 8px;
  border-right: 2px solid #64748b;
  border-bottom: 2px solid #64748b;
  transform: translateY(-70%) rotate(45deg);
  transition: transform .15s ease;
}

.calculation-issue-details[open] > summary::after {
  transform: translateY(-30%) rotate(225deg);
}

.calculation-issue-details > summary:hover {
  background: #fff7f7;
  color: var(--next-text);
}

.calculation-issue-list {
  display: grid;
  margin: 0;
  padding: 0 16px 14px;
  list-style: none;
}

.calculation-issue-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--next-line);
}

.calculation-issue-row > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.calculation-issue-row strong,
.calculation-issue-row span {
  overflow-wrap: anywhere;
}

.calculation-issue-row > div > span {
  color: var(--next-muted);
  font-size: 12px;
}

.calculation-result-overview {
  display: grid;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--next-line);
  border-radius: 14px;
  background: #fff;
}

.calculation-result-overview h3 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 850;
}

.calculation-result-overview p {
  max-width: 760px;
  margin: 0;
  color: var(--next-muted);
}

.calculation-result-totals {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.calculation-result-totals .metric-card {
  min-height: 96px;
  padding: 14px;
  box-shadow: none;
}

.calculation-result-totals .metric-card strong {
  font-size: 20px;
}

.calculation-result-table {
  overflow: auto;
  border: 1px solid var(--next-line);
  border-radius: 14px;
  background: #fff;
}

.calculation-result-table table {
  min-width: 920px;
}

.calculation-result-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff;
}

.calculation-result-table td strong,
.calculation-result-table td small {
  display: block;
}

.calculation-result-table td small {
  color: var(--next-muted);
  font-size: 12px;
}

.calculation-detail-row td {
  padding-top: 0;
  background: #f8fafc;
}

.calculation-breakdown {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}

.calculation-breakdown-line {
  display: grid;
  grid-template-columns: minmax(150px, .24fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.calculation-breakdown-line strong,
.calculation-breakdown-stores strong {
  color: var(--next-text);
  font-size: 13px;
}

.calculation-breakdown-line span,
.calculation-breakdown-stores span {
  color: #475569;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.calculation-breakdown-stores {
  display: grid;
  grid-template-columns: minmax(150px, .24fr) minmax(0, 1fr);
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--next-line);
}

.calculation-breakdown-stores div {
  display: grid;
  gap: 4px;
}

@media (max-width: 1100px) {
  .next-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    align-content: start;
  }

  .next-sidebar {
    position: sticky;
    top: 0;
    z-index: 100;
    align-self: start;
    overflow-anchor: none;
    min-height: var(--ops-mobile-bar-height);
    display: block;
    padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px;
  }

  .next-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    min-width: 0;
  }

  .mobile-nav-toggle {
    display: inline-flex;
    flex: 0 0 auto;
  }

  .next-sidebar .nav {
    display: flex !important;
    width: min(336px, calc(100vw - 20px));
    max-height: none;
    gap: 10px !important;
    padding: 16px 14px max(18px, env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .next-module-switch {
    grid-column: 1 / -1;
    margin-bottom: 0;
  }

  .next-sidebar.nav-open .nav {
    display: flex !important;
  }

  .next-sidebar .nav-link {
    width: 100%;
  }

  .nav-group-label {
    margin-top: 4px;
  }

  .next-sidebar .btn {
    margin-top: 0 !important;
  }

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

  .metric-grid-three .metric-card:last-child {
    min-height: 92px;
    grid-column: 1 / -1;
  }

  .seller-kpi-hero {
    grid-template-columns: 1fr;
  }

  .seller-preview-card .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calculation-result-totals {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .import-run-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 900px) {
  .plan-forecast-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .plan-store-grid {
    grid-template-columns: 1fr;
  }

  .shift-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shift-filter-grid.is-history {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #salesTable,
  #shiftsTable.mobile-progressive-table {
    max-height: none;
  }

  #salesTable.mobile-progressive-table:not(.mobile-table-expanded) tbody tr:nth-child(n + 6),
  #shiftsTable.mobile-progressive-table:not(.mobile-table-expanded) tbody tr:nth-child(n + 6) {
    display: none;
  }

  .mobile-table-footer {
    display: flex;
    justify-content: center;
    padding: 12px;
    border-top: 1px solid var(--next-line);
    background: #fff;
  }

  .mobile-table-footer .btn {
    width: 100%;
  }

  .mobile-table-expanded [data-mobile-table-collapsed] {
    display: none;
  }

  .mobile-table-expanded [data-mobile-table-expanded] {
    display: inline;
  }

  .people-directory-list {
    grid-template-columns: 1fr;
  }

  .people-employee-main strong {
    display: -webkit-box;
    overflow: hidden;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

}

@media (max-width: 920px) {
  .plans-page-head {
    align-items: stretch;
    flex-direction: column;
  }

  .plan-month-toolbar {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 1.25fr) minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .plan-month-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .plan-month-field {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .plan-month-arrow {
    grid-row: 2;
  }

  #planPrevMonthButton {
    grid-column: 1;
  }

  #planNextMonthButton {
    grid-column: 2;
  }

  .plan-store-grid {
    padding: 10px;
  }

  .plan-store-card {
    min-height: 0;
    padding: 14px;
  }

  .plan-store-card-head {
    display: grid;
  }

  .plan-store-amount {
    white-space: normal;
  }

  .plan-store-actions,
  .plan-store-actions .btn,
  .plan-store-create {
    width: 100%;
  }

  .next-sidebar {
    padding: calc(12px + env(safe-area-inset-top, 0px)) 14px 12px;
  }

  .next-sidebar .nav {
    gap: 8px !important;
    width: min(326px, calc(100vw - 16px));
    max-height: none;
    padding: 16px 12px max(18px, env(safe-area-inset-bottom, 0px));
  }

  .next-sidebar .nav-link {
    padding: 10px 12px;
  }

  .nav-group-label {
    display: block;
    margin: 8px 10px 2px;
  }

  .people-employee-details {
    grid-template-columns: 1fr;
    padding-left: 14px;
  }

  .people-employee-actions {
    padding-left: 14px;
  }

  .people-employee-actions .btn {
    width: 100%;
  }

  .people-directory-head,
  .directory-section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .people-directory-head-actions {
    width: 100%;
  }

  .people-directory-head-actions .btn,
  .directory-section-heading .btn {
    min-height: 44px;
  }

  .seller-store-toolbar,
  .seller-store-checklist {
    grid-template-columns: 1fr;
  }

  .directory-schedule-decision-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .directory-schedule-decision-actions .btn {
    width: 100%;
    min-height: 44px;
  }

  .directory-schedule-mapping-row,
  .directory-assignment-plan-row,
  .directory-store-start,
  .directory-store-closure-row {
    grid-template-columns: 1fr;
  }

  .directory-schedule-mapping-arrow {
    display: none;
  }

  .directory-assignment-plan-row .btn {
    width: 100%;
    min-height: 44px;
  }

  .directory-store-closure-row .btn {
    width: 100%;
    min-height: 44px;
  }

  .seller-store-checklist {
    max-height: none;
    overflow: visible;
  }

  .store-directory-controls {
    grid-template-columns: 1fr;
  }

  .seller-password-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 8px;
  }

  .seller-password-control .form-control {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    min-height: 44px;
    font-size: 16px;
    border-radius: var(--bs-border-radius) !important;
  }

  .seller-password-control .btn {
    margin: 0 !important;
    border-radius: var(--bs-border-radius) !important;
  }

  #sellerPasswordToggleButton { grid-column: 2; grid-row: 1; width: 44px; color: #526171; background: #f7faf8; }
  #sellerPasswordGenerateButton { grid-column: 1 / -1; justify-self: start; width: auto; }

  .next-main {
    padding: 14px;
  }

  .next-topbar {
    align-items: flex-start;
  }

  .next-user {
    align-items: flex-start;
    margin-left: auto;
  }

  .next-user #sessionUser {
    display: none;
  }

  .calculation-period-heading {
    display: grid;
  }

  .calculation-period-heading .btn {
    width: 100%;
  }

  .control-card .card-body {
    padding: 12px;
  }

  .period-range {
    min-height: 0;
    padding: 10px 12px;
  }

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

  .metric-card {
    min-height: 104px;
    padding: 12px;
  }

  .metric-card strong {
    overflow-wrap: normal;
    word-break: normal;
    font-size: 20px;
  }

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

  .seller-kpi-detail-head,
  .seller-shift-card {
    grid-template-columns: 1fr;
  }

  .seller-kpi-detail-head {
    display: grid;
  }

  .seller-kpi-detail-head strong {
    white-space: normal;
  }

  .seller-kpi-facts {
    grid-template-columns: 1fr;
  }

  .seller-period-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .seller-period-actions {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
  }

  .manager-week-progress-head {
    align-items: stretch;
    flex-direction: column;
  }

  .manager-week-switcher {
    flex: none;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    width: 100%;
  }

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

  .manager-week-day summary,
  .manager-week-day-empty {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }

  .manager-week-day summary::after {
    grid-column: 2;
    grid-row: 1;
  }

  .manager-week-day-metrics {
    grid-column: 1 / -1;
  }

  .manager-week-store-list {
    margin-left: 6px;
  }

  .manager-week-store-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .seller-kpi-breakdown summary {
    padding: 13px 14px;
  }

  .seller-kpi-breakdown-body {
    padding: 0 14px 14px;
  }

  .seller-shift-status {
    justify-self: start;
  }

  .seller-preview-card .metric-grid {
    grid-template-columns: 1fr;
  }

  .overview-period-toolbar {
    display: grid;
    padding: 14px;
  }

  .overview-period-toolbar-text,
  .overview-month-navigator {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .overview-period-controls {
    grid-template-columns: 1fr;
    min-width: 0;
  }

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

  .overview-period-controls .btn {
    width: 100%;
  }

  .overview-period-presets {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .overview-period-option {
    width: 100%;
  }

  .sales-period-toolbar {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .sales-period-presets {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .overview-range-modal-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .overview-calendar-panel,
  .overview-range-fields {
    padding: 12px;
    border-radius: 14px;
  }

  .overview-calendar-day {
    border-radius: 10px;
  }

  .overview-range-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .shift-period-toolbar {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .shift-period-controls {
    grid-template-columns: 1fr;
  }

  .shift-period-stepper {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shift-filter-grid {
    grid-template-columns: 1fr;
  }

  .shift-filter-grid.is-history {
    grid-template-columns: 1fr;
  }

  .shift-workflow-tabs {
    gap: 5px;
  }

  .shift-workflow-tab {
    min-height: 48px;
    place-items: center;
    padding: 8px 5px;
    text-align: center;
  }

  .shift-workflow-tab strong {
    font-size: 12px;
    line-height: 1.2;
  }

  .shift-workflow-tab span {
    display: none;
  }

  .shift-workflow-tab.active {
    box-shadow: inset 0 -3px 0 #15803d;
  }

  .shift-view-tabs {
    width: 100%;
    max-width: none;
  }

  .shift-view-tab {
    min-height: 48px;
    padding: 7px 5px;
    font-size: 13px;
  }

  .schedule-calendar {
    padding: 10px;
  }

  .schedule-calendar-head {
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    gap: 7px;
    margin-bottom: 10px;
  }

  .schedule-calendar-head strong {
    font-size: 17px;
  }

  .schedule-calendar-head small {
    display: none;
  }

  .schedule-calendar-nav {
    width: 42px;
    height: 42px;
  }

  .schedule-calendar-weekdays,
  .schedule-calendar-grid {
    gap: 3px;
  }

  .schedule-calendar-weekdays span {
    padding-inline: 0;
    font-size: 10px;
  }

  .schedule-calendar-day,
  .schedule-calendar-spacer {
    min-height: 56px;
  }

  .schedule-calendar-day {
    gap: 3px;
    padding: 5px;
  }

  .schedule-calendar-day time {
    width: 24px;
    height: 24px;
    font-size: 12px;
  }

  .schedule-calendar-count {
    min-width: 20px;
    height: 20px;
    padding-inline: 5px;
    font-size: 10px;
  }

  .schedule-calendar-day-copy {
    display: none;
  }

  .schedule-day-detail-head,
  .schedule-day-row {
    align-items: stretch;
    flex-direction: column;
    padding: 14px;
  }

  .schedule-day-detail-head .btn,
  .schedule-day-row .btn-group,
  .schedule-day-row .btn {
    width: 100%;
  }

  .schedule-day-row .btn-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .schedule-day-empty,
  .schedule-day-note {
    padding: 12px 14px 16px;
  }

  .shift-modal-calendar {
    padding: 8px;
  }

  .shift-modal .modal-dialog {
    width: 100%;
    height: 100dvh;
    min-height: 100dvh;
    margin: 0;
  }

  .shift-modal .modal-content {
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }

  .shift-modal .modal-header {
    flex: 0 0 auto;
    padding: 18px 16px 14px;
  }

  .shift-modal .shift-form-scroll {
    padding: 16px;
  }

  .shift-modal-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .shift-modal-actions .btn {
    min-width: 0;
    padding-inline: 8px;
    white-space: normal;
  }

  .shift-modal-legend {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px 8px;
  }

  .shift-manual-range-fields {
    grid-template-columns: 1fr;
  }

  .shift-modal-footer {
    grid-template-columns: 1fr;
    padding: 12px 16px max(12px, env(safe-area-inset-bottom)) !important;
  }

  .shift-modal-footer-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }

  .shift-modal-footer-actions .btn {
    white-space: normal;
  }

  .overview-analytics-card {
    padding: 14px;
  }

  .overview-analytics-card-wide {
    min-height: 0;
  }

  .overview-revenue-card-head {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .overview-comparison-summary {
    padding: 7px 0 7px 12px;
  }

  .overview-executive-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .overview-executive-metric {
    padding-inline: 10px;
  }

  .overview-executive-metric:first-child {
    grid-column: 1 / -1;
    padding: 0 0 12px;
    border-bottom: 1px solid var(--next-line);
  }

  .overview-executive-metric:nth-child(2) {
    padding: 12px 10px 0 0;
    border-left: 0;
  }

  .overview-executive-metric:nth-child(3) {
    padding: 12px 0 0 10px;
  }

  .overview-executive-metric dd {
    font-size: 16px;
  }

  .overview-executive-insight,
  .overview-chart-toolbar,
  .overview-chart-modebar,
  .overview-store-trend-toolbar,
  .overview-store-trend-context {
    display: grid;
  }

  .overview-executive-insight {
    gap: 5px;
  }

  .overview-executive-insight small {
    text-align: left;
  }

  .overview-chart-peak {
    justify-content: space-between;
  }

  .overview-chart-modebar {
    gap: 8px;
  }

  .overview-company-delta-toolbar {
    justify-content: stretch;
  }

  .overview-company-delta-toolbar .overview-chart-segmented {
    width: 100%;
  }

  .overview-chart-segmented {
    width: 100%;
  }

  .overview-chart-segmented-button {
    min-width: 0;
    padding-inline: 8px;
    white-space: normal;
  }

  .overview-store-trend-context {
    gap: 8px;
  }

  .overview-store-trend-context-current {
    padding-right: 0;
    padding-bottom: 8px;
    border-right: 0;
    border-bottom: 1px solid var(--next-line);
  }

  .overview-actions-panel .btn {
    min-height: 44px;
  }

  .overview-store-trend-head .overview-product-detail-action,
  .overview-store-trend-toolbar .overview-product-detail-action {
    justify-self: start;
  }

  .overview-store-trend-ranking-head {
    flex-direction: column;
    align-items: stretch;
    padding-inline: 4px;
  }

  .overview-store-trend-ranking-actions {
    align-items: end;
  }

  .overview-store-trend-sort-control {
    min-width: 0;
    flex: 1 1 auto;
  }

  .overview-store-trend-table-head {
    display: none;
  }

  .overview-store-trend-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px 12px;
    min-height: 0;
    padding: 12px 4px;
  }

  .overview-store-trend-row-values {
    grid-column: 1 / -1;
    grid-row: 2;
    gap: 6px 14px;
  }

  .overview-store-trend-row-change {
    grid-column: 2;
    grid-row: 1;
  }

  .overview-store-trend-scope-status {
    display: grid;
  }

  .overview-analytics-head {
    display: grid;
  }

  .overview-analytics-head h2 {
    font-size: 26px;
  }

  .overview-analytics-head small {
    max-width: none;
    text-align: left;
  }

  .overview-analytics-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .overview-compare-row,
  .overview-compare-toolbar {
    display: grid;
    width: 100%;
  }

  .overview-compare-toolbar > summary {
    justify-content: space-between;
    width: 100%;
  }

  .overview-compare-options {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .overview-compare-button {
    width: 100%;
  }

  .overview-trend-chart {
    min-height: 318px;
  }

  .overview-trend-chart svg {
    height: 290px;
  }

  .overview-revenue-chart-stores svg {
    height: 310px;
  }

  .overview-store-series-legend {
    grid-template-columns: 1fr;
  }

  .overview-store-series-legend-item {
    min-height: 38px;
  }

  .overview-store-series-legend-item > span:nth-child(2) {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.2;
  }

  .overview-store-series-caption {
    display: grid;
    justify-items: stretch;
  }

  .overview-store-series-caption button {
    width: 100%;
  }

  .overview-chart-tooltip {
    width: min(260px, calc(100% - 24px));
    transform: translate(-50%, calc(-100% - 10px));
  }

  .overview-donut-stage {
    width: min(100%, 260px);
  }

  .overview-donut-center strong {
    font-size: 15px;
  }

  .overview-store-legend {
    grid-template-columns: 1fr;
  }

  .overview-store-benchmark-metrics {
    grid-template-columns: 1fr;
  }

  .overview-data-coverage-warning {
    align-items: stretch;
    flex-direction: column;
    gap: 3px;
  }

  .import-run-grid {
    grid-template-columns: 1fr;
  }

  .shift-queue-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .shift-attention-group > summary {
    align-items: start;
    padding: 12px;
  }

  .shift-attention-list {
    grid-template-columns: 1fr;
    padding: 8px;
  }

  .shift-queue-store-card .btn {
    justify-self: stretch;
  }

  .calculation-primary-actions {
    grid-template-columns: 1fr;
  }

  .calculation-type-group {
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  }

  .calculation-type-group .calculation-type-button span {
    font-size: 15px;
    white-space: nowrap;
  }

  .calculation-issue-head {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .calculation-issue-head > .btn {
    width: 100%;
  }

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

  .calculation-issue-row > .btn {
    grid-column: 1 / -1;
    width: 100%;
  }

  .calculation-result-totals {
    grid-template-columns: 1fr;
  }

  .calculation-result-table table {
    min-width: 0;
  }

  .plans-workspace-head,
  .plan-role-section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .plans-workspace-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .people-directory-controls {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .people-role-tabs .calculation-type-button {
    display: grid;
    min-height: 60px;
    grid-template-columns: 1fr;
    gap: 2px;
    align-content: center;
    align-items: start;
  }

  .people-role-tabs .calculation-type-button small {
    justify-self: start;
  }

  .people-directory-list {
    grid-template-columns: 1fr;
    padding: 0 12px 12px;
  }

  .people-directory-hint {
    padding: 0 12px 10px;
  }

  .people-employee-card summary {
    grid-template-columns: 38px minmax(0, 1fr) auto 16px;
    min-height: 64px;
    padding: 10px;
  }

  .people-employee-main strong {
    -webkit-line-clamp: 3;
  }

  .people-avatar {
    width: 38px;
    height: 38px;
  }

  .people-employee-details {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .people-directory-footer {
    padding-inline: 12px;
  }

  .plan-type-group {
    width: 100%;
  }

  .plan-type-group .calculation-type-button {
    padding-inline: 8px;
    font-size: 15px;
  }

  .plan-role-section {
    padding: 14px;
  }

  .plan-forecast-grid {
    grid-template-columns: 1fr;
  }

  .plan-card-main,
  .plan-card-details {
    grid-template-columns: 1fr;
  }

  .plan-card-main {
    display: grid;
  }

  .store-directory-card-head {
    display: flex;
  }

  .result-breakdown-row {
    flex-direction: column;
  }

  .result-breakdown-row div:last-child {
    justify-items: start;
    text-align: left;
  }

  .seller-preview-breakdown-meta {
    justify-content: flex-start;
    text-align: left;
  }

  .plan-card-amount {
    white-space: normal;
  }

  #salesTable,
  #shiftsTable.mobile-progressive-table {
    max-height: none;
    overflow: visible;
  }

  #salesTable table,
  #salesTable thead,
  #salesTable tbody,
  #salesTable tr,
  #salesTable th,
  #salesTable td,
  #shiftsTable table,
  #shiftsTable thead,
  #shiftsTable tbody,
  #shiftsTable tr,
  #shiftsTable th,
  #shiftsTable td {
    display: block;
  }

  #salesTable table,
  #shiftsTable table {
    border-collapse: separate;
    border-spacing: 0;
  }

  #salesTable thead,
  #shiftsTable thead {
    display: none;
  }

  #salesTable tbody,
  #shiftsTable tbody {
    display: grid;
    gap: 12px;
  }

  #salesTable tr,
  #shiftsTable tr {
    border: 1px solid var(--next-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--next-shadow);
    overflow: hidden;
  }

  #salesTable td,
  #shiftsTable td {
    display: grid;
    grid-template-columns: minmax(96px, 38%) minmax(0, 1fr);
    gap: 10px;
    border-bottom: 1px solid var(--next-line);
    padding: 10px 12px;
    white-space: normal;
  }

  #salesTable td:last-child,
  #shiftsTable td:last-child {
    border-bottom: 0;
  }

  #salesTable td::before,
  #shiftsTable td::before {
    content: attr(data-label);
    color: var(--next-muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
  }

  #salesTable tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #salesTable td {
    grid-template-columns: 1fr;
    gap: 3px;
    padding: 9px 10px;
  }

  #salesTable td:nth-child(2) {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  #calculationResultTable .calculation-detail-row td {
    grid-template-columns: 1fr;
  }

  #calculationResultTable .calculation-detail-row td::before {
    margin-bottom: 2px;
  }

  .calculation-breakdown-line,
  .calculation-breakdown-stores {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  #salesTable .btn-group,
  #shiftsTable .btn-group {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
  }


}

@media (max-width: 340px) {
  .mobile-nav-toggle {
    width: 42px;
    padding-inline: 8px;
  }

  .mobile-nav-toggle-label {
    display: none;
  }

  .metric-card strong {
    font-size: 18px;
  }

  .overview-analytics-metrics {
    grid-template-columns: 1fr;
  }

  .manager-week-day-metrics {
    gap: 6px;
  }

  .manager-week-day-metrics dd {
    font-size: 13px;
    white-space: nowrap;
    overflow-wrap: normal;
  }

  .manager-month-summary dd {
    font-size: 15px;
  }

}

#calculationSection > .row,
#storesSection > .row {
  margin-right: 0;
  margin-left: 0;
}

@media (max-width: 480px) {
  .next-topbar h1 {
    font-size: 24px;
    overflow-wrap: normal;
    word-break: normal;
  }

  .sales-workspace-head .card-body {
    padding: 18px 16px;
  }

  .sales-sync-action {
    width: 100%;
  }

  .sales-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .sales-pagination-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .import-log-summary {
    padding: 14px 16px;
  }

}

.period-picker-source {
  display: none !important;
}

.period-picker-trigger {
  align-items: center;
  background: #fff;
  border: 1px solid #ced8cb;
  border-radius: 8px;
  color: #16251c;
  display: flex;
  font: inherit;
  font-weight: 700;
  justify-content: space-between;
  min-height: 48px;
  padding: 10px 14px;
  text-align: left;
  width: 100%;
}

.period-picker-trigger:hover:not(:disabled) {
  border-color: #178345;
}

.period-picker-trigger:focus-visible {
  border-color: #178345;
  box-shadow: 0 0 0 3px rgba(23, 131, 69, 0.16);
  outline: 0;
}

.period-picker-trigger:disabled {
  background: #f3f5f2;
  color: #7b867e;
}

.period-picker-trigger-label {
  min-width: 0;
  overflow-wrap: normal;
}

.period-picker-trigger-icon {
  color: #4c5d52;
  flex: 0 0 auto;
  font-size: 20px;
  margin-left: 12px;
}

.period-picker-dialog {
  background: #fff;
  border: 0;
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(19, 35, 25, 0.24);
  color: #16251c;
  margin: auto;
  max-height: min(760px, calc(100dvh - 32px));
  max-width: 560px;
  padding: 0;
  width: calc(100% - 32px);
}

.period-picker-dialog::backdrop {
  background: rgba(12, 21, 16, 0.58);
}

.period-picker-dialog-head {
  align-items: flex-start;
  border-bottom: 1px solid #e2e9e0;
  display: flex;
  justify-content: space-between;
  padding: 20px 22px 16px;
}

.period-picker-eyebrow {
  color: #178345;
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 3px;
  text-transform: uppercase;
}

.period-picker-title {
  font-size: 22px;
  margin: 0;
}

.period-picker-close {
  align-items: center;
  background: transparent;
  border: 0;
  color: #5d685f;
  display: inline-flex;
  font-size: 30px;
  height: 40px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 40px;
}

.period-picker-years {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 14px 22px 4px;
}

.period-picker-year {
  background: #f2f6f1;
  border: 1px solid #dce6da;
  border-radius: 7px;
  color: #34473a;
  font-weight: 700;
  min-height: 38px;
  padding: 7px 13px;
}

.period-picker-year.active {
  background: #e2f7e8;
  border-color: #79c992;
  color: #0b6d34;
}

.period-picker-list {
  max-height: calc(100dvh - 180px);
  overflow-y: auto;
  padding: 10px 22px 24px;
  overscroll-behavior: contain;
}

.period-picker-month-group + .period-picker-month-group {
  margin-top: 18px;
}

.period-picker-month-group h4 {
  color: #69766d;
  font-size: 13px;
  font-weight: 800;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.period-picker-options {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.period-picker-option {
  align-items: flex-start;
  background: #fff;
  border: 1px solid #dce4da;
  border-radius: 8px;
  color: #1b2b20;
  display: flex;
  flex-direction: column;
  font: inherit;
  font-weight: 700;
  justify-content: center;
  min-height: 52px;
  padding: 10px 12px;
  text-align: left;
}

.period-picker-option:hover:not(:disabled) {
  background: #f5faf5;
  border-color: #80bd91;
}

.period-picker-option.active {
  background: #e7f8eb;
  border-color: #2dac5b;
  box-shadow: inset 0 0 0 1px #2dac5b;
  color: #075f2b;
}

.period-picker-option small {
  color: #9c4a23;
  font-size: 12px;
  font-weight: 600;
  margin-top: 3px;
}

.period-picker-option:disabled {
  background: #f4f5f4;
  color: #7f8881;
  cursor: not-allowed;
}

.period-picker-empty {
  color: #69766d;
  margin: 16px 0 0;
}

.calculation-period-status {
  align-items: center;
  background: #f2f6f3;
  border: 1px solid #dce6de;
  border-radius: 8px;
  color: #425248;
  display: inline-flex;
  font-size: 14px;
  gap: 10px;
  line-height: 1.4;
  max-width: 100%;
  padding: 9px 12px;
}

.calculation-period-status[data-state="loading"] {
  background: #eef7f0;
  border-color: #bcdcc5;
  color: #195f35;
}

.calculation-period-status[data-state="warning"] {
  background: #fff8e8;
  border-color: #ead29a;
  color: #705019;
}

.calculation-period-status[data-state="info"] {
  background: #f1f6f3;
  border-color: #cfddd2;
}

.calculation-period-spinner {
  animation: calculation-period-spin 0.8s linear infinite;
  border: 2px solid rgba(25, 95, 53, 0.22);
  border-radius: 50%;
  border-top-color: #178345;
  flex: 0 0 16px;
  height: 16px;
  width: 16px;
}

@keyframes calculation-period-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .calculation-period-spinner { animation: none; }

}

@media (max-width: 575px) {
  .period-picker-dialog {
    border-radius: 12px 12px 0 0;
    margin: auto 0 0;
    max-height: calc(100dvh - 12px);
    width: 100%;
  }

  .period-picker-dialog-head {
    padding: 18px 18px 14px;
  }

  .period-picker-years {
    padding: 12px 18px 2px;
  }

  .period-picker-list {
    max-height: calc(100dvh - 150px);
    padding: 10px 18px 22px;
  }

  .period-picker-options {
    grid-template-columns: 1fr;
  }

  .period-picker-option {
    min-height: 48px;
  }

}
#employeeNameMatches .btn { white-space: normal; overflow-wrap: anywhere; max-width: 100%; }
#sellerPasswordToggleButton { min-width: 44px; min-height: 44px; }
#sellerEditorModal.employee-password-reset-modal .modal-dialog { max-width: 560px; }
#sellerEditorModal.employee-password-reset-modal .modal-title { overflow-wrap: anywhere; }

.shift-day-history { margin-top: 16px; border-top: 1px solid #dbe3ea; padding-top: 12px; }
.shift-day-history summary, .schedule-notifications summary { cursor: pointer; font-weight: 650; min-height: 44px; padding: 10px 0; }
.shift-day-history article { display: grid; gap: 6px; padding: 12px 0; border-top: 1px solid #e6ebef; overflow-wrap: anywhere; }
.shift-day-history article span { color: #526271; }
.shift-day-pending .seller-transfer-actions { flex-wrap: wrap; }
.shift-day-confirm-actions .btn { min-height: 44px; white-space: normal; overflow-wrap: anywhere; }
.schedule-notifications { margin-bottom: 16px; border-bottom: 1px solid #dbe3ea; }
.schedule-notifications summary span { margin-left: 8px; color: #107d44; }
.schedule-notifications-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.schedule-notifications-toolbar [role="status"] { color: #9a4a13; }
[data-schedule-notification-list] { position: relative; max-height: 420px; overflow: auto; overscroll-behavior: contain; }
.schedule-notifications-footer { display: flex; justify-content: center; }
.schedule-notifications-footer .btn { min-height: 44px; margin: 8px 0; }
.schedule-notification { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 12px; border-top: 1px solid #e6ebef; }
.schedule-notification.is-unread { border-left: 3px solid #107d44; background: #f2faf6; }
.schedule-notification strong, .schedule-notification small { display: block; overflow-wrap: anywhere; }
.schedule-notification small { color: #526271; margin: 4px 0; }
.schedule-notification p { margin: 0; overflow-wrap: anywhere; }
.schedule-notification-actions { display: flex; flex-wrap: wrap; align-content: start; gap: 8px; }
.schedule-notification-actions .btn { min-height: 44px; white-space: normal; }
@media (max-width: 575px) {
  .schedule-notification { grid-template-columns: minmax(0, 1fr); padding: 12px 8px; }
  .schedule-notification-actions .btn { flex: 1 1 120px; }
}
