/**
 * Monitoring Module Styles
 * Styles for watch list management and address monitoring
 * Uses CSS variables from main.css: --card, --card-border, --fg, --muted, --accent, --bg, --bg-secondary
 */

/* ==================== Page Header ==================== */
.monitoring-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  gap: 1rem;
}

.monitoring-header-left {
  flex: 1;
}

.monitoring-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: var(--fg);
}

.monitoring-subtitle {
  color: var(--muted);
  font-size: 0.875rem;
  margin: 0;
}

/* ==================== Stats Cards ==================== */
.monitoring-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.monitoring-stats .stat-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
}

.monitoring-stats .stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--fg);
  line-height: 1;
}

.monitoring-stats .stat-label {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.5rem;
}

/* ==================== Watch List Grid ==================== */
.watchlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.25rem;
}

.watchlist-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1.5rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.watchlist-card:hover {
  border-color: rgba(99, 255, 226, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.watchlist-card.is-default {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.watchlist-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.watchlist-card-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.watchlist-card-title h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
  color: var(--fg);
}

.watchlist-card-actions {
  display: flex;
  gap: 0.375rem;
}

.watchlist-card-desc {
  color: var(--muted);
  font-size: 0.875rem;
  margin: 0 0 1rem 0;
  line-height: 1.5;
}

.watchlist-card-stats {
  display: flex;
  gap: 1.5rem;
  padding: 1rem 0;
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
}

.watchlist-stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.watchlist-stat-value {
  font-weight: 600;
  color: var(--fg);
}

.watchlist-stat-label {
  color: var(--muted);
}

.watchlist-stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  opacity: 0.4;
}

.watchlist-stat-icon svg {
  width: 1rem;
  height: 1rem;
}

.watchlist-stat-icon.active {
  opacity: 1;
  color: var(--success);
}

.watchlist-card-footer {
  margin-top: 1rem;
}

.watchlist-updated {
  font-size: 0.75rem;
  color: var(--muted);
}

/* ==================== Empty State ==================== */
.monitoring-page .empty-state {
  text-align: center;
  padding: 4rem 2rem;
  max-width: 400px;
  margin: 0 auto;
}

.empty-icon {
  width: 5rem;
  height: 5rem;
  margin: 0 auto 1.5rem;
  color: var(--card-border);
  opacity: 0.5;
}

.empty-icon svg {
  width: 100%;
  height: 100%;
}

.monitoring-page .empty-state h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.75rem 0;
  color: var(--fg);
}

.monitoring-page .empty-state p {
  color: var(--muted);
  margin: 0 0 1.5rem 0;
  line-height: 1.6;
}

/* ==================== Loading State ==================== */
.monitoring-page .loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  color: var(--muted);
  gap: 1rem;
}

.monitoring-page .loading-spinner {
  width: 2.5rem;
  height: 2.5rem;
  border: 3px solid var(--card-border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ==================== Error State ==================== */
.error-state {
  text-align: center;
  padding: 4rem 2rem;
}

.error-state h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.75rem 0;
  color: var(--danger);
}

.error-state p {
  color: var(--muted);
  margin: 0 0 1.5rem 0;
}

/* ==================== Form Card ==================== */
.form-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.form-section {
  margin-bottom: 1.5rem;
}

.form-section:last-child {
  margin-bottom: 0;
}

.form-section-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  color: var(--fg);
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--card-border);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.section-header .form-section-title {
  margin: 0;
  padding: 0;
  border: 0;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--fg);
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  color: var(--fg);
  font-size: 0.875rem;
  transition: border-color 0.15s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
}

.form-input::placeholder {
  color: var(--muted);
}

.form-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

textarea.form-input {
  resize: vertical;
  min-height: 80px;
}

.form-textarea-lg {
  min-height: 120px;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
}

.form-hint {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.375rem;
}

/* ==================== Checkboxes ==================== */
.form-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--fg);
}

.form-checkbox input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent);
}

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}

/* ==================== Notification Config ==================== */
.notification-config {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--bg);
  border-radius: 8px;
}

/* ==================== Form Actions ==================== */
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--card-border);
  margin-top: 1.5rem;
}

/* ==================== Address Validation ==================== */
.address-validation-results {
  margin-top: 1rem;
}

.validation-section {
  margin-bottom: 1rem;
}

.validation-section:last-child {
  margin-bottom: 0;
}

.validation-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
}

.validation-title svg {
  width: 1rem;
  height: 1rem;
}

.validation-title.validation-success {
  color: var(--success);
}

.validation-title.validation-error {
  color: var(--danger);
}

.validation-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.validation-list.compact {
  gap: 0.375rem;
}

.validation-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  background: var(--bg);
  border-radius: 8px;
  font-size: 0.8125rem;
}

.validation-item.valid {
  border-left: 3px solid var(--success);
}

.validation-item.invalid {
  border-left: 3px solid var(--danger);
}

.validation-address {
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
  color: var(--fg);
}

.validation-chain {
  padding: 0.25rem 0.5rem;
  background: var(--card-border);
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
}

.validation-error-msg {
  color: var(--danger);
  font-size: 0.75rem;
}

.validation-label {
  flex: 1;
  padding: 0.375rem 0.625rem;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  font-size: 0.8125rem;
  color: var(--fg);
  min-width: 120px;
}

.validation-more {
  font-size: 0.8125rem;
  color: var(--muted);
  padding: 0.25rem 0;
}

/* ==================== Edit Layout ==================== */
.edit-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.edit-layout .page-header {
  grid-column: 1 / -1;
}

@media (max-width: 1024px) {
  .edit-layout {
    grid-template-columns: 1fr;
  }

  .edit-layout .page-header {
    grid-column: 1;
  }
}

.edit-main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.edit-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.edit-sidebar .form-card {
  position: sticky;
  top: 1rem;
}

/* ==================== Address List ==================== */
.address-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 600px;
  overflow-y: auto;
}

.address-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem;
  background: var(--bg);
  border-radius: 8px;
  font-size: 0.8125rem;
}

.address-item:hover {
  background: var(--card-border);
}

.address-item-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  min-width: 0;
}

