/* Smart Traffic Tracker UI — additive, inherits arushan.bio tokens */
:root {
  --spl-accent: #6847ee;
  --spl-accent-hover: #5835df;
  --spl-accent-soft: #f3f0ff;
  --spl-line: #e6e2da;
  --spl-line-strong: #d8d3c8;
  --spl-line-subtle: #f0ede6;
  --spl-text: #17191c;
  --spl-muted: #6e6a76;
  --spl-faint: #9a96a1;
  --spl-bg: #ffffff;
  --spl-soft: #f7f6f2;
  --spl-page: #fbfaf7;
  --spl-radius: 14px;
  --spl-danger: #dc2626;
  --spl-danger-soft: #fff5f5;
}

body.spl-lock { overflow: hidden; }

.spl-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.spl-head-main { min-width: 0; flex: 1 1 200px; }
.spl-title { font-size: 15px; font-weight: 700; margin: 0; }
.spl-sub { font-size: 12px; color: var(--spl-muted); margin: 4px 0 0; line-height: 1.45; }
.spl-head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.spl-switch { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; cursor: pointer; }
.spl-switch input { width: 42px; height: 24px; appearance: none; -webkit-appearance: none; background: #d9d5cc; border-radius: 999px; position: relative; cursor: pointer; transition: background .18s; margin: 0; flex: 0 0 auto; }
.spl-switch input:checked { background: var(--spl-accent); }
.spl-switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .18s; }
.spl-switch input:checked::after { transform: translateX(18px); }
.spl-switch.mini input { width: 34px; height: 20px; }
.spl-switch.mini input::after { width: 14px; height: 14px; top: 3px; left: 3px; }
.spl-switch.mini input:checked::after { transform: translateX(14px); }

.spl-empty { border: 1px dashed var(--spl-line); border-radius: var(--spl-radius); padding: 18px; text-align: center; color: var(--spl-muted); font-size: 13px; line-height: 1.45; }

