:root {
  --bg: #f8fafc;
  --panel: #fff;
  --line: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
  --nav: #071d2f;
  --primary: #0ea5e9;
  --control-focus: #7dd3fc;
  --control-focus-ring: rgba(14,165,233,.14);
  --dialog-form-row-gap: 12px;
  --dialog-form-column-gap: 14px;
  --dialog-control-height: 30px;
  --success: #10b981;
  --danger: #dc2626;
  --warning: #f59e0b;
  --tracker-table-row-height: 36px;
  --tracker-table-cell-padding-x: 10px;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); display: grid; grid-template-columns: 252px 1fr; height: 100vh; overflow: hidden; font-size: 13px; transition: grid-template-columns .16s ease; }
body.nav-collapsed { grid-template-columns: 72px 1fr; }
.sidebar { background: var(--nav); color: #e2e8f0; padding: 14px 10px; display: flex; flex-direction: column; gap: 8px; height: 100vh; min-height: 0; overflow: hidden; position: sticky; top: 0; }
.brand { display: grid; grid-template-columns: 32px minmax(0, 1fr) 36px; align-items: center; gap: 10px; padding: 8px 6px 14px; border-bottom: 1px solid rgba(255,255,255,.1); position: relative; }
.brand span { display: block; color: #94a3b8; font-size: 12px; margin-top: 2px; }
.mark { width: 32px; height: 32px; border-radius: 8px; background: linear-gradient(135deg, #0ea5e9, #10b981); }
.brand-logo { background: #fff url("/images/track-kite-mark-transparent.png") center / 29px 29px no-repeat; box-shadow: 0 0 0 1px rgba(255,255,255,.16); }
.collapse-btn { width: 36px; height: 36px; padding: 0; display: inline-grid; place-items: center; color: #cbd5e1; border-color: rgba(255,255,255,.16); background: rgba(255,255,255,.07); border-radius: 10px; }
.collapse-btn:hover { background: rgba(14,165,233,.26); color: #fff; border-color: rgba(125,211,252,.46); }
.collapse-btn span { width: 11px; height: 11px; display: block; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .16s ease; }
.nav-scroll { min-height: 0; overflow: auto; padding-right: 2px; }
.nav-scroll::-webkit-scrollbar { width: 6px; }
.nav-scroll::-webkit-scrollbar-thumb { background: rgba(148,163,184,.35); border-radius: 999px; }
.nav-group { margin-bottom: 6px; }
.nav-section { width: 100%; height: 30px; display: flex; align-items: center; gap: 6px; color: #94a3b8; background: transparent; border: 0; border-radius: 6px; padding: 0 8px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0; }
.nav-section:hover { background: rgba(255,255,255,.06); color: #e2e8f0; }
.chevron { width: 14px; color: #64748b; transition: transform .16s ease; }
.nav-group:not(.open) .chevron { transform: rotate(-90deg); }
.nav-group:not(.open) .nav-items { display: none; }
.nav-items { display: grid; gap: 4px; }
.nav { width: 100%; min-height: 34px; color: #cbd5e1; background: transparent; border: 0; border-radius: 7px; padding: 0 9px; text-align: left; cursor: pointer; text-decoration: none; font: inherit; display: flex; align-items: center; gap: 10px; }
.nav-icon { width: 22px; min-width: 22px; height: 22px; display: inline-grid; place-items: center; border-radius: 7px; color: #bfdbfe; background: rgba(255,255,255,.055); line-height: 1; }
.nav-icon svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 1.9; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.nav-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav:hover { background: rgba(14,165,233,.16); color: #fff; }
.nav.active { background: #0ea5e9; color: #fff; }
.nav:hover .nav-icon { background: rgba(255,255,255,.12); color: #fff; }
.nav.active .nav-icon { background: rgba(255,255,255,.18); color: #fff; }
.sidebar-footer { margin-top: auto; border-top: 1px solid rgba(255,255,255,.1); padding-top: 8px; }
.logout { color: #fecaca; }
.logout .nav-icon { color: #fecaca; }
body.nav-collapsed .brand { grid-template-columns: 32px; justify-content: start; justify-items: center; min-height: 54px; padding: 8px 0 12px 8px; }
body.nav-collapsed .brand-copy, body.nav-collapsed .section-label, body.nav-collapsed .nav-label, body.nav-collapsed .chevron { display: none; }
body.nav-collapsed .collapse-btn { position: absolute; right: 0; top: 8px; width: 20px; height: 32px; border-radius: 7px 0 0 7px; background: rgba(255,255,255,.08); color: #94a3b8; border: 1px solid rgba(255,255,255,.08); border-right: 0; box-shadow: none; }
body.nav-collapsed .collapse-btn:hover { background: rgba(14,165,233,.24); color: #fff; }
body.nav-collapsed .collapse-btn span { transform: rotate(225deg); }
body.nav-collapsed .sidebar { padding-left: 8px; padding-right: 8px; }
body.nav-collapsed .nav-section { display: none; }
body.nav-collapsed .nav-group:not(.open) .nav-items { display: block; }
body.nav-collapsed .nav { justify-content: center; padding: 0; }
body.nav-collapsed .nav-icon { margin: 0; }
main { min-width: 0; height: 100vh; overflow: hidden; display: flex; flex-direction: column; }
.topbar { min-height: 74px; background: linear-gradient(180deg, #ffffff, #f6fbfd); border-bottom: 1px solid #d9e8f2; display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 0 22px; box-shadow: 0 10px 30px rgba(15,23,42,.04); }
.topbar p { margin: 4px 0 0; }
.topbar-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
h1 { margin: 0; font-size: 20px; }
p { color: var(--muted); }
#content { flex: 1; min-height: 0; overflow: auto; padding: 18px 20px; }
#content:has(.v2-list-toolbar) { display: flex; flex-direction: column; overflow: hidden; }
#content:has(.v2-list-toolbar) > .tabs,
#content:has(.v2-list-toolbar) > .v2-list-toolbar,
#content:has(.v2-list-toolbar) > #formHost { flex: 0 0 auto; }
#content:has(.v2-list-toolbar) > .table-stack { flex: 1 1 auto; min-height: 0; }
.grid { display: grid; gap: 14px; }
.metrics { grid-template-columns: repeat(5, minmax(130px, 1fr)); }
.two { grid-template-columns: 1fr 1fr; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 16px; }
.metric small { color: var(--muted); display: block; }
.metric strong { font-size: 22px; display: block; margin-top: 6px; }
.overview-hero { min-height: 158px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 360px); gap: 22px; align-items: center; padding: 22px 24px; border: 1px solid #d8eef8; border-radius: 8px; background:
  linear-gradient(135deg, rgba(14,165,233,.96), rgba(16,185,129,.78)),
  url("/images/track-kite-logo-horizontal-dark.png") right 18px center / auto 82% no-repeat;
  color: #fff; box-shadow: 0 18px 42px rgba(7,29,47,.12); overflow: hidden; }
.overview-hero h2 { margin: 4px 0 8px; font-size: 30px; letter-spacing: 0; }
.overview-hero p { max-width: 560px; margin: 0; color: rgba(255,255,255,.86); font-size: 14px; line-height: 1.55; }
.overview-kicker { color: rgba(255,255,255,.78); font-weight: 850; text-transform: uppercase; font-size: 11px; letter-spacing: 0; }
.overview-domain { justify-self: end; width: min(100%, 340px); padding: 14px 16px; border: 1px solid rgba(255,255,255,.24); border-radius: 8px; background: rgba(7,29,47,.36); backdrop-filter: blur(8px); }
.overview-domain span, .overview-domain small { display: block; color: rgba(255,255,255,.72); }
.overview-domain strong { display: block; margin: 5px 0; font-size: 18px; color: #fff; overflow-wrap: anywhere; }
.overview-metrics { display: grid; grid-template-columns: repeat(5, minmax(145px, 1fr)); gap: 12px; margin-top: 14px; }
.overview-metric { min-height: 112px; padding: 14px 15px; border: 1px solid var(--line); border-radius: 8px; background: #fff; display: grid; align-content: space-between; box-shadow: 0 8px 22px rgba(15,23,42,.04); }
.overview-metric small { color: #64748b; font-size: 12px; font-weight: 750; }
.overview-metric strong { margin-top: 6px; font-size: 25px; color: #071d2f; }
.overview-metric span { color: #64748b; font-size: 12px; }
.overview-metric.is-positive strong { color: #059669; }
.overview-metric.is-negative strong { color: var(--danger); }
.overview-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 14px; margin-top: 14px; align-items: start; }
.overview-panel { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 16px; box-shadow: 0 8px 22px rgba(15,23,42,.04); }
.overview-wide { min-width: 0; }
.overview-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.overview-panel-head h2 { margin: 0; font-size: 16px; color: #071d2f; }
.overview-panel-head span { color: #64748b; font-size: 12px; }
.overview-action-grid { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)); gap: 10px; }
.overview-action { min-height: 104px; height: auto; display: grid; align-content: center; justify-items: start; gap: 6px; padding: 14px; border-color: #dbe5f2; background: linear-gradient(180deg, #fff, #f8fbfd); text-align: left; }
.overview-action .action-icon { width: 20px; height: 20px; color: var(--primary); }
.overview-action strong { color: #071d2f; font-size: 14px; }
.overview-action span:not(.action-icon) { color: #64748b; font-size: 12px; line-height: 1.35; white-space: normal; }
.overview-action:hover { border-color: #7dd3fc; box-shadow: 0 10px 26px rgba(14,165,233,.12); transform: translateY(-1px); }
.overview-health-list { display: grid; gap: 9px; }
.overview-health-list div { min-height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 10px; border-radius: 6px; background: #f8fafc; }
.overview-health-list span, .overview-feed-row span, .overview-alert small { color: #64748b; }
.overview-table-wrap { overflow: auto; }
.overview-table { min-width: 640px; }
.overview-table th, .overview-table td { height: 34px; }
.overview-feed, .overview-alerts { display: grid; gap: 8px; }
.overview-feed-row, .overview-alert { display: grid; gap: 3px; padding: 10px 12px; border-radius: 7px; background: #f8fafc; }
.overview-alerts { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.toolbar { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.admin-filterbar { justify-content: flex-start; align-items: center; gap: 8px; }
.admin-filterbar .search-input { min-width: 280px; flex: 1 1 320px; }
.admin-filterbar select { min-width: 138px; }
.reset-card { border-color: #b9dff2; background: #fbfdff; }
.reset-grid { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px 14px; align-items: center; margin: 12px 0 16px; }
.reset-grid > span { color: #40546a; font-weight: 700; }
.reset-grid > strong { color: #0f172a; font-weight: 750; overflow-wrap: anywhere; }
.credential-value { min-height: 38px; display: flex; align-items: center; width: fit-content; max-width: 100%; padding: 0 12px; border: 1px solid #7dd3fc; border-radius: 6px; background: #eefaff; color: #071d2f; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 15px; font-weight: 850; letter-spacing: 0; box-shadow: inset 4px 0 0 var(--primary); overflow-wrap: anywhere; }
.list-toolbar { justify-content: flex-start; align-items: flex-start; gap: 8px; }
.v2-list-toolbar { display: grid; grid-template-columns: 1fr; padding: 0 0 10px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.toolbar-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-row { gap: 8px; }
.compact-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 84px; height: 30px; gap: 7px; font-weight: 700; }
.compact-btn span { display: inline-flex; align-items: center; justify-content: center; font-weight: 900; }
.action-icon { width: 16px; height: 16px; min-width: 16px; display: inline-flex; align-items: center; justify-content: center; color: currentColor; line-height: 1; }
.action-icon svg { width: 16px; height: 16px; display: block; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.compact-btn .action-icon,
.compact-btn .action-icon svg { width: 15px; height: 15px; min-width: 15px; }
.action-button,
button.primary,
button.success,
button.ghost { display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; }
.action-button .action-icon { flex: 0 0 auto; }
.v2-list-toolbar .success { background: #8deecf; color: #064e3b; border-color: #8deecf; }
.v2-list-toolbar .success:hover { background: #6ee7c7; border-color: #6ee7c7; }
.v2-list-toolbar .primary { background: #0ea5e9; border-color: #0ea5e9; color: #fff; }
.v2-list-toolbar .primary:hover { background: #0284c7; border-color: #0284c7; }
.v2-list-toolbar .ghost { background: #f8fafc; color: #334155; border-color: #cbd5e1; }
.v2-list-toolbar .search-input { width: 160px; }
.v2-list-toolbar select { min-width: 126px; }
.v2-list-toolbar.single-line-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: nowrap; }
.v2-list-toolbar.single-line-toolbar .toolbar-row { flex-wrap: nowrap; min-width: 0; }
.v2-list-toolbar.single-line-toolbar .filter-row { margin-left: auto; justify-content: flex-end; }
.v2-list-toolbar.single-line-toolbar .search-input { width: 160px; min-width: 150px; }
.v2-list-toolbar.single-line-toolbar select { min-width: 124px; }
.v2-list-toolbar.single-line-toolbar .date-range-control { flex: 0 0 auto; }
.csv-menu { position: relative; }
.csv-menu summary { list-style: none; }
.csv-menu summary::-webkit-details-marker { display: none; }
.csv-menu-list { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; width: 106px; padding: 8px 0; border: 1px solid var(--line); border-radius: 6px; background: #fff; box-shadow: 0 18px 45px rgba(15,23,42,.16); }
.csv-menu-list button { display: flex; width: 100%; min-height: 26px; justify-content: flex-start; padding: 4px 12px; border: 0; border-radius: 0; background: transparent; color: var(--text); font-size: 12px; font-weight: 500; }
.csv-menu-list button:hover { background: #f1f5f9; }
@media (max-width: 1360px) {
  .v2-list-toolbar.single-line-toolbar { flex-wrap: wrap; }
  .v2-list-toolbar.single-line-toolbar .filter-row { margin-left: 0; }
}
@media (max-width: 1180px) {
  .overview-metrics { grid-template-columns: repeat(3, minmax(145px, 1fr)); }
  .overview-layout { grid-template-columns: 1fr; }
  .overview-action-grid { grid-template-columns: repeat(2, minmax(160px, 1fr)); }
  .report-command-panel { grid-template-columns: 1fr; }
  .report-command-actions { display: flex; flex-wrap: wrap; }
}
@media (max-width: 760px) {
  body { grid-template-columns: 72px 1fr; }
  .topbar { align-items: flex-start; flex-direction: column; justify-content: center; padding: 10px 14px; }
  .topbar-actions { width: 100%; }
  .topbar-actions .compact-btn { flex: 1 1 0; min-width: 0; }
  .overview-hero { grid-template-columns: 1fr; background: linear-gradient(135deg, rgba(14,165,233,.96), rgba(16,185,129,.78)); }
  .overview-domain { justify-self: stretch; }
  .overview-metrics { grid-template-columns: 1fr; }
  .overview-action-grid { grid-template-columns: 1fr; }
  .report-stat-strip { grid-template-columns: 1fr 1fr; }
  .report-command-copy p { white-space: normal; }
}
button, input, select, textarea { height: 34px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; padding: 0 10px; font: inherit; }
:where(input:not([type="checkbox"]):not([type="radio"]), select, textarea, .shared-tag-picker summary, .shared-choice-picker summary, .currency-picker summary, .export-campaign-picker summary, .source-tag-picker summary):focus,
:where(input:not([type="checkbox"]):not([type="radio"]), select, textarea, .shared-tag-picker summary, .shared-choice-picker summary, .currency-picker summary, .export-campaign-picker summary, .source-tag-picker summary):focus-visible {
  outline: 0;
  border-color: var(--control-focus);
  box-shadow: 0 0 0 2px var(--control-focus-ring);
}
select,
.shared-tag-picker summary,
.shared-choice-picker summary,
.currency-picker summary,
.export-campaign-picker summary,
.source-tag-picker summary {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 34px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.25 4.75L6 7.5L8.75 4.75' stroke='%2364748b' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 12px;
}
select::-ms-expand { display: none; }
select.date-filter { min-width: 128px; }
.date-range-control { display: inline-flex; align-items: center; gap: 6px; }
.date-custom-fields { display: none; align-items: center; gap: 6px; }
.date-custom-fields.show { display: inline-flex; }
.date-custom-fields input[type="date"] { width: 136px; padding: 0 8px; }
.date-separator { color: var(--muted); }
input[type="checkbox"] { width: 14px; height: 14px; min-width: 14px; padding: 0; border-radius: 3px; accent-color: var(--primary); vertical-align: middle; }
button { cursor: pointer; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 34px; border: 1px solid #cbd5e1; border-radius: 6px; padding: 0 10px; text-decoration: none; color: inherit; }
.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.success { background: var(--success); color: #fff; border-color: var(--success); }
.ghost { background: #f1f5f9; }
.danger { color: var(--danger); }
.link-btn { border: 0; background: transparent; color: var(--primary); padding: 0; height: auto; font-weight: 700; }
textarea { width: 100%; height: 92px; padding-top: 8px; }
.table-stack { background: #fff; border: 1px solid #d7e4ef; border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; min-height: 0; box-shadow: 0 12px 30px rgba(15,23,42,.045); }
.table-wrap { overflow: auto; background: #fff; flex: 1 1 auto; min-height: 0; }
table { width: 100%; border-collapse: collapse; min-width: 920px; table-layout: fixed; }
th, td { height: var(--tracker-table-row-height); padding: 0 var(--tracker-table-cell-padding-x); border-bottom: 1px solid #e6edf5; text-align: right; white-space: nowrap; vertical-align: middle; line-height: 1.25; }
th:first-child, td:first-child, th:nth-child(2), td:nth-child(2) { text-align: left; }
th.select-column,
td:first-child:has(input[type="checkbox"]:only-child) { width: 38px; min-width: 38px; max-width: 38px; padding-left: 0; padding-right: 0; text-align: center; }
th.select-column { position: sticky; top: 0; }
th.select-column input[type="checkbox"],
td:first-child:has(input[type="checkbox"]:only-child) input[type="checkbox"] { display: inline-block; margin: 0; vertical-align: middle; }
th { background: #f6fafc; color: #40546a; position: sticky; top: 0; z-index: 2; overflow: visible; box-shadow: inset 0 -1px 0 #dbe6ef; }
td { overflow: hidden; text-overflow: ellipsis; }
.table-sort { width: 100%; height: var(--tracker-table-row-height); padding: 0; border: 0; background: transparent; color: inherit; display: inline-flex; align-items: center; justify-content: flex-end; gap: 5px; font: inherit; font-weight: 800; text-align: inherit; }
th:first-child .table-sort, th:nth-child(2) .table-sort { justify-content: flex-start; }
.table-sort:hover { color: #0369a1; }
.column-resizer { position: absolute; top: 0; right: -4px; width: 8px; height: 100%; cursor: col-resize; z-index: 5; touch-action: none; }
.column-resizer::after { content: ""; position: absolute; top: 7px; bottom: 7px; left: 3px; width: 1px; background: transparent; }
.column-resizer:hover::after, body.is-resizing-column .column-resizer::after { background: #38a7e4; }
body.is-resizing-column, body.is-resizing-column * { cursor: col-resize !important; user-select: none; }
.sort-indicator { color: #94a3b8; font-size: 11px; line-height: 1; }
th.sorted .sort-indicator { color: var(--primary); }
tr:hover { background: #eef9ff; }
td button, td .button, td select, td input:not([type="checkbox"]) { height: 26px; min-height: 26px; padding-top: 0; padding-bottom: 0; }
td input[type="checkbox"] { display: inline-block; margin: 0; }
.profit-row { background: #dcfce7; }
.loss-row { background: #fee2e2; }
.profit-row:hover { background: #bbf7d0; }
.loss-row:hover { background: #fecaca; }
.empty-cell { text-align: center !important; color: var(--muted); padding: 34px 18px; background: linear-gradient(180deg, #fff, #f8fbfd); font-weight: 700; }
.page-loading { min-height: 220px; display: grid; align-content: center; justify-items: start; gap: 8px; background: linear-gradient(135deg, #fff, #f3fbff); border-color: #cfe4ef; box-shadow: 0 16px 36px rgba(15,23,42,.06); }
.page-loading h2 { margin: 0; color: #071d2f; }
.page-loading p { margin: 0; }
.pager { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; border-top: 1px solid #dbe6ef; background: #f6fafc; }
.pager-meta { color: var(--muted); font-size: 12px; }
.pager-controls { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pager-controls button, .pager-controls select { height: 28px; border-radius: 5px; padding: 0 8px; font-size: 12px; }
.pager-controls button:disabled { opacity: .45; cursor: not-allowed; }
.positive { color: var(--success); font-weight: 800; }
.warning { color: var(--warning); font-weight: 800; }
.tag { display: inline-flex; padding: 3px 8px; border-radius: 999px; background: #dbeafe; color: #1e40af; }
.tag-chip { background: color-mix(in srgb, var(--tag-color, #3b82f6) 16%, white); color: #0f172a; border: 1px solid color-mix(in srgb, var(--tag-color, #3b82f6) 42%, white); }
.tag-chip::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--tag-color, #3b82f6); margin-right: 6px; align-self: center; }
.tag-cloud { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.tag-cloud button { height: 26px; min-height: 26px; padding: 0 8px; font-size: 12px; display: inline-flex; align-items: center; gap: 6px; }
.color-dot { width: 8px; height: 8px; border-radius: 2px; display: inline-block; box-shadow: 0 0 0 1px rgba(15,23,42,.08); }
.shared-tag-picker, .shared-choice-picker { position: relative; margin: 0; }
.shared-tag-picker summary, .shared-choice-picker summary { min-height: 34px; border: 1px solid #cbd5e1; border-radius: 6px; padding: 8px 34px 8px 10px; font-weight: 400; color: var(--muted); list-style: none; position: relative; }
.shared-tag-picker:not(.is-placeholder) summary, .shared-choice-picker:not(.is-placeholder) summary { color: var(--text); }
.shared-tag-picker summary::-webkit-details-marker, .shared-choice-picker summary::-webkit-details-marker { display: none; }
.shared-tag-picker summary::after, .shared-choice-picker summary::after { content: none; }
.shared-tag-menu, .shared-choice-menu { position: absolute; z-index: 75; top: calc(100% + 4px); left: 0; right: 0; min-width: 360px; max-height: 360px; overflow: auto; background: #fff; border: 1px solid #cbd5e1; border-radius: 6px; box-shadow: 0 20px 60px rgba(15,23,42,.22); padding: 10px; display: grid; gap: 8px; }
.shared-tag-search input { width: 100%; height: 32px; }
.shared-tag-choices { display: grid; gap: 2px; max-height: 190px; overflow: auto; padding-right: 4px; }
.shared-tag-row { min-height: 28px; display: flex; align-items: center; gap: 8px; color: var(--text); }
.shared-tag-row input[type="checkbox"] { width: 14px; height: 14px; min-width: 14px; }
.shared-choice-choices { display: grid; gap: 2px; max-height: 210px; overflow: auto; padding-right: 4px; }
.shared-choice-row { min-height: 28px; display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--text); background: #fff; border: 0; border-radius: 5px; padding: 4px 6px; text-align: left; }
.shared-choice-row:hover, .shared-choice-row.active { background: #f1f5f9; color: #0087d8; }
.shared-choice-add { display: grid; grid-template-columns: auto minmax(0, 1fr) 44px; gap: 8px; align-items: center; border-top: 1px solid var(--line); padding-top: 10px; color: var(--muted); }
.shared-choice-add input { height: 32px; }
.shared-choice-add button { height: 32px; min-height: 32px; padding: 0 12px; font-size: 18px; }
.shared-tag-create { display: grid; grid-template-columns: 18px minmax(0, 1fr) 60px; gap: 10px; align-items: center; border-top: 1px solid var(--line); padding-top: 10px; }
.shared-tag-create input { height: 32px; }
.shared-tag-create button { height: 32px; min-height: 32px; padding: 0 12px; }
.tag-color-preview { width: 16px; height: 16px; border-radius: 2px; display: inline-block; box-shadow: 0 0 0 1px rgba(15,23,42,.12); }
.tag-palette { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tag-color-swatch { width: 16px; min-width: 16px; height: 16px; min-height: 16px; padding: 0; border: 1px solid rgba(15,23,42,.08); border-radius: 2px; background: var(--swatch); }
.tag-hex-label { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; color: var(--muted); font-size: 12px; }
.tag-hex-label input { width: 86px; height: 28px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.money-control { display: flex; align-items: center; gap: 8px; min-width: 0; }
.money-control > input { width: 96px; border-radius: 6px 0 0 6px; background: #fff; color: var(--text); }
.money-control > input:disabled, .money-control > input.is-auto-locked { background: #f1f5f9; border-color: #dbe3ef; color: #94a3b8; cursor: not-allowed; }
.money-control .currency-picker { margin-left: -9px; }
.currency-picker { position: relative; margin: 0; }
.currency-picker summary { width: 96px; height: 34px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid #cbd5e1; border-radius: 0 6px 6px 0; padding: 0 34px 0 12px; color: #334155; list-style: none; position: relative; font-weight: 400; }
.currency-picker summary::-webkit-details-marker { display: none; }
.currency-picker summary::after { content: none; }
.currency-picker summary span { min-width: 14px; text-align: center; color: #0f172a; font-weight: 800; }
.currency-picker summary strong { font-weight: 500; }
.currency-menu { position: absolute; z-index: 90; top: calc(100% + 4px); left: 0; width: 120px; max-height: 292px; overflow: hidden; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; box-shadow: 0 22px 70px rgba(15,23,42,.24); padding: 8px 0 0; }
.currency-search { padding: 0 10px 7px; position: relative; }
.currency-search input { width: 100%; height: 30px; padding: 0 26px 0 8px; border-color: #38a7e4; }
.currency-search span { position: absolute; right: 18px; top: 5px; color: #64748b; font-weight: 800; pointer-events: none; }
.currency-options { max-height: 246px; overflow: auto; padding-bottom: 4px; }
.currency-row { width: 100%; height: 28px; display: grid; grid-template-columns: 30px 1fr 18px; align-items: center; border: 0; border-radius: 0; background: #fff; color: #172033; padding: 0 8px 0 10px; text-align: left; }
.currency-row:hover, .currency-row.active { background: #f1f8ff; color: #007ad2; }
.currency-symbol { font-weight: 800; color: #0f172a; text-align: left; }
.currency-code { font-size: 12px; }
.currency-check { color: #008ee6; font-weight: 900; text-align: right; }
.status-pill { display: inline-flex; align-items: center; min-width: 58px; justify-content: center; padding: 3px 8px; border-radius: 999px; background: #dcfce7; color: #166534; font-weight: 700; }
.status-pill.off { background: #fee2e2; color: #991b1b; }
.copy-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; max-width: 520px; }
.copy-row input { width: 100%; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.form { display: grid; grid-template-columns: 150px 1fr; gap: var(--dialog-form-row-gap) var(--dialog-form-column-gap); align-items: center; }
.form input, .form select { width: 100%; }
.form input[type="checkbox"] { width: 14px; justify-self: start; }
.native-select-skin {
  position: relative;
  width: 100%;
  min-width: 0;
}
.native-select-original {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 1px !important;
  opacity: 0;
  pointer-events: none;
}
.native-select-button {
  width: 100%;
  height: var(--dialog-control-height);
  min-height: var(--dialog-control-height);
  justify-content: flex-start;
  padding: 0 34px 0 10px;
  border: 1px solid #c8d3df;
  border-radius: 6px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.25 4.75L6 7.5L8.75 4.75' stroke='%2364748b' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 12px;
  color: var(--text);
  font: inherit;
  text-align: left;
  box-shadow: none;
  transition: border-color .12s ease, background-color .12s ease;
  overflow: hidden;
  text-overflow: ellipsis;
}
.native-select-button:hover {
  border-color: #9fb1c3;
  background-color: #fff;
}
.native-select-button:focus,
.native-select-button:focus-visible {
  outline: 0;
  border-color: #0087fd;
  box-shadow: 0 0 0 2px rgba(0, 135, 253, .13);
}
.native-select-skin.open .native-select-button {
  border-color: #0087fd;
}
.native-select-menu {
  position: absolute;
  z-index: 140;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 240px;
  overflow: auto;
  display: none;
  padding: 4px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  box-shadow: none;
}
.native-select-skin.open .native-select-menu {
  display: grid;
  gap: 2px;
}
.native-select-search {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 4px 4px 6px;
  background: #fff;
}
.native-select-search input {
  width: 100%;
  height: 28px;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid #c8d3df;
  border-radius: 5px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  box-shadow: none;
}
.native-select-search input:focus {
  outline: 0;
  border-color: #0087fd;
  box-shadow: 0 0 0 2px rgba(0, 135, 253, .13);
}
.native-select-option {
  width: 100%;
  min-height: 28px;
  height: auto;
  justify-content: flex-start;
  padding: 5px 8px;
  border: 0;
  border-radius: 4px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  text-align: left;
  white-space: normal;
  box-shadow: none;
}
.native-select-option:hover,
.native-select-option.active {
  background: #eff6ff;
  color: #075985;
}
.native-select-option:disabled {
  color: #94a3b8;
  cursor: not-allowed;
}
.actions { display: flex; gap: 8px; margin-top: 14px; }
.actions.compact { margin-top: 0; flex-wrap: wrap; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tabs button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.report-workspace { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; background: linear-gradient(180deg, #f7fbfd 0, #fff 260px); margin: -18px -20px; padding: 16px 20px 0; }
.report-command-panel { display: grid; grid-template-columns: minmax(220px, .88fr) minmax(520px, 1.6fr) auto; gap: 14px; align-items: stretch; margin-bottom: 12px; padding: 14px; border: 1px solid #cfe4ef; border-radius: 8px; background: linear-gradient(135deg, rgba(7,29,47,.98), rgba(6,95,112,.88)); color: #fff; box-shadow: 0 18px 38px rgba(7,29,47,.14); }
.report-command-copy { min-width: 0; align-self: center; }
.report-command-copy h2 { margin: 4px 0 5px; font-size: 22px; letter-spacing: 0; color: #fff; }
.report-command-copy p { margin: 0; color: rgba(255,255,255,.74); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.report-stat-strip { display: grid; grid-template-columns: repeat(5, minmax(100px, 1fr)); gap: 8px; min-width: 0; }
.report-stat { min-height: 76px; padding: 10px 11px; border: 1px solid rgba(255,255,255,.14); border-radius: 7px; background: rgba(255,255,255,.08); display: grid; align-content: space-between; box-shadow: inset 0 1px 0 rgba(255,255,255,.12); }
.report-stat small { color: rgba(255,255,255,.68); font-weight: 800; font-size: 11px; }
.report-stat strong { font-size: 20px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.report-stat span { color: rgba(255,255,255,.7); font-size: 11px; }
.report-stat.profit strong { color: #86efac; }
.report-stat.loss strong { color: #fca5a5; }
.report-stat.money strong { color: #bae6fd; }
.report-command-actions { display: grid; align-content: center; gap: 8px; }
.report-command-actions .compact-btn { min-width: 104px; }
.report-command-actions .ghost { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.22); }
.report-command-actions .ghost:hover { background: rgba(255,255,255,.18); }
.report-dimension-strip { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; padding: 4px 0 8px; border-bottom: 0; margin-bottom: 0; }
.report-dimension-strip select { min-width: 112px; height: 28px; border-color: #dbe5f2; border-radius: 5px; font-size: 12px; }
.report-chip { min-height: 28px; height: 28px; padding: 0 9px; border-radius: 6px; border-color: #dfe8f1; background: #fff; color: #172033; font-size: 12px; font-weight: 650; display: inline-flex; align-items: center; gap: 6px; box-shadow: 0 4px 12px rgba(15,23,42,.035); }
.report-chip span { width: 6px; height: 6px; border-radius: 50%; background: #f59e0b; display: inline-block; }
.report-chip em { padding: 1px 5px; border-radius: 4px; background: #ff3b58; color: #fff; font-style: normal; font-size: 10px; font-weight: 800; text-transform: lowercase; }
.report-chip:nth-of-type(4n) span { background: #0ea5e9; }
.report-chip:nth-of-type(4n + 1) span { background: #10b981; }
.report-chip:nth-of-type(4n + 2) span { background: #ef4444; }
.report-chip.metric span { background: #0d9488; }
.report-chip.active { background: #dff6ff; border-color: #67c7ee; color: #075985; box-shadow: 0 6px 16px rgba(14,165,233,.15); }
.report-toolbar { flex: 0 0 auto; margin: 0 0 8px; padding-bottom: 8px; border-bottom: 0; }
.report-toolbar.single-line-toolbar { justify-content: flex-start; flex-wrap: wrap; }
.report-toolbar .toolbar-row { flex-wrap: wrap; gap: 6px; }
.report-toolbar select,
.report-toolbar input,
.report-toolbar .compact-btn,
.report-toolbar .csv-menu summary { height: 30px; min-height: 30px; font-size: 12px; border-radius: 5px; }
.report-toolbar .search-input { width: 158px; }
.report-active-group { height: 30px; display: inline-flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid #cbd5e1; border-radius: 5px; background: #fff; font-weight: 650; font-size: 12px; }
.report-active-group button { width: 18px; height: 18px; min-height: 18px; border: 0; background: transparent; padding: 0; color: var(--muted); display: inline-grid; place-items: center; }
.report-active-group .action-icon,
.report-active-group .action-icon svg { width: 13px; height: 13px; min-width: 13px; }
.report-export-menu { margin: 0; }
.report-total-row { min-height: 40px; display: grid; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-top: 0; background: #f8fafc; font-size: 12px; overflow: auto; }
.report-total-row .report-total-label { text-align: left; }
.report-total-row strong { font-weight: 700; text-align: right; white-space: nowrap; }
.report-cost-body { display: grid; gap: 12px; padding: 0 32px; }
.report-cost-body p { margin: 0; }
.code { background: #f8fafc; border: 1px solid var(--line); border-left: 4px solid var(--primary); padding: 12px; border-radius: 6px; overflow: auto; }
.editor-shell { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; margin-top: 14px; overflow: hidden; }
.editor-head { min-height: 58px; display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #f8fafc; }
.editor-head span { color: var(--muted); margin-left: 8px; }
.editor-grid { display: grid; grid-template-columns: minmax(360px, 1fr) minmax(360px, 1fr); }
.editor-pane { padding: 18px; border-right: 1px solid var(--line); }
.editor-pane:last-child { border-right: 0; }
h3 { margin: 10px 0 14px; font-size: 13px; text-transform: uppercase; letter-spacing: 0; }
.dense { grid-template-columns: 170px minmax(0, 1fr); }
.inline-fields { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 8px; align-items: center; }
.checkline { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); white-space: nowrap; }
.checkline input[type="checkbox"] { width: 14px; height: 14px; }
details { margin: 16px 0; }
summary { cursor: pointer; font-weight: 700; }
.standard-note-editor { display: grid; gap: 8px; min-width: 0; }
.standard-note-label { color: #8a9aaf; font-size: 12px; font-weight: 800; letter-spacing: 0; text-transform: uppercase; }
.note-tools { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; min-height: 28px; }
.note-tool-btn { width: 25px; height: 25px; min-height: 25px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: #91a0b3; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; line-height: 1; }
.note-tool-btn:hover { background: #eef4fb; color: #24405f; }
.note-tool-btn .action-icon,
.note-tool-btn .action-icon svg { width: 15px; height: 15px; min-width: 15px; }
.note-strike { text-decoration: line-through; }
.note-color-swatch { width: 15px; height: 15px; display: block; border-bottom: 3px solid #91a0b3; }
.notes { min-height: 170px; }
.standard-note-textarea { min-height: 190px; resize: vertical; }
.standard-note-rich { min-height: 210px; max-height: 380px; overflow: auto; resize: vertical; padding: 12px 14px; border: 1px solid #cbd5e1; border-radius: 7px; background: #fff; color: var(--text); line-height: 1.55; outline: none; }
.standard-note-rich:focus { border-color: var(--control-focus); box-shadow: 0 0 0 2px var(--control-focus-ring); }
.standard-note-rich p { margin: 0 0 10px; }
.standard-note-rich h1,
.standard-note-rich h2 { margin: 0 0 10px; color: #06203c; letter-spacing: 0; }
.standard-note-rich h1 { font-size: 20px; }
.standard-note-rich h2 { font-size: 16px; }
.standard-note-rich ul,
.standard-note-rich ol { margin: 0 0 10px 22px; padding: 0; }
.standard-note-rich blockquote { margin: 0 0 10px; padding: 6px 10px; border-left: 3px solid #9db4d3; background: #f8fafc; color: #334155; }
.standard-note-rich code { padding: 1px 5px; border-radius: 4px; background: #eef2f7; color: #0f172a; font-family: Consolas, "Courier New", monospace; font-size: 12px; }
.stack-list { display: grid; gap: 8px; padding: 8px 0; }
.campaign-user-row { min-height: 28px; justify-content: flex-start; }
.split-title { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.flow-box { border: 1px solid var(--line); background: #f8fafc; }
.flow-row { min-height: 34px; display: grid; grid-template-columns: minmax(0, 1fr) 70px 80px; gap: 8px; align-items: center; padding: 6px 10px; border-bottom: 1px solid var(--line); }
.rotation-items .flow-row { grid-template-columns: 110px minmax(0, 1fr) 80px 90px 80px; }
.flow-row input, .flow-row select { height: 28px; }
.flow-head { color: var(--muted); font-size: 12px; text-transform: uppercase; }
.flow-section { padding: 10px 18px; color: var(--success); font-size: 12px; text-transform: uppercase; background: #fff; }
.flow-row.accent { border-left: 4px solid var(--success); background: #fff; }
.toggle { width: 30px; height: 18px; border-radius: 999px; background: #cbd5e1; display: inline-block; position: relative; }
.toggle::after { content: ""; width: 14px; height: 14px; border-radius: 50%; background: #fff; position: absolute; top: 2px; left: 2px; box-shadow: 0 1px 2px rgba(15,23,42,.2); }
.toggle.on { background: var(--success); }
.toggle.on::after { left: 14px; }
.empty-row { color: var(--muted); padding: 14px; background: #fff; }
.overlay { position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 50; display: grid; place-items: start center; padding: 5vh 14px; overflow: auto; }
.dialog { width: min(720px, calc(100vw - 28px)); max-height: 90vh; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 24px 80px rgba(15,23,42,.25); overflow: auto; }
.dialog.narrow-dialog { width: min(620px, calc(100vw - 28px)); }
.dialog.filter-dialog { width: min(600px, calc(100vw - 28px)); min-height: 624px; display: flex; flex-direction: column; }
.dialog.condition-filter-dialog { width: min(760px, calc(100vw - 28px)); min-height: 0; overflow-x: hidden; }
.dialog.export-confirm-dialog { width: min(430px, calc(100vw - 28px)); min-height: 0; }
.dialog.export-dialog { width: min(620px, calc(100vw - 28px)); min-height: 0; }
.dialog.export-conversions-dialog { width: min(430px, calc(100vw - 28px)); min-height: 0; }
.dialog.conversion-update-dialog { width: min(940px, calc(100vw - 28px)); min-height: 760px; display: flex; flex-direction: column; }
.dialog.conversion-logs-dialog { width: min(1050px, calc(100vw - 28px)); min-height: 500px; display: flex; flex-direction: column; }
.dialog.campaign-dialog { width: min(1320px, calc(100vw - 28px)); }
.dialog.campaign-dialog .editor-head { min-height: 66px; padding: 14px 28px; background: #fff; }
.dialog.campaign-dialog .editor-head h2 { font-size: 20px; }
.dialog.campaign-dialog .editor-head .actions button { color: inherit; }
.dialog.campaign-dialog .editor-head .actions .primary,
.dialog.campaign-dialog .editor-head .actions .success { color: #fff; }
.dialog.campaign-dialog .editor-head .actions .ghost { color: var(--text); }
.dialog.campaign-dialog .editor-head .actions .icon-btn { color: var(--muted); }
.dialog.campaign-dialog .editor-head .actions .icon-btn:hover { color: var(--text); }
.dialog.campaign-dialog .editor-head .actions .action-icon,
.dialog.campaign-dialog .editor-head .actions .action-icon svg { color: currentColor; stroke: currentColor; }
.dialog.campaign-dialog .editor-shell { margin-top: 0; border: 0; border-radius: 0; }
.dialog.campaign-dialog .editor-grid { grid-template-columns: minmax(450px, .9fr) minmax(610px, 1.1fr); gap: 0; }
.dialog.campaign-dialog .editor-pane { padding: 26px 28px; }
.dialog.campaign-dialog .editor-pane:last-child { background: #fbfdff; }
.dialog.campaign-dialog h3 { color: #8a9aaf; font-size: 12px; font-weight: 800; }
.dialog.campaign-dialog .form.dense { grid-template-columns: 190px minmax(0, 1fr); gap: var(--dialog-form-row-gap) var(--dialog-form-column-gap); }
.dialog.campaign-dialog .form.dense > label { font-weight: 650; color: #06203c; }
.dialog.campaign-dialog .form.dense input:not([type="checkbox"]),
.dialog.campaign-dialog .form.dense select,
.dialog.campaign-dialog .shared-tag-picker summary,
.dialog.campaign-dialog .shared-choice-picker summary { height: var(--dialog-control-height); min-height: var(--dialog-control-height); border-radius: 6px; }
.campaign-cost-control { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.campaign-cost-control > input { width: 76px; flex: 0 0 76px; }
.campaign-cost-control .currency-picker summary { height: var(--dialog-control-height); min-height: var(--dialog-control-height); width: 96px; }
.segmented-control { display: inline-flex; align-items: center; gap: 4px; }
.segmented-control button { height: 28px; min-height: 28px; min-width: 44px; padding: 0 10px; border-radius: 6px; background: #fff; color: #334155; font-size: 12px; font-weight: 700; }
.segmented-control button.active { background: #0e8ed8; border-color: #0e8ed8; color: #fff; }
.campaign-section { margin: 18px 0 0; }
.campaign-section summary { min-height: 30px; display: inline-flex; align-items: center; gap: 7px; color: #06203c; font-weight: 750; list-style: none; cursor: pointer; }
.campaign-section summary::-webkit-details-marker { display: none; }
.campaign-section-title { display: inline-flex; align-items: center; }
.campaign-section summary .action-icon { width: 14px; height: 14px; color: currentColor; transition: transform .16s ease; }
.campaign-section[open] summary .action-icon { transform: rotate(180deg); }
.dialog.campaign-dialog .campaign-section + .standard-note-editor { margin-top: 20px; }
.new-badge { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 8px; background: #dff8eb; color: #00a45a; font-size: 10px; font-weight: 900; text-transform: uppercase; }
.switchline { display: inline-flex; align-items: center; width: max-content; }
.switchline input { position: absolute; opacity: 0; pointer-events: none; }
.switchline span { width: 40px; height: 22px; display: inline-block; border-radius: 999px; background: #e2e8f0; position: relative; transition: background .16s ease; }
.switchline span::after { content: ""; position: absolute; width: 18px; height: 18px; top: 2px; left: 2px; border-radius: 50%; background: #fff; box-shadow: 0 2px 7px rgba(15,23,42,.2); transition: transform .16s ease; }
.switchline input:checked + span { background: #8deecf; }
.switchline input:checked + span::after { transform: translateX(18px); }
.campaign-users-panel { min-height: 64px; border-radius: 8px; background: #f7f7f8; padding: 12px; display: grid; gap: 8px; }
.campaign-users-section { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 12px 14px; align-items: center; }
.campaign-users-section > label,
.campaign-users-label { color: #06203c; font-weight: 650; }
.campaign-users-label,
.campaign-users-panel,
.campaign-users-add { grid-column: 1 / -1; }
.campaign-users-label { margin-top: 4px; }
.campaign-integration-stack { display: grid; gap: 14px; }
.campaign-integration-card { border-radius: 10px; background: #f7f7f8; padding: 14px 10px 16px; display: grid; gap: 12px; }
.campaign-integration-head { min-height: 28px; display: flex; align-items: center; gap: 14px; color: #06203c; font-weight: 750; }
.campaign-integration-head > span:first-child { min-width: 190px; }
.campaign-card-form { grid-template-columns: 190px minmax(0, 1fr); gap: 11px 14px; }
.campaign-account-empty { min-height: 28px; display: flex; align-items: center; padding: 0 10px; border-left: 3px solid #9db4d3; background: #fff; color: var(--muted); }
.integration-status { height: 28px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 999px; background: #def3ff; color: #008de0; font-size: 12px; font-weight: 700; }
.campaign-token-box { min-height: 72px; border: 1px solid var(--line); border-radius: 6px; background: #fff; padding: 6px; display: flex; gap: 5px; align-content: flex-start; align-items: flex-start; flex-wrap: wrap; }
.campaign-token-chip { min-height: 21px; display: inline-flex; align-items: center; gap: 4px; padding: 0 7px; border-radius: 3px; background: #f1f5f9; color: #24405f; font-size: 12px; }
.campaign-token-chip button { width: 14px; height: 14px; min-height: 14px; border: 0; padding: 0; background: transparent; color: #64748b; line-height: 1; }
.campaign-user-table-head,
.campaign-user-table-row,
.campaign-user-chooser-head,
.campaign-user-chooser-row { display: grid; grid-template-columns: minmax(0, 1fr) 80px 86px 128px 72px; align-items: center; gap: 10px; }
.campaign-user-table-head { min-height: 34px; padding: 0 10px; color: #06203c; font-size: 12px; font-weight: 800; text-transform: uppercase; }
.campaign-user-table-row { min-height: 34px; padding: 0 10px; background: #fff; border-left: 3px solid var(--success); }
.campaign-user-empty { min-height: 34px; display: flex; align-items: center; padding: 0 10px; background: #fff; color: var(--muted); }
.campaign-users-add { margin-top: 10px; justify-self: start; min-width: 90px; }
.campaign-user-chooser-dialog { width: min(760px, calc(100vw - 28px)); min-height: 620px; display: flex; flex-direction: column; }
.campaign-user-chooser-body { display: grid; gap: 14px; padding: 0 32px; }
.campaign-user-chooser-table { border-top: 1px solid var(--line); }
.campaign-user-chooser-head,
.campaign-user-chooser-row { grid-template-columns: 34px 80px minmax(0, 1fr) 110px; min-height: 34px; padding: 0 6px; border-bottom: 1px solid var(--line); }
.campaign-user-chooser-head { color: #334155; font-weight: 800; }
.campaign-user-chooser-row { cursor: pointer; }
.campaign-user-chooser-row:hover { background: #f8fafc; }
.dialog.campaign-dialog .split-title { margin-bottom: 14px; align-items: center; }
.dialog.campaign-dialog .split-title label { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; color: var(--text); }
.dialog.campaign-dialog .split-title select { min-width: 190px; }
.dialog.campaign-dialog .flow-box { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #f8fafc; margin-bottom: 14px; padding: 0; }
.dialog.campaign-dialog .path-editor { padding: 0 0 10px; background: #fff; border: 1px solid #dbe4ef; border-radius: 8px; box-shadow: 0 1px 0 rgba(15,23,42,.03); margin: 10px; overflow: hidden; }
.dialog.campaign-dialog .path-editor + .path-editor { margin-top: 18px; }
.dialog.campaign-dialog .path-editor > .flow-row:first-child { background: #f8fafc; border-bottom: 1px solid var(--line); border-radius: 8px 8px 0 0; }
.dialog.campaign-dialog .flow-row.flow-head { border-bottom: 1px solid var(--line); }
.dialog.campaign-dialog .flow-row.flow-head + .path-editor { margin-top: 10px; }
.dialog.campaign-dialog .flow-row { min-height: 42px; grid-template-columns: minmax(0, 1fr) 76px 88px; gap: 12px; padding: 8px 10px; }
.dialog.campaign-dialog .flow-row input,
.dialog.campaign-dialog .flow-row select { height: 32px; }
.dialog.campaign-dialog .flow-row.flow-head { min-height: 34px; margin: 0 10px; background: #f8fafc; grid-template-columns: minmax(0, 1fr) 58px 44px; gap: 0; padding-left: 18px; padding-right: 14px; align-items: center; box-sizing: border-box; }
.dialog.campaign-dialog .flow-row.flow-head span:nth-child(2),
.dialog.campaign-dialog .flow-row.flow-head span:nth-child(3) { font-size: 11px; letter-spacing: 0; }
.dialog.campaign-dialog .flow-row.flow-head span:nth-child(2),
.dialog.campaign-dialog .flow-row.flow-head span:nth-child(3) { justify-self: center; text-align: center; }
.dialog.campaign-dialog .flow-section { padding: 14px 18px 8px; background: transparent; font-weight: 800; }
.dialog.campaign-dialog .path-editor .flow-row.accent { position: relative; min-height: 38px; margin: 0 0 4px; padding: 3px 14px 3px 28px; border-left: 0; border-bottom: 1px solid #edf2f7; border-radius: 0; align-items: center; background: #fff; box-sizing: border-box; grid-template-columns: minmax(0, 1fr) 58px 22px 22px; gap: 0; }
.dialog.campaign-dialog .path-editor .flow-row.accent::before { content: ""; position: absolute; left: 10px; top: 50%; width: 4px; height: 28px; background: var(--success); transform: translateY(-50%); border-radius: 0; }
.dialog.campaign-dialog .path-editor .flow-row.accent:last-of-type { margin-bottom: 6px; }
.dialog.campaign-dialog .path-editor .flow-row.accent > * { align-self: center; }
.dialog.campaign-dialog .path-editor .flow-row.accent input,
.dialog.campaign-dialog .path-editor .flow-row.accent button,
.dialog.campaign-dialog .flow-item-label { height: 32px; min-height: 32px; }
.dialog.campaign-dialog .path-editor .flow-row.accent input,
.dialog.campaign-dialog .path-editor .flow-row.accent button { box-sizing: border-box; line-height: 1; }
.dialog.campaign-dialog .path-editor .flow-row.accent button { display: inline-flex; align-items: center; justify-content: center; padding-top: 0; padding-bottom: 0; }
.dialog.campaign-dialog .path-editor .flow-row.accent input:not([type="hidden"]) { border-color: transparent; background: transparent; padding-top: 0; padding-bottom: 0; }
.dialog.campaign-dialog .path-editor .flow-row.accent input:not([type="hidden"]):focus { border-color: var(--control-focus); background: #fff; }
.dialog.campaign-dialog .path-editor .flow-row.accent button.ghost { border-color: transparent; background: transparent; }
.dialog.campaign-dialog .path-editor .flow-row.accent button.ghost:hover { border-color: #cbd5e1; background: #f8fafc; }
.dialog.campaign-dialog .path-editor .path-main-row { min-height: 34px; grid-template-columns: minmax(0, 1fr) 58px 22px 22px; gap: 0; align-items: center; padding: 4px 14px 4px 18px; }
.dialog.campaign-dialog .path-editor .path-main-row > * { align-self: center; }
.dialog.campaign-dialog .path-editor .path-main-row .path-name,
.dialog.campaign-dialog .path-editor .path-main-row .path-weight { height: 28px; min-height: 28px; border-color: transparent; background: transparent; box-shadow: none; padding: 0 6px; line-height: 28px; }
.dialog.campaign-dialog .path-editor .path-main-row .path-name { font-weight: 700; color: var(--text); }
.dialog.campaign-dialog .path-editor .path-main-row .path-weight,
.dialog.campaign-dialog .path-editor .flow-row.accent .lander-weight,
.dialog.campaign-dialog .path-editor .flow-row.accent .offer-weight { text-align: center; }
.dialog.campaign-dialog .path-editor .path-main-row .path-name:hover,
.dialog.campaign-dialog .path-editor .path-main-row .path-weight:hover { background: #fff; border-color: #d8e2ef; }
.dialog.campaign-dialog .path-editor .path-main-row .path-name:focus,
.dialog.campaign-dialog .path-editor .path-main-row .path-weight:focus { background: #fff; border-color: var(--control-focus); box-shadow: 0 0 0 2px var(--control-focus-ring); outline: 0; }
.dialog.campaign-dialog .path-editor .flow-row.accent .route-icon-btn,
.dialog.campaign-dialog .path-editor .path-main-row .route-icon-btn { width: 22px; min-width: 22px; height: 26px; min-height: 26px; padding: 0; display: inline-grid; place-items: center; border: 0; border-radius: 6px; background: transparent; color: #94a3b8; cursor: pointer; }
.dialog.campaign-dialog .path-editor .flow-row.accent .route-icon-btn:hover,
.dialog.campaign-dialog .path-editor .path-main-row .route-icon-btn:hover { background: #eef2f7; color: var(--text); }
.dialog.campaign-dialog .path-editor .flow-row.accent .route-icon-btn.danger:hover,
.dialog.campaign-dialog .path-editor .path-main-row .route-icon-btn.danger:hover { background: #fee2e2; color: var(--danger); }
.dialog.campaign-dialog .path-editor .flow-row.accent .route-icon-btn .action-icon,
.dialog.campaign-dialog .path-editor .flow-row.accent .route-icon-btn svg,
.dialog.campaign-dialog .path-editor .path-main-row .route-icon-btn .action-icon,
.dialog.campaign-dialog .path-editor .path-main-row .route-icon-btn svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.dialog.campaign-dialog .flow-item-label { display: flex; align-items: center; min-width: 0; padding: 0 8px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--text); line-height: 1.2; box-sizing: border-box; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dialog.campaign-dialog .path-editor .flow-row.accent .path-offer-direct,
.dialog.campaign-dialog .path-editor .flow-row.accent .path-lander-direct { min-width: 0; }
.dialog.campaign-dialog .path-editor .actions.compact { gap: 10px; padding: 0 8px 12px; margin: 2px 0 0; border-bottom: 1px solid #dbe4ef; }
.dialog.campaign-dialog .path-editor .actions.compact:last-child { padding-bottom: 0; border-bottom: 0; }
.dialog.campaign-dialog .path-clipboard-actions { align-items: center; gap: 10px; }
.dialog.campaign-dialog .path-clipboard-actions .compact-btn .action-icon { margin-left: 6px; }
.dialog.campaign-dialog .route-preview { gap: 12px 14px; margin-top: 4px; }
.dialog.campaign-dialog .code { margin-top: 12px; }
.campaign-rule-overlay { z-index: 130; padding-top: 9vh; }
.campaign-rule-dialog {
  width: min(640px, calc(100vw - 28px));
  min-height: 610px;
  display: flex;
  flex-direction: column;
  overflow: visible;
}
.campaign-rule-dialog .dialog-head {
  padding: 28px 32px 30px;
}
.campaign-rule-body {
  display: grid;
  gap: 10px;
  padding: 0 32px;
}
.campaign-rule-main {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) auto 66px;
  gap: 12px;
  align-items: center;
}
.campaign-rule-main .native-select-skin,
.campaign-rule-main > select {
  min-width: 0;
}
.campaign-rule-operator {
  height: var(--dialog-control-height);
  display: inline-flex;
  align-items: center;
  border: 0;
  background: #eef5fb;
}
.campaign-rule-operator button {
  min-width: 64px;
  height: var(--dialog-control-height);
  min-height: var(--dialog-control-height);
  border: 0;
  box-shadow: none;
}
.campaign-rule-operator button.active {
  background: var(--success);
  color: #064e3b;
}
.campaign-rule-form {
  display: block;
}
.campaign-rule-value-stack {
  display: grid;
  gap: 8px;
}
.campaign-rule-value-stack > input {
  width: 100%;
  height: 34px;
}
.campaign-rule-key-input {
  margin-bottom: 0;
}
.campaign-rule-value-stack p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  font-style: italic;
}
.campaign-rule-value-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
}
.campaign-rule-value-tools .ghost,
.campaign-rule-clear {
  height: 30px;
  min-height: 30px;
  border-radius: 6px;
  background: #fff;
}
.campaign-rule-list-mode .campaign-rule-clear {
  visibility: hidden;
}
.campaign-rule-exact {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #1f2d44;
  font-size: 13px;
  white-space: nowrap;
}
.campaign-rule-exact input {
  width: 16px;
  height: 16px;
}
.campaign-rule-list-page {
  display: grid;
  gap: 10px;
}
.campaign-rule-list-page textarea {
  width: 100%;
  min-height: 330px;
  resize: vertical;
}
.campaign-rule-list-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}
.campaign-rule-list-actions button {
  min-width: 80px;
  height: 30px;
  min-height: 30px;
  border-radius: 6px;
}
.campaign-rule-dialog .dialog-actions {
  justify-content: center;
  gap: 18px;
  margin-top: auto;
  padding: 16px 32px 18px;
}
.campaign-rule-dialog .dialog-actions button {
  min-width: 120px;
}
.dialog-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.filter-dialog-head { border-bottom: 0; padding: 24px 32px 14px; }
.filter-dialog-head h2 { margin: 0; font-size: 24px; color: #14303a; }
.condition-filter-dialog .filter-dialog-head { padding: 28px 32px 12px; }
.dialog-tools { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 18px 0; }
.dialog-actions { display: flex; justify-content: center; gap: 18px; padding: 14px 18px; border-top: 1px solid var(--line); background: #f8fafc; }
.filter-dialog-body { flex: 1 1 auto; padding: 10px 32px 22px; }
.condition-filter-dialog .filter-dialog-body { flex: 0 0 auto; padding: 8px 32px 0; overflow: visible; }
.filter-condition-row { display: grid; grid-template-columns: 150px 98px minmax(160px, 1fr) 28px; gap: 8px; align-items: start; margin-bottom: 10px; }
.condition-filter-dialog .filter-condition-row { grid-template-columns: minmax(150px, .9fr) 96px minmax(260px, 1.6fr) 30px; gap: 10px; margin-bottom: 12px; }
.filter-condition-row select,
.filter-condition-row input { width: 100%; height: 28px; min-height: 28px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; color: var(--text); font-size: 12px; }
.filter-value-wrap { position: relative; display: block; }
.filter-value-wrap input { padding-right: 32px; }
.filter-expand-btn { position: absolute; right: 2px; top: 2px; width: 24px; height: 24px; min-height: 24px; padding: 0; border: 0; background: transparent; color: #64748b; }
.filter-expand-btn:hover { color: var(--primary); background: #eff6ff; }
.filter-expand-btn .action-icon,
.filter-expand-btn .action-icon svg { width: 14px; height: 14px; min-width: 14px; }
.filter-condition-row textarea { grid-column: 3 / 4; display: none; min-height: 82px; resize: vertical; font-size: 12px; }
.filter-condition-row.is-expanded textarea { display: block; }
.condition-trash { width: 28px; min-width: 28px; height: 28px; min-height: 28px; }
.condition-trash .action-icon,
.condition-trash .action-icon svg { width: 16px; height: 16px; min-width: 16px; }
.filter-condition-tools { display: grid; grid-template-columns: 138px minmax(0, 1fr); gap: 24px; align-items: center; margin-top: 8px; }
.condition-filter-dialog .filter-condition-tools { grid-template-columns: 138px minmax(250px, 1fr); gap: 28px; margin-top: 2px; }
.filter-condition-tools .success { justify-content: center; }
.filter-and-note { color: #111827; font-size: 13px; font-style: italic; text-align: center; }
.condition-filter-dialog .filter-and-note { max-width: 320px; line-height: 1.25; }
.filter-dialog-actions { margin-top: auto; border-top: 0; background: #fff; padding: 20px 32px 14px; }
.filter-dialog-actions button { min-width: 120px; }
.condition-filter-dialog .filter-dialog-actions { margin-top: 0; padding: 16px 32px 22px; }
.conversion-update-head { border-bottom: 0; padding: 28px 32px 14px; }
.conversion-update-head h2 { margin: 0; color: #14303a; font-size: 24px; }
.conversion-update-body { flex: 1 1 auto; display: flex; flex-direction: column; gap: 18px; padding: 22px 32px 10px; }
.conversion-format { display: grid; gap: 8px; color: #1f2937; font-size: 13px; line-height: 1.35; }
.conversion-format p { margin: 0; }
.conversion-format code { display: block; color: #111827; font-family: inherit; white-space: normal; overflow-wrap: anywhere; }
.conversion-update-options { display: flex; gap: 18px; align-items: center; }
.conversion-update-options label { display: inline-flex; align-items: center; gap: 8px; color: #334155; font-size: 13px; }
.conversion-update-options input { width: 16px; height: 16px; padding: 0; }
.conversion-update-textarea { flex: 1 1 auto; min-height: 420px; width: 100%; padding: 12px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; line-height: 1.45; }
.conversion-logs-head { border-bottom: 0; padding: 28px 32px 14px; }
.conversion-logs-head h2 { margin: 0; color: #14303a; font-size: 24px; }
.conversion-logs-body { flex: 1 1 auto; display: flex; flex-direction: column; gap: 16px; padding: 18px 32px 10px; }
.conversion-logs-body p { margin: 0; color: #111827; font-size: 13px; }
.conversion-logs-filters { display: grid; grid-template-columns: minmax(180px, 1.05fr) minmax(220px, 1.05fr) minmax(110px, .35fr) minmax(120px, .4fr) 88px; gap: 8px; align-items: center; }
.conversion-logs-filters input,
.conversion-logs-filters select,
.conversion-logs-filters .date-range-control select { width: 100%; height: 28px; min-height: 28px; font-size: 12px; }
.conversion-logs-filters .date-range-control { width: 100%; }
.conversion-logs-filters button { height: 30px; min-height: 30px; }
.conversion-logs-table { border: 1px solid var(--line); background: #fff; min-height: 255px; display: flex; flex-direction: column; }
.conversion-logs-table .table-stack { border: 0; flex: 1 1 auto; }
.conversion-logs-table .table-wrap { min-height: 216px; border-bottom: 1px solid var(--line); }
.conversion-logs-table .pager { border-top: 0; }
.export-confirm-body { display: grid; align-content: start; gap: 18px; color: var(--muted); }
.export-summary { width: fit-content; display: flex; align-items: baseline; gap: 8px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafc; color: var(--text); }
.export-summary strong { font-size: 24px; }
.export-confirm-dialog .dialog-head,
.export-dialog .filter-dialog-head,
.export-conversions-dialog .filter-dialog-head { padding: 28px 32px 12px; }
.export-confirm-dialog .dialog-head h2,
.export-dialog .filter-dialog-head h2,
.export-conversions-dialog .filter-dialog-head h2 { white-space: nowrap; font-size: 24px; }
.export-confirm-dialog .filter-dialog-body,
.export-dialog .filter-dialog-body,
.export-conversions-dialog .filter-dialog-body { flex: 0 0 auto; padding: 6px 32px 0; }
.export-confirm-dialog .filter-dialog-actions,
.export-dialog .filter-dialog-actions,
.export-conversions-dialog .filter-dialog-actions { margin-top: 0; padding: 14px 32px 18px; }
.export-clicklog-body,
.export-conversions-body { display: flex; flex-direction: column; gap: 12px; min-height: 0; padding-top: 0; padding-bottom: 0; }
.export-clicklog-body > .export-multi-picker,
.export-clicklog-body > .date-range-control,
.export-conversions-body > .export-multi-picker,
.export-conversions-body > .date-range-control { margin: 0; }
.export-conversions-body > .date-range-control,
.export-conversions-body > .date-range-control select,
.export-conversions-body > .export-multi-picker,
.export-conversions-body > .export-multi-picker summary { width: 100%; }
.export-clicklog-body > .date-range-control select,
.export-clicklog-body > .export-multi-picker summary,
.export-conversions-body > .date-range-control select,
.export-conversions-body > .export-multi-picker summary { height: 30px; min-height: 30px; }
.export-controls-row { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr); gap: 12px; margin-bottom: 0; }
.export-controls-row .date-range-control,
.export-controls-row .date-range-control select { width: 100%; }
.export-campaign-picker { position: relative; }
.export-campaign-picker summary { height: 28px; min-height: 28px; display: flex; align-items: center; justify-content: space-between; padding: 0 34px 0 12px; border: 1px solid #cbd5e1; border-radius: 6px; color: var(--text); font-size: 12px; list-style: none; cursor: pointer; position: relative; }
.export-campaign-picker summary::-webkit-details-marker { display: none; }
.export-campaign-picker summary::after { content: none; }
.export-campaign-menu { position: absolute; z-index: 35; top: calc(100% + 4px); left: 0; width: min(400px, calc(100vw - 88px)); max-height: 500px; overflow: auto; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 24px 70px rgba(15,23,42,.24); }
.export-conversions-dialog .export-campaign-menu { width: min(500px, calc(100vw - 72px)); max-height: 500px; }
.export-select-all,
.export-campaign-group label { min-height: 28px; display: flex; align-items: center; gap: 8px; color: #334155; font-size: 12px; }
.export-group-list label,
.export-campaign-list label { min-height: 28px; display: flex; align-items: center; gap: 8px; color: #334155; font-size: 12px; }
.export-select-all input,
.export-campaign-group input,
.export-group-list input,
.export-campaign-list input { width: 14px; height: 14px; }
.export-select-all span,
.export-campaign-group label span,
.export-group-list label span { margin-left: auto; min-width: 22px; height: 18px; display: inline-grid; place-items: center; border-radius: 999px; background: #f1f5f9; color: #94a3b8; }
.export-campaign-group { padding: 6px 0; border-top: 1px solid var(--line); }
.export-group-list { padding: 4px 0 6px; }
.export-campaigns-head { padding-top: 8px; border-top: 1px solid var(--line); }
.export-show-groups { margin: 0 0 8px 22px; color: var(--primary); }
.export-warning { margin-top: 0; display: grid; gap: 4px; padding: 12px 20px; border-radius: 8px; background: linear-gradient(90deg, #ffb800, #ffd451); color: #111827; font-size: 13px; }
.export-warning strong { font-weight: 900; }
.export-dialog .export-campaign-picker,
.export-conversions-dialog .export-campaign-picker { margin: 0; }
.export-dialog .export-campaign-picker summary,
.export-dialog .date-range-control select,
.export-conversions-dialog .export-campaign-picker summary,
.export-conversions-dialog .date-range-control select { height: 30px; min-height: 30px; }
.export-dialog .date-range-control,
.export-conversions-dialog .date-range-control { height: 30px; align-items: center; margin: 0; }
.export-dialog #exportConditionRows { display: grid; gap: 12px; margin: 0; }
.export-dialog .filter-condition-row { margin-bottom: 0; }
.export-dialog .filter-condition-tools { margin-top: 0; }
.asset-chooser-overlay { z-index: 90; }
.asset-chooser-dialog { width: min(900px, calc(100vw - 28px)); max-height: 86vh; display: flex; flex-direction: column; overflow: hidden; }
.asset-chooser-body { min-height: 0; padding: 14px 22px 8px; display: flex; flex-direction: column; gap: 12px; }
.asset-chooser-filters { display: grid; grid-template-columns: minmax(130px, .9fr) minmax(130px, .9fr) minmax(130px, .9fr) minmax(260px, 2fr); gap: 10px; }
.asset-chooser-filters select,
.asset-chooser-filters input { width: 100%; }
.asset-chooser-table { min-height: 360px; max-height: 48vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.asset-chooser-table table { min-width: 760px; }
.asset-chooser-table th:first-child { width: 42px; }
.asset-chooser-table th .table-sort { justify-content: flex-start; }
.asset-chooser-table tr:has(input:checked) { background: #fde68a; }
.asset-chooser-table tr:has(input:checked):hover { background: #fcd34d; }
.icon-btn { width: 34px; min-width: 34px; padding: 0; line-height: 1; color: var(--muted); background: transparent; border: 0; border-radius: 6px; display: inline-grid; place-items: center; }
.icon-btn .action-icon,
.icon-btn .action-icon svg { width: 18px; height: 18px; min-width: 18px; }
.icon-btn:hover { background: #e2e8f0; color: var(--text); }
.offer-form { padding: 16px 18px 4px; grid-template-columns: 140px minmax(0, 1fr); }
.source-template-row,
.source-token-buttons {
  min-height: var(--dialog-control-height);
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}
#loadSourceTemplate {
  height: var(--dialog-control-height);
  min-height: var(--dialog-control-height);
}
.source-token-buttons button {
  min-width: 96px;
  height: var(--dialog-control-height);
  min-height: var(--dialog-control-height);
  justify-content: center;
}
.source-token-buttons button.ghost { background: #fff; }
.source-tag-picker { position: relative; margin: 0; }
.source-tag-picker summary { min-height: 34px; border: 1px solid #cbd5e1; border-radius: 6px; padding: 8px 34px 8px 10px; font-weight: 400; color: var(--muted); list-style: none; position: relative; }
.source-tag-picker summary::-webkit-details-marker { display: none; }
.source-tag-picker summary::after { content: none; }
.shared-tag-picker:focus-within summary,
.shared-choice-picker:focus-within summary,
.currency-picker:focus-within summary,
.export-campaign-picker:focus-within summary,
.source-tag-picker:focus-within summary {
  outline: 0;
  border-color: var(--control-focus);
  box-shadow: 0 0 0 2px var(--control-focus-ring);
}
.source-tag-menu { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; right: 0; max-height: 210px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 8px; background: #fff; box-shadow: 0 18px 50px rgba(15,23,42,.18); display: grid; gap: 4px; }
.source-tag-menu label { display: flex; align-items: center; gap: 8px; min-height: 28px; padding: 3px 6px; border-radius: 5px; }
.source-tag-menu label:hover { background: #f8fafc; }
.source-tag-menu input { width: 14px !important; height: 14px; }
.source-advanced-options { margin: 0; }
.source-advanced-options summary { color: var(--text); font-weight: 700; }
.source-advanced-block {
  grid-column: 1 / -1;
  display: grid;
  margin: 2px 0 0;
}
.source-advanced-block summary {
  width: fit-content;
  min-height: var(--dialog-control-height);
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}
.source-advanced-block summary::-webkit-details-marker { display: none; }
.source-advanced-block summary:focus,
.source-advanced-block summary:focus-visible {
  outline: 0;
  color: #075985;
}
.source-advanced-block summary::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1.7px solid currentColor;
  border-bottom: 1.7px solid currentColor;
  transform: rotate(45deg);
  margin-top: -3px;
}
.source-advanced-block[open] summary::after {
  transform: rotate(225deg);
  margin-top: 4px;
}
.source-advanced {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--dialog-form-row-gap);
  align-items: start;
  margin-top: 8px;
  padding: 10px 0 10px;
  border-top: 1px solid #e6edf5;
  border-bottom: 1px solid #e6edf5;
}
.source-setting-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: var(--dialog-form-column-gap);
  align-items: center;
  margin: 0;
  min-height: var(--dialog-control-height);
  padding: 0;
}
.source-setting-row > span {
  color: var(--text);
  text-align: right;
  line-height: 1.15;
  font-size: 12px;
  white-space: nowrap;
}
.source-setting-row input:not([type="checkbox"]) { width: 88px; }
.source-setting-row input[type="checkbox"] { width: 14px; height: 14px; justify-self: start; }
.source-setting-wide,
.source-setting-check { grid-template-columns: 150px minmax(0, 1fr); }
.source-setting-wide select { max-width: 270px; }
.source-setting-wide small {
  grid-column: 2;
  color: var(--muted);
  line-height: 1.35;
  font-size: 11px;
  max-width: 420px;
  margin-top: -6px;
}
.source-editor-dialog .source-setting-row {
  text-align: initial;
  font-weight: 400;
}
.source-editor-dialog .source-setting-row,
.source-editor-dialog .source-setting-row > span {
  padding-top: 0;
}
.source-editor-dialog .source-setting-row > input,
.source-editor-dialog .source-setting-row > select {
  justify-self: start;
}
.template-overlay { z-index: 120; }
.template-dialog {
  width: min(800px, calc(100vw - 28px));
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.template-dialog .dialog-head {
  padding: 26px 32px 14px;
}
.template-filterbar {
  display: grid;
  grid-template-columns: minmax(150px, 200px) minmax(150px, 200px) minmax(220px, 1fr);
  gap: 10px;
  padding: 10px 32px 8px;
}
.template-filterbar select,
.template-filterbar input {
  width: 100%;
  height: 30px;
}
.template-table-wrap {
  min-height: 360px;
  overflow: auto;
  margin: 0 32px 24px;
  border-top: 1px solid #e2e8f0;
}
.template-table {
  min-width: 720px;
  table-layout: fixed;
}
.template-table th,
.template-table td {
  height: 29px;
  padding: 0 8px;
  text-align: left;
}
.template-table th:nth-child(6),
.template-table td:nth-child(6) {
  width: 48px;
  text-align: center;
}
.template-table td button {
  width: 26px;
  min-width: 26px;
  padding: 0;
  font-weight: 900;
}
@media (max-width: 820px) {
  .source-advanced {
    padding-left: 0;
  }

  .source-setting-row,
  .source-setting-wide,
  .source-setting-check {
    grid-template-columns: 128px minmax(0, 1fr);
  }

  .source-setting-wide small {
    grid-column: 2;
    max-width: none;
  }
}
.source-token-table { margin-top: 12px; border-top: 1px solid var(--line); display: grid; gap: 6px; padding-top: 10px; }
.source-token-head, .source-token-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: center; }
.source-token-head { color: var(--muted); font-weight: 700; font-size: 12px; }

/* Shared modal system: standard rhythm for Track Kite operational dialogs. */
.dialog:not(.campaign-dialog):not(.conversion-update-dialog):not(.conversion-logs-dialog):not(.asset-chooser-dialog):not(.export-confirm-dialog):not(.export-dialog):not(.export-conversions-dialog) {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.dialog:not(.campaign-dialog):not(.conversion-update-dialog):not(.conversion-logs-dialog):not(.asset-chooser-dialog):not(.export-confirm-dialog):not(.export-dialog):not(.export-conversions-dialog) .dialog-head {
  flex: 0 0 auto;
  padding: 28px 32px 12px;
  border-bottom: 0;
}
.dialog:not(.campaign-dialog):not(.conversion-update-dialog):not(.conversion-logs-dialog):not(.asset-chooser-dialog):not(.export-confirm-dialog):not(.export-dialog):not(.export-conversions-dialog) .dialog-head h2 {
  margin: 0;
  color: #14303a;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: 0;
}
.dialog:not(.campaign-dialog):not(.conversion-update-dialog):not(.conversion-logs-dialog):not(.asset-chooser-dialog):not(.export-confirm-dialog):not(.export-dialog):not(.export-conversions-dialog) > .form,
.dialog:not(.campaign-dialog):not(.conversion-update-dialog):not(.conversion-logs-dialog):not(.asset-chooser-dialog):not(.export-confirm-dialog):not(.export-dialog):not(.export-conversions-dialog) > .filter-dialog-body {
  flex: 0 1 auto;
  overflow: auto;
  padding: 6px 32px 0;
}
.dialog:not(.campaign-dialog):not(.conversion-update-dialog):not(.conversion-logs-dialog):not(.asset-chooser-dialog):not(.export-confirm-dialog):not(.export-dialog):not(.export-conversions-dialog) > .offer-form {
  grid-template-columns: 150px minmax(0, 1fr);
}
.dialog:not(.campaign-dialog):not(.conversion-update-dialog):not(.conversion-logs-dialog):not(.asset-chooser-dialog):not(.export-confirm-dialog):not(.export-dialog):not(.export-conversions-dialog) .form {
  gap: var(--dialog-form-row-gap) var(--dialog-form-column-gap);
}
.dialog:not(.campaign-dialog):not(.conversion-update-dialog):not(.conversion-logs-dialog):not(.asset-chooser-dialog):not(.export-confirm-dialog):not(.export-dialog):not(.export-conversions-dialog) .form input:not([type="checkbox"]),
.dialog:not(.campaign-dialog):not(.conversion-update-dialog):not(.conversion-logs-dialog):not(.asset-chooser-dialog):not(.export-confirm-dialog):not(.export-dialog):not(.export-conversions-dialog) .form select,
.dialog:not(.campaign-dialog):not(.conversion-update-dialog):not(.conversion-logs-dialog):not(.asset-chooser-dialog):not(.export-confirm-dialog):not(.export-dialog):not(.export-conversions-dialog) .shared-tag-picker summary,
.dialog:not(.campaign-dialog):not(.conversion-update-dialog):not(.conversion-logs-dialog):not(.asset-chooser-dialog):not(.export-confirm-dialog):not(.export-dialog):not(.export-conversions-dialog) .shared-choice-picker summary,
.dialog:not(.campaign-dialog):not(.conversion-update-dialog):not(.conversion-logs-dialog):not(.asset-chooser-dialog):not(.export-confirm-dialog):not(.export-dialog):not(.export-conversions-dialog) .source-tag-picker summary {
  height: var(--dialog-control-height);
  min-height: var(--dialog-control-height);
}
.dialog:not(.campaign-dialog):not(.conversion-update-dialog):not(.conversion-logs-dialog):not(.asset-chooser-dialog):not(.export-confirm-dialog):not(.export-dialog):not(.export-conversions-dialog) details:not(.shared-tag-picker):not(.shared-choice-picker):not(.currency-picker):not(.export-campaign-picker):not(.source-tag-picker):not(.source-advanced-options) {
  margin: 12px 0;
}
.dialog:not(.campaign-dialog):not(.conversion-update-dialog):not(.conversion-logs-dialog):not(.asset-chooser-dialog):not(.export-confirm-dialog):not(.export-dialog):not(.export-conversions-dialog) .dialog-actions {
  flex: 0 0 auto;
  justify-content: center;
  gap: 18px;
  margin-top: 0;
  padding: 14px 32px 18px;
  border-top: 0;
  background: #fff;
}
.dialog:not(.campaign-dialog):not(.conversion-update-dialog):not(.conversion-logs-dialog):not(.asset-chooser-dialog):not(.export-confirm-dialog):not(.export-dialog):not(.export-conversions-dialog) .dialog-actions button {
  min-width: 120px;
  height: 34px;
}
.export-dialog .export-campaign-picker,
.export-conversions-dialog .export-campaign-picker,
.export-conversions-dialog .export-multi-picker,
.export-conversions-dialog .date-range-control {
  margin: 0;
}
.export-dialog .filter-dialog-body,
.export-conversions-dialog .filter-dialog-body {
  gap: 12px;
}
.source-token-row > span { color: var(--text); }
.source-token-row input:disabled { background: #f8fafc; color: var(--muted); }
.check-list { border: 1px solid var(--line); border-radius: 6px; overflow: auto; background: #fff; }
.check-list.tall { max-height: 420px; }
.check-row { display: flex; align-items: center; gap: 12px; min-height: 32px; padding: 6px 10px; border-bottom: 1px solid var(--line); font-size: 13px; }
.check-row:last-child { border-bottom: 0; }
.check-row:hover { background: #f8fafc; }
.check-row input { width: 14px; height: 14px; }
.tutorial-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.tutorial-step { border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: #f8fafc; min-height: 112px; display: flex; flex-direction: column; gap: 8px; }
.tutorial-step strong { color: var(--ink); font-size: 13px; }
.tutorial-step span { color: var(--muted); font-size: 12px; line-height: 1.45; }
.callout { margin-top: 12px; border-radius: 8px; padding: 12px 14px; font-size: 13px; line-height: 1.45; border: 1px solid var(--line); }
.callout.safe { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.callout.warn { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.source-badge { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 800; color: #1e40af; background: #dbeafe; }
.source-badge.enhanced { color: #065f46; background: #d1fae5; }
.option-note { margin: 10px 0 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafc; }
.option-note p { margin: 8px 0 4px; color: var(--text); line-height: 1.45; }
.option-note small { color: var(--muted); line-height: 1.45; display: block; }
.ledger-rules { display: grid; gap: 8px; margin-top: 12px; }
.ledger-rules span { border-left: 4px solid var(--primary); background: #f8fafc; padding: 10px 12px; border-radius: 6px; color: var(--muted); }
.restore-checklist { display: grid; gap: 8px; margin-top: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafc; font-size: 12px; color: var(--muted); }
.restore-checklist label { display: flex; gap: 8px; align-items: center; }
.restore-checklist input { width: 14px; height: 14px; }
.import-dialog-body textarea { min-height: 260px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.token-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.token-row button { height: 28px; font-size: 12px; }
.link-button { border: 0; background: transparent; color: #0087d8; min-height: 24px; padding: 0; justify-content: flex-start; font-size: 12px; }
.link-button:hover { text-decoration: underline; background: transparent; }
.offer-url-tools { margin-top: 10px; border-radius: 10px; background: #f8fafc; padding: 12px 16px; }
.offer-url-primary, .offer-token-list { display: flex; flex-wrap: wrap; gap: 8px; }
.offer-url-primary button, .offer-token-list button { min-height: 30px; height: 30px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; color: var(--text); padding: 0 10px; font-size: 12px; }
.offer-url-primary button.active, .offer-token-list button.active { border-color: #0087d8; background: #0087d8; color: #fff; }
.offer-token-panel { margin-top: 8px; display: grid; gap: 10px; max-height: 390px; overflow: auto; }
.offer-token-panel-head { display: grid; grid-template-columns: 1fr 160px; gap: 12px; align-items: center; color: var(--muted); font-size: 12px; }
.offer-token-panel .search-wrap { position: relative; margin: 0; }
.offer-token-panel .search-wrap input { width: 100%; padding-right: 34px; }
.offer-token-panel .search-wrap span { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: #64748b; font-size: 17px; font-weight: 700; line-height: 1; pointer-events: none; }
.offer-token-panel .search-wrap .action-icon,
.offer-token-panel .search-wrap svg { width: 16px; height: 16px; stroke: currentColor; }
.offer-token-list { align-content: start; max-height: 310px; overflow: auto; padding-right: 6px; }
.landing-editor-head { border-bottom: 0; padding: 28px 32px 14px; }
.landing-editor-head h2,
.landing-grab-head h2,
.landing-file-head h2 { color: #14303a; font-size: 24px; letter-spacing: 0; }
.dialog.landing-dialog { width: min(700px, calc(100vw - 28px)); }
.landing-editor-form { padding-top: 18px; grid-template-columns: 126px minmax(0, 1fr); align-items: start; }
.landing-editor-form > label { text-align: right; font-weight: 650; color: #06203c; padding-top: 7px; }
.landing-url-label { display: flex; align-items: center; justify-content: flex-end; gap: 4px; padding-top: 3px; }
.landing-url-label .link-button { min-height: 20px; color: var(--text); font-weight: 650; }
.landing-url-label .link-button:not(.active) { color: #8a9aaf; border-bottom: 1px dashed #8a9aaf; border-radius: 0; }
.landing-url-block { display: grid; gap: 6px; min-width: 0; }
.landing-url-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-height: 20px; color: #a0aec0; font-size: 12px; }
.landing-url-actions .link-button { color: #8a9aaf; min-height: 20px; }
.landing-token-tools { margin-top: 4px; padding: 12px 16px; background: #f7f7f8; border-radius: 10px; }
.landing-source-cards { margin-top: 12px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.landing-source-cards button { min-height: 84px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; color: var(--text); display: grid; place-items: center; align-content: center; gap: 8px; font-weight: 650; }
.landing-source-cards button:hover { border-color: var(--control-focus); box-shadow: 0 0 0 2px var(--control-focus-ring); }
.landing-source-cards .action-icon,
.landing-source-cards svg { width: 17px; height: 17px; color: #8a9aaf; stroke: currentColor; }
.lander-note-row .standard-note-rich { min-height: 170px; }
.dialog.landing-file-dialog { width: min(800px, calc(100vw - 28px)); min-height: 640px; display: flex; flex-direction: column; }
.landing-file-body { padding: 12px 32px 0; display: flex; flex-direction: column; gap: 12px; min-height: 0; flex: 1 1 auto; }
.landing-file-body .table-stack { min-height: 420px; }
.landing-file-path { margin-top: auto; padding: 12px 0 0; color: var(--text); border-top: 1px solid var(--line); }
.landing-qr-body { padding: 6px 32px 0; }
.landing-qr-body input { width: 100%; }
.landing-grab-form { grid-template-columns: 110px minmax(0, 1fr); padding-top: 18px; align-items: start; }
.landing-grab-form > label { text-align: right; font-weight: 650; color: #06203c; padding-top: 7px; }
.landing-segmented { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.landing-segmented button { min-height: 30px; height: 30px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; color: #334155; padding: 0 10px; }
.landing-segmented button.active { background: #008ee6; border-color: #008ee6; color: #fff; }
.landing-code-textarea { min-height: 210px; margin-top: 10px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
@media (max-width: 760px) {
  .landing-editor-form,
  .landing-grab-form { grid-template-columns: 1fr; }
  .landing-editor-form > label,
  .landing-grab-form > label,
  .landing-url-label { text-align: left; justify-content: flex-start; }
  .landing-source-cards { grid-template-columns: 1fr; }
}
.hidden { display: none !important; }
.bars { height: 210px; display: flex; align-items: end; gap: 8px; padding: 18px 10px 34px; border: 1px solid var(--line); border-radius: 8px; background: linear-gradient(#fff, #f8fafc); overflow: auto; }
.bar { min-width: 32px; background: linear-gradient(180deg, #7dd3fc, #0ea5e9); border-radius: 4px 4px 0 0; position: relative; }
.bar span { position: absolute; bottom: -24px; left: 50%; transform: translateX(-50%); color: var(--muted); font-size: 11px; white-space: nowrap; }
.monitor-card { width: min(820px, 100%); margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 18px; box-shadow: 0 10px 24px rgba(15,23,42,.06); }
.domain-panel { width: min(1060px, 100%); margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 18px; box-shadow: 0 10px 24px rgba(15,23,42,.06); }
.domain-panel > h2 { text-align: center; margin-top: 0; }
.domain-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; white-space: nowrap; }
.domain-action-btn { width: 28px; min-width: 28px; height: 28px; min-height: 28px; padding: 0; display: inline-grid; place-items: center; border: 0; border-radius: 6px; background: transparent; color: #94a3b8; }
.domain-action-btn:hover { background: #eef2f7; color: var(--text); }
.domain-action-btn.is-default { color: #f5b800; }
.domain-action-btn.is-default .action-icon svg { fill: rgba(245, 184, 0, .18); }
.domain-action-btn.danger:hover { background: #fee2e2; color: var(--danger); }
.domain-action-btn .action-icon,
.domain-action-btn .action-icon svg { width: 16px; height: 16px; min-width: 16px; }
.groups-page { display: grid; gap: 14px; padding: 2px 2px 0; }
.groups-tabs { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; padding: 0 10px 8px; }
.groups-tabs button { height: 30px; min-height: 30px; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--text); font-weight: 500; }
.groups-tabs button.active { color: var(--primary); border-bottom: 2px solid var(--primary); }
.groups-table-shell { background: #f7f7f8; border-radius: 8px; padding: 14px 16px 16px; }
.groups-table-shell .table-stack { border: 0; border-radius: 0; background: transparent; }
.groups-table-shell .table-wrap { background: transparent; }
.groups-table-shell table { min-width: 620px; background: #fff; }
.groups-table-shell th { background: #f7f7f8; }
.groups-table-shell td,
.groups-table-shell th { text-align: left; }
.groups-table-shell td:nth-child(2),
.groups-table-shell th:nth-child(2) { text-align: left; }
.groups-table-shell td:last-child,
.groups-table-shell th:last-child { text-align: center; }
.group-actions { display: inline-flex; align-items: center; justify-content: center; gap: 14px; }
.group-action-btn { width: 28px; min-width: 28px; height: 28px; min-height: 28px; padding: 0; display: inline-grid; place-items: center; border: 0; border-radius: 6px; background: transparent; color: #0f2d4a; }
.group-action-btn:hover { background: #eef2f7; color: var(--primary); }
.group-action-btn.danger:hover { background: #fee2e2; color: var(--danger); }
.group-action-btn .action-icon,
.group-action-btn .action-icon svg { width: 16px; height: 16px; min-width: 16px; }
.groups-empty { min-height: 44px; display: flex; align-items: center; color: var(--text); font-size: 16px; }
.groups-add-row { display: flex; align-items: center; gap: 8px; padding: 0 0 6px; }
.groups-add-row input { width: 184px; }
.groups-add-row .success { min-width: 118px; }
.loadbar { display: inline-block; width: 180px; height: 18px; background: #e2e8f0; vertical-align: middle; margin-right: 8px; }
.loadbar i { display: block; height: 100%; background: var(--success); }
.monitor-bars { margin-top: 20px; }
.settings-card { width: min(980px, 100%); margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 18px; }
.settings-card.wide-settings { width: min(1320px, 100%); }
.settings-card > h2 { text-align: center; margin-top: 0; }
.settings-body { padding: 16px 4px 4px; }
.settings-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 26px; align-items: start; }
.settings-side { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 84px; border-right: 1px solid var(--line); padding-right: 12px; }
.settings-side button { justify-content: flex-start; border: 0; background: transparent; color: var(--text); text-align: left; min-height: 34px; }
.settings-side button.active { color: var(--primary); background: #eff6ff; }
.code-textarea { min-height: 420px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; background: #f8fafc; color: #0f172a; }
.condition-row { display: grid; grid-template-columns: 1.1fr .9fr .9fr minmax(160px, 2fr) 40px; gap: 8px; align-items: center; margin-bottom: 8px; }
.tag-manager-row { grid-template-columns: 1.2fr 120px 1fr 90px; }
.color-swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--line); padding: 0; }
@media (max-width: 900px) {
  .settings-layout { grid-template-columns: 1fr; }
  .settings-side { position: static; border-right: 0; border-bottom: 1px solid var(--line); padding-right: 0; padding-bottom: 10px; }
  .condition-row { grid-template-columns: 1fr; }
}
.settings-wide { max-width: 760px; margin: 0 auto; }
.qr { width: 260px; aspect-ratio: 1; display: grid; place-items: center; margin: 28px auto; color: #0f172a; font-weight: 900; text-align: center; background:
  linear-gradient(90deg, #000 10px, transparent 10px) 0 0/24px 24px,
  linear-gradient(#000 10px, transparent 10px) 0 0/24px 24px,
  #fff; border: 14px solid #fff; box-shadow: inset 0 0 0 10px #000; }
.warning-box { margin-top: 18px; border-left: 4px solid var(--warning); background: #fff7ed; padding: 14px; color: #92400e; }
#toast { position: fixed; right: 16px; bottom: 16px; background: #0f172a; color: #fff; border-radius: 8px; padding: 12px 14px; opacity: 0; transform: translateY(80px); transition: .18s; }
#toast.show { opacity: 1; transform: translateY(0); }
@media (max-width: 1000px) { body { grid-template-columns: 1fr; height: auto; overflow: auto; } .sidebar { position: static; height: auto; } main { height: auto; overflow: visible; } .metrics, .two, .editor-grid, .tutorial-grid { grid-template-columns: 1fr; } .editor-pane { border-right: 0; border-bottom: 1px solid var(--line); } .pager { align-items: flex-start; flex-direction: column; } }

/* Track Kite visual polish: appearance-only layer. */
:root {
  --tk-ink: #082032;
  --tk-ink-2: #123047;
  --tk-sky: #0ea5e9;
  --tk-sky-soft: #e7f7ff;
  --tk-mint: #34d399;
  --tk-mint-soft: #dcfce7;
  --tk-panel: #ffffff;
  --tk-line: #d8e5ef;
  --tk-soft: #f4f9fc;
  --tk-shadow: 0 18px 42px rgba(8,32,50,.08);
}
body { background: radial-gradient(circle at top left, rgba(14,165,233,.08), transparent 300px), #f6fafc; }
.sidebar { background: linear-gradient(180deg, #06192a 0%, #082032 48%, #061625 100%); box-shadow: inset -1px 0 0 rgba(255,255,255,.06); }
.brand { min-height: 64px; border-bottom-color: rgba(125,211,252,.16); }
.brand strong { color: #fff; font-size: 15px; }
.brand span { color: #9fb2c5; }
.nav-section { color: #7f94aa; }
.nav { min-height: 36px; border: 1px solid transparent; }
.nav-icon { background: rgba(125,211,252,.08); color: #9bdcff; }
.nav:hover { background: rgba(14,165,233,.14); border-color: rgba(125,211,252,.12); }
.nav.active { background: linear-gradient(135deg, #0ea5e9, #0891b2); border-color: rgba(255,255,255,.16); box-shadow: 0 10px 24px rgba(14,165,233,.22); }
.topbar { background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom-color: var(--tk-line); }
h1, h2 { color: var(--tk-ink); }
#subtitle { color: #6d7f91; }
#content { background: transparent; }
.card, .overview-panel, .monitor-card, .domain-panel, .settings-card {
  border-color: var(--tk-line);
  background: var(--tk-panel);
  box-shadow: 0 14px 32px rgba(8,32,50,.055);
}
button, .button, input, select, textarea,
.shared-tag-picker summary,
.shared-choice-picker summary,
.currency-picker summary,
.export-campaign-picker summary,
.source-tag-picker summary {
  border-color: #c9d8e5;
  color: var(--tk-ink);
}
button:hover, .button:hover { border-color: #9ecfe8; }
.primary, button.primary, .tabs button.active {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  border-color: #0ea5e9;
  color: #fff;
  box-shadow: 0 8px 18px rgba(14,165,233,.16);
}
.success, button.success {
  background: linear-gradient(135deg, #8ef0c5, #5eead4);
  border-color: #8ef0c5;
  color: #064e3b;
  box-shadow: 0 8px 18px rgba(16,185,129,.12);
}
.ghost, button.ghost, .button.ghost {
  background: #f7fbfd;
  border-color: #cbdbea;
  color: #17324a;
}
.ghost:hover, button.ghost:hover, .button.ghost:hover { background: #edf7fc; }
.tabs {
  gap: 8px;
  padding: 4px;
  border: 1px solid var(--tk-line);
  border-radius: 8px;
  background: #fff;
  width: max-content;
  max-width: 100%;
}
.tabs button { border-color: transparent; background: transparent; color: #496174; }
.tabs button:hover { background: var(--tk-sky-soft); border-color: transparent; }
.v2-list-toolbar {
  padding: 10px;
  border: 1px solid var(--tk-line);
  border-radius: 8px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 10px 26px rgba(8,32,50,.045);
}
.table-stack { border-color: var(--tk-line); }
th {
  background: linear-gradient(180deg, #f8fbfd, #eef6fb);
  color: #31475b;
}
td { color: #10273c; }
tbody tr:nth-child(even):not(.profit-row):not(.loss-row) { background: #fbfdff; }
tbody tr:has(input[type="checkbox"]:checked) { background: #e4f8ef; }
tbody tr:has(input[type="checkbox"]:checked):hover { background: #d5f5e5; }
.tag, .tag-chip, .status-pill {
  border-radius: 6px;
  font-weight: 750;
}
.code, .code-textarea {
  background: #f7fbfd;
  border-color: var(--tk-line);
  border-left-color: var(--tk-sky);
}
.overlay { background: rgba(8,20,33,.58); backdrop-filter: blur(3px); }
.dialog {
  border: 1px solid rgba(216,229,239,.95);
  border-radius: 18px;
  box-shadow: 0 28px 90px rgba(8,20,33,.32);
}
.dialog-head {
  min-height: 68px;
  padding: 18px 28px;
  background: linear-gradient(180deg, #fff, #f8fbfd);
  border-bottom-color: var(--tk-line);
}
.dialog-head h2 { font-size: 24px; color: #15313d; }
.dialog-actions {
  background: linear-gradient(180deg, #fff, #f7fbfd);
  border-top-color: var(--tk-line);
}
.dialog-actions button { min-width: 120px; }
.dialog.campaign-dialog .editor-head {
  background: linear-gradient(180deg, #fff, #f8fbfd);
  border-bottom-color: var(--tk-line);
}
.dialog.campaign-dialog .editor-pane:last-child { background: #f7fbfd; }
.dialog.campaign-dialog .flow-box,
.dialog.campaign-dialog .path-editor,
.campaign-integration-card,
.campaign-users-panel {
  background: #fff;
  border-color: var(--tk-line);
  box-shadow: 0 10px 24px rgba(8,32,50,.045);
}
.campaign-section summary,
.dialog.campaign-dialog .form.dense > label,
.campaign-users-section > label,
.campaign-card-form label {
  color: #113149;
}
.campaign-section summary:hover { color: var(--tk-sky); }
.new-badge {
  background: #dff8ee;
  color: #047857;
  border: 1px solid #b8efd8;
}
.standard-note-rich,
.standard-note-textarea,
.notes {
  border-color: #c9d8e5;
  background: linear-gradient(180deg, #fff, #fbfdff);
}
.note-tools {
  padding: 2px 0;
  border-bottom: 1px solid transparent;
}
.note-tool-btn:hover { background: var(--tk-sky-soft); color: #075985; }
.landing-source-cards button {
  border-color: var(--tk-line);
  background: linear-gradient(180deg, #fff, #f8fbfd);
  box-shadow: 0 8px 20px rgba(8,32,50,.045);
}
.landing-source-cards button:hover {
  border-color: #7dd3fc;
  box-shadow: 0 12px 26px rgba(14,165,233,.13);
}
.groups-table-shell {
  background: linear-gradient(180deg, #f7fbfd, #eef7fb);
  border: 1px solid var(--tk-line);
}
.settings-side button {
  border-radius: 7px;
  color: #31475b;
}
.settings-side button.active {
  background: var(--tk-sky-soft);
  color: #0369a1;
  font-weight: 800;
}
@media (max-width: 1000px) {
  .tabs { width: 100%; }
  .dialog { border-radius: 14px; }
}

/* Track Kite 2.1.1 tech palette: appearance-only, no workflow changes. */
:root {
  --bg: #f3f7f8;
  --line: #d4e2e5;
  --nav: #101820;
  --primary: #00a7c7;
  --success: #9be15d;
  --control-focus: #22c7d8;
  --control-focus-ring: rgba(34,199,216,.18);
  --tk-carbon: #101820;
  --tk-carbon-2: #18242d;
  --tk-electric: #00a7c7;
  --tk-electric-2: #22c7d8;
  --tk-lime: #9be15d;
  --tk-lime-2: #c7f36f;
  --tk-amber: #f7b733;
  --tk-surface: #ffffff;
  --tk-surface-2: #f7fafb;
  --tk-border: #cfdee2;
}
body {
  background:
    linear-gradient(135deg, rgba(0,167,199,.08), transparent 34%),
    linear-gradient(315deg, rgba(155,225,93,.09), transparent 28%),
    #f3f7f8;
}
.sidebar {
  background:
    linear-gradient(180deg, rgba(34,199,216,.08), transparent 28%),
    linear-gradient(180deg, #101820 0%, #111d26 55%, #0b131a 100%);
}
.brand { border-bottom-color: rgba(34,199,216,.2); }
.brand-logo {
  background-color: #f8feff;
  box-shadow: 0 0 0 1px rgba(34,199,216,.28), 0 10px 24px rgba(0,167,199,.18);
}
.nav-icon {
  background: rgba(255,255,255,.055);
  color: #8ee9f2;
}
.nav:hover {
  background: rgba(34,199,216,.12);
  border-color: rgba(34,199,216,.22);
}
.nav.active {
  background: linear-gradient(135deg, #00a7c7 0%, #13d6c8 100%);
  color: #061419;
  border-color: rgba(199,243,111,.35);
  box-shadow: 0 12px 28px rgba(0,167,199,.32);
}
.nav.active .nav-icon {
  background: rgba(6,20,25,.16);
  color: #061419;
}
.topbar {
  background:
    linear-gradient(90deg, rgba(16,24,32,.04), transparent 42%),
    rgba(255,255,255,.94);
  border-bottom-color: #cfdee2;
}
h1 { color: #101820; font-weight: 850; }
.compact-btn,
button,
.button {
  border-radius: 8px;
  transition: border-color .14s ease, box-shadow .14s ease, background .14s ease, transform .14s ease;
}
button:hover,
.button:hover {
  transform: translateY(-1px);
}
button:active,
.button:active {
  transform: translateY(0);
}
.primary,
button.primary,
.v2-list-toolbar .primary,
.tabs button.active,
.landing-segmented button.active,
.segmented-control button.active,
.offer-url-primary button.active,
.offer-token-list button.active {
  background: linear-gradient(135deg, #00a7c7 0%, #22c7d8 100%);
  border-color: #00a7c7;
  color: #061419;
  box-shadow: 0 10px 22px rgba(0,167,199,.24);
  font-weight: 850;
}
.primary:hover,
button.primary:hover,
.v2-list-toolbar .primary:hover {
  background: linear-gradient(135deg, #0092af 0%, #17b9ca 100%);
  border-color: #0092af;
  color: #031014;
  box-shadow: 0 12px 26px rgba(0,167,199,.3);
}
.success,
button.success,
.v2-list-toolbar .success {
  background: linear-gradient(135deg, #9be15d 0%, #c7f36f 100%);
  border-color: #9be15d;
  color: #14230b;
  box-shadow: 0 10px 22px rgba(155,225,93,.25);
  font-weight: 850;
}
.success:hover,
button.success:hover,
.v2-list-toolbar .success:hover {
  background: linear-gradient(135deg, #8bd84d 0%, #baf060 100%);
  border-color: #8bd84d;
  color: #101d08;
  box-shadow: 0 12px 26px rgba(155,225,93,.32);
}
.ghost,
button.ghost,
.button.ghost,
.v2-list-toolbar .ghost {
  background: linear-gradient(180deg, #ffffff, #edf4f6);
  border-color: #c8d8dd;
  color: #1c303b;
  box-shadow: 0 5px 13px rgba(16,24,32,.055);
}
.ghost:hover,
button.ghost:hover,
.button.ghost:hover,
.v2-list-toolbar .ghost:hover {
  background: linear-gradient(180deg, #f8feff, #e6f7fb);
  border-color: #7ccfdd;
  color: #0a5565;
}
input,
select,
textarea,
.shared-tag-picker summary,
.shared-choice-picker summary,
.currency-picker summary,
.export-campaign-picker summary,
.source-tag-picker summary {
  border-color: #c6d7dc;
  background-color: #fff;
  border-radius: 8px;
}
select,
.shared-tag-picker summary,
.shared-choice-picker summary,
.currency-picker summary,
.export-campaign-picker summary,
.source-tag-picker summary {
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.25 4.75L6 7.5L8.75 4.75' stroke='%2300A7C7' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.card,
.overview-panel,
.monitor-card,
.domain-panel,
.settings-card,
.table-stack,
.v2-list-toolbar {
  border-color: var(--tk-border);
  box-shadow: 0 14px 34px rgba(16,24,32,.065);
}
.overview-hero {
  border-color: rgba(34,199,216,.34);
  background:
    linear-gradient(135deg, rgba(16,24,32,.96), rgba(0,167,199,.82) 58%, rgba(155,225,93,.68)),
    url("/images/track-kite-logo-horizontal-dark.png") right 18px center / auto 82% no-repeat;
  box-shadow: 0 24px 56px rgba(16,24,32,.2);
}
.overview-domain {
  background: rgba(16,24,32,.42);
  border-color: rgba(199,243,111,.28);
}
.overview-metric strong,
.overview-panel-head h2 {
  color: #101820;
}
.overview-action {
  background: linear-gradient(180deg, #fff, #f3fafb);
  border-color: #cfdee2;
}
.overview-action .action-icon { color: #00a7c7; }
.overview-action:hover {
  border-color: #22c7d8;
  box-shadow: 0 14px 30px rgba(0,167,199,.16);
}
.report-command-panel {
  border-color: rgba(34,199,216,.32);
  background:
    radial-gradient(circle at right top, rgba(199,243,111,.28), transparent 280px),
    linear-gradient(135deg, #101820 0%, #12323b 58%, #005f73 100%);
  box-shadow: 0 24px 60px rgba(16,24,32,.24);
}
.report-stat {
  background: rgba(255,255,255,.095);
  border-color: rgba(199,243,111,.18);
}
.report-stat strong { color: #f8feff; }
.report-stat.money strong,
.report-stat.profit strong { color: #c7f36f; }
.report-chip {
  background: linear-gradient(180deg, #fff, #f2f8fa);
  border-color: #cfdee2;
}
.report-chip span { background: #f7b733; }
.report-chip:nth-of-type(4n) span { background: #00a7c7; }
.report-chip:nth-of-type(4n + 1) span { background: #9be15d; }
.report-chip:nth-of-type(4n + 2) span { background: #f7b733; }
.report-chip.active {
  background: linear-gradient(135deg, #e6fbff, #efffde);
  border-color: #22c7d8;
  color: #075061;
  box-shadow: 0 8px 18px rgba(0,167,199,.16);
}
th {
  background: linear-gradient(180deg, #f8fbfc, #eaf2f4);
  color: #263d48;
}
.table-sort:hover,
th.sorted .sort-indicator {
  color: #00a7c7;
}
tbody tr:has(input[type="checkbox"]:checked) {
  background: #eefdde;
  box-shadow: inset 3px 0 0 #9be15d;
}
tbody tr:has(input[type="checkbox"]:checked):hover { background: #e4facb; }
.dialog {
  border-color: rgba(207,222,226,.96);
  box-shadow: 0 32px 100px rgba(16,24,32,.36);
}
.dialog-head {
  background:
    linear-gradient(90deg, rgba(0,167,199,.08), transparent 45%),
    linear-gradient(180deg, #fff, #f4fafb);
}
.dialog-head h2 { color: #101820; }
.dialog-actions {
  background:
    linear-gradient(90deg, rgba(155,225,93,.1), transparent 40%),
    #f7fafb;
}
.dialog.campaign-dialog .editor-pane:last-child,
.dialog.campaign-dialog .editor-head {
  background: linear-gradient(180deg, #fbfeff, #f4fafb);
}
.dialog.campaign-dialog .flow-box,
.dialog.campaign-dialog .path-editor,
.campaign-integration-card,
.campaign-users-panel,
.landing-source-cards button,
.groups-table-shell {
  border-color: #cfdee2;
}
.new-badge {
  background: #efffde;
  color: #416d12;
  border-color: #c7f36f;
}
.switchline input:checked + span,
.toggle.on {
  background: linear-gradient(135deg, #9be15d, #c7f36f);
}
.standard-note-label,
.dialog.campaign-dialog h3 {
  color: #6c828c;
}
.note-tool-btn { color: #78909b; }
.note-tool-btn:hover {
  background: #e6fbff;
  color: #007f98;
}
.groups-tabs button.active {
  color: #007f98;
  border-bottom-color: #00a7c7;
}
.settings-side button.active {
  background: #e6fbff;
  color: #007f98;
}
#toast {
  background: #101820;
  border: 1px solid rgba(34,199,216,.28);
  box-shadow: 0 18px 40px rgba(16,24,32,.28);
}

/* Track Kite 2.1.2 refined palette: restrained commercial tech look. */
:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --line: #dbe3ee;
  --text: #111827;
  --muted: #64748b;
  --nav: #111827;
  --primary: #2563eb;
  --success: #16a34a;
  --warning: #d97706;
  --control-focus: #60a5fa;
  --control-focus-ring: rgba(37,99,235,.14);
  --tk-carbon: #111827;
  --tk-carbon-2: #1f2937;
  --tk-electric: #2563eb;
  --tk-electric-2: #3b82f6;
  --tk-lime: #16a34a;
  --tk-lime-2: #22c55e;
  --tk-amber: #d97706;
  --tk-surface: #ffffff;
  --tk-surface-2: #f8fafc;
  --tk-border: #dbe3ee;
  --tk-shadow: 0 16px 38px rgba(15,23,42,.08);
}
body {
  background:
    radial-gradient(circle at 0% 0%, rgba(37,99,235,.07), transparent 330px),
    linear-gradient(180deg, #f8fafc, #f3f6fb);
  color: #111827;
}
.sidebar {
  background: linear-gradient(180deg, #111827 0%, #172033 54%, #0f172a 100%);
}
.brand {
  border-bottom-color: rgba(148,163,184,.18);
}
.brand-logo {
  background-color: #fff;
  box-shadow: 0 0 0 1px rgba(148,163,184,.2), 0 10px 22px rgba(15,23,42,.22);
}
.brand strong { color: #f8fafc; }
.brand span,
.nav-section { color: #94a3b8; }
.nav {
  color: #cbd5e1;
  border-radius: 8px;
}
.nav-icon {
  background: rgba(148,163,184,.1);
  color: #bfdbfe;
}
.nav:hover {
  background: rgba(59,130,246,.14);
  border-color: rgba(96,165,250,.2);
  color: #f8fafc;
}
.nav.active {
  background: #2563eb;
  color: #fff;
  border-color: rgba(255,255,255,.12);
  box-shadow: 0 10px 24px rgba(37,99,235,.28);
}
.nav.active .nav-icon {
  background: rgba(255,255,255,.16);
  color: #fff;
}
.topbar {
  background: rgba(255,255,255,.96);
  border-bottom-color: #dbe3ee;
  box-shadow: 0 10px 28px rgba(15,23,42,.045);
}
h1,
h2,
.overview-panel-head h2,
.overview-metric strong { color: #111827; }
#subtitle { color: #64748b; }
.card,
.overview-panel,
.monitor-card,
.domain-panel,
.settings-card,
.table-stack,
.v2-list-toolbar {
  border-color: #dbe3ee;
  background: #fff;
  box-shadow: 0 14px 32px rgba(15,23,42,.055);
}
button,
.button,
input,
select,
textarea,
.shared-tag-picker summary,
.shared-choice-picker summary,
.currency-picker summary,
.export-campaign-picker summary,
.source-tag-picker summary {
  border-color: #cbd5e1;
  color: #111827;
  border-radius: 7px;
  box-shadow: none;
}
button:hover,
.button:hover {
  transform: none;
}
.primary,
button.primary,
.v2-list-toolbar .primary,
.tabs button.active,
.landing-segmented button.active,
.segmented-control button.active,
.offer-url-primary button.active,
.offer-token-list button.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
  box-shadow: 0 8px 18px rgba(37,99,235,.2);
  font-weight: 800;
}
.primary:hover,
button.primary:hover,
.v2-list-toolbar .primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
  box-shadow: 0 10px 22px rgba(37,99,235,.24);
}
.success,
button.success,
.v2-list-toolbar .success {
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
  box-shadow: 0 8px 18px rgba(22,163,74,.18);
  font-weight: 800;
}
.success:hover,
button.success:hover,
.v2-list-toolbar .success:hover {
  background: #15803d;
  border-color: #15803d;
  color: #fff;
  box-shadow: 0 10px 22px rgba(22,163,74,.22);
}
.ghost,
button.ghost,
.button.ghost,
.v2-list-toolbar .ghost {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #334155;
  box-shadow: none;
}
.ghost:hover,
button.ghost:hover,
.button.ghost:hover,
.v2-list-toolbar .ghost:hover {
  background: #eef2f7;
  border-color: #94a3b8;
  color: #111827;
}
select,
.shared-tag-picker summary,
.shared-choice-picker summary,
.currency-picker summary,
.export-campaign-picker summary,
.source-tag-picker summary {
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.25 4.75L6 7.5L8.75 4.75' stroke='%2364758B' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.overview-hero {
  border-color: #bfdbfe;
  background:
    linear-gradient(135deg, rgba(17,24,39,.94), rgba(30,64,175,.86)),
    url("/images/track-kite-logo-horizontal-dark.png") right 18px center / auto 82% no-repeat;
  box-shadow: 0 22px 52px rgba(15,23,42,.18);
}
.overview-domain {
  background: rgba(15,23,42,.38);
  border-color: rgba(219,234,254,.25);
}
.overview-action {
  background: #fff;
  border-color: #dbe3ee;
}
.overview-action .action-icon { color: #2563eb; }
.overview-action:hover {
  border-color: #93c5fd;
  box-shadow: 0 12px 28px rgba(37,99,235,.11);
}
.report-command-panel {
  border-color: rgba(147,197,253,.32);
  background:
    linear-gradient(135deg, #111827 0%, #1e3a8a 68%, #0f766e 100%);
  box-shadow: 0 22px 54px rgba(15,23,42,.22);
}
.report-stat {
  background: rgba(255,255,255,.09);
  border-color: rgba(219,234,254,.18);
}
.report-stat.money strong,
.report-stat.profit strong { color: #86efac; }
.report-chip {
  background: #fff;
  border-color: #dbe3ee;
  box-shadow: 0 4px 12px rgba(15,23,42,.035);
}
.report-chip span,
.report-chip:nth-of-type(4n) span,
.report-chip:nth-of-type(4n + 1) span,
.report-chip:nth-of-type(4n + 2) span {
  background: #94a3b8;
}
.report-chip.active {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
  box-shadow: 0 8px 18px rgba(37,99,235,.12);
}
th {
  background: #f8fafc;
  color: #334155;
}
.table-sort:hover,
th.sorted .sort-indicator { color: #2563eb; }
tbody tr:nth-child(even):not(.profit-row):not(.loss-row) { background: #fbfdff; }
tbody tr:has(input[type="checkbox"]:checked) {
  background: #ecfdf5;
  box-shadow: inset 3px 0 0 #16a34a;
}
tbody tr:has(input[type="checkbox"]:checked):hover { background: #dcfce7; }
.dialog {
  border-color: #dbe3ee;
  border-radius: 14px;
  box-shadow: 0 30px 88px rgba(15,23,42,.28);
}
.dialog-head {
  background: #fff;
  border-bottom-color: #e2e8f0;
}
.dialog-actions {
  background: #f8fafc;
  border-top-color: #e2e8f0;
}
.dialog.campaign-dialog .editor-head,
.dialog.campaign-dialog .editor-pane:last-child {
  background: #f8fafc;
}
.dialog.campaign-dialog .flow-box,
.dialog.campaign-dialog .path-editor,
.campaign-integration-card,
.campaign-users-panel,
.landing-source-cards button,
.groups-table-shell {
  border-color: #dbe3ee;
  box-shadow: 0 10px 24px rgba(15,23,42,.045);
}
.new-badge {
  background: #dcfce7;
  color: #166534;
  border-color: #bbf7d0;
}
.switchline input:checked + span,
.toggle.on { background: #22c55e; }
.note-tool-btn:hover {
  background: #eff6ff;
  color: #1d4ed8;
}
.groups-tabs button.active {
  color: #2563eb;
  border-bottom-color: #2563eb;
}
.settings-side button.active {
  background: #eff6ff;
  color: #1d4ed8;
}
#toast {
  background: #111827;
  border-color: rgba(148,163,184,.28);
  box-shadow: 0 18px 40px rgba(15,23,42,.26);
}

/* Track Kite 2.1.3 launch skin: distinctive product shell, CSS-only. */
:root {
  --bg: #f4f6fb;
  --panel: #ffffff;
  --line: #d8dfeb;
  --text: #111827;
  --muted: #667085;
  --nav: #0b1020;
  --primary: #4f46e5;
  --success: #059669;
  --warning: #b7791f;
  --danger: #dc2626;
  --control-focus: #818cf8;
  --control-focus-ring: rgba(79,70,229,.16);
  --tk-carbon: #0b1020;
  --tk-carbon-2: #141b34;
  --tk-electric: #4f46e5;
  --tk-electric-2: #6366f1;
  --tk-lime: #059669;
  --tk-lime-2: #10b981;
  --tk-amber: #b7791f;
  --tk-surface: #ffffff;
  --tk-surface-2: #f8fafc;
  --tk-border: #d8dfeb;
  --tk-shadow: 0 18px 48px rgba(15,23,42,.09);
}
body {
  grid-template-columns: 268px 1fr;
  background:
    linear-gradient(115deg, rgba(79,70,229,.08) 0, transparent 32%),
    linear-gradient(245deg, rgba(5,150,105,.07) 0, transparent 30%),
    #f4f6fb;
}
body.nav-collapsed { grid-template-columns: 76px 1fr; }
.sidebar {
  padding: 16px 12px;
  background:
    linear-gradient(180deg, rgba(99,102,241,.16), transparent 260px),
    linear-gradient(180deg, #0b1020 0%, #121a32 56%, #090d19 100%);
  border-right: 1px solid rgba(255,255,255,.08);
}
.brand {
  grid-template-columns: 38px minmax(0, 1fr) 34px;
  gap: 12px;
  padding: 8px 6px 18px;
  min-height: 72px;
}
.mark { width: 38px; height: 38px; border-radius: 12px; }
.brand-logo {
  background-size: 34px 34px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.22), 0 16px 34px rgba(79,70,229,.24);
}
.brand strong { font-size: 16px; letter-spacing: .01em; }
.brand span { color: #a7b0c2; font-size: 11px; text-transform: uppercase; }
.nav-scroll { padding-top: 6px; }
.nav-group { margin-bottom: 10px; }
.nav-section {
  height: 28px;
  padding: 0 9px;
  color: #7d89a3;
  font-size: 10px;
}
.nav-items { gap: 5px; }
.nav {
  min-height: 38px;
  padding: 0 10px;
  border-radius: 10px;
  color: #d5dbea;
}
.nav-icon {
  width: 24px;
  min-width: 24px;
  height: 24px;
  border-radius: 8px;
  background: rgba(255,255,255,.075);
  color: #c7d2fe;
}
.nav:hover {
  background: rgba(255,255,255,.085);
  border-color: rgba(199,210,254,.16);
  color: #fff;
}
.nav.active {
  background: #f8fafc;
  color: #111827;
  border-color: rgba(255,255,255,.48);
  box-shadow: 0 16px 34px rgba(0,0,0,.28);
}
.nav.active .nav-icon {
  background: #4f46e5;
  color: #fff;
}
main {
  background: transparent;
}
.topbar {
  min-height: 82px;
  padding: 0 26px;
  background:
    linear-gradient(90deg, #fff 0%, rgba(248,250,252,.96) 62%, rgba(238,242,255,.82) 100%);
  border-bottom: 1px solid #d8dfeb;
}
h1 {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0;
}
#subtitle {
  font-size: 12px;
  color: #667085;
}
#content { padding: 22px 24px; }
.topbar-actions {
  padding: 5px;
  border: 1px solid #d8dfeb;
  border-radius: 12px;
  background: rgba(255,255,255,.78);
  box-shadow: 0 10px 24px rgba(15,23,42,.055);
}
.compact-btn,
button,
.button {
  border-radius: 9px;
  font-weight: 750;
}
.compact-btn { min-width: 92px; height: 32px; }
button,
.button,
input,
select,
textarea,
.shared-tag-picker summary,
.shared-choice-picker summary,
.currency-picker summary,
.export-campaign-picker summary,
.source-tag-picker summary {
  border-color: #cfd8e6;
}
.primary,
button.primary,
.v2-list-toolbar .primary,
.tabs button.active,
.landing-segmented button.active,
.segmented-control button.active,
.offer-url-primary button.active,
.offer-token-list button.active {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #fff;
  box-shadow: 0 11px 22px rgba(79,70,229,.22);
}
.primary:hover,
button.primary:hover,
.v2-list-toolbar .primary:hover {
  background: #4338ca;
  border-color: #4338ca;
  box-shadow: 0 13px 26px rgba(79,70,229,.27);
}
.success,
button.success,
.v2-list-toolbar .success {
  background: #059669;
  border-color: #059669;
  color: #fff;
  box-shadow: 0 10px 20px rgba(5,150,105,.2);
}
.success:hover,
button.success:hover,
.v2-list-toolbar .success:hover {
  background: #047857;
  border-color: #047857;
}
.ghost,
button.ghost,
.button.ghost,
.v2-list-toolbar .ghost {
  background: #fff;
  border-color: #cfd8e6;
  color: #344054;
  box-shadow: 0 5px 14px rgba(15,23,42,.045);
}
.ghost:hover,
button.ghost:hover,
.button.ghost:hover,
.v2-list-toolbar .ghost:hover {
  background: #f8fafc;
  border-color: #aab7ca;
}
input,
select,
textarea,
.shared-tag-picker summary,
.shared-choice-picker summary,
.currency-picker summary,
.export-campaign-picker summary,
.source-tag-picker summary {
  background-color: #fff;
  border-radius: 9px;
}
select,
.shared-tag-picker summary,
.shared-choice-picker summary,
.currency-picker summary,
.export-campaign-picker summary,
.source-tag-picker summary {
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.25 4.75L6 7.5L8.75 4.75' stroke='%234F46E5' stroke-width='1.85' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.card,
.overview-panel,
.monitor-card,
.domain-panel,
.settings-card,
.table-stack,
.v2-list-toolbar {
  border: 1px solid #d8dfeb;
  border-radius: 12px;
  box-shadow: 0 18px 42px rgba(15,23,42,.07);
}
.overview-hero {
  min-height: 186px;
  border-radius: 14px;
  border-color: rgba(199,210,254,.6);
  background:
    linear-gradient(135deg, rgba(11,16,32,.96), rgba(49,46,129,.9) 58%, rgba(15,118,110,.78)),
    url("/images/track-kite-logo-horizontal-dark.png") right 24px center / auto 76% no-repeat;
  box-shadow: 0 26px 70px rgba(15,23,42,.23);
}
.overview-kicker { color: rgba(224,231,255,.82); }
.overview-domain {
  border-radius: 12px;
  background: rgba(15,23,42,.42);
}
.overview-metric {
  border-radius: 12px;
  border-color: #d8dfeb;
}
.overview-metric strong { color: #111827; }
.overview-action {
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, #f8fafc);
}
.overview-action .action-icon { color: #4f46e5; }
.overview-action:hover {
  border-color: #c7d2fe;
  box-shadow: 0 16px 34px rgba(79,70,229,.12);
}
.report-workspace {
  background: linear-gradient(180deg, #f5f7fb 0, #fff 310px);
}
.report-command-panel {
  border-radius: 14px;
  border-color: rgba(199,210,254,.35);
  background:
    radial-gradient(circle at right top, rgba(5,150,105,.3), transparent 260px),
    linear-gradient(135deg, #0b1020 0%, #312e81 64%, #0f766e 100%);
  box-shadow: 0 26px 70px rgba(15,23,42,.24);
}
.report-stat {
  border-radius: 10px;
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.18);
}
.report-stat.money strong,
.report-stat.profit strong { color: #a7f3d0; }
.report-chip {
  height: 30px;
  border-radius: 999px;
  background: #fff;
  border-color: #d8dfeb;
}
.report-chip.active {
  background: #eef2ff;
  border-color: #a5b4fc;
  color: #4338ca;
}
.tabs {
  border-radius: 12px;
  background: rgba(255,255,255,.82);
}
.tabs button {
  border-radius: 9px;
}
.tabs button.active {
  color: #fff;
}
th {
  background: #f8fafc;
  color: #344054;
}
.table-sort:hover,
th.sorted .sort-indicator { color: #4f46e5; }
tbody tr:hover { background: #f5f7ff; }
tbody tr:has(input[type="checkbox"]:checked) {
  background: #eef2ff;
  box-shadow: inset 3px 0 0 #4f46e5;
}
tbody tr:has(input[type="checkbox"]:checked):hover { background: #e0e7ff; }
.dialog {
  border-radius: 18px;
  border-color: #d8dfeb;
  box-shadow: 0 34px 100px rgba(15,23,42,.3);
}
.dialog-head {
  min-height: 74px;
  background: linear-gradient(90deg, #fff, #f8fafc);
}
.dialog-head h2 {
  color: #111827;
  font-size: 24px;
  font-weight: 900;
}
.dialog-actions {
  background: #f8fafc;
}
.dialog.campaign-rule-dialog {
  display: flex;
  flex-direction: column;
}
.dialog.campaign-rule-dialog .campaign-rule-body {
  flex: 1 1 auto;
  align-content: start;
}
.dialog.campaign-rule-dialog .dialog-actions {
  flex: 0 0 auto;
  margin-top: auto !important;
  padding: 16px 32px 18px;
  border-top: 0;
  background: #fff;
}
.dialog.campaign-rule-dialog button:disabled,
.dialog.campaign-rule-dialog input:disabled {
  opacity: .48;
  cursor: not-allowed;
}
.dialog.campaign-dialog .editor-head,
.dialog.campaign-dialog .editor-pane:last-child {
  background: #f8fafc;
}
.dialog.campaign-dialog .flow-box,
.dialog.campaign-dialog .path-editor,
.campaign-integration-card,
.campaign-users-panel,
.groups-table-shell,
.landing-source-cards button {
  border-radius: 12px;
}
.campaign-section summary:hover,
.settings-side button.active,
.groups-tabs button.active {
  color: #4f46e5;
}
.groups-tabs button.active {
  border-bottom-color: #4f46e5;
}
.settings-side button.active {
  background: #eef2ff;
}
.standard-note-rich,
.standard-note-textarea,
.notes {
  border-radius: 12px;
  border-color: #cfd8e6;
}
.note-tool-btn:hover {
  background: #eef2ff;
  color: #4f46e5;
}
.new-badge {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}
.switchline input:checked + span,
.toggle.on { background: #10b981; }
#toast {
  background: #0b1020;
  border-color: rgba(199,210,254,.24);
}
@media (max-width: 1000px) {
  body { grid-template-columns: 1fr; }
  .topbar-actions { width: 100%; }
}

/* Track Kite module identity layer: page-level differentiation, CSS-only. */
body {
  --page-accent: #4f46e5;
  --page-accent-soft: #eef2ff;
  --page-accent-rgb: 79,70,229;
}
body[data-page="campaigns"],
body[data-page="rotations"] {
  --page-accent: #4f46e5;
  --page-accent-soft: #eef2ff;
  --page-accent-rgb: 79,70,229;
}
body[data-page="reports"],
body[data-page="trends"] {
  --page-accent: #0f766e;
  --page-accent-soft: #ecfdf5;
  --page-accent-rgb: 15,118,110;
}
body[data-page="clicks"],
body[data-page="conversions"],
body[data-page="monitor"] {
  --page-accent: #2563eb;
  --page-accent-soft: #eff6ff;
  --page-accent-rgb: 37,99,235;
}
body[data-page="offers"],
body[data-page="landers"] {
  --page-accent: #7c3aed;
  --page-accent-soft: #f5f3ff;
  --page-accent-rgb: 124,58,237;
}
body[data-page="sources"],
body[data-page="networks"],
body[data-page="domains"],
body[data-page="groups"] {
  --page-accent: #0891b2;
  --page-accent-soft: #ecfeff;
  --page-accent-rgb: 8,145,178;
}
body[data-page="postback"],
body[data-page="triggers"],
body[data-page="alerts"],
body[data-page="importexport"] {
  --page-accent: #b45309;
  --page-accent-soft: #fffbeb;
  --page-accent-rgb: 180,83,9;
}
body[data-page="settings"],
body[data-page="security"],
body[data-page="apikeys"] {
  --page-accent: #475569;
  --page-accent-soft: #f1f5f9;
  --page-accent-rgb: 71,85,105;
}
.topbar > div:first-child {
  position: relative;
  padding-left: 18px;
}
.topbar > div:first-child::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  bottom: 5px;
  width: 4px;
  border-radius: 999px;
  background: var(--page-accent);
  box-shadow: 0 0 0 4px rgba(var(--page-accent-rgb), .1);
}
body[data-page] .topbar {
  background:
    linear-gradient(90deg, rgba(var(--page-accent-rgb), .08), transparent 34%),
    linear-gradient(90deg, #fff, #f8fafc);
}
body[data-page] #content {
  background:
    radial-gradient(circle at top right, rgba(var(--page-accent-rgb), .08), transparent 340px),
    transparent;
}
body[data-page] .v2-list-toolbar,
body[data-page] .tabs,
body[data-page] .table-stack,
body[data-page] .card,
body[data-page] .overview-panel,
body[data-page] .settings-card,
body[data-page] .domain-panel,
body[data-page] .monitor-card {
  border-top-color: color-mix(in srgb, var(--page-accent) 32%, #d8dfeb);
}
body[data-page] .v2-list-toolbar {
  background:
    linear-gradient(90deg, rgba(var(--page-accent-rgb), .055), transparent 42%),
    rgba(255,255,255,.94);
}
body[data-page] .tabs button.active,
body[data-page] .primary,
body[data-page] button.primary,
body[data-page] .v2-list-toolbar .primary {
  background: var(--page-accent);
  border-color: var(--page-accent);
  box-shadow: 0 10px 22px rgba(var(--page-accent-rgb), .2);
}
body[data-page] .tabs button:hover,
body[data-page] .settings-side button.active,
body[data-page] .groups-tabs button.active {
  background: var(--page-accent-soft);
  color: var(--page-accent);
}
body[data-page] .table-sort:hover,
body[data-page] th.sorted .sort-indicator,
body[data-page] .link-btn,
body[data-page] .link-button,
body[data-page] .overview-action .action-icon {
  color: var(--page-accent);
}
body[data-page] tbody tr:has(input[type="checkbox"]:checked) {
  background: var(--page-accent-soft);
  box-shadow: inset 3px 0 0 var(--page-accent);
}
body[data-page] tbody tr:hover {
  background: color-mix(in srgb, var(--page-accent-soft) 74%, white);
}
body[data-page] .dialog {
  border-top: 4px solid var(--page-accent);
}
body[data-page] .dialog-head {
  background:
    linear-gradient(90deg, rgba(var(--page-accent-rgb), .075), transparent 42%),
    #fff;
}
body[data-page] .standard-note-rich:focus,
body[data-page] input:not([type="checkbox"]):not([type="radio"]):focus,
body[data-page] select:focus,
body[data-page] textarea:focus {
  border-color: color-mix(in srgb, var(--page-accent) 58%, white);
  box-shadow: 0 0 0 2px rgba(var(--page-accent-rgb), .14);
}
.table-stack::before,
.card::before,
.overview-panel::before,
.settings-card::before,
.domain-panel::before,
.monitor-card::before {
  content: "";
  display: block;
  height: 3px;
  margin: -1px -1px 0;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(90deg, var(--page-accent), transparent 62%);
  opacity: .72;
}
.table-stack .table-wrap,
.card > *,
.overview-panel > *,
.settings-card > *,
.domain-panel > *,
.monitor-card > * {
  position: relative;
}
.table-stack .table-wrap {
  border-radius: 0 0 12px 12px;
}
body[data-page="overview"] .overview-hero::after {
  content: "";
  position: absolute;
  inset: auto 22px 18px auto;
  width: 92px;
  height: 3px;
  border-radius: 999px;
  background: rgba(167,243,208,.85);
}
.overview-hero { position: relative; }
body[data-page="reports"] .report-command-panel {
  background:
    radial-gradient(circle at right top, rgba(167,243,208,.26), transparent 280px),
    linear-gradient(135deg, #0b1020 0%, #164e63 56%, #0f766e 100%);
}
body[data-page="campaigns"] .dialog.campaign-dialog .path-editor {
  border-left: 3px solid var(--page-accent);
}
body[data-page="offers"] .offer-url-primary,
body[data-page="landers"] .landing-source-cards {
  padding: 10px;
  border-radius: 14px;
  background: var(--page-accent-soft);
}
body[data-page="sources"] .source-token-buttons,
body[data-page="networks"] .source-token-buttons {
  padding: 10px;
  border-radius: 12px;
  background: var(--page-accent-soft);
}
body[data-page="settings"] .settings-side,
body[data-page="security"] .settings-side,
body[data-page="apikeys"] .settings-side {
  border-right-color: color-mix(in srgb, var(--page-accent) 24%, #d8dfeb);
}
@media (max-width: 1000px) {
  .topbar > div:first-child { padding-left: 14px; }
  .table-stack::before,
  .card::before,
  .overview-panel::before,
  .settings-card::before,
  .domain-panel::before,
  .monitor-card::before { border-radius: 10px 10px 0 0; }
}

/* Track Kite 2.1.4 enterprise correction: one calm system, no page rainbow. */
:root {
  --bg: #f6f8fb;
  --panel: #ffffff;
  --line: #d9e2ec;
  --text: #172033;
  --muted: #6b7a90;
  --nav: #111827;
  --primary: #2563eb;
  --success: #15803d;
  --warning: #b45309;
  --danger: #dc2626;
  --control-focus: #93c5fd;
  --control-focus-ring: rgba(37,99,235,.13);
  --page-accent: #2563eb;
  --page-accent-soft: #f3f6fb;
  --page-accent-rgb: 37,99,235;
}
body {
  grid-template-columns: 260px 1fr;
  background: #f6f8fb;
  color: #172033;
}
body.nav-collapsed { grid-template-columns: 74px 1fr; }
.sidebar {
  background: #111827;
  border-right: 1px solid rgba(255,255,255,.08);
  box-shadow: none;
}
.brand {
  min-height: 68px;
  border-bottom-color: rgba(255,255,255,.1);
}
.brand-logo {
  box-shadow: 0 0 0 1px rgba(255,255,255,.16);
}
.brand strong { color: #fff; }
.brand span { color: #9ca3af; text-transform: none; }
.nav-section { color: #7d8797; }
.nav {
  min-height: 36px;
  color: #cbd5e1;
  border: 0;
  border-radius: 8px;
}
.nav-icon {
  background: rgba(255,255,255,.06);
  color: #bfdbfe;
}
.nav:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
}
.nav.active {
  background: #2563eb;
  color: #fff;
  box-shadow: none;
}
.nav.active .nav-icon {
  background: rgba(255,255,255,.16);
  color: #fff;
}
.topbar {
  min-height: 76px;
  padding: 0 24px;
  background: #fff !important;
  border-bottom: 1px solid #d9e2ec;
  box-shadow: 0 8px 20px rgba(15,23,42,.035);
}
.topbar > div:first-child { padding-left: 0; }
.topbar > div:first-child::before { content: none; }
h1 {
  color: #172033;
  font-size: 21px;
  font-weight: 850;
}
#subtitle {
  color: #6b7a90;
  font-size: 12px;
}
#content {
  padding: 20px 22px;
  background: transparent !important;
}
.topbar-actions {
  background: #f8fafc;
  border-color: #d9e2ec;
  border-radius: 8px;
  box-shadow: none;
}
button,
.button,
.compact-btn {
  border-radius: 6px;
  font-weight: 750;
  transform: none !important;
}
.compact-btn { height: 30px; min-width: 88px; }
input,
select,
textarea,
.shared-tag-picker summary,
.shared-choice-picker summary,
.currency-picker summary,
.export-campaign-picker summary,
.source-tag-picker summary {
  border-color: #cbd5e1;
  border-radius: 6px;
  background-color: #fff;
}
select,
.shared-tag-picker summary,
.shared-choice-picker summary,
.currency-picker summary,
.export-campaign-picker summary,
.source-tag-picker summary {
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.25 4.75L6 7.5L8.75 4.75' stroke='%2364748B' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.primary,
button.primary,
.v2-list-toolbar .primary,
body[data-page] .primary,
body[data-page] button.primary,
body[data-page] .v2-list-toolbar .primary,
body[data-page] .tabs button.active,
.tabs button.active,
.landing-segmented button.active,
.segmented-control button.active,
.offer-url-primary button.active,
.offer-token-list button.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
  box-shadow: none;
}
.primary:hover,
button.primary:hover,
.v2-list-toolbar .primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
  box-shadow: none;
}
.success,
button.success,
.v2-list-toolbar .success {
  background: #15803d;
  border-color: #15803d;
  color: #fff;
  box-shadow: none;
}
.success:hover,
button.success:hover,
.v2-list-toolbar .success:hover {
  background: #166534;
  border-color: #166534;
}
.ghost,
button.ghost,
.button.ghost,
.v2-list-toolbar .ghost {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #334155;
  box-shadow: none;
}
.ghost:hover,
button.ghost:hover,
.button.ghost:hover,
.v2-list-toolbar .ghost:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}
.card,
.overview-panel,
.monitor-card,
.domain-panel,
.settings-card,
.table-stack,
.v2-list-toolbar {
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15,23,42,.04);
}
.table-stack::before,
.card::before,
.overview-panel::before,
.settings-card::before,
.domain-panel::before,
.monitor-card::before,
body[data-page="overview"] .overview-hero::after {
  content: none;
}
.v2-list-toolbar,
body[data-page] .v2-list-toolbar {
  background: #fff;
  border-top-color: #d9e2ec;
}
.tabs {
  border-radius: 8px;
  background: #fff;
  border-color: #d9e2ec;
  padding: 3px;
}
.tabs button {
  border-radius: 6px;
  background: transparent;
}
.tabs button:hover,
body[data-page] .tabs button:hover {
  background: #eff6ff;
  color: #1d4ed8;
}
.overview-hero {
  min-height: 176px;
  border-radius: 8px;
  border-color: #cbd5e1;
  background:
    linear-gradient(135deg, rgba(17,24,39,.92), rgba(30,64,175,.82)),
    url("/images/track-kite-logo-horizontal-dark.png") right 22px center / auto 74% no-repeat;
  box-shadow: 0 16px 36px rgba(15,23,42,.16);
}
.overview-domain {
  border-radius: 8px;
  background: rgba(15,23,42,.36);
}
.overview-metric,
.overview-action {
  border-radius: 8px;
}
.overview-action .action-icon,
body[data-page] .overview-action .action-icon {
  color: #2563eb;
}
.overview-action:hover {
  border-color: #93c5fd;
  box-shadow: 0 8px 18px rgba(37,99,235,.08);
}
.report-workspace {
  background: #fff;
}
.report-command-panel,
body[data-page="reports"] .report-command-panel {
  border-radius: 8px;
  border-color: #cbd5e1;
  background: linear-gradient(135deg, #111827, #1e3a8a);
  box-shadow: 0 16px 36px rgba(15,23,42,.18);
}
.report-stat {
  border-radius: 6px;
  background: rgba(255,255,255,.09);
  border-color: rgba(255,255,255,.16);
}
.report-stat.money strong,
.report-stat.profit strong { color: #bbf7d0; }
.report-chip {
  height: 28px;
  border-radius: 6px;
  background: #fff;
  border-color: #d9e2ec;
  box-shadow: none;
}
.report-chip.active {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
  box-shadow: none;
}
th {
  background: #f8fafc;
  color: #334155;
}
tbody tr:hover,
body[data-page] tbody tr:hover {
  background: #f8fafc;
}
tbody tr:has(input[type="checkbox"]:checked),
body[data-page] tbody tr:has(input[type="checkbox"]:checked) {
  background: #eff6ff;
  box-shadow: inset 3px 0 0 #2563eb;
}
tbody tr:has(input[type="checkbox"]:checked):hover {
  background: #dbeafe;
}
.table-sort:hover,
th.sorted .sort-indicator,
body[data-page] .table-sort:hover,
body[data-page] th.sorted .sort-indicator,
body[data-page] .link-btn,
body[data-page] .link-button {
  color: #2563eb;
}
.dialog,
body[data-page] .dialog {
  border: 1px solid #d9e2ec;
  border-top: 1px solid #d9e2ec;
  border-radius: 12px;
  box-shadow: 0 24px 72px rgba(15,23,42,.24);
}
.dialog-head,
body[data-page] .dialog-head {
  min-height: 68px;
  background: #fff;
  border-bottom-color: #e2e8f0;
}
.dialog-head h2 {
  color: #172033;
  font-size: 23px;
  font-weight: 850;
}
.dialog-actions {
  background: #f8fafc;
}
.dialog.campaign-dialog .editor-head,
.dialog.campaign-dialog .editor-pane:last-child {
  background: #f8fafc;
}
.dialog.campaign-dialog .path-editor {
  border-left: 1px solid #d9e2ec !important;
}
body[data-page="offers"] .offer-url-primary,
body[data-page="landers"] .landing-source-cards,
body[data-page="sources"] .source-token-buttons,
body[data-page="networks"] .source-token-buttons {
  padding: 0;
  background: transparent;
}
.standard-note-rich,
.standard-note-textarea,
.notes {
  border-radius: 8px;
}
.settings-side button.active,
.groups-tabs button.active,
body[data-page] .settings-side button.active,
body[data-page] .groups-tabs button.active {
  background: #eff6ff;
  color: #1d4ed8;
}
.groups-tabs button.active {
  border-bottom-color: #2563eb;
}
#toast {
  background: #111827;
  border: 0;
  box-shadow: 0 14px 34px rgba(15,23,42,.24);
}

/* Track Kite 2.2: BeMob-inspired dashboard and reference palette. */
:root {
  --bg: #f4f5f7;
  --panel: #ffffff;
  --line: #d7dde5;
  --text: #1f2933;
  --muted: #6b7280;
  --nav: #173746;
  --primary: #0087fd;
  --success: #3ac200;
  --warning: #ff7400;
  --control-focus: #0087fd;
  --control-focus-ring: rgba(0,135,253,.14);
  --tk-blue: #0087fd;
  --tk-green: #3ac200;
  --tk-orange: #ff7400;
  --tk-navy: #173746;
  --tk-soft-blue: #eef7ff;
  --tk-soft-green: #effbe9;
  --tk-soft-orange: #fff3e8;
}
body {
  grid-template-columns: 238px 1fr;
  background: #f4f5f7;
  color: #1f2933;
}
body.nav-collapsed { grid-template-columns: 70px 1fr; }
.sidebar {
  padding: 0;
  background: #173746;
  border-right: 0;
}
.brand {
  min-height: 48px;
  padding: 7px 8px;
  grid-template-columns: 30px minmax(0, 1fr) 30px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: #132f3d;
}
.mark { width: 30px; height: 30px; border-radius: 7px; }
.brand-logo {
  background-size: 27px 27px;
  box-shadow: none;
}
.brand strong { font-size: 15px; color: #fff; }
.brand span { display: none; }
.collapse-btn {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.12);
}
.nav-scroll { padding: 10px 8px; }
.nav-group {
  margin-bottom: 11px;
}
.nav-section,
.nav-section.nav-root {
  height: 24px;
  padding: 0 8px;
  color: rgba(255,255,255,.62);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.nav-section:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-items { gap: 2px; }
.nav {
  min-height: 32px;
  padding: 0 9px;
  border-radius: 4px;
  color: rgba(255,255,255,.86);
  gap: 8px;
  border: 0;
}
.nav-icon {
  width: 20px;
  min-width: 20px;
  height: 20px;
  border-radius: 4px;
  background: transparent;
  color: rgba(255,255,255,.72);
}
.nav-icon svg { width: 15px; height: 15px; stroke-width: 2; }
.nav-child {
  margin-left: 20px;
  color: rgba(255,255,255,.72);
  font-size: 12px;
}
.nav-child-icon {
  width: 10px;
  min-width: 10px;
  height: 10px;
  border-left: 1px solid rgba(255,255,255,.35);
  border-bottom: 1px solid rgba(255,255,255,.35);
  border-radius: 0;
}
.nav:hover { background: rgba(255,255,255,.1); color: #fff; }
.nav.active {
  background: #0f2734;
  color: #fff;
  box-shadow: inset 3px 0 0 var(--tk-blue);
}
.nav.active .nav-icon { color: #fff; background: transparent; }
.sidebar-footer { padding: 8px; border-top-color: rgba(255,255,255,.08); }
.topbar {
  min-height: 58px;
  padding: 0 22px;
  background: #fff !important;
  box-shadow: none;
}
h1 { font-size: 24px; font-weight: 500; color: #222; }
#subtitle { color: #667085; }
.topbar-actions {
  padding: 0;
  border: 0;
  background: transparent;
}
#content {
  padding: 24px 24px 32px;
  background: #f4f5f7 !important;
}
button,
.button,
.compact-btn,
input,
select,
textarea,
.shared-tag-picker summary,
.shared-choice-picker summary,
.currency-picker summary,
.export-campaign-picker summary,
.source-tag-picker summary {
  border-radius: 4px;
  border-color: #cbd3dc;
}
.primary,
button.primary,
.v2-list-toolbar .primary,
body[data-page] .primary,
body[data-page] button.primary,
body[data-page] .v2-list-toolbar .primary,
body[data-page] .tabs button.active,
.tabs button.active {
  background: #0087fd;
  border-color: #0087fd;
  color: #fff;
}
.primary:hover,
button.primary:hover,
.v2-list-toolbar .primary:hover {
  background: #0075dc;
  border-color: #0075dc;
}
.success,
button.success,
.v2-list-toolbar .success {
  background: #3ac200;
  border-color: #3ac200;
  color: #fff;
}
.success:hover,
button.success:hover,
.v2-list-toolbar .success:hover {
  background: #32a900;
  border-color: #32a900;
}
.ghost,
button.ghost,
.button.ghost,
.v2-list-toolbar .ghost {
  background: #fff;
  border-color: #cbd3dc;
  color: #2f3a45;
}
.ghost:hover,
button.ghost:hover,
.button.ghost:hover,
.v2-list-toolbar .ghost:hover {
  background: #f5f7f9;
  border-color: #9aa7b5;
}
.card,
.overview-panel,
.monitor-card,
.domain-panel,
.settings-card,
.table-stack,
.v2-list-toolbar,
.dashboard-metric,
.dashboard-panel,
.dashboard-chart-panel {
  border: 1px solid #dde2e8;
  border-radius: 0;
  background: #fff;
  box-shadow: 0 2px 6px rgba(16,24,40,.07);
}
.dashboard-page {
  max-width: 1220px;
  margin: 0 auto;
}
.dashboard-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: -8px 0 16px;
}
.dashboard-control-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}
.dashboard-domain {
  color: #8a95a3;
  font-size: 12px;
  min-width: 220px;
  text-align: right;
}
.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(7, minmax(118px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.dashboard-metric {
  min-height: 74px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
}
.dashboard-metric strong {
  font-size: 23px;
  font-weight: 400;
  color: #222;
}
.dashboard-metric span {
  color: #333;
  font-size: 13px;
}
.dashboard-metric.is-positive strong { color: #15803d; }
.dashboard-metric.is-negative strong { color: #dc2626; }
.dashboard-section {
  margin-top: 8px;
}
.dashboard-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}
.dashboard-section-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #222;
}
.dashboard-sort {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #333;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 16px 20px;
}
.dashboard-panel {
  min-height: 180px;
  display: flex;
  flex-direction: column;
}
.dashboard-panel-head {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  background: #173746;
  color: #fff;
  font-weight: 700;
}
.dashboard-panel-head span { color: rgba(255,255,255,.86); }
.dashboard-panel-body {
  flex: 1;
  min-height: 0;
}
.dashboard-stat-row {
  min-height: 36px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  border-bottom: 1px solid #edf0f3;
}
.dashboard-stat-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-style: italic;
}
.dashboard-stat-row strong {
  justify-self: end;
  font-weight: 500;
  color: #394553;
}
.dashboard-empty {
  min-height: 142px;
  display: grid;
  place-items: center;
  color: #5f6b7a;
}
.dashboard-chart-panel {
  margin-top: 18px;
  min-height: 300px;
}
.dashboard-chart-head {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px;
  border-bottom: 1px solid #edf0f3;
}
.dashboard-chart-head strong { color: #222; }
.dashboard-chart-head span { color: #6b7280; font-size: 12px; }
.dashboard-chart {
  height: 210px;
  display: flex;
  align-items: end;
  gap: 10px;
  padding: 24px 36px 36px;
  border-bottom: 1px solid #edf0f3;
  background:
    repeating-linear-gradient(0deg, transparent 0, transparent 40px, #edf0f3 41px),
    #fff;
}
.dashboard-bar {
  flex: 1;
  min-width: 18px;
  height: 100%;
  position: relative;
  display: flex;
  align-items: end;
  justify-content: center;
}
.dashboard-bar i,
.dashboard-bar b {
  position: absolute;
  bottom: 0;
  width: 5px;
  border-radius: 2px 2px 0 0;
}
.dashboard-bar i {
  height: var(--click);
  background: #0087fd;
  transform: translateX(-4px);
}
.dashboard-bar b {
  height: var(--revenue);
  background: #3ac200;
  transform: translateX(4px);
}
.dashboard-bar em {
  position: absolute;
  bottom: -24px;
  color: #5f6b7a;
  font-size: 11px;
  font-style: normal;
  white-space: nowrap;
}
.dashboard-legend {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px 36px;
  color: #5f6b7a;
  font-size: 12px;
}
.dashboard-legend span::before {
  content: "";
  width: 10px;
  height: 3px;
  display: inline-block;
  margin-right: 6px;
  vertical-align: middle;
}
.dashboard-legend .blue::before { background: #0087fd; }
.dashboard-legend .green::before { background: #3ac200; }
.dashboard-legend .orange::before { background: #ff7400; }
.report-command-panel {
  background: #173746;
  border-radius: 0;
}
.report-chip.active {
  background: #eef7ff;
  border-color: #8cc9ff;
  color: #006fce;
}
.dialog {
  border-radius: 8px;
}
@media (max-width: 1180px) {
  .dashboard-metrics { grid-template-columns: repeat(4, minmax(118px, 1fr)); }
}
@media (max-width: 900px) {
  .dashboard-controls { align-items: flex-start; flex-direction: column; }
  .dashboard-control-group { margin-left: 0; }
  .dashboard-domain { text-align: left; }
  .dashboard-metrics { grid-template-columns: repeat(2, minmax(118px, 1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-chart { overflow: auto; }
  .dashboard-bar { min-width: 28px; }
}

/* Track Kite 2.2 correction: international neutral UI, using only the three approved accent colors. */
:root {
  --bg: #f6f8fb;
  --panel: #ffffff;
  --line: #d9e1ea;
  --text: #172033;
  --muted: #718096;
  --nav: #ffffff;
  --primary: #0087fd;
  --success: #3ac200;
  --warning: #ff7400;
  --control-focus: #0087fd;
  --control-focus-ring: rgba(0, 135, 253, .13);
  --tk-blue: #0087fd;
  --tk-green: #3ac200;
  --tk-orange: #ff7400;
  --tk-soft-blue: #eef7ff;
  --tk-soft-green: #effbea;
  --tk-soft-orange: #fff4ea;
}

body {
  background: var(--bg);
  color: var(--text);
}

.sidebar {
  background: #fff !important;
  color: var(--text);
  border-right: 1px solid var(--line);
  box-shadow: none;
}

.brand {
  border-bottom: 1px solid var(--line);
}

.brand strong,
.nav,
.nav-section,
.nav-section.nav-root {
  color: var(--text);
}

.brand span,
.section-label,
.chevron,
.nav-child,
.sidebar-footer {
  color: var(--muted);
}

.mark {
  background: #fff;
  border: 1px solid var(--line);
}

.brand-logo {
  background-color: #fff;
  box-shadow: none;
}

.collapse-btn {
  color: var(--muted);
  border-color: var(--line);
  background: #fff;
  border-radius: 6px;
}

.collapse-btn:hover,
body.nav-collapsed .collapse-btn:hover {
  background: var(--tk-soft-blue);
  color: var(--primary);
  border-color: rgba(0, 135, 253, .28);
}

.nav-scroll::-webkit-scrollbar-thumb {
  background: #c7d1dc;
}

.nav-section,
.nav-section.nav-root {
  font-size: 11px;
  font-weight: 800;
}

.nav-section:hover {
  background: var(--tk-soft-blue);
  color: var(--primary);
}

.nav {
  color: #27364a;
  background: transparent;
  border-radius: 6px;
}

.nav-icon {
  color: #6b7788;
  background: transparent;
}

.nav-child-icon {
  border-left-color: #b8c3d0;
  border-bottom-color: #b8c3d0;
}

.nav:hover {
  background: var(--tk-soft-blue);
  color: var(--primary);
}

.nav:hover .nav-icon {
  color: var(--primary);
  background: transparent;
}

.nav.active {
  background: var(--tk-soft-blue);
  color: var(--primary);
  box-shadow: inset 3px 0 0 var(--primary);
}

.nav.active .nav-icon {
  color: var(--primary);
  background: transparent;
}

.sidebar-footer {
  border-top-color: var(--line);
}

.logout,
.logout .nav-icon {
  color: #9b1c1c;
}

main,
#content {
  background: var(--bg) !important;
}

.topbar {
  background: #fff !important;
  border-bottom: 1px solid var(--line);
  box-shadow: none;
}

h1,
.dialog-head h2,
.filter-dialog-head h2,
.conversion-update-head h2,
.conversion-logs-head h2,
.landing-file-head h2 {
  color: var(--text);
}

.card,
.overview-panel,
.monitor-card,
.domain-panel,
.settings-card,
.table-stack,
.v2-list-toolbar,
.dashboard-metric,
.dashboard-panel,
.dashboard-chart-panel {
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: none;
  border-radius: 6px;
}

button,
.button,
.compact-btn,
input,
select,
textarea,
.shared-tag-picker summary,
.shared-choice-picker summary,
.currency-picker summary,
.export-campaign-picker summary,
.source-tag-picker summary {
  border-color: #c8d3df;
  border-radius: 6px;
}

.primary,
button.primary,
.v2-list-toolbar .primary,
body[data-page] .primary,
body[data-page] button.primary,
body[data-page] .v2-list-toolbar .primary,
body[data-page] .tabs button.active,
.tabs button.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.primary:hover,
button.primary:hover,
.v2-list-toolbar .primary:hover {
  background: #0076dc;
  border-color: #0076dc;
}

.success,
button.success,
.v2-list-toolbar .success {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.success:hover,
button.success:hover,
.v2-list-toolbar .success:hover {
  background: #32a700;
  border-color: #32a700;
}

.warning,
.warning-text {
  color: var(--warning);
}

.tag,
.source-badge,
.report-chip.active {
  background: var(--tk-soft-blue);
  border-color: rgba(0, 135, 253, .28);
  color: #006fcf;
}

th {
  background: #f7f9fc;
  color: #475569;
  box-shadow: inset 0 -1px 0 var(--line);
}

tr:hover {
  background: #f8fbff;
}

.profit-row {
  background: var(--tk-soft-green);
}

.loss-row {
  background: #fff1f1;
}

.dashboard-page {
  max-width: 1240px;
}

.dashboard-controls {
  margin: 0 0 14px;
}

.dashboard-metric {
  min-height: 78px;
  border-top: 3px solid var(--primary);
}

.dashboard-metric:nth-child(3n + 2) {
  border-top-color: var(--success);
}

.dashboard-metric:nth-child(3n) {
  border-top-color: var(--warning);
}

.dashboard-metric strong {
  color: var(--text);
  font-weight: 650;
}

.dashboard-metric span,
.dashboard-section-head h2,
.dashboard-sort,
.dashboard-chart-head strong {
  color: var(--text);
}

.dashboard-panel-head {
  background: #f7f9fc;
  color: var(--text);
  border-bottom: 1px solid var(--line);
}

.dashboard-panel-head span {
  color: var(--muted);
}

.dashboard-stat-row strong {
  color: var(--text);
}

.dashboard-chart {
  background:
    repeating-linear-gradient(0deg, transparent 0, transparent 40px, #edf1f5 41px),
    #fff;
}

.report-command-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
}

.report-command-panel h2,
.report-command-panel p {
  color: var(--text);
}

/* Unified Track Kite form states. Keep focus consistent across native and custom controls. */
:where(
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea,
  .standard-note-rich,
  .shared-tag-picker summary,
  .shared-choice-picker summary,
  .currency-picker summary,
  .export-campaign-picker summary,
  .source-tag-picker summary
) {
  border-color: #c8d3df;
  background-color: #fff;
  color: var(--text);
  transition: border-color .12s ease, box-shadow .12s ease, background-color .12s ease;
}

:where(
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea,
  .standard-note-rich,
  .shared-tag-picker summary,
  .shared-choice-picker summary,
  .currency-picker summary,
  .export-campaign-picker summary,
  .source-tag-picker summary
):hover {
  border-color: #9fb1c3;
}

:where(
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea,
  .standard-note-rich,
  .shared-tag-picker summary,
  .shared-choice-picker summary,
  .currency-picker summary,
  .export-campaign-picker summary,
  .source-tag-picker summary
):focus,
:where(
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea,
  .standard-note-rich,
  .shared-tag-picker summary,
  .shared-choice-picker summary,
  .currency-picker summary,
  .export-campaign-picker summary,
  .source-tag-picker summary
):focus-visible,
body[data-page] :where(
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea,
  .standard-note-rich,
  .shared-tag-picker summary,
  .shared-choice-picker summary,
  .currency-picker summary,
  .export-campaign-picker summary,
  .source-tag-picker summary
):focus,
body[data-page] :where(
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea,
  .standard-note-rich,
  .shared-tag-picker summary,
  .shared-choice-picker summary,
  .currency-picker summary,
  .export-campaign-picker summary,
  .source-tag-picker summary
):focus-visible,
:where(
  .shared-tag-picker,
  .shared-choice-picker,
  .currency-picker,
  .export-campaign-picker,
  .source-tag-picker
):focus-within summary {
  outline: 0;
  border-color: #0087fd;
  box-shadow: 0 0 0 2px rgba(0, 135, 253, .13);
}

:where(
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea,
  .standard-note-rich
):disabled,
:where(
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea
)[readonly] {
  background-color: #f3f6f9;
  border-color: #d9e1ea;
  color: #8a98a8;
  cursor: not-allowed;
  box-shadow: none;
}

:where(button, .button, .compact-btn):focus,
:where(button, .button, .compact-btn):focus-visible {
  outline: 0;
  box-shadow: 0 0 0 2px rgba(0, 135, 253, .13);
}

:where(input[type="checkbox"], input[type="radio"]) {
  accent-color: #0087fd;
}

/* Unified functional pages: neutral surfaces, predictable accents, no per-page color themes. */
body[data-page] {
  --page-accent: #0087fd;
  --page-accent-soft: #eef7ff;
  --page-accent-rgb: 0, 135, 253;
}

body[data-page],
body[data-page="campaigns"],
body[data-page="reports"],
body[data-page="landers"],
body[data-page="offers"],
body[data-page="sources"],
body[data-page="networks"],
body[data-page="rotations"],
body[data-page="domains"],
body[data-page="settings"],
body[data-page="postback"],
body[data-page="clicks"],
body[data-page="conversions"] {
  background: var(--bg);
}

body[data-page] #content,
.report-workspace {
  background: var(--bg) !important;
}

body[data-page] .v2-list-toolbar,
body[data-page] .toolbar,
body[data-page] .tabs,
body[data-page] .editor-head,
body[data-page] .pager,
body[data-page] .report-toolbar,
body[data-page] .report-dimension-strip {
  background: #fff;
  border-color: var(--line);
  box-shadow: none;
}

body[data-page] .v2-list-toolbar {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 12px;
}

body[data-page] .tabs {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px;
  gap: 4px;
}

body[data-page] .tabs button {
  background: #fff;
  border-color: transparent;
  color: #405166;
  box-shadow: none;
}

body[data-page] .tabs button:hover,
body[data-page] .groups-tabs button:hover {
  background: #f3f6f9;
  color: var(--primary);
}

body[data-page] .tabs button.active,
body[data-page] .groups-tabs button.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: none;
}

.report-command-panel,
body[data-page="reports"] .report-command-panel {
  grid-template-columns: minmax(220px, .88fr) minmax(520px, 1.6fr) auto;
  background: #fff !important;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  box-shadow: none;
}

.report-command-copy h2,
.report-command-copy p,
.report-command-panel h2,
.report-command-panel p {
  color: var(--text) !important;
}

.report-stat {
  background: #f8fafc !important;
  border-color: var(--line) !important;
  box-shadow: none;
}

.report-stat small,
.report-stat span {
  color: var(--muted) !important;
}

.report-stat strong,
.report-stat.money strong,
.report-stat.profit strong,
.report-stat.loss strong {
  color: var(--text) !important;
}

.report-chip,
.report-chip.metric {
  background: #fff;
  border-color: var(--line);
  color: #334155;
  box-shadow: none;
}

.report-chip span,
.report-chip.metric span,
.report-chip:nth-of-type(4n) span,
.report-chip:nth-of-type(4n + 1) span,
.report-chip:nth-of-type(4n + 2) span {
  background: #9aa7b5;
}

.report-chip.active {
  background: var(--tk-soft-blue);
  border-color: rgba(0, 135, 253, .32);
  color: #006fcf;
  box-shadow: none;
}

.report-chip.active span {
  background: var(--primary);
}

.report-chip em {
  background: var(--tk-soft-orange);
  color: #a24600;
}

body[data-page] .table-stack,
body[data-page] .card,
body[data-page] .dialog,
body[data-page] .flow-box,
body[data-page] .path-editor,
body[data-page] .campaign-integration-card,
body[data-page] .campaign-users-panel,
body[data-page] .domain-panel,
body[data-page] .settings-card,
body[data-page] .monitor-card {
  background: #fff;
  border-color: var(--line);
  box-shadow: none;
}

body[data-page] th {
  background: #f7f9fc;
  color: #475569;
}

body[data-page] tr:hover,
tbody tr:hover {
  background: #f8fbff;
}

tbody tr:has(input[type="checkbox"]:checked),
body[data-page] tbody tr:has(input[type="checkbox"]:checked),
tbody tr:has(input[type="checkbox"]:checked):hover,
body[data-page] tbody tr:has(input[type="checkbox"]:checked):hover {
  background: var(--tk-soft-blue);
  box-shadow: inset 3px 0 0 var(--primary);
}

.tag,
.tag.warn,
.source-badge,
.status-pill {
  background: var(--tk-soft-blue);
  border: 1px solid rgba(0, 135, 253, .22);
  color: #006fcf;
}

.tag.positive,
.positive,
.status-pill:not(.off) {
  background: var(--tk-soft-green);
  border-color: rgba(58, 194, 0, .28);
  color: #277f00;
}

.tag.warn,
.warning,
.callout.warn {
  background: var(--tk-soft-orange);
  border-color: rgba(255, 116, 0, .28);
  color: #a24600;
}

.status-pill.off,
.danger,
.loss-row {
  color: #b42318;
}

.tag-chip {
  background: color-mix(in srgb, var(--tag-color, #0087fd) 12%, white) !important;
  border-color: color-mix(in srgb, var(--tag-color, #0087fd) 34%, #d9e1ea) !important;
  color: #334155;
}

.tag-chip::before {
  background: var(--tag-color, #0087fd) !important;
}

.color-dot {
  background: currentColor;
}

.campaign-token-chip,
.new-badge {
  background: var(--tk-soft-green);
  border-color: rgba(58, 194, 0, .28);
  color: #277f00;
}

.segmented-control button.active,
.landing-segmented button.active,
.offer-url-primary button.active,
.offer-token-list button.active,
.currency-row.active,
.shared-choice-row.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.shared-choice-row:hover,
.currency-row:hover {
  background: var(--tk-soft-blue);
  color: #006fcf;
}

.toggle.on,
.switchline input:checked + span {
  background: var(--success);
}

.profit-row,
.profit-row:hover {
  background: var(--tk-soft-green);
}

.loss-row,
.loss-row:hover {
  background: #fff1f1;
}

.page-loading,
.empty-cell,
.overview-action,
.code,
.code-textarea {
  background: #f8fafc;
  border-color: var(--line);
  box-shadow: none;
}

.bars .bar,
.bar {
  background: var(--primary);
}

.loadbar i {
  background: var(--success);
}

.account-page {
  display: grid;
  gap: 14px;
  max-width: 1180px;
  margin: 0 auto;
}

.account-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px;
  box-shadow: none;
}

.account-plan {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(250px, auto);
  align-items: center;
  gap: 18px;
  border-top: 3px solid var(--primary);
}

.account-kicker {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.account-plan h2 {
  margin: 4px 0;
  color: var(--text);
  font-size: 26px;
  font-weight: 750;
}

.account-plan p,
.account-card p {
  margin: 0;
}

.account-price {
  min-width: 150px;
  text-align: right;
}

.account-price strong {
  display: block;
  color: var(--text);
  font-size: 24px;
}

.account-price span,
.account-date-box span,
.account-date-box small {
  color: var(--muted);
  font-size: 12px;
}

.account-date-box {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
}

.account-date-box strong {
  color: var(--text);
  font-size: 15px;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 14px;
}

.account-section-head {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.account-section-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 16px;
}

.account-section-head span {
  color: var(--muted);
  font-size: 12px;
}

.account-form {
  grid-template-columns: 132px minmax(0, 1fr);
}

.account-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

.account-detail-list {
  display: grid;
  gap: 8px;
}

.account-detail-list div,
.account-usage div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 6px;
  background: #f8fafc;
}

.account-detail-list span,
.account-usage span {
  color: var(--muted);
}

.account-detail-list strong,
.account-usage strong {
  color: var(--text);
}

.account-features {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.account-feature {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(0, 135, 253, .22);
  border-radius: 999px;
  background: var(--tk-soft-blue);
  color: #006fcf;
  font-size: 12px;
}

.account-usage {
  display: grid;
  gap: 8px;
}

.account-progress {
  height: 8px;
  margin: 14px 0 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f7;
}

.account-progress i {
  display: block;
  height: 100%;
  background: var(--primary);
}

.account-payment-box {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.pricing-plan {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.pricing-plan.current {
  border-color: rgba(0, 135, 253, .45);
  background: var(--tk-soft-blue);
}

.pricing-plan span {
  display: block;
  color: var(--text);
  font-weight: 800;
}

.pricing-plan strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 22px;
}

.pricing-plan small {
  color: var(--muted);
}

.pricing-plan dl {
  display: grid;
  gap: 6px;
  margin: 0;
}

.pricing-plan dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}

.pricing-plan dt {
  color: var(--muted);
}

.pricing-plan dd {
  margin: 0;
  color: var(--text);
  font-weight: 750;
}

.account-payment-box > div:not(.account-pay-actions):not(.account-pay-state) {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
}

.account-payment-box span,
.account-payment-box small {
  color: var(--muted);
  font-size: 12px;
}

.account-payment-box strong {
  color: var(--text);
}

.account-pay-state {
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid var(--line);
  font-weight: 700;
}

.account-pay-ok {
  background: var(--tk-soft-green);
  border-color: rgba(58, 194, 0, .28);
  color: #277f00;
}

.account-pay-warn {
  background: var(--tk-soft-orange);
  border-color: rgba(255, 116, 0, .28);
  color: #a24600;
}

.account-pay-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.account-page .table-stack {
  border-radius: 6px;
}

.mini-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 140px;
}

.mini-chips span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  border: 1px solid rgba(0, 135, 253, .18);
  border-radius: 5px;
  background: #f5f9ff;
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .account-plan,
  .account-grid {
    grid-template-columns: 1fr;
  }

  .account-price {
    text-align: left;
  }

  .account-form {
    grid-template-columns: 1fr;
  }
}

/* Track Kite brand assets generated from the approved logo sheet. */
.brand-logo {
  background: #fff url("/images/track-kite-mark-transparent.png") center / 30px 30px no-repeat !important;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .16) !important;
}

.auth-hero::after,
.login-hero::after {
  background-image: url("/images/track-kite-logo-horizontal-dark.png") !important;
  background-position: right 22px center !important;
  background-size: auto 74% !important;
  background-repeat: no-repeat !important;
}

/* Real dashboard filters: use the same select system as the rest of the tracker. */
.dashboard-control-group .date-range-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dashboard-control-group select,
.dashboard-control-group .date-filter,
.dashboard-control-group .currency-select {
  width: auto;
  min-width: 88px;
  height: 32px;
  min-height: 32px;
  padding-right: 34px;
}

.dashboard-control-group .date-custom-fields input {
  height: 32px;
  min-height: 32px;
}

.dashboard-control-group .currency-select {
  min-width: 92px;
  font-weight: 700;
}

.dashboard-control-group #overviewStatusFilter {
  min-width: 96px;
}

/* Account navigation split: Profile and Billing are separate real pages. */
.account-profile-page .account-billing-section,
.account-billing-page .account-profile-section {
  display: none;
}

.account-profile-page .account-grid,
.account-billing-page .account-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 980px) {
  .account-profile-page .account-grid,
  .account-billing-page .account-grid {
    grid-template-columns: 1fr;
  }
}

/* Owner admin delivery flow: neutral action, explicit handoff package. */
.handoff-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  height: 26px;
  padding: 0 9px;
  border: 1px solid #b9c9d6;
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #f2f6f8);
  color: #17324a;
  font: inherit;
  font-weight: 800;
  box-shadow: 0 5px 13px rgba(16,24,32,.05);
}

.handoff-action:hover,
.handoff-action:focus,
.handoff-action:focus-visible {
  border-color: #7aaec5;
  background: linear-gradient(180deg, #fff, #edf7fb);
  color: #0b3f52;
  outline: 0;
  box-shadow: 0 0 0 2px rgba(0,135,253,.12);
}

.handoff-action:disabled {
  opacity: .7;
  cursor: wait;
  transform: none;
}

.delivery-card {
  border-color: #c6dce8;
  background: #fff;
}

.delivery-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid #e3edf3;
}

.delivery-head h2,
.delivery-card h3 {
  margin: 0;
  color: #10273c;
}

.delivery-head p {
  margin: 4px 0 0;
}

.delivery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.delivery-grid section {
  min-width: 0;
  border: 1px solid #dce8ef;
  border-radius: 8px;
  padding: 14px;
  background: #fbfdff;
}

.delivery-list {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 10px 12px;
  margin-top: 12px;
}

.delivery-list > span {
  color: #52677a;
  font-weight: 750;
}

.delivery-list strong {
  color: #10273c;
  overflow-wrap: anywhere;
}

.copyline {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.copyline code,
.delivery-code code {
  display: block;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #d3e2eb;
  border-radius: 6px;
  background: #f7fbfd;
  color: #10273c;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  overflow-wrap: anywhere;
}

.copyline code {
  flex: 1 1 auto;
}

.copyline button {
  flex: 0 0 auto;
  height: 28px;
}

.delivery-code {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.delivery-checklist {
  margin: 10px 0 0;
  padding-left: 20px;
  color: #24394d;
}

.delivery-checklist li {
  margin: 6px 0;
}

@media (max-width: 980px) {
  .delivery-head,
  .copyline {
    align-items: stretch;
    flex-direction: column;
  }
  .delivery-grid,
  .delivery-list {
    grid-template-columns: 1fr;
  }
}