.address-item-main {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.address-link {
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
  font-size: 0.75rem;
  color: var(--muted);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.address-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.address-chain {
  padding: 0.25rem 0.5rem;
  background: var(--card-border);
  border-radius: 4px;
  font-size: 0.625rem;
  font-weight: 600;
  flex-shrink: 0;
}

.address-item-label-row {
  display: flex;
  align-items: center;
}

.address-item-label {
  font-size: 0.875rem;
  color: var(--muted);
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: background 0.15s;
}

.address-item-label:hover {
  background: var(--card-border);
}

/* Prominent label when set */
.address-item-label.label-set {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--accent);
}

.address-item-label.label-empty {
  color: var(--muted);
  font-size: 0.75rem;
  font-style: normal;
  border: 1px dashed var(--card-border);
  padding: 4px 10px;
  border-radius: 4px;
  opacity: 0.7;
  transition: all 0.15s ease;
}

.address-item-label.label-empty:hover {
  border-color: var(--accent);
  color: var(--accent);
  opacity: 1;
  background: rgba(99, 255, 226, 0.05);
}

.label-edit-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.address-label-input {
  font-size: 0.8125rem;
  padding: 4px 8px;
  border: 1px solid var(--accent);
  border-radius: 4px;
  background: var(--bg);
  color: var(--fg);
  flex: 1;
  min-width: 140px;
  max-width: 200px;
}

.address-label-input:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(99, 255, 226, 0.2);
}

.label-edit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.label-edit-btn svg {
  width: 14px;
  height: 14px;
}

.label-edit-save {
  background: var(--success);
  color: white;
}

.label-edit-save:hover {
  background: #16a34a;
}

.label-edit-cancel {
  background: var(--card-border);
  color: var(--muted);
}

.label-edit-cancel:hover {
  background: var(--danger);
  color: white;
}

.address-item-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.btn-copy {
  color: var(--muted);
}

.btn-copy:hover {
  color: var(--accent);
  background: rgba(99, 255, 226, 0.1);
}

.btn-copy.copied {
  color: var(--success);
}

.empty-addresses {
  text-align: center;
  padding: 1.5rem;
  color: var(--muted);
}

.empty-addresses p {
  margin: 0 0 1rem 0;
}

/* ==================== Buttons ==================== */
.monitoring-page .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.monitoring-page .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-icon {
  width: 1rem;
  height: 1rem;
}

.monitoring-page .btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.monitoring-page .btn-primary:hover:not(:disabled) {
  background: #4eecd0;
}

.monitoring-page .btn-secondary {
  background: var(--card);
  border: 1px solid var(--card-border);
  color: var(--fg);
}

.monitoring-page .btn-secondary:hover:not(:disabled) {
  border-color: var(--accent);
  background: rgba(99, 255, 226, 0.08);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover:not(:disabled) {
  filter: brightness(1.1);
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}

.btn-icon-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-icon-sm svg {
  width: 1rem;
  height: 1rem;
}

.btn-icon-sm:hover {
  background: var(--card-border);
  color: var(--fg);
}

.btn-icon-danger:hover {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

/* ==================== Badges ==================== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.badge-default {
  background: rgba(99, 255, 226, 0.15);
  color: var(--accent);
}

/* ==================== Modal ==================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}

.modal {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-lg {
  max-width: 600px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--card-border);
}

.modal-header h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  color: var(--fg);
}

.modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.5rem;
  cursor: pointer;
  border-radius: 6px;
}

.modal-close:hover {
  background: var(--card-border);
  color: var(--fg);
}

.modal-body {
  padding: 1.25rem;
  overflow-y: auto;
  color: var(--fg);
}

.modal-body p {
  margin: 0 0 0.75rem 0;
  line-height: 1.5;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--card-border);
}

/* ==================== Toast ==================== */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 200;
}

.toast {
  padding: 0.875rem 1.25rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  animation: slideIn 0.2s ease;
}

.toast-success {
  background: var(--success);
  color: white;
}

.toast-error {
  background: var(--danger);
  color: white;
}

.toast-info {
  background: var(--accent);
  color: var(--bg);
}

.toast-warning {
  background: var(--warning);
  color: var(--bg);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ==================== Monitor Button (for addresses) ==================== */
.monitor-btn-wrapper {
  position: relative;
  display: inline-block;
}

.btn-monitor {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  background: var(--accent);
  color: var(--bg);
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-monitor:hover {
  background: #4eecd0;
}

.btn-monitor.is-monitored {
  background: var(--success);
  color: white;
}

.btn-monitor svg {
  width: 0.875rem;
  height: 0.875rem;
}

.btn-monitor-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border-radius: 6px;
  background: transparent;
  border: 1px solid var(--card-border);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-monitor-sm:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

.btn-monitor-sm.monitored {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.btn-monitor-sm svg {
  width: 0.875rem;
  height: 0.875rem;
}

.btn-monitor-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  padding: 0;
  border-radius: 4px;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  opacity: 0;
  transition: all 0.15s ease;
}

tr:hover .btn-monitor-icon,
.address-cell:hover .btn-monitor-icon {
  opacity: 1;
}

.btn-monitor-icon:hover {
  color: var(--accent);
}

.btn-monitor-icon.monitored {
  opacity: 1;
  color: var(--success);
}

.btn-monitor-icon svg {
  width: 0.875rem;
  height: 0.875rem;
}

/* Inline monitor button (for use next to copy buttons) */
.monitor-btn-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.monitor-btn-inline:hover {
  background: var(--accent);
  color: var(--bg);
}

.monitor-btn-inline.monitored {
  background: var(--success);
  color: white;
}

.monitor-btn-inline svg {
  width: 16px;
  height: 16px;
}

/* Monitor dropdown */
.monitor-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.375rem;
  min-width: 200px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  z-index: 50;
}

.monitor-dropdown .dropdown-header {
  padding: 0.625rem 0.875rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  border-bottom: 1px solid var(--card-border);
}

.monitor-dropdown .dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 0.8125rem;
  color: var(--fg);
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.1s ease;
}

.monitor-dropdown .dropdown-item:hover {
  background: rgba(99, 255, 226, 0.08);
}

.monitor-dropdown .dropdown-item:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.monitor-dropdown .dropdown-divider {
  height: 1px;
  background: var(--card-border);
  margin: 0.25rem 0;
}

.monitor-dropdown .dropdown-create {
  color: var(--accent);
}

.monitor-dropdown .badge-default {
  font-size: 0.5625rem;
  padding: 0.0625rem 0.25rem;
}

.monitor-dropdown .badge-added {
  color: var(--success);
}

/* Address cell with monitor button */
.address-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ==================== Text utilities ==================== */
.text-success {
  color: var(--success);
}

.text-muted {
  color: var(--muted);
}

/* ==================== Responsive ==================== */
@media (max-width: 640px) {
  .monitoring-header {
    flex-direction: column;
  }

  .monitoring-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .watchlist-grid {
    grid-template-columns: 1fr;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn {
    width: 100%;
  }
}

/* ==================== User Dropdown for Header ==================== */
.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  min-width: 220px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  z-index: 200;
  overflow: hidden;
}

.user-dropdown-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--card-border);
}

.user-dropdown-name {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
}