.spl-list { display: grid; gap: 8px; }
.spl-item { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 11px 12px; border: 1px solid var(--spl-line); border-radius: 12px; background: var(--spl-bg); }
.spl-item.spl-off { opacity: .62; }
.spl-item-main { min-width: 0; }
.spl-item-name { font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.spl-item-title { font-weight: 700; word-break: break-word; }
.spl-item-sum { font-size: 12px; color: var(--spl-muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spl-item-url { font-size: 12px; color: var(--spl-muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spl-badge { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--spl-soft); color: var(--spl-muted); white-space: nowrap; }
.spl-badge.on { background: rgba(139, 92, 246, .12); color: var(--spl-accent); }
.spl-badge.limit { background: rgba(234, 88, 12, .12); color: #c2410c; }
.spl-item-actions { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }

.spl-btn { border: 1px solid var(--spl-line); background: var(--spl-bg); color: var(--spl-text); border-radius: 10px; padding: 9px 14px; font-size: 13px; cursor: pointer; min-height: 38px; font-family: inherit; line-height: 1.2; }
.spl-btn:hover { border-color: var(--spl-accent); }
.spl-btn.primary { background: var(--spl-accent); border-color: var(--spl-accent); color: #fff; }
.spl-btn.ghost { background: transparent; }
.spl-btn.danger { color: var(--spl-danger); border-color: #ecc8c4; }
.spl-btn.danger:hover { background: #fef3f2; border-color: var(--spl-danger); }
.spl-btn.icon { padding: 7px 9px; min-width: 36px; min-height: 36px; line-height: 1; }
.spl-btn:disabled { opacity: .5; cursor: default; }

.spl-presets { display: flex; gap: 7px; flex-wrap: wrap; margin: 0 0 12px; }
.spl-chip { border: 1px solid var(--spl-line); background: var(--spl-soft); border-radius: 999px; padding: 7px 12px; font-size: 12px; cursor: pointer; color: var(--spl-text); font-family: inherit; }
.spl-chip:hover { border-color: var(--spl-accent); }

.spl-modal { position: fixed; inset: 0; background: rgba(15, 15, 20, .45); display: none; z-index: 1200; align-items: center; justify-content: center; padding: 18px; }
.spl-modal.open { display: flex; }
.spl-dialog { background: var(--spl-bg); border-radius: 18px; width: 720px; max-width: 100%; max-height: 92vh; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 24px 60px rgba(0, 0, 0, .28); }
.spl-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--spl-line); }
.spl-dialog-head b { font-size: 15px; }
.spl-dialog-body { padding: 14px 16px; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }
.spl-dialog-foot { padding: 12px 16px; border-top: 1px solid var(--spl-line); display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; background: var(--spl-bg); }
.spl-foot-spacer { flex: 1 1 auto; }

.spl-acc { border: 1px solid var(--spl-line); border-radius: 12px; margin-bottom: 10px; background: var(--spl-bg); overflow: hidden; }
.spl-acc summary { list-style: none; cursor: pointer; padding: 12px 14px; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.spl-acc summary::-webkit-details-marker { display: none; }
.spl-acc summary::after { content: "+"; color: var(--spl-muted); font-weight: 400; font-size: 17px; line-height: 1; }
.spl-acc[open] summary::after { content: "−"; }
.spl-acc-body { padding: 12px 14px 4px; border-top: 1px solid var(--spl-line); }

.spl-field { margin-bottom: 12px; min-width: 0; }
.spl-field > label, .spl-flabel { display: block; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--spl-muted); margin-bottom: 6px; }
.spl-field input[type="text"], .spl-field input[type="url"], .spl-field input[type="number"], .spl-field input[type="date"], .spl-field select, .spl-field textarea,
.spl-filter input, .spl-filter select, .spl-ab-row input, .spl-ab-row select, .spl-par-row input, .spl-par-row select {
  width: 100%; box-sizing: border-box; border: 1px solid var(--spl-line); border-radius: 10px; padding: 10px 11px; font-size: 14px; background: var(--spl-bg); color: var(--spl-text); font-family: inherit; min-height: 40px;
}
.spl-field textarea { resize: vertical; min-height: 88px; font-size: 13px; }
.spl-field input:focus, .spl-field select:focus, .spl-field textarea:focus, .spl-filter input:focus, .spl-filter select:focus { outline: 2px solid rgba(139, 92, 246, .35); outline-offset: 1px; border-color: var(--spl-accent); }
.spl-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.spl-row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.spl-row4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.spl-inline { display: flex; gap: 8px; align-items: center; }
.spl-inline span { color: var(--spl-muted); font-size: 12px; }
.spl-inline input { min-width: 0; flex: 1 1 0; }
.spl-field > label.spl-check { display: inline-flex; font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--spl-text); margin-bottom: 0; }

.spl-countries { border: 1px solid var(--spl-line); border-radius: 10px; max-height: 180px; overflow-y: auto; overflow-x: hidden; padding: 5px; background: var(--spl-bg); }
.spl-country { display: flex; align-items: center; gap: 8px; padding: 6px 7px; border-radius: 8px; font-size: 13px; cursor: pointer; }
.spl-country:hover { background: var(--spl-soft); }
.spl-country input { width: 16px; height: 16px; flex: 0 0 auto; accent-color: var(--spl-accent); }
.spl-search { width: 100%; box-sizing: border-box; border: 1px solid var(--spl-line); border-radius: 10px; padding: 9px 11px; font-size: 13px; margin-bottom: 8px; background: var(--spl-bg); color: var(--spl-text); font-family: inherit; }

.spl-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.spl-chipcheck { border: 0; padding: 0; margin: 0; background: none; display: inline-flex; cursor: pointer; }
.spl-chipcheck input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.spl-chipcheck span { display: inline-block; border: 1px solid var(--spl-line); border-radius: 999px; padding: 6px 11px; background: var(--spl-bg); color: var(--spl-text); font-size: 12px; line-height: 1.2; }
.spl-chipcheck input:checked + span { background: rgba(139, 92, 246, .12); border-color: var(--spl-accent); color: var(--spl-accent); font-weight: 600; }
.spl-chipcheck input:focus + span { outline: 2px solid rgba(139, 92, 246, .35); outline-offset: 1px; }

.spl-check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; padding: 7px 0; text-transform: none; letter-spacing: 0; color: var(--spl-text); }
.spl-check input { width: 16px; height: 16px; accent-color: var(--spl-accent); flex: 0 0 auto; }
.spl-switchrow { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-bottom: 10px; }
.spl-hint { display: block; font-size: 11px; color: var(--spl-muted); margin-top: 5px; line-height: 1.4; }

.spl-rows { display: grid; gap: 8px; margin-bottom: 8px; }
.spl-par-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.spl-par-name { flex: 1 1 92px; }
.spl-par-op { flex: 0 0 96px; }
.spl-par-val { flex: 1 1 110px; }
.spl-par-del { flex: 0 0 auto; }
.spl-ab-row { border: 1px solid var(--spl-line); border-radius: 10px; padding: 9px; display: grid; gap: 7px; background: var(--spl-soft); }
.spl-ab-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.spl-ab-label { width: 58px; flex: 0 0 58px; }
.spl-ab-weight { width: 76px; flex: 0 0 76px; }
.spl-ab-payout { width: 92px; flex: 0 0 92px; }
.spl-ab-pct { font-size: 12px; color: var(--spl-accent); font-weight: 700; min-width: 40px; text-align: right; margin-left: auto; }

.spl-modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 12px; }
.spl-mode { position: relative; cursor: pointer; }
.spl-mode input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.spl-mode span { display: block; border: 1px solid var(--spl-line); border-radius: 10px; padding: 9px 7px; text-align: center; font-size: 12px; background: var(--spl-bg); color: var(--spl-text); line-height: 1.3; }
.spl-mode input:checked + span { background: rgba(139, 92, 246, .12); border-color: var(--spl-accent); color: var(--spl-accent); font-weight: 700; }
.spl-mode input:focus + span { outline: 2px solid rgba(139, 92, 246, .35); outline-offset: 1px; }
.spl-mode-box { margin-top: 4px; }

.spl-preview { border: 1px solid var(--spl-line); border-radius: 12px; padding: 12px; background: var(--spl-soft); font-size: 13px; margin-top: 14px; }
.spl-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.spl-preview-head b { color: var(--spl-accent); }
.spl-pv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.spl-pv-grid label { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .04em; color: var(--spl-muted); }
.spl-pv-grid select { width: 100%; box-sizing: border-box; margin-top: 3px; border: 1px solid var(--spl-line); border-radius: 9px; padding: 8px 9px; font-size: 13px; background: var(--spl-bg); color: var(--spl-text); font-family: inherit; }
.spl-pv-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.spl-url { word-break: break-all; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; margin-top: 8px; line-height: 1.5; }
.spl-pv-match { font-size: 12px; color: var(--spl-muted); margin-top: 4px; }
.spl-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; word-break: break-all; }

/* analytics overlay */
.spl-overlay { position: fixed; inset: 0; background: rgba(15, 15, 20, .45); z-index: 1100; display: none; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; padding: 0; }
.spl-overlay.open { display: block; }
.spl-sheet { background: var(--spl-page); max-width: 980px; margin: 18px auto; border-radius: 18px; min-height: calc(100vh - 36px); }
.spl-overlay-head { position: sticky; top: 0; background: var(--spl-bg); border-bottom: 1px solid var(--spl-line); border-radius: 18px 18px 0 0; z-index: 3; }
.spl-oh-top { display: flex; align-items: center; gap: 10px; padding: 12px 16px 8px; flex-wrap: wrap; }
.spl-oh-title { font-size: 15px; }
.spl-oh-actions { margin-left: auto; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.spl-tabs { display: flex; gap: 6px; padding: 0 16px 10px; flex-wrap: wrap; }
.spl-tabs button { border: 1px solid var(--spl-line); background: var(--spl-bg); border-radius: 999px; padding: 7px 12px; font-size: 12px; cursor: pointer; color: var(--spl-text); font-family: inherit; }
.spl-tabs button.active { background: var(--spl-accent); border-color: var(--spl-accent); color: #fff; font-weight: 600; }
.spl-overlay-body { max-width: 980px; margin: 0 auto; padding: 16px; }
.spl-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.spl-cards.six { grid-template-columns: repeat(3, 1fr); }
.spl-card { background: var(--spl-bg); border: 1px solid var(--spl-line); border-radius: 14px; padding: 12px; min-width: 0; }
.spl-card .k { font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--spl-muted); }
.spl-card .v { font-size: 20px; font-weight: 700; margin-top: 5px; word-break: break-word; }
.spl-section { background: var(--spl-bg); border: 1px solid var(--spl-line); border-radius: 14px; padding: 12px; margin-bottom: 12px; min-width: 0; }
.spl-section h4 { margin: 0 0 9px; font-size: 13px; }
.spl-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.spl-tablewrap { width: 100%; overflow-x: auto; }
.spl-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.spl-table th { text-align: left; font-weight: 600; color: var(--spl-muted); font-size: 10px; text-transform: uppercase; letter-spacing: .04em; padding: 7px 6px; border-bottom: 1px solid var(--spl-line); white-space: nowrap; }
.spl-table td { padding: 8px 6px; border-bottom: 1px solid var(--spl-line); vertical-align: top; word-break: break-word; }
.spl-table tr:last-child td { border-bottom: 0; }
.spl-clickrow { cursor: pointer; }
.spl-clickrow:hover td { background: var(--spl-soft); }
.spl-range { display: flex; gap: 5px; flex-wrap: wrap; }
.spl-range button { border: 1px solid var(--spl-line); background: var(--spl-bg); border-radius: 999px; padding: 6px 10px; font-size: 12px; cursor: pointer; color: var(--spl-text); font-family: inherit; }
.spl-range button.active { background: var(--spl-accent); border-color: var(--spl-accent); color: #fff; }
.spl-spark { width: 100%; height: 120px; display: block; }
.spl-spark-line { fill: none; stroke: var(--spl-accent); stroke-width: 2; }
.spl-spark-opens { fill: none; stroke: #b9b4a8; stroke-width: 1.5; stroke-dasharray: 4 4; }
.spl-spark-area { fill: rgba(139, 92, 246, .1); stroke: none; }

.spl-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; background: var(--spl-bg); border: 1px solid var(--spl-line); border-radius: 12px; padding: 10px; margin-bottom: 10px; }
.spl-filter { display: block; flex: 1 1 110px; min-width: 0; font-size: 10px; text-transform: uppercase; letter-spacing: .04em; color: var(--spl-muted); }
.spl-filter input, .spl-filter select { margin-top: 3px; min-height: 36px; padding: 8px 9px; font-size: 13px; }
.spl-filter.wide { flex: 1 1 100%; }
.spl-filter .spl-check { padding: 8px 0; font-size: 12px; }
.spl-more { text-align: center; margin: 12px 0; }

.spl-detail { position: fixed; inset: 0; background: rgba(15, 15, 20, .45); z-index: 1300; display: none; align-items: center; justify-content: center; padding: 16px; }
.spl-detail.open { display: flex; }
.spl-detail-card { background: var(--spl-bg); border-radius: 18px; width: 560px; max-width: 100%; max-height: 86vh; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 24px 60px rgba(0, 0, 0, .28); }
.spl-detail-body { padding: 14px 16px; overflow-y: auto; }
.spl-kv { display: grid; grid-template-columns: 128px 1fr; gap: 7px 10px; font-size: 12px; margin: 0; }
.spl-kv dt { color: var(--spl-muted); }
.spl-kv dd { margin: 0; word-break: break-word; }

.spl-form { background: var(--spl-bg); border: 1px solid var(--spl-line); border-radius: 12px; padding: 12px; margin-bottom: 12px; }
.spl-form .spl-row3, .spl-form .spl-row2 { margin-bottom: 0; }
.spl-form-actions { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }

.spl-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #17191c; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 13px; z-index: 2000; max-width: 90vw; text-align: center; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); }
.spl-loading { color: var(--spl-muted); }

@media (max-width: 900px) {
  .spl-cards { grid-template-columns: repeat(2, 1fr); }
  .spl-cards.six { grid-template-columns: repeat(2, 1fr); }
  .spl-grid2 { grid-template-columns: 1fr; }
  .spl-row4 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .editortabs { flex-wrap: wrap; }
  .spl-fab { display: none !important; }
  .spl-modal { padding: 0; }
  .spl-dialog { width: 100%; max-height: 100vh; height: 100%; border-radius: 0; }
  .spl-detail { padding: 0; align-items: flex-end; }
  .spl-detail-card { width: 100%; max-height: 92vh; border-radius: 18px 18px 0 0; }
  .spl-dialog-body { padding: 12px; }
  .spl-row2, .spl-row3, .spl-row4 { grid-template-columns: 1fr; }
  .spl-item { grid-template-columns: 1fr; }
  .spl-item-actions { justify-content: flex-end; }
  .spl-item-sum, .spl-item-url { white-space: normal; }
  .spl-cards { grid-template-columns: repeat(2, 1fr); }
  .spl-card .v { font-size: 17px; }
  .spl-pv-grid { grid-template-columns: 1fr 1fr; }
  .spl-overlay { padding: 0; }
  .spl-sheet { border-radius: 0; min-height: 100vh; margin: 0; }
  .spl-overlay-head { border-radius: 0; }
  .spl-overlay-body { padding: 12px; }
  .spl-oh-top { padding: 10px 12px 8px; }
  .spl-tabs { padding: 0 12px 9px; }
  .spl-table.responsive thead { display: none; }
  .spl-table.responsive tr { display: grid; grid-template-columns: 1fr auto; gap: 1px 10px; padding: 8px 0; border-bottom: 1px solid var(--spl-line); }
  .spl-table.responsive td { border: 0; padding: 1px 0; }
  .spl-table.responsive td::before { content: attr(data-label) ": "; color: var(--spl-muted); font-size: 10px; text-transform: uppercase; letter-spacing: .03em; }
  .spl-table.responsive td:first-child { grid-column: 1 / -1; font-weight: 600; }
  .spl-table.responsive td:first-child::before { content: ""; }
  .spl-kv { grid-template-columns: 104px 1fr; }
  .spl-ab-pct { margin-left: 0; }
}

@media (max-width: 400px) {
  .spl-pv-grid { grid-template-columns: 1fr; }
  .spl-modes { grid-template-columns: 1fr; }
  .spl-btn { padding: 8px 11px; }
  .spl-chip { padding: 6px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .spl-switch input, .spl-switch input::after { transition: none; }
}


/* ==========================================================================
   Light Design System Overrides for arushan.bio integration
   ========================================================================== */

.spl-overlay {
  background: rgba(15, 17, 26, 0.5) !important;
  backdrop-filter: blur(6px) !important;
}

.spl-sheet {
  background: #fbfaf7 !important;
  color: #17191c !important;
  border: 1px solid #e6e2da !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.16) !important;
  border-radius: 20px !important;
}

.spl-overlay-head {
  background: #ffffff !important;
  border-bottom: 1px solid #e6e2da !important;
  border-radius: 20px 20px 0 0 !important;
  color: #17191c !important;
}

.spl-oh-title,
.spl-oh-title b {
  color: #17191c !important;
  font-weight: 750 !important;
  font-size: 16px !important;
}

.spl-tabs button {
  background: #ffffff !important;
  border: 1px solid #e6e2da !important;
  color: #6e6a76 !important;
  font-weight: 600 !important;
  border-radius: 999px !important;
  transition: all 0.15s ease !important;
}

.spl-tabs button:hover {
  background: #f3f0ff !important;
  color: #6847ee !important;
  border-color: #ddd5fb !important;
}

.spl-tabs button.active {
  background: #6847ee !important;
  border-color: #6847ee !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(104, 71, 238, 0.25) !important;
}

.spl-range button {
  background: #ffffff !important;
  border: 1px solid #e6e2da !important;
  color: #6e6a76 !important;
  font-weight: 600 !important;
  border-radius: 999px !important;
}

.spl-range button.active {
  background: #6847ee !important;
  border-color: #6847ee !important;
  color: #ffffff !important;
}

.spl-card {
  background: #ffffff !important;
  border: 1px solid #e6e2da !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) !important;
  color: #17191c !important;
  border-radius: 14px !important;
}

.spl-card .k {
  color: #6e6a76 !important;
  font-weight: 700 !important;
  font-size: 11px !important;
}

.spl-card .v {
  color: #17191c !important;
  font-weight: 800 !important;
  font-size: 22px !important;
}

.spl-section {
  background: #ffffff !important;
  border: 1px solid #e6e2da !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) !important;
  color: #17191c !important;
  border-radius: 14px !important;
}

.spl-section h4 {
  color: #17191c !important;
  font-weight: 750 !important;
  font-size: 14px !important;
}

.spl-empty {
  color: #8c8894 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  text-align: center !important;
  padding: 24px 12px !important;
}

.spl-table th {
  color: #6e6a76 !important;
  border-bottom: 1px solid #f0ede6 !important;
  font-weight: 700 !important;
  font-size: 11px !important;
}

.spl-table td {
  color: #17191c !important;
  border-bottom: 1px solid #f0ede6 !important;
}

.spl-dialog {
  background: #ffffff !important;
  color: #17191c !important;
  border: 1px solid #e6e2da !important;
  border-radius: 20px !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18) !important;
}

.spl-dialog-head {
  border-bottom: 1px solid #edeae4 !important;
  color: #17191c !important;
  background: #ffffff !important;
}

.spl-dialog-head b {
  color: #17191c !important;
  font-size: 16px !important;
  font-weight: 750 !important;
}

.spl-dialog-foot {
  border-top: 1px solid #edeae4 !important;
  background: #faf9f6 !important;
}

.spl-acc {
  background: #fbfaf7 !important;
  border: 1px solid #e6e2da !important;
  color: #17191c !important;
}

.spl-acc summary {
  color: #17191c !important;
}

.spl-field > label,
.spl-flabel {
  color: #6e6a76 !important;
  font-weight: 700 !important;
  font-size: 11px !important;
}

.spl-field input[type="text"],
.spl-field input[type="url"],
.spl-field input[type="number"],
.spl-field input[type="date"],
.spl-field select,
.spl-field textarea,
.spl-filter input,
.spl-filter select,
.spl-ab-row input,
.spl-ab-row select,
.spl-par-row input,
.spl-par-row select {
  background: #ffffff !important;
  border: 1px solid #dcd8cf !important;
  color: #17191c !important;
  border-radius: 10px !important;
}

.spl-field input:focus,
.spl-field select:focus,
.spl-field textarea:focus,
.spl-filter input:focus,
.spl-filter select:focus {
  border-color: #6847ee !important;
  outline: 3px solid rgba(104, 71, 238, 0.15) !important;
  background: #ffffff !important;
}

.spl-chipcheck span {
  background: #ffffff !important;
  border: 1px solid #dcd8cf !important;
  color: #17191c !important;
  border-radius: 999px !important;
}

.spl-chipcheck input:checked + span {
  background: #f3f0ff !important;
  border-color: #6847ee !important;
  color: #6847ee !important;
  font-weight: 600 !important;
}

.spl-btn {
  font-family: inherit !important;
  font-weight: 600 !important;
  border-radius: 10px !important;
  transition: all 0.15s ease !important;
}

.spl-btn.primary {
  background: #6847ee !important;
  border-color: #6847ee !important;
  color: #ffffff !important;
}

.spl-btn.primary:hover {
  background: #5835df !important;
  border-color: #5835df !important;
}

.spl-btn.danger {
  background: #fff5f5 !important;
  border-color: #fecaca !important;
  color: #dc2626 !important;
}

.spl-btn.danger:hover {
  background: #fee2e2 !important;
  color: #b91c1c !important;
}

.spl-fab {
  background: #6847ee !important;
  color: #ffffff !important;
  border: 0 !important;
  border-radius: 999px !important;
  padding: 11px 20px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  box-shadow: 0 10px 28px rgba(104, 71, 238, 0.35) !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  cursor: pointer !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}

.spl-fab:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 14px 34px rgba(104, 71, 238, 0.42) !important;
}

.spl-spark-area {
  fill: rgba(104, 71, 238, 0.08) !important;
}

.spl-spark-line {
  stroke: #6847ee !important;
}

/* Pane in editor integration */
#pane-split {
  color: #17191c !important;
}

#pane-split .spl-head {
  background: #ffffff !important;
  border: 1px solid #e6e2da !important;
  border-radius: 14px !important;
  padding: 16px !important;
  margin-bottom: 14px !important;
}

#pane-split .spl-items {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

#pane-split .spl-item {
  background: #ffffff !important;
  border: 1px solid #e6e2da !important;
  border-radius: 14px !important;
  padding: 14px !important;
}

