/* ============ Operator Configuration Panel ============ */

/* ---------- config panel layout ---------- */
/* ---------- unified widget shell ---------- */
.uwidget {
  /* width: 1200px; */
  max-width: 1100px;
  min-width: 0;
  margin: 0 auto;
  background: var(--widget-bg);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: background 0.4s ease, border-color 0.4s ease;
}
html.pm-embedded .uwidget {
  width: 100%;
}

/* shared navy header */
.uhead {
  background: var(--navy);
  background-image: radial-gradient(120% 140% at 100% 0%, rgba(61,214,181,0.16) 0%, rgba(61,214,181,0) 45%);
  padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between;
  color: #fff;
}

/* underline tab strip */
.utabs {
  display: flex; align-items: stretch; gap: 6px;
  padding: 0 20px;
  background: var(--widget-bg);
  border-bottom: 1px solid var(--border);
  transition: background 0.4s ease;
}
.utab {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  font-family: inherit; font-size: 14px; font-weight: 600; color: var(--muted);
  padding: 15px 14px 14px; display: flex; align-items: center; gap: 8px;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color 0.16s ease;
}
.utab:hover { color: var(--text); }
.utab.on { color: var(--text); border-bottom-color: var(--accent); }
.utab .utab-ic { display: grid; place-items: center; color: var(--faint); transition: color 0.16s ease; }
.utab:hover .utab-ic { color: var(--muted); }
.utab.on .utab-ic { color: var(--accent); }

.utab-body { background: var(--page-bg); transition: background 0.4s ease;
    height: 930px;
}

/* config panel grid (chrome now provided by .uwidget) */
.cfg {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  background: var(--page-bg);
  /* min-height: 640px; */
  min-height: 930px;
}

/* ---------- sidebar ---------- */
.cfg-side {
  background: var(--widget-bg);
  border-right: 1px solid var(--border);
  padding: 22px 14px;
  display: flex; flex-direction: column;
}
.cfg-side-title {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--faint); padding: 0 10px; margin-bottom: 12px;
}
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 10px; border-radius: 9px; cursor: pointer;
  font-size: 13.5px; font-weight: 500; color: var(--muted);
  transition: background 0.15s ease, color 0.15s ease;
  border: 0; background: transparent; width: 100%; text-align: left; font-family: inherit;
}
.nav-item:hover { background: var(--chip-bg); color: var(--text); }
.nav-item.on { background: color-mix(in srgb, var(--accent) 13%, transparent); color: var(--text); font-weight: 600; }
.nav-num {
  width: 22px; height: 22px; border-radius: 7px; flex: none;
  display: grid; place-items: center; font-size: 11px; font-weight: 700;
  background: var(--chip-bg); color: var(--muted);
}
.nav-item.on .nav-num { background: var(--accent); color: var(--accent-ink); }
.nav-item.upgrid.on .nav-num { background: #7C5CFF; color: #fff; }

.side-spacer { flex: 1; }
.side-help {
  margin-top: 16px; padding: 12px; border-radius: 11px;
  background: var(--chip-bg); border: 1px solid var(--border);
  font-size: 11.5px; color: var(--muted); line-height: 1.5;
}
.side-help b { color: var(--text); }

/* ---------- main content ---------- */
.cfg-main {
  display: flex; flex-direction: column;
  min-height: 930px;
  max-height: 86vh;
  overflow: hidden;
}
html.pm-embedded .cfg-main {
  max-height: none;
  overflow: visible;
}
.cfg-head {
  padding: 22px 24px 18px; border-bottom: 1px solid var(--border);
  background: var(--widget-bg);
}
.cfg-head h1 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -0.01em; color: var(--text); }
.cfg-head p { margin: 5px 0 0; font-size: 13px; color: var(--muted); }
.cfg-scroll { overflow-y: auto !important; padding: 18px 24px 24px; flex: 1; max-height: 762px;
}
html.pm-embedded .cfg-scroll {
  overflow-y: visible;
  flex: initial;
}
.cfg-scroll::-webkit-scrollbar { width: 10px; }
.cfg-scroll::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; border: 3px solid var(--page-bg); }