.user-dropdown-email {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.user-dropdown-item {
  display: block;
  width: 100%;
  padding: 10px 16px;
  background: transparent;
  border: none;
  color: var(--fg);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}

.user-dropdown-item:hover {
  background: rgba(99, 255, 226, 0.08);
}

/* ==================== Quick Stats Bar (Phase 2) ==================== */
.quick-stats-bar {
  display: flex;
  gap: 0;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  margin-bottom: 2rem;
  overflow: hidden;
}

.quick-stat {
  flex: 1;
  padding: 1.25rem 1.5rem;
  text-align: center;
  border-right: 1px solid var(--card-border);
}

.quick-stat:last-child {
  border-right: none;
}

.quick-stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--fg);
  line-height: 1;
}

.quick-stat-label {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.5rem;
}

.quick-stat.has-changes {
  background: rgba(234, 179, 8, 0.1);
}

.quick-stat.has-changes .quick-stat-value {
  color: var(--warning);
}

/* ==================== Enhanced Watch List Cards (Phase 2) ==================== */
.watchlist-card.has-changes {
  border-color: var(--warning);
  box-shadow: 0 0 0 1px rgba(234, 179, 8, 0.3);
}

.watchlist-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.watchlist-card-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.watchlist-star {
  color: var(--accent);
  display: flex;
  align-items: center;
}

.badge-warning {
  background: rgba(234, 179, 8, 0.15);
  color: var(--warning);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
}

.watchlist-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.meta-divider {
  opacity: 0.4;
}

.meta-item strong {
  color: var(--fg);
}

.watchlist-alert-config {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--success);
  margin-bottom: 0.75rem;
}

.watchlist-alert-config svg {
  flex-shrink: 0;
}

.watchlist-no-alerts {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--muted);
  opacity: 0.6;
  margin-bottom: 0.75rem;
}

.watchlist-changes-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  background: rgba(234, 179, 8, 0.1);
  border: 1px solid rgba(234, 179, 8, 0.3);
  border-radius: 8px;
  margin-bottom: 1rem;
}

.changes-alert-icon {
  color: var(--warning);
  flex-shrink: 0;
}

.changes-alert-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.changes-alert-text {
  font-size: 0.8125rem;
  color: var(--warning);
  font-weight: 500;
}

.watchlist-no-changes {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.8125rem;
  color: var(--success);
}

.watchlist-card-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  border-top: 1px solid var(--card-border);
  margin-top: auto;
}

.watchlist-card-actions .btn {
  flex: none;
}

.btn-ghost {
  background: transparent;
  border: none;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
}

.btn-ghost.btn-danger {
  color: var(--danger);
}

.btn-ghost.btn-danger:hover {
  background: rgba(239, 68, 68, 0.1);
}

/* ==================== WATCHLIST V3 STYLES ==================== */

/* Summary Bar */
.wl3-summary-bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.wl3-summary-total {
  display: flex;
  align-items: baseline;
  gap: 0.375rem;
  padding-right: 1.5rem;
  border-right: 1px solid var(--card-border);
}

.wl3-summary-count {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--fg);
}

.wl3-summary-label {
  font-size: 0.875rem;
  color: var(--muted);
}

.wl3-summary-tags {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  flex: 1;
}

.wl3-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  font-size: 0.8125rem;
  color: var(--fg);
  cursor: pointer;
  transition: all 0.15s ease;
}

.wl3-tag-chip:hover {
  border-color: var(--tag-color, var(--accent));
  background: rgba(255, 255, 255, 0.08);
}

.wl3-tag-chip.active {
  background: var(--tag-color, var(--accent));
  border-color: var(--tag-color, var(--accent));
  color: #000;
}

.wl3-tag-chip .wl3-tag-name {
  font-weight: 500;
}

.wl3-tag-chip .wl3-tag-count {
  padding: 0.125rem 0.375rem;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 10px;
  font-size: 0.6875rem;
  font-weight: 600;
}

.wl3-tag-chip.active .wl3-tag-count {
  background: rgba(0, 0, 0, 0.25);
}

.wl3-tag-manage {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  border: 1px dashed var(--card-border);
  border-radius: 50%;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.wl3-tag-manage:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(99, 255, 226, 0.05);
}

/* Toolbar */
.wl3-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.wl3-toolbar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 300px;
}

.wl3-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  max-width: 400px;
  padding: 0.5rem 0.875rem;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  transition: border-color 0.15s ease;
}

.wl3-search:focus-within {
  border-color: var(--accent);
}

.wl3-search svg {
  color: var(--muted);
  flex-shrink: 0;
}

.wl3-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 0.875rem;
  color: var(--fg);
}

.wl3-search-input::placeholder {
  color: var(--muted);
}

.wl3-filter-select {
  padding: 0.5rem 0.875rem;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  font-size: 0.875rem;
  color: var(--fg);
  cursor: pointer;
}

.wl3-filter-select:focus {
  outline: none;
  border-color: var(--accent);
}

/* Bulk Actions */
.wl3-bulk-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  background: rgba(99, 255, 226, 0.08);
  border: 1px solid rgba(99, 255, 226, 0.3);
  border-radius: 8px;
}

.wl3-selected-count {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
  padding-right: 0.75rem;
  border-right: 1px solid rgba(99, 255, 226, 0.3);
}

/* Dropdown */
.wl3-dropdown {
  position: relative;
}

.wl3-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1000;
  min-width: 180px;
  margin-top: 0.25rem;
  padding: 0.375rem;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.wl3-dropdown-menu-sm {
  min-width: 140px;
}

.wl3-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: none;
  border-radius: 6px;
  font-size: 0.8125rem;
  color: var(--fg);
  cursor: pointer;
  text-align: left;
  transition: background 0.1s ease;
}

.wl3-dropdown-item:hover {
  background: rgba(99, 255, 226, 0.08);
}

.wl3-dropdown-color {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

.wl3-dropdown-divider {
  height: 1px;
  background: var(--card-border);
  margin: 0.375rem 0;
}

.wl3-dropdown-create {
  color: var(--accent);
}

.wl3-dropdown-empty {
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  color: var(--muted);
  font-style: italic;
}

/* Table */
.wl3-table-container {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  overflow: visible;
}

/* Ensure rounded corners for first/last rows */
.wl3-table thead tr:first-child th:first-child {
  border-top-left-radius: 12px;
}
.wl3-table thead tr:first-child th:last-child {
  border-top-right-radius: 12px;
}
.wl3-table tbody tr:last-child td:first-child {
  border-bottom-left-radius: 12px;
}
.wl3-table tbody tr:last-child td:last-child {
  border-bottom-right-radius: 12px;
}

.wl3-table {
  width: 100%;
  border-collapse: collapse;
}

.wl3-table thead {
  background: var(--bg);
  border-bottom: 1px solid var(--card-border);
}

.wl3-table th {
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  text-align: left;
  white-space: nowrap;
}

.wl3-table tbody tr {
  border-bottom: 1px solid var(--card-border);
  transition: background 0.1s ease;
}

.wl3-table tbody tr:last-child {
  border-bottom: none;
}

.wl3-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.wl3-table tbody tr.selected {
  background: rgba(99, 255, 226, 0.05);
}

.wl3-table td {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--fg);
  vertical-align: middle;
}