#pane-split .spl-preview {
  background: #f7f6f2 !important;
  border: 1px solid #e6e2da !important;
  border-radius: 14px !important;
  color: #17191c !important;
}


/* ==========================================================================
   ENHANCED POLISHED SMARTLINK & SPLIT UI STYLES (Light Design System)
   ========================================================================== */

/* Force hide all hidden checkbox inputs so #editorModal can NEVER turn them into 42px boxes */
#editorModal .builder-inspector input.spl-hidden-input,
#editorModal input.spl-hidden-input,
.spl-modal input.spl-hidden-input,
input.spl-hidden-input {
  display: none !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  position: absolute !important;
  pointer-events: none !important;
}

/* Header & Toggle Card */
.spl-head {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  background: #ffffff !important;
  border: 1.5px solid #e6e2da !important;
  border-radius: 16px !important;
  padding: 16px !important;
  margin-bottom: 14px !important;
}

.spl-head-main {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
}

.spl-head-main h4.spl-title {
  margin: 0 !important;
  font-size: 17px !important;
  font-weight: 800 !important;
  color: #17191c !important;
}

.spl-head-main p.spl-sub {
  margin: 0 !important;
  font-size: 13px !important;
  color: #8c8894 !important;
}

/* iOS Toggle Card */
.spl-toggle-card {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  background: #fbfaf7 !important;
  border: 1.5px solid #e6e2da !important;
  border-radius: 14px !important;
  padding: 12px 14px !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  user-select: none !important;
}

