﻿:root {
	      --ink: #0f172a;
	      --muted: #475569;
      --line: #d6e0ed;
      --card: #ffffffdd;
      --panel-soft: #f7fbff;
      --panel-soft-2: #eef5ff;
      --bg-a: #f5f7ff;
      --bg-b: #fff7ed;
      --accent: #7c3aed;
      --accent-strong: #5b21b6;
      --accent-soft: #f3e8ff;
      --accent-soft-2: #ede9fe;
      --accent-line: #c4b5fd;
      --ok-bg: #ecfdf3;
      --ok-ink: #065f46;
      --err-bg: #fff1f2;
      --err-ink: #9f1239;
      --warn-bg: #fff7ed;
      --warn-ink: #9a3412;
	      --a: #8b5cf6;
	      --b: #d946ef;
	    }
      body[data-theme="dark"] {
        --ink: #f3e8ff;
        --muted: #ccb6e2;
        --line: #5a3373;
        --card: #15111df0;
        --panel-soft: #1a1323;
        --panel-soft-2: #241631;
        --bg-a: #000000;
        --bg-b: #1b0628;
        --accent: #c026ff;
        --accent-strong: #8f00ff;
        --accent-soft: #34104a;
        --accent-soft-2: #5b1790;
        --accent-line: #c026ff;
        --ok-bg: #052e2b;
        --ok-ink: #a7f3d0;
        --err-bg: #3b0a17;
        --err-ink: #fecdd3;
        --warn-bg: #3a1f0b;
        --warn-ink: #fed7aa;
        --a: #9b00ff;
        --b: #e056fd;
      }
	    * { box-sizing: border-box; }
    html, body {
      max-width: 100%;
      min-height: 100%;
      overflow-x: hidden;
    }
    body {
      margin: 0;
      min-height: 100vh;
      color: var(--ink);
      font-family: "Segoe UI", "Segoe UI Emoji", "Noto Color Emoji", "Apple Color Emoji", Tahoma, Arial, sans-serif;
      background:
        radial-gradient(circle at 8% 8%, #8b5cf622, transparent 34%),
        radial-gradient(circle at 92% 16%, #d946ef22, transparent 28%),
        linear-gradient(125deg, var(--bg-a), var(--bg-b));
      background-attachment: fixed;
    }
    * {
      scrollbar-width: thin;
      scrollbar-color: #94a3b8 #e2e8f0;
    }
    *::-webkit-scrollbar {
      width: 10px;
      height: 10px;
    }
    *::-webkit-scrollbar-track {
      background: #e2e8f0;
      border-radius: 999px;
    }
    *::-webkit-scrollbar-thumb {
      background: linear-gradient(180deg, #94a3b8, #64748b);
      border-radius: 999px;
      border: 2px solid #e2e8f0;
    }
    *::-webkit-scrollbar-thumb:hover {
      background: linear-gradient(180deg, #64748b, #475569);
    }
    .wrap { max-width: 1400px; margin: 0 auto; padding: 14px; width: min(1400px, 100%); min-height: 100vh; }
      .card { background: var(--card); border: 1px solid #0f172a1c; border-radius: 14px; box-shadow: 0 10px 40px #0f172a14; backdrop-filter: blur(12px); }
      body[data-theme="dark"] .card {
        border-color: #4f2a67;
        box-shadow: 0 18px 44px #00000052, inset 0 1px 0 #ffffff08;
      }
    .pad { padding: 12px; }
    .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
    .between { justify-content: space-between; }
    .grid { display: grid; gap: 10px; }
    .kpi { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
    .g2 { grid-template-columns: 1fr 1fr; }
    .g3 { grid-template-columns: 340px 1fr 370px; }
    .muted { color: var(--muted); }
    .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
    .log-hour { color: #facc15; font-weight: 700; }
    .tiny { font-size: 12px; }

	    input, select, textarea, button {
	      border: 1px solid var(--line);
	      border-radius: 14px;
	      padding: 8px 12px;
	      font: inherit;
	      background: #fff;
	      color: var(--ink);
        font-family: "Segoe UI", "Segoe UI Emoji", "Noto Color Emoji", "Apple Color Emoji", Tahoma, Arial, sans-serif;
	    }
	    textarea { width: 100%; min-height: 110px; resize: vertical; }
	    button { cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
      button:hover { transform: translateY(-1px); box-shadow: 0 8px 18px #0f172a14; }
	    button.primary { background: linear-gradient(135deg, var(--accent-strong), var(--accent)); border-color: var(--accent); color: #fff; }
    button.danger { background: #fff1f2; border-color: #f8b4bd; color: #9f1239; }
    button.tab.active { background: linear-gradient(135deg, var(--accent-strong), var(--accent)); border-color: var(--accent); color: #fff; box-shadow: 0 10px 20px #7c3aed24; }

    .notice { padding: 8px 10px; border-radius: 10px; font-size: 13px; margin-bottom: 8px; }
    .notice.ok { background: var(--ok-bg); color: var(--ok-ink); border: 1px solid #99f6c4; }
    .notice.err { background: var(--err-bg); color: var(--err-ink); border: 1px solid #fbcfe8; }
    .notice.warn { background: var(--warn-bg); color: var(--warn-ink); border: 1px solid #fed7aa; }

    .kpi-value { font-size: 25px; font-weight: 700; margin-top: 6px; }
    .dashboard-kpi-grid { display: grid; gap: 10px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .table-wrap { max-height: 430px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
    table { width: 100%; border-collapse: collapse; font-size: 13px; }
    th, td { text-align: left; padding: 7px 8px; border-bottom: 1px solid #e6edf7; vertical-align: top; }
    .list { max-height: 530px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
    .user { width: 100%; text-align: left; border: 0; border-bottom: 1px solid #eef2f7; border-radius: 0; background: transparent; padding: 9px; }
    .user.active { background: linear-gradient(135deg, var(--accent-strong), var(--accent)); color: #fff; }
    .chat { height: 530px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 8px; }
    .msg { max-width: 82%; margin: 6px 0; padding: 8px 10px; border-radius: 10px; white-space: pre-wrap; word-break: break-word; }
    .msg.in { background: #f973161f; }
    .msg.out { background: #0ea5a030; margin-left: auto; }
    .bar-list { display: grid; gap: 7px; }
    .bar-row { display: grid; grid-template-columns: 190px 1fr 115px; gap: 8px; align-items: center; font-size: 12px; }
    .bar { height: 10px; border-radius: 999px; background: linear-gradient(90deg, var(--a), var(--b)); }
    .hour-strip {
      display: flex;
      gap: 8px;
      overflow-x: auto;
      padding-bottom: 4px;
      -webkit-overflow-scrolling: touch;
      scroll-snap-type: x proximity;
    }
    .hour-card {
      flex: 0 0 auto;
      min-width: 150px;
      border: 1px solid #dbe6f0;
      border-radius: 12px;
      padding: 8px 9px;
      background: #fff;
      display: grid;
      gap: 3px;
      scroll-snap-align: start;
    }
    .hour-label { font-weight: 700; font-size: 13px; }
    .hour-sales { font-size: 12px; color: var(--muted); }
    .hour-revenue { font-size: 14px; font-weight: 700; }
    pre { margin: 0; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 8px; max-height: 320px; overflow: auto; white-space: pre-wrap; word-break: break-word; }
    .login-shell { min-height: min(88vh, 900px); display: grid; place-items: center; }
    .login {
      max-width: 460px;
      width: 100%;
      margin: 12px auto 0;
      padding: 20px;
      border-radius: 20px;
      background:
        radial-gradient(circle at 18% 8%, #3b82f61f, transparent 42%),
        linear-gradient(160deg, #ffffffef, #f8fbffec);
    }
    .login-head { text-align: center; margin-bottom: 12px; }
    .login-logo {
      width: 88px;
      height: 88px;
      object-fit: contain;
      border-radius: 22px;
      border: 1px solid #dbe6f5;
      box-shadow: 0 18px 34px #0f172a1a;
      background: #fff;
      padding: 6px;
    }
    .login-subtitle { margin-top: 8px; font-size: 12px; color: var(--muted); }
    .login-form { display: grid; gap: 8px; }
    .login-form input, .login-form button { width: 100%; }
    .brand-logo {
      width: 42px;
      height: 42px;
      object-fit: contain;
      border-radius: 12px;
      border: 1px solid #d8e3f2;
      background: #fff;
      padding: 3px;
      box-shadow: 0 8px 18px #0f172a14;
      flex: 0 0 auto;
    }
    .brand-head { display: flex; gap: 10px; align-items: center; }
    .wrap-id { display: block; white-space: normal; word-break: break-all; max-width: 100%; }
    .ops-shell .row, .media-shell .row { align-items: stretch; }
    .ops-shell .row > *, .media-shell .row > * { min-width: 0; }
    .ops-shell .card { position: relative; overflow: visible; }
    .ops-shell .table-wrap,
    .media-shell .table-wrap,
    .audit-shell .table-wrap { max-height: min(calc(100vh - 280px), 520px); }
    .compact-scroll {
      max-height: 300px;
      overflow: auto;
      padding-right: 4px;
    }
    .compact-scroll.tight {
      max-height: 250px;
    }
    .compact-scroll.bars-four {
      max-height: 172px;
    }
    .compact-scroll .bar-list {
      padding-right: 2px;
    }
    .compact-upload-card {
      display: grid;
      gap: 8px;
    }
    .upload-grid-tight {
      display: grid;
      gap: 8px;
      grid-template-columns: 150px minmax(0, 1fr);
    }
    .file-picker-row {
      display: flex;
      gap: 8px;
      align-items: center;
      min-width: 0;
      flex-wrap: wrap;
    }
    .ops-upload-row,
    .library-file-row {
      flex-wrap: nowrap;
      align-items: center;
    }
    .ops-upload-row .file-picker-label,
    .library-file-row .file-picker-label {
      flex: 0 0 auto;
    }
    .ops-upload-row .file-picker-name,
    .library-file-row .file-picker-name {
      flex: 1 1 0;
    }
    .ops-upload-row button {
      flex: 0 0 auto;
      white-space: nowrap;
    }
    .file-input-hidden {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      border: 0;
    }
    .file-picker-label {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 132px;
      padding: 8px 12px;
      border-radius: 14px;
      border: 1px solid var(--line);
      background: #fff;
      cursor: pointer;
      white-space: nowrap;
    }
    .file-picker-name {
      flex: 1 1 180px;
      min-width: 0;
      border: 1px solid #dbe6f0;
      border-radius: 14px;
      padding: 8px 10px;
      background: #f8fbff;
      font-size: 12px;
      color: var(--muted);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .ops-inline-controls {
      display: flex;
      gap: 8px;
      align-items: center;
      flex-wrap: nowrap;
    }
    .ops-inline-controls label {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      white-space: nowrap;
      min-width: 0;
    }
    .ops-inline-controls > * {
      min-width: 0;
      flex: 1 1 0;
    }
    .ops-inline-controls button {
      flex: 0 0 auto;
    }
    .weight-strip {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 8px;
      margin: 8px 0 10px;
    }
    .weight-box {
      border: 1px solid #dbe6f0;
      border-radius: 12px;
      padding: 9px 10px;
      background: #fff;
      display: grid;
      gap: 4px;
    }
    .weight-box.active {
      background: linear-gradient(180deg, #eff6ff, #dbeafe);
      border-color: #93c5fd;
    }
    .weight-box input {
      width: 100%;
      text-align: center;
      font-size: 18px;
      font-weight: 700;
      padding: 7px 8px;
      border-radius: 10px;
    }
    .weight-save-row {
      display: flex;
      justify-content: flex-end;
      margin-top: 8px;
    }
    .dashboard-kpi-revenue .card {
      background: var(--card);
      border: 1px solid #ffffff;
      box-shadow:
        0 0 0 1px #ffffff66,
        0 0 18px #8b5cf63d,
        0 0 34px #d946ef2a,
        0 10px 40px #0f172a14;
    }
    .dashboard-kpi-revenue .muted.tiny:first-child {
      color: #5b1790;
      font-weight: 700;
      text-align: left;
    }
    .dashboard-kpi-revenue .kpi-value {
      font-size: 25px;
      text-align: left;
      color: #241330;
      font-weight: 900;
    }
    .dashboard-kpi-revenue .muted.tiny:last-child {
      text-align: left;
      color: #6b21a8;
    }
    .bot-editor-head {
      display: flex;
      gap: 8px;
      align-items: end;
      flex-wrap: wrap;
      margin: 10px 0 8px;
    }
    .bot-editor-head .field {
      flex: 1 1 240px;
    }
    .field-muted label { color: #8a98ac; }
    .field-muted input,
    .field-muted select {
      background: #fbfcff;
      border-color: #e2e8f0;
      color: #64748b;
    }
    .field-strong input,
    .field-strong select {
      border-width: 2px;
      border-color: #93c5fd;
      background: #f8fbff;
    }
    .payment-settings-card {
      display: grid;
      gap: 12px;
    }
    .payment-settings-head {
      display: flex;
      gap: 10px;
      justify-content: space-between;
      align-items: flex-start;
      flex-wrap: wrap;
    }
    .payment-settings-title {
      display: grid;
      gap: 4px;
      min-width: 0;
    }
    .payment-settings-kpis {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      justify-content: flex-end;
    }
    .payment-pill {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 7px 10px;
      border-radius: 999px;
      border: 1px solid #dbe6f2;
      background: #f8fbff;
      font-size: 12px;
      color: var(--muted);
      white-space: nowrap;
    }
    .payment-pill b {
      color: var(--ink);
    }
    .payment-settings-grid {
      display: grid;
      gap: 10px;
      grid-template-columns: minmax(270px, 1.2fr) minmax(230px, 0.8fr);
      align-items: start;
    }
    .payment-settings-main,
    .payment-settings-side {
      display: grid;
      gap: 10px;
    }
    .payment-source-list {
      display: grid;
      gap: 8px;
    }
    .payment-source-item {
      border: 1px solid #dbe6f2;
      border-radius: 14px;
      padding: 10px 12px;
      background: #fbfdff;
      display: grid;
      gap: 3px;
    }
    .payment-source-item b {
      font-size: 13px;
    }
    .payment-credentials-grid {
      display: grid;
      gap: 10px;
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .payment-credentials-grid .field {
      min-width: 0;
    }
    .payment-credential-group {
      min-width: 0;
      border: 1px solid #dbe6f2;
      border-radius: 16px;
      padding: 12px;
      background: #fbfdff;
      display: grid;
      gap: 10px;
      transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
    }
    .payment-credential-group.is-selected {
      border-color: #8f3dff;
      box-shadow: 0 0 0 2px #e9d5ff;
      background: linear-gradient(180deg, #fcf7ff, #f7efff);
    }
    .payment-provider-card {
      gap: 8px;
    }
    .payment-credential-group.syncpay {
      grid-column: 1 / -1;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      align-items: start;
    }
    .payment-credential-group-head {
      grid-column: 1 / -1;
      display: grid;
      gap: 2px;
    }
    .tracking-name-field,
    .tracking-bot-field {
      grid-column: 1 / -1;
    }
    .tracking-name-input {
      font-size: 15px;
      padding: 11px 14px;
    }
    .tracking-builder-grid {
      display: grid;
      gap: 10px;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      align-items: stretch;
    }
    .tracking-group {
      border: 1px solid #dbe6f2;
      border-radius: 16px;
      background: #fbfdff;
      padding: 10px;
      display: grid;
      gap: 8px;
      min-width: 0;
    }
    .tracking-group > *,
    .tracking-group .field,
    .tracking-group .field > * {
      min-width: 0;
    }
    .tracking-group-wide {
      grid-column: 1 / -1;
    }
    .tracking-group-compact {
      align-self: stretch;
      height: 100%;
    }
    .tracking-group-head {
      display: grid;
      gap: 3px;
    }
    .tracking-group-head b {
      font-size: 13px;
      color: var(--ink);
    }
    .tracking-group-head .tiny {
      line-height: 1.35;
    }
    .tracking-markers-inline {
      display: grid;
      gap: 8px;
      min-width: 0;
      padding: 8px 10px;
      border: 1px solid #dbe6f2;
      border-radius: 14px;
      background: #f8fbff;
      align-content: start;
    }
    .tracking-markers-inline .tracking-group-head b {
      font-size: 14px;
    }
    .tracking-markers-inline-wide {
      margin-top: 2px;
    }
    .tracking-inline-checks {
      display: grid;
      gap: 8px;
      grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }
    .tracking-inline-check {
      display: flex;
      align-items: center;
      gap: 8px;
      min-height: 38px;
      border: 1px solid #dbe6f2;
      border-radius: 14px;
      background: #f8fbff;
      padding: 8px 10px;
      min-width: 0;
    }
    .tracking-inline-check input {
      margin: 0;
      accent-color: var(--accent-strong);
      transform: scale(1.05);
    }
    .tracking-inline-check span {
      min-width: 0;
      line-height: 1.3;
    }
    .tracking-group-note {
      margin-top: -2px;
    }
    .tracking-head-side {
      display: grid;
      gap: 8px;
      justify-items: end;
      min-width: min(220px, 100%);
    }
    .tracking-head-side .tracking-api-version-box {
      width: min(220px, 100%);
    }
    .tracking-meta-strip {
      margin: 8px 0 6px;
    }
    .tracking-meta-strip .payment-actions {
      margin: 0;
      justify-content: flex-start;
    }
    .tracking-api-version-box {
      display: grid;
      gap: 5px;
      width: min(176px, 100%);
      padding: 9px 10px;
      border: 1px solid #dbe6f2;
      border-radius: 14px;
      background: #fbfdff;
    }
    .tracking-api-version-box label {
      font-size: 11px;
      font-weight: 700;
      color: var(--muted);
      letter-spacing: .02em;
    }
    .tracking-api-version-box input {
      text-align: center;
      font-weight: 800;
      padding: 7px 10px;
      min-width: 0;
    }
    @media (max-width: 780px) {
      .tracking-head-side {
        justify-items: start;
        width: 100%;
      }
    }
    .tracking-fields-grid {
      display: grid;
      gap: 8px;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      align-items: start;
    }
    .tracking-fields-grid > * {
      min-width: 0;
    }
    .tracking-field-span-full {
      grid-column: 1 / -1;
    }
    .meta-pixel-list {
      display: grid;
      gap: 10px;
    }
    .meta-pixel-item {
      border: 1px solid #dbe6f2;
      border-radius: 16px;
      padding: 12px;
      background: #fbfdff;
      display: grid;
      gap: 10px;
    }
    .meta-pixel-item-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }
    .meta-pixel-item-title {
      font-size: 12px;
      font-weight: 700;
      color: var(--ink);
    }
    .tracking-toggle-field {
      display: flex;
      align-items: center;
      gap: 8px;
      min-height: 44px;
      padding: 10px 12px;
      border: 1px solid #dbe6f2;
      border-radius: 14px;
      background: #f8fbff;
      min-width: 0;
    }
    .tracking-toggle-field input {
      margin: 0;
      accent-color: var(--accent-strong);
      transform: scale(1.05);
    }
    .tracking-toggle-field span {
      min-width: 0;
      line-height: 1.3;
      font-weight: 600;
      color: var(--ink);
    }
    .tracking-bot-picker {
      border: 1px solid var(--line);
      border-radius: 16px;
      background: #fff;
      padding: 10px;
      min-height: 136px;
      max-height: 216px;
      overflow: auto;
      display: grid;
      gap: 8px;
      grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
      align-content: start;
    }
    .tracking-bot-picker-compact {
      min-height: 96px;
      max-height: 156px;
    }
    .tracking-bot-item {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      min-width: 0;
      padding: 11px 12px;
      border: 1px solid #dbe6f2;
      border-radius: 14px;
      background: #f8fbff;
      cursor: pointer;
      transition: border-color .15s ease, background .15s ease, box-shadow .15s ease, transform .15s ease;
    }
    .tracking-bot-item:hover {
      border-color: #93c5fd;
      background: #f3f9ff;
      transform: translateY(-1px);
    }
    .tracking-bot-item:has(input:checked) {
      border-color: #60a5fa;
      background: #eef6ff;
      box-shadow: inset 0 0 0 1px #bfdbfe;
    }
    .tracking-bot-item input {
      margin: 2px 0 0;
      flex: 0 0 auto;
      accent-color: var(--accent-strong);
      transform: scale(1.05);
    }
    .tracking-bot-copy {
      display: grid;
      gap: 2px;
      min-width: 0;
    }
    .tracking-bot-title {
      font-weight: 700;
      color: var(--ink);
      line-height: 1.25;
      word-break: break-word;
    }
    .tracking-bot-handle {
      word-break: break-all;
    }
    .tracking-bot-empty {
      padding: 10px 4px;
    }
    .tracking-links-wrap {
      overflow-x: hidden;
    }
    .tracking-links-table {
      table-layout: fixed;
      font-size: 11px;
    }
    .tracking-links-table th,
    .tracking-links-table td {
      overflow: hidden;
      vertical-align: middle;
    }
    .tracking-link-destination,
    .tracking-link-url {
      display: block;
      max-width: 100%;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      line-height: 1.35;
    }
    .tracking-link-actions {
      display: inline-flex;
      gap: 4px;
      flex-wrap: wrap;
      justify-content: flex-start;
      align-items: center;
    }
    .tracking-link-actions button {
      padding: 4px 7px;
      font-size: 11px;
      min-width: 0;
      line-height: 1;
    }
    .tracking-link-del {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 5px 7px;
    }
    .tracking-link-del svg {
      width: 13px;
      height: 13px;
      display: block;
    }
    .tracking-settings-stack {
      display: grid;
      gap: 10px;
      min-width: 0;
    }
    .tracking-empty-state {
      padding-top: 2px;
    }
    .payment-settings-card .mini-note,
    .payment-settings-card .tiny,
    .payment-credential-group-head .tiny,
    .tracking-group-head .tiny,
    .tracking-inline-check span,
    .tracking-toggle-field span {
      min-width: 0;
      overflow-wrap: anywhere;
      word-break: break-word;
    }
    body[data-theme="dark"] .tracking-bot-picker {
      background: linear-gradient(180deg, #15101d, #1c1326);
    }
    body[data-theme="dark"] .meta-pixel-item {
      background: #20152a;
    }
    body[data-theme="dark"] .tracking-bot-item {
      background: #1f1529;
      border-color: #54306d;
    }
    body[data-theme="dark"] .tracking-bot-item:hover {
      background: #2c183a;
      border-color: #7a3ba6;
    }
    body[data-theme="dark"] .tracking-bot-item:has(input:checked) {
      background: linear-gradient(180deg, #4b136a, #6b16a0);
      border-color: #cf7dff;
      box-shadow: inset 0 0 0 1px #e056fd;
    }
    body[data-theme="dark"] .tracking-group {
      background: linear-gradient(180deg, #17111f, #211429);
      border-color: #54306d;
    }
    body[data-theme="dark"] .tracking-inline-check {
      background: #22152b;
      border-color: #54306d;
    }
    body[data-theme="dark"] .tracking-markers-inline,
    body[data-theme="dark"] .tracking-toggle-field {
      background: #22152b;
      border-color: #54306d;
    }
    .payment-credential-group-head b {
      font-size: 13px;
    }
    .payment-credential-group-head .tiny {
      line-height: 1.35;
    }
    body[data-theme="dark"] .payment-credential-group {
      background: linear-gradient(180deg, #17111f, #211429);
      border-color: #54306d;
    }
    .payment-actions {
      display: flex;
      justify-content: flex-end;
      gap: 8px;
      flex-wrap: wrap;
    }
    .upsell-grid {
      display: grid;
      gap: 8px;
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .upsell-card {
      border: 1px solid #d8e1ec;
      border-radius: 14px;
      background: #fff;
      padding: 10px;
      display: grid;
      gap: 8px;
    }
    .upsell-card-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      flex-wrap: wrap;
    }
    .upsell-card-head b {
      font-size: 13px;
    }
    .upsell-card .field {
      gap: 4px;
    }
    .upsell-config-grid,
    .upsell-phrase-grid {
      display: grid;
      gap: 10px;
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .upsell-card textarea {
      min-height: 120px;
      resize: vertical;
    }
    .upsell-phrase-grid .upsell-card textarea {
      min-height: 82px;
    }
    .settings-selectors {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
      align-items: flex-end;
    }
    .settings-selectors .field {
      margin: 0;
      min-width: 180px;
      flex: 1 1 180px;
    }
    .upsell-editor-grid {
      display: grid;
      gap: 10px;
      grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
      align-items: start;
    }
    .upsell-single-card textarea {
      min-height: 150px;
    }
    .upsell-editor-side {
      display: grid;
      gap: 8px;
    }
    .upsell-summary-grid {
      display: grid;
      gap: 8px;
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .upsell-summary-chip {
      border: 1px solid #d8e1ec;
      border-radius: 12px;
      background: #f8fafc;
      padding: 8px 10px;
      display: grid;
      gap: 2px;
    }
    .upsell-summary-chip.active {
      border-color: var(--accent-line);
      background: var(--accent-soft);
    }
    .upsell-summary-chip b {
      font-size: 12px;
      line-height: 1.2;
    }
    .upsell-summary-chip span {
      font-size: 11px;
      color: var(--muted);
      line-height: 1.25;
    }
    .upsell-summary-note {
      font-size: 12px;
      color: var(--muted);
      line-height: 1.4;
      border-top: 1px dashed #d8e1ec;
      padding-top: 8px;
    }
    .upload-refresh-btn {
      opacity: 0.72;
      box-shadow: none;
    }
    .upload-refresh-btn:hover {
      opacity: 1;
      box-shadow: 0 8px 18px #0f172a10;
    }
    .library-upload-form {
      display: grid;
      gap: 8px;
    }
    .library-upload-action {
      display: flex;
      justify-content: flex-end;
    }
    .media-catalog-scroll {
      max-height: min(calc(100vh - 310px), 430px);
      overflow: auto;
      padding-right: 4px;
    }
    .media-key-line {
      display: flex;
      align-items: center;
      gap: 6px;
      min-width: 0;
      width: 100%;
      flex-wrap: nowrap;
    }
    .media-key-line b,
    .media-key-line .mono {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .media-type-badge {
      font-size: 9px;
      padding: 2px 5px;
      opacity: 0.9;
    }
    .media-table-actions {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      flex-wrap: nowrap;
      white-space: nowrap;
    }
    .media-table-actions button {
      white-space: nowrap;
    }
    .media-table-actions .icon-btn {
      flex: 0 0 auto;
    }
    .media-apply-btn {
      padding-inline: 10px;
    }
    .media-mobile-grid.compact {
      gap: 6px;
    }
    .media-mobile-card {
      border: 1px solid #dbe6f0;
      border-radius: 12px;
      padding: 10px;
      background: #fff;
      display: grid;
      gap: 6px;
    }
    .media-mobile-head {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 8px;
      align-items: center;
      min-width: 0;
    }
    .media-mobile-actions {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      flex-wrap: wrap;
      align-self: start;
      justify-self: end;
    }
    .media-mobile-actions button {
      flex: 0 0 auto;
      min-height: 30px;
      padding: 5px 8px;
      font-size: 11px;
      white-space: nowrap;
    }
    .media-mobile-summary {
      min-width: 0;
      display: grid;
      gap: 4px;
    }
    .media-mobile-meta {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      font-size: 11px;
      color: var(--muted);
    }
    .media-mobile-origin {
      font-size: 11px;
      color: var(--muted);
    }
    .media-desktop-list {
      display: grid;
      gap: 8px;
    }
    .media-desktop-item {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 10px;
      align-items: center;
      border: 1px solid #dbe6f0;
      border-radius: 12px;
      padding: 10px 12px;
      background: #fff;
    }
    .media-desktop-item.is-selected {
      border-color: rgba(29, 181, 228, 0.65);
      box-shadow: 0 0 0 1px rgba(29, 181, 228, 0.18);
    }
    .media-desktop-info {
      min-width: 0;
      display: grid;
      gap: 4px;
    }
    .media-desktop-meta {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      font-size: 12px;
      color: var(--muted);
    }
    .media-desktop-origin {
      font-size: 12px;
      color: var(--muted);
    }
    .media-desktop-actions {
      display: inline-flex;
      align-items: center;
      justify-self: end;
      align-self: center;
      gap: 6px;
      flex-wrap: nowrap;
    }
    .media-desktop-actions button {
      white-space: nowrap;
    }
    .bot-card-list {
      display: grid;
      gap: 8px;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    .bot-card {
      border: 1px solid #dbe6f0;
      border-radius: 12px;
      padding: 10px;
      background: #fff;
      display: grid;
      gap: 6px;
    }
    .bot-card-head {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 8px;
      align-items: start;
    }
    .bot-card-copy {
      min-width: 0;
      display: grid;
      gap: 4px;
    }
    .bot-card-copy .mono,
    .bot-card-copy b {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .bot-card-meta {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      font-size: 11px;
      color: var(--muted);
    }
    .bot-card-actions {
      display: inline-flex;
      gap: 6px;
      justify-content: flex-end;
      flex-wrap: nowrap;
    }
    .bot-card-issues {
      font-size: 11px;
      color: var(--warn-ink);
      line-height: 1.35;
    }
    .usage-compact {
      display: grid;
      gap: 6px;
    }
    .usage-compact .mini-item {
      padding: 8px 10px;
    }
      body[data-theme="dark"] .payment-pill,
      body[data-theme="dark"] .payment-source-item,
      body[data-theme="dark"] .upsell-card,
      body[data-theme="dark"] .upsell-config-grid .upsell-card,
    body[data-theme="dark"] .upsell-phrase-grid .upsell-card,
    body[data-theme="dark"] .rm-steps-editor,
    body[data-theme="dark"] .rm-step-card,
    body[data-theme="dark"] .rm-step-toggle,
    body[data-theme="dark"] .media-desktop-item,
    body[data-theme="dark"] .bot-card,
    body[data-theme="dark"] .runtime-resource-card,
    body[data-theme="dark"] .runtime-metric {
      background: linear-gradient(180deg, #17111f, #211429);
      border-color: #54306d;
      color: var(--ink);
    }
    body[data-theme="dark"] .upsell-summary-chip {
      background: #1d1326;
      border-color: #54306d;
    }
    body[data-theme="dark"] .upsell-summary-chip.active {
      background: linear-gradient(180deg, #551781, #7f1dc2);
      border-color: var(--accent-line);
    }
    body[data-theme="dark"] .upsell-summary-note {
      border-top-color: #54306d;
    }
    .mini-note {
      font-size: 12px;
      color: var(--muted);
      line-height: 1.35;
    }
    .template-editor-note { margin-top: 10px; }
    .template-layer-shell {
      margin-top: 10px;
      border: 1px solid var(--line);
      background: var(--panel-soft);
    }
    .template-layer-stack {
      margin-top: 10px;
      display: grid;
      gap: 8px;
    }
    .template-layer-card {
      border: 1px solid var(--line);
      border-radius: 12px;
      background: var(--panel-soft-2);
      padding: 8px;
      position: relative;
    }
    .template-layer-card:focus-within {
      z-index: 4;
    }
    .template-layer-collapse > summary {
      list-style: none;
    }
    .template-layer-collapse > summary::-webkit-details-marker {
      display: none;
    }
    .template-layer-head {
      display: flex;
      gap: 8px;
      align-items: center;
      justify-content: space-between;
      flex-wrap: nowrap;
      cursor: pointer;
    }
    .template-editor-grid,
    .template-samples-grid {
      display: grid;
      gap: 8px;
      grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
    .template-layer-list-inner {
      display: grid;
      gap: 8px;
    }
    .template-layer-head > div:first-child {
      min-width: 0;
      flex: 1 1 220px;
    }
    .template-layer-summary-meta {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      flex-wrap: wrap;
      justify-content: flex-end;
      color: var(--muted);
      font-size: 11px;
    }
    .template-layer-card-body {
      margin-top: 8px;
      display: grid;
      gap: 8px;
    }
    .template-layer-actions {
      gap: 6px;
      justify-content: flex-end;
      flex-wrap: wrap;
    }
    .template-layer-actions button,
    .template-json-actions button,
    .template-layer-shell .toolbar button {
      padding: 6px 10px;
      border-radius: 10px;
    }
    .template-layer-grid,
    .template-layer-advanced-grid {
      display: grid;
      gap: 8px;
    }
    .template-layer-grid {
      margin-top: 8px;
      grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }
    .template-layer-advanced-grid {
      margin-top: 10px;
      grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    }
    .template-layer-grid .field,
    .template-layer-advanced-grid .field {
      gap: 4px;
      min-width: 0;
    }
    .template-layer-grid .field label,
    .template-layer-advanced-grid .field label {
      font-size: 11px;
    }
    .template-layer-grid input,
    .template-layer-grid select,
    .template-layer-advanced-grid input,
    .template-layer-advanced-grid select {
      width: 100%;
      min-width: 0;
      padding: 6px 9px;
      border-radius: 10px;
    }
    .template-layer-text-field {
      grid-column: 1 / -1;
    }
    .template-layer-card .check {
      min-width: 0;
    }
    .template-layer-card .check span {
      min-width: 0;
      line-height: 1.25;
      white-space: normal;
    }
    .template-layer-card details {
      margin-top: 8px;
    }
    .template-layer-card summary,
    .template-samples summary,
    .template-json-panel summary {
      cursor: pointer;
      color: var(--muted);
      font-size: 12px;
    }
    .template-json-actions {
      margin-top: 8px;
      display: flex;
      gap: 8px;
      align-items: center;
      flex-wrap: wrap;
    }
    .template-font-panel {
      margin-top: 8px;
      border: 1px solid var(--line);
      border-radius: 10px;
      background: var(--panel-soft);
      padding: 8px 10px;
      display: grid;
      gap: 6px;
    }
    .template-font-upload-row {
      display: flex;
      gap: 8px;
      align-items: center;
      flex-wrap: wrap;
    }
    .template-font-upload-row > * {
      min-width: 0;
    }
    .template-font-upload-row .file-picker-name {
      flex: 1 1 160px;
    }
    .template-font-inline-note {
      font-size: 11px;
      color: var(--muted);
      line-height: 1.25;
    }
    .template-section-head {
      display: flex;
      gap: 8px;
      align-items: flex-start;
      justify-content: space-between;
    }
    .template-corner-actions {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      flex-wrap: wrap;
      justify-content: flex-end;
    }
    .template-corner-actions .icon-btn {
      width: 28px;
      min-width: 28px;
      height: 28px;
      padding: 4px;
      opacity: 0.82;
    }
    .template-layer-shell-head {
      display: flex;
      gap: 10px;
      align-items: flex-start;
      justify-content: space-between;
      flex-wrap: wrap;
    }
    .template-layer-shell-tools {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      flex-wrap: wrap;
      justify-content: flex-end;
    }
    .template-inline-file-name {
      max-width: 150px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .template-compact-upload {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      flex-wrap: wrap;
    }
    .template-compact-upload .file-picker-label,
    .template-compact-upload button {
      padding: 5px 8px;
      min-height: 30px;
      font-size: 11px;
      border-radius: 9px;
    }
    .template-base-select {
      min-width: 0;
    }
    .template-preview-box {
      border: 1px solid var(--line);
      border-radius: 16px;
      padding: 10px;
      background: var(--panel-soft);
    }
    .template-preview-stage {
      position: relative;
      display: inline-block;
      max-width: 100%;
      overflow: hidden;
      border-radius: 12px;
      background: #06131a;
      touch-action: none;
      user-select: none;
    }
    .template-preview-stage img {
      display: block;
      max-width: 100%;
      max-height: 420px;
      width: auto;
      height: auto;
      border-radius: 12px;
    }
    .template-preview-overlay {
      position: absolute;
      inset: 0;
      pointer-events: none;
    }
    .template-preview-handle {
      position: absolute;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 18px;
      min-width: 18px;
      max-width: 18px;
      height: 18px;
      padding: 0;
      border-radius: 999px;
      border: 1px solid rgba(255,255,255,0.18);
      background: rgba(80, 0, 136, 0.08);
      color: #f4fbff;
      box-shadow: none;
      pointer-events: auto;
      cursor: grab;
      text-align: left;
      overflow: visible;
    }
    .template-preview-handle::before {
      content: "";
      width: 5px;
      height: 5px;
      border-radius: 999px;
      background: rgba(255,255,255,0.55);
    }
    .template-preview-handle:active {
      cursor: grabbing;
    }
    .template-preview-handle:hover {
      border-color: rgba(186, 123, 255, 0.58);
      background: rgba(80, 0, 136, 0.14);
    }
    .template-preview-handle.is-selected {
      border-color: color-mix(in srgb, var(--brand) 74%, #fff 12%);
      background: rgba(80, 0, 136, 0.18);
      box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 32%, transparent);
    }
    .template-preview-handle-label {
      position: absolute;
      left: 24px;
      top: 50%;
      transform: translateY(-50%);
      max-width: min(220px, calc(100vw - 88px));
      padding: 3px 8px;
      border-radius: 999px;
      border: 1px solid rgba(255,255,255,0.1);
      background: rgba(7, 16, 22, 0.56);
      backdrop-filter: blur(2px);
      font-size: 11px;
      font-weight: 600;
      line-height: 1.2;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      opacity: 0;
      transition: opacity .16s ease, transform .16s ease;
      pointer-events: none;
    }
    .template-preview-handle-coords {
      position: absolute;
      left: 24px;
      top: calc(50% + 15px);
      transform: translateY(-50%);
      padding: 2px 6px;
      border-radius: 8px;
      background: rgba(7, 16, 22, 0.46);
      font-size: 9px;
      color: rgba(255,255,255,0.68);
      line-height: 1.1;
      opacity: 0;
      transition: opacity .16s ease, transform .16s ease;
      pointer-events: none;
    }
    .template-preview-handle:hover .template-preview-handle-label,
    .template-preview-handle:hover .template-preview-handle-coords,
    .template-preview-handle.is-selected .template-preview-handle-label,
    .template-preview-handle.is-selected .template-preview-handle-coords {
      opacity: 1;
      transform: translateY(-50%) translateX(0);
    }
    .template-preview-toolbar {
      margin-top: 8px;
      display: flex;
      gap: 8px;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
    }
    .template-preview-empty {
      min-height: 220px;
      display: grid;
      place-items: center;
      border: 1px dashed var(--line);
      border-radius: 16px;
    }
    .media-shell table { table-layout: fixed; }
    .media-shell th, .media-shell td { min-width: 0; }
    .media-actions-col,
    .media-actions-cell {
      width: 1%;
      white-space: nowrap;
    }
    .media-actions-cell {
      text-align: right;
    }
    .audit-shell td pre { max-height: 170px; overflow: auto; }
    .audit-shell table { table-layout: fixed; }
    .audit-list {
      display: grid;
      gap: 8px;
      max-height: min(calc(100vh - 260px), 420px);
      overflow: auto;
      padding-right: 4px;
    }
    .audit-shell th:nth-child(1), .audit-shell td:nth-child(1) { width: 150px; }
    .audit-shell th:nth-child(2), .audit-shell td:nth-child(2) { width: 120px; }
    .audit-shell th:nth-child(3), .audit-shell td:nth-child(3) { width: 90px; }
    .audit-shell th:nth-child(4), .audit-shell td:nth-child(4) { width: 90px; }
	    .field { display: grid; gap: 6px; }
	    .field label { font-size: 12px; color: var(--muted); }
      .app-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 14px; align-items: start; }
      .sidebar { position: sticky; top: 14px; padding: 14px; display: grid; gap: 14px; }
      .brand { display: grid; gap: 6px; }
      .brand-title { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; }
      .nav { display: grid; gap: 6px; }
      .nav-btn {
        width: 100%;
        text-align: left;
        border-radius: 12px;
        padding: 10px 12px;
        border: 1px solid transparent;
        background: transparent;
      }
      .nav-btn.active {
        background: linear-gradient(135deg, var(--accent-strong), var(--accent));
        color: #fff;
        border-color: var(--accent);
        box-shadow: 0 10px 22px #7c3aed20;
      }
      .main { min-width: 0; display: grid; gap: 12px; overflow: visible; }
      .hero { padding: 14px; display: grid; gap: 10px; }
      .hero { position: relative; z-index: 25; overflow: visible; }
      .hero h1 { margin: 0; font-size: 28px; line-height: 1.1; }
      .hero-title-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
      .hero-title-row h1 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
      .hero-title-icon { width: 34px; height: 34px; border-radius: 10px; }
      .soft { background: #ffffffa8; border: 1px solid #cbd5e1; border-radius: 12px; }
      .stack { display: grid; gap: 10px; }
      .flow-grid { display: grid; grid-template-columns: 280px 1fr; gap: 12px; }
      .flow-chip {
        width: 100%;
        text-align: left;
        padding: 10px 12px;
        border-radius: 12px;
        border: 1px solid var(--line);
        background: #fff;
        position: relative;
        overflow: hidden;
      }
      .flow-chip.active {
        border-color: var(--accent-line);
        background: linear-gradient(180deg, var(--accent-soft), var(--accent-soft-2));
        box-shadow: inset 0 0 0 1px var(--accent-line), 0 12px 24px #7c3aed1a;
      }
      .flow-chip.active::after {
        content: "";
        position: absolute;
        inset: 0 auto 0 0;
        width: 4px;
        background: linear-gradient(180deg, var(--accent-strong), var(--accent));
      }
      .step-card { border: 1px solid #d8e1ec; border-radius: 12px; padding: 10px; background: #fff; }
      .step-head { display: flex; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 8px; flex-wrap: wrap; }
      .badge { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 2px 6px; font-size: 10px; line-height: 1.1; border: 1px solid #cbd5e1; background: #f8fafc; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
      .split-hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 12px; }
      .list-tight { display: grid; gap: 8px; }
      .toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
      .flow-admin-stack { display: grid; gap: 8px; margin-top: 10px; }
      .flow-admin-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
      .flow-admin-panel {
        display: grid;
        gap: 8px;
        min-width: 0;
        padding: 10px;
        border: 1px solid #dbe6f0;
        border-radius: 12px;
        background: linear-gradient(180deg, #f8fbff, #f2f7ff);
      }
      .flow-admin-panel .field { min-width: 0; }
      .flow-admin-actions {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
        align-items: flex-end;
        min-width: 0;
      }
      .flow-admin-actions .field { flex: 1 1 180px; min-width: 0; }
      .flow-admin-actions button { flex: 0 0 auto; white-space: nowrap; }
      .flow-admin-note { font-size: 11px; color: var(--muted); line-height: 1.4; }
      .hero-tools { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; min-width: 0; overflow: visible; }
      .bot-context-row {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        min-width: 0;
        flex-wrap: nowrap;
        overflow: visible;
        position: relative;
        z-index: 420;
      }
      .hero-tab-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
        width: 100%;
        min-width: 0;
        align-items: center;
        overflow: visible;
        position: relative;
        z-index: 320;
      }
      .hero-tab-row > * { min-width: 0; }
      .bot-context-row button {
        flex: 0 0 auto;
      }
      .bot-context-note {
        font-size: 11px;
        color: var(--muted);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 52%;
      }
      .hero-subtitle {
        color: var(--muted);
        font-size: 12px;
        line-height: 1.35;
        letter-spacing: 0.01em;
      }
      .hero-icons { display: flex; gap: 8px; align-items: center; }
      .menu-select {
        position: relative;
        min-width: 0;
        z-index: 260;
      }
      .menu-select.open {
        z-index: 1400;
      }
      .menu-select.bot-context-menu {
        flex: 1 1 320px;
        min-width: 280px;
      }
      .menu-select.tab-menu {
        width: 100%;
      }
      .menu-select-trigger {
        width: 100%;
        min-height: 40px;
        display: inline-flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        padding: 8px 12px;
        border-radius: 14px;
        border: 1px solid var(--line);
        background: linear-gradient(180deg, #ffffff, #faf5ff);
        color: var(--ink);
        box-shadow: inset 0 1px 0 #ffffffb8;
      }
      .menu-select-trigger strong {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 13px;
      }
      .menu-select-trigger svg {
        width: 15px;
        height: 15px;
        stroke: currentColor;
        flex: 0 0 auto;
        transition: transform .16s ease;
      }
      .menu-select.open .menu-select-trigger svg {
        transform: rotate(180deg);
      }
      .menu-select-panel {
        position: absolute;
        top: calc(100% + 6px);
        left: 0;
        right: auto;
        z-index: 1200;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 6px;
        border-radius: 16px;
        border: 1px solid #dbe6f0;
        background: #fffffffa;
        box-shadow: 0 18px 38px #0f172a1a;
        backdrop-filter: blur(14px);
        max-height: min(72vh, 420px);
        overflow-y: auto;
        overflow-x: hidden;
        overscroll-behavior: contain;
        min-width: max(100%, 220px);
        width: max-content;
        max-width: min(92vw, 360px);
      }
      .menu-select.bot-context-menu .menu-select-panel {
        min-width: max(100%, 300px);
        max-width: min(90vw, 400px);
      }
      .menu-select.tab-menu .menu-select-panel {
        left: 0;
        right: auto;
        min-width: 280px;
        width: min(calc(100vw - 28px), 340px);
        max-width: calc(100vw - 28px);
        max-height: min(calc(100dvh - 140px), 640px);
      }
      .menu-select-option {
        width: 100%;
        text-align: left;
        padding: 9px 10px;
        border-radius: 12px;
        border: 1px solid transparent;
        background: transparent;
        color: var(--ink);
        display: grid;
        gap: 2px;
      }
      .menu-select-option:hover {
        transform: none;
        box-shadow: none;
        background: var(--accent-soft);
        border-color: var(--accent-line);
      }
      .menu-select-option.active {
        background: linear-gradient(180deg, var(--accent-soft), var(--accent-soft-2));
        border-color: var(--accent-line);
      }
      .menu-select-option .tiny {
        color: var(--muted);
      }
      .form-select-shell {
        width: 100%;
        min-width: 0;
        overflow: visible;
      }
      .row > .form-select-shell,
      .toolbar > .form-select-shell,
      .ops-inline-controls > .form-select-shell {
        min-width: 0;
      }
      .composer-row > .form-select-shell {
        flex: 1 1 160px;
        min-width: 0;
      }
      .form-select-shell.open {
        z-index: 1500;
      }
      .select-host-open {
        position: relative !important;
        z-index: 1490 !important;
        overflow: visible !important;
      }
      .form-select-shell .menu-select-trigger {
        min-height: 40px;
      }
      .form-select-shell .menu-select-panel {
        display: none;
        min-width: 100%;
        width: max-content;
        max-width: min(92vw, 360px);
      }
      .form-select-shell.open .menu-select-panel {
        display: flex;
      }
      .native-select-hidden {
        position: absolute !important;
        inset: 0 !important;
        opacity: 0 !important;
        pointer-events: none !important;
        appearance: none !important;
        -webkit-appearance: none !important;
        -moz-appearance: none !important;
      }
      .app-shell, .main, .card, .grid, .row, .field { min-width: 0; }
      .icon-btn {
        width: 40px;
        height: 40px;
        padding: 0;
        border-radius: 12px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
      }
      .icon-btn svg {
        width: 19px;
        height: 19px;
        stroke: currentColor;
      }
      .icon-btn.sm {
        width: 34px;
        height: 34px;
      }
      .icon-btn.sm svg {
        width: 16px;
        height: 16px;
      }
      .crm-mobile-hidden { display: none !important; }
      .crm-avatar {
        width: 34px;
        height: 34px;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        color: #0f172a;
        background: linear-gradient(135deg, #bae6fd, #bfdbfe);
        border: 1px solid #93c5fd;
      }
      .crm-chat-head {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
        align-items: center;
        min-width: 0;
      }
      .crm-chat-head-main {
        display: flex;
        align-items: center;
        gap: 10px;
        min-width: 0;
      }
      .crm-chat-head-copy {
        min-width: 0;
        display: grid;
        gap: 2px;
      }
      .crm-chat-head-copy b,
      .crm-chat-head-copy .tiny {
        display: block;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .crm-chat-head-tools {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        flex-wrap: nowrap;
        justify-self: end;
      }
      .crm-back-btn {
        width: 30px;
        height: 30px;
        border-radius: 10px;
      }
      .crm-back-btn svg {
        width: 15px;
        height: 15px;
      }
      .crm-mobile-side {
        border: 1px solid #dbe6f0;
        border-radius: 14px;
        padding: 8px;
        background: #f8fbff;
      }
      .crm-mobile-side summary {
        cursor: pointer;
        font-weight: 700;
        font-size: 13px;
      }
      .crm-shell { --crm-panel-h: min(calc(100vh - 160px), 920px); --crm-contact-visible: 7; --crm-contact-item-h: 74px; display: grid; grid-template-columns: 300px minmax(0, 1.25fr) 320px; gap: 12px; align-items: start; }
      .crm-shell.crm-shell-selected { grid-template-columns: 250px minmax(0, 1.75fr) 270px; }
      .crm-pane { display: flex; flex-direction: column; height: var(--crm-panel-h); overflow: hidden; min-height: 0; }
      .crm-side { height: var(--crm-panel-h); grid-template-rows: auto auto minmax(0, 1fr); }
      .crm-side .card:last-child { min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); }
      .crm-side .card:last-child pre { max-height: none; height: 100%; }
      .contact-list { flex: 0 0 auto; min-height: 0; max-height: calc(var(--crm-contact-visible) * var(--crm-contact-item-h)); overflow-y: auto; overflow-x: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
      .crm-list-head { display: grid; gap: 8px; margin-top: 8px; }
      .crm-list-search { display: flex; align-items: center; gap: 8px; min-width: 0; }
      .crm-list-search input { flex: 1 1 auto; min-width: 0; }
      .crm-list-summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
      .crm-list-summary .tiny { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
      .contact-item {
        width: 100%;
        text-align: left;
        border: 0;
        border-bottom: 1px solid #edf2f7;
        border-radius: 0;
        background: transparent;
        padding: 10px;
        min-width: 0;
      }
      .contact-item.active {
        background: linear-gradient(180deg, var(--accent-soft), var(--accent-soft-2));
        box-shadow: inset 3px 0 0 var(--accent);
      }
      .contact-item.active .badge {
        background: #f5f3ff;
        border-color: var(--accent-line);
        color: var(--accent-strong);
      }
      .contact-item .row.between { flex-wrap: nowrap; }
      .contact-item .badge { flex: 0 0 auto; max-width: 84px; }
      .contact-item b { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
      .contact-item .mono,
      .contact-item .tiny { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
      .chat-app { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: var(--crm-panel-h); max-height: var(--crm-panel-h); overflow: hidden; }
      .chat-top { padding: 10px; border-bottom: 0; box-shadow: inset 0 -1px 0 #e2e8f0; background: linear-gradient(180deg, #ffffff, #eef5ff); position: sticky; top: 0; z-index: 3; }
      .chat-thread {
        padding: 14px;
        overflow: auto;
        background:
          radial-gradient(circle at 22% 18%, #60a5fa12, transparent 26%),
          radial-gradient(circle at 80% 12%, #22d3ee10, transparent 20%),
          linear-gradient(180deg, #f5f9ff, #eef4fb);
        display: grid;
        gap: 10px;
        align-content: start;
      }
      .bubble-wrap { display: flex; }
      .bubble-wrap.out { justify-content: flex-end; }
      .bubble-card {
        max-width: 78%;
        border-radius: 16px;
        padding: 7px 10px;
        box-shadow: 0 8px 24px #0f172a0f;
        border: 1px solid #dbe6f0;
        background: #fff;
      }
      .bubble-wrap.in .bubble-card { border-top-left-radius: 10px; }
      .bubble-wrap.out .bubble-card { border-top-right-radius: 10px; }
      .bubble-wrap.out .bubble-card {
        background: linear-gradient(180deg, #e8f2ff, #dbeafe);
        border-color: #93c5fd;
      }
      .bubble-meta { font-size: 11px; color: #64748b; margin-bottom: 4px; }
      .bubble-text { white-space: pre-wrap; word-break: break-word; line-height: 1.4; font-size: 13px; }
      .composer { padding: 8px; border-top: 0; box-shadow: inset 0 1px 0 #e2e8f0; background: #fff; display: grid; gap: 6px; }
      .composer-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; min-width: 0; }
      .media-strip { border: 1px solid #dbe6f0; border-radius: 16px; padding: 8px; background: #f8fbff; display: grid; gap: 6px; }
      .media-strip .composer-row { gap: 5px; }
      .media-strip .badge { max-width: 130px; }
      .crm-filters input,
      .crm-filters select,
      .crm-filters button {
        min-width: 0;
        padding: 6px 10px;
        border-radius: 12px;
      }
      .crm-filter-block {
        border: 1px solid #dbe6f0;
        border-radius: 12px;
        padding: 6px 8px;
        background: #f8fbff;
      }
      .crm-filter-block summary {
        cursor: pointer;
        font-size: 12px;
        color: var(--muted);
        font-weight: 700;
      }
      .chat-app.crm-chat-focused .composer {
        padding: 6px;
        gap: 5px;
      }
      .chat-app.crm-chat-focused .chat-top {
        padding: 8px;
      }
      .chat-app.crm-chat-focused .chat-thread {
        padding: 10px;
      }
      .crm-shell.crm-shell-selected .chat-thread {
        padding: 12px 18px;
      }
      .crm-shell.crm-shell-selected .bubble-card {
        max-width: 84%;
      }
      .side-stack { display: grid; gap: 12px; }
      .summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
      .kv { border: 1px solid #e2e8f0; border-radius: 12px; padding: 10px; background: #fff; }
    .runtime-resources {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 8px;
    }
    .runtime-resource-card {
      border: 1px solid #dbe6f0;
      border-radius: 12px;
      padding: 8px 10px;
      background: #fff;
      display: grid;
      gap: 6px;
      min-width: 0;
    }
    .runtime-resource-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 6px;
    }
    .runtime-resource-head b {
      font-size: 12px;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .runtime-resource-card .badge {
      font-size: 9px;
      padding: 2px 5px;
    }
    .runtime-resource-container {
      font-size: 10px;
      color: var(--muted);
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      display: block;
      max-width: 100%;
    }
    .runtime-resource-metrics {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 4px;
    }
    .runtime-metric {
      border: 1px solid #e2e8f0;
      border-radius: 10px;
      padding: 5px 6px;
      background: #f8fbff;
      display: grid;
      gap: 2px;
      min-width: 0;
    }
    .runtime-metric .tiny {
      font-size: 10px;
      line-height: 1.1;
    }
    .runtime-metric b {
      font-size: 11px;
      line-height: 1.1;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .action-grid { display: grid; gap: 8px; }
    .crm-action-stack { display: grid; gap: 6px; }
    .crm-action-row {
      display: grid;
      gap: 6px;
      align-items: stretch;
    }
    .crm-action-row.double {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .crm-action-row.verify {
      grid-template-columns: minmax(0, 1fr) auto;
    }
    .crm-action-row button {
      width: 100%;
      white-space: nowrap;
    }
    .crm-action-row.verify button {
      width: auto;
    }
    .bot-table-actions {
      display: inline-flex;
      gap: 6px;
      align-items: center;
      flex-wrap: nowrap;
    }
    .bot-table-actions button {
      white-space: nowrap;
    }
    .rm-steps-editor {
      display: grid;
      gap: 8px;
      max-height: min(54vh, 560px);
      overflow: auto;
      padding: 8px;
      border: 1px solid #dbe6f0;
      border-radius: 14px;
      background: #fbfdff;
    }
    .rm-step-card {
      border: 1px solid #dbe6f0;
      border-radius: 14px;
      padding: 8px;
      background: #fff;
      display: grid;
      gap: 6px;
    }
    .rm-step-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 6px;
      flex-wrap: wrap;
    }
    .rm-step-head b {
      font-size: 13px;
    }
    .rm-step-grid {
      display: grid;
      gap: 6px;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      align-items: end;
    }
    .rm-step-grid .field {
      min-width: 0;
    }
    .rm-step-audio-field[hidden] {
      display: none !important;
    }
    .rm-step-toggle {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      white-space: nowrap;
      padding: 4px 8px;
      border: 1px solid #dbe6f0;
      border-radius: 999px;
      background: #f8fbff;
    }
    .phrase-card-head {
      display: grid;
      gap: 6px;
    }
    .phrase-headrow {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: start;
      gap: 8px;
    }
    .phrase-headcopy {
      min-width: 0;
      display: grid;
      gap: 4px;
    }
    .phrase-headcopy h3 {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-size: 15px;
    }
    .phrase-toolbar {
      display: inline-flex;
      gap: 6px;
      flex-wrap: nowrap;
      align-items: center;
      justify-self: end;
      align-self: start;
    }
    .phrase-toolbar button {
      white-space: nowrap;
      padding: 5px 9px;
      min-height: 30px;
      font-size: 12px;
    }
      .step-mini-card { border: 1px solid #d8e1ec; border-radius: 12px; background: #fff; display: grid; gap: 0; }
      .flow-step-shell {
        --flow-step-accent: #6b7280;
        --flow-step-soft: #f4f5f7;
        --flow-step-border: #d7dbe2;
      }
      .flow-step-shell.type-texto {
        --flow-step-accent: #6b7280;
        --flow-step-soft: #f3f4f6;
        --flow-step-border: #d4d8de;
      }
      .flow-step-shell.type-audio {
        --flow-step-accent: #0f766e;
        --flow-step-soft: #edf9f6;
        --flow-step-border: #b7dfd8;
      }
      .flow-step-shell.type-imagem {
        --flow-step-accent: #2563eb;
        --flow-step-soft: #eff6ff;
        --flow-step-border: #bfd4ff;
      }
      .flow-step-shell.type-video {
        --flow-step-accent: #7c3aed;
        --flow-step-soft: #f6f1ff;
        --flow-step-border: #d5c3ff;
      }
      .flow-step-shell.type-pix,
      .flow-step-shell.type-oferta {
        --flow-step-accent: #1f8f57;
        --flow-step-soft: #edf9f1;
        --flow-step-border: #b8dfc7;
      }
      .flow-step-shell.type-evento {
        --flow-step-accent: #c06b2c;
        --flow-step-soft: #fff4eb;
        --flow-step-border: #f0cfb6;
      }
      .flow-step-shell.expanded {
        border-color: var(--flow-step-border);
        box-shadow: 0 6px 16px #0f172a08;
        background: linear-gradient(180deg, var(--flow-step-soft) 0%, #ffffff 86%);
      }
      .flow-step-headrow {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
        align-items: center;
        padding: 10px 12px;
        background: linear-gradient(180deg, var(--flow-step-soft) 0%, #ffffff 100%);
        border-radius: 12px 12px 0 0;
      }
      .flow-step-toggle {
        width: 100%;
        min-width: 0;
        border: 0;
        padding: 0;
        background: transparent;
        box-shadow: none;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        text-align: left;
      }
      .flow-step-toggle:hover {
        transform: none;
        box-shadow: none;
      }
      .flow-step-chevron {
        width: 18px;
        height: 18px;
        border-radius: 999px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: var(--flow-step-accent);
        background: #fff;
        border: 1px solid var(--flow-step-border);
        flex: 0 0 auto;
        transition: transform .16s ease;
      }
      .flow-step-chevron svg {
        width: 12px;
        height: 12px;
        stroke: currentColor;
      }
      .flow-step-shell.expanded .flow-step-chevron {
        transform: rotate(90deg);
        color: var(--flow-step-accent);
        border-color: var(--flow-step-border);
        background: var(--flow-step-soft);
      }
      .flow-step-summary-main {
        display: flex;
        align-items: center;
        gap: 6px;
        flex-wrap: wrap;
        min-width: 0;
      }
      .flow-step-summary-tools {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        flex: 0 0 auto;
      }
      .flow-step-summary-main .badge { max-width: none; }
      .flow-step-summary-main .badge.step-index-badge,
      .flow-step-summary-main .badge.step-type-badge {
        border-color: var(--flow-step-border);
        color: var(--flow-step-accent);
      }
      .flow-step-summary-main .badge.step-index-badge {
        background: #fff;
      }
      .flow-step-summary-main .badge.step-type-badge {
        background: var(--flow-step-soft);
        font-weight: 800;
      }
      .flow-step-body {
        display: grid;
        gap: 10px;
        border-top: 1px solid var(--flow-step-border);
        padding: 10px 12px 12px;
      }
      .flow-step-body .field {
        min-width: 0;
      }
      .flow-step-body input,
      .flow-step-body select,
      .flow-step-body textarea {
        max-width: 100%;
      }
      .flow-step-primary {
        display: grid;
        grid-template-columns: minmax(220px, 1.15fr) minmax(120px, 140px) minmax(220px, 1fr);
        gap: 10px;
        align-items: start;
      }
      .flow-step-primary.compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
      .flow-step-primary > .field { align-self: stretch; }
      .flow-step-delay { min-width: 0; }
      .flow-step-delay input {
        text-align: center;
        min-width: 0;
      }
      .step-action-btn {
        width: 28px;
        height: 28px;
        border-radius: 10px;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 1px solid transparent;
        background: transparent;
        box-shadow: none;
        color: var(--muted);
      }
      .step-action-btn:hover {
        transform: none;
        box-shadow: none;
        border-color: #dbe6f0;
        background: #f8fbff;
      }
      .step-action-btn.danger {
        color: #be123c;
      }
      .step-action-btn.danger:hover {
        border-color: #fecdd3;
        background: #fff1f2;
      }
      .step-action-btn.is-active {
        color: var(--accent-strong);
        border-color: var(--accent-line);
        background: var(--accent-soft);
      }
      .step-action-btn svg {
        width: 14px;
        height: 14px;
        stroke: currentColor;
      }
      .step-inline-toggle {
        display: flex;
        align-items: flex-start;
        gap: 8px;
        width: 100%;
        min-height: 42px;
        padding: 10px 12px;
        border-radius: 12px;
        border: 1px solid #dbe6f0;
        background: #f8fafc;
        line-height: 1.35;
        white-space: normal;
        box-sizing: border-box;
      }
      .step-inline-toggle input { flex: 0 0 auto; margin-top: 1px; }
      .flow-steps-scroll { max-height: min(calc(100vh - 250px), 980px); overflow: auto; padding-right: 4px; }
      .phrase-shell { display: grid; gap: 12px; }
      .phrase-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
      .phrase-card { border: 1px solid #d8e1ec; border-radius: 16px; padding: 10px; background: #fff; display: grid; gap: 8px; }
    .phrase-list { display: grid; gap: 6px; max-height: min(calc(100vh - 320px), 700px); overflow: auto; padding-right: 4px; }
      .phrase-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; align-items: stretch; }
      .phrase-remove-btn {
        width: 30px;
        min-height: 48px;
        height: auto;
        padding: 0;
        border-radius: 12px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        align-self: stretch;
        flex: 0 0 auto;
      }
      .phrase-remove-btn svg {
        width: 12px;
        height: 12px;
        stroke: currentColor;
      }
      .phrase-editor {
        min-height: 48px;
        padding: 8px 10px;
        border: 1px solid #d8e1ec;
        border-radius: 14px;
        background: #fff;
        outline: none;
        line-height: 1.35;
        font-size: 13px;
        white-space: pre-wrap;
        word-break: break-word;
        min-width: 0;
      }
      .phrase-editor:focus {
        border-color: var(--accent);
        box-shadow: 0 0 0 3px #c4b5fd66;
      }
      .phrase-editor:empty::before {
        content: attr(data-placeholder);
        color: #94a3b8;
      }
      .mini-list { display: grid; gap: 8px; }
      .mini-item {
        border: 1px solid #dbe6f0;
        border-radius: 12px;
        padding: 10px;
        background: #fff;
      }
      .mini-item b, .mini-item .tiny, .mini-item .mono {
        min-width: 0;
        word-break: break-word;
      }
      .audit-item {
        border: 1px solid #dbe6f0;
        border-radius: 12px;
        padding: 8px;
        background: #fff;
        display: grid;
        gap: 5px;
      }
      .audit-item pre {
        max-height: 180px;
        overflow: auto;
      }
      .media-mobile-card .mono {
        word-break: break-all;
      }
      body[data-theme="dark"] .soft,
      body[data-theme="dark"] .kv,
      body[data-theme="dark"] .step-card,
      body[data-theme="dark"] .step-mini-card,
      body[data-theme="dark"] .phrase-card,
      body[data-theme="dark"] .mini-item,
      body[data-theme="dark"] .audit-item,
      body[data-theme="dark"] .media-mobile-card,
      body[data-theme="dark"] .hour-card,
      body[data-theme="dark"] .bubble-card,
      body[data-theme="dark"] .contact-list,
      body[data-theme="dark"] .table-wrap,
      body[data-theme="dark"] .list,
      body[data-theme="dark"] .chat-top,
      body[data-theme="dark"] .composer,
      body[data-theme="dark"] .media-strip,
      body[data-theme="dark"] .crm-filter-block,
      body[data-theme="dark"] .crm-mobile-side,
      body[data-theme="dark"] .crm-list-search input,
      body[data-theme="dark"] input,
      body[data-theme="dark"] select,
      body[data-theme="dark"] textarea,
      body[data-theme="dark"] button,
      body[data-theme="dark"] pre {
        background: linear-gradient(180deg, #17111f, #201429);
        color: var(--ink);
        border-color: var(--line);
        box-shadow: inset 0 1px 0 #ffffff05;
      }
      body[data-theme="dark"] .bubble-wrap.out .bubble-card {
        background: linear-gradient(180deg, #581c87, #7e22ce);
        border-color: #a855f7;
      }
      body[data-theme="dark"] .file-picker-name {
        background: #16111d;
        border-color: #473057;
      }
      body[data-theme="dark"] .weight-box.active {
        background: linear-gradient(180deg, #581c87, #7e22ce);
        border-color: var(--accent);
      }
      body[data-theme="dark"] .file-picker-label,
      body[data-theme="dark"] .weight-box {
        background: #0b0b10;
        color: var(--ink);
        border-color: var(--line);
      }
      body[data-theme="dark"] .field-muted input,
      body[data-theme="dark"] .field-muted select {
        background: #14111a;
        color: #ab9bbc;
        border-color: #3a2747;
      }
      body[data-theme="dark"] .dashboard-kpi-revenue .card {
        background: var(--card);
        border-color: #ffffff;
        box-shadow:
          0 0 0 1px #ffffff2e,
          0 0 18px #8b5cf670,
          0 0 36px #d946ef5a,
          0 18px 44px #00000052,
          inset 0 1px 0 #ffffff08;
      }
      body[data-theme="dark"] .dashboard-kpi-revenue .muted.tiny:first-child,
      body[data-theme="dark"] .dashboard-kpi-revenue .muted.tiny:last-child {
        color: #f3e8ff;
      }
      body[data-theme="dark"] .dashboard-kpi-revenue .kpi-value {
        color: #ffffff;
      }
      body[data-theme="dark"] .payment-credential-group.is-selected {
        border-color: #cb73ff;
        box-shadow: 0 0 0 2px #7427b944;
        background: linear-gradient(180deg, #22112f, #170d20);
      }
      body[data-theme="dark"] .tracking-api-version-box {
        border-color: #5a3373;
        background: #120b18;
      }
      body[data-theme="dark"] .chat-thread {
        background:
          radial-gradient(circle at 22% 18%, #a855f735, transparent 26%),
          radial-gradient(circle at 80% 12%, #d946ef20, transparent 20%),
          linear-gradient(180deg, #050507, #100915);
      }
      body[data-theme="dark"] .contact-item.active {
        background: linear-gradient(180deg, #6d00d9, #9b00ff);
        box-shadow: inset 3px 0 0 var(--accent);
      }
      body[data-theme="dark"] .contact-item.active .badge {
        background: #2b0f3c;
        color: #f3e8ff;
        border-color: #9333ea;
      }
      body[data-theme="dark"] button.primary {
        background: linear-gradient(135deg, var(--accent-strong), var(--accent));
        border-color: var(--accent);
        color: #fff;
      }
      body[data-theme="dark"] button.danger {
        background: #3b0a17;
        border-color: #9f1239;
        color: #fecdd3;
      }
      body[data-theme="dark"] .nav-btn.active,
      body[data-theme="dark"] .flow-chip.active {
        background: linear-gradient(180deg, #6d00d9, #9b00ff);
        color: #f3e8ff;
        border-color: var(--accent);
        box-shadow: inset 0 0 0 1px var(--accent), 0 10px 22px #00000055;
      }
      body[data-theme="dark"] .step-card,
      body[data-theme="dark"] .badge,
      body[data-theme="dark"] .flow-admin-panel {
        color: var(--ink);
        border-color: var(--line);
      }
      body[data-theme="dark"] .step-card,
      body[data-theme="dark"] .flow-admin-panel {
        background: linear-gradient(180deg, #18111f, #221429);
      }
      body[data-theme="dark"] .badge {
        background: #24142f;
      }
      body[data-theme="dark"] .flow-step-body {
        border-top-color: #382248;
      }
      body[data-theme="dark"] .flow-step-shell {
        --flow-step-accent: #e9d5ff;
        --flow-step-soft: #1a1122;
        --flow-step-border: #5a3373;
        background: linear-gradient(180deg, #18111f, #221429);
        border-color: var(--flow-step-border);
      }
      body[data-theme="dark"] .flow-step-shell.type-texto {
        --flow-step-accent: #f3e8ff;
        --flow-step-soft: #1a1122;
        --flow-step-border: #5a3373;
      }
      body[data-theme="dark"] .flow-step-shell.type-audio {
        --flow-step-accent: #f3e8ff;
        --flow-step-soft: #231233;
        --flow-step-border: #8f00ff;
      }
      body[data-theme="dark"] .flow-step-shell.type-imagem {
        --flow-step-accent: #f5d0fe;
        --flow-step-soft: #29153a;
        --flow-step-border: #b620ff;
      }
      body[data-theme="dark"] .flow-step-shell.type-video {
        --flow-step-accent: #f3e8ff;
        --flow-step-soft: #341747;
        --flow-step-border: #c026ff;
      }
      body[data-theme="dark"] .flow-step-shell.type-pix,
      body[data-theme="dark"] .flow-step-shell.type-oferta {
        --flow-step-accent: #a2d9b6;
        --flow-step-soft: #12261a;
        --flow-step-border: #315f43;
      }
      body[data-theme="dark"] .flow-step-shell.type-evento {
        --flow-step-accent: #efbb95;
        --flow-step-soft: #362116;
        --flow-step-border: #865637;
      }
      body[data-theme="dark"] .flow-step-shell.expanded {
        background: linear-gradient(180deg, var(--flow-step-soft) 0%, #17111f 82%);
        box-shadow: 0 8px 20px #00000040;
      }
      body[data-theme="dark"] .flow-step-headrow {
        background: linear-gradient(180deg, var(--flow-step-soft) 0%, #17111f 100%);
      }
      body[data-theme="dark"] .flow-step-toggle {
        background: transparent;
        border-color: transparent;
        color: var(--ink);
      }
      body[data-theme="dark"] .flow-step-toggle:hover {
        background: transparent;
        box-shadow: none;
      }
      body[data-theme="dark"] .flow-step-chevron {
        background: #140f19;
        border-color: var(--flow-step-border);
        color: var(--flow-step-accent);
      }
      body[data-theme="dark"] .flow-step-shell.expanded .flow-step-chevron {
        background: var(--flow-step-soft);
      }
      body[data-theme="dark"] .flow-step-summary-main .badge.step-index-badge {
        background: #140f19;
      }
      body[data-theme="dark"] .flow-step-summary-main .badge.step-type-badge {
        background: var(--flow-step-soft);
      }
      body[data-theme="dark"] .flow-step-body {
        background: transparent;
        border-top-color: var(--flow-step-border);
      }
      body[data-theme="dark"] .flow-step-body input,
      body[data-theme="dark"] .flow-step-body select,
      body[data-theme="dark"] .flow-step-body textarea,
      body[data-theme="dark"] .flow-step-body button:not(.primary):not(.danger),
      body[data-theme="dark"] .flow-step-body .step-inline-toggle {
        background: #140f19;
        border-color: #5a3373;
        color: var(--ink);
      }
      body[data-theme="dark"] .flow-step-summary-tools button:not(.primary):not(.danger) {
        background: #140f19;
        border-color: #5a3373;
        color: var(--ink);
      }
      body[data-theme="dark"] .step-action-btn:hover {
        border-color: #7e48a4;
        background: #24142f;
      }
      body[data-theme="dark"] .menu-select-trigger,
      body[data-theme="dark"] .menu-select-panel {
        background: #17111ff2;
        color: var(--ink);
        border-color: #5a3373;
      }
      body[data-theme="dark"] input:focus,
      body[data-theme="dark"] select:focus,
      body[data-theme="dark"] textarea:focus,
      body[data-theme="dark"] .menu-select.open .menu-select-trigger,
      body[data-theme="dark"] .form-select-shell.open .menu-select-trigger {
        outline: none;
        border-color: var(--accent);
        box-shadow: 0 0 0 3px #b620ff44;
        background: #24142f;
      }
      body[data-theme="dark"] * {
        scrollbar-color: #b620ff #140f19;
      }
      body[data-theme="dark"] *::-webkit-scrollbar-track {
        background: #140f19;
      }
      body[data-theme="dark"] *::-webkit-scrollbar-thumb {
        background: linear-gradient(180deg, #8f00ff, #c026ff);
        border-color: #140f19;
      }
      body[data-theme="dark"] *::-webkit-scrollbar-thumb:hover {
        background: linear-gradient(180deg, #9b00ff, #e056fd);
      }
      body[data-theme="dark"] .menu-select-option:hover,
      body[data-theme="dark"] .menu-select-option.active {
        background: linear-gradient(180deg, #6d00d9, #9b00ff);
        border-color: var(--accent);
        color: #f5f3ff;
      }
      body[data-theme="dark"] .menu-select-option.active .tiny,
      body[data-theme="dark"] .menu-select-option:hover .tiny {
        color: #ddd6fe;
      }
      body[data-theme="dark"] .badge {
        background: #24142f;
        color: #f3e8ff;
        border-color: #6d3f8f;
      }
      body[data-theme="dark"] .login {
        background:
          radial-gradient(circle at 18% 8%, #a855f740, transparent 45%),
          linear-gradient(160deg, #0b0b10ee, #14031fee);
      }
      body[data-theme="dark"] .login-logo,
      body[data-theme="dark"] .brand-logo {
        background: #17111f;
        border-color: #5a3373;
      }
      body[data-theme="dark"] .crm-avatar {
        background: linear-gradient(135deg, #9b00ff, #6d00d9);
        color: #f3e8ff;
        border-color: #d946ef;
      }
      body[data-theme="dark"] .phrase-editor {
        background: #17111f;
        color: var(--ink);
        border-color: var(--line);
      }
      body[data-theme="dark"] .phrase-editor:focus {
        border-color: var(--accent);
        box-shadow: 0 0 0 3px #b620ff40;
      }
      body[data-theme="dark"] button:not(.primary):not(.danger) {
        background: #201429;
        color: #f3e8ff;
        border-color: #5a3373;
      }
      body[data-mobile-ui="1"] .sidebar {
        display: none;
      }
      body[data-mobile-ui="1"] .app-shell {
        grid-template-columns: 1fr;
      }
      body[data-mobile-ui="1"] .main {
        padding-bottom: 6px;
      }
      body[data-mobile-ui="1"] .main,
      body[data-mobile-ui="1"] .card,
      body[data-mobile-ui="1"] .table-wrap,
      body[data-mobile-ui="1"] .audit-shell,
      body[data-mobile-ui="1"] .media-shell {
        overflow-x: clip;
      }
      body[data-mobile-ui="1"] .card.hero {
        overflow: visible;
      }
      body[data-mobile-ui="1"] .wrap {
        padding: 7px;
        padding-top: calc(env(safe-area-inset-top, 0px) + 4px);
      }
      body[data-mobile-ui="1"] .hero {
        padding: 10px;
        gap: 6px;
      }
      body[data-mobile-ui="1"] .hero h1 {
        font-size: 20px;
      }
      body[data-mobile-ui="1"] .hero-title-icon {
        width: 30px;
        height: 30px;
        border-radius: 9px;
      }
      body[data-mobile-ui="1"] .brand-logo {
        width: 34px;
        height: 34px;
        border-radius: 10px;
      }
      body[data-mobile-ui="1"] .hero .soft {
        padding: 8px;
        border-radius: 10px;
      }
      body[data-mobile-ui="1"] .hero-tools {
        width: 100%;
        justify-content: center;
        overflow: visible;
      }
      body[data-mobile-ui="1"] .bot-context-row .menu-select {
        flex: 1 1 auto;
        min-width: 0;
      }
      body[data-mobile-ui="1"] .hero-tab-row {
        grid-template-columns: minmax(0, 1fr) auto;
      }
      body[data-mobile-ui="1"] .menu-select.bot-context-menu {
        min-width: 0;
      }
      body[data-mobile-ui="1"] .menu-select.tab-menu .menu-select-panel {
        left: 0;
        right: auto;
        min-width: min(calc(100vw - 24px), 320px);
        width: min(calc(100vw - 24px), 320px);
        max-width: calc(100vw - 24px);
        max-height: min(calc(100dvh - 120px), 620px);
      }
      body[data-mobile-ui="1"] .hero-tools .hero-icons {
        justify-content: center;
        flex-wrap: nowrap;
      }
      body[data-mobile-ui="1"] .hero-tools .icon-btn {
        flex: 0 0 40px;
      }
      body[data-mobile-ui="1"] .crm-shell {
        --crm-panel-h: min(calc(100vh - 150px), 920px);
        gap: 6px;
      }
      body[data-mobile-ui="1"] .chat-app {
        height: var(--crm-panel-h);
        max-height: var(--crm-panel-h);
      }
      body[data-mobile-ui="1"] .chat-app.crm-chat-focused {
        position: fixed;
        left: 8px;
        right: 8px;
        top: 92px;
        bottom: 8px;
        height: auto;
        max-height: none;
        z-index: 80;
        border-radius: 18px;
        box-shadow: 0 24px 60px #02061740;
      }
      body[data-mobile-ui="1"] .crm-shell {
        align-items: stretch;
        overflow: visible;
      }
      body[data-mobile-ui="1"] .crm-pane.crm-filters {
        min-height: min(calc(100vh - 118px), 860px);
        overflow: visible;
        align-content: start;
        position: relative;
        z-index: 12;
      }
      body[data-mobile-ui="1"] .crm-filter-block,
      body[data-mobile-ui="1"] .crm-filter-block[open] {
        position: relative;
        z-index: 14;
      }
      body[data-mobile-ui="1"] .chat-thread {
        padding: 8px;
      }
      body[data-mobile-ui="1"] .bubble-card {
        max-width: 90%;
      }
      body[data-mobile-ui="1"] .contact-list {
        max-height: min(48vh, 520px);
      }
      body[data-mobile-ui="1"] .crm-filter-block {
        padding: 6px;
      }
      body[data-mobile-ui="1"] .crm-list-summary {
        align-items: flex-start;
        flex-direction: column;
      }
      body[data-mobile-ui="1"] .template-layer-grid,
      body[data-mobile-ui="1"] .template-layer-advanced-grid {
        grid-template-columns: 1fr;
      }
      body[data-mobile-ui="1"] .template-editor-grid,
      body[data-mobile-ui="1"] .template-samples-grid {
        grid-template-columns: 1fr;
      }
      body[data-mobile-ui="1"] .template-section-head,
      body[data-mobile-ui="1"] .template-layer-shell-head,
      body[data-mobile-ui="1"] .template-layer-head {
        flex-wrap: wrap;
      }
      body[data-mobile-ui="1"] .template-layer-shell-tools,
      body[data-mobile-ui="1"] .template-corner-actions {
        width: 100%;
        justify-content: flex-start;
      }
      body[data-mobile-ui="1"] .template-font-upload-row {
        align-items: stretch;
      }
      body[data-mobile-ui="1"] .crm-filter-block .grid {
        gap: 8px;
      }
      body[data-mobile-ui="1"] .login {
        margin-top: 4px;
        padding: 16px;
      }
      body[data-mobile-ui="1"] .login-logo {
        width: 74px;
        height: 74px;
        border-radius: 18px;
      }
      body[data-mobile-ui="1"] .ops-shell .row > *,
      body[data-mobile-ui="1"] .media-shell .row > * {
        flex: 1 1 100%;
      }
      body[data-mobile-ui="1"] .ops-inline-controls {
        flex-wrap: nowrap;
        gap: 6px;
      }
      body[data-mobile-ui="1"] .ops-inline-controls > * {
        flex: 1 1 0;
      }
      body[data-mobile-ui="1"] .ops-inline-controls button {
        padding-inline: 10px;
      }
      body[data-mobile-ui="1"] .weight-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }
      body[data-mobile-ui="1"] .flow-step-primary {
        grid-template-columns: 1fr;
      }
      body[data-mobile-ui="1"] .hero,
      body[data-mobile-ui="1"] .hero .menu-select,
      body[data-mobile-ui="1"] .hero .menu-select-panel {
        overflow: visible;
      }
      body[data-mobile-ui="1"] .flow-step-headrow {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 6px;
        padding: 9px 10px;
      }
      body[data-mobile-ui="1"] .flow-step-summary-tools {
        gap: 2px;
        justify-content: flex-end;
        align-self: start;
      }
      body[data-mobile-ui="1"] .flow-step-toggle {
        gap: 6px;
      }
      body[data-mobile-ui="1"] .flow-step-summary-main {
        gap: 4px;
      }
      body[data-mobile-ui="1"] .step-action-btn {
        width: 24px;
        height: 24px;
        border-radius: 8px;
      }
      body[data-mobile-ui="1"] .step-action-btn svg {
        width: 12px;
        height: 12px;
      }
      body[data-mobile-ui="1"] .flow-step-chevron {
        width: 16px;
        height: 16px;
      }
      body[data-mobile-ui="1"] .dashboard-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
      body[data-mobile-ui="1"] .dashboard-kpi-revenue {
        grid-column: span 2;
      }
      body[data-mobile-ui="1"] .dashboard-kpi-revenue .kpi-value {
        font-size: 28px;
        text-align: center;
      }
      body[data-mobile-ui="1"] .dashboard-kpi-revenue .muted.tiny {
        text-align: center;
      }
      body[data-mobile-ui="1"] .crm-chat-head {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 6px;
      }
      body[data-mobile-ui="1"] .crm-chat-head-main {
        gap: 8px;
      }
      body[data-mobile-ui="1"] .crm-chat-head-tools {
        gap: 4px;
      }
      body[data-mobile-ui="1"] .crm-chat-head-copy .tiny {
        font-size: 11px;
      }
      body[data-mobile-ui="1"] .file-picker-row {
        align-items: stretch;
      }
      body[data-mobile-ui="1"] .library-file-row {
        flex-wrap: nowrap;
        align-items: center;
      }
      body[data-mobile-ui="1"] .ops-upload-row {
        flex-wrap: wrap;
        align-items: stretch;
      }
      body[data-mobile-ui="1"] .library-file-row .file-picker-label,
      body[data-mobile-ui="1"] .library-file-row .file-picker-name,
      body[data-mobile-ui="1"] .ops-upload-row .file-picker-label,
      body[data-mobile-ui="1"] .ops-upload-row .file-picker-name {
        width: auto;
      }
      body[data-mobile-ui="1"] .library-file-row .file-picker-label,
      body[data-mobile-ui="1"] .ops-upload-row .file-picker-label {
        flex: 0 0 auto;
      }
      body[data-mobile-ui="1"] .library-file-row .file-picker-name,
      body[data-mobile-ui="1"] .ops-upload-row .file-picker-name {
        flex: 1 1 0;
      }
      body[data-mobile-ui="1"] .ops-upload-row button {
        width: 100%;
      }
      body[data-mobile-ui="1"] .file-picker-label,
      body[data-mobile-ui="1"] .file-picker-name {
        width: 100%;
      }
      body[data-mobile-ui="1"] .library-file-row .file-picker-label,
      body[data-mobile-ui="1"] .library-file-row .file-picker-name,
      body[data-mobile-ui="1"] .ops-upload-row .file-picker-label,
      body[data-mobile-ui="1"] .ops-upload-row .file-picker-name {
        width: auto;
      }
      body[data-mobile-ui="1"] .audit-item pre {
        max-height: 130px;
      }
      body[data-mobile-ui="1"] .mono {
        font-size: 10px;
        line-height: 1.3;
      }
      body[data-mobile-ui="1"] .audit-shell pre,
      body[data-mobile-ui="1"] .audit-item pre,
      body[data-mobile-ui="1"] pre.mono {
        font-size: 10px;
        line-height: 1.3;
        padding: 6px;
      }
      body[data-mobile-ui="1"] .media-mobile-card button {
        width: auto;
      }
      body[data-mobile-ui="1"] .media-catalog-scroll {
        max-height: min(calc(100vh - 240px), 360px);
      }
      body[data-mobile-ui="1"] .media-mobile-card {
        padding: 8px;
        gap: 5px;
      }
      body[data-mobile-ui="1"] .media-mobile-head {
        gap: 6px;
        align-items: center;
      }
      body[data-mobile-ui="1"] .media-mobile-actions {
        gap: 4px;
      }
      body[data-mobile-ui="1"] .media-mobile-actions button {
        min-height: 28px;
        padding: 4px 7px;
        font-size: 10px;
      }
      body[data-mobile-ui="1"] .media-mobile-actions .icon-btn {
        width: 28px;
        height: 28px;
      }
      body[data-mobile-ui="1"] .bot-card-list {
        grid-template-columns: 1fr;
      }
      body[data-mobile-ui="1"] .runtime-resources {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 5px;
      }
      body[data-mobile-ui="1"] .runtime-resource-card {
        padding: 6px 7px;
        gap: 4px;
      }
      body[data-mobile-ui="1"] .runtime-resource-head b {
        font-size: 10px;
      }
      body[data-mobile-ui="1"] .runtime-resource-container {
        font-size: 8px;
      }
      body[data-mobile-ui="1"] .runtime-resource-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 3px;
      }
      body[data-mobile-ui="1"] .runtime-metric {
        padding: 3px 4px;
      }
      body[data-mobile-ui="1"] .runtime-metric .tiny,
      body[data-mobile-ui="1"] .runtime-metric b {
        font-size: 9px;
      }
      body[data-mobile-ui="1"] .media-mobile-meta,
      body[data-mobile-ui="1"] .media-mobile-origin {
        font-size: 10px;
      }
      body[data-mobile-ui="1"] .bot-card-copy .mono,
      body[data-mobile-ui="1"] .bot-card-copy b {
        white-space: normal;
        text-overflow: clip;
        word-break: break-word;
      }
      body[data-mobile-ui="1"] .hour-strip { gap: 6px; }
      body[data-mobile-ui="1"] .hour-card {
        min-width: 136px;
        padding: 7px 8px;
      }
      body[data-mobile-ui="1"] .payment-settings-grid,
      body[data-mobile-ui="1"] .payment-credentials-grid {
        grid-template-columns: 1fr;
      }
      body[data-mobile-ui="1"] .payment-credential-group.syncpay {
        grid-template-columns: 1fr;
      }
      body[data-mobile-ui="1"] .payment-settings-kpis,
      body[data-mobile-ui="1"] .payment-actions {
        justify-content: flex-start;
      }
      body[data-mobile-ui="1"] .payment-pill {
        white-space: normal;
      }
      body[data-mobile-ui="1"] .crm-action-row.double,
      body[data-mobile-ui="1"] .crm-action-row.verify,
      body[data-mobile-ui="1"] .rm-step-grid {
        grid-template-columns: 1fr;
      }
      body[data-mobile-ui="1"] .phrase-headrow {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: start;
        gap: 6px;
      }
      body[data-mobile-ui="1"] .phrase-toolbar {
        gap: 4px;
      }
      body[data-mobile-ui="1"] .phrase-toolbar button {
        padding: 4px 7px;
        min-height: 28px;
        font-size: 11px;
      }
      body[data-mobile-ui="1"] .phrase-row {
        grid-template-columns: minmax(0, 1fr) auto;
      }
      body[data-mobile-ui="1"] .upsell-grid {
        grid-template-columns: 1fr;
      }
      body[data-mobile-ui="1"] .upsell-config-grid,
      body[data-mobile-ui="1"] .upsell-phrase-grid {
        grid-template-columns: 1fr;
      }
      body[data-mobile-ui="1"] .settings-selectors .field {
        min-width: 0;
        flex-basis: 100%;
      }
      body[data-mobile-ui="1"] .upsell-editor-grid {
        grid-template-columns: 1fr;
      }
      body[data-mobile-ui="1"] .library-upload-action {
        justify-content: stretch;
      }
      body[data-mobile-ui="1"] .library-upload-action button {
        width: 100%;
      }

	    @media (max-width: 1180px) {
	      .g2, .g3, .flow-grid, .split-hero, .app-shell, .crm-shell, .phrase-grid { grid-template-columns: 1fr; }
	      .list, .chat { max-height: 360px; height: 360px; }
	      .bar-row { grid-template-columns: 1fr; }
        .sidebar { position: static; }
        .crm-shell { --crm-panel-h: min(calc(100vh - 96px), 900px); }
        .crm-pane, .crm-side { height: auto; max-height: none; }
        .contact-list { max-height: min(30vh, 280px); }
        .flow-steps-scroll { max-height: min(72vh, 860px); }
        .phrase-list { max-height: min(52vh, 540px); }
        .chat-app {
          height: min(calc(100vh - 86px), 900px);
          max-height: min(calc(100vh - 86px), 900px);
          min-height: 70vh;
        }
        .composer-row > input,
        .composer-row > select,
        .composer-row > .form-select-shell,
        .composer-row > button { flex: 1 1 100%; }
        .ops-shell .row > input,
        .ops-shell .row > select,
        .ops-shell .row > .form-select-shell,
        .ops-shell .row > button,
        .media-shell .row > input,
        .media-shell .row > select,
        .media-shell .row > .form-select-shell,
        .media-shell .row > button { flex: 1 1 100%; }
        .ops-shell .grid.g2,
        .media-shell .grid.g2 { grid-template-columns: 1fr; }
        .dashboard-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
        .audit-shell th, .audit-shell td { min-width: 110px; }
        .hero-title-row h1 { white-space: normal; }
        .bubble-card { max-width: 92%; }
        .chat-thread { padding: 8px; }
        .composer { padding: 8px; }
        .payment-settings-grid,
        .payment-credentials-grid { grid-template-columns: 1fr; }
        .payment-credential-group.syncpay { grid-template-columns: 1fr; }
        .tracking-builder-grid,
        .tracking-inline-checks,
        .tracking-fields-grid { grid-template-columns: 1fr; }
        .tracking-group-compact { height: auto; }
        .tracking-bot-picker { grid-template-columns: 1fr; }
        .upsell-grid { grid-template-columns: 1fr; }
        .upsell-config-grid,
        .upsell-phrase-grid { grid-template-columns: 1fr; }
        .settings-selectors .field { min-width: 0; flex-basis: 100%; }
        .upsell-editor-grid { grid-template-columns: 1fr; }
        .rm-step-grid { grid-template-columns: 1fr 1fr; }
        .payment-settings-kpis,
        .payment-actions { justify-content: flex-start; }
	    }
      @media (max-width: 760px) {
        .dashboard-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
        .dashboard-kpi-revenue { grid-column: span 2; }
        .dashboard-kpi-revenue .kpi-value { font-size: 28px; text-align: center; }
        .dashboard-kpi-revenue .muted.tiny { text-align: center; }
      }
