/* ═══ SKU Watches & Alerts ═══ */

/* ── Utility classes ── */
.card-mb { margin-bottom: 16px; }
.card-section-title { margin-bottom: 12px; font-size: 14px; font-weight: 700; }
.form-group-flex-2 { flex: 2; }
.form-group-flex-1 { flex: 1; }
.form-group-compact { margin-bottom: 0; }
.form-group-end { align-self: flex-end; }
.form-hint { font-size: 13px; }
.text-secondary { font-size: 13px; color: var(--muted); margin-top: 2px; }
.btn-xs { padding: 3px 8px; font-size: 11px; }
.btn-danger-outline {
  border-color: var(--red);
  color: var(--red);
}
.btn-danger-outline:hover {
  background: var(--red-tint);
}

/* ── Navbar Alert Bell ── */
.navbar-alerts {
  position: relative;
  display: flex;
  align-items: center;
  margin-right: 12px;
}

.navbar-alerts-link {
  display: flex;
  align-items: center;
  color: var(--light);
  text-decoration: none;
  padding: 4px;
  border-radius: 6px;
  transition: all 0.15s;
}

.navbar-alerts-link:hover {
  background: var(--bg);
  color: var(--ink);
}

.navbar-alerts-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.navbar-alerts-count {
  position: absolute;
  top: -2px;
  right: -6px;
  min-width: 16px;
  height: 16px;
  border-radius: 10px;
  background: var(--red);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* ── Badges ── */
.badge-alert {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--red);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  margin-left: 4px;
}

.badge-severity-critical {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--red-tint);
  color: var(--red);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-severity-warning {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--amber-tint);
  color: var(--amber);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-severity-info {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--blue-tint);
  color: var(--blue);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-severity-overstock {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--purple-tint);
  color: var(--purple);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-shared {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--blue-tint);
  color: var(--blue);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-personal {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--border-light);
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.badge-active-alert {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--red-tint);
  color: var(--red);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-alert-count-warn {
  display: inline-flex;
  padding: 1px 8px;
  border-radius: 10px;
  background: var(--amber-tint);
  color: var(--amber);
  font-size: 10px;
  font-weight: 600;
}

.badge-status-active {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 20px;
  background: var(--green-tint);
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
}

.badge-status-paused {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 20px;
  background: var(--stone-tint);
  color: var(--stone);
  font-size: 11px;
  font-weight: 700;
}

/* ── Watch Detail Page ── */
.sw-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}

.sw-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin-bottom: 8px;
}

.sw-info-table {
  width: 100%;
  font-size: 13px;
}

.sw-info-table td {
  padding: 4px 0;
}

.sw-info-label {
  color: var(--muted);
  width: 120px;
}

.sw-threshold-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-light);
}

.sw-threshold-row:last-child {
  border-bottom: none;
}

.sw-threshold-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.sw-threshold-dot-active {
  background: var(--green);
}

.sw-threshold-dot-inactive {
  background: var(--light);
}

.sw-threshold-name {
  font-size: 13px;
  font-weight: 600;
  flex: 1;
}

.sw-threshold-value {
  font-size: 12px;
  color: var(--muted);
}

/* ── Alert Tabs ── */
.sw-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
}

.sw-tab {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
}

.sw-tab-active {
  background: var(--ink);
  color: #fff;
}

.sw-tab-inactive {
  background: var(--border-light);
  color: var(--light);
}

.sw-tab-inactive:hover {
  background: var(--border);
  color: var(--muted);
}

/* ── Alert Page ── */
.sw-alert-header-count {
  display: inline-flex;
  padding: 1px 8px;
  border-radius: 10px;
  background: var(--red-tint);
  color: var(--red);
  font-size: 10px;
  font-weight: 600;
  vertical-align: middle;
  margin-left: 4px;
}

.sw-alert-meta {
  font-size: 11px;
  color: var(--muted);
}

.sw-alert-snoozed-until {
  font-size: 11px;
  color: var(--amber);
}

/* ── Snooze Dropdown ── */
.sw-snooze-wrapper {
  display: inline-block;
  position: relative;
}

.sw-snooze-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 50;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  min-width: 120px;
}

.sw-snooze-menu.open {
  display: block;
}

.sw-snooze-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 7px 10px;
  border-radius: 6px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
}

.sw-snooze-btn:hover {
  background: var(--bg);
}

/* ── Form ── */
.sw-form-sku-display {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sw-form-sku-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
}

.proxy-results-container {
  position: relative;
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 6px 6px;
  background: #fff;
  max-height: 240px;
  overflow-y: auto;
  z-index: 10;
}

.sw-form-visibility-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.sw-form-visibility-note {
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
}

.sw-form-thresholds-intro {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}

.sw-threshold-config {
  margin-bottom: 12px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.sw-threshold-config-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sw-threshold-checkbox {
  flex: 0 0 auto;
}

.sw-threshold-label {
  flex: 1;
  font-weight: 600;
}

.sw-threshold-input-group {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.sw-threshold-unit {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.sw-threshold-value-input {
  width: 90px;
}

.sw-form-actions {
  display: flex;
  gap: 8px;
}

/* ── Mono pill (SKU code) ── */
.sw-sku-mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}

/* ── Watch button on SKU show ── */
.sw-sku-watch-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ── Active filter pill ── */
.sw-active-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

/* ── Table tweaks ── */
.sw-product-cell {
  font-size: 12px;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sw-alert-type-cell {
  font-size: 11px;
}

.sw-alert-detail-cell {
  font-size: 12px;
  max-width: 240px;
}

.sw-alert-time-cell {
  font-size: 12px;
  white-space: nowrap;
}

/* ── Empty state ── */
.sw-empty-msg {
  text-align: center;
  padding: 24px;
  color: var(--muted);
  font-size: 13px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .sw-detail-grid {
    grid-template-columns: 1fr;
  }
}
