.retail-workspace {
  display: grid;
  grid-template-columns: 200px 280px 1fr 360px;
  gap: 1rem;
  min-height: 75vh;
}

.retail-sidebar { overflow-y: auto; max-height: 75vh; }
.retail-filters label {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
}
.retail-filters select,
.retail-filters input[type="text"],
.retail-filters input[type="number"] {
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--border, #334155);
  border-radius: 6px;
  background: var(--panel-bg, #0f172a);
  color: inherit;
}
.retail-filters h4 { margin: 1rem 0 0.5rem; font-size: 0.9rem; }
.retail-filters .checkbox { display: flex; align-items: center; gap: 0.5rem; }

.retail-map-wrap { position: relative; min-height: 500px; }
.retail-map { height: 75vh; min-height: 500px; border-radius: 8px; border: 1px solid #334155; }
.map-loading {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.3); border-radius: 8px; pointer-events: none;
}

.retail-panel { overflow-y: auto; max-height: 75vh; }
.retail-panel .detail-section { margin-top: 1rem; padding-top: 0.75rem; border-top: 1px solid #334155; }
.retail-panel .detail-dl {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.25rem 0.5rem; font-size: 0.85rem;
}
.retail-panel .detail-dl dt { opacity: 0.7; }
.retail-panel .detail-dl dd { margin: 0; font-weight: 600; text-align: right; }

.clickable-row { cursor: pointer; }
.clickable-row:hover { opacity: 0.85; }

.retail-actions { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.page-header { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 1rem; }

.kpi-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1rem; }
.kpi-card {
  flex: 1; min-width: 110px; padding: 0.75rem 1rem;
  background: var(--panel-bg, #1e293b); border-radius: 8px; border: 1px solid #334155;
}
.kpi-card span { display: block; font-size: 0.75rem; opacity: 0.7; }
.kpi-card strong { font-size: 1.25rem; }
.kpi-green strong { color: #22c55e; }

.retail-main { min-height: 500px; }
.retail-table-wrap { max-height: 75vh; overflow: auto; }
.retail-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.retail-table th, .retail-table td { padding: 0.4rem 0.5rem; border-bottom: 1px solid #334155; text-align: left; }
.retail-table th { position: sticky; top: 0; background: var(--panel-bg, #1e293b); z-index: 1; }

.trends-ticker { margin-bottom: 1rem; padding: 0.75rem 1rem; overflow-x: auto; }
.ticker-items { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 0.5rem; }
.ticker-item {
  background: rgba(42,171,238,0.1); padding: 0.25rem 0.6rem; border-radius: 999px;
  font-size: 0.8rem; white-space: nowrap; border: 1px solid rgba(42,171,238,0.2);
}

.field-picker { margin-top: 1rem; font-size: 0.8rem; }
.field-group { margin: 0.5rem 0; }
.btn-block { width: 100%; margin-top: 0.35rem; }
.muted { opacity: 0.75; font-size: 0.9rem; }
.hint { font-size: 0.8rem; opacity: 0.7; }

.wholesale-list { max-height: 75vh; overflow-y: auto; }
.wholesale-item {
  padding: 0.6rem; border-bottom: 1px solid #1e293b; cursor: pointer; font-size: 0.85rem;
}
.wholesale-item:hover { background: rgba(42,171,238,0.06); }
.wholesale-item.active { border-left: 3px solid var(--pulse-blue, #2aabee); }

.filter-group {
  border: 1px solid rgba(255,255,255,0.06); border-radius: 8px;
  margin-bottom: 0.65rem; padding: 0.35rem 0.5rem; background: rgba(0,0,0,0.15);
}
.filter-group summary {
  cursor: pointer; font-size: 0.8rem; font-weight: 600; color: #cbd5e1;
  padding: 0.35rem 0; list-style: none;
}
.filter-group summary::-webkit-details-marker { display: none; }
.filter-actions { margin: 0.75rem 0; }
.retail-filters { overflow-y: auto; max-height: 75vh; }

.retail-regs-wrap { max-height: 75vh; overflow-y: auto; }
.regs-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.regs-columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 1100px) { .regs-columns { grid-template-columns: 1fr; } }
.regs-columns h4 { font-size: 0.85rem; color: #94a3b8; margin: 0 0 0.5rem; }
.reg-item { padding: 0.5rem 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.reg-item a { color: #e2e8f0; text-decoration: none; font-size: 0.85rem; }
.reg-item a:hover { color: var(--pulse-blue, #2aabee); }
.reg-item small { display: block; color: #64748b; font-size: 0.7rem; margin-top: 0.15rem; }
.reg-badge {
  display: inline-block; font-size: 0.55rem; font-weight: 700; letter-spacing: 0.08em;
  padding: 0.1rem 0.35rem; border-radius: 4px; margin-bottom: 0.2rem;
  background: rgba(168,85,247,0.15); color: #a855f7;
}
.reg-badge.cbs { background: rgba(56,189,248,0.15); color: #38bdf8; }
.reg-badge.markt { background: rgba(255,159,67,0.15); color: #ff9f43; }

@media (max-width: 1400px) {
  .retail-workspace { grid-template-columns: 180px 260px 1fr; }
  .retail-panel { grid-column: 1 / -1; max-height: 50vh; }
}