.spl-toggle-card:hover {
  border-color: #6847ee !important;
  background: #fdfcfa !important;
}

.spl-toggle-card.is-active {
  border-color: #6847ee !important;
  background: #f6f3ff !important;
  box-shadow: 0 4px 16px rgba(104, 71, 238, 0.12) !important;
}

.spl-tc-info {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

.spl-tc-title {
  font-size: 14px !important;
  font-weight: 750 !important;
  color: #17191c !important;
}

.spl-tc-status {
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em !important;
}

.spl-tc-status.on {
  color: #16a34a !important;
}

.spl-tc-status.off {
  color: #8c8894 !important;
}

.spl-tc-toggle-wrap {
  display: flex !important;
  align-items: center !important;
  cursor: pointer !important;
}

/* Custom iOS Switch Track & Thumb */
.spl-toggle-track {
  display: inline-block !important;
  position: relative !important;
  width: 48px !important;
  height: 26px !important;
  background: #d8d4cc !important;
  border-radius: 999px !important;
  transition: background 0.22s ease !important;
  flex: 0 0 48px !important;
  box-sizing: border-box !important;
}

.spl-toggle-track.is-on {
  background: #6847ee !important;
}

.spl-toggle-thumb {
  position: absolute !important;
  top: 3px !important;
  left: 3px !important;
  width: 20px !important;
  height: 20px !important;
  background: #ffffff !important;
  border-radius: 50% !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25) !important;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.spl-toggle-track.is-on .spl-toggle-thumb {
  transform: translateX(22px) !important;
}

/* Mini Toggle for Rule Rows */
.spl-mini-toggle-wrap {
  display: inline-flex !important;
  align-items: center !important;
  cursor: pointer !important;
  margin: 0 !important;
}

.spl-toggle-track.mini {
  width: 38px !important;
  height: 22px !important;
  flex: 0 0 38px !important;
}

.spl-toggle-track.mini .spl-toggle-thumb {
  top: 2px !important;
  left: 2px !important;
  width: 18px !important;
  height: 18px !important;
}

.spl-toggle-track.mini.is-on .spl-toggle-thumb {
  transform: translateX(16px) !important;
}

/* Analytics Button */
.spl-btn-analytics {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  padding: 10px 14px !important;
  background: #ffffff !important;
  color: #17191c !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  border: 1.5px solid #e6e2da !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  transition: all 0.18s ease !important;
  font-family: inherit !important;
}

.spl-btn-analytics:hover {
  border-color: #6847ee !important;
  color: #6847ee !important;
  background: #faf9ff !important;
}

/* Guide Card */
.spl-guide-card {
  background: #f7f5ff !important;
  border: 1px solid #e1dafc !important;
  border-radius: 14px !important;
  padding: 12px 14px !important;
  margin-bottom: 14px !important;
}

.spl-guide-header {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 13px !important;
  font-weight: 750 !important;
  color: #5533dd !important;
  margin-bottom: 4px !important;
}

.spl-guide-desc {
  margin: 0 !important;
  font-size: 12px !important;
  line-height: 1.45 !important;
  color: #4c3e80 !important;
}

/* Block Headers */
.spl-block-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin: 16px 0 8px !important;
  font-size: 13px !important;
  color: #17191c !important;
}

