/* ═══════════════════════════════════════════════
   CARD
   ═══════════════════════════════════════════════ */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 16px;
}

.card-hero {
  padding: 20px;
  background:
    radial-gradient(700px 260px at 28% 28%, rgba(24,192,143,0.13), transparent 60%),
    var(--panel);
}

html[data-theme="light"] .card { backdrop-filter: none; box-shadow: var(--shadow-soft, var(--shadow)); }
html[data-theme="light"] .card-hero {
  background: radial-gradient(700px 260px at 28% 28%, rgba(22,163,74,0.09), transparent 60%), var(--panel);
}

.card-title { font-weight: 700; font-size: 14px; margin-bottom: 3px; letter-spacing: 0.05px; }
.card-sub { color: var(--muted); font-size: 12px; margin-bottom: 14px; line-height: 1.4; }

.hero-title { font-size: 22px; font-weight: 800; margin-bottom: 6px; letter-spacing: -0.3px; }
.hero-sub { color: var(--muted); max-width: 620px; line-height: 1.4; font-size: 13.5px; }
.hero-actions { margin-top: 16px; }

/* ═══════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════ */
.btn {
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border-2);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: transform 0.04s ease, background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.btn:hover { background: rgba(255,255,255,0.07); }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: linear-gradient(160deg, rgba(24,192,143,0.96), rgba(18,162,118,0.80));
  border-color: rgba(24,192,143,0.40);
  color: #051a10;
  font-weight: 700;
}
.btn-primary:hover {
  background: linear-gradient(160deg, rgba(24,192,143,1.0), rgba(18,162,118,0.88));
  border-color: rgba(24,192,143,0.60);
}

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

.btn-icon { width: 34px; padding: 0; border-radius: 10px; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; }

.btn-danger {
  background: var(--danger-2);
  border: 1px solid rgba(255,90,95,0.35);
  color: var(--text);
}
.btn-danger:hover { background: rgba(255,90,95,0.24); }

.btn.is-active {
  background: linear-gradient(160deg, rgba(24,192,143,0.96), rgba(18,162,118,0.80));
  border-color: rgba(24,192,143,0.50);
  color: #051a10;
  font-weight: 700;
  box-shadow: 0 0 0 4px var(--green-2);
}

