
/* ══════════════════════════════════════════
   Pipeline Board (Deal Kanban)
   ══════════════════════════════════════════ */

.pipeline-board {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 16px;
  min-height: 400px;
}

.pipeline-column {
  flex: 0 0 220px;
  min-width: 220px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  display: flex;
  flex-direction: column;
}

.pipeline-column-header {
  padding: 12px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
}

.pipeline-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.pipeline-count {
  margin-left: auto;
  background: var(--bg-input);
  border-radius: var(--r-full);
  padding: 1px 8px;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.pipeline-cards {
  padding: 8px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  max-height: 500px;
}

.pipeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.pipeline-card:hover {
  border-color: var(--brand);
  box-shadow: 0 2px 8px rgba(240, 180, 41, 0.12);
}

.pipeline-card-title {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.pipeline-card-value {
  font-size: 0.92rem;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--brand-dim);
}

.pipeline-card-customer {
  font-size: 0.76rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.pipeline-card-date {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── Bulk Action Bar ── */

.bulk-action-bar {
  background: var(--info-bg);
  border: 1px solid var(--info);
  border-radius: var(--r-sm);
  padding: 10px 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.85rem;
}

/* ── Notification Bell ── */

.notification-bell {
  position: relative;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--r-sm);
  transition: background 0.15s;
}

.notification-bell:hover {
  background: rgba(255,255,255,0.08);
}

.notification-bell > i {
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
}

.notification-bell-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--danger);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
}

.notification-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 340px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--sh-lg);
  z-index: 200;
  display: none;
  overflow: hidden;
}

.notification-dropdown.open {
  display: block;
}

.notification-dropdown-header {
  padding: 12px 16px;
  font-weight: 700;
  font-size: 0.82rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
}

.notification-dropdown-body {
  max-height: 360px;
  overflow-y: auto;
}

.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: background 0.1s;
  font-size: 0.82rem;
}

.notification-item:hover {
  background: var(--bg-card-hover);
}

.notification-item-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notification-item-icon i {
  width: 16px;
  height: 16px;
}

.notification-item-icon.orange { background: var(--warning-bg); color: var(--warning); }
.notification-item-icon.blue { background: var(--info-bg); color: var(--info); }
.notification-item-icon.red { background: var(--danger-bg); color: var(--danger); }
.notification-item-icon.green { background: var(--success-bg); color: var(--success); }
.notification-item-icon.purple { background: var(--purple-bg); color: var(--purple); }

.notification-item-text {
  flex: 1;
  min-width: 0;
}

.notification-item-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.notification-item-count {
  font-weight: 700;
  font-family: var(--mono);
  color: var(--brand-dim);
}

.notification-section-label {
  padding: 8px 16px 4px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  border-top: 1px solid var(--border);
}

.notification-section-label:first-child {
  border-top: none;
}

.notification-individual {
  position: relative;
}

.notification-individual.unread {
  background: color-mix(in srgb, var(--yellow) 6%, transparent);
}

.notification-item-body {
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.notification-item-time {
  font-size: 0.68rem;
  color: var(--text-tertiary);
  margin-top: 1px;
}

.notification-unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--yellow);
  flex-shrink: 0;
}

/* ── Activity Feed ── */

.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.activity-feed-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.82rem;
}

.activity-feed-item:last-child {
  border-bottom: none;
}

.activity-feed-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}

.activity-feed-dot.created { background: var(--success); }
.activity-feed-dot.updated { background: var(--info); }
.activity-feed-dot.deleted { background: var(--danger); }

.activity-feed-content {
  flex: 1;
  min-width: 0;
}

.activity-feed-desc {
  color: var(--text-primary);
  line-height: 1.4;
}

.activity-feed-desc strong {
  font-weight: 600;
}

.activity-feed-meta {
  color: var(--text-tertiary);
  font-size: 0.74rem;
  margin-top: 2px;
}

/* ── Inline Edit ── */

.inline-edit {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  border-radius: var(--r-xs);
  padding: 2px 4px;
  margin: -2px -4px;
  transition: background 0.1s;
}

.inline-edit:hover {
  background: var(--brand-subtle);
}

.inline-edit-icon {
  width: 12px;
  height: 12px;
  opacity: 0;
  color: var(--text-tertiary);
  transition: opacity 0.15s;
}

.inline-edit:hover .inline-edit-icon {
  opacity: 1;
}

.inline-edit-input {
  width: 80px;
  padding: 3px 6px;
  font-size: 0.85rem;
  font-family: var(--mono);
  border: 1px solid var(--brand);
  border-radius: var(--r-xs);
  background: var(--bg-card);
  outline: none;
  box-shadow: 0 0 0 2px var(--brand-glow);
}

.inline-edit-input:focus {
  border-color: var(--brand-dim);
}

/* ── Keyboard shortcuts hint ── */

.admin-shortcuts-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  margin-top: 6px;
  color: var(--text-sidebar);
}

/* ── Conversion stats cards ── */

.conversion-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.conversion-card {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 14px;
  text-align: center;
}

.conversion-card-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  font-weight: 700;
  margin-bottom: 6px;
}

.conversion-card-value {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
  font-family: var(--mono);
}

/* ── User 360° Tabs ── */

.user-360-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 16px;
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.user-360-tab {
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-tertiary);
  background: none;
  border: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.user-360-tab:hover {
  color: var(--text-primary);
}

.user-360-tab.active {
  color: var(--brand-dim);
  border-bottom-color: var(--brand);
}

.user-360-tab .tab-count {
  background: var(--bg-input);
  border-radius: var(--r-full);
  padding: 1px 6px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.user-360-tab.active .tab-count {
  background: var(--brand-glow);
  color: var(--brand-dim);
}

.user-360-pane {
  display: none;
}

.user-360-pane.active {
  display: block;
}

/* ── Customer value tier ── */

.customer-tier {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.customer-tier.neukunde { background: var(--bg-input); color: var(--text-secondary); }
.customer-tier.wiederkehrend { background: var(--info-bg); color: var(--info); }
.customer-tier.stammkunde { background: var(--success-bg); color: var(--success); }
.customer-tier.vip { background: var(--warning-bg); color: var(--warning); }

/* ── User 360° Stats Grid ── */

.user-360-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.user-360-stat {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 12px;
  text-align: center;
}

.user-360-stat-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  font-weight: 700;
  margin-bottom: 4px;
}

.user-360-stat-value {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
  font-family: var(--mono);
}

/* ── User 360° Order Table ── */

.user-360-order-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.user-360-order-table th {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  font-weight: 700;
  text-align: left;
  padding: 6px 8px;
  border-bottom: 2px solid var(--border);
}

.user-360-order-table td {
  padding: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.user-360-order-table tr:hover {
  background: var(--bg-card-hover);
}

/* ── Tag management ── */

.tag-manage {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.tag-manage-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 0.74rem;
  font-weight: 600;
  color: #fff;
}

.tag-manage-pill .tag-remove {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  padding: 0;
  margin-left: 2px;
  display: flex;
  align-items: center;
}

.tag-manage-pill .tag-remove:hover {
  color: #fff;
}

.tag-add-select {
  padding: 3px 8px;
  font-size: 0.74rem;
  border: 1px dashed var(--border);
  border-radius: var(--r-full);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
}

/* ── User modal timeline ── */

.user-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.user-timeline-item {
  display: flex;
  gap: 10px;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.78rem;
  border-radius: 6px;
  transition: background 0.15s;
}
.user-timeline-item:hover {
  background: var(--bg-secondary);
}

.user-timeline-item:last-child {
  border-bottom: none;
}

.utl-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.utl-badge {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.user-timeline-text {
  flex: 1;
  color: var(--text-primary);
  line-height: 1.4;
  font-size: 0.8rem;
}

.user-timeline-date {
  color: var(--text-tertiary);
  font-size: 0.7rem;
  flex-shrink: 0;
  white-space: nowrap;
  margin-left: auto;
}

/* ── View Toggle ── */

.admin-view-toggle {
  display: inline-flex;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  overflow: hidden;
  margin-left: auto;
}

.view-toggle-btn {
  background: none;
  border: none;
  padding: 6px 10px;
  cursor: pointer;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  transition: all 0.15s;
}
.view-toggle-btn:hover { color: var(--text-primary); }
.view-toggle-btn.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--sh-xs);
}
.view-toggle-btn i { width: 16px; height: 16px; }

/* ── Order Kanban Cards ── */

.order-kanban .pipeline-card {
  cursor: pointer;
}
.order-kanban .pipeline-card-order-nr {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-primary);
}
.order-kanban .pipeline-card-customer {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.order-kanban .pipeline-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  font-size: 0.75rem;
}
.order-kanban .pipeline-card-amount {
  font-weight: 700;
  color: var(--text-primary);
}
.order-kanban .pipeline-card-date {
  color: var(--text-tertiary);
}
.order-kanban .pipeline-card-payment {
  margin-top: 4px;
}
.order-kanban .pipeline-card-items {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* ── Media Grid ── */

.image-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 20px;
  margin-top: 6px;
  border: 2px dashed var(--border);
  border-radius: var(--r-sm);
  background: var(--bg-secondary);
  cursor: pointer;
  transition: all 0.15s;
}
.image-dropzone.dragover {
  border-color: var(--brand);
  background: rgba(240, 180, 41, 0.06);
}
.image-dropzone:hover {
  border-color: var(--text-tertiary);
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  padding: 16px;
}