.spl-block-head b {
  font-weight: 750 !important;
}

.spl-block-head .spl-hint {
  font-size: 11px !important;
  color: #8c8894 !important;
  margin: 0 !important;
}

.spl-block-head-row {
  display: flex !important;
  align-items: baseline !important;
  justify-content: space-between !important;
  width: 100% !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

/* Presets Sleek List (No Truncation) */
.spl-presets-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 7px !important;
  margin-bottom: 14px !important;
}

.spl-preset-card {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  text-align: left !important;
  background: #ffffff !important;
  border: 1.5px solid #e6e2da !important;
  border-radius: 12px !important;
  padding: 8px 12px !important;
  cursor: pointer !important;
  transition: all 0.18s ease !important;
  font-family: inherit !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.spl-preset-card:hover {
  border-color: #6847ee !important;
  background: #fbf9ff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(104, 71, 238, 0.12) !important;
}

.spl-preset-main {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

.spl-preset-top {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.spl-preset-icon {
  font-size: 19px !important;
  line-height: 1 !important;
  flex: 0 0 auto !important;
}

.spl-preset-text {
  display: flex !important;
  flex-direction: column !important;
  min-width: 0 !important;
}

.spl-preset-name {
  font-size: 12.5px !important;
  font-weight: 750 !important;
  color: #17191c !important;
  line-height: 1.3 !important;
}

.spl-preset-sub {
  font-size: 11px !important;
  color: #8c8894 !important;
  line-height: 1.3 !important;
  margin-top: 2px !important;
  white-space: normal !important;
  word-break: break-word !important;
}

.spl-preset-add-badge {
  font-size: 11px !important;
  font-weight: 650 !important;
  color: #6847ee !important;
  background: #f1edfe !important;
  padding: 4px 8px !important;
  border-radius: 6px !important;
  white-space: nowrap !important;
  flex: 0 0 auto !important;
  transition: all 0.15s ease !important;
}

.spl-preset-card:hover .spl-preset-add-badge {
  background: #6847ee !important;
  color: #ffffff !important;
}

/* Add Rule Button */
.spl-add-rule-btn {
  display: block !important;
  width: 100% !important;
  padding: 12px 16px !important;
  background: #6847ee !important;
  color: #ffffff !important;
  font-weight: 750 !important;
  font-size: 14px !important;
  border: none !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  text-align: center !important;
  box-shadow: 0 4px 14px rgba(104, 71, 238, 0.28) !important;
  transition: all 0.18s ease !important;
  margin: 12px 0 16px !important;
  font-family: inherit !important;
}

.spl-add-rule-btn:hover {
  background: #5835df !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 18px rgba(104, 71, 238, 0.35) !important;
}

.spl-add-rule-btn:disabled {
  opacity: 0.55 !important;
  cursor: not-allowed !important;
  transform: none !important;
  box-shadow: none !important;
}

/* Preview Tester Redesign */
.spl-preview {
  background: #fbfaf7 !important;
  border: 1.5px solid #e6e2da !important;
  border-radius: 16px !important;
  padding: 16px !important;
  margin-top: 14px !important;
}

.spl-preview-head {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  margin-bottom: 12px !important;
}

.spl-preview-head b {
  font-size: 14px !important;
  font-weight: 750 !important;
  color: #17191c !important;
}

.spl-pv-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 10px !important;
  margin-bottom: 12px !important;
}

@media (max-width: 440px) {
  .spl-pv-grid {
    grid-template-columns: 1fr !important;
  }
}

.spl-pv-grid label {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  color: #6e6a76 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.03em !important;
}

.spl-pv-grid select {
  width: 100% !important;
  height: 40px !important;
  min-height: 40px !important;
  border: 1.5px solid #dcd8cf !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  color: #17191c !important;
  font-size: 13px !important;
  padding: 0 10px !important;
  outline: none !important;
  box-sizing: border-box !important;
  font-family: inherit !important;
  transition: border-color 0.18s !important;
}

.spl-pv-grid select:focus {
  border-color: #6847ee !important;
  box-shadow: 0 0 0 3px rgba(104, 71, 238, 0.15) !important;
}

.spl-pv-actions {
  display: flex !important;
  gap: 8px !important;
  margin-bottom: 10px !important;
}

.spl-pv-btn-run {
  flex: 1 !important;
  padding: 11px 16px !important;
  background: #6847ee !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  border: none !important;
  border-radius: 10px !important;
  cursor: pointer !important;
  box-shadow: 0 3px 10px rgba(104, 71, 238, 0.25) !important;
  font-family: inherit !important;
  transition: all 0.18s ease !important;
}

.spl-pv-btn-run:hover {
  background: #5835df !important;
  transform: translateY(-1px) !important;
}

.spl-pv-btn-matrix {
  padding: 11px 14px !important;
  background: #ffffff !important;
  color: #17191c !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  border: 1.5px solid #dcd8cf !important;
  border-radius: 10px !important;
  cursor: pointer !important;
  font-family: inherit !important;
  transition: all 0.18s ease !important;
}

.spl-pv-btn-matrix:hover {
  border-color: #6847ee !important;
  color: #6847ee !important;
}

.spl-url {
  word-break: break-all !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace !important;
  font-size: 12px !important;
  margin-top: 8px !important;
  padding: 8px 10px !important;
  background: #ffffff !important;
  border: 1px solid #e6e2da !important;
  border-radius: 8px !important;
  color: #6847ee !important;
  font-weight: 600 !important;
}

.spl-pv-match {
  font-size: 12px !important;
  color: #16a34a !important;
  font-weight: 600 !important;
  margin-top: 4px !important;
}

/* ==========================================================================
   MODAL STEP-BY-STEP DESIGN FOR NEW RULE
   ========================================================================== */

.spl-dialog {
  background: #ffffff !important;
  color: #17191c !important;
  border: 1px solid #e6e2da !important;
  border-radius: 20px !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22) !important;
  max-width: 640px !important;
  width: 100% !important;
  overflow: hidden !important;
}

.spl-dialog-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 18px 22px 14px !important;
  border-bottom: 1px solid #edeae4 !important;
  background: #ffffff !important;
}