/* ── Light theme buttons ── */
html[data-theme="light"] .btn {
  background: #ffffff;
  border-color: var(--border-2);
  color: var(--text);
}
html[data-theme="light"] .btn:hover { background: #f9fafb; border-color: #cbd5e1; }
html[data-theme="light"] .btn-ghost { background: rgba(15,23,42,0.03); }
html[data-theme="light"] .btn-ghost:hover { background: rgba(15,23,42,0.06); }
html[data-theme="light"] .btn-primary {
  background: linear-gradient(135deg, #16a34a, #15803d);
  border-color: rgba(22,163,74,0.50);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(22,163,74,0.20);
}
html[data-theme="light"] .btn.btn-primary:hover {
  background: linear-gradient(135deg, #15803d, #166534);
  border-color: rgba(22,163,74,0.65);
  color: #ffffff;
}
html[data-theme="light"] .btn.btn-primary:active {
  background: linear-gradient(135deg, #166534, #14532d);
}

/* ═══════════════════════════════════════════════
   FORM CONTROLS
   ═══════════════════════════════════════════════ */
.input, .select {
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border-2);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  padding: 0 12px;
  outline: none;
  font-size: 13px;
  width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input:focus, .select:focus {
  border-color: rgba(24,192,143,0.55);
  box-shadow: 0 0 0 3px var(--green-2);
}
.input::placeholder { color: var(--muted); opacity: 0.7; }

.textarea {
  min-height: 110px;
  resize: vertical;
  border-radius: 12px;
  border: 1px solid var(--border-2);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  padding: 10px 12px;
  outline: none;
  line-height: 1.45;
  font-size: 13px;
  width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.textarea:focus { border-color: rgba(24,192,143,0.55); box-shadow: 0 0 0 3px var(--green-2); }
.textarea::placeholder { color: var(--muted); opacity: 0.7; }
.textarea.textarea-code {
  font-family: var(--font-mono);
  font-size: 12px;
}
body[data-page="automations"] .textarea { resize: none; }
body[data-page="automations"] #ins-text { min-height: 210px; }

html[data-theme="light"] .input,
html[data-theme="light"] .select,
html[data-theme="light"] .textarea {
  background: #ffffff;
  border-color: var(--border-2);
  color: var(--text);
}
html[data-theme="light"] .input::placeholder,
html[data-theme="light"] .textarea::placeholder { color: rgba(100,116,139,0.80); }

/* Fix Electron dropdown colors */
select.select option, select.select optgroup { background-color: #0f1412; color: var(--text); }
select.select { color-scheme: dark; }
html[data-theme="light"] select.select option, html[data-theme="light"] select.select optgroup { background-color: #ffffff; color: rgba(15,23,42,0.92); }
html[data-theme="light"] select.select { color-scheme: light; }

/* Label */
.label { font-size: 12px; font-weight: 600; color: var(--muted); display: block; margin-bottom: 5px; }

/* ═══════════════════════════════════════════════
   SWITCH TOGGLE
   ═══════════════════════════════════════════════ */
.switch { display: inline-flex; align-items: center; }
.switch input { display: none; }
.switch-ui {
  width: 42px; height: 23px;
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
  border: 1px solid var(--border-2);
  position: relative;
  cursor: pointer;
  display: inline-block;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.switch-ui::after {
  content: "";
  width: 17px; height: 17px;
  border-radius: 50%;
  background: rgba(255,255,255,0.80);
  position: absolute;
  top: 2px; left: 2px;
  transition: all 0.18s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.switch input:checked + .switch-ui {
  background: rgba(24,192,143,0.22);
  border-color: rgba(24,192,143,0.45);
}
.switch input:checked + .switch-ui::after {
  left: 20px;
  background: rgba(24,192,143,0.95);
}

/* ═══════════════════════════════════════════════
   PILLS & BADGES
   ═══════════════════════════════════════════════ */
.pill, .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-2);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  font-size: 12px;
  white-space: nowrap;
}
.badge { background: rgba(255,255,255,0.04); }

.pill-ok { border-color: rgba(24,192,143,0.55); background: rgba(24,192,143,0.13); color: rgba(24,192,143,0.95); }
.pill-warn { border-color: rgba(245,158,11,0.55); background: rgba(245,158,11,0.13); color: rgba(245,158,11,0.95); }
.pill-off { border-color: rgba(255,90,95,0.40); background: rgba(255,90,95,0.10); color: rgba(255,90,95,0.90); }
.pill-ghost { background: rgba(255,255,255,0.02); }

.pill-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 12px 0; }
.pill-tab {
  height: 28px; padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border-2);
  background: rgba(255,255,255,0.03);
  color: var(--muted);
  cursor: pointer;
  font-size: 12.5px;
  transition: all 0.12s ease;
}
.pill-tab:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.pill-tab.is-active {
  border-color: rgba(24,192,143,0.55);
  box-shadow: 0 0 0 3px var(--green-2);
  color: var(--text);
  background: var(--green-3);
}

/* ═══════════════════════════════════════════════
   FORM LAYOUT HELPERS
   ═══════════════════════════════════════════════ */
.form { display: flex; flex-direction: column; gap: 12px; }
.form-row { display: flex; flex-direction: column; gap: 5px; }
.row { display: flex; gap: 10px; align-items: center; }
.row-gap { gap: 10px; }

.form-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.form-grid-2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) { .form-grid-2 { grid-template-columns: 1fr; } }

.hr { height: 1px; background: var(--border-2); margin: 14px 0; }

/* Section titles */
.section-title { font-weight: 800; font-size: 13px; margin-bottom: 4px; letter-spacing: 0.05px; }
.section-sub { color: var(--muted); font-size: 12px; margin-bottom: 10px; line-height: 1.4; }

/* Setting row (switch + text) */
.setting-row { display: flex; gap: 12px; align-items: flex-start; }
.setting-title { font-size: 13.5px; font-weight: 700; line-height: 1.2; }
.setting-desc { color: var(--muted); font-size: 12px; line-height: 1.35; margin-top: 2px; }

/* ═══════════════════════════════════════════════
   KBD & SHORTCUT
   ═══════════════════════════════════════════════ */
.kbd {
  font-size: 11.5px;
  padding: 3px 7px;
  border-radius: 8px;
  border: 1px solid var(--border-2);
  background: rgba(255,255,255,0.03);
  font-family: var(--font-mono);
}
.shortcut {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-2);
  background: rgba(255,255,255,0.02);
  margin-bottom: 10px;
}
html[data-theme="light"] .kbd { background: rgba(15,23,42,0.04); }

/* ═══════════════════════════════════════════════
   INSTANCES
   ═══════════════════════════════════════════════ */
.instances { display: flex; flex-direction: column; gap: 8px; }
.instance-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-2);
  background: rgba(255,255,255,0.02);
  transition: background 0.12s ease, border-color 0.12s ease;
}
.instance-row:hover { background: rgba(255,255,255,0.035); }
.instance-left { display: flex; gap: 10px; align-items: center; }
.avatar {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
}
.avatar.sm { width: 26px; height: 26px; border-radius: 8px; font-size: 11px; }
.instance-name { font-weight: 700; font-size: 13.5px; }
.instance-meta { display: flex; gap: 6px; margin-top: 2px; flex-wrap: wrap; }
.instance-actions { display: flex; gap: 6px; }

.license-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ═══════════════════════════════════════════════
   KV (key-value display)
   ═══════════════════════════════════════════════ */
.kv {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-2);
  background: rgba(255,255,255,0.02);
  color: var(--muted);
  font-size: 13px;
}
.kv > span:last-child { color: var(--text); font-weight: 600; margin-left: auto; }