/* Table Column Widths */
.wl3-th-checkbox,
.wl3-td-checkbox {
  width: 40px;
  text-align: center;
}

.wl3-th-address {
  width: 220px;
}

.wl3-th-label {
  width: 200px;
}

.wl3-th-tags {
  min-width: 120px;
  max-width: 180px;
}

/* PROXIMITY group header */
.wl3-th-proximity-group {
  padding: 0.5rem 0;
  vertical-align: bottom;
  border-bottom: 2px solid var(--accent);
}

.wl3-proximity-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.6875rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  width: 100%;
}

.wl3-proximity-label svg {
  opacity: 0.7;
}

/* Proximity sub-header row (time periods) */
.wl3-proximity-subheader th {
  padding: 0.375rem 0.5rem;
  font-size: 0.6875rem;
}

.wl3-th-risk {
  width: 100px;
  text-align: center;
}

.wl3-td-risk {
  /* No background - clean look */
}

/* First risk column - no special styling needed */
.wl3-th-risk-first {
}

.wl3-td-risk-first {
}

.wl3-th-added {
  width: 100px;
}

.wl3-th-chain,
.wl3-td-chain {
  width: 80px;
  text-align: center;
}

.wl3-th-actions {
  width: 50px;
}

/* Sortable Headers */
.wl3-th-sortable {
  cursor: pointer;
  user-select: none;
  transition: color 0.15s ease;
}

.wl3-th-sortable:hover {
  color: var(--accent);
}

.wl3-sort-icon {
  display: inline-block;
  margin-left: 0.25rem;
  font-size: 0.75rem;
  color: var(--accent);
}

/* Address Cell */
.wl3-address-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.wl3-address-link {
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
  font-size: 0.8125rem;
  color: var(--fg);
  text-decoration: none;
  transition: color 0.15s ease;
}

.wl3-address-link:hover {
  color: var(--accent);
}

.wl3-copy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: var(--muted);
  cursor: pointer;
  opacity: 0;
  transition: all 0.15s ease;
}

tr:hover .wl3-copy-btn {
  opacity: 1;
}

.wl3-copy-btn:hover {
  color: var(--accent);
  background: rgba(99, 255, 226, 0.1);
}

.wl3-chain-badge {
  padding: 0.125rem 0.375rem;
  background: var(--card-border);
  border-radius: 4px;
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--muted);
}

/* Label Cell */
.wl3-label-text {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.wl3-label-text:hover {
  background: rgba(255, 255, 255, 0.05);
}

.wl3-label-empty {
  color: var(--muted);
  font-style: italic;
  opacity: 0.6;
}

.wl3-label-empty:hover {
  opacity: 1;
  color: var(--accent);
}

.wl3-label-edit {
  display: flex;
  align-items: center;
}

.wl3-label-input {
  width: 100%;
  padding: 0.25rem 0.5rem;
  background: var(--bg);
  border: 1px solid var(--accent);
  border-radius: 4px;
  font-size: 0.875rem;
  color: var(--fg);
}

.wl3-label-input:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(99, 255, 226, 0.2);
}

/* Tags Cell */
.wl3-tags-cell {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-wrap: wrap;
}