.media-card {
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s;
  background: var(--bg-card);
}
.media-card:hover {
  border-color: var(--brand);
  box-shadow: var(--sh-card-hover);
}

.media-card-thumb {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
  background: var(--bg-input);
}

.media-card-file-icon {
  width: 100%;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-input);
  color: var(--text-tertiary);
}
.media-card-file-icon i { width: 36px; height: 36px; }

.media-card-info {
  padding: 8px 10px;
}
.media-card-name {
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}
.media-card-size {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* ── Responsive pipeline ── */

@media (max-width: 768px) {
  .pipeline-board {
    flex-direction: column;
    min-height: auto;
  }
  .pipeline-column {
    flex: none;
    min-width: 100%;
  }
  .pipeline-cards {
    max-height: 200px;
  }
  .notification-dropdown {
    width: 290px;
    right: -10px;
  }
  .user-360-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .user-360-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .admin-modal.hs-modal.hs-modal-wide .hs-body {
    grid-template-columns: 1fr;
  }
}

/* ══════════════════════════════════════════
   ORDER TIMELINE
   ══════════════════════════════════════════ */
.order-timeline { display:flex;flex-direction:column;gap:0; }
.order-timeline-item { display:flex;gap:12px;padding:8px 0;position:relative; }
.order-timeline-dot { width:10px;height:10px;border-radius:50%;background:var(--border);margin-top:5px;flex-shrink:0; }
.order-timeline-item:not(:last-child) .order-timeline-dot::after { content:'';position:absolute;left:4px;top:19px;bottom:-4px;width:2px;background:var(--border); }
.order-timeline-content { flex:1; }
.order-timeline-date { font-size:0.75rem;color:var(--text-tertiary); }
.order-timeline-text { font-size:0.82rem;color:var(--text-primary); }
.order-timeline-user { font-size:0.75rem;color:var(--text-secondary); }

/* Global Search */
.gs-result-item:hover, .gs-result-item.active { background: var(--bg-secondary); }
#global-search-modal .admin-modal { animation: gsSlide 0.15s ease; }
@keyframes gsSlide { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* Recent Items Widget */
.recent-items-widget { margin: 8px 12px; padding: 8px 0; border-top: 1px solid var(--border-subtle); }
.recent-items-title { font-size: 0.72rem; font-weight: 600; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.05em; padding: 0 12px 6px; display: flex; align-items: center; gap: 6px; }
.recent-item { display: flex; align-items: center; gap: 8px; padding: 4px 12px; font-size: 0.78rem; color: var(--text-secondary); text-decoration: none; border-radius: var(--r-sm); transition: background 0.15s; white-space: nowrap; overflow: hidden; }
.recent-item:hover { background: var(--bg-secondary); color: var(--text-primary); }
.recent-item-text { overflow: hidden; text-overflow: ellipsis; }

/* ══════════════════════════════════════════
   ADMIN TOOLTIPS
   ══════════════════════════════════════════ */
[data-tooltip], [data-tooltip-warn] {
  position: relative;
}
[data-tooltip]::after, [data-tooltip-warn]::after {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--bg-root, #0f1117);
  color: #e4e5e7;
  font-size: 0.73rem;
  font-weight: 500;
  line-height: 1.45;
  padding: 6px 10px;
  border-radius: 6px;
  white-space: normal;
  max-width: 280px;
  width: max-content;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s, transform 0.15s;
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  text-align: left;
  font-family: inherit;
}
[data-tooltip]::after {
  content: attr(data-tooltip);
}
[data-tooltip]:hover::after, [data-tooltip-warn]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  transition-delay: 0.35s;
}
/* Anchor left for elements near the right edge */
[data-tooltip-pos="left"]::after, [data-tooltip-pos="left"][data-tooltip-warn]::after {
  left: 0;
  transform: translateX(0) translateY(4px);
}
[data-tooltip-pos="left"]:hover::after {
  transform: translateX(0) translateY(0);
}
/* Anchor right for elements near the left edge */
[data-tooltip-pos="right"]::after, [data-tooltip-pos="right"][data-tooltip-warn]::after {
  left: auto;
  right: 0;
  transform: translateX(0) translateY(4px);
}
[data-tooltip-pos="right"]:hover::after {
  transform: translateX(0) translateY(0);
}
/* Below variant for elements near the top */
[data-tooltip-pos="below"]::after, [data-tooltip-pos="below"][data-tooltip-warn]::after {
  bottom: auto;
  top: calc(100% + 8px);
  transform: translateX(-50%) translateY(-4px);
}
[data-tooltip-pos="below"]:hover::after {
  transform: translateX(-50%) translateY(0);
}
/* Warn variant (destructive actions) — red background */
[data-tooltip-warn]::after {
  content: attr(data-tooltip-warn);
  background: #7f1d1d;
  color: #fecaca;
}
/* Hide on mobile — tooltips don't work well with touch */
@media (max-width: 768px) {
  [data-tooltip]::after, [data-tooltip-warn]::after { display: none; }
}

/* ══════════════════════════════════════════
   OFFER MODULE STYLES
   ══════════════════════════════════════════ */
#offer-builder-modal .admin-modal.hs-modal {
  max-width: 1400px;
  width: 96vw;
  max-height: 92vh;
}
#offer-builder-modal .hs-body {
  grid-template-columns: 1fr 440px;
  max-height: calc(92vh - 72px);
  overflow-y: auto;
}
#offer-builder-modal .hs-main {
  padding: 24px 28px;
  overflow-y: auto;
}
#offer-builder-modal .hs-sidebar {
  overflow-y: auto;
}

#offer-modal .hs-body {
  grid-template-columns: 1fr 400px;
}

/* Offer item rows in builder */
.ob-item-row {
  display: grid;
  grid-template-columns: 2fr 1fr 80px 100px 36px;
  gap: 6px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.ob-item-row input {
  font-size: 0.85rem;
}
.ob-item-row:hover {
  background: var(--bg-secondary);
  margin: 0 -8px;
  padding-left: 8px;
  padding-right: 8px;
}
.ob-items-header {
  display: grid;
  grid-template-columns: 2fr 1fr 80px 100px 36px;
  gap: 6px;
  padding: 6px 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 2px solid var(--border);
}

/* ══════════════════════════════════════════
   OFFER / INVOICE DETAIL TABLE & TOTALS
   ══════════════════════════════════════════ */
.hs-items-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}
.hs-items-table th {
  padding: 8px 10px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
  border-bottom: 2px solid var(--border);
}
.hs-items-table th:last-child,
.hs-items-table td:last-child {
  text-align: right;
}
.hs-items-table td {
  padding: 10px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
}
.hs-items-table tr:hover td {
  background: var(--bg-secondary);
}
.hs-items-sku {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-right: 6px;
}
.hs-totals {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  margin-top: 16px;
  padding-top: 12px;
}
.hs-totals-row {
  display: flex;
  justify-content: space-between;
  width: 280px;
  font-size: 0.85rem;
  padding: 3px 0;
}
.hs-totals-row span:first-child {
  color: var(--text-secondary);
}
.hs-totals-row span:last-child {
  font-family: var(--mono);
}
.hs-totals-row.grand {
  border-top: 2px solid var(--border);
  padding-top: 8px;
  margin-top: 4px;
  font-weight: 700;
  font-size: 0.95rem;
}
.hs-totals-row.grand span:first-child {
  color: var(--text-primary);
}

/* ══════════════════════════════════════════
   HS-CARD ACTIONS (SIDEBAR)
   ══════════════════════════════════════════ */
.hs-card .hs-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hs-card .hs-actions .admin-btn {
  width: 100%;
  justify-content: center;
}

/* ══════════════════════════════════════════
   OFFER STATUS BADGE COLORS
   ══════════════════════════════════════════ */
