/**
 * Planogram Lab — Tool Stylesheet (main_planogram_lab.css)
 * Realistic Commercial Glass-Door Cooler, Wire Rack Shelves, Price-Tag Molding Rails,
 * and 3D Cylindrical Beverage Can Styling.
 * Adheres to MktPraxis Design System tokens & Universal Accessibility Contrast Rules.
 */

:root {
  --pl-cooler-frame: #0b1120;
  --pl-cooler-bezel: #1e293b;
  --pl-cooler-interior-top: #0f172a;
  --pl-cooler-interior-mid: #1e293b;
  --pl-cooler-interior-bot: #090d16;
  --pl-shelf-wire: #e2e8f0;
  --pl-shelf-rail: #1e293b;
  --pl-zone-eye-bg: #eff6ff;
  --pl-zone-eye-border: #2563eb;
  --pl-light-green-bg: #dcfce7;
  --pl-light-green-text: #14532d;
  --pl-light-green-border: #16a34a;
  --pl-light-amber-bg: #fef3c7;
  --pl-light-amber-text: #78350f;
  --pl-light-amber-border: #d97706;
  --pl-light-red-bg: #fee2e2;
  --pl-light-red-text: #7f1d1d;
  --pl-light-red-border: #dc2626;
}

.planogram-hero-figure {
  margin: 0 0 1rem 0;
  border: 1px solid var(--app-border, #d6dfea);
  border-radius: 10px;
  background: #ffffff;
  padding: 0.5rem;
  overflow: hidden;
}

.planogram-hero-canvas {
  display: block;
  width: 100%;
  max-width: 804px;
  height: auto;
  aspect-ratio: 804 / 204;
  margin: 0 auto;
}

/* KPI Strip */
.pl-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.pl-kpi-card {
  background: var(--app-card-bg, #ffffff);
  border: 1px solid var(--app-border, #d6dfea);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
}

.pl-kpi-card__question {
  font-size: 0.78rem;
  color: var(--app-muted, #5f6b7a);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.25rem;
}

.pl-kpi-card__value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--app-text, #1f2a37);
  line-height: 1.2;
}

.pl-kpi-card__sub {
  font-size: 0.76rem;
  color: var(--app-muted, #5f6b7a);
  margin-top: 0.2rem;
}

/* Workbench Toolbar */
.pl-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border: 1px solid var(--app-border, #d6dfea);
  border-radius: 8px;
  margin-bottom: 0.75rem;
}

.pl-toolbar__group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.pl-btn-secondary {
  background: #ffffff;
  color: var(--app-text, #1f2a37);
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.pl-btn-secondary:hover:not(:disabled),
.pl-btn-secondary:focus-visible {
  background: #f1f5f9;
  color: var(--app-text, #1f2a37);
  border-color: #94a3b8;
}

.pl-btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  color: var(--app-muted, #5f6b7a);
}

/* Status / Validation Banner */
.pl-feedback-banner {
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 1rem;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: var(--app-text, #1f2a37);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.pl-feedback-banner--error {
  background: var(--pl-light-red-bg);
  color: var(--pl-light-red-text);
  border-color: var(--pl-light-red-border);
}

.pl-feedback-banner--success {
  background: var(--pl-light-green-bg);
  color: var(--pl-light-green-text);
  border-color: var(--pl-light-green-border);
}

.pl-feedback-banner--info {
  background: #eff6ff;
  color: #1e3a8a;
  border-color: #93c5fd;
}

/* Full-Card-Width Workbench Layout */
.planogram-workbench {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  width: 100%;
}

/* Fixture Stage & Realistic Commercial Glass-Door Cooler Frame (100% Full Card Width) */
.pl-fixture-panel {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid var(--app-border, #d6dfea);
  border-radius: 12px;
  padding: 0.85rem;
  width: 100%;
  box-sizing: border-box;
}

.pl-cooler-cabinet {
  position: relative;
  background: linear-gradient(180deg, #0f172a 0%, #090d16 50%, #111827 100%);
  border: 6px solid #090d16;
  outline: 2px solid #334155;
  border-radius: 16px;
  padding: 0.85rem 1rem 1.1rem 0.85rem;
  color: #f8fafc;
  box-shadow:
    0 20px 38px rgba(15, 23, 42, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 0 0 2px #1e293b;
  display: block;
  width: 100%;
  box-sizing: border-box;
}

/* Illuminated Commercial Cooler Marquee Header */
.pl-cooler-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.95rem;
  background: linear-gradient(90deg, #090d16 0%, #1e293b 50%, #090d16 100%);
  border: 1px solid #334155;
  border-bottom: 3px solid #38bdf8;
  border-radius: 10px;
  margin-bottom: 0.85rem;
  box-shadow:
    0 4px 14px rgba(56, 189, 248, 0.22),
    inset 0 1px 6px rgba(186, 230, 253, 0.15);
  font-size: 0.84rem;
}

.pl-cooler-header__title {
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #f8fafc;
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.45);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pl-cooler-header__title::before {
  content: '❄';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.2);
  border: 1px solid #38bdf8;
  color: #7dd3fc;
  font-size: 0.78rem;
}

.pl-cooler-header__meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: #cbd5e1;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.76rem;
}

.pl-temp-badge {
  background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  padding: 0.18rem 0.55rem;
  border-radius: 5px;
  border: 1px solid #7dd3fc;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}

/* Shelf Row Layout (Left Zone Instrumentation + Full-Width Refrigerated Shelf Bay) */
.pl-shelf-row {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 0.65rem;
  align-items: stretch;
  margin-bottom: 0.75rem;
  width: 100%;
}

@media (max-width: 640px) {
  .pl-shelf-row {
    grid-template-columns: 118px minmax(0, 1fr);
  }
}

.pl-shelf-gutter {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  color: #f8fafc;
  border: 1px solid #334155;
  border-left: 4px solid #64748b;
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 0.78rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.pl-shelf-gutter--eye {
  background: linear-gradient(180deg, #1e3a8a 0%, #0f172a 100%);
  border-color: #3b82f6;
  border-left-color: #38bdf8;
  box-shadow:
    0 0 12px rgba(56, 189, 248, 0.18),
    inset 0 1px 0 rgba(186, 230, 253, 0.2);
}

.pl-shelf-gutter__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem;
}

.pl-shelf-id {
  font-weight: 800;
  font-size: 0.96rem;
  color: #f8fafc;
  letter-spacing: 0.02em;
}

.pl-zone-badge {
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.12rem 0.42rem;
  border-radius: 4px;
  background: #334155;
  color: #e2e8f0;
  border: 1px solid #475569;
}

.pl-zone-badge--eye {
  background: #0284c7;
  color: #ffffff;
  border-color: #7dd3fc;
}

.pl-shelf-specs {
  font-size: 0.72rem;
  color: #cbd5e1;
  margin: 0.25rem 0;
  line-height: 1.35;
}

/* Space utilization progress bar per shelf */
.pl-util-bar-wrap {
  margin-top: 0.25rem;
}

.pl-util-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.69rem;
  font-weight: 700;
  color: #e2e8f0;
  margin-bottom: 0.18rem;
}

.pl-util-bar {
  height: 6px;
  background: #090d16;
  border: 1px solid #334155;
  border-radius: 999px;
  overflow: hidden;
}

.pl-util-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8 0%, #2563eb 100%);
  border-radius: 999px;
  transition: width 0.2s ease;
}

/* Refrigerated Shelf Bay + Wire Grate + Price-Tag Molding Rail (100% Full Width) */
.pl-shelf-track-wrap {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
  border: 2px solid #334155;
  background: #0b1120;
}

.pl-shelf-track {
  position: relative;
  width: 100%;
  /* Brushed dark stainless cooler interior + perforated back-wall airflow vents + vertical LED side tubes */
  background-color: #111827;
  background-image:
    /* Under-shelf top LED light glow */
    linear-gradient(180deg, rgba(186, 230, 253, 0.22) 0%, rgba(15, 23, 42, 0.0) 26%, rgba(9, 13, 22, 0.65) 100%),
    /* Left and right vertical LED light tubes inside the door mullion */
    linear-gradient(90deg, rgba(224, 242, 254, 0.28) 0px, rgba(224, 242, 254, 0.04) 14px, transparent 40px, transparent calc(100% - 40px), rgba(224, 242, 254, 0.04) calc(100% - 14px), rgba(224, 242, 254, 0.28) 100%),
    /* Subtle stainless back-wall louver lines */
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.025) 0px,
      rgba(255, 255, 255, 0.025) 2px,
      transparent 2px,
      transparent 14px
    );
  border-bottom: none;
  box-sizing: border-box;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.15s ease;
}

.pl-shelf-track--eye {
  background-image:
    linear-gradient(180deg, rgba(56, 189, 248, 0.30) 0%, rgba(15, 23, 42, 0.0) 32%, rgba(9, 13, 22, 0.55) 100%),
    linear-gradient(90deg, rgba(125, 211, 252, 0.35) 0px, rgba(125, 211, 252, 0.05) 18px, transparent 48px, transparent calc(100% - 48px), rgba(125, 211, 252, 0.05) calc(100% - 18px), rgba(125, 211, 252, 0.35) 100%),
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.03) 0px,
      rgba(255, 255, 255, 0.03) 2px,
      transparent 2px,
      transparent 14px
    );
}

/* Subtle glass reflection diagonal sheen across the cooler bay */
.pl-shelf-track::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 0%,
    transparent 38%,
    rgba(255, 255, 255, 0.035) 42%,
    rgba(255, 255, 255, 0.01) 46%,
    transparent 50%
  );
  pointer-events: none;
  z-index: 1;
}

/* White epoxy-coated wire shelf rack at the bottom of the bay where cans sit */
.pl-shelf-wire-rack {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 7px;
  background:
    repeating-linear-gradient(
      90deg,
      #cbd5e1 0px,
      #cbd5e1 2px,
      #f8fafc 2px,
      #f8fafc 8px
    );
  border-top: 2px solid #f1f5f9;
  border-bottom: 2px solid #64748b;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  z-index: 2;
  pointer-events: none;
}

.pl-shelf-track:focus-visible,
.pl-shelf-track--drop-active {
  outline: none;
  box-shadow: inset 0 0 0 3px #38bdf8, inset 0 0 24px rgba(56, 189, 248, 0.35);
}

.pl-shelf-track--locked {
  background: repeating-linear-gradient(
    -45deg,
    #1e293b,
    #1e293b 12px,
    #334155 12px,
    #334155 24px
  );
  cursor: not-allowed;
}

/* Placed SKU Block on Shelf — Cans Sit Flush & Unobstructed on Wire Rack */
.pl-placed-block {
  position: absolute;
  bottom: 5px; /* Sits right on top of the white wire rack */
  box-sizing: border-box;
  background: transparent !important;
  border: none;
  border-radius: 4px 4px 0 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: visible;
  cursor: grab;
  user-select: none;
  z-index: 3;
  transition: left 0.12s ease, width 0.12s ease, transform 0.12s ease, filter 0.12s ease;
}

.pl-placed-block:hover,
.pl-placed-block:focus-within,
.pl-placed-block--selected {
  z-index: 12;
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.65));
}

.pl-placed-block--selected::after {
  content: '';
  position: absolute;
  inset: -2px;
  border: 2px solid #38bdf8;
  border-radius: 6px;
  pointer-events: none;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.45);
}