/* ---------- accordion ---------- */
.acc {
  background: var(--widget-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 14px;
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.acc.open { box-shadow: 0 6px 20px -12px rgba(10,22,40,0.18); }
.acc.upgrid {
  overflow: hidden;
}
[data-theme="dark"] .acc.upgrid { background: color-mix(in srgb, #7C5CFF 13%, var(--widget-bg)); }

.acc-head {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; cursor: pointer; user-select: none;
}
.acc-num {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  display: grid; place-items: center; font-size: 13px; font-weight: 700;
  background: var(--chip-bg); color: var(--muted);
}
.acc.open .acc-num { background: var(--accent); color: var(--accent-ink); }
.acc.upgrid.open .acc-num { background: #7C5CFF; color: #fff; }
.acc-titles { flex: 1 1 auto; min-width: 0; text-align: left; }
.acc-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.acc-title { font-size: 15px; font-weight: 700; color: var(--text); letter-spacing: -0.01em; }
.acc-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.acc-chev { color: var(--faint); transition: transform 0.22s ease; flex: none; }
.acc.open .acc-chev { transform: rotate(180deg); }

.acc-body { padding: 4px 18px 20px; border-top: 1px solid var(--border); }
.acc.upgrid .acc-body { border-top-color: color-mix(in srgb, #7C5CFF 22%, var(--border)); }

/* upgrid product badge */
.product-badge {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 14px 0 6px; padding: 8px 12px; border-radius: 10px;
  background: color-mix(in srgb, #7C5CFF 12%, transparent);
  border: 1px solid color-mix(in srgb, #7C5CFF 30%, transparent);
}
.upgrid-logo {
  display: none;
  /* display: inline-grid;  */
  place-items: center; gap: 0;
  background: #7C5CFF; color: #fff; font-weight: 800; font-size: 12px; letter-spacing: 0.03em;
  padding: 4px 7px; border-radius: 3px;
}
.product-badge .pb-text { font-size: 12px; color: var(--muted); }
.product-badge .pb-text b { color: var(--text); }

.here-badge, .weather-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--muted); font-weight: 500;
  background: var(--chip-bg); border: 1px solid var(--border);
  padding: 4px 9px; border-radius: 999px;
}
.here-badge .here-logo { font-size: 9px; padding: 2px 5px; }
.placematic-upgrid-badge {
  display: none;  
  /* display: inline-grid; */
    place-items: center;
   background-color: #7C5CFF;
    color: #fff;
    font-weight: 800;
    letter-spacing: 0.03em;
    border-radius: 3px;  
    font-size: 8.5px;
    padding: 2px 4px;    
}
/* ---------- field grid ---------- */
.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 22px; margin-top: 14px; }
.fgrid.one { grid-template-columns: minmax(0, 1fr); }
.cfg-field { display: flex; flex-direction: column; }
.cfg-field.span2 { grid-column: 1 / -1; }
.cfg-label { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 3px; display: flex; align-items: center; gap: 8px; }
.cfg-help { font-size: 11.5px; color: var(--muted); line-height: 1.45; margin-bottom: 9px; }
.cfg-help.below { margin-bottom: 0; margin-top: 7px; }

/* number / text input with affix */
.affix {
  display: flex; align-items: center;
  height: 42px; border-radius: 10px;
  border: 1.5px solid var(--border); background: var(--input-bg);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  overflow: hidden;
}
.affix:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(61,214,181,0.14); }
.affix .pre, .affix .suf {
  padding: 0 11px; color: var(--muted); font-weight: 600; font-size: 13.5px;
  display: grid; place-items: center; height: 100%;
  background: var(--chip-bg);
}
.affix .suf { border-left: 1px solid var(--border); }
.affix .pre { border-right: 1px solid var(--border); }
.affix input {
  border: 0; outline: 0; background: transparent; flex: 1; min-width: 0;
  height: 100%; padding: 0 12px; font-family: "DM Mono", monospace;
  font-size: 14px; color: var(--text); font-weight: 500;
}
.affix.plain input { font-family: "DM Sans", sans-serif; }
.cfg-time { width: auto; }

/* ---------- toggle switch ---------- */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 4px 0; }
.switch {
  appearance: none; border: 0; cursor: pointer; flex: none;
  width: 44px; height: 26px; border-radius: 999px;
  background: var(--border-strong); position: relative;
  transition: background 0.2s ease;
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 5px -1px rgba(10,22,40,0.3);
  transition: transform 0.2s cubic-bezier(.4,0,.2,1);
}
.switch.on { background: var(--accent); }
.switch.on::after { transform: translateX(18px); }

/* small inline segmented control */
.cfg-seg {
  display: inline-flex; background: var(--chip-bg); border-radius: 10px; padding: 3px; gap: 3px;
  border: 1px solid var(--border); flex-wrap: wrap;
}
.cfg-seg button {
  appearance: none; border: 0; cursor: pointer; font-family: inherit;
  font-size: 12.5px; font-weight: 600; color: var(--muted);
  padding: 7px 13px; border-radius: 7px; transition: all 0.16s ease;
}
.cfg-seg button:hover { color: var(--text); }
.cfg-seg button.on { background: var(--widget-bg); color: var(--text); box-shadow: 0 2px 6px -2px rgba(10,22,40,0.18); }
[data-theme="dark"] .cfg-seg button.on { background: #1d3047; color: #fff; }

/* slider in config */
.cfg-slider-wrap { margin-top: 6px; }
.cfg-slider-val { font-family: "DM Mono", monospace; font-weight: 600; color: var(--accent-strong); font-size: 13px; }

/* ---------- tables ---------- */
.cfg-table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 13px; }
.cfg-table th {
  text-align: left; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--faint); padding: 8px 10px; border-bottom: 1px solid var(--border);
}
.cfg-table th.center, .cfg-table td.center { text-align: center; }
.cfg-table td { padding: 9px 10px; border-bottom: 1px solid var(--border); color: var(--text); vertical-align: middle; }
.cfg-table tr:last-child td { border-bottom: 0; }
.cfg-table .zone-name { font-weight: 600; }
.mini-affix {
  display: inline-flex; align-items: center; height: 34px; border-radius: 8px;
  border: 1.5px solid var(--border); background: var(--input-bg); overflow: hidden; max-width: 110px;
}
.mini-affix:focus-within { border-color: var(--accent); }
.mini-affix .pre { padding: 0 8px; color: var(--muted); font-weight: 600; font-size: 12px; background: var(--chip-bg); height: 100%; display: grid; place-items: center; border-right: 1px solid var(--border); }
.mini-affix input { border: 0; outline: 0; background: transparent; width: 56px; height: 100%; padding: 0 8px; font-family: "DM Mono", monospace; font-size: 13px; color: var(--text); }

/* vehicle types & pricing table */
.vt-scroll { overflow-x: auto; margin-top: 4px; }
.vt-table { min-width: 760px; }
.vt-table th, .vt-table td { padding: 10px 9px; }
.vt-name { display: flex; align-items: center; gap: 10px; font-weight: 600; white-space: nowrap; }
.vt-ic { color: var(--accent-strong); display: grid; place-items: center; flex: none; }
.vt-table .mini-affix { max-width: 96px; height: 32px; }
.vt-table .mini-affix input { width: 55px; font-size: 12.5px; }
.vt-unlim { color: var(--muted); font-size: 12.5px; }
.vt-notes { color: var(--muted); font-size: 12px; max-width: 150px; white-space: normal; line-height: 1.35; }
.vt-off { opacity: 0.55; }
.vt-off .vt-ic { filter: grayscale(1); }
.truck-options-panel {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--input-bg);
}
.truck-param-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.truck-param-field {
  display: grid;
  gap: 6px;
}
.truck-param-field > span:first-child {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
}
.truck-param-field .mini-affix {
  width: 100%;
  max-width: none;
}
.truck-param-field .mini-affix input {
  width: 100%;
}
.truck-choice-section {
  margin-top: 16px;
}
.truck-haz-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px 12px;
  margin-top: 9px;
}
.truck-check {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
}
.truck-check span {
  overflow-wrap: anywhere;
}
.truck-choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
}
.truck-choice-row button {
  appearance: none;
  cursor: pointer;
  height: 32px;
  min-width: 48px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--widget-bg);
  color: var(--muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
}
.truck-choice-row button.on {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}
.link-add {
  appearance: none; border: 0; background: transparent; cursor: pointer; padding: 0;
  color: var(--accent-strong); font-weight: 700; font-size: 13.5px; font-family: inherit;
  display: inline-flex; align-items: center; gap: 6px;
}
.link-add:hover { color: var(--accent); }
.vt-note { font-size: 11.5px; color: var(--faint); font-style: italic; }