.hs-status.draft { background: var(--bg-secondary); color: var(--text-secondary); }
.hs-status.finalized { background: var(--info-bg, rgba(59,130,246,0.08)); color: var(--info); }
.hs-status.sent { background: var(--info-bg, rgba(59,130,246,0.08)); color: var(--info); }
.hs-status.accepted { background: var(--success-bg); color: var(--success); }
.hs-status.rejected, .hs-status.expired { background: var(--danger-bg); color: var(--danger); }
.hs-status.converted { background: var(--purple-bg, rgba(139,92,246,0.08)); color: var(--purple, #8b5cf6); }

/* ══════════════════════════════════════════
   GLOBAL SEARCH POLISH
   ══════════════════════════════════════════ */
#global-search-modal .admin-modal {
  max-width: 620px;
  margin-top: 15vh;
}
#global-search-modal input[type="text"] {
  font-size: 1.05rem;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: var(--r-md);
}
#global-search-modal input[type="text"]:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(240,180,41,0.15);
}
.gs-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  border-radius: var(--r-sm);
  transition: background 0.1s;
}
.gs-result-item .gs-type {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  min-width: 72px;
}
.gs-result-item .gs-title {
  font-size: 0.88rem;
  font-weight: 600;
}
.gs-result-item .gs-sub {
  font-size: 0.78rem;
  color: var(--text-tertiary);
}

/* ══════════════════════════════════════════
   BATCH ACTIONS BAR
   ══════════════════════════════════════════ */
.batch-actions-bar {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--yellow);
  border-radius: var(--r-sm);
  margin-bottom: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--black);
}
.batch-actions-bar.visible {
  display: flex;
}
.batch-actions-bar .batch-count {
  font-family: var(--mono);
  background: rgba(0,0,0,0.1);
  padding: 2px 8px;
  border-radius: var(--r-sm);
}
.admin-table th .batch-checkbox,
.admin-table td .batch-checkbox {
  width: auto;
  margin: 0;
  cursor: pointer;
  accent-color: var(--yellow);
}

/* ══════════════════════════════════════════
   COUPON RESTRICTION TAGS
   ══════════════════════════════════════════ */
.restriction-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}
.restriction-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 0.78rem;
  color: var(--text-secondary);
}
.restriction-tag button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-tertiary);
  padding: 0;
  font-size: 0.7rem;
  line-height: 1;
}
.restriction-tag button:hover {
  color: var(--danger);
}

/* ══════════════════════════════════════════
   OFFER BUILDER FORM INPUTS
   ══════════════════════════════════════════ */
#offer-builder-modal input[type="text"],
#offer-builder-modal input[type="email"],
#offer-builder-modal input[type="number"],
#offer-builder-modal input[type="date"],
#offer-builder-modal textarea,
#offer-builder-modal select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 0.85rem;
  font-family: inherit;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: border-color 0.15s, box-shadow 0.15s;
}
#offer-builder-modal input:focus,
#offer-builder-modal textarea:focus,
#offer-builder-modal select:focus {
  outline: none;
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(240,180,41,0.12);
}
#offer-builder-modal .hs-section label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
#offer-builder-modal .ob-customer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}
#offer-builder-modal .ob-address-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

/* ══════════════════════════════════════════
   MOBILE: OFFER BUILDER
   ══════════════════════════════════════════ */
@media (max-width: 768px) {
  #offer-builder-modal .hs-body {
    grid-template-columns: 1fr;
  }
  #offer-builder-modal .admin-modal.hs-modal {
    max-width: 100%;
    width: 100%;
  }
  .ob-item-row,
  .ob-items-header {
    grid-template-columns: 1fr 1fr;
    gap: 4px;
  }
  .ob-items-header {
    display: none;
  }
  .hs-totals-row {
    width: 100%;
  }
}

/* ══════════════════════════════════════════════════════════════
   PHASE 1 — Conversations, Workflows, Templates, Pop-ups
   ══════════════════════════════════════════════════════════════ */

/* ── Postfach / Conversations ── */
.conv-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 16px;
}
.conv-tab {
  padding: 10px 18px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-tertiary);
  background: none;
  border: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.2s, border-color 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.conv-tab:hover { color: var(--text-primary); }