/* Individual Facing Cells Grid inside a Block — 100% Full Package Height */
.pl-block-facings-grid {
  position: absolute;
  inset: 0;
  display: grid;
  pointer-events: none;
}

.pl-facing-unit {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 1px;
  box-sizing: border-box;
  overflow: visible;
}

.pl-facing-unit__img {
  width: 96%;
  height: 98%;
  object-fit: contain;
  position: relative;
  z-index: 3;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.65));
}

.pl-facing-unit__svg-wrap {
  width: 96%;
  height: 99%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.65));
}

.pl-can-svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

/* Subtle top depth & DOS micro-badges (appear on hover/select so cans stay 100% clean at rest) */
.pl-block-top-badges {
  position: absolute;
  top: -4px;
  left: 2px;
  right: 2px;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.pl-placed-block:hover .pl-block-top-badges,
.pl-placed-block:focus-within .pl-block-top-badges,
.pl-placed-block--selected .pl-block-top-badges {
  opacity: 1;
  transform: translateY(0);
}

.pl-depth-badge {
  background: rgba(9, 13, 22, 0.92);
  color: #e2e8f0;
  border: 1px solid #475569;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.45);
}

.pl-dos-badge {
  font-size: 0.63rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  line-height: 1.2;
  white-space: nowrap;
  border: 1px solid transparent;
}

.pl-dos-badge--green {
  background: var(--pl-light-green-bg);
  color: var(--pl-light-green-text);
  border-color: var(--pl-light-green-border);
}

.pl-dos-badge--amber {
  background: var(--pl-light-amber-bg);
  color: var(--pl-light-amber-text);
  border-color: var(--pl-light-amber-border);
}

.pl-dos-badge--red {
  background: var(--pl-light-red-bg);
  color: var(--pl-light-red-text);
  border-color: var(--pl-light-red-border);
}

/* Floating Quick-Action Pill on Hover / Focus / Selection */
.pl-block-controls {
  position: relative;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
  background: rgba(9, 13, 22, 0.94);
  border: 1px solid #475569;
  border-radius: 5px;
  margin: 0 2px 3px 2px;
  padding: 2px 4px;
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.65);
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.pl-placed-block:hover .pl-block-controls,
.pl-placed-block:focus-within .pl-block-controls,
.pl-placed-block--selected .pl-block-controls {
  opacity: 1;
  transform: translateY(0);
}

.pl-ctrl-btn {
  background: #334155;
  color: #ffffff;
  border: 1px solid #64748b;
  border-radius: 3px;
  width: 19px;
  height: 19px;
  padding: 0;
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.pl-ctrl-btn:hover:not(:disabled),
.pl-ctrl-btn:focus-visible {
  background: #2563eb;
  color: #ffffff;
  border-color: #93c5fd;
}

.pl-ctrl-btn--delist {
  background: #991b1b;
  color: #ffffff;
  border-color: #f87171;
}

.pl-ctrl-btn--delist:hover:not(:disabled) {
  background: #dc2626;
  color: #ffffff;
}

.pl-facing-count-label {
  font-size: 0.66rem;
  font-weight: 800;
  color: #f8fafc;
  padding: 0 2px;
  white-space: nowrap;
}

/* Right-edge drag handle for adding/removing facings */
.pl-resize-handle {
  position: absolute;
  top: 6px;
  right: -2px;
  width: 8px;
  height: calc(100% - 10px);
  cursor: ew-resize;
  background: transparent;
  border-right: 2px solid transparent;
  z-index: 9;
  transition: background-color 0.12s ease, border-color 0.12s ease;
}

.pl-placed-block:hover .pl-resize-handle,
.pl-placed-block--selected .pl-resize-handle {
  border-right-color: rgba(56, 189, 248, 0.75);
}

.pl-resize-handle:hover {
  background: rgba(56, 189, 248, 0.45);
  border-right-color: #38bdf8;
}

/* Authentic Extruded Front Price-Tag Molding Channel under Each Shelf */
.pl-shelf-price-rail {
  position: relative;
  width: 100%;
  height: 30px;
  background: linear-gradient(180deg, #334155 0%, #1e293b 45%, #0f172a 100%);
  border-top: 1px solid #64748b;
  border-bottom: 2px solid #090d16;
  box-sizing: border-box;
  overflow: hidden;
  user-select: none;
}

/* Snap-in Retail Price & DOS Tag on the Shelf Molding Rail */
.pl-rail-tag {
  position: absolute;
  top: 2px;
  bottom: 2px;
  box-sizing: border-box;
  background: #f8fafc;
  color: #0f172a;
  border: 1px solid #94a3b8;
  border-left: 3px solid #2563eb;
  border-radius: 3px;
  padding: 1px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  transition: background-color 0.12s ease, border-color 0.12s ease;
}

.pl-rail-tag:hover,
.pl-rail-tag--selected {
  background: #eff6ff;
  border-color: #2563eb;
}

.pl-rail-tag--green {
  border-left-color: #16a34a;
}

.pl-rail-tag--amber {
  border-left-color: #d97706;
}

.pl-rail-tag--red {
  border-left-color: #dc2626;
  background: #fff1f2;
}

.pl-rail-tag__left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  line-height: 1.05;
}

.pl-rail-tag__price {
  font-size: 0.67rem;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
}

.pl-rail-tag__sku {
  font-size: 0.56rem;
  font-weight: 700;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pl-rail-tag__dot {
  flex-shrink: 0;
  font-size: 0.58rem;
  font-weight: 800;
  padding: 1px 3px;
  border-radius: 3px;
  line-height: 1.1;
}

.pl-rail-tag__dot--green {
  background: var(--pl-light-green-bg);
  color: var(--pl-light-green-text);
  border: 1px solid var(--pl-light-green-border);
}

.pl-rail-tag__dot--amber {
  background: var(--pl-light-amber-bg);
  color: var(--pl-light-amber-text);
  border: 1px solid var(--pl-light-amber-border);
}

.pl-rail-tag__dot--red {
  background: var(--pl-light-red-bg);
  color: var(--pl-light-red-text);
  border: 1px solid var(--pl-light-red-border);
}

/* Ruler ticks under the price molding rail */
.pl-shelf-ruler {
  position: relative;
  width: 100%;
  height: 16px;
  background: #090d16;
  color: #94a3b8;
  font-size: 0.62rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  user-select: none;
  border-top: 1px solid #1e293b;
  box-sizing: border-box;
}

.pl-ruler-tick {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  line-height: 16px;
}

.pl-ruler-tick:first-child {
  transform: translateX(2px);
}

.pl-ruler-tick:last-child {
  transform: translateX(-100%);
}

/* SKU Assortment Tray (Full-Width Multi-Column Assortment Dock) */
.pl-tray-panel {
  background: var(--app-card-bg, #ffffff);
  border: 1px solid var(--app-border, #d6dfea);
  border-radius: 12px;
  padding: 1rem;
  width: 100%;
  box-sizing: border-box;
}

.pl-tray-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.pl-filter-pill {
  background: #f1f5f9;
  color: var(--app-text, #1f2a37);
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.pl-filter-pill:hover:not(.active) {
  background: #e2e8f0;
  color: var(--app-text, #1f2a37);
}

.pl-filter-pill.active {
  background: var(--app-accent, #2a7de1);
  color: #ffffff;
  border-color: var(--app-accent, #2a7de1);
}

.pl-sku-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 0.65rem;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.pl-sku-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: center;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--app-border, #d6dfea);
  border-radius: 9px;
  background: #ffffff;
  cursor: grab;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.pl-sku-card:hover {
  border-color: #94a3b8;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.06);
}

.pl-sku-card--selected {
  border: 2px solid #2563eb;
  background: #eff6ff;
}

.pl-sku-card--delisted {
  background: #f8fafc;
  opacity: 0.88;
  border-style: dashed;
}

.pl-sku-swatch {
  width: 44px;
  height: 82px;
  border-radius: 6px;
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px 4px;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.35);
}

.pl-sku-info__title {
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--app-text, #1f2a37);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.pl-sku-info__meta {
  font-size: 0.75rem;
  color: var(--app-muted, #5f6b7a);
  margin-top: 0.18rem;
  line-height: 1.35;
}

.pl-status-tag {
  font-size: 0.66rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.pl-status-tag--placed {
  background: #dcfce7;
  color: #14532d;
}

.pl-status-tag--delisted {
  background: #e2e8f0;
  color: #334155;
}

.pl-status-tag--new {
  background: #fce7f3;
  color: #831843;
}

.pl-sku-actions {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

/* Capacity & DOS Schedule Table */
.pl-table-wrap {
  overflow-x: auto;
}

.pl-schedule-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.pl-schedule-table th,
.pl-schedule-table td {
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--app-border, #d6dfea);
  text-align: left;
}

.pl-schedule-table th {
  background: #f8fafc;
  font-weight: 700;
  color: var(--app-text, #1f2a37);
  white-space: nowrap;
}

.pl-schedule-table td.num,
.pl-schedule-table th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ─── Pre-Release Drag & Hover Color Cues & Ghost Landing Slot ─── */
.pl-cue-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 0.45rem 0.75rem;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid #334155;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  font-size: 0.74rem;
  color: #e2e8f0;
}

.pl-cue-legend__title {
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.68rem;
}

.pl-cue-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
}

.pl-cue-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
}

.pl-cue-dot--insert {
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.6);
}

.pl-cue-dot--shift {
  background: #38bdf8;
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.6);
}

.pl-cue-dot--swap {
  background: #f59e0b;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.6);
}

.pl-cue-dot--replace {
  background: #f97316;
  box-shadow: 0 0 6px rgba(249, 115, 22, 0.6);
}

.pl-shelf-preview-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 15;
}

.pl-preview-ghost {
  position: absolute;
  bottom: 5px;
  box-sizing: border-box;
  border-radius: 6px 6px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 6px;
  pointer-events: none;
  transition: left 0.1s ease, width 0.1s ease;
}

.pl-preview-ghost--insert {
  background: rgba(34, 197, 94, 0.22);
  border: 2px dashed #4ade80;
  box-shadow: inset 0 0 18px rgba(34, 197, 94, 0.35), 0 0 14px rgba(34, 197, 94, 0.4);
}

.pl-preview-ghost--swap {
  background: rgba(245, 158, 11, 0.22);
  border: 2px dashed #fbbf24;
  box-shadow: inset 0 0 18px rgba(245, 158, 11, 0.35), 0 0 14px rgba(245, 158, 11, 0.45);
}

.pl-preview-ghost--replace {
  background: rgba(249, 115, 22, 0.24);
  border: 2px dashed #fb923c;
  box-shadow: inset 0 0 18px rgba(249, 115, 22, 0.35), 0 0 14px rgba(249, 115, 22, 0.45);
}

.pl-preview-ghost--invalid {
  background: rgba(239, 68, 68, 0.26);
  border: 2px dashed #f87171;
  box-shadow: inset 0 0 18px rgba(239, 68, 68, 0.4), 0 0 14px rgba(239, 68, 68, 0.5);
}

.pl-preview-ghost__pill {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  letter-spacing: 0.03em;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.55);
}

.pl-preview-ghost--insert .pl-preview-ghost__pill {
  background: #14532d;
  color: #dcfce7;
  border: 1px solid #4ade80;
}

.pl-preview-ghost--swap .pl-preview-ghost__pill {
  background: #78350f;
  color: #fef3c7;
  border: 1px solid #fbbf24;
}

.pl-preview-ghost--replace .pl-preview-ghost__pill {
  background: #7c2d12;
  color: #ffedd5;
  border: 1px solid #fb923c;
}

.pl-preview-ghost--invalid .pl-preview-ghost__pill {
  background: #7f1d1d;
  color: #fee2e2;
  border: 1px solid #f87171;
}

/* Color Cues on Existing Placed Blocks During Pre-Release Drag / Hover */
.pl-placed-block--dragging-source {
  opacity: 0.38;
  filter: grayscale(0.35);
}

.pl-block-cue-pill {
  position: absolute;
  top: 38%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 16;
  font-size: 0.64rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.65);
  display: none;
}

.pl-placed-block--cue-shift {
  z-index: 9;
  outline: 2px solid #38bdf8;
  outline-offset: -1px;
  border-radius: 5px;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.55);
}

.pl-placed-block--cue-shift .pl-block-cue-pill {
  display: inline-block;
  background: #0c4a6e;
  color: #e0f2fe;
  border: 1px solid #38bdf8;
}

.pl-placed-block--cue-swap {
  z-index: 10;
  outline: 3px solid #fbbf24;
  outline-offset: -1px;
  border-radius: 5px;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.75);
}

.pl-placed-block--cue-swap .pl-block-cue-pill {
  display: inline-block;
  background: #78350f;
  color: #fef3c7;
  border: 1px solid #fbbf24;
}

.pl-placed-block--cue-replace {
  z-index: 10;
  opacity: 0.58;
  outline: 3px dashed #fb923c;
  outline-offset: -1px;
  border-radius: 5px;
  box-shadow: 0 0 18px rgba(249, 115, 22, 0.75);
}

.pl-placed-block--cue-replace .pl-block-cue-pill {
  display: inline-block;
  background: #7c2d12;
  color: #ffedd5;
  border: 1px solid #fb923c;
}

/* ============================================================================
   Phase 2–4: "Your Gut" Banner, Live Category Analytics, Brand Fair-Share,
   5-Tab Pre-Commit Analysis Lab, Optimizer Toggles & Quarter Simulation Reveal
   ============================================================================ */

.pl-gut-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  margin-bottom: 0.65rem;
  font-size: 0.84rem;
  color: #1e3a8a;
}

.pl-gut-banner--locked {
  background: #f0fdf4;
  border-color: #86efac;
  color: #14532d;
}

.pl-gut-banner__info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.pl-gut-badge {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #93c5fd;
}

.pl-gut-banner--locked .pl-gut-badge {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}

.pl-btn-primary {
  background: #1d4ed8;
  color: #ffffff;
  border: 1px solid #1e40af;
  border-radius: 6px;
  padding: 0.38rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.pl-btn-primary:hover:not(:disabled) {
  background: #1e40af;
  color: #ffffff;
}

.pl-btn-run-sim {
  background: #0f766e;
  color: #ffffff;
  border: 1px solid #115e59;
  border-radius: 8px;
  padding: 0.52rem 1.15rem;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(15, 118, 110, 0.25);
}

.pl-btn-run-sim:hover:not(:disabled) {
  background: #115e59;
  color: #ffffff;
}

.pl-live-analytics-panel {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--app-border, #d6dfea);
}

.pl-live-disclaimer {
  margin: 0.15rem 0 0 0;
  font-size: 0.8rem;
  color: #475569;
  font-style: italic;
}

.pl-fair-share-card {
  margin-top: 0.9rem;
  background: #f8fafc;
  border: 1px solid var(--app-border, #d6dfea);
  border-radius: 10px;
  padding: 0.85rem 1rem;
}

.pl-fs-row {
  display: grid;
  grid-template-columns: 185px minmax(160px, 1fr) 52px 175px;
  align-items: center;
  gap: 0.75rem;
  padding: 0.45rem 0;
  border-bottom: 1px dashed #e2e8f0;
}

.pl-fs-row:last-child {
  border-bottom: none;
}

.pl-fs-brand {
  font-weight: 700;
  font-size: 0.86rem;
  color: #0f172a;
}

.pl-fs-shares {
  font-size: 0.74rem;
  color: #475569;
  margin-top: 0.1rem;
}

.pl-fs-track,
.pl-fs-bar-track {
  position: relative;
  height: 20px;
  background: #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
}

.pl-fs-bar,
.pl-fs-bar-fill {
  height: 100%;
  border-radius: 6px;
  background: #2563eb;
  transition: width 0.2s ease;
}

.pl-fs-bar-fill--parity {
  background: linear-gradient(90deg, #2563eb 0%, #3b82f6 100%);
}

.pl-fs-bar-fill--under {
  background: linear-gradient(90deg, #16a34a 0%, #22c55e 100%);
}

.pl-fs-bar-fill--over {
  background: linear-gradient(90deg, #d97706 0%, #f59e0b 100%);
}

.pl-fs-parity-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #0f172a;
  z-index: 3;
  pointer-events: none;
}

.pl-fs-index-val {
  font-weight: 800;
  font-size: 0.85rem;
  color: #0f172a;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.pl-fs-status {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f1f5f9;
  color: #334155;
  white-space: nowrap;
}

.pl-fs-status--parity {
  background: #eff6ff;
  color: #1e40af;
  border-color: #93c5fd;
}

.pl-fs-status--under {
  background: var(--pl-light-green-bg);
  color: var(--pl-light-green-text);
  border-color: var(--pl-light-green-border);
}

.pl-fs-status--over {
  background: var(--pl-light-amber-bg);
  color: var(--pl-light-amber-text);
  border-color: var(--pl-light-amber-border);
}

.pl-lab-tag {
  display: inline-block;
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 0.22rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
}

/* 5-Tab Pre-Commit Analysis Lab */
.pl-analysis-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.75rem 0 1rem 0;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 0.55rem;
}

.pl-analysis-tab {
  background: #f1f5f9;
  color: #1e293b;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.pl-analysis-tab:hover:not(.active) {
  background: #e2e8f0;
  color: #0f172a;
}

.pl-analysis-tab.active {
  background: #1e3a8a;
  color: #ffffff;
  border-color: #1e3a8a;
}

.pl-analysis-panel {
  background: #f8fafc;
  border: 1px solid var(--app-border, #d6dfea);
  border-radius: 10px;
  padding: 1rem;
}

.pl-panel-intro {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  margin-bottom: 0.9rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e2e8f0;
}

/* Empirical Toggles Grid */
.pl-toggle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 0.75rem;
}

.pl-toggle-card {
  background: #f8fafc;
  border: 1px solid var(--app-border, #d6dfea);
  border-radius: 10px;
  padding: 0.8rem 0.95rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.55rem;
}

.pl-toggle-card__title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.pl-toggle-card__cite {
  font-size: 0.73rem;
  color: #1e40af;
  font-weight: 600;
}

.pl-toggle-card__switches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 0.45rem;
  border-top: 1px dashed #cbd5e1;
  font-size: 0.78rem;
  font-weight: 600;
}

/* Simulation Controls Bar */
.pl-sim-controls-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  background: #f8fafc;
  border: 1px solid var(--app-border, #d6dfea);
  border-radius: 10px;
  padding: 0.75rem 1rem;
}

.pl-sim-controls__group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

@media (max-width: 720px) {
  .pl-fs-row {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }
}

/* Phase 5: Heavy-Duty Retail Gondola Pegboard & Steel Shelving Styling */
.pl-cooler-cabinet--gondola {
  background: linear-gradient(180deg, #1e293b 0%, #334155 100%);
  border-color: #475569;
}

.pl-cooler-cabinet--gondola .pl-shelf-track {
  background-color: #1e293b;
  background-image:
    radial-gradient(#475569 1.3px, transparent 1.3px),
    linear-gradient(180deg, rgba(15, 23, 42, 0.45) 0%, rgba(30, 41, 59, 0.15) 60%, rgba(15, 23, 42, 0.55) 100%);
  background-size: 14px 14px, 100% 100%;
}

.pl-cooler-cabinet--gondola .pl-shelf-wire-rack {
  height: 7px;
  background: linear-gradient(180deg, #cbd5e1 0%, #94a3b8 55%, #475569 100%);
  border-top: 1px solid #f8fafc;
}

/* ============================================================================
   Phase 6: 60-Second Planogram Primer, 3-Step Workflow Strip, Visual-First
   Diagnostic Charts & Progressive Disclosure Drawers
   ============================================================================ */

/* 60-Second Planogram Primer Banner */
.pl-primer-banner {
  background: linear-gradient(180deg, #eff6ff 0%, #f8fafc 100%);
  border: 1px solid #93c5fd;
  border-left: 5px solid #2563eb;
  border-radius: 10px;
  padding: 0.9rem 1.05rem;
  margin-bottom: 1rem;
  color: #0f172a;
}

.pl-primer-banner__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.35rem;
}

.pl-primer-badge {
  background: #1e40af;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.16rem 0.55rem;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

.pl-primer-title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 800;
  color: #1e3a8a;
}

.pl-primer-lead {
  margin: 0 0 0.7rem 0;
  font-size: 0.86rem;
  line-height: 1.45;
  color: #1e293b;
}

.pl-primer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.65rem;
}

.pl-primer-card {
  background: #ffffff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 0.65rem 0.8rem;
}

.pl-primer-card__title {
  font-size: 0.84rem;
  font-weight: 800;
  color: #1e3a8a;
  margin-bottom: 0.25rem;
}

.pl-primer-card__body {
  margin: 0;
  font-size: 0.79rem;
  line-height: 1.4;
  color: #334155;
}

/* 3-Step Beginner Workflow Strip */
.pl-workflow-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.9rem;
}

.pl-workflow-step {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  font-size: 0.8rem;
  line-height: 1.38;
  color: #1e293b;
}

.pl-workflow-step__num {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #1d4ed8;
  color: #ffffff;
  font-weight: 800;
  font-size: 0.76rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

/* Live Shelf Diagnostics & Visual Chart Grids */
.pl-live-shelf-diagnostics {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px dashed #cbd5e1;
}

.pl-visual-diag-grid,
.pl-compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 0.85rem;
}

.pl-visual-diag-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 0.8rem 0.95rem;
}

.pl-visual-diag-card__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  padding-bottom: 0.45rem;
  margin-bottom: 0.45rem;
  border-bottom: 1px solid #e2e8f0;
  color: #0f172a;
}

/* Horizontal Bar Chart Rows (Contained position:relative tracks!) */
.pl-hbar-list {
  max-height: 325px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.pl-hbar-row {
  display: grid;
  grid-template-columns: 185px minmax(110px, 1fr) 115px;
  align-items: center;
  gap: 0.55rem;
  padding: 0.32rem 0.25rem;
  border-bottom: 1px dashed #f1f5f9;
  font-size: 0.78rem;
  border-radius: 5px;
}

.pl-hbar-row--clickable {
  cursor: pointer;
  transition: background 0.15s ease;
}

.pl-hbar-row--clickable:hover {
  background: #eff6ff;
}

.pl-hbar-row--selected {
  background: #dbeafe;
  outline: 1px solid #60a5fa;
}

.pl-hbar-row:last-child {
  border-bottom: none;
}

.pl-hbar-label {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
  color: #0f172a;
}

.pl-hbar-sub {
  font-size: 0.69rem;
  color: #475569;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pl-hbar-track {
  position: relative;
  height: 16px;
  background: #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
}

.pl-hbar-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.2s ease;
}

.pl-hbar-fill--emerald {
  background: linear-gradient(90deg, #16a34a 0%, #22c55e 100%);
}

.pl-hbar-fill--blue {
  background: linear-gradient(90deg, #2563eb 0%, #3b82f6 100%);
}

.pl-hbar-fill--amber {
  background: linear-gradient(90deg, #d97706 0%, #f59e0b 100%);
}

.pl-hbar-fill--red {
  background: linear-gradient(90deg, #dc2626 0%, #ef4444 100%);
}

.pl-hbar-fill--red-striped {
  background: repeating-linear-gradient(
    -45deg,
    #dc2626,
    #dc2626 6px,
    #991b1b 6px,
    #991b1b 12px
  );
}

.pl-hbar-refline {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #0f172a;
  z-index: 3;
  pointer-events: none;
}

.pl-hbar-refline--danger {
  background: #991b1b;
}

.pl-hbar-refline--safe {
  background: #14532d;
}

.pl-hbar-val {
  text-align: right;
  font-weight: 800;
  font-size: 0.76rem;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.pl-hbar-val--badge {
  font-size: 0.72rem;
}

/* Progressive Disclosure Drawers (.pl-advanced-drawer) */
.pl-advanced-drawer {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  overflow: hidden;
}

.pl-advanced-drawer > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 0.95rem;
  font-size: 0.84rem;
  font-weight: 700;
  color: #1e293b;
  background: #f1f5f9;
  cursor: pointer;
  user-select: none;
  list-style: none;
}

.pl-advanced-drawer > summary::-webkit-details-marker {
  display: none;
}

.pl-advanced-drawer > summary:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.pl-advanced-drawer__badge {
  background: #ffffff;
  color: #334155;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 0.14rem 0.55rem;
  font-size: 0.71rem;
  font-weight: 700;
}

.pl-advanced-drawer__body {
  padding: 0.85rem 0.95rem;
  background: #ffffff;
  border-top: 1px solid #cbd5e1;
}

.pl-adv-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.75rem;
}

.pl-adv-settings-card {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
}

/* Supplier Deal Cards & Quarter Reveal Scoreboard Rows */
.pl-deal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 0.75rem;
}

.pl-deal-option-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  padding: 0.8rem 0.95rem;
}

.pl-deal-option-card--recommended {
  border: 2px solid #16a34a;
  background: #f0fdf4;
}

.pl-scoreboard-row {
  display: grid;
  grid-template-columns: 240px minmax(140px, 1fr) 215px;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid #e2e8f0;
  border-radius: 6px;
}

.pl-scoreboard-row:last-child {
  border-bottom: none;
}

.pl-scoreboard-row--student {
  background: #eff6ff;
  border: 1px solid #93c5fd;
}

.pl-scoreboard-row--best {
  background: #f0fdf4;
  border: 1px solid #86efac;
}

.pl-scoreboard-row__left {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.pl-scoreboard-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #1e293b;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  flex-shrink: 0;
}

.pl-scoreboard-row__right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
}

.pl-tier-badge {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 800;
}

.pl-tier-badge--A {
  background: #dcfce7;
  color: #14532d;
}

.pl-tier-badge--B {
  background: #fef3c7;
  color: #78350f;
}

.pl-tier-badge--C {
  background: #e2e8f0;
  color: #334155;
}

.pl-tail-flag {
  display: inline-block;
  background: #f5f3ff;
  color: #4c1d95;
  border: 1px solid #c4b5fd;
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  font-size: 0.7rem;
  font-weight: 700;
}

@media (max-width: 720px) {
  .pl-hbar-row,
  .pl-scoreboard-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}

/* ============================================================================
   Phase 7: Guided Basic vs. Advanced Mode Switcher, Shelf Block Decoder Key,
   Live Shelf Health Coach, 3-Zone Runway Header & 30-Second Data Cheat Sheet
   ============================================================================ */

/* Guided Basic vs. Advanced Mode Switcher */
.pl-mode-switcher {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: linear-gradient(90deg, #f0fdf4 0%, #eff6ff 100%);
  border: 1px solid #86efac;
  border-radius: 10px;
  padding: 0.65rem 0.95rem;
  margin-bottom: 0.85rem;
}

.pl-mode-switcher__left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.81rem;
  color: #0f172a;
}

.pl-mode-switcher__badge {
  background: #14532d;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.16rem 0.55rem;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

.pl-mode-switcher__desc {
  color: #1e293b;
  font-weight: 600;
}

.pl-mode-switcher__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.pl-mode-btn {
  background: #ffffff;
  color: #1e293b;
  border: 1px solid #94a3b8;
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pl-mode-btn:hover:not(.pl-mode-btn--active) {
  background: #f1f5f9;
  color: #0f172a;
}

.pl-mode-btn--active {
  background: #1e3a8a;
  color: #ffffff;
  border-color: #1e3a8a;
}

/* Visual Decoder Key for Shelf Blocks */
.pl-badge-key-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.55rem 0.85rem;
  margin-bottom: 0.75rem;
  font-size: 0.77rem;
  color: #1e293b;
}

.pl-badge-key-title {
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
}

.pl-badge-key-items {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.pl-badge-key-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #334155;
}

.pl-badge-key-pill {
  display: inline-block;
  background: #e2e8f0;
  color: #0f172a;
  border: 1px solid #94a3b8;
  border-radius: 5px;
  padding: 0.1rem 0.42rem;
  font-size: 0.72rem;
  font-weight: 800;
}

.pl-badge-key-pill--dark {
  background: #1e293b;
  color: #ffffff;
  border-color: #0f172a;
}

.pl-badge-key-pill--green {
  background: #dcfce7;
  color: #14532d;
  border-color: #16a34a;
}

.pl-badge-key-pill--amber {
  background: #fef3c7;
  color: #78350f;
  border-color: #d97706;
}

.pl-badge-key-pill--red {
  background: #fee2e2;
  color: #7f1d1d;
  border-color: #dc2626;
}

/* Live Shelf Health Coach Card */
.pl-health-coach-card {
  background: #ffffff;
  border: 1px solid #93c5fd;
  border-left: 5px solid #2563eb;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.9rem;
}

.pl-health-coach-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.pl-coach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 0.65rem;
}

.pl-coach-item {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.45rem;
  border-radius: 8px;
  padding: 0.65rem 0.8rem;
  font-size: 0.79rem;
  line-height: 1.38;
}

.pl-coach-item--red {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #7f1d1d;
}

.pl-coach-item--amber {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #78350f;
}

.pl-coach-item--green {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #14532d;
}

.pl-coach-fix-btn {
  align-self: flex-start;
  background: #1e3a8a;
  color: #ffffff;
  border: 1px solid #1e3a8a;
  border-radius: 6px;
  padding: 0.26rem 0.65rem;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
}

.pl-coach-fix-btn:hover:not(:disabled) {
  background: #1d4ed8;
  color: #ffffff;
}

.pl-coach-fix-btn:disabled {
  background: #e2e8f0;
  color: #475569;
  border-color: #cbd5e1;
  cursor: not-allowed;
}

/* 3-Zone Visual Header Bar for Stockout Runway Chart */
.pl-zone-header-bar {
  display: flex;
  width: 100%;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  margin-bottom: 0.5rem;
  font-size: 0.69rem;
  font-weight: 800;
  text-align: center;
}

.pl-zone-seg {
  padding: 0.22rem 0.3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pl-zone-seg--red {
  background: #fee2e2;
  color: #7f1d1d;
  border-right: 2px solid #991b1b;
}

.pl-zone-seg--amber {
  background: #fef3c7;
  color: #78350f;
  border-right: 2px solid #14532d;
}

.pl-zone-seg--green {
  background: #dcfce7;
  color: #14532d;
}

/* Step 3: 30-Second Data Cheat Sheet Grid */
.pl-cheat-sheet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.75rem;
  margin: 0.75rem 0 0.9rem 0;
}

.pl-cheat-card {
  background: #ffffff;
  border: 1px solid #bfdbfe;
  border-top: 4px solid #2563eb;
  border-radius: 9px;
  padding: 0.75rem 0.9rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.5rem;
}

.pl-cheat-card__badge {
  display: inline-block;
  align-self: flex-start;
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #93c5fd;
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
  font-size: 0.69rem;
  font-weight: 800;
}

.pl-cheat-card__title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 800;
  color: #0f172a;
}

.pl-cheat-card__body {
  margin: 0;
  font-size: 0.79rem;
  line-height: 1.4;
  color: #334155;
}

.pl-cheat-jump-btn {
  align-self: flex-start;
  background: #eff6ff;
  color: #1e3a8a;
  border: 1px solid #93c5fd;
  border-radius: 6px;
  padding: 0.28rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.pl-cheat-jump-btn:hover {
  background: #dbeafe;
  color: #1e3a8a;
}

/* Step 4: Plain-English Quarter Coach Banner */
.pl-quarter-coach-banner {
  background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
  border: 1px solid #86efac;
  border-left: 5px solid #16a34a;
  border-radius: 10px;
  padding: 0.9rem 1.05rem;
  margin-bottom: 1rem;
  color: #0f172a;
}