.spl-dlg-title {
  margin: 0 !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  color: #17191c !important;
}

.spl-dlg-sub {
  margin: 3px 0 0 0 !important;
  font-size: 12px !important;
  color: #8c8894 !important;
}

.spl-btn-close {
  background: #f4f2ee !important;
  border: none !important;
  font-size: 16px !important;
  color: #6e6a76 !important;
  cursor: pointer !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.15s ease !important;
}

.spl-btn-close:hover {
  background: #edeae4 !important;
  color: #17191c !important;
}

.spl-dialog-body {
  padding: 18px 22px !important;
  max-height: calc(85vh - 140px) !important;
  overflow-y: auto !important;
}

/* Step Cards */
.spl-step-card {
  background: #ffffff !important;
  border: 1.5px solid #e6e2da !important;
  border-radius: 16px !important;
  padding: 16px !important;
  margin-bottom: 14px !important;
}

.spl-step-header {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin-bottom: 12px !important;
}

.spl-step-badge {
  background: #6847ee !important;
  color: #ffffff !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  padding: 3px 8px !important;
  border-radius: 6px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
}

.spl-step-header h4 {
  margin: 0 !important;
  font-size: 15px !important;
  font-weight: 750 !important;
  color: #17191c !important;
}

.spl-step-note {
  font-size: 12px !important;
  color: #6e6a76 !important;
  background: #faf9f6 !important;
  border: 1px dashed #dcd8cf !important;
  border-radius: 8px !important;
  padding: 8px 10px !important;
  margin-bottom: 12px !important;
  line-height: 1.4 !important;
}

.spl-sub-section {
  background: #fbfaf7 !important;
  border: 1px solid #edeae4 !important;
  border-radius: 12px !important;
  padding: 12px !important;
}

.spl-sub-label {
  display: block !important;
  font-weight: 750 !important;
  font-size: 13px !important;
  color: #17191c !important;
  margin-bottom: 8px !important;
}

/* Quick Country Pill Buttons */
.spl-quick-countries {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  margin-bottom: 8px !important;
}