.wl3-inline-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.1875rem 0.4375rem;
  background: color-mix(in srgb, var(--tag-color, #6b7280) 25%, transparent);
  border: 1px solid color-mix(in srgb, var(--tag-color, #6b7280) 40%, transparent);
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--tag-color, #6b7280);
}

/* Light mode: slightly more visible tags */
[data-theme='light'] .wl3-inline-tag {
  background: color-mix(in srgb, var(--tag-color, #6b7280) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--tag-color, #6b7280) 35%, transparent);
}

.wl3-tag-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 50%;
  color: var(--tag-color, #6b7280);
  cursor: pointer;
  opacity: 0;
  transition: all 0.15s ease;
}

.wl3-inline-tag:hover .wl3-tag-remove {
  opacity: 0.7;
}

.wl3-tag-remove:hover {
  opacity: 1;
  background: color-mix(in srgb, var(--tag-color, #6b7280) 30%, transparent);
}

.wl3-add-tag-dropdown {
  position: relative;
}

.wl3-add-tag-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  background: transparent;
  border: 1px dashed var(--card-border);
  border-radius: 4px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.wl3-add-tag-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(99, 255, 226, 0.05);
}

/* Risk Badge */
.wl3-risk-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.wl3-risk-badge.clean {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
}

.wl3-risk-badge.low {
  background: rgba(34, 197, 94, 0.1);
  color: #86efac;
}

.wl3-risk-badge.medium {
  background: rgba(234, 179, 8, 0.15);
  color: var(--warning);
}

.wl3-risk-badge.high {
  background: rgba(249, 115, 22, 0.15);
  color: #fb923c;
}

.wl3-risk-badge.critical {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

.wl3-risk-badge.blacklisted {
  background: var(--danger);
  color: white;
}

/* Date */
.wl3-date {
  font-size: 0.8125rem;
  color: var(--muted);
}

/* Pagination */
.wl3-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.wl3-pagination-info {
  font-size: 0.875rem;
  color: var(--muted);
}

/* Tag Selector (Add Modal) */
.wl3-tag-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.wl3-tag-option {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  background: transparent;
  border: 1px solid var(--card-border);
  border-radius: 6px;
  font-size: 0.8125rem;
  color: var(--fg);
  cursor: pointer;
  transition: all 0.15s ease;
}

.wl3-tag-option:hover:not(:disabled) {
  border-color: var(--tag-color, var(--accent));
}

.wl3-tag-option.selected {
  background: var(--tag-color, var(--accent));
  border-color: var(--tag-color, var(--accent));
  color: #000;
}

.wl3-tag-option:disabled,
.wl3-tag-option.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.wl3-tag-checkbox {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Tag Manager */
.wl3-create-tag-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;
}

.wl3-create-tag-form .form-input {
  flex: 1;
  min-width: 150px;
}

.wl3-create-tag-form .btn {
  align-self: flex-start;
  transition: all 0.2s ease;
}

/* Make Add button obvious when active */
.wl3-create-tag-form .btn:not(:disabled) {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
  font-weight: 600;
  box-shadow: 0 0 12px rgba(99, 255, 226, 0.4);
  animation: pulse-glow 1.5s ease-in-out infinite;
}

.wl3-create-tag-form .btn:not(:disabled):hover {
  transform: scale(1.05);
  box-shadow: 0 0 16px rgba(99, 255, 226, 0.6);
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 8px rgba(99, 255, 226, 0.3); }
  50% { box-shadow: 0 0 16px rgba(99, 255, 226, 0.5); }
}

.wl3-color-swatches {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  width: 100%;
  flex-basis: 100%;
  padding: 0.5rem 0;
}

.wl3-color-swatch {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.1s ease, border-color 0.1s ease;
}

.wl3-color-swatch:hover {
  transform: scale(1.15);
}

.wl3-color-swatch.selected {
  border-color: var(--fg);
  box-shadow: 0 0 0 2px var(--bg);
}

.wl3-tag-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 300px;
  overflow-y: auto;
}

.wl3-tag-list-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg);
  border-radius: 8px;
}

.wl3-tag-list-color {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  flex-shrink: 0;
}

.wl3-tag-list-name {
  font-weight: 500;
  color: var(--fg);
  flex: 1;
}

.wl3-tag-list-count {
  font-size: 0.75rem;
  color: var(--muted);
}

.wl3-tag-list-empty {
  padding: 2rem;
  text-align: center;
  color: var(--muted);
}

/* Delete Modal */
.wl3-delete-address {
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
  font-size: 0.875rem;
  word-break: break-all;
}

/* Bulk Import */
.wl3-bulk-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.wl3-csv-upload {
  cursor: pointer;
}

.wl3-validation-results {
  margin-top: 1rem;
  border-top: 1px solid var(--card-border);
  padding-top: 1rem;
}

.wl3-validation-loading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.loading-spinner-sm {
  width: 16px;
  height: 16px;
  border: 2px solid var(--card-border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.wl3-validation-section {
  margin-bottom: 1rem;
}

.wl3-validation-section:last-child {
  margin-bottom: 0;
}

.wl3-validation-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.wl3-validation-title.wl3-validation-success {
  color: var(--success, #22c55e);
}

.wl3-validation-title.wl3-validation-error {
  color: var(--error, #ef4444);
}

.wl3-validation-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.wl3-validation-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8125rem;
}

.wl3-validation-item.wl3-validation-valid {
  background: rgba(34, 197, 94, 0.1);
}

.wl3-validation-item.wl3-validation-invalid {
  background: rgba(239, 68, 68, 0.1);
}

.wl3-validation-address {
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
  font-size: 0.75rem;
  color: var(--fg);
}

.wl3-validation-label {
  color: var(--muted);
  font-size: 0.75rem;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wl3-validation-chain {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 0.125rem 0.375rem;
  border-radius: 3px;
  background: var(--card-alt);
  color: var(--muted);
}

.wl3-validation-error-msg {
  color: var(--error, #ef4444);
  font-size: 0.75rem;
  flex: 1;
}

.wl3-validation-more {
  font-size: 0.75rem;
  color: var(--muted);
  padding-left: 0.75rem;
}

/* Link button */
.btn-link {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  font-size: inherit;
  padding: 0;
}

.btn-link:hover {
  color: var(--accent-hover, var(--accent));
}

/* Responsive */
@media (max-width: 1024px) {
  .wl3-table-container {
    overflow-x: auto;
  }

  .wl3-table {
    min-width: 800px;
  }
}

@media (max-width: 640px) {
  .wl3-summary-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .wl3-summary-total {
    padding-right: 0;
    border-right: none;
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--card-border);
    width: 100%;
  }

  .wl3-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .wl3-toolbar-left {
    min-width: auto;
    flex-direction: column;
  }

  .wl3-search {
    max-width: none;
  }

  .wl3-bulk-actions {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* ==================== Bulk Screening - Risk Summary Cards ==================== */
/* Design System: Summary cards use the same accent-on-dark style as the rest of the app */
.wl3-risk-summary {
  display: flex;
  gap: 0;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.wl3-risk-card {
  flex: 1;
  padding: 1.25rem 1rem;
  text-align: center;
  border-right: 1px solid var(--card-border);
  transition: background 0.15s ease;
}

.wl3-risk-card:last-child {
  border-right: none;
}

.wl3-risk-card:hover {
  background: rgba(255, 255, 255, 0.02);
}

.wl3-risk-value {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--fg);
  line-height: 1;
}

.wl3-risk-label {
  display: block;
  font-size: 0.6875rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.5rem;
}

/* Risk card color variants - use border-top accent instead of colored text */
.wl3-risk-clean {
  border-top: 3px solid #22c55e;
}
.wl3-risk-clean .wl3-risk-value { color: #22c55e; }

.wl3-risk-changed {
  border-top: 3px solid #f59e0b;
}
.wl3-risk-changed .wl3-risk-value { color: #f59e0b; }

.wl3-risk-risky {
  border-top: 3px solid #f97316;
}
.wl3-risk-risky .wl3-risk-value { color: #f97316; }

.wl3-risk-critical {
  border-top: 3px solid #ef4444;
}
.wl3-risk-critical .wl3-risk-value { color: #ef4444; }

/* Light mode adjustments */
[data-theme='light'] .wl3-risk-card:hover {
  background: rgba(0, 0, 0, 0.02);
}

/* ==================== Proximity Summary - Single Row Hop Distribution ==================== */
.wl3-proximity-summary {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.wl3-proximity-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.02);
}

.wl3-proximity-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.05em;
}

.wl3-proximity-subtitle {
  font-size: 0.75rem;
  color: var(--fg);
  opacity: 0.75;
  font-weight: 500;
}

.wl3-proximity-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0;
}

.wl3-hop-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem 0.5rem;
  text-align: center;
  border-right: 1px solid var(--card-border);
  transition: background 0.15s ease;
  min-height: 90px;
}

.wl3-hop-card:last-child {
  border-right: none;
}

.wl3-hop-card:hover {
  background: rgba(255, 255, 255, 0.03);
}

.wl3-hop-value {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.wl3-hop-label {
  font-size: 1rem;
  font-weight: 700;
  margin-top: 0.375rem;
}

.wl3-hop-desc {
  font-size: 0.6875rem;
  color: var(--fg);
  opacity: 0.7;
  text-transform: lowercase;
  margin-top: 0.125rem;
}

/* Hop card color variants - WCAG AA compliant (4.5:1 contrast minimum) */
.wl3-hop-total {
  background: rgba(255, 255, 255, 0.02);
}
.wl3-hop-total .wl3-hop-value { color: var(--fg); }
.wl3-hop-total .wl3-hop-label { color: var(--fg); opacity: 0.8; }

/* Dark mode colors - bright for contrast on dark backgrounds */
.wl3-hop-0 { border-top: 4px solid #ff4444; }
.wl3-hop-0 .wl3-hop-value { color: #ff4444; font-weight: 700; }
.wl3-hop-0 .wl3-hop-label { color: #ff4444; font-weight: 700; }

.wl3-hop-1 { border-top: 3px solid #f87171; }
.wl3-hop-1 .wl3-hop-value { color: #f87171; }
.wl3-hop-1 .wl3-hop-label { color: #f87171; }

.wl3-hop-2 { border-top: 3px solid #fb923c; }
.wl3-hop-2 .wl3-hop-value { color: #fdba74; }
.wl3-hop-2 .wl3-hop-label { color: #fdba74; }

.wl3-hop-3 { border-top: 3px solid #fbbf24; }
.wl3-hop-3 .wl3-hop-value { color: #fcd34d; }
.wl3-hop-3 .wl3-hop-label { color: #fcd34d; }

.wl3-hop-4 { border-top: 3px solid #7dd3fc; }
.wl3-hop-4 .wl3-hop-value { color: #7dd3fc; }
.wl3-hop-4 .wl3-hop-label { color: #7dd3fc; }

.wl3-hop-5plus { border-top: 3px solid #4ade80; }
.wl3-hop-5plus .wl3-hop-value { color: #86efac; }
.wl3-hop-5plus .wl3-hop-label { color: #86efac; }

.wl3-hop-na { border-top: 3px solid #9ca3af; }
.wl3-hop-na .wl3-hop-value { color: #9ca3af; }
.wl3-hop-na .wl3-hop-label { color: #9ca3af; }

.wl3-hop-changed { border-top: 3px solid #facc15; }
.wl3-hop-changed .wl3-hop-value { color: #fde047; }
.wl3-hop-changed .wl3-hop-label { color: #fde047; }

/* Light mode - darker colors for contrast on white backgrounds */
[data-theme='light'] .wl3-hop-card:hover {
  background: rgba(0, 0, 0, 0.02);
}

[data-theme='light'] .wl3-proximity-header {
  background: rgba(0, 0, 0, 0.02);
}

[data-theme='light'] .wl3-hop-0 { border-top-color: #dc2626; }
[data-theme='light'] .wl3-hop-0 .wl3-hop-value { color: #dc2626; font-weight: 700; }
[data-theme='light'] .wl3-hop-0 .wl3-hop-label { color: #dc2626; font-weight: 700; }

[data-theme='light'] .wl3-hop-1 { border-top-color: #dc2626; }
[data-theme='light'] .wl3-hop-1 .wl3-hop-value { color: #dc2626; }
[data-theme='light'] .wl3-hop-1 .wl3-hop-label { color: #dc2626; }

[data-theme='light'] .wl3-hop-2 { border-top-color: #c2410c; }
[data-theme='light'] .wl3-hop-2 .wl3-hop-value { color: #c2410c; }
[data-theme='light'] .wl3-hop-2 .wl3-hop-label { color: #c2410c; }

[data-theme='light'] .wl3-hop-3 { border-top-color: #a16207; }
[data-theme='light'] .wl3-hop-3 .wl3-hop-value { color: #a16207; }
[data-theme='light'] .wl3-hop-3 .wl3-hop-label { color: #a16207; }

[data-theme='light'] .wl3-hop-4 { border-top-color: #0369a1; }
[data-theme='light'] .wl3-hop-4 .wl3-hop-value { color: #0369a1; }
[data-theme='light'] .wl3-hop-4 .wl3-hop-label { color: #0369a1; }

[data-theme='light'] .wl3-hop-5plus { border-top-color: #15803d; }
[data-theme='light'] .wl3-hop-5plus .wl3-hop-value { color: #15803d; }
[data-theme='light'] .wl3-hop-5plus .wl3-hop-label { color: #15803d; }

[data-theme='light'] .wl3-hop-na { border-top-color: #4b5563; }
[data-theme='light'] .wl3-hop-na .wl3-hop-value { color: #4b5563; }
[data-theme='light'] .wl3-hop-na .wl3-hop-label { color: #4b5563; }

[data-theme='light'] .wl3-hop-changed { border-top-color: #a16207; }
[data-theme='light'] .wl3-hop-changed .wl3-hop-value { color: #a16207; }
[data-theme='light'] .wl3-hop-changed .wl3-hop-label { color: #a16207; }

/* Responsive: 4 columns on tablet, 2 columns on mobile */
@media (max-width: 1024px) {
  .wl3-proximity-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .wl3-hop-card {
    border-bottom: 1px solid var(--card-border);
  }

  .wl3-hop-card:nth-child(4n) {
    border-right: none;
  }

  .wl3-hop-card:nth-child(n+5) {
    border-bottom: none;
  }
}

@media (max-width: 640px) {
  .wl3-proximity-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .wl3-hop-card {
    min-height: 70px;
    padding: 0.75rem 0.25rem;
  }

  .wl3-hop-value {
    font-size: 1.5rem;
  }

  .wl3-hop-label {
    font-size: 0.875rem;
  }

  .wl3-hop-desc {
    font-size: 0.625rem;
  }
}

/* ==================== Risk Columns in Table ==================== */
.wl3-th-risk {
  width: 50px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
}

.wl3-td-risk {
  text-align: center;
  padding: 0.5rem 0.25rem;
  position: relative;
}

/* Depth badges with VIBRANT colors - risk should stand out more than tags */
.wl3-depth-badge {
  display: inline-block;
  min-width: 32px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.02em;
  transition: transform 0.1s ease;
}

.wl3-depth-badge:hover {
  transform: scale(1.05);
}

/* UNKNOWN/NOT SCANNED - Gray, NOT green! User has not checked this address */
.wl3-depth-badge.depth-unknown {
  background: #4b5563;
  color: #d1d5db;
  font-weight: 500;
  font-size: 0.6875rem;
  letter-spacing: 0.03em;
}

/* Dark mode: vibrant backgrounds with dark text for contrast */
.wl3-depth-badge.depth-clean {
  background: #22c55e;
  color: #052e16;
}

.wl3-depth-badge.depth-4 {
  background: #38bdf8;
  color: #082f49;
}

.wl3-depth-badge.depth-3 {
  background: #facc15;
  color: #422006;
}

.wl3-depth-badge.depth-2 {
  background: #fb923c;
  color: #431407;
}

.wl3-depth-badge.depth-1 {
  background: #f87171;
  color: #450a0a;
}

.wl3-depth-badge.depth-0 {
  background: #dc2626;
  color: #ffffff;
  font-weight: 800;
}

/* Light mode: slightly darker backgrounds for contrast */
[data-theme='light'] .wl3-depth-badge.depth-clean {
  background: #16a34a;
  color: #ffffff;
}

[data-theme='light'] .wl3-depth-badge.depth-4 {
  background: #0ea5e9;
  color: #ffffff;
}

[data-theme='light'] .wl3-depth-badge.depth-3 {
  background: #eab308;
  color: #1c1917;
}

[data-theme='light'] .wl3-depth-badge.depth-2 {
  background: #f97316;
  color: #ffffff;
}

[data-theme='light'] .wl3-depth-badge.depth-1 {
  background: #ef4444;
  color: #ffffff;
}

[data-theme='light'] .wl3-depth-badge.depth-0 {
  background: #b91c1c;
  color: #ffffff;
}

/* Light mode unknown */
[data-theme='light'] .wl3-depth-badge.depth-unknown {
  background: #9ca3af;
  color: #374151;
}

/* DISTANT MUTED - For historical columns when today is distant */
/* Similar to unknown (muted gray) but in muted green to indicate distance */
.wl3-depth-badge.depth-distant-muted {
  background: #374151;
  color: #86efac;
  font-weight: 400;
}

[data-theme='light'] .wl3-depth-badge.depth-distant-muted {
  background: #e5e7eb;
  color: #16a34a;
  font-weight: 400;
}

/* Changed indicator */
.wl3-depth-badge.changed {
  animation: pulse-change 2s infinite;
}

@keyframes pulse-change {
  0%, 100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.4); }
  50% { box-shadow: 0 0 0 4px rgba(249, 115, 22, 0); }
}

.wl3-change-indicator {
  display: inline-block;
  margin-left: 2px;
  color: #f59e0b;
  font-size: 0.625rem;
  vertical-align: super;
}

/* ==================== Responsive Risk Summary ==================== */
@media (max-width: 768px) {
  .wl3-risk-summary {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 480px) {
  .wl3-risk-summary {
    grid-template-columns: repeat(2, 1fr);
  }

  .wl3-risk-card {
    padding: 0.75rem;
  }

  .wl3-risk-value {
    font-size: 1.25rem;
  }
}

/* ==================== Mobile Card Layout ==================== */
/* Transform table to cards on mobile */
@media (max-width: 900px) {
  /* Hide table structure */
  .wl3-table-container {
    overflow: visible;
  }

  .wl3-table {
    display: block;
    min-width: unset;
  }

  .wl3-table thead {
    display: none;
  }

  .wl3-table tbody {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .wl3-table tbody tr {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 1rem;
    gap: 0.75rem;
  }

  .wl3-table tbody tr:hover {
    background: var(--card);
  }

  .wl3-table tbody tr.selected {
    border-color: var(--accent);
    background: rgba(99, 255, 226, 0.03);
  }

  .wl3-table td {
    display: flex;
    align-items: center;
    padding: 0;
    border: none;
  }

  /* Checkbox & Address row */
  .wl3-td-checkbox {
    position: absolute;
    top: 1rem;
    right: 1rem;
  }

  .wl3-table tbody tr {
    position: relative;
  }

  .wl3-td-address {
    order: 1;
    padding-right: 2rem;
  }

  .wl3-address-cell {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .wl3-address-link {
    font-size: 0.875rem;
    font-weight: 500;
    word-break: break-all;
  }

  /* Label row */
  .wl3-td-label {
    order: 2;
    color: var(--muted);
    font-size: 0.875rem;
  }

  .wl3-td-label .wl3-label-text {
    color: var(--fg);
    font-weight: 500;
  }

  .wl3-td-label .wl3-label-empty {
    font-size: 0.8125rem;
  }

  /* Chain badge */
  .wl3-td-chain {
    order: 3;
    position: absolute;
    top: 1rem;
    left: 1rem;
  }

  /* Tags */
  .wl3-td-tags {
    order: 4;
    flex-wrap: wrap;
  }

  .wl3-tags-cell {
    gap: 0.375rem;
  }

  /* Risk grid - show all 5 columns in a row */
  .wl3-td-risk {
    order: 5;
    flex: 1;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
  }

  /* Create risk row container */
  .wl3-table tbody tr::after {
    content: '';
    display: block;
    width: 100%;
    order: 10;
  }

  /* Add labels above risk badges on mobile */
  .wl3-td-risk::before {
    content: attr(data-label);
    font-size: 0.625rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  /* Actions row */
  .wl3-td-actions {
    order: 6;
    justify-content: flex-end;
    gap: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--card-border);
    margin-top: 0.5rem;
  }

  .wl3-td-actions .btn-icon-sm {
    width: 2.5rem;
    height: 2.5rem;
  }
}

/* Risk row wrapper for mobile */
@media (max-width: 900px) {
  /* Create a flex row for risk columns */
  .wl3-mobile-risk-row {
    display: flex;
    gap: 0.25rem;
    justify-content: space-between;
    width: 100%;
    order: 5;
    padding: 0.5rem 0;
    border-top: 1px dashed var(--card-border);
    margin-top: 0.25rem;
  }
}

/* Very small screens - simplify further */
@media (max-width: 400px) {
  .monitoring-header {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .monitoring-header-right {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-start;
  }

  .monitoring-header-right .btn {
    flex: 1 1 calc(50% - 0.25rem);
    min-width: 0;
    padding: 0.625rem 0.75rem;
    font-size: 0.8125rem;
  }

  .monitoring-header-right .btn .btn-icon {
    width: 0.875rem;
    height: 0.875rem;
  }

  .wl3-summary-bar {
    padding: 0.75rem;
  }

  .wl3-toolbar {
    gap: 0.75rem;
  }

  .wl3-toolbar-left {
    min-width: 100%;
  }

  .wl3-search {
    max-width: 100%;
  }

  .wl3-bulk-actions {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .wl3-selected-count {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid rgba(99, 255, 226, 0.3);
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
  }
}

/* ==================== RISK LEGEND ==================== */
.wl3-risk-legend {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.wl3-risk-legend-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.wl3-risk-legend-title svg {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

.wl3-risk-legend-items {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  flex: 1;
}

.wl3-risk-legend-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: var(--fg);
}

.wl3-risk-legend-badge {
  display: inline-block;
  min-width: 24px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-align: center;
}

.wl3-risk-legend-badge.legend-0 {
  background: #dc2626;
  color: #ffffff;
}

.wl3-risk-legend-badge.legend-1 {
  background: #f87171;
  color: #450a0a;
}

.wl3-risk-legend-badge.legend-2 {
  background: #fb923c;
  color: #431407;
}

.wl3-risk-legend-badge.legend-3 {
  background: #facc15;
  color: #422006;
}

.wl3-risk-legend-badge.legend-4 {
  background: #38bdf8;
  color: #082f49;
}

.wl3-risk-legend-badge.legend-clean {
  background: #22c55e;
  color: #052e16;
}

.wl3-risk-legend-badge.legend-unknown {
  background: #4b5563;
  color: #d1d5db;
  font-weight: 500;
}

.wl3-risk-legend-desc {
  color: var(--muted);
  font-size: 0.6875rem;
}

.wl3-risk-legend-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.5rem;
  background: transparent;
  border: 1px solid var(--card-border);
  border-radius: 4px;
  color: var(--muted);
  font-size: 0.6875rem;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-left: auto;
}

.wl3-risk-legend-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Collapsed legend */
.wl3-risk-legend.collapsed .wl3-risk-legend-items {
  display: none;
}

/* ==================== COLUMN CONFIGURATION ==================== */
.wl3-column-config {
  position: relative;
}

.wl3-column-config-btn {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.75rem;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  color: var(--fg);
  font-size: 0.8125rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.wl3-column-config-btn:hover {
  border-color: var(--accent);
  background: rgba(99, 255, 226, 0.05);
}

.wl3-column-config-btn svg {
  width: 14px;
  height: 14px;
  color: var(--muted);
}

.wl3-column-config-panel {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 1000;
  width: 320px;
  margin-top: 0.5rem;
  padding: 1rem;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.wl3-column-config-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--card-border);
}

.wl3-column-config-section {
  margin-bottom: 1rem;
}

.wl3-column-config-section:last-child {
  margin-bottom: 0;
}

.wl3-column-config-section-title {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.wl3-column-config-options {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.wl3-column-config-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.1s ease;
}

.wl3-column-config-option:hover {
  background: rgba(255, 255, 255, 0.05);
}

.wl3-column-config-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

.wl3-column-config-option label {
  font-size: 0.8125rem;
  color: var(--fg);
  cursor: pointer;
  flex: 1;
}

.wl3-column-config-option .config-hint {
  font-size: 0.6875rem;
  color: var(--muted);
}

/* Time period chips for column config */
.wl3-time-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.wl3-time-chip {
  padding: 0.25rem 0.5rem;
  background: transparent;
  border: 1px solid var(--card-border);
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.wl3-time-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.wl3-time-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

.wl3-time-chip.locked {
  cursor: not-allowed;
  opacity: 0.7;
}

.wl3-time-chip.locked:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

/* ==================== UNIFIED CONTROL PANEL ==================== */
.wl3-control-panel {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 0.625rem 1rem;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.wl3-control-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.wl3-control-panel .wl3-search {
  width: 180px;
  min-width: 140px;
}

/* Inline tag filters */
.wl3-tag-filters {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.wl3-tag-filter-label {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
}

.wl3-control-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

/* Bulk actions inside control panel */
.wl3-control-panel .wl3-bulk-actions {
  padding-top: 0.5rem;
  border-top: 1px solid rgba(99, 255, 226, 0.2);
  margin-top: 0;
}

/* ==================== IMPROVED ACTION BUTTONS ==================== */
.wl3-td-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: flex-end;
}

/* Report button - PRIMARY CTA, prominent styling */
.wl3-report-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.wl3-report-btn svg {
  width: 14px;
  height: 14px;
}

.wl3-report-btn:hover {
  background: #4eecd0;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(99, 255, 226, 0.3);
}

/* Delete button - clearly a delete action */
.wl3-delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--card-border);
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
  opacity: 0.6;
}

.wl3-delete-btn svg {
  width: 14px;
  height: 14px;
}

.wl3-table tbody tr:hover .wl3-delete-btn {
  opacity: 1;
}

.wl3-delete-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: var(--danger);
  color: var(--danger);
}

.wl3-delete-btn:active {
  background: rgba(239, 68, 68, 0.25);
}

/* ==================== ENHANCED VISUAL STYLES ==================== */

/* Improved card shadows and gradients */
.wl3-risk-summary .wl3-risk-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.wl3-risk-summary .wl3-risk-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* Subtle gradient on summary cards */
.wl3-risk-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

.wl3-risk-clean::before {
  background: linear-gradient(90deg, transparent, #22c55e, transparent);
}

.wl3-risk-changed::before {
  background: linear-gradient(90deg, transparent, #f59e0b, transparent);
}

.wl3-risk-risky::before {
  background: linear-gradient(90deg, transparent, #f97316, transparent);
}

.wl3-risk-critical::before {
  background: linear-gradient(90deg, transparent, #ef4444, transparent);
}

/* Table row hover enhancement */
.wl3-table tbody tr {
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.wl3-table tbody tr:hover {
  background: rgba(99, 255, 226, 0.03);
  box-shadow: inset 3px 0 0 var(--accent);
}

/* Header accent bar */
.monitoring-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.monitoring-header {
  position: relative;
  padding-bottom: 1rem;
}

/* Improved toolbar visual */
.wl3-toolbar {
  padding: 0.75rem;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 10px;
}

/* ==================== RESPONSIVE LEGEND ==================== */
@media (max-width: 768px) {
  .wl3-risk-legend {
    padding: 0.5rem 0.75rem;
  }

  .wl3-risk-legend-title {
    width: 100%;
    margin-bottom: 0.5rem;
  }

  .wl3-risk-legend-items {
    gap: 0.5rem;
  }

  .wl3-risk-legend-item {
    font-size: 0.6875rem;
  }

  .wl3-column-config-panel {
    width: 280px;
    right: -1rem;
  }
}

@media (max-width: 480px) {
  .wl3-risk-legend-desc {
    display: none;
  }
}

/* ==================== RESPONSIVE CONTROL PANEL ==================== */
@media (max-width: 768px) {
  .wl3-control-panel {
    padding: 0.75rem;
    gap: 0.5rem;
  }

  .wl3-control-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .wl3-search-section {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .wl3-control-panel .wl3-search {
    max-width: none;
  }

  .wl3-count-badge {
    align-self: flex-start;
  }

  .wl3-control-actions {
    justify-content: space-between;
  }

  .wl3-tag-filter-row {
    padding-top: 0.5rem;
    gap: 0.5rem;
  }

  .wl3-tag-filter-label {
    width: 100%;
    margin-bottom: 0.25rem;
  }

  .wl3-tag-chips {
    gap: 0.375rem;
  }

  /* Smaller action buttons on mobile */
  .wl3-report-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.6875rem;
  }

  .wl3-report-btn svg {
    width: 12px;
    height: 12px;
  }

  .wl3-delete-btn {
    width: 24px;
    height: 24px;
  }

  .wl3-delete-btn svg {
    width: 12px;
    height: 12px;
  }
}