.health-row { display: flex; flex-direction: column; gap: 8px; }

/* ═══════════════════════════════════════════════
   SIDE PANEL / QUICK LIST
   ═══════════════════════════════════════════════ */
.side-panel { height: 520px; display: flex; flex-direction: column; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.panel-footer { margin-top: auto; display: flex; gap: 10px; justify-content: flex-end; }

.quick-list { display: flex; flex-direction: column; gap: 8px; overflow: auto; padding-right: 4px; }
.quick-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-2);
  background: rgba(255,255,255,0.02);
  transition: background 0.12s ease;
}
.quick-item:hover { background: rgba(255,255,255,0.035); }
.quick-title { font-weight: 700; font-size: 13px; }
.quick-text { color: var(--muted); font-size: 12px; }
.quick-actions { display: flex; gap: 6px; align-items: center; }

/* ═══════════════════════════════════════════════
   KANBAN CARDS
   ═══════════════════════════════════════════════ */
.kanban-card {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-2);
  background: rgba(255,255,255,0.025);
  cursor: grab;
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.12s ease, box-shadow 0.12s ease;
}
.kanban-card:hover { background: rgba(255,255,255,0.04); }
.kanban-card.dragging { opacity: 0.55; cursor: grabbing; }

.card-line { display: flex; gap: 8px; align-items: center; }
.title { font-weight: 800; flex: 1; font-size: 13px; letter-spacing: -0.1px; }
.pill-row { margin-top: 8px; display: flex; gap: 6px; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
.pill-row::-webkit-scrollbar { height: 4px; }
.pill-row::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.10); border-radius: 999px; }
html[data-theme="dark"] .pill-row::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); }

/* Chat notification states */
.kanban-card.is-updated {
  border-color: rgba(24,192,143,0.85);
  box-shadow: 0 0 0 1px rgba(24,192,143,0.30), 0 0 16px rgba(24,192,143,0.22);
}
.kanban-card.wd-chat--incoming-updated {
  border-color: rgba(0,255,136,0.90);
  box-shadow: 0 0 0 1px rgba(0,255,136,0.32), 0 0 20px rgba(0,255,136,0.25);
}
.kanban-card.wd-chat--outgoing-updated {
  border-color: rgba(77,163,255,0.90);
  box-shadow: 0 0 0 1px rgba(77,163,255,0.28), 0 0 16px rgba(77,163,255,0.20);
}
.kanban-card.wd-chat--incoming-pulse {
  border-color: rgba(0,255,136,0.98);
  box-shadow: 0 0 0 1px rgba(0,255,136,0.38), 0 0 22px rgba(0,255,136,0.30);
  animation: wdPulseGreen 1.1s ease-in-out 3;
}
.kanban-card.wd-chat--incoming-hold {
  border-color: rgba(0,255,136,0.50);
  box-shadow: 0 0 0 1px rgba(0,255,136,0.15), 0 0 8px rgba(0,255,136,0.10);
}
.kanban-card.wd-chat--outgoing-pulse {
  border-color: rgba(77,163,255,0.90);
  box-shadow: 0 0 0 1px rgba(77,163,255,0.28), 0 0 14px rgba(77,163,255,0.18);
}