.spl-pill-btn {
  background: #ffffff !important;
  border: 1.5px solid #dcd8cf !important;
  border-radius: 999px !important;
  padding: 6px 12px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #17191c !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  font-family: inherit !important;
}

.spl-pill-btn:hover {
  border-color: #6847ee !important;
  color: #6847ee !important;
  background: #faf9ff !important;
}

.spl-pill-btn.active {
  background: #6847ee !important;
  border-color: #6847ee !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(104, 71, 238, 0.25) !important;
}

.spl-pill-clear {
  border-style: dashed !important;
  color: #8c8894 !important;
}

.spl-pill-clear:hover {
  border-color: #ef4444 !important;
  color: #ef4444 !important;
  background: #fff5f5 !important;
}

.spl-countries-scroll {
  max-height: 160px !important;
  overflow-y: auto !important;
  border: 1px solid #dcd8cf !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  padding: 6px 8px !important;
  margin-top: 6px !important;
}

.spl-inner-details {
  margin-top: 8px !important;
  font-size: 12px !important;
}

.spl-inner-details summary {
  cursor: pointer !important;
  color: #6847ee !important;
  font-weight: 600 !important;
  padding: 4px 0 !important;
}

/* Advanced Settings Accordion */
.spl-adv-card {
  background: #faf9f6 !important;
  border: 1.5px solid #e6e2da !important;
  border-radius: 14px !important;
  overflow: hidden !important;
  margin-bottom: 12px !important;
}

.spl-adv-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 12px 16px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #6e6a76 !important;
  cursor: pointer !important;
  user-select: none !important;
}

.spl-adv-header:hover {
  color: #17191c !important;
  background: #f4f2ee !important;
}

.spl-adv-body {
  padding: 16px !important;
  border-top: 1px solid #edeae4 !important;
  background: #ffffff !important;
}

.spl-divider {
  border: none !important;
  border-top: 1px solid #f0ede6 !important;
  margin: 12px 0 !important;
}

/* Dialog Footer */
.spl-dialog-foot {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 14px 22px !important;
  border-top: 1px solid #edeae4 !important;
  background: #faf9f6 !important;
  border-radius: 0 0 20px 20px !important;
}

.spl-btn-save {
  padding: 10px 20px !important;
  background: #6847ee !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 13.5px !important;
  border: none !important;
  border-radius: 10px !important;
  cursor: pointer !important;
  box-shadow: 0 2px 8px rgba(104, 71, 238, 0.28) !important;
  font-family: inherit !important;
  transition: all 0.15s ease !important;
}

.spl-btn-save:hover {
  background: #5835df !important;
  transform: translateY(-1px) !important;
}

.spl-btn-cancel {
  padding: 10px 16px !important;
  background: #ffffff !important;
  color: #17191c !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  border: 1px solid #dcd8cf !important;
  border-radius: 10px !important;
  cursor: pointer !important;
  font-family: inherit !important;
  transition: all 0.15s ease !important;
}

.spl-btn-cancel:hover {
  background: #f4f2ee !important;
}

.spl-btn-delete {
  padding: 10px 14px !important;
  background: #fff5f5 !important;
  color: #dc2626 !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  border: 1px solid #fecaca !important;
  border-radius: 10px !important;
  cursor: pointer !important;
  font-family: inherit !important;
  transition: all 0.15s ease !important;
}

.spl-btn-delete:hover {
  background: #fee2e2 !important;
  color: #b91c1c !important;
}

.spl-foot-spacer {
  flex: 1 !important;
}


/* ==========================================================================
   ULTRA-POLISHED PIXEL-PERFECT SMARTLINK CSS OVERRIDES
   ========================================================================== */

/* Fix empty space in Screenshot 1 */
#pane-split .spl-head,
.spl-head {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  background: #ffffff !important;
  border: 1.5px solid #e6e2da !important;
  border-radius: 14px !important;
  padding: 14px 16px !important;
  margin-bottom: 12px !important;
  box-sizing: border-box !important;
}

#pane-split .spl-head-main,
.spl-head-main {
  min-width: 0 !important;
  flex: 0 0 auto !important;
  width: 100% !important;
  margin: 0 0 4px 0 !important;
  height: auto !important;
}

#pane-split .spl-head-main h4.spl-title,
.spl-head-main h4.spl-title {
  margin: 0 0 2px 0 !important;
  font-size: 15.5px !important;
  font-weight: 800 !important;
  color: #17191c !important;
}

#pane-split .spl-head-main p.spl-sub,
.spl-head-main p.spl-sub {
  margin: 0 !important;
  font-size: 12px !important;
  color: #8c8894 !important;
  line-height: 1.35 !important;
}

#pane-split .spl-toggle-card,
.spl-toggle-card {
  margin: 0 !important;
  padding: 10px 14px !important;
}

#pane-split .spl-btn-analytics,
.spl-btn-analytics {
  margin: 0 !important;
  padding: 9px 12px !important;
  font-size: 12.5px !important;
}

/* Fix Preview Tester in Screenshot 2 */
#pane-split .spl-preview {
  background: #fbfaf7 !important;
  border: 1.5px solid #e6e2da !important;
  border-radius: 14px !important;
  padding: 14px !important;
  margin-top: 14px !important;
}

#pane-split .spl-pv-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 8px 10px !important;
  margin-bottom: 10px !important;
}

#pane-split .spl-pv-grid label {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  color: #6e6a76 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
}

#pane-split .spl-pv-grid select {
  width: 100% !important;
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  border: 1.5px solid #dcd8cf !important;
  border-radius: 9px !important;
  background: #ffffff !important;
  color: #17191c !important;
  font-size: 12.5px !important;
  padding: 0 10px !important;
  outline: none !important;
  box-sizing: border-box !important;
  font-family: inherit !important;
}

#pane-split .spl-pv-actions {
  display: flex !important;
  gap: 8px !important;
  margin-bottom: 10px !important;
}

/* Ensure buttons in Preview are NEVER overridden to white */
#editorModal #pane-split .spl-pv-btn-run,
#pane-split .spl-pv-btn-run,
#editorModal #pane-split #splPvGo,
#pane-split #splPvGo {
  flex: 1 1 50% !important;
  padding: 10px 14px !important;
  background: #6847ee !important;
  color: #ffffff !important;
  font-weight: 750 !important;
  font-size: 13px !important;
  border: none !important;
  border-radius: 10px !important;
  cursor: pointer !important;
  box-shadow: 0 3px 10px rgba(104, 71, 238, 0.28) !important;
  font-family: inherit !important;
  transition: all 0.15s ease !important;
  text-align: center !important;
  white-space: nowrap !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