.conv-tab.active {
  color: var(--brand, #f0b429);
  border-bottom-color: var(--brand, #f0b429);
}
.conv-tab .tab-count {
  background: var(--bg-tertiary, #e5e7eb);
  color: var(--text-secondary);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}
.conv-tab.active .tab-count {
  background: var(--brand, #f0b429);
  color: var(--bg-primary, #16140f);
}

/* Conversation list items */
.conv-list-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle, var(--border));
  cursor: pointer;
  transition: background 0.15s;
}
.conv-list-item:hover { background: var(--bg-secondary); }
.conv-list-item.unread { background: var(--bg-secondary); }
.conv-list-item.unread .conv-sender { font-weight: 800; }

.conv-prio-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 6px;
}
.conv-prio-dot.urgent { background: var(--danger, #ef4444); }
.conv-prio-dot.high { background: var(--warning, #f59e0b); }
.conv-prio-dot.normal { background: var(--border-strong, #94a3b8); }
.conv-prio-dot.low { background: var(--border, #cbd5e1); }

.conv-sender {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.2;
}
.conv-subject {
  font-size: 0.82rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}
.conv-preview {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 400px;
  margin-top: 2px;
}
.conv-meta {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  white-space: nowrap;
  margin-left: auto;
  flex-shrink: 0;
  text-align: right;
}
.conv-channel-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--bg-tertiary, #e5e7eb);
  color: var(--text-secondary);
  margin-top: 3px;
}

/* Conversation thread modal — chat bubbles */
.conv-msg {
  display: flex;
  margin-bottom: 12px;
}
.conv-msg.outgoing { justify-content: flex-end; }
.conv-msg-bubble {
  max-width: 72%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.85rem;
  line-height: 1.5;
  position: relative;
}
.conv-msg.incoming .conv-msg-bubble {
  background: var(--bg-secondary, #f5f5f5);
  border-bottom-left-radius: 4px;
}
.conv-msg.outgoing .conv-msg-bubble {
  background: var(--bg-primary, #16140f);
  color: white;
  border-bottom-right-radius: 4px;
}
.conv-msg.internal .conv-msg-bubble {
  background: var(--warning-bg, #fef3c7);
  border: 1px dashed var(--warning, #f59e0b);
  border-radius: 14px;
}
.conv-msg-meta {
  font-size: 0.7rem;
  margin-bottom: 4px;
  opacity: 0.6;
}
.conv-msg.outgoing .conv-msg-meta { color: rgba(255,255,255,0.5); }

/* Conversation sidebar */
.conv-sidebar-section {
  margin-bottom: 18px;
}
.conv-sidebar-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

/* ── Workflow Builder ── */
.wf-step-item {
  border: 1px solid var(--border);
  border-radius: var(--r-md, 8px);
  padding: 14px;
  margin-bottom: 10px;
  background: var(--bg-card, white);
  position: relative;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.wf-step-item:hover {
  border-color: var(--brand, #f0b429);
  box-shadow: 0 0 0 2px rgba(240,180,41,0.1);
}
.wf-step-item .hs-field label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.wf-step-connector {
  width: 2px;
  height: 16px;
  background: var(--border);
  margin: 0 auto;
}

/* Preset cards */
.wf-preset-card {
  border: 1px solid var(--border);
  border-radius: var(--r-md, 8px);
  padding: 16px 18px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}
.wf-preset-card:hover {
  border-color: var(--brand, #f0b429);
  transform: translateY(-1px);
  box-shadow: var(--sh-card-hover, 0 4px 16px rgba(0,0,0,0.08));
}
.wf-preset-card h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--text-primary);
}
.wf-preset-card p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 0 0 8px;
  line-height: 1.4;
}
.wf-preset-card .wf-preset-meta {
  font-size: 0.72rem;
  color: var(--text-tertiary);
}

/* ── Email & PDF Template Panels ── */
.tmpl-code-editor {
  font-family: 'JetBrains Mono', var(--mono, monospace);
  font-size: 0.82rem;
  line-height: 1.55;
  background: var(--bg-primary, #1a1a1a);
  color: #e2e8f0;
  border: 1px solid var(--border);
  border-radius: var(--r-md, 8px);
  padding: 14px;
  resize: vertical;
  tab-size: 2;
}
/* PDF template color swatch */
.pt-color-field {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pt-color-field input[type="color"] {
  width: 36px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm, 4px);
  padding: 0;
  cursor: pointer;
  background: none;
}

/* ── Pop-up Campaign Cards ── */
.popup-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
}
.popup-type-badge.modal { background: var(--info-bg); color: var(--info); }
.popup-type-badge.banner { background: var(--warning-bg); color: var(--warning); }
.popup-type-badge.slide_in { background: var(--purple-bg, #f0e6ff); color: var(--purple, #7c3aed); }
.popup-type-badge.floating_bar { background: var(--success-bg); color: var(--success); }
.popup-type-badge.toast { background: var(--bg-tertiary, #e5e7eb); color: var(--text-secondary); }

/* Popup analytics mini chart */
.popup-ctr {
  font-size: 0.85rem;
  font-weight: 700;
  font-family: var(--mono, monospace);
}
.popup-ctr.good { color: var(--success, #16a34a); }
.popup-ctr.ok { color: var(--warning, #f59e0b); }
.popup-ctr.low { color: var(--text-tertiary); }

/* ── Shared: hs-field styles (works in hs-form, hs-body, hs-card) ── */
.hs-field {
  margin-bottom: 0;
}
.hs-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.hs-field input,
.hs-field select,
.hs-field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--r-sm, 6px);
  padding: 8px 10px;
  font-size: 0.85rem;
  font-family: inherit;
  background: var(--bg-card, white);
  color: var(--text-primary);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.hs-field input:focus,
.hs-field select:focus,
.hs-field textarea:focus {
  outline: none;
  border-color: var(--brand, #f0b429);
  box-shadow: 0 0 0 3px rgba(240,180,41,0.12);
}
.hs-field textarea {
  resize: vertical;
}

/* ── New Conversation modal: tag chips ── */
.nc-tag-chip {
  user-select: none;
  transition: all 0.15s ease;
}
.nc-tag-chip:hover {
  filter: brightness(0.95);
  transform: translateY(-1px);
}

/* ── New Conversation modal: customer search results ── */
#nc-customer-results > div:last-child {
  border-bottom: none !important;
}
#nc-customer-results > div:first-child {
  border-radius: 8px 8px 0 0;
}
#nc-customer-results > div:last-child {
  border-radius: 0 0 8px 8px;
}

/* ── Missing class definitions ── */
.form-group {
  margin-bottom: 12px;
}
.form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 0.85rem;
  font-family: inherit;
  background: var(--bg-input);
  color: var(--text-primary);
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
}
.admin-form-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 16px;
}
.conv-tab-content {
  display: none;
}
.conv-tab-content.active {
  display: block;
}
.report-pane {
  display: none;
}
.report-pane.active {
  display: block;
}
.stat-card-link {
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.stat-card-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh-md);
}

/* ── Standalone hs-modal (SLA, Routing, Tags — NOT .admin-modal.hs-modal) ── */
body > .hs-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg-modal-overlay, rgba(0,0,0,0.5));
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
body > .hs-modal.active {
  display: flex;
  animation: modalFadeIn 0.2s var(--ease);
}
.hs-modal-box {
  background: var(--bg-card, #fff);
  border-radius: var(--r-xl, 16px);
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--sh-lg, 0 20px 40px rgba(0,0,0,0.15));
  animation: modalSlideUp 0.25s var(--ease-out);
}
.hs-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.hs-modal-header h2 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.02em;
}
.hs-modal-body {
  padding: 20px 24px;
}
.hs-modal-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ── hs-modal-close button (for new modals) ── */
.hs-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-tertiary);
  padding: 4px;
  border-radius: var(--r-sm, 4px);
  transition: background 0.15s, color 0.15s;
  z-index: 2;
}
.hs-modal-close:hover {
  background: var(--danger-bg, #fee2e2);
  color: var(--danger, #ef4444);
}
.hs-modal-close .lucide { width: 18px; height: 18px; }

/* ── admin-modal-header / footer for new modals ── */
.admin-modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.admin-modal-header h2 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.02em;
}
.admin-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
}

/* ── Panel headers for new sections ── */
#panel-conversations .admin-header,
#panel-workflows .admin-header,
#panel-email-templates .admin-header,
#panel-pdf-templates .admin-header,
#panel-popups .admin-header {
  margin-bottom: 20px;
}

/* ── Template Gallery / Preset Picker ── */
.tmpl-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.tmpl-gallery-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 2px solid var(--border);
  border-radius: var(--r-md, 8px);
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  background: var(--bg-card, white);
}
.tmpl-gallery-card:hover {
  border-color: var(--brand, #f0b429);
  box-shadow: 0 2px 12px rgba(240,180,41,0.12);
  transform: translateY(-1px);
}
.tmpl-gallery-card.selected {
  border-color: var(--brand, #f0b429);
  background: rgba(240,180,41,0.04);
  box-shadow: 0 0 0 3px rgba(240,180,41,0.12);
}
.tmpl-gallery-thumb {
  width: 64px;
  height: 48px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.tmpl-gallery-info h4 {
  font-size: 0.85rem;
  font-weight: 700;
  margin: 0 0 2px;
  color: var(--text-primary);
}
.tmpl-gallery-info p {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.4;
}
.tmpl-gallery-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  margin-top: 4px;
  background: var(--brand-glow, rgba(240,180,41,0.12));
  color: var(--brand-dim, #d9a01e);
}
.tmpl-gallery-badge.badge-system {
  background: rgba(22,20,15,0.1);
  color: #16140f;
  border: 1px solid rgba(22,20,15,0.2);
}
.tmpl-gallery-card.tmpl-active {
  border-color: #16140f;
  box-shadow: 0 0 0 2px rgba(22,20,15,0.15);
}
.tmpl-gallery-card.tmpl-active .tmpl-gallery-thumb {
  position: relative;
}
.tmpl-gallery-card.tmpl-active .tmpl-gallery-thumb::after {
  content: 'AKTIV';
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 0.55rem;
  font-weight: 700;
  background: #16140f;
  color: #f0b429;
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: 0.5px;
}

/* ── Variable Picker (Email Templates) ── */
.var-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}
.var-picker-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: var(--mono, monospace);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 8px;
  background: var(--brand-glow, rgba(240,180,41,0.12));
  color: var(--brand, #f0b429);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  border: 1px solid transparent;
}
.var-picker-tag:hover {
  background: rgba(240,180,41,0.22);
  transform: scale(1.03);
}
.var-picker-tag:active {
  transform: scale(0.97);
}
.var-picker-group {
  margin-bottom: 10px;
}
.var-picker-group-title {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

/* ── Live Preview Panel ── */
.preview-panel {
  border: 1px solid var(--border);
  border-radius: var(--r-md, 8px);
  background: #fafbfc;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.preview-panel iframe {
  width: 100%;
  height: 100%;
  border: none;
  min-height: 280px;
}
.preview-panel-empty {
  text-align: center;
  padding: 32px;
  color: var(--text-tertiary);
  font-size: 0.82rem;
}
.preview-panel-label {
  position: absolute;
  top: 8px;
  left: 10px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  background: rgba(255,255,255,0.9);
  padding: 2px 6px;
  border-radius: 4px;
  z-index: 1;
}

/* ── Popup Preview (miniature in sidebar) ── */
.popup-preview-mini {
  background: #f0f2f5;
  border-radius: 8px;
  padding: 16px;
  min-height: 160px;
  position: relative;
  overflow: hidden;
}
.popup-preview-mini .popup-mock {
  background: white;
  border-radius: 8px;
  padding: 14px;
  text-align: center;
  box-shadow: 0 2px 16px rgba(0,0,0,0.1);
  max-width: 240px;
  margin: 0 auto;
}
.popup-preview-mini .popup-mock.pos-top { margin: 0 auto; border-radius: 0 0 8px 8px; }
.popup-preview-mini .popup-mock.pos-bottom { position: absolute; bottom: 0; left: 0; right: 0; border-radius: 8px 8px 0 0; margin: 0; }
.popup-preview-mini .popup-mock.pos-bottom_right { position: absolute; bottom: 8px; right: 8px; margin: 0; max-width: 180px; text-align: left; }
.popup-preview-mini .popup-mock.pos-bottom_left { position: absolute; bottom: 8px; left: 8px; margin: 0; max-width: 180px; text-align: left; }
.popup-mock-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.popup-mock-sub {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.popup-mock-cta {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 4px;
  background: var(--brand, #f0b429);
  color: var(--brand-ink, #16140f);
}

/* ── Popup Deployment Status Indicators ── */
.popup-deploy-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  font-size: 0.82rem;
  font-weight: 600;
}
.popup-deploy-live { background: rgba(16,185,129,.1); color: var(--success); }
.popup-deploy-scheduled { background: rgba(59,130,246,.1); color: var(--info); }
.popup-deploy-paused { background: rgba(245,158,11,.1); color: var(--warning); }
.popup-deploy-ended { background: rgba(107,114,128,.1); color: var(--text-tertiary); }
.popup-deploy-expired { background: rgba(239,68,68,.1); color: var(--danger); }
.popup-deploy-draft { background: rgba(107,114,128,.08); color: var(--text-secondary); }

/* ── Workflow Visual Steps ── */
.wf-step-item {
  position: relative;
}
.wf-step-number {
  position: absolute;
  top: -8px;
  left: 14px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand, #f0b429);
  color: var(--brand-ink, #16140f);
  font-size: 0.7rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  border: 2px solid var(--bg-card, white);
}
.wf-step-type-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.wf-step-type-icon.action { background: var(--info-bg, #dbeafe); color: var(--info, #3b82f6); }
.wf-step-type-icon.condition { background: var(--warning-bg, #fef3c7); color: var(--warning, #f59e0b); }
.wf-step-type-icon.delay { background: var(--purple-bg, #f0e6ff); color: var(--purple, #7c3aed); }

/* ── Section headers in modals ── */
.modal-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 20px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-subtle, #eef0f3);
}
.modal-section-title:first-child { margin-top: 0; }
.modal-section-title .lucide { width: 15px; height: 15px; color: var(--text-tertiary); }

/* ── Invoice panel enhancements ── */
.inv-amount-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.inv-amount-card {
  background: var(--bg-card, white);
  border: 1px solid var(--border);
  border-radius: var(--r-md, 8px);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.inv-amount-card .inv-amt-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
}
.inv-amount-card .inv-amt-value {
  font-size: 1.15rem;
  font-weight: 800;
  font-family: var(--mono, monospace);
  color: var(--text-primary);
}
.inv-amount-card.success .inv-amt-value { color: var(--success); }
.inv-amount-card.warning .inv-amt-value { color: var(--warning); }
.inv-amount-card.danger .inv-amt-value { color: var(--danger); }

/* ── Invoice panel view switcher ── */
.inv-view-btn-active { background: var(--brand) !important; color: #fff !important; }

/* ── Invoice aging buckets ── */
.inv-aging-buckets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  padding: 0 20px 16px;
}
.inv-aging-bucket {
  padding: 14px 16px;
  border-radius: var(--r-md, 8px);
  border: 1px solid var(--border);
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
}
.inv-aging-bucket:hover { border-color: var(--brand); transform: translateY(-1px); }
.inv-aging-bucket-label { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-tertiary); margin-bottom: 4px; }
.inv-aging-bucket-value { font-size: 1.15rem; font-weight: 800; font-family: var(--mono, monospace); }
.inv-aging-bucket-count { font-size: 0.72rem; color: var(--text-secondary); margin-top: 2px; }
.inv-aging-bucket.current { border-color: var(--success); background: rgba(34,197,94,0.04); }
.inv-aging-bucket.current .inv-aging-bucket-value { color: var(--success); }
.inv-aging-bucket.d30 { border-color: var(--warning); background: rgba(245,158,11,0.04); }
.inv-aging-bucket.d30 .inv-aging-bucket-value { color: var(--warning); }
.inv-aging-bucket.d60 { border-color: #f97316; background: rgba(249,115,22,0.04); }
.inv-aging-bucket.d60 .inv-aging-bucket-value { color: #f97316; }
.inv-aging-bucket.d90 { border-color: var(--danger); background: rgba(239,68,68,0.04); }
.inv-aging-bucket.d90 .inv-aging-bucket-value { color: var(--danger); }

/* ── Invoice dunning stepper ── */
.inv-dunning-steps {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 12px 0;
}
.inv-dunning-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  min-width: 100px;
  text-align: center;
}
.inv-dunning-step-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  color: var(--text-tertiary);
}
.inv-dunning-step-icon .lucide { width: 16px; height: 16px; }
.inv-dunning-step-label { font-size: 0.72rem; color: var(--text-tertiary); font-weight: 600; }
.inv-dunning-step-date { font-size: 0.68rem; color: var(--text-tertiary); }
.inv-dunning-step.completed .inv-dunning-step-icon { background: var(--warning); border-color: var(--warning); color: #fff; }
.inv-dunning-step.completed .inv-dunning-step-label { color: var(--warning); }
.inv-dunning-step.current .inv-dunning-step-icon { background: var(--danger); border-color: var(--danger); color: #fff; }
.inv-dunning-step.current .inv-dunning-step-label { color: var(--danger); font-weight: 700; }
.inv-dunning-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  min-width: 20px;
}
.inv-dunning-line.completed { background: var(--warning); }

/* ── Invoice timeline ── */
.inv-timeline-item {
  position: relative;
  padding: 0 0 20px 24px;
  border-left: 2px solid var(--border);
  margin-left: 6px;
}
.inv-timeline-item:last-child { border-left-color: transparent; padding-bottom: 0; }
.inv-timeline-dot {
  position: absolute;
  left: -7px;
  top: 2px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border);
}
.inv-timeline-item.created .inv-timeline-dot { border-color: var(--info); background: var(--info); }
.inv-timeline-item.status .inv-timeline-dot { border-color: var(--brand); background: var(--brand); }
.inv-timeline-item.payment .inv-timeline-dot { border-color: var(--success); background: var(--success); }
.inv-timeline-item.reminder .inv-timeline-dot { border-color: var(--warning); background: var(--warning); }
.inv-timeline-item.storno .inv-timeline-dot { border-color: var(--danger); background: var(--danger); }
.inv-timeline-time { font-size: 0.68rem; color: var(--text-tertiary); margin-bottom: 2px; }
.inv-timeline-text { font-size: 0.82rem; color: var(--text-primary); }
.inv-timeline-detail { font-size: 0.75rem; color: var(--text-secondary); margin-top: 2px; }

/* ── Invoice payment progress inline ── */
.inv-pay-bar-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 80px;
}
.inv-pay-bar-track {
  flex: 1;
  height: 4px;
  background: var(--bg-secondary);
  border-radius: 2px;
  overflow: hidden;
  min-width: 40px;
}
.inv-pay-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s;
}
.inv-pay-bar-text {
  font-size: 0.68rem;
  font-family: var(--mono, monospace);
  color: var(--text-secondary);
  white-space: nowrap;
}

/* ── Invoice reminder badge ── */
.inv-reminder-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(245,158,11,0.1);
  color: var(--warning);
  border: 1px solid rgba(245,158,11,0.25);
}

/* ── Action config forms (workflow steps) ── */
.wf-config-fields {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}
.wf-config-fields .hs-field label {
  font-size: 0.72rem !important;
  color: var(--text-tertiary) !important;
}
.wf-config-fields .hs-field input,
.wf-config-fields .hs-field select,
.wf-config-fields .hs-field textarea {
  font-size: 0.82rem;
  padding: 6px 8px;
}

/* ── Toggle switch improvements ── */
.admin-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  gap: 8px;
}
.admin-toggle input { display: none; }
.admin-toggle-slider {
  width: 36px;
  min-width: 36px;
  height: 20px;
  background: var(--bg-tertiary, #d1d5db);
  border-radius: 10px;
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}
.admin-toggle-slider::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.admin-toggle input:checked + .admin-toggle-slider {
  background: var(--success, #10b981);
}
.admin-toggle input:checked + .admin-toggle-slider::after {
  transform: translateX(16px);
}
.admin-toggle-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Toggle grid layout ── */
.toggle-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 24px;
}
.toggle-grid .admin-toggle {
  min-width: 0;
}

/* ── Status badge in modal headers ── */
.hs-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  margin-left: 8px;
  align-self: center;
}
.hs-status-badge.badge-active {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}
.hs-status-badge.badge-inactive {
  background: rgba(107, 114, 128, 0.12);
  color: #6b7280;
}
.hs-status-badge.badge-draft {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
}

/* ── Color swatch presets ── */
.color-swatches {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}
.color-swatch {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.15s, transform 0.1s;
}
.color-swatch:hover {
  transform: scale(1.15);
  border-color: var(--text-secondary);
}
.color-swatch.active {
  border-color: var(--brand, #f0b429);
  box-shadow: 0 0 0 2px rgba(240,180,41,0.3);
}

/* ── Responsive: new modals ── */
@media (max-width: 768px) {
  #conversation-modal .hs-modal-inner {
    flex-direction: column;
    height: auto;
    max-height: 90vh;
  }
  #conversation-modal .hs-modal-inner > div:last-child {
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--border);
    max-height: 200px;
  }
  .conv-subject, .conv-preview {
    max-width: 180px;
  }
  .tmpl-gallery-card { padding: 10px; }
  .tmpl-gallery-thumb { width: 48px; height: 36px; }
}

/* ===== Workflow Engine – Tabs ===== */
.hs-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  background: var(--bg-secondary);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.hs-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 10px 16px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.hs-tab .lucide { width: 14px; height: 14px; }
.hs-tab:hover { color: var(--text-primary); }
.hs-tab.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

/* Tab content visibility */
.wf-tab-content { display: none; }
.wf-tab-content.active { display: block; }

/* ===== Workflow – Condition Builder Rows ===== */
.wf-condition-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 32px;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}
.wf-condition-row select,
.wf-condition-row input {
  font-size: 0.78rem;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-primary);
  color: var(--text-primary);
}
.wf-condition-row select:focus,
.wf-condition-row input:focus {
  border-color: var(--brand);
  outline: none;
}
.wf-condition-row .admin-btn-danger {
  padding: 4px 6px;
  min-width: unset;
}

/* ===== Workflow – Branch Container ===== */
.wf-branch-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}
.wf-branch {
  border-radius: 6px;
  padding: 8px;
}
.wf-branch-true {
  border: 1px solid var(--success, #16a34a);
  background: rgba(22, 163, 106, 0.04);
}
.wf-branch-false {
  border: 1px solid var(--danger, #dc2626);
  background: rgba(220, 38, 38, 0.04);
}
.wf-branch > strong {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.wf-branch-true > strong { color: var(--success, #16a34a); }
.wf-branch-false > strong { color: var(--danger, #dc2626); }

.wf-branch-step-item {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 6px;
  font-size: 0.76rem;
}
.wf-branch-step-item select,
.wf-branch-step-item input {
  font-size: 0.76rem;
  padding: 4px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-primary);
  color: var(--text-primary);
  width: 100%;
  margin-top: 4px;
}

/* ===== Workflow – Stat Card Cyan ===== */
.stat-card-icon.cyan { background: #e0f7fa; color: #0097a7; }
.stat-card:has(.stat-card-icon.cyan)::after { background: #0097a7; }

/* ===== Workflow Modal – Mobile ===== */
@media (max-width: 768px) {
  .hs-tabs { padding: 0 12px; }
  .hs-tab { padding: 8px 10px; font-size: 0.72rem; }
  .hs-tab .lucide { width: 12px; height: 12px; }
  .wf-branch-container { grid-template-columns: 1fr; }
  .wf-condition-row { grid-template-columns: 1fr 1fr; }
  .wf-condition-row > *:nth-child(3) { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .hs-tab span { display: none; }
  .wf-condition-row { grid-template-columns: 1fr; }
}

/* ===== Dashboard Enhancements ===== */

/* Comparison KPI badges */
.kpi-change { display: inline-flex; align-items: center; gap: 3px; font-size: 0.72rem; font-weight: 600; padding: 2px 7px; border-radius: 999px; margin-left: 6px; }
.kpi-change.up { background: #dcfce7; color: #15803d; }
.kpi-change.down { background: #fee2e2; color: #dc2626; }
.kpi-change.neutral { background: #f3f4f6; color: #6b7280; }

/* Revenue Goal */
.revenue-goal { background: var(--bg-card, #1e1c17); border-radius: 12px; padding: 20px; margin-bottom: 20px; }
.revenue-goal h3 { margin: 0 0 12px; font-size: 1rem; }
.goal-bar { background: #2a2822; border-radius: 8px; height: 24px; overflow: hidden; position: relative; }
.goal-bar-fill { height: 100%; background: linear-gradient(90deg, var(--yellow, #f0b429), #f59e0b); border-radius: 8px; transition: width 0.6s ease; display: flex; align-items: center; justify-content: flex-end; padding-right: 8px; font-size: 0.72rem; font-weight: 700; color: #16140f; }
.goal-meta { display: flex; justify-content: space-between; margin-top: 8px; font-size: 0.78rem; color: #9ca3af; }

/* Live Sales Feed */
.live-feed { max-height: 320px; overflow-y: auto; }
.live-feed-item { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.live-feed-item:last-child { border-bottom: none; }
.live-feed-amount { font-weight: 700; color: var(--yellow, #f0b429); white-space: nowrap; }
.live-feed-time { font-size: 0.72rem; color: #6b7280; margin-left: auto; white-space: nowrap; }

/* Order Heatmap */
.heatmap-grid { display: grid; grid-template-columns: 40px repeat(24, 1fr); gap: 2px; font-size: 0.65rem; }
.heatmap-cell { aspect-ratio: 1; border-radius: 3px; display: flex; align-items: center; justify-content: center; cursor: default; transition: transform 0.15s; }
.heatmap-cell:hover { transform: scale(1.3); z-index: 2; }
.heatmap-label { display: flex; align-items: center; font-size: 0.68rem; color: #9ca3af; padding-right: 4px; }
.heatmap-legend { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 0.68rem; color: #9ca3af; }
.heatmap-legend-cell { width: 14px; height: 14px; border-radius: 3px; }

/* Conversion Funnel */
.funnel-container { display: flex; flex-direction: column; gap: 0; align-items: center; padding: 20px 0; }
.funnel-step { position: relative; text-align: center; padding: 14px 0; transition: background 0.2s; }
.funnel-step-bar { height: 42px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem; color: #fff; transition: width 0.5s ease; margin: 0 auto; }
.funnel-step-label { font-size: 0.78rem; color: #9ca3af; margin-top: 6px; }
.funnel-drop { font-size: 0.68rem; color: #ef4444; margin-top: 2px; }

/* Quick Actions */
.quick-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.quick-action-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 8px; background: rgba(240,180,41,0.1); border: 1px solid rgba(240,180,41,0.2); color: var(--yellow, #f0b429); font-size: 0.78rem; font-weight: 500; cursor: pointer; transition: all 0.2s; }
.quick-action-btn:hover { background: rgba(240,180,41,0.2); border-color: var(--yellow, #f0b429); }
.quick-action-btn .lucide { width: 14px; height: 14px; }

/* ===== Deal Pipeline (Kanban) ===== */
.pipeline-board { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 8px; }
.pipeline-col { min-width: 160px; }
.pipeline-col-header { font-size: 0.78rem; font-weight: 700; padding: 8px 10px; border-top: 3px solid; border-radius: 6px 6px 0 0; background: rgba(255,255,255,0.04); display: flex; justify-content: space-between; align-items: center; }
.pipeline-col-count { background: rgba(255,255,255,0.1); padding: 1px 7px; border-radius: 999px; font-size: 0.72rem; }
.pipeline-col-body { min-height: 120px; background: rgba(255,255,255,0.02); border-radius: 0 0 6px 6px; padding: 6px; }
.pipeline-col[data-stage="lead"] .pipeline-col-header { border-color: #94a3b8; }
.pipeline-col[data-stage="qualified"] .pipeline-col-header { border-color: #60a5fa; }
.pipeline-col[data-stage="proposal"] .pipeline-col-header { border-color: #fbbf24; }
.pipeline-col[data-stage="negotiation"] .pipeline-col-header { border-color: var(--yellow, #f0b429); }
.pipeline-col[data-stage="won"] .pipeline-col-header { border-color: #4ade80; }
.pipeline-col[data-stage="lost"] .pipeline-col-header { border-color: #f87171; }
.pipeline-card { background: var(--bg-card, #1e1c17); border-radius: 6px; padding: 10px; margin-bottom: 6px; cursor: pointer; border: 1px solid rgba(255,255,255,0.06); transition: transform 0.15s, box-shadow 0.15s; }
.pipeline-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
.pipeline-card-title { font-weight: 600; font-size: 0.82rem; margin-bottom: 4px; }
.pipeline-card-value { font-weight: 700; color: var(--yellow, #f0b429); font-size: 0.85rem; }
.pipeline-card-customer { font-size: 0.72rem; color: var(--text-secondary, #9ca3af); margin-top: 2px; }
.pipeline-card-date { font-size: 0.68rem; color: var(--text-tertiary, #6b7280); margin-top: 4px; display: flex; align-items: center; gap: 4px; }
@media (max-width: 768px) { .pipeline-board { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .pipeline-board { grid-template-columns: 1fr 1fr; } }

/* ===== Progress Bar Mini ===== */
.progress-bar-mini { width: 60px; height: 6px; background: rgba(255,255,255,0.1); border-radius: 3px; overflow: hidden; display: inline-block; vertical-align: middle; }
.progress-bar-mini > div { height: 100%; border-radius: 3px; transition: width 0.3s; }

/* ===== Order Timeline ===== */
.order-timeline { position: relative; padding-left: 24px; }
.order-timeline::before { content: ''; position: absolute; left: 8px; top: 0; bottom: 0; width: 2px; background: rgba(255,255,255,0.1); }
.timeline-event { position: relative; padding: 8px 0 16px 16px; }
.timeline-event::before { content: ''; position: absolute; left: -20px; top: 12px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--yellow, #f0b429); background: var(--bg-card, #1e1c17); }
.timeline-event.type-order::before { border-color: #3b82f6; }
.timeline-event.type-payment::before { border-color: #10b981; }
.timeline-event.type-shipping::before { border-color: #8b5cf6; }
.timeline-event.type-note::before { border-color: #f59e0b; }
.timeline-event.type-return::before { border-color: #ef4444; }
.timeline-event-time { font-size: 0.68rem; color: #6b7280; }
.timeline-event-text { font-size: 0.82rem; margin-top: 2px; }

/* ===== Fulfillment Queue ===== */
.fulfillment-table tr.priority-high { border-left: 3px solid #ef4444; }
.fulfillment-table tr.priority-medium { border-left: 3px solid #f59e0b; }
.fulfillment-table tr.priority-low { border-left: 3px solid #10b981; }
.fulfillment-table .age-badge { font-size: 0.68rem; padding: 2px 8px; border-radius: 999px; font-weight: 600; }
.fulfillment-table .age-badge.urgent { background: #fee2e2; color: #dc2626; }
.fulfillment-table .age-badge.warning { background: #fef3c7; color: #92400e; }
.fulfillment-table .age-badge.ok { background: #dcfce7; color: #15803d; }

/* ===== Customer Groups ===== */
.group-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.group-card { background: var(--bg-card, #1e1c17); border-radius: 12px; padding: 16px; border: 1px solid rgba(255,255,255,0.06); transition: border-color 0.2s; }
.group-card:hover { border-color: rgba(240,180,41,0.3); }
.group-card h4 { margin: 0 0 8px; font-size: 0.92rem; }
.group-card .group-stats { display: flex; gap: 16px; font-size: 0.78rem; color: #9ca3af; margin-top: 8px; }

/* ===== Flash Sales ===== */
.flash-sale-card { background: var(--bg-card, #1e1c17); border-radius: 12px; padding: 16px; border: 1px solid rgba(255,255,255,0.06); position: relative; overflow: hidden; }
.flash-sale-card.active { border-color: #ef4444; }
.flash-sale-card.active::before { content: 'LIVE'; position: absolute; top: 8px; right: 8px; background: #ef4444; color: #fff; font-size: 0.62rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; animation: pulse-live 2s infinite; }
@keyframes pulse-live { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.flash-sale-card .discount-badge { background: #ef4444; color: #fff; font-size: 0.82rem; font-weight: 700; padding: 4px 10px; border-radius: 6px; display: inline-block; }

/* ===== Bundles ===== */
.bundle-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.bundle-card { background: var(--bg-card, #1e1c17); border-radius: 12px; padding: 16px; border: 1px solid rgba(255,255,255,0.06); }
.bundle-card .savings-badge { background: #dcfce7; color: #15803d; font-size: 0.72rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.bundle-items-list { margin-top: 10px; font-size: 0.78rem; }
.bundle-items-list li { padding: 3px 0; border-bottom: 1px solid rgba(255,255,255,0.04); }

/* ===== Referrals ===== */
.referral-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.referral-stat-card { background: var(--bg-card, #1e1c17); border-radius: 10px; padding: 14px; text-align: center; }
.referral-stat-card .stat-value { font-size: 1.5rem; font-weight: 800; color: var(--yellow, #f0b429); }
.referral-stat-card .stat-label { font-size: 0.72rem; color: #9ca3af; margin-top: 2px; }

/* ===== Loyalty ===== */
.loyalty-overview { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 20px; }
.loyalty-card { background: var(--bg-card, #1e1c17); border-radius: 10px; padding: 16px; text-align: center; }
.loyalty-card .points-value { font-size: 1.8rem; font-weight: 800; color: var(--yellow, #f0b429); }
.top-earners-list { list-style: none; padding: 0; margin: 0; }
.top-earners-list li { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.04); font-size: 0.82rem; }
.top-earners-list .points { font-weight: 700; color: var(--yellow, #f0b429); }

/* ===== System Status ===== */
.system-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.system-card { background: var(--bg-card, #1e1c17); border-radius: 12px; padding: 16px; }
.system-card h4 { margin: 0 0 10px; font-size: 0.85rem; display: flex; align-items: center; gap: 8px; }
.system-card .sys-row { display: flex; justify-content: space-between; font-size: 0.78rem; padding: 4px 0; }
.system-card .sys-row .label { color: #9ca3af; }
.system-card .sys-row .value { font-weight: 600; }
.system-card .sys-status { display: inline-flex; align-items: center; gap: 4px; }
.system-card .sys-status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; }
.system-card .sys-status.ok::before { background: #10b981; }
.system-card .sys-status.warning::before { background: #f59e0b; }
.system-card .sys-status.error::before { background: #ef4444; }

/* ===== Inline Edit ===== */
.inline-edit-input { background: rgba(240,180,41,0.1); border: 1px solid var(--yellow, #f0b429); border-radius: 4px; padding: 4px 8px; font-size: inherit; color: inherit; width: 100%; font-family: inherit; }
td.editable { cursor: pointer; position: relative; }
td.editable:hover { background: rgba(240,180,41,0.05); }
td.editable::after { content: ''; position: absolute; top: 4px; right: 4px; width: 12px; height: 12px; opacity: 0; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Cpath d='M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z'/%3E%3C/svg%3E"); background-size: contain; }
td.editable:hover::after { opacity: 1; }

/* ===== Saved Filters ===== */
.saved-filters-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.saved-filter-chip { display: inline-flex; align-items: center; gap: 4px; padding: 5px 12px; border-radius: 999px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); font-size: 0.75rem; cursor: pointer; transition: all 0.2s; }
.saved-filter-chip:hover, .saved-filter-chip.active { background: rgba(240,180,41,0.15); border-color: var(--yellow, #f0b429); color: var(--yellow, #f0b429); }
.saved-filter-chip .remove-filter { margin-left: 4px; opacity: 0.5; cursor: pointer; }
.saved-filter-chip .remove-filter:hover { opacity: 1; }

/* ===== Comparison Grid ===== */
.comparison-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 20px; }
.comparison-card { background: var(--bg-card, #1e1c17); border-radius: 10px; padding: 14px; }
.comparison-card .metric-label { font-size: 0.72rem; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.05em; }
.comparison-card .metric-values { display: flex; justify-content: space-between; align-items: baseline; margin-top: 6px; }
.comparison-card .current { font-size: 1.2rem; font-weight: 700; }
.comparison-card .previous { font-size: 0.82rem; color: #6b7280; }

/* ===== Enhanced Report Tabs ===== */
.report-subtabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 16px; padding: 4px; background: rgba(255,255,255,0.03); border-radius: 10px; }
.report-subtab { padding: 6px 14px; border-radius: 8px; font-size: 0.75rem; cursor: pointer; transition: all 0.2s; color: #9ca3af; border: none; background: none; }
.report-subtab:hover { color: #fff; background: rgba(255,255,255,0.06); }
.report-subtab.active { background: var(--yellow, #f0b429); color: #16140f; font-weight: 600; }

/* ===== Purchase Orders ===== */
/* PO statuses use .status-badge classes: draft→pending, ordered→processing, partial→shipped, received→active, cancelled→cancelled */

/* Reorder Suggestions */
.reorder-suggestions { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-top: 16px; }
.reorder-card { background: var(--bg-card, #1e1c17); border-radius: 10px; padding: 14px; border: 1px solid rgba(255,255,255,0.06); display: flex; flex-direction: column; gap: 6px; }
.reorder-card.critical { border-color: #ef4444; }
.reorder-card .stock-indicator { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; }
.reorder-card .stock-indicator .dot { width: 8px; height: 8px; border-radius: 50%; }
.reorder-card .stock-indicator .dot.red { background: #ef4444; }
.reorder-card .stock-indicator .dot.yellow { background: #f59e0b; }
.reorder-card .stock-indicator .dot.green { background: #10b981; }

/* ===== Keyboard Shortcuts Modal ===== */
.shortcuts-modal { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); }
.shortcuts-content { background: var(--bg-card, #1e1c17); border-radius: 16px; padding: 24px; max-width: 480px; width: 90%; max-height: 70vh; overflow-y: auto; border: 1px solid rgba(255,255,255,0.1); }
.shortcut-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.04); font-size: 0.82rem; }
.shortcut-keys { display: flex; gap: 4px; }
.shortcut-key { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15); border-radius: 5px; padding: 2px 8px; font-size: 0.72rem; font-family: 'DM Mono', monospace; font-weight: 500; }

/* ══════════════════════════════════════════
   ORDERS PANEL ENHANCEMENTS
   ══════════════════════════════════════════ */

/* ── Enhanced Stat Cards ── */
.stat-card-clickable { cursor: pointer; }
.stat-card-clickable:hover { border-color: var(--brand); }
.stat-card-sub {
  font-size: 0.68rem;
  color: var(--text-tertiary);
  margin-top: 4px;
  min-height: 16px;
}
.stat-card-sub .trend-up { color: var(--success); font-weight: 600; }
.stat-card-sub .trend-down { color: var(--danger); font-weight: 600; }
.stat-card-sub .trend-neutral { color: var(--text-tertiary); }
.admin-panel-count {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-tertiary);
  margin-left: 8px;
}

/* ── Quick Filter Tabs ── */
.orders-quick-tabs {
  display: flex;
  gap: 3px;
  padding: 5px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  margin-bottom: 20px;
  overflow-x: auto;
  scrollbar-width: none;
}
.orders-quick-tabs::-webkit-scrollbar { display: none; }
.oqt-tab {
  padding: 8px 18px;
  font-size: 0.8rem;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: var(--r-xs);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  position: relative;
}
.oqt-tab:hover { color: var(--text-primary); background: var(--bg-secondary); }
.oqt-tab.active {
  background: var(--brand);
  color: var(--black);
  font-weight: 700;
}
.oqt-tab .oqt-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(255,255,255,0.15);
  border-radius: var(--r-full);
  padding: 0 5px;
  margin-left: 6px;
}
.oqt-tab.active .oqt-count { background: rgba(0,0,0,0.2); }

/* ── Active Filters Bar ── */
.orders-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 8px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  margin-bottom: 12px;
  font-size: 0.78rem;
}
.oaf-label {
  font-weight: 600;
  color: var(--text-secondary);
  margin-right: 4px;
}
.oaf-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-primary);
}
.oaf-pill button {
  background: none;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  font-size: 0.68rem;
}
.oaf-pill button:hover { color: var(--danger); }

/* ── Sortable Table Headers ── */
.sortable-th {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.sortable-th:hover { color: var(--brand); }
.sort-icon {
  width: 12px !important;
  height: 12px !important;
  vertical-align: -1px;
  opacity: 0.35;
  margin-left: 2px;
}
.sortable-th:hover .sort-icon { opacity: 0.7; }
.sort-icon.sort-active { opacity: 1; color: var(--brand); }

/* ── Order Table Row Enhancements ── */
.order-row-overdue {
  border-left: 3px solid var(--danger) !important;
}
.order-row-overdue td:first-child { padding-left: 9px; }
.order-row-highvalue td { background: rgba(240,180,41,0.03); }
.order-items-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  padding: 0 6px;
  color: var(--text-secondary);
}
.order-payment-method {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.order-actions-group {
  display: flex;
  gap: 4px;
}

/* ── Inline Quick Status ── */
.order-quick-status {
  position: relative;
  display: inline-block;
}
.order-quick-status .status-badge { cursor: pointer; }
.order-quick-status .status-badge:hover { filter: brightness(1.15); }

/* ── Order Status Stepper (Modal) ── */
.order-stepper {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 16px 0;
  margin-bottom: 10px;
}
.order-stepper-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
}
.order-stepper-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  transition: all 0.2s;
}
.order-stepper-dot .lucide { width: 14px; height: 14px; color: var(--text-tertiary); }
.order-stepper-step.completed .order-stepper-dot {
  background: var(--success);
  border-color: var(--success);
}
.order-stepper-step.completed .order-stepper-dot .lucide { color: #fff; }
.order-stepper-step.current .order-stepper-dot {
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(240,180,41,0.2);
}
.order-stepper-step.current .order-stepper-dot .lucide { color: var(--black); }
.order-stepper-step.cancelled .order-stepper-dot {
  background: var(--danger);
  border-color: var(--danger);
}
.order-stepper-step.cancelled .order-stepper-dot .lucide { color: #fff; }
.order-stepper-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-tertiary);
  margin-top: 6px;
  text-align: center;
  white-space: nowrap;
}
.order-stepper-step.completed .order-stepper-label,
.order-stepper-step.current .order-stepper-label { color: var(--text-primary); }
.order-stepper-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 14px -4px 0;
  align-self: flex-start;
}
.order-stepper-line.completed { background: var(--success); }

/* ── Order Print View ── */
.order-print-view {
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: #1a1a1a;
  max-width: 800px;
  margin: 0 auto;
  padding: 40px;
}
.order-print-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 30px; border-bottom: 2px solid #1a1a1a; padding-bottom: 20px; }
.order-print-title { font-size: 1.4rem; font-weight: 800; }
.order-print-meta { text-align: right; font-size: 0.85rem; color: #666; }
.order-print-table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.order-print-table th { background: #f5f5f5; font-weight: 700; text-align: left; padding: 10px 12px; border-bottom: 2px solid #ddd; font-size: 0.82rem; }
.order-print-table td { padding: 10px 12px; border-bottom: 1px solid #eee; font-size: 0.85rem; }
.order-print-table tfoot td { font-weight: 700; border-top: 2px solid #1a1a1a; }
.order-print-addresses { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 24px 0; }
.order-print-addresses h4 { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: #888; margin-bottom: 6px; }

/* ══════════════════════════════════════════
   UTILITY CLASSES (replaces common inline CSS)
   ══════════════════════════════════════════ */

/* ── Text Helpers ── */
.text-mono       { font-family: var(--mono); }
.text-right      { text-align: right; }
.text-center     { text-align: center; }
.text-nowrap     { white-space: nowrap; }
.text-prewrap    { white-space: pre-wrap; }
.text-success    { color: var(--success); }
.text-danger     { color: var(--danger); }
.text-warning    { color: var(--warning); }
.text-info       { color: var(--info); }
.text-tertiary   { color: var(--text-tertiary); }
.text-secondary  { color: var(--text-secondary); }
.font-semibold   { font-weight: 600; }
.font-bold       { font-weight: 700; }

/* ── Icon Sizes ── */
.icon-12 { width: 12px; height: 12px; }
.icon-14 { width: 14px; height: 14px; }
.icon-16 { width: 16px; height: 16px; }
.icon-18 { width: 18px; height: 18px; }
.icon-20 { width: 20px; height: 20px; }

/* ── Layout Helpers ── */
.grid-2      { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3      { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.grid-2-1    { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between{ display: flex; align-items: center; justify-content: space-between; }
.flex-col    { display: flex; flex-direction: column; }
.flex-gap-6  { display: flex; gap: 6px; }
.flex-gap-8  { display: flex; gap: 8px; }
.cursor-ptr  { cursor: pointer; }
.w-full      { width: 100%; }
.ml-auto     { margin-left: auto; }
.mt-8        { margin-top: 8px; }
.mt-12       { margin-top: 12px; }
.mt-16       { margin-top: 16px; }
.mb-4        { margin-bottom: 4px; }
.mb-8        { margin-bottom: 8px; }
.mb-12       { margin-bottom: 12px; }
.mb-16       { margin-bottom: 16px; }
.mb-20       { margin-bottom: 20px; }

/* ── Empty / Loading State ── */
.empty-state {
  text-align: center;
  color: var(--text-tertiary);
  padding: 24px;
  font-size: 0.85rem;
}
.empty-state-danger {
  text-align: center;
  color: var(--danger);
  padding: 24px;
  font-size: 0.85rem;
}

/* ── Alert Banners (inside modals) ── */
.hs-alert {
  padding: 12px 16px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  margin-bottom: 16px;
}
.hs-alert i { flex-shrink: 0; }
.hs-alert-success { background: var(--success-bg, rgba(16,185,129,0.08)); border: 1px solid var(--success); color: var(--success); }
.hs-alert-danger  { background: var(--danger-bg, rgba(239,68,68,0.08));  border: 1px solid var(--danger);  color: var(--danger); }
.hs-alert-warning { background: rgba(245,158,11,0.1);  border: 1px solid var(--warning); color: var(--warning); }
.hs-alert-info    { background: var(--info-bg, rgba(59,130,246,0.08));   border: 1px solid var(--info);    color: var(--info); }

/* ── Modal Tab Layout (used by invoice, offer, PO detail modals) ── */
.hs-modal-tabs {
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}
.hs-tab-content {
  display: flex;
  flex-direction: row;
  gap: 0;
  padding: 0;
}
.hs-tab-main {
  flex: 1;
  padding: 20px 24px;
  overflow-y: auto;
}
.hs-tab-sidebar {
  width: 320px;
  border-left: 1px solid var(--border);
  padding: 20px;
  overflow-y: auto;
  background: var(--bg-secondary);
}
.hs-tab-pane {
  display: none;
  padding: 20px 24px;
  overflow-y: auto;
}
.hs-tab-pane.active {
  display: block;
}

/* ── Section helpers ── */
.hs-section-text {
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-radius: var(--r-sm);
  font-size: 0.84rem;
  color: var(--text-secondary);
  white-space: pre-wrap;
}
.hs-section-text.muted {
  font-size: 0.82rem;
  color: var(--text-tertiary);
}

/* ── Progress Bar (reusable) ── */
.hs-progress {
  height: 8px;
  background: var(--bg-secondary);
  border-radius: 4px;
  overflow: hidden;
}
.hs-progress-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s;
}

/* ── Receiving Table Inputs ── */
.po-receive-input {
  width: 70px;
  padding: 4px 6px;
  border: 1px solid var(--border);
  border-radius: var(--r-xs);
  font-size: 0.82rem;
  font-family: var(--mono);
  text-align: center;
}

/* ── PO Status Badge Colors ── */
.hs-status.ordered           { background: var(--info-bg, rgba(59,130,246,0.08)); color: var(--info); }
.hs-status.partially_received { background: var(--purple-bg, rgba(139,92,246,0.08)); color: var(--purple, #8b5cf6); }
.hs-status.received          { background: var(--success-bg); color: var(--success); }
.hs-status.cancelled         { background: var(--danger-bg); color: var(--danger); }
.hs-status.overdue           { background: var(--danger-bg); color: var(--danger); }

@media (max-width: 768px) {
  .hs-tab-content { flex-direction: column; }
  .hs-tab-sidebar { width: 100%; border-left: none; border-top: 1px solid var(--border); }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2-1 { grid-template-columns: 1fr; }
}