/* checkbox */
.cbx {
  appearance: none; width: 20px; height: 20px; border-radius: 6px; cursor: pointer;
  border: 1.5px solid var(--border-strong); background: var(--input-bg); position: relative;
  transition: all 0.15s ease; vertical-align: middle;
}
.cbx:checked { background: var(--accent); border-color: var(--accent); }
.cbx:checked::after {
  content: ""; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px;
  border: solid var(--accent-ink); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}

/* promo / holiday list */
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--chip-bg); border: 1px solid var(--border);
  border-radius: 9px; padding: 7px 9px 7px 12px; font-size: 13px; color: var(--text);
}
.chip .chip-meta { color: var(--muted); font-family: "DM Mono", monospace; font-size: 12px; }
.chip .chip-x {
  appearance: none; border: 0; background: transparent; cursor: pointer; color: var(--faint);
  display: grid; place-items: center; padding: 2px; border-radius: 5px;
}
.chip .chip-x:hover { color: #e5484d; background: color-mix(in srgb, #e5484d 12%, transparent); }
.add-row { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.add-row .affix { height: 38px; }
.btn-ghost {
  appearance: none; cursor: pointer; font-family: inherit; font-size: 13px; font-weight: 600;
  border: 1.5px solid var(--border-strong); background: var(--widget-bg); color: var(--text);
  padding: 0 14px; height: 38px; border-radius: 9px; display: inline-flex; align-items: center; gap: 7px;
  transition: all 0.15s ease;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-strong); }

.btn-upgrid {
  appearance: none; cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 700;
  border: 0; background: #7C5CFF; color: #fff; margin-top: 14px;
  padding: 0 18px; height: 46px; border-radius: 11px; display: inline-flex; align-items: center; gap: 9px;
  box-shadow: 0 10px 24px -10px rgba(124,92,255,0.6); transition: all 0.15s ease;
}
.btn-upgrid:hover { background: #6b49f0; transform: translateY(-1px); }
.link-upgrid {
  appearance: none; border: 0; background: transparent; cursor: pointer; padding: 0;
  color: #7C5CFF; font-weight: 600; font-size: 13px; font-family: inherit;
  display: inline-flex; align-items: center; gap: 5px;
}
.link-upgrid:hover { text-decoration: underline; }

/* sub-block inside a field (revealed by toggle) */
.subblock {
  margin-top: 12px; padding: 14px; border-radius: 11px;
  background: var(--input-bg); border: 1px solid var(--border);
}
.subblock-title { font-size: 12px; font-weight: 700; color: var(--text); margin-bottom: 10px; letter-spacing: 0.01em; }

/* ---------- bottom save bar ---------- */
.cfg-foot {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 24px; border-top: 1px solid var(--border);
  background: var(--widget-bg);
}
.btn-save {
  appearance: none; cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 700;
  border: 0; background: var(--accent); color: var(--accent-ink);
  padding: 0 22px; height: 46px; border-radius: 11px; display: inline-flex; align-items: center; gap: 8px;
  box-shadow: 0 10px 24px -10px rgba(61,214,181,0.6); transition: all 0.14s ease;
}
.btn-save:hover { background: var(--accent-strong); transform: translateY(-1px); }
.btn-outline {
  appearance: none; cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 600;
  border: 1.5px solid var(--border-strong); background: transparent; color: var(--text);
  padding: 0 18px; height: 46px; border-radius: 11px; display: inline-flex; align-items: center; gap: 8px;
  transition: all 0.14s ease;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent-strong); }
.settings-io {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--chip-bg);
  margin-top: 12px;
}
.settings-io-btn {
  appearance: none;
  cursor: pointer;
  height: 22px;
  width: 100%;
  justify-content: center;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.14s ease, background 0.14s ease;
}
.settings-io-btn:hover {
  background: var(--widget-bg);
  color: var(--text);
}
.saved-ts { font-size: 12px; color: var(--muted); text-align: center; }
.saved-ts b { color: var(--text); font-weight: 600; }
.foot-spacer { flex: 1; }
.foot-badge { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.foot-badge .here-logo { font-size: 9px; padding: 2px 5px; }
.foot-badge a {
  font-size: 11.5px; 
  font-weight: 700;
  color: var(--text); 
  cursor: pointer;
  text-decoration: none;
}
.foot-badge a:hover {
  transition: 0.2s;
  transform: translateY(-2px);
  text-decoration: none;
}
.gold-dot { 
  /* color: #E0B23C;  */
  font-weight: 700; 
}

@media (max-width: 1040px) {
  .fgrid { grid-template-columns: minmax(0, 1fr); }
  .truck-param-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .truck-haz-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 920px) {
  .cfg { grid-template-columns: 1fr; }
  .cfg-side { display: none; }
  .fgrid { grid-template-columns: 1fr; }
  .cfg-main { max-height: none; }
}
@media (max-width: 560px) {
  .truck-param-grid, .truck-haz-grid { grid-template-columns: minmax(0, 1fr); }
}
/* ============ HERE-powered sections ============ */
/* HERE accent on suite sections */
.acc.here.open .acc-num { background: var(--here); color: #fff; }
.nav-item.here.on { background: color-mix(in srgb, var(--here) 13%, transparent); }
.nav-item.here.on .nav-num { background: var(--here); color: #fff; }

/* accordion header API badge — sits inline after the title; description spans full width below */
.acc-badge { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.api-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; font-weight: 600; color: var(--muted);
  background: var(--chip-bg); border: 1px solid var(--border);
  padding: 3px 8px 3px 8px; border-radius: 999px; white-space: nowrap;
}
.api-badge .here-logo { font-size: 8.5px; padding: 2px 4px; }
.here-logo.lg { font-size: 12px; padding: 4px 7px; }
.ent-badge {
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: #fff; background: #6A4DD6; padding: 3px 7px; border-radius: 999px; white-space: nowrap;
}
.ent-badge.ai { background: linear-gradient(90deg, #6A4DD6, #2B6FDB); }

@media (max-width: 720px) { .acc-badge { display: none; } }

/* info dot tooltip */
.info-dot {
  display: inline-grid; place-items: center; width: 15px; height: 15px; vertical-align: middle;
  color: var(--faint); cursor: help; position: relative; border-radius: 50%;
}
.info-dot:hover, .info-dot:focus { color: var(--accent-strong); outline: none; }
.info-pop {
  position: absolute; bottom: calc(100% + 7px); left: 50%; transform: translateX(-50%) translateY(4px);
  width: max-content; max-width: 220px; white-space: normal; text-align: left;
  background: var(--navy); color: #fff; font-size: 11px; font-weight: 500; line-height: 1.4;
  padding: 8px 10px; border-radius: 8px; box-shadow: 0 12px 28px -10px rgba(10,22,40,0.5);
  opacity: 0; pointer-events: none; transition: opacity 0.15s ease, transform 0.15s ease; z-index: 50;
}
.info-pop::after { content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 5px solid transparent; border-top-color: var(--navy); }
.info-dot:hover .info-pop, .info-dot:focus .info-pop { opacity: 1; transform: translateX(-50%) translateY(0); }
[data-theme="dark"] .info-pop { background: #1d3047; }
[data-theme="dark"] .info-pop::after { border-top-color: #1d3047; }

/* gated (section off) */
.gated { transition: opacity 0.2s ease; }
.gated.off { opacity: 0.4; pointer-events: none; filter: grayscale(0.5); }

/* radio row */
.radio-row { display: flex; flex-wrap: wrap; gap: 10px; }
.radio { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: var(--text); padding: 7px 12px; border: 1.5px solid var(--border); border-radius: 9px; background: var(--input-bg); transition: all 0.15s ease; }
.radio:hover { border-color: var(--border-strong); }
.radio.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--input-bg)); }
.radio input { display: none; }
.radio-dot { width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid var(--border-strong); flex: none; position: relative; transition: all 0.15s ease; }
.radio.on .radio-dot { border-color: var(--accent); }
.radio.on .radio-dot::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--accent); }

/* option cards */
.opt-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.opt-cards.three { grid-template-columns: repeat(3, 1fr); }
.subsec-title { font-size: 13.5px; font-weight: 700; color: var(--text); letter-spacing: -0.01em; margin: 22px 0 4px; }
.subsec-title:first-child { margin-top: 4px; }
.cbx-row { display: flex; align-items: flex-start; gap: 11px; margin-top: 10px; cursor: pointer; }
.cbx-row .cbx { margin-top: 1px; flex: none; }
.cbx-row .cbx-text { display: flex; flex-direction: column; gap: 2px; }
.cbx-row .cbx-text b { font-size: 13.5px; font-weight: 600; color: var(--text); }
.cbx-row .cbx-text span { font-size: 12px; color: var(--muted); line-height: 1.4; }
.opt-card {
  appearance: none; text-align: left; cursor: pointer; font-family: inherit;
  border: 1.5px solid var(--border); background: var(--input-bg); border-radius: 13px; padding: 15px;
  display: flex; flex-direction: column; gap: 7px; transition: all 0.16s ease; position: relative;
}
.opt-card:hover { border-color: var(--border-strong); }
.opt-card.sel { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--input-bg)); box-shadow: 0 0 0 3px rgba(61,214,181,0.12); }
.opt-card.locked { cursor: not-allowed; opacity: 0.7; }
.opt-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 22px; }
.opt-title { font-size: 14.5px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 7px; }
.opt-check { color: var(--accent-strong); display: inline-grid; place-items: center; }
.opt-desc { font-size: 12px; color: var(--muted); line-height: 1.45; }
.opt-tag { font-size: 10px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; padding: 3px 7px; border-radius: 999px; }
.opt-tag.rec { color: var(--accent-ink); background: var(--accent); }
.opt-tag.ent { color: #fff; background: #6A4DD6; }
.opt-emoji { font-size: 20px; color: var(--accent-strong); width: 26px; display: grid; place-items: center; }
.opt-lock { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); margin-top: 2px; }