#editorModal #pane-split .spl-pv-btn-run:hover,
#pane-split .spl-pv-btn-run:hover {
  background: #5835df !important;
  transform: translateY(-1px) !important;
}

#editorModal #pane-split .spl-pv-btn-matrix,
#pane-split .spl-pv-btn-matrix,
#editorModal #pane-split #splPvMatrix,
#pane-split #splPvMatrix {
  flex: 1 1 50% !important;
  padding: 10px 14px !important;
  background: #ffffff !important;
  color: #17191c !important;
  font-weight: 650 !important;
  font-size: 13px !important;
  border: 1.5px solid #dcd8cf !important;
  border-radius: 10px !important;
  cursor: pointer !important;
  font-family: inherit !important;
  transition: all 0.15s ease !important;
  text-align: center !important;
  white-space: nowrap !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

#editorModal #pane-split .spl-pv-btn-matrix:hover,
#pane-split .spl-pv-btn-matrix:hover {
  border-color: #6847ee !important;
  color: #6847ee !important;
}

/* Polished Result Widget */
.spl-pv-res-box {
  background: #ffffff !important;
  border: 1px solid #e6e2da !important;
  border-radius: 10px !important;
  padding: 10px 12px !important;
}

.spl-pv-res-header {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin-bottom: 4px !important;
}

.spl-pv-res-dot {
  width: 7px !important;
  height: 7px !important;
  border-radius: 50% !important;
  background: #16a34a !important;
}

.spl-pv-res-label {
  font-size: 11px !important;
  font-weight: 700 !important;
  color: #8c8894 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
}

#pane-split .spl-url {
  word-break: break-all !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace !important;
  font-size: 12px !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  color: #6847ee !important;
  font-weight: 600 !important;
}

/* ==========================================================================
   PERFECT ALIGNMENT & RESPONSIVENESS FOR RULE MODAL (Screenshots 3 & 4)
   ========================================================================== */

.spl-modal {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(15, 17, 26, 0.55) !important;
  backdrop-filter: blur(8px) !important;
  display: none !important;
  z-index: 12000 !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  box-sizing: border-box !important;
}

.spl-modal.open {
  display: flex !important;
}

.spl-dialog {
  background: #ffffff !important;
  color: #17191c !important;
  border: 1px solid #e6e2da !important;
  border-radius: 20px !important;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28) !important;
  max-width: 620px !important;
  width: 100% !important;
  max-height: 90vh !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

.spl-dialog-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 16px 20px 12px !important;
  border-bottom: 1px solid #edeae4 !important;
  background: #ffffff !important;
  flex: 0 0 auto !important;
}

.spl-dialog-body {
  padding: 16px 20px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  flex: 1 1 auto !important;
  overscroll-behavior: contain !important;
}

.spl-dialog-foot {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 12px 20px !important;
  border-top: 1px solid #edeae4 !important;
  background: #faf9f6 !important;
  border-radius: 0 0 20px 20px !important;
  flex: 0 0 auto !important;
}

/* Geo Mode Radio Picker (Step 2) */
.spl-geo-mode-picker {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 8px !important;
  margin-bottom: 8px !important;
}

.spl-geo-opt {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  background: #fbfaf7 !important;
  border: 1.5px solid #e6e2da !important;
  border-radius: 10px !important;
  padding: 10px 12px !important;
  cursor: pointer !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #17191c !important;
  transition: all 0.15s ease !important;
}

.spl-geo-opt:hover {
  border-color: #6847ee !important;
  background: #faf9ff !important;
}

.spl-geo-opt input[type="radio"] {
  width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
  accent-color: #6847ee !important;
  flex: 0 0 18px !important;
}

.spl-quick-countries-title {
  font-size: 11px !important;
  font-weight: 750 !important;
  color: #6e6a76 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  margin-bottom: 6px !important;
}

.spl-selected-badge {
  font-size: 12px !important;
  font-weight: 700 !important;
  margin-top: 6px !important;
  padding: 6px 10px !important;
  border-radius: 8px !important;
  background: #f4f2ee !important;
}

.spl-badge-all {
  color: #16a34a !important;
}

.spl-badge-spec {
  color: #6847ee !important;
}

/* Fix Row Layouts in Advanced Settings (Screenshots 3 & 4) */
.spl-row3 {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 10px !important;
  margin-bottom: 10px !important;
}

.spl-row4 {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 8px !important;
  margin-bottom: 10px !important;
}

.spl-row2 {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 10px !important;
  margin-bottom: 10px !important;
}

/* Hours and Weekdays row */
.spl-row-time {
  display: grid !important;
  grid-template-columns: 140px 1fr !important;
  gap: 12px !important;
  align-items: flex-end !important;
  margin-bottom: 10px !important;
}

.spl-weekdays-row {
  display: flex !important;
  gap: 4px !important;
  width: 100% !important;
}

.spl-weekdays-row .spl-chipcheck {
  flex: 1 1 0 !important;
  margin: 0 !important;
}

.spl-weekdays-row .spl-chipcheck span {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  padding: 7px 0 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  text-align: center !important;
  box-sizing: border-box !important;
}

/* Audience checkboxes row */
.spl-switchrow {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px 16px !important;
  margin-bottom: 10px !important;
}

/* IP filter textareas */
#splIpAllow, #splIpDeny {
  width: 100% !important;
  box-sizing: border-box !important;
  height: 64px !important;
  min-height: 64px !important;
  font-family: ui-monospace, monospace !important;
  font-size: 12px !important;
  padding: 8px !important;
  line-height: 1.4 !important;
  resize: vertical !important;
}

/* Responsive adjustments */
@media (max-width: 580px) {
  .spl-modal {
    padding: 0 !important;
    align-items: flex-end !important;
  }
  .spl-dialog {
    max-height: 94vh !important;
    border-radius: 20px 20px 0 0 !important;
    border-bottom: none !important;
  }
  .spl-row3,
  .spl-row4,
  .spl-row2,
  .spl-row-time {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
  .spl-dialog-foot {
    border-radius: 0 !important;
  }
}