@keyframes wdPulseGreen {
  0%   { box-shadow: 0 0 0 1px rgba(0,255,136,0.15), 0 0 6px rgba(0,255,136,0.08); }
  50%  { box-shadow: 0 0 0 1px rgba(0,255,136,0.50), 0 0 26px rgba(0,255,136,0.42); }
  100% { box-shadow: 0 0 0 1px rgba(0,255,136,0.15), 0 0 6px rgba(0,255,136,0.08); }
}

/* Kanban page polish */
body[data-page="kanban"] .kanban-card {
  border-radius: 13px;
  background: var(--panel);
}
html[data-theme="dark"] body[data-page="kanban"] .kanban-card { background: rgba(255,255,255,0.025); box-shadow: none; }
body[data-page="kanban"] .kanban-card:hover {
  border-color: rgba(22,163,74,0.50);
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  transform: translateY(-1px);
}
html[data-theme="dark"] body[data-page="kanban"] .kanban-card:hover { box-shadow: 0 8px 22px rgba(0,0,0,0.30); }
body[data-page="kanban"] .kanban-col { background: var(--panel-2); }
html[data-theme="light"] body[data-page="kanban"] .kanban-col { background: rgba(255,255,255,0.88); }
body[data-page="kanban"] .kanban-col-tags .pill { font-size: 11px; padding: 2px 7px; white-space: nowrap; }
body[data-page="kanban"] .kanban-card .pill { font-size: 11px; padding: 2px 7px; }
body[data-page="kanban"] .page-head .search-row .input,
body[data-page="kanban"] .page-head .search-row .select { min-width: 200px; }
@media (max-width: 980px) {
  body[data-page="kanban"] .kanban-col { min-width: 290px; max-width: 290px; }
}

.pill.pill-tag {
  border-color: rgba(24,192,143,0.28);
  background: rgba(24,192,143,0.11);
  color: rgba(255,255,255,0.88);
}

/* ═══════════════════════════════════════════════
   CHIP / CHIPBAR
   ═══════════════════════════════════════════════ */
.chipbar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.chip {
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-2);
  background: rgba(255,255,255,0.02);
}

/* ═══════════════════════════════════════════════
   TABLE
   ═══════════════════════════════════════════════ */
.table-wrap {
  overflow: auto;
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  background: var(--panel-2);
}
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table thead th {
  text-align: left;
  padding: 9px 10px;
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
  border-bottom: 1px solid var(--border-2);
  background: rgba(0,0,0,0.05);
  white-space: nowrap;
}
.table tbody td { padding: 9px 10px; border-bottom: 1px solid var(--border-2); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: rgba(255,255,255,0.035); }
.table tr.is-selected td { background: rgba(24,192,143,0.09); }
.table tr.is-selected { outline: 2px solid rgba(24,192,143,0.35); outline-offset: -2px; }
.is-editing td { outline: 2px dashed rgba(255,255,255,0.20); outline-offset: -2px; }
.is-selected.is-editing td { background: rgba(24,192,143,0.06); }