/* dual range slider */
.dual { position: relative; height: 40px; margin-top: 6px; }
.dual-track { position: absolute; top: 9px; left: 0; right: 0; height: 8px; border-radius: 999px; background: var(--chip-bg); }
.dual-fill { position: absolute; top: 0; bottom: 0; background: var(--accent); border-radius: 999px; }
.dual-input { position: absolute; top: 0; left: 0; width: 100%; height: 22px; margin: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; }
.dual-input::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; pointer-events: auto; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 4px solid var(--accent); box-shadow: 0 3px 8px -2px rgba(10,22,40,0.35); cursor: grab; }
.dual-input::-moz-range-thumb { pointer-events: auto; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 4px solid var(--accent); box-shadow: 0 3px 8px -2px rgba(10,22,40,0.35); cursor: grab; }
.dual-labels { position: absolute; top: 26px; left: 0; right: 0; display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); font-family: "DM Mono", monospace; }

/* mini traffic map */
.mini-map { position: relative; height: 132px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: var(--input-bg); margin-top: 10px; }
.mm-chip { position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 600; color: var(--text); background: var(--widget-bg); border: 1px solid var(--border); padding: 4px 9px; border-radius: 999px; }
.mm-pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(61,214,181,0.6); animation: mmpulse 1.8s infinite; }
@keyframes mmpulse { 0% { box-shadow: 0 0 0 0 rgba(61,214,181,0.5); } 70% { box-shadow: 0 0 0 7px rgba(61,214,181,0); } 100% { box-shadow: 0 0 0 0 rgba(61,214,181,0); } }
.mm-legend { position: absolute; bottom: 10px; right: 10px; display: flex; gap: 10px; font-size: 10px; color: var(--text); background: var(--widget-bg); border: 1px solid var(--border); padding: 4px 9px; border-radius: 999px; }
.mm-legend span { display: inline-flex; align-items: center; gap: 4px; }
.mm-legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }

/* demand calendar */
.demand-cal { margin-top: 10px; }
.dc-grid { display: grid; grid-template-columns: 52px repeat(7, 1fr); gap: 4px; }
.dc-corner {}
.dc-day { font-size: 10.5px; font-weight: 700; color: var(--muted); text-align: center; padding-bottom: 2px; }
.dc-band { font-size: 10px; color: var(--faint); font-family: "DM Mono", monospace; display: flex; align-items: center; }
.dc-cell { height: 28px; border-radius: 6px; position: relative; }
.dc-cell.hot { outline: 2px solid #E5484D; outline-offset: -2px; }
.dc-tag { position: absolute; inset: 0; display: grid; place-items: center; font-size: 9.5px; font-weight: 800; color: #B42318; }
[data-theme="dark"] .dc-tag { color: #fff; }
.dc-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; flex-wrap: wrap; gap: 8px; }
.dc-legend { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); }
.dc-legend i { width: 14px; height: 12px; border-radius: 3px; display: inline-block; }

/* sub-tabs */
.subtabs { display: flex; gap: 4px; background: var(--chip-bg); border-radius: 11px; padding: 4px; margin: 14px 0; border: 1px solid var(--border); }
.subtab { flex: 1; appearance: none; border: 0; cursor: pointer; font-family: inherit; font-size: 13px; font-weight: 600; color: var(--muted); padding: 9px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; transition: all 0.16s ease; }
.subtab:hover { color: var(--text); }
.subtab.on { background: var(--widget-bg); color: var(--text); box-shadow: 0 2px 6px -2px rgba(10,22,40,0.18); }
[data-theme="dark"] .subtab.on { background: #1d3047; color: #fff; }

/* metric pill */
.metric-pill { display: inline-flex; align-items: baseline; gap: 10px; }
.metric-val { font-size: 24px; font-weight: 700; color: var(--text); font-family: "DM Mono", monospace; }
.metric-trend { font-size: 12px; font-weight: 600; }
.metric-trend.up { color: var(--accent-strong); }

/* fleet status */
.fleet-status { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-top: 14px; padding: 14px 16px; background: var(--input-bg); border: 1px solid var(--border); border-radius: 12px; }
.fs-item { display: flex; flex-direction: column; gap: 5px; }
.status-badge { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.status-badge.ok { color: #1B8A5A; background: color-mix(in srgb, #27B36B 14%, transparent); }
[data-theme="dark"] .status-badge.ok { color: #4ED99A; }
.sb-dot { width: 7px; height: 7px; border-radius: 50%; background: #27B36B; }
.status-count { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 700; color: var(--text); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(61,214,181,0.6); animation: mmpulse 1.8s infinite; flex: none; }
.live-dot.lg { width: 10px; height: 10px; }
.fleet-status .btn-ghost { margin-left: auto; }

/* courier preview card */
.courier-preview { display: flex; align-items: center; gap: 13px; margin-top: 10px; padding: 14px 16px; background: var(--navy); border-radius: 12px; color: #fff; }
.cp-ic { width: 38px; height: 38px; border-radius: 10px; background: rgba(61,214,181,0.16); color: var(--accent); display: grid; place-items: center; flex: none; }
.cp-text { display: flex; flex-direction: column; gap: 2px; }
.cp-text b { font-size: 14px; }
.cp-text span { font-size: 12px; color: #9fb0c2; }
.courier-preview .live-dot.lg { margin-left: auto; }

/* receipt preview line */
.receipt-preview { margin-top: 12px; padding: 12px 14px; background: var(--input-bg); border: 1px dashed var(--border-strong); border-radius: 10px; }
.rp-label { font-size: 10.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--faint); }
.rp-line { display: flex; justify-content: space-between; margin-top: 6px; font-size: 13px; color: var(--text); }
.rp-amt { font-family: "DM Mono", monospace; font-weight: 600; }

/* info box */
.info-box { margin-top: 16px; padding: 14px 16px; background: color-mix(in srgb, var(--here) 7%, var(--input-bg)); border: 1px solid color-mix(in srgb, var(--here) 26%, var(--border)); border-radius: 12px; font-size: 12.5px; color: var(--text); line-height: 1.5; }
.info-box-cov { display: block; margin-top: 7px; font-size: 11.5px; color: var(--muted); }

/* section note */
.section-note { display: flex; align-items: flex-start; gap: 9px; margin-top: 16px; padding: 12px 14px; background: var(--chip-bg); border-radius: 11px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.section-note svg { flex: none; margin-top: 1px; color: var(--accent-strong); }
.section-note b { color: var(--text); font-weight: 600; }

/* geofencing notification cards */
.geofence-stack {
  display: grid;
  gap: 14px;
  margin-top: 12px;
}
.gf-disclosure {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--input-bg);
  margin-top: 14px;
  overflow: hidden;
}
.gf-disclosure-head {
  appearance: none;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.gf-disclosure-chev {
  color: var(--faint);
  display: grid;
  place-items: center;
  transition: transform 0.2s ease;
}
.gf-disclosure.open .gf-disclosure-chev {
  transform: rotate(180deg);
}
.gf-disclosure-body {
  border-top: 1px solid var(--border);
  padding: 14px;
}
.gf-provider-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.gf-provider-card {
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--widget-bg);
  padding: 13px;
}
.gf-provider-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.gf-provider-head b {
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.3;
}
.gf-status-badge {
  white-space: nowrap;
  color: var(--muted);
  background: var(--chip-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 10.5px;
  font-weight: 700;
}
.gf-provider-fields {
  display: grid;
  gap: 10px;
}
.gf-config-field {
  display: grid;
  gap: 6px;
}
.gf-config-field span {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
}
.gf-config-field input {
  width: 100%;
  height: 38px;
  border-radius: 9px;
  border: 1.5px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  outline: 0;
  padding: 0 11px;
  font-family: inherit;
  font-size: 13px;
}
.gf-config-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(61,214,181,0.12);
}
.gf-outline-btn {
  appearance: none;
  cursor: pointer;
  height: 36px;
  border-radius: 9px;
  border: 1.5px solid var(--border-strong);
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.gf-outline-btn:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}
.gf-cost-note {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 11px;
}
.gf-vars p {
  margin: 0 0 11px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}
.gf-vars-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
}
.gf-var-row {
  display: grid;
  grid-template-columns: minmax(132px, max-content) minmax(0, 1fr);
  align-items: baseline;
  gap: 10px;
  color: var(--muted);
  font-size: 12.5px;
}
.gf-var-row code {
  color: var(--accent-strong);
  font-family: "DM Mono", monospace;
  font-size: 12px;
}
.gf-map-preview {
  margin-top: 14px;
}
.gf-map-title {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.gf-preview-map {
  position: relative;
  height: 182px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--input-bg);
}
.gf-zone,
.gf-map-point,
.gf-map-van {
  position: absolute;
}
.gf-zone {
  display: grid;
  place-items: center;
  border-radius: 50%;
  pointer-events: none;
}
.gf-zone span {
  border-radius: 999px;
  padding: 3px 7px;
  background: var(--widget-bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: "DM Mono", monospace;
  font-size: 10.5px;
  font-weight: 700;
}
.gf-zone-departure {
  left: 12%;
  top: 51%;
  width: 14%;
  aspect-ratio: 1;
  background: color-mix(in srgb, #27B36B 17%, transparent);
  border: 2px solid #27B36B;
}
.gf-zone-approach {
  left: 67%;
  top: 13%;
  width: 21%;
  aspect-ratio: 1;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  border: 2px solid var(--accent);
  animation: gfPulse 1.9s infinite;
}
.gf-zone-complete {
  left: 80%;
  top: 20%;
  width: 10%;
  aspect-ratio: 1;
  background: color-mix(in srgb, #E5484D 14%, transparent);
  border: 2px solid #E5484D;
}
@keyframes gfPulse {
  0% { box-shadow: 0 0 0 0 rgba(61,214,181,0.34); }
  70% { box-shadow: 0 0 0 13px rgba(61,214,181,0); }
  100% { box-shadow: 0 0 0 0 rgba(61,214,181,0); }
}
.gf-map-point {
  color: var(--text);
  background: var(--widget-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 10.5px;
  font-weight: 700;
  box-shadow: 0 6px 14px -10px rgba(10,22,40,0.4);
}
.gf-restaurant {
  left: 7%;
  top: 76%;
}
.gf-address {
  right: 6%;
  top: 12%;
}
.gf-map-van {
  left: 48%;
  top: 43%;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--accent-ink);
  background: var(--accent);
  box-shadow: 0 9px 18px -10px rgba(10,22,40,0.5);
}
.gf-map-caption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.geofence-card {
  border: 1.5px solid var(--border);
  background: var(--input-bg);
  border-radius: 13px;
  overflow: hidden;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.geofence-card.highlight {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(61,214,181,0.12);
  background: color-mix(in srgb, var(--accent) 5%, var(--input-bg));
}
.gf-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 15px;
  border-bottom: 1px solid var(--border);
}
.gf-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex: none;
  color: var(--here);
  background: color-mix(in srgb, var(--here) 10%, var(--widget-bg));
  border: 1px solid color-mix(in srgb, var(--here) 20%, var(--border));
}
.geofence-card.highlight .gf-icon {
  color: var(--accent-strong);
  background: color-mix(in srgb, var(--accent) 13%, var(--widget-bg));
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}
.gf-card-title {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.gf-card-title b {
  color: var(--text);
  font-size: 14.5px;
  letter-spacing: -0.01em;
}
.gf-card-title span {
  color: var(--muted);
  font-size: 12.2px;
  line-height: 1.35;
}
.gf-card-body {
  padding: 15px;
  transition: opacity 0.18s ease;
}
.gf-card-body.disabled {
  opacity: 0.42;
  pointer-events: none;
}
.gf-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 13px;
}
.gf-small-label {
  display: block;
  color: var(--faint);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.gf-detail-text {
  display: block;
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}
.gf-inline-radius {
  display: inline-flex;
  align-items: center;
  height: 26px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--widget-bg);
  padding: 0 6px;
  font-family: "DM Mono", monospace;
  font-size: 12px;
  font-weight: 600;
}
.gf-inline-radius input {
  width: 38px;
  border: 0;
  outline: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
}
.gf-message {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 12px;
}
.gf-message span {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}
.gf-message textarea {
  width: 100%;
  min-height: 84px;
  resize: vertical;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--widget-bg);
  color: var(--text);
  outline: 0;
  padding: 10px 12px;
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  line-height: 1.45;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.gf-message textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(61,214,181,0.14);
}
.gf-channel-block {
  margin-top: 13px;
}
.gf-channels {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}
.gf-channel {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
}
.gf-channel .cbx {
  flex: none;
}
.gf-radius {
  margin: 2px 0 13px;
}
.gf-map {
  position: relative;
  height: 128px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--widget-bg);
  margin: 10px 0 13px;
}
.gf-map-circle {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 17%, transparent);
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 7px color-mix(in srgb, var(--accent) 9%, transparent);
}
.gf-map-pin {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 28px;
  height: 28px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--accent-ink);
  background: var(--accent);
  box-shadow: 0 7px 16px -7px rgba(10,22,40,0.45);
}
.gf-map-label {
  position: absolute;
  left: 10px;
  top: 10px;
  max-width: calc(100% - 20px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
  background: var(--widget-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 600;
}
.gf-extra-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0 0;
  margin-top: 12px;
  border-top: 1px solid var(--border);
}

@media (max-width: 720px) {
  .gf-provider-grid, .gf-vars-grid { grid-template-columns: 1fr; }
  .gf-var-row { grid-template-columns: 1fr; gap: 3px; }
  .gf-detail-grid { grid-template-columns: 1fr; }
  .gf-card-head { align-items: flex-start; }
  .gf-extra-switch { align-items: flex-start; flex-direction: column; }
}

/* integrations */
.integration-hero-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.integration-headline {
  margin-top: 10px;
  padding: 13px 14px;
  border-radius: 8px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.45;
}
.integration-hero-row .integration-headline {
  flex: 1 1 auto;
  margin-top: 0;
}
.integration-api-btn {
  appearance: none;
  cursor: pointer;
  flex: none;
  height: 40px;
  border-radius: 8px;
  border: 1.5px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 900;
}
.integration-api-btn:hover { filter: brightness(0.97); }
.integration-grid {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}
.integration-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.integration-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.integration-card {
  border: 1px solid var(--border);
  background: var(--input-bg);
  border-radius: 8px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}
.integration-card-head {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.integration-logo, .integration-icon {
  min-height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  padding: 5px 9px;
  background: var(--widget-bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 800;
  font-size: 12px;
}
.integration-logo.stripe { color: #635BFF; }
.integration-logo.square { color: #111; }
.integration-logo.toast { color: #D95E26; }
.integration-logo.shopify { color: #1B8A3D; }
.integration-logo.woo { color: #7F54B3; }
.integration-logo.samsara { color: #1F6FEB; }
.integration-logo.motive { color: #111827; }
[data-theme="dark"] .integration-logo.square,
[data-theme="dark"] .integration-logo.motive { color: #fff; }
.integration-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}
.integration-card > b {
  color: var(--text);
  font-size: 13.5px;
}
.integration-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
  color: var(--accent-strong);
  padding: 4px 8px;
  font-size: 10.5px;
  font-weight: 800;
}
.integration-outline-btn {
  appearance: none;
  cursor: pointer;
  height: 36px;
  border-radius: 8px;
  border: 1.5px solid var(--accent);
  background: transparent;
  color: var(--accent-strong);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 800;
  padding: 0 12px;
}
.integration-outline-btn:hover {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}
.integration-connected {
  color: #1B8A5A;
  background: color-mix(in srgb, #27B36B 12%, transparent);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11.5px;
  font-weight: 700;
}
.integration-switch-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
}
.integration-field {
  width: 100%;
  display: grid;
  gap: 6px;
}
.integration-field span, .integration-note {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
}
.integration-field input {
  width: 100%;
  height: 38px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--widget-bg);
  color: var(--text);
  outline: 0;
  padding: 0 10px;
  font-family: inherit;
  font-size: 13px;
}
.integration-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 800;
}
.integration-link.as-button {
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  text-align: left;
}
.integration-link.teal, .integration-link:hover { color: var(--accent-strong); }
.integration-details {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--widget-bg);
  overflow: hidden;
}
.integration-details summary {
  cursor: pointer;
  padding: 9px 10px;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}
.integration-details pre {
  margin: 0;
  padding: 10px;
  border-top: 1px solid var(--border);
  overflow-x: auto;
  color: var(--text);
  font-family: "DM Mono", monospace;
  font-size: 11.5px;
  line-height: 1.45;
}

/* API access dashboard */
.api-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(8, 16, 28, 0.58);
}
.api-modal {
  width: min(1120px, 100%);
  max-height: min(88vh, 920px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--page-bg);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}
.api-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--widget-bg);
}
.api-modal-head h2 {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 20px;
}
.api-modal-eyebrow {
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.api-modal-close {
  appearance: none;
  cursor: pointer;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  display: grid;
  place-items: center;
}
.api-modal .api-page {
  min-height: 0;
  overflow: auto;
}
.api-modal-missing {
  padding: 22px;
  color: var(--muted);
}
.api-page {
  padding: 22px 24px 26px;
  background: var(--page-bg);
  display: grid;
  gap: 16px;
}
.api-section, .api-guide {
  background: var(--widget-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px;
}
.api-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.api-section-head.compact { margin-bottom: 10px; }
.api-section h2, .api-guide h2 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  letter-spacing: -0.01em;
}
.api-section p, .api-guide p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.api-outline-btn, .api-solid-btn {
  appearance: none;
  cursor: pointer;
  height: 36px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 800;
  padding: 0 12px;
  white-space: nowrap;
}
.api-outline-btn {
  border: 1.5px solid var(--accent);
  background: transparent;
  color: var(--accent-strong);
}
.api-solid-btn {
  border: 0;
  background: var(--accent);
  color: var(--accent-ink);
}
.api-table-wrap {
  width: 100%;
  overflow-x: auto;
}
.api-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  color: var(--text);
  font-size: 12.5px;
}
.api-table-wrap.small .api-table { min-width: 520px; }
.api-table th {
  text-align: left;
  color: var(--faint);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
}
.api-table td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.api-table button {
  appearance: none;
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--input-bg);
  color: var(--text);
  margin-left: 5px;
  height: 28px;
  padding: 0 9px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
}
.api-key {
  font-family: "DM Mono", monospace;
  color: var(--text);
}
.api-active, .api-ok {
  color: #1B8A5A;
  font-weight: 800;
}
.api-danger {
  color: #D92D20 !important;
}
.api-code-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--input-bg);
}
.api-code-panel summary {
  cursor: pointer;
  padding: 13px 15px;
  color: var(--text);
  font-weight: 800;
}
.api-code-tabs {
  display: flex;
  gap: 5px;
  padding: 0 15px 12px;
  flex-wrap: wrap;
}
.api-code-tabs button {
  appearance: none;
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--widget-bg);
  color: var(--muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  padding: 7px 11px;
}
.api-code-tabs button.on {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
}
.api-code-block {
  margin: 0 15px 14px;
  padding: 16px;
  border-radius: 8px;
  background: #07111E;
  color: #D8E2EF;
  overflow-x: auto;
  font-family: "DM Mono", "JetBrains Mono", monospace;
  font-size: 12px;
  line-height: 1.6;
}
.api-response-label {
  margin: 0 15px 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.api-response-block {
  margin: 0 15px 15px;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--widget-bg);
  color: var(--text);
  overflow-x: auto;
  font-family: "DM Mono", monospace;
  font-size: 12px;
  line-height: 1.55;
}
.api-webhook-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: end;
}
.api-field {
  display: grid;
  gap: 6px;
}
.api-field.wide { grid-column: span 1; }
.api-field span, .api-label {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 800;
}
.api-field input {
  height: 38px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  padding: 0 11px;
  font-family: "DM Mono", monospace;
  font-size: 12.5px;
}
.api-events {
  margin-top: 16px;
  display: grid;
  gap: 8px;
}
.api-event-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 12.5px;
}
.api-event-row span { color: var(--muted); }
.api-table-caption {
  margin: 16px 0 7px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 800;
}
.api-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.api-stat {
  border: 1px solid var(--border);
  background: var(--input-bg);
  border-radius: 8px;
  padding: 14px;
  display: grid;
  gap: 7px;
}
.api-stat span, .api-stat small {
  color: var(--muted);
  font-size: 12px;
}
.api-stat b {
  color: var(--text);
  font-family: "DM Mono", monospace;
  font-size: 22px;
}
.api-stat em, .api-stat a {
  color: var(--accent-strong);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  text-decoration: none;
}
.api-progress {
  height: 8px;
  border-radius: 999px;
  background: var(--chip-bg);
  overflow: hidden;
  border: 1px solid var(--border);
}
.api-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}
.api-guide {
  background: color-mix(in srgb, var(--accent) 8%, var(--widget-bg));
  border-color: color-mix(in srgb, var(--accent) 25%, var(--border));
}
.api-guide-label {
  margin-bottom: 8px;
  color: var(--accent-strong);
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.api-flow {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.api-flow span {
  border: 1px solid var(--border);
  background: var(--widget-bg);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}
.api-flow b { color: var(--accent-strong); }
.api-steps {
  margin: 14px 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.api-steps span {
  color: var(--text);
  background: var(--widget-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  font-size: 12.5px;
  font-weight: 700;
}

@media (max-width: 980px) {
  .integration-grid.three, .integration-grid.two, .gf-provider-grid, .api-stats, .api-steps { grid-template-columns: 1fr; }
  .integration-hero-row { flex-direction: column; }
  .integration-api-btn { width: 100%; justify-content: center; }
  .api-webhook-grid { grid-template-columns: 1fr; }
  .api-modal-backdrop { padding: 10px; }
  .api-modal { max-height: 94vh; }
}

/* ============ sync banners + live-config badge ============ */
.sync-banner {
  position: absolute;
    right: 260px;
    top: 136px;
  display: flex; align-items: center; gap: 10px;
  padding: 11px 24px; font-size: 13px; font-weight: 600;
      border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border);
    border-left: 1px solid var(--border);
  
}
.sync-banner svg { flex: none; }
.sync-banner.warn { color: #8A6516; background: #FFF6E0; }
.sync-banner.ok { color: #1B7A4E; background: #E4F8EE; }
[data-theme="dark"] .sync-banner.warn { color: #F2C657; background: #2A2410; }
[data-theme="dark"] .sync-banner.ok { color: #59D89B; background: #0E2A1E; }
.sync-banner .sb-strong { font-weight: 700; }
@keyframes bannerIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.sync-banner { animation: bannerIn 0.25s ease; }

/* live-config badge in customer preview */
.live-config-badge {
      position: absolute;
    bottom: 20px;
    right: 60px;
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 600; color: var(--panel-muted);
  background: var(--panel-surface); border: 1px solid var(--panel-line);
  padding: 5px 11px; border-radius: 999px; white-space: nowrap;
}
.live-config-badge .live-dot { width: 7px; height: 7px; }
.live-config-badge b { color: var(--panel-text); font-weight: 600; font-family: "DM Mono", monospace; }