/* ═══════════════════════════════════════════════
   MODAL
   ═══════════════════════════════════════════════ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 2147480000;
  isolation: isolate;
}
.modal-backdrop[hidden] { display: none !important; }

html[data-theme="light"] .modal-backdrop {
  background: rgba(15,23,42,0.30);
  backdrop-filter: blur(6px);
}

.modal {
  max-height: 90vh;
  overflow: hidden;
  width: min(520px, 92vw);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  position: relative;
  display: flex;
  flex-direction: column;
}
html[data-theme="light"] .modal { backdrop-filter: none; box-shadow: 0 20px 50px rgba(15,23,42,0.18), 0 4px 14px rgba(15,23,42,0.10); }

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 12px 16px;
  border-bottom: 1px solid var(--border-2);
  flex-shrink: 0;
}
.modal-title { font-weight: 700; font-size: 15px; line-height: 1.2; }

.modal-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  line-height: 1.45;
  flex: 1;
  overflow: auto;
}

.modal-actions, .modal-foot {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
  padding: 12px 16px 14px 16px;
  border-top: 1px solid var(--border-2);
  flex-shrink: 0;
}
.modal-actions-left { flex: 1; display: flex; gap: 8px; justify-content: flex-start; align-items: center; }
.modal.modal--tester { width: min(980px, 94vw); height: 90vh; }
.modal.modal--tester .modal-body { overflow: hidden; }

/* ═══════════════════════════════════════════════
   AUTOMATIONS: Block tiles
   ═══════════════════════════════════════════════ */
.block-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
@media (max-width: 980px) { .block-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.block-tile {
  aspect-ratio: 1 / 1;
  min-height: 48px;
  border-radius: 10px;
  border: 1px solid var(--border-2);
  background: rgba(255,255,255,0.028);
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.1px;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6px;
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.04s ease;
  line-height: 1.25;
}
.block-tile:hover { background: rgba(255,255,255,0.06); border-color: rgba(24,192,143,0.35); }
.block-tile:active { transform: translateY(1px); }

html[data-theme="light"] .block-tile { background: rgba(15,23,42,0.028); border-color: var(--border); }
html[data-theme="light"] .block-tile:hover { background: rgba(15,23,42,0.055); border-color: rgba(22,163,74,0.30); }

/* ═══════════════════════════════════════════════
   TOOLTIP
   ═══════════════════════════════════════════════ */
.has-tip:hover::after, .has-tip:hover::before { content: none !important; display: none !important; }

.wd-tooltip {
  position: fixed;
  left: 0; top: 0;
  max-width: 200px;
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  box-shadow: var(--surface-shadow);
  color: var(--text);
  font-size: 11.5px;
  line-height: 1.38;
  white-space: pre-line;
  z-index: 2147481000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.08s ease;
}

/* ═══════════════════════════════════════════════
   CONTEXT MENU
   ═══════════════════════════════════════════════ */
.wd-context-menu {
  position: fixed;
  z-index: 2147481000;
  min-width: 170px;
  padding: 4px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  box-shadow: var(--surface-shadow);
  backdrop-filter: blur(10px);
}
.wd-context-item {
  width: 100%; text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  background: transparent; border: 0;
  color: var(--text);
  font-weight: 600; font-size: 13px;
  cursor: pointer;
  transition: background 0.1s ease;
}
.wd-context-item:hover { background: rgba(255,255,255,0.06); }
html[data-theme="light"] .wd-context-item:hover { background: rgba(15,23,42,0.06); }
.wd-context-sep { height: 1px; margin: 4px 6px; background: var(--border); }
.wd-context-danger { color: var(--text); }
.wd-context-danger:hover { background: rgba(239,68,68,0.12) !important; color: #fca5a5; }
html[data-theme="light"] .wd-context-danger:hover { color: #dc2626; }

/* ═══════════════════════════════════════════════
   CRM / CONFIRM BUTTONS
   ═══════════════════════════════════════════════ */
.wdcrm-cta {
  border-radius: 10px;
  padding: 8px 14px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
  color: #ffffff !important;
}
.wdcrm-cta.secondary { background: #1e2a3a; border: 1px solid rgba(255,255,255,0.10); }
.wdcrm-cta.danger { background: #7f1d1d; border: 1px solid rgba(255,80,80,0.35); }
.wdcrm-cta:hover { filter: brightness(1.12); transform: translateY(-1px); }

/* ═══════════════════════════════════════════════
   MISC HELPERS
   ═══════════════════════════════════════════════ */
.line-clamp {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.checkbox { display: flex; align-items: center; gap: 8px; }
.checkbox input { width: 16px; height: 16px; accent-color: var(--green); }
.chk { width: 18px; height: 18px; accent-color: var(--green); }

.input-sm { height: 30px; padding: 0 9px; font-size: 12px; }
.select-sm { height: 30px; padding: 0 9px; font-size: 12px; }
.textarea-sm { padding: 8px 10px; font-size: 12px; }
