  * { margin: 0; padding: 0; box-sizing: border-box; }

  body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #141414;
    color: #D1CFBF;
    min-height: 100vh;
    overflow: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
  }

  [x-cloak] { display: none !important; }

  /* Platform-specific layout overrides are in desktop.css / mobile.css */

  /* ---- Titlebar / drag region ---- */
  .titlebar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 38px;
    z-index: 200;
    background: #1a1a1a;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    padding-left: 78px;
  }

  .titlebar-title {
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(255,255,255,0.35);
    letter-spacing: 0.02em;
  }

  /* ===== LOGIN SCREEN ===== */
  .login-layout {
    display: flex;
    min-height: 100vh;
    padding-top: 0;
    /* Layered radial highlights pick up the brand gold without
       overwhelming the form. Anchors at top and bottom-right give the
       impression of soft directional light on a dark surface. */
    background:
      radial-gradient(ellipse 60% 50% at 20% 0%, rgba(201,169,110,0.10), transparent 60%),
      radial-gradient(ellipse 50% 40% at 100% 100%, rgba(201,169,110,0.06), transparent 55%),
      #0a0a0a;
  }

  .login-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 2rem 1.5rem;
  }

  .login-card {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .login-logo {
    width: 140px;
    height: auto;
    margin: 0 auto 1.25rem;
    opacity: 0.95;
  }

  .login-tagline {
    text-align: center;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.45);
    margin-bottom: 2rem;
    line-height: 1.5;
    letter-spacing: 0.01em;
  }

  .login-footer {
    margin-top: 2rem;
    font-size: 0.65rem;
    color: rgba(255,255,255,0.22);
    text-align: center;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
  }

  /* ===== SIGNUP CTAs ON THE LOGIN CARD ===== */
  .login-signup-block {
    margin-top: 1.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.08);
  }
  .login-signup-header {
    text-align: center;
    font-size: 0.68rem;
    color: rgba(255,255,255,0.4);
    margin-bottom: 0.9rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 600;
  }
  .signup-cta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
  }
  .signup-cta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.85rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    color: rgba(255,255,255,0.85);
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
  }
  .signup-cta:hover {
    background: rgba(201,169,110,0.06);
    border-color: rgba(201,169,110,0.35);
  }
  .signup-cta:active {
    transform: translateY(1px);
  }
  .signup-cta-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(201,169,110,0.12);
    border-radius: 8px;
    color: #c9a96e;
  }
  .signup-cta-icon svg { width: 16px; height: 16px; }
  .signup-cta-label {
    font-size: 0.86rem;
    font-weight: 600;
    color: rgba(255,255,255,0.95);
    margin-top: 0.1rem;
  }
  .signup-cta-sub {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.45);
    line-height: 1.35;
  }

  .form-group { margin-bottom: 0.875rem; width: 100%; }
  .form-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255,255,255,0.5);
    margin-bottom: 0.35rem;
  }
  .form-group input, .form-input {
    width: 100%;
    padding: 0.65rem 0.75rem;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    color: #fff;
    font-size: 0.88rem;
    font-family: inherit;
    transition: border-color 0.15s ease;
  }
  .form-group input:focus, .form-input:focus {
    outline: none;
    border-color: rgba(201,169,110,0.55);
    box-shadow: 0 0 0 3px rgba(201,169,110,0.08);
  }
  .form-group input::placeholder, .form-input::placeholder { color: rgba(255,255,255,0.2); }

  .btn-primary {
    width: 100%;
    padding: 0.78rem 1rem;
    /* Branded gold gradient instead of plain white — feels less like a
       browser default and more like the rest of the app. */
    background: linear-gradient(180deg, #d2b078 0%, #c9a96e 100%);
    border: none;
    border-radius: 6px;
    color: #1a1a1a;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: filter 0.15s ease, transform 0.05s ease, box-shadow 0.15s ease;
    margin-top: 0.5rem;
    letter-spacing: 0.01em;
    box-shadow: 0 2px 10px rgba(201,169,110,0.15);
  }
  .btn-primary:hover:not(:disabled) {
    filter: brightness(1.08);
    box-shadow: 0 4px 14px rgba(201,169,110,0.25);
  }
  .btn-primary:active:not(:disabled) {
    transform: translateY(1px);
  }
  .btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

  /* Secondary button — same shape as primary, transparent with a
     gold-tinted hairline border. Used for "Back to sign in" and
     similar paired actions on the login / signup screens. */
  .btn-secondary {
    width: 100%;
    padding: 0.78rem 1rem;
    background: transparent;
    border: 1px solid rgba(201,169,110,0.35);
    border-radius: 6px;
    color: rgba(201,169,110,0.9);
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
    margin-top: 0.5rem;
    letter-spacing: 0.01em;
  }
  .btn-secondary:hover:not(:disabled) {
    background: rgba(201,169,110,0.06);
    border-color: rgba(201,169,110,0.55);
    color: #c9a96e;
  }
  .btn-secondary:active:not(:disabled) {
    transform: translateY(1px);
  }
  .btn-secondary:disabled { opacity: 0.4; cursor: not-allowed; }

  .error-msg {
    background: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.18);
    color: #fca5a5;
    padding: 0.55rem 0.75rem;
    border-radius: 6px;
    margin-bottom: 0.875rem;
    font-size: 0.82rem;
    width: 100%;
  }

  .spinner-sm {
    display: inline-block;
    width: 16px; height: 16px;
    border: 2px solid rgba(0,0,0,0.15);
    border-top-color: #111;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 0.4rem;
  }

  @keyframes spin { to { transform: rotate(360deg); } }

  .version-tag {
    position: absolute;
    bottom: 1rem; right: 1.25rem;
    font-size: 0.68rem;
    color: rgba(255,255,255,0.12);
  }

  /* ===== APP SHELL ===== */
  .app-layout {
    display: flex;
    height: 100vh;
    padding-top: 0;
  }

  /* Sidebar */
  .sidebar {
    width: 175px;
    background: #1a1a1a;
    border-right: 1px solid rgba(255,255,255,0.06);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow-y: auto;
  }

  .sidebar-brand {
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .sidebar-brand img { width: 120px; height: auto; }

  .sidebar-nav {
    padding: 0.75rem 0;
    flex: 1;
  }

  .nav-section-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: rgba(255,255,255,0.25);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.75rem 1.25rem 0.35rem;
  }

  .nav-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 1.25rem;
    cursor: pointer;
    color: rgba(255,255,255,0.5);
    font-size: 0.82rem;
    font-weight: 500;
    transition: all 0.15s ease;
    border-left: 3px solid transparent;
    user-select: none;
  }
  .nav-item:hover { color: rgba(255,255,255,0.8); background: rgba(255,255,255,0.02); }
  .nav-item.active {
    color: #c9a96e;
    background: rgba(201,169,110,0.06);
    border-left-color: #c9a96e;
  }
  .nav-item svg { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.7; }
  .nav-item.active svg { opacity: 1; }

  .sidebar-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.06);
  }

  .sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0;
  }

  .sidebar-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: rgba(201,169,110,0.15);
    color: #c9a96e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
  }

  .sidebar-user-info { flex: 1; min-width: 0; }
  .sidebar-user-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255,255,255,0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .sidebar-user-role {
    font-size: 0.68rem;
    color: rgba(255,255,255,0.3);
    text-transform: capitalize;
  }

  .btn-logout {
    background: none;
    border: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.4);
    padding: 0.35rem 0.6rem;
    border-radius: 6px;
    font-size: 0.72rem;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
  }
  .btn-logout:hover { border-color: rgba(239,68,68,0.3); color: #fca5a5; }

  /* Main content */
  .main-content {
    flex: 1;
    overflow-y: auto;
    background: #141414;
  }

  .page-header {
    padding: 1.5rem 2rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .page-header h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
  }

  .page-body { padding: 0.75rem 2rem 2rem; }

  /* Cards & stats */
  .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
  }

  .stat-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 1.25rem;
    transition: border-color 0.2s ease;
  }
  .stat-card:hover { border-color: rgba(255,255,255,0.1); }

  .stat-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
  }

  .stat-value {
    font-family: 'Poppins', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
  }

  .stat-sub {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.3);
    margin-top: 0.25rem;
  }

  /* Dashboard filter bar */
  .dash-filter-bar {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .dash-period-selector {
    display: flex;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    overflow: hidden;
  }

  .dash-period-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-right: 1px solid rgba(255,255,255,0.06);
    background: transparent;
    color: rgba(255,255,255,0.5);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.02em;
  }
  .dash-period-btn:last-child { border-right: none; }
  .dash-period-btn:hover:not(.active) { background: rgba(255,255,255,0.05); }
  .dash-period-btn.active { background: rgba(201,169,110,0.15); color: #c9a96e; }

  /* Dashboard metric cards */
  .dash-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
  }

  .dash-metric-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
  }
  /* Subtle top highlight line */
  .dash-metric-card::before {
    content: '';
    position: absolute;
    top: 0; left: 15%; right: 15%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
    transition: all 0.3s ease;
  }
  .dash-metric-card:hover {
    border-color: rgba(201,169,110,0.15);
    background: rgba(255,255,255,0.03);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1), 0 0 0 1px rgba(201,169,110,0.04) inset;
    transform: translateY(-1px);
  }
  .dash-metric-card:hover::before {
    left: 5%; right: 5%;
    background: linear-gradient(90deg, transparent, rgba(201,169,110,0.2), transparent);
  }

  .dash-metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
  }

  .dash-metric-icon {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.5);
  }

  .dash-metric-change {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.45rem;
    border: 2px solid;
    font-weight: 700;
    font-size: 0.7rem;
  }
  .dash-metric-change.positive { color: #22c55e; border-color: #22c55e; background: rgba(34,197,94,0.1); }
  .dash-metric-change.negative { color: #ef4444; border-color: #ef4444; background: rgba(239,68,68,0.1); }

  .dash-metric-title {
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.35rem;
  }

  .dash-metric-value {
    font-family: 'Poppins', sans-serif;
    font-size: 1.65rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.35rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    background: linear-gradient(180deg, #fff 30%, rgba(255,255,255,0.7));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .dash-metric-subtitle {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.3);
  }

  /* Dashboard charts */
  .dash-charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
  }

  .dash-chart-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 1.25rem;
  }

  .dash-chart-title {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.15rem;
  }

  .dash-chart-subtitle {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.35);
    margin-bottom: 1rem;
  }

  .dash-chart-container {
    position: relative;
    height: 260px;
    overflow: hidden;
  }

  /* Top Campaigns list */
  .dash-campaigns-list { display: flex; flex-direction: column; }
  .dash-campaign-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
  .dash-campaign-row:last-child { border-bottom: none; }
  .dash-campaign-rank { width: 24px; height: 24px; border-radius: 6px; background: rgba(255,255,255,0.06); display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700; color: rgba(255,255,255,0.4); flex-shrink: 0; }
  .dash-campaign-info { flex: 1; min-width: 0; }
  .dash-campaign-id { font-size: 0.85rem; font-weight: 600; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .dash-campaign-meta { font-size: 0.75rem; color: rgba(255,255,255,0.35); display: flex; gap: 0.3rem; }
  .dash-campaign-revenue { font-size: 0.85rem; font-weight: 700; color: #c9a96e; flex-shrink: 0; }

  /* Dashboard spinner */
  .dash-spinner {
    border: 3px solid rgba(201,169,110,0.15);
    border-top-color: #c9a96e;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    animation: dashspin 1s linear infinite;
    margin: 3rem auto;
  }
  @keyframes dashspin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

  /* Tables */
  .data-table-wrap {
    background: rgba(255,255,255,0.018);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 0 0 1px rgba(255,255,255,0.02) inset;
  }

  .table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    gap: 0.75rem;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 5;
    background: rgba(20,20,20,0.85);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    backdrop-filter: blur(12px) saturate(140%);
  }

  /* Search with icon */
  .table-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
  }
  .table-search-wrap .search-icon {
    position: absolute;
    left: 0.6rem;
    color: rgba(255,255,255,0.2);
    pointer-events: none;
    transition: color 0.2s ease;
  }
  .table-search-wrap:focus-within .search-icon { color: rgba(201,169,110,0.6); }
  .table-search {
    background: rgba(255,255,255,0.035);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 0.45rem 0.75rem 0.45rem 2rem;
    color: #fff;
    font-size: 0.82rem;
    font-family: inherit;
    width: 220px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .table-search:focus {
    outline: none;
    border-color: rgba(201,169,110,0.5);
    background: rgba(255,255,255,0.05);
    box-shadow: 0 0 0 3px rgba(201,169,110,0.08), 0 0 12px rgba(201,169,110,0.06);
    width: 260px;
  }
  .table-search::placeholder { color: rgba(255,255,255,0.2); }

  .btn-sm {
    padding: 0.4rem 0.875rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
  }
  .btn-gold {
    background: linear-gradient(135deg, #c9a96e 0%, #b89355 100%);
    color: white;
  }
  .btn-gold:hover { filter: saturate(1.3); transform: translateY(-1px); }
  .btn-ghost {
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.6);
    border: 1px solid rgba(255,255,255,0.08);
  }
  .btn-ghost:hover { border-color: rgba(255,255,255,0.15); color: rgba(255,255,255,0.8); }
  .btn-danger-ghost {
    background: rgba(239,68,68,0.04);
    color: rgba(239,68,68,0.6);
    border: 1px solid rgba(239,68,68,0.1);
  }
  .btn-danger-ghost:hover { border-color: rgba(239,68,68,0.3); color: #fca5a5; }
  .btn-sm:disabled, .btn-sm[disabled] { opacity: 0.4; cursor: not-allowed; filter: none; transform: none; }

  table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
  }
  thead th {
    text-align: left;
    font-size: 0.68rem;
    font-weight: 700;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.5rem 0.4rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    white-space: nowrap;
    background: rgba(255,255,255,0.02);
  }
  tbody td {
    padding: 0.45rem 0.4rem;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
    border-bottom: 1px solid rgba(255,255,255,0.03);
    vertical-align: middle;
  }
  tbody tr { height: 40px; transition: background 0.15s; }
  tbody tr:hover { background: rgba(201,169,110,0.04); }
  tbody tr:last-child td { border-bottom: none; }

  /* Lead checkbox styling */
  .lead-checkbox {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 14px !important;
    height: 14px !important;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 3px;
    background: rgba(255,255,255,0.03);
    cursor: pointer;
    position: relative;
    transition: all 0.15s ease;
    vertical-align: middle;
  }
  .lead-checkbox:hover {
    border-color: rgba(201,169,110,0.4);
    background: rgba(201,169,110,0.06);
  }
  .lead-checkbox:checked {
    background: #c9a96e;
    border-color: #c9a96e;
  }
  .lead-checkbox:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
  }

  /* Bulk action bar */
  .lead-action-bar {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    padding: 0 1rem 1rem;
  }
  .lead-action-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem;
    background: rgba(30,30,34,0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(201,169,110,0.25);
    border-radius: 12px;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.3);
  }
  .lead-action-bar-count {
    font-size: 0.82rem;
    font-weight: 600;
    color: #fff;
  }
  .lead-action-bar-link {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.4);
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    padding: 0;
  }
  .lead-action-bar-link:hover {
    color: rgba(255,255,255,0.7);
  }
  @keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
  }

  /* Redistribute options panel */
  .redist-opts-btn {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.6rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: rgba(255,255,255,0.5);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s;
  }
  .redist-opts-btn:hover {
    border-color: rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.8);
  }
  .redist-opts-btn.active {
    border-color: rgba(201,169,110,0.4);
    color: #c9a96e;
  }
  .redist-opts-count {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #c9a96e;
    color: #000;
    font-size: 0.62rem;
    font-weight: 700;
  }
  .redist-opts-panel {
    margin-bottom: 0.5rem;
    padding: 0.65rem 0.85rem;
    background: rgba(30,30,34,0.95);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
  }
  .redist-opts-panel-title {
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.35rem;
  }
  .redist-opt-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    transition: color 0.15s;
  }
  .redist-opt-row:hover {
    color: rgba(255,255,255,0.9);
  }
  .redist-opt-row input[type="checkbox"] {
    accent-color: #c9a96e;
    width: 15px;
    height: 15px;
  }

  /* Column manager */
  .col-mgr-btn {
    padding: 0.2rem 0.45rem;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 5px;
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.5);
    font-weight: 600;
    font-size: 0.65rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.05em;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.2rem;
  }
  .col-mgr-btn:hover {
    background: rgba(201,169,110,0.15);
    color: #c9a96e;
    border-color: rgba(201,169,110,0.3);
  }
  .col-mgr-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.4rem;
    background: #1e1e22;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 0.75rem;
    min-width: 240px;
    max-height: 350px;
    overflow-y: auto;
    z-index: 10000;
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
  }
  .col-mgr-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.4rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.15s;
    margin-bottom: 0.35rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
  }
  .col-mgr-item:hover {
    background: rgba(201,169,110,0.06);
    border-color: rgba(201,169,110,0.3);
  }
  .col-mgr-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #c9a96e;
  }
  .col-mgr-badge {
    font-size: 0.6rem;
    padding: 0.1rem 0.3rem;
    border-radius: 8px;
    font-weight: 700;
    text-transform: uppercase;
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.4);
  }

  /* Status pill for leads table */
  .status-pill {
    padding: 0.2rem 0.4rem;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-radius: 2px;
    white-space: nowrap;
  }

  .badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
  }
  .badge-green { background: rgba(34,197,94,0.1); color: #4ade80; }
  .badge-red { background: rgba(239,68,68,0.1); color: #f87171; }
  .badge-blue { background: rgba(59,130,246,0.1); color: #60a5fa; }
  .badge-yellow { background: rgba(234,179,8,0.1); color: #fbbf24; }
  .badge-gray { background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.4); }

  .empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: rgba(255,255,255,0.3);
  }
  .empty-state svg { margin-bottom: 0.75rem; opacity: 0.3; }
  .empty-state p { font-size: 0.88rem; }

  /* Modals */
  .modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
  }

  .modal {
    background: #1e1e22;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    width: 540px;
    max-width: 95vw;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    -webkit-overflow-scrolling: touch;
  }

  .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    position: sticky;
    top: 0;
    background: #1e1e22;
    z-index: 1;
  }
  .modal-header::before {
    display: none;
  }
  .modal-header h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
  }
  .modal-close {
    background: rgba(255,255,255,0.06);
    border: none;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 1.1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .modal-body { padding: 1rem; }

  .modal-body .form-group { margin-bottom: 0.85rem; }
  .modal-body .form-group:last-child { margin-bottom: 0; }

  .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    position: sticky;
    bottom: 0;
    background: #1e1e22;
  }

  .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
  }

  .form-toggle {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
  }
  .form-toggle input[type="checkbox"] {
    width: 36px; height: 20px;
    appearance: none;
    background: rgba(255,255,255,0.08);
    border-radius: 10px;
    position: relative;
    cursor: pointer;
    transition: background 0.2s ease;
  }
  .form-toggle input[type="checkbox"]::after {
    content: '';
    position: absolute;
    width: 16px; height: 16px;
    background: #fff;
    border-radius: 50%;
    top: 2px; left: 2px;
    transition: transform 0.2s ease;
  }
  .form-toggle input[type="checkbox"]:checked {
    background: #c9a96e;
  }
  .form-toggle input[type="checkbox"]:checked::after {
    transform: translateX(16px);
  }
  .form-toggle span {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.6);
  }

  select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2rem;
  }
  select.form-input option { background: #1e1e22; color: #fff; }

  /* Loading overlay */
  .loading-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
  }
  .loader {
    width: 32px; height: 32px;
    border: 3px solid rgba(201,169,110,0.15);
    border-top-color: #c9a96e;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
  }

  /* Route groups / destinations nested */
  .nested-section {
    background: rgba(255,255,255,0.01);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 8px;
    margin-top: 1rem;
    padding: 1rem;
  }
  .nested-section h4 {
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
    margin-bottom: 0.75rem;
  }

  .text-truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
  }

  .action-btns { display: flex; gap: 0.35rem; }

  /* ===== Enhanced Lead Filters ===== */
  .filters-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    margin-bottom: 0.5rem;
    overflow: visible;
  }

  .filters-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.45rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    gap: 0.5rem;
  }

  .filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    padding: 0.5rem 0.75rem;
  }

  .filters-row + .filters-row {
    border-top: 1px solid rgba(255,255,255,0.04);
  }

  /* Multiselect dropdown */
  .ms-wrap {
    position: relative;
    min-width: 150px;
    flex: 1;
  }

  .ms-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.45rem 0.7rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    color: rgba(255,255,255,0.7);
    font-size: 0.8rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.2s;
    white-space: nowrap;
  }
  .ms-btn:hover, .ms-btn.open { border-color: #c9a96e; }

  .ms-btn svg { flex-shrink: 0; transition: transform 0.2s; }

  .ms-drop {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    min-width: 200px;
    max-height: 260px;
    overflow-y: auto;
    background: #1e1e22;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.5);
    z-index: 500;
    padding: 0.25rem 0;
  }

  .ms-drop-search {
    padding: 0.4rem 0.6rem;
    margin: 0.25rem 0.5rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 5px;
    color: #fff;
    font-size: 0.78rem;
    font-family: inherit;
    /* box-sizing:border-box so width:calc(100% - 1rem) actually fits inside
       the .ms-drop. With the browser default (content-box), the 0.6rem
       horizontal padding plus 1px border on each side adds ~5px on top of
       the computed width, pushing the input past the dropdown's right edge
       — visible whenever the dropdown is right-anchored at the viewport. */
    box-sizing: border-box;
    width: calc(100% - 1rem);
  }
  .ms-drop-search:focus { outline: none; border-color: #c9a96e; }
  .ms-drop-search::placeholder { color: rgba(255,255,255,0.25); }

  .ms-opt {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    cursor: pointer;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.7);
    transition: background 0.12s;
  }
  .ms-opt:hover { background: rgba(255,255,255,0.05); }
  .ms-opt.selected { color: #c9a96e; font-weight: 600; }

  .ms-opt input[type="checkbox"] {
    width: 15px; height: 15px;
    accent-color: #c9a96e;
    cursor: pointer;
    flex-shrink: 0;
  }

  .ms-empty {
    padding: 0.75rem;
    text-align: center;
    color: rgba(255,255,255,0.25);
    font-size: 0.78rem;
  }

  /* Date presets */
  .date-presets {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 180px;
    background: #1e1e22;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.5);
    z-index: 500;
    padding: 0.25rem 0;
  }

  .date-preset-item {
    padding: 0.45rem 0.85rem;
    cursor: pointer;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.65);
    transition: background 0.12s;
  }
  .date-preset-item:hover { background: rgba(255,255,255,0.05); }
  .date-preset-item.active { color: #c9a96e; font-weight: 600; }

  /* Date range picker panel */
  .drp-panel {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    display: flex;
    background: #1e1e22;
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 10px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.55);
    z-index: 500;
    overflow: hidden;
  }
  .drp-presets {
    min-width: 150px;
    padding: 0.35rem 0;
    border-right: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
  }
  .drp-preset-item {
    padding: 0.45rem 0.85rem;
    cursor: pointer;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
    transition: background 0.12s, color 0.12s;
    white-space: nowrap;
  }
  .drp-preset-item:hover { background: rgba(255,255,255,0.04); color: rgba(255,255,255,0.85); }
  .drp-preset-item.active { color: #c9a96e; font-weight: 600; background: rgba(201,169,110,0.06); }

  .drp-calendars {
    display: flex;
    flex-wrap: wrap;
    padding: 0.6rem 0.75rem 0;
    gap: 0 0.75rem;
    width: 540px;
  }
  .drp-cal { width: 252px; flex-shrink: 0; }
  .drp-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.25rem 0 0.5rem;
  }
  .drp-cal-title { font-size: 0.82rem; font-weight: 600; color: rgba(255,255,255,0.85); }
  .drp-cal-selectors { display: flex; align-items: center; gap: 4px; }
  .drp-month-select,
  .drp-year-select {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 4px;
    color: rgba(255,255,255,0.85);
    font-size: 0.78rem;
    font-weight: 600;
    font-family: inherit;
    padding: 2px 4px;
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s;
    -webkit-appearance: none;
    appearance: none;
  }
  .drp-month-select { min-width: 52px; }
  .drp-year-select { min-width: 58px; }
  .drp-month-select:hover,
  .drp-year-select:hover { border-color: rgba(201,169,110,0.4); }
  .drp-month-select:focus,
  .drp-year-select:focus { border-color: #c9a96e; }
  .drp-month-select option,
  .drp-year-select option { background: #1e1e22; color: rgba(255,255,255,0.85); }
  .drp-nav-btn {
    background: none; border: none; cursor: pointer; padding: 4px; border-radius: 4px;
    color: rgba(255,255,255,0.4); transition: color 0.15s, background 0.15s;
    display: flex; align-items: center; justify-content: center;
  }
  .drp-nav-btn:hover { color: #c9a96e; background: rgba(255,255,255,0.04); }

  .drp-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
  }
  .drp-weekday {
    font-size: 0.68rem;
    font-weight: 500;
    color: rgba(255,255,255,0.3);
    text-align: center;
    padding: 0 0 0.35rem;
  }
  .drp-day {
    text-align: center;
    font-size: 0.78rem;
    padding: 5px 0;
    cursor: pointer;
    border-radius: 5px;
    color: rgba(255,255,255,0.7);
    transition: background 0.1s, color 0.1s;
    user-select: none;
  }
  .drp-day:hover:not(.disabled):not(.off) { background: rgba(255,255,255,0.06); }
  .drp-day.off { color: rgba(255,255,255,0.15); }
  .drp-day.disabled { color: rgba(255,255,255,0.1); cursor: default; }
  .drp-day.today { border: 1px solid rgba(201,169,110,0.35); }
  .drp-day.start-date,
  .drp-day.end-date {
    background: #c9a96e !important;
    color: #141414 !important;
    font-weight: 600;
    border-radius: 5px;
  }
  .drp-day.in-range {
    background: rgba(201,169,110,0.12);
    border-radius: 0;
    color: rgba(255,255,255,0.85);
  }
  .drp-day.start-date { border-radius: 5px 0 0 5px; }
  .drp-day.end-date { border-radius: 0 5px 5px 0; }
  .drp-day.start-date.end-date { border-radius: 5px; }

  .drp-footer {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0 0.6rem;
    margin-top: 0.25rem;
    border-top: 1px solid rgba(255,255,255,0.06);
  }
  .drp-selected-label {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.45);
  }
  .drp-footer-btns { display: flex; gap: 0.4rem; }
  .drp-cancel-btn {
    padding: 0.3rem 0.75rem;
    font-size: 0.75rem;
    border-radius: 5px;
    border: 1px solid rgba(255,255,255,0.1);
    background: transparent;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
  }
  .drp-cancel-btn:hover { background: rgba(255,255,255,0.04); color: rgba(255,255,255,0.75); }
  .drp-apply-btn {
    padding: 0.3rem 0.85rem;
    font-size: 0.75rem;
    border-radius: 5px;
    border: none;
    background: #c9a96e;
    color: #141414;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
  }
  .drp-apply-btn:hover { opacity: 0.88; }
  .drp-apply-btn:disabled { opacity: 0.35; cursor: default; }

  /* Filter action buttons */
  .filter-actions {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    margin-left: auto;
  }

  .filter-count {
    background: #c9a96e;
    color: #1a1a1a;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
  }

  /* Advanced filters toggle */
  .adv-toggle {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.7rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    color: rgba(255,255,255,0.55);
    font-size: 0.78rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
  }
  .adv-toggle:hover { border-color: rgba(255,255,255,0.15); color: rgba(255,255,255,0.8); }

  .adv-section {
    padding: 0.5rem 0.75rem;
    border-top: 1px solid rgba(255,255,255,0.04);
  }

  .adv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.6rem;
  }

  .adv-field label {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.3rem;
  }

  .adv-field input,
  .adv-field select {
    width: 92%;
    padding: 0.4rem 0.6rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    color: #fff;
    font-size: 0.8rem;
    font-family: inherit;
  }
  .adv-field input:focus,
  .adv-field select:focus { outline: none; border-color: #c9a96e; }
  .adv-field select option { background: #1e1e22; color: #fff; }

  /* ===== Filter Tabs ===== */
  .filter-tabs-inline {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
  }

  .filter-tab-inline {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.65rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255,255,255,0.5);
    transition: all 0.15s;
    position: relative;
    white-space: nowrap;
  }
  .filter-tab-inline:hover { border-color: rgba(255,255,255,0.15); color: rgba(255,255,255,0.7); }
  .filter-tab-inline.active {
    background: rgba(201,169,110,0.12);
    border-color: #c9a96e;
    color: #c9a96e;
    font-weight: 600;
  }

  .filter-tab-indicator {
    width: 6px; height: 6px;
    background: #c9a96e;
    border-radius: 50%;
    flex-shrink: 0;
  }

  .filter-tab-name-input {
    background: transparent;
    border: 1px solid #c9a96e;
    border-radius: 3px;
    color: inherit;
    font-size: inherit;
    font-family: inherit;
    font-weight: inherit;
    padding: 0.1rem 0.3rem;
    width: 80px;
    outline: none;
  }

  .filter-tab-close {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: rgba(255,255,255,0.3);
    cursor: pointer;
    padding: 0.1rem;
    border-radius: 3px;
    transition: all 0.15s;
  }
  .filter-tab-close:hover { color: #ef4444; background: rgba(239,68,68,0.1); }

  .filter-tab-add-inline {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px; height: 26px;
    background: rgba(255,255,255,0.03);
    border: 1px dashed rgba(255,255,255,0.12);
    border-radius: 6px;
    color: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: all 0.15s;
  }
  .filter-tab-add-inline:hover { border-color: #c9a96e; color: #c9a96e; }

  /* ===== Field Filter Rows ===== */
  .field-filter-rows {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex: 1;
    min-width: 0;
  }

  .field-filter-row {
    display: flex;
    gap: 0.4rem;
    align-items: center;
  }

  .field-filter-row .ms-wrap { min-width: 140px; flex: 1; }
  .field-filter-row .ms-wrap:first-child { flex: 1.5; }

  .field-filter-row input.ff-value {
    flex: 1;
    min-width: 100px;
    padding: 0.45rem 0.7rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    color: #fff;
    font-size: 0.8rem;
    font-family: inherit;
  }
  .field-filter-row input.ff-value:focus { outline: none; border-color: #c9a96e; }
  .field-filter-row input.ff-value:disabled { opacity: 0.35; cursor: not-allowed; }
  .field-filter-row input.ff-value::placeholder { color: rgba(255,255,255,0.25); }

  .ff-remove-btn {
    padding: 0.4rem 0.6rem;
    background: #ef4444;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: opacity 0.15s;
  }
  .ff-remove-btn:hover { opacity: 0.85; }

  .ff-add-btn {
    padding: 0.4rem 0.6rem;
    background: #c9a96e;
    color: white;
    border: 1px solid rgba(255,255,255,0.06);
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    transition: all 0.2s;
  }
  .ff-add-btn:hover { background: #e55a2b; transform: translateY(-1px); }

  .filters-row-2 {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    padding: 0.5rem 0.75rem;
    border-top: 1px solid rgba(255,255,255,0.04);
  }

  /* Stats bar (compact, inside table) */
  .leads-table-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.3rem 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }

  .leads-stat {
    display: flex;
    gap: 0.25rem;
    align-items: baseline;
  }

  .leads-stat-value {
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
  }

  .leads-stat-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: rgba(255,255,255,0.3);
  }

  .leads-stat-divider {
    width: 1px;
    height: 14px;
    background: rgba(255,255,255,0.08);
  }

  /* ===== REPORTS ===== */
  .report-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-bottom: 0;
  }
  .report-tab {
    padding: 0.6rem 1rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255,255,255,0.4);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
  }
  .report-tab:hover { color: rgba(255,255,255,0.7); }
  .report-tab.active {
    color: #c9a96e;
    border-bottom-color: #c9a96e;
  }

  .report-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
  }
  .metric-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 1.25rem;
    transition: all 0.2s ease;
  }
  .metric-card:hover {
    border-color: rgba(201,169,110,0.3);
    transform: translateY(-2px);
  }
  .metric-card.report-highlight {
    background: rgba(201,169,110,0.08);
    border-color: rgba(201,169,110,0.2);
  }
  .metric-card.report-highlight .metric-label { color: #c9a96e; }
  .metric-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    letter-spacing: 0.5px;
    margin-bottom: 0.4rem;
  }
  .metric-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
  }

  .report-charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1rem;
  }
  .chart-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 1.25rem;
  }
  .chart-card h3 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
    margin: 0 0 1rem 0;
    letter-spacing: 0.3px;
  }
  .chart-card .apexcharts-canvas {
    max-height: 280px;
  }
  .chart-card > div:last-child {
    height: 280px;
  }

  @media (max-width: 768px) {
    .report-charts-grid { grid-template-columns: 1fr; }
    .report-metrics { grid-template-columns: 1fr; }
    .report-tabs { overflow-x: auto; }
  }

  /* Revenue Insights Modal */
  .revenue-modal {
    background: #1e1e22;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    width: 100%;
    max-width: 1000px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: revModalSlideIn 0.3s ease;
  }
  @keyframes revModalSlideIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
  }
  .revenue-modal-header {
    background: #1a1a1a;
    color: #ffffff;
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
  }
  .revenue-modal-header .header-content { flex: 1; min-width: 0; }
  .revenue-modal-header h2 { font-size: 1.25rem; font-weight: 700; margin: 0 0 0.625rem 0; letter-spacing: -0.02em; }
  .header-summary { display: flex; gap: 0.875rem; align-items: center; flex-wrap: wrap; }
  .summary-item { display: flex; flex-direction: column; gap: 0.125rem; }
  .summary-label { font-size: 0.625rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: rgba(255,255,255,0.3); }
  .summary-value { font-size: 0.875rem; font-weight: 700; color: #ffffff; }
  .summary-divider { width: 1px; height: 32px; background: #444444; }
  .btn-icon-close {
    width: 36px; height: 36px; padding: 0; margin-left: 0.5rem; flex-shrink: 0;
    background: transparent; border: 2px solid #ffffff; color: #ffffff;
    cursor: pointer; transition: all 0.2s ease;
    display: flex; align-items: center; justify-content: center;
    align-self: flex-start;
  }
  .btn-icon-close:hover { background: rgba(255,255,255,0.1); }
  .revenue-modal-tabs {
    display: flex; background: rgba(255,255,255,0.02);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    overflow-x: auto; flex-shrink: 0;
  }
  .revenue-modal-tabs .rev-tab-btn {
    padding: 0.625rem 1.25rem; background: transparent; border: none;
    border-right: 1px solid rgba(255,255,255,0.06);
    font-weight: 600; font-size: 0.75rem; color: rgba(255,255,255,0.5);
    cursor: pointer; transition: all 0.2s ease;
    text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap;
  }
  .revenue-modal-tabs .rev-tab-btn:hover { background: rgba(255,255,255,0.03); color: rgba(255,255,255,0.7); }
  .revenue-modal-tabs .rev-tab-btn.active { background: rgba(201,169,110,0.1); color: #c9a96e; }
  .revenue-modal-body {
    flex: 1; overflow-y: auto; padding: 1.25rem;
    background: rgba(255,255,255,0.01); min-height: 0;
  }
  .rev-tab-panel { display: flex; flex-direction: column; gap: 1.5rem; }
  .rev-chart-section {
    background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px; padding: 1.25rem;
  }
  .rev-chart-section h3 {
    font-size: 0.875rem; font-weight: 700; color: #fff;
    margin: 0 0 1rem 0; letter-spacing: -0.02em; text-transform: uppercase;
  }
  .rev-chart-container { position: relative; height: 260px; }
  .rev-chart-large { height: 320px; }
  .rev-table-section {
    background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px; padding: 1rem; overflow-x: auto;
  }
  .insights-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
  .insights-table thead { background: rgba(255,255,255,0.02); border-bottom: 1px solid rgba(255,255,255,0.06); }
  .insights-table th { padding: 0.625rem 0.75rem; text-align: left; font-weight: 700; font-size: 0.7rem; color: rgba(255,255,255,0.35); text-transform: uppercase; letter-spacing: 0.5px; }
  .insights-table td { padding: 0.625rem 0.75rem; border-bottom: 1px solid rgba(255,255,255,0.03); font-size: 0.8rem; color: rgba(255,255,255,0.7); }
  .insights-table tbody tr:hover { background: rgba(255,255,255,0.02); }
  .rev-loading-state, .rev-error-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3rem 2rem; gap: 0.75rem; text-align: center; }
  .rev-error-state svg { color: #ef4444; }
  .rev-error-state h3 { font-size: 1.25rem; font-weight: 700; color: #fff; margin: 0; }
  .rev-error-state p { font-size: 0.9rem; color: rgba(255,255,255,0.35); max-width: 400px; }
  .rev-btn-retry { padding: 0.75rem 1.5rem; background: #1a1a1a; color: #ffffff; border: 1px solid rgba(255,255,255,0.06); font-weight: 600; cursor: pointer; transition: all 0.2s ease; margin-top: 0.5rem; }
  .rev-btn-retry:hover { background: #333333; }

  /* Legacy spinner (still used by mobile) */
  .rev-spinner { display: inline-block; width: 32px; height: 32px; border: 3px solid rgba(255,255,255,0.2); border-top-color: #c9a96e; border-radius: 50%; animation: spin 0.6s linear infinite; }

  /* Boshed loader animation */
  .boshed-loader {
    position: relative;
    width: 64px;
    height: 64px;
  }
  .boshed-orbit-ring {
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent 250deg, rgba(255,255,255,0.85) 360deg);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
    animation: boshed-ring-spin 1.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    pointer-events: none;
  }
  .boshed-icon {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: block;
    transform: scale(1.04);
  }
  @keyframes boshed-ring-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
  }
  .boshed-loading-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255,255,255,0.4);
    letter-spacing: 0.03em;
    margin: 0;
  }
  .loading-dots span {
    animation: boshed-dots 1.4s infinite;
    opacity: 0;
  }
  .loading-dots span:nth-child(1) { animation-delay: 0s; }
  .loading-dots span:nth-child(2) { animation-delay: 0.2s; }
  .loading-dots span:nth-child(3) { animation-delay: 0.4s; }
  @keyframes boshed-dots {
    0%, 20% { opacity: 0; }
    40% { opacity: 1; }
    60%, 100% { opacity: 0; }
  }
  .multi-controls { display: flex; flex-direction: column; gap: 1rem; margin-top: 1rem; }
  .rev-control-group { display: flex; flex-direction: column; gap: 0.5rem; }
  .rev-control-label { font-size: 0.7rem; font-weight: 700; color: rgba(255,255,255,0.35); text-transform: uppercase; letter-spacing: 0.5px; }
  .dimension-select { padding: 0.625rem 0.75rem; border: 1px solid rgba(255,255,255,0.08); border-radius: 6px; background: rgba(255,255,255,0.03); font-weight: 600; font-size: 0.875rem; color: #fff; cursor: pointer; transition: all 0.2s ease; }
  .dimension-select:hover { border-color: rgba(255,255,255,0.15); }
  .dimension-select:focus { outline: none; border-color: #c9a96e; background: rgba(255,255,255,0.05); box-shadow: 0 0 0 3px rgba(201,169,110,0.1); }
  .view-mode-buttons { display: flex; border: 1px solid rgba(255,255,255,0.08); border-radius: 6px; overflow: hidden; }
  .view-mode-btn { flex: 1; padding: 0.625rem 1rem; border: none; border-right: 1px solid rgba(255,255,255,0.06); background: transparent; color: rgba(255,255,255,0.5); font-weight: 600; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.5px; cursor: pointer; transition: all 0.2s ease; }
  .view-mode-btn:last-child { border-right: none; }
  .view-mode-btn:hover { background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.7); }
  .view-mode-btn.active { background: rgba(201,169,110,0.15); color: #c9a96e; }
  .rev-btn-apply { padding: 0.875rem 1.5rem; background: linear-gradient(135deg, #c9a96e 0%, #b89355 100%); color: #fff; border: 1px solid transparent; border-radius: 8px; font-weight: 700; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.5px; cursor: pointer; transition: all 0.2s ease; margin-top: 0.5rem; }
  .rev-btn-apply:hover { filter: saturate(1.3); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(201,169,110,0.2); }
  .nested-container { max-height: 500px; overflow-y: auto; border: 1px solid rgba(255,255,255,0.06); border-radius: 8px; background: rgba(255,255,255,0.02); }
  .nested-item { border-bottom: 1px solid rgba(255,255,255,0.03); }
  .nested-item:last-child { border-bottom: none; }
  .nested-level-1 { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 1rem; cursor: pointer; background: rgba(255,255,255,0.03); font-weight: 600; transition: background 0.2s ease; }
  .nested-level-1:hover { background: rgba(255,255,255,0.05); }
  .nested-level-2 { display: flex; justify-content: space-between; align-items: center; padding: 0.625rem 0.75rem; cursor: pointer; border-bottom: 1px solid rgba(255,255,255,0.03); transition: background 0.2s ease; font-size: 0.875rem; }
  .nested-level-2:hover { background: rgba(255,255,255,0.02); }
  .nested-level-3 { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 0.75rem; border-bottom: 1px solid rgba(255,255,255,0.02); font-size: 0.8rem; color: rgba(255,255,255,0.35); }
  .nested-children { padding-left: 2rem; }
  .nested-grandchildren { padding-left: 2rem; }
  .nested-label { display: flex; align-items: center; gap: 0.5rem; }
  .nested-values { display: flex; align-items: center; gap: 1rem; }
  .nested-count { color: rgba(255,255,255,0.35); font-size: 0.875rem; }
  .nested-revenue { font-weight: 700; color: #fff; }
  .rev-empty-state { text-align: center; padding: 3rem 1.5rem; color: rgba(255,255,255,0.3); }
  .rev-empty-state svg { margin: 0 auto 1rem; display: block; }
  .rev-empty-state p { font-size: 0.9rem; font-weight: 600; max-width: 400px; margin: 0 auto; line-height: 1.5; }

  /* ===== Settings Page ===== */
  .settings-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding-bottom: 0;
  }
  .settings-tab {
    padding: 0.5rem 1rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: rgba(255,255,255,0.4);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.15s;
    margin-bottom: -1px;
  }
  .settings-tab:hover { color: rgba(255,255,255,0.7); }
  .settings-tab.active {
    color: #c9a96e;
    border-bottom-color: #c9a96e;
  }
  .settings-subtabs {
    display: flex;
    gap: 0.35rem;
    margin-bottom: 1rem;
  }
  .settings-subtab {
    padding: 0.35rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
  }
  .settings-subtab:hover { color: rgba(255,255,255,0.7); background: rgba(255,255,255,0.06); }
  .settings-subtab.active {
    color: #c9a96e;
    background: rgba(201,169,110,0.1);
    border-color: rgba(201,169,110,0.25);
  }
  .settings-msg {
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    margin-bottom: 0.75rem;
  }
  .settings-msg-error {
    background: rgba(239,68,68,0.1);
    color: #f87171;
    border: 1px solid rgba(239,68,68,0.15);
  }
  .settings-msg-success {
    background: rgba(34,197,94,0.1);
    color: #4ade80;
    border: 1px solid rgba(34,197,94,0.15);
  }
  .settings-select {
    padding: 0.25rem 0.4rem;
    font-size: 0.75rem;
    background: #1a1a1a;
    color: rgba(255,255,255,0.6);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px;
    cursor: pointer;
  }
  .settings-select:focus {
    outline: none;
    border-color: rgba(201,169,110,0.4);
  }
  .settings-select:disabled {
    opacity: 0.4;
    cursor: not-allowed;
  }
  .config-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    padding: 0.65rem 0.75rem;
    transition: border-color 0.15s;
  }
  .config-card:hover {
    border-color: rgba(255,255,255,0.12);
  }
  .config-active {
    border-color: rgba(34,197,94,0.2);
    background: rgba(34,197,94,0.02);
  }
  .config-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(255,255,255,0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.35);
    flex-shrink: 0;
  }
  .config-icon-active {
    background: rgba(34,197,94,0.1);
    color: #4ade80;
  }
  .ch-table-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-family: monospace;
  }
  .ch-pill-ok {
    background: rgba(34,197,94,0.08);
    color: #4ade80;
    border: 1px solid rgba(34,197,94,0.15);
  }
  .ch-pill-missing {
    background: rgba(239,68,68,0.08);
    color: #f87171;
    border: 1px solid rgba(239,68,68,0.15);
  }
  .ch-pill-optional {
    background: rgba(250,204,21,0.06);
    color: #fbbf24;
    border: 1px solid rgba(250,204,21,0.12);
  }

  /* ===== DISTRIBUTION MODAL ===== */
  .dist-redist-banner {
    background: linear-gradient(135deg, rgba(139,92,246,0.25) 0%, rgba(99,102,241,0.25) 100%);
    border: 1px solid rgba(139,92,246,0.3);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
  }
  .dist-group {
    margin-bottom: 1rem;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 0.5rem;
    overflow: hidden;
  }
  .dist-group-header {
    padding: 0.75rem 1rem;
    background: rgba(255,255,255,0.04);
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .dist-group-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .dist-group-stats .dgs-label {
    font-size: 0.6rem;
    font-weight: 700;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }
  .dist-group-stats .dgs-value {
    font-size: 0.85rem;
    color: #fff;
    font-weight: 600;
    margin-top: 0.15rem;
  }
  .dist-filters {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .dist-filter-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.4rem 0.5rem;
    background: rgba(255,255,255,0.02);
    border-radius: 4px;
    margin-bottom: 0.3rem;
  }
  .dist-dest-header {
    display: grid;
    grid-template-columns: 28px 1.5fr 1fr 80px 80px 1.5fr 80px 60px;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.65rem;
    font-weight: 700;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.02);
  }
  .dist-dest-row {
    display: grid;
    grid-template-columns: 28px 1.5fr 1fr 80px 80px 1.5fr 80px 60px;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    align-items: center;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid rgba(255,255,255,0.04);
  }
  .dist-dest-row:hover {
    background: rgba(255,255,255,0.04);
  }
  .dist-dest-row.not-expandable {
    cursor: default;
  }
  .dist-dest-row.previous-attempt {
    opacity: 0.5;
  }
  .dist-method-badge {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    font-size: 0.65rem;
    font-weight: 600;
    border-radius: 3px;
    text-transform: uppercase;
    white-space: nowrap;
  }
  .dist-method-badge.m-direct {
    background: rgba(59,130,246,0.15);
    color: #60a5fa;
    border: 1px solid rgba(59,130,246,0.2);
  }
  .dist-method-badge.m-pingpost {
    background: rgba(168,85,247,0.15);
    color: #c084fc;
    border: 1px solid rgba(168,85,247,0.2);
  }
  .dist-method-badge.m-skipped {
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.4);
    border: 1px solid rgba(255,255,255,0.1);
  }
  .dist-method-badge.m-manual {
    background: rgba(139,92,246,0.15);
    color: #a78bfa;
    border: 1px solid rgba(139,92,246,0.2);
  }
  .dist-status-badge {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    font-size: 0.65rem;
    font-weight: 600;
    border-radius: 3px;
    text-transform: capitalize;
  }
  .dist-status-badge.s-accepted {
    background: rgba(34,197,94,0.12);
    color: #4ade80;
  }
  .dist-status-badge.s-rejected {
    background: rgba(239,68,68,0.12);
    color: #f87171;
  }
  .dist-status-badge.s-skipped {
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.45);
  }
  .dist-status-badge.s-suppressed {
    background: rgba(251,191,36,0.12);
    color: #fbbf24;
  }
  .dist-status-badge.s-duplicate {
    background: rgba(251,191,36,0.12);
    color: #fbbf24;
  }
  .dist-expanded-content {
    padding: 1rem;
    background: rgba(255,255,255,0.02);
    border-top: 1px solid rgba(255,255,255,0.06);
  }
  .dist-expanded-content .dist-section {
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    background: rgba(0,0,0,0.2);
  }
  .dist-expanded-content .dist-section:last-child {
    margin-bottom: 0;
  }
  .dist-expanded-content .dist-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
  }
  .dist-expanded-content .dist-section-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: rgba(255,255,255,0.5);
  }
  .dist-copy-btn {
    padding: 0.2rem 0.5rem;
    font-size: 0.65rem;
    font-weight: 600;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    color: #fff;
    transition: opacity 0.15s;
  }
  .dist-copy-btn:hover { opacity: 0.8; }
  .dist-copy-btn.sent { background: #3b82f6; }
  .dist-copy-btn.response { background: rgba(255,255,255,0.15); }
  .dist-pre {
    margin: 0;
    padding: 0.6rem;
    border-radius: 4px;
    font-size: 0.68rem;
    font-family: 'Courier New', monospace;
    white-space: pre-wrap;
    word-break: break-all;
    line-height: 1.45;
    max-height: 250px;
    overflow-y: auto;
  }
  .dist-pre.sent {
    background: rgba(59,130,246,0.08);
    border: 1px solid rgba(59,130,246,0.15);
    color: #a5b4fc;
  }
  .dist-pre.response {
    background: rgba(34,197,94,0.08);
    border: 1px solid rgba(34,197,94,0.15);
    color: #86efac;
  }
  .dist-warning-box {
    border-radius: 6px;
    padding: 1rem;
    margin-top: 0.5rem;
  }
  .dist-warning-box.filtered {
    background: rgba(245,158,11,0.1);
    border: 1px solid rgba(245,158,11,0.25);
  }
  .dist-warning-box.no-routes {
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.25);
  }
  .dist-redist-badge {
    display: inline-block;
    padding: 0.1rem 0.3rem;
    font-size: 0.55rem;
    font-weight: 600;
    background: rgba(139,92,246,0.3);
    color: #c084fc;
    text-transform: uppercase;
    margin-left: 0.25rem;
    border-radius: 2px;
  }
  .dist-prev-badge {
    display: inline-block;
    padding: 0.1rem 0.3rem;
    font-size: 0.55rem;
    font-weight: 600;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    margin-left: 0.25rem;
    border-radius: 2px;
  }
  .dist-redist-info {
    background: rgba(139,92,246,0.1);
    border: 1px solid rgba(139,92,246,0.25);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
  }

  /* ===== Campaign Detail ===== */
  /* ====== CAMPAIGN DETAIL - MOBILE NATIVE ====== */

  /* Header */
  .cd-header {
    padding: 0.75rem 1rem 0;
  }
  .cd-header-top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .cd-back-btn {
    background: none;
    border: none;
    color: #c9a96e;
    padding: 0.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    flex-shrink: 0;
  }
  .cd-header-title-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex: 1;
    min-width: 0;
  }
  .cd-header-title-row h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .cd-header-desc {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.35);
    padding: 0.15rem 0 0 2.3rem;
  }
  .cd-api-key-box {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    padding: 0.2rem 0.45rem;
    flex-shrink: 0;
  }
  .cd-api-key-box code {
    font-size: 0.65rem;
    color: rgba(255,255,255,0.4);
    font-family: 'SF Mono', Monaco, monospace;
  }
  .cd-api-key-box button {
    background: none;
    border: none;
    color: rgba(255,255,255,0.35);
    cursor: pointer;
    padding: 0.1rem;
    display: flex;
  }

  /* Segmented Tab Control */
  .cd-tabs {
    display: flex;
    margin: 0.75rem 1rem 0;
    background: rgba(255,255,255,0.04);
    border-radius: 8px;
    padding: 3px;
    gap: 0;
    border: none;
  }
  .cd-tab {
    flex: 1;
    padding: 0.45rem 0.25rem;
    background: none;
    border: none;
    color: rgba(255,255,255,0.45);
    font-size: 0.75rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    text-align: center;
  }
  .cd-tab:hover { color: rgba(255,255,255,0.7); }
  .cd-tab.active {
    background: rgba(201,169,110,0.15);
    color: #c9a96e;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  }
  .cd-tab-badge {
    background: rgba(201,169,110,0.3);
    color: #c9a96e;
    padding: 0.05rem 0.35rem;
    font-size: 0.6rem;
    border-radius: 3px;
    font-weight: 700;
  }

  .cd-tab-content { padding: 1rem 1rem 2rem; }

  /* Messages */
  .cd-message {
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    margin: 0 1rem 0.5rem;
  }
  .cd-message.success { background: rgba(34,197,94,0.1); color: #4ade80; border: 1px solid rgba(34,197,94,0.2); }
  .cd-message.error { background: rgba(239,68,68,0.1); color: #f87171; border: 1px solid rgba(239,68,68,0.2); }

  /* Delivery header */
  .cd-delivery-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
  }
  .cd-section-title {
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
  }
  .cd-delivery-actions {
    display: flex;
    gap: 0.4rem;
  }

  /* Compact native buttons */
  .cd-compact-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.65rem;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.6);
    white-space: nowrap;
  }
  .cd-compact-btn:hover { border-color: rgba(255,255,255,0.15); }
  .cd-compact-btn:disabled { opacity: 0.4; cursor: default; }
  .cd-compact-btn-primary {
    background: linear-gradient(135deg, #c9a96e 0%, #b89355 100%);
    border-color: transparent;
    color: #fff;
  }
  .cd-compact-btn-primary:hover { filter: saturate(1.2); }
  .cd-compact-btn-danger {
    background: rgba(239,68,68,0.1);
    border-color: rgba(239,68,68,0.2);
    color: #f87171;
  }

  /* Full-width button */
  .cd-full-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.7rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: all 0.15s;
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.6);
  }
  .cd-full-btn:disabled { opacity: 0.5; }
  .cd-full-btn-primary {
    background: linear-gradient(135deg, #c9a96e 0%, #b89355 100%);
    color: #fff;
  }

  /* Group cards */
  .cd-group-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    margin-bottom: 0.75rem;
    overflow: hidden;
  }
  .cd-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    gap: 0.5rem;
  }
  .cd-group-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
  }
  .cd-priority-badge {
    background: rgba(201,169,110,0.15);
    color: #c9a96e;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.2rem 0.4rem;
    border-radius: 5px;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .cd-group-details {
    min-width: 0;
    flex: 1;
  }
  .cd-group-details h3 {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .cd-meta-tags {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
  }
  .cd-meta-tag {
    font-size: 0.6rem;
    font-weight: 600;
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.35);
    text-transform: capitalize;
  }
  .cd-group-actions {
    display: flex;
    gap: 0.2rem;
    flex-shrink: 0;
  }
  .cd-icon-btn {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.4);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
  }
  .cd-icon-btn:hover { border-color: rgba(255,255,255,0.15); color: rgba(255,255,255,0.8); }
  .cd-icon-btn:disabled { opacity: 0.25; cursor: default; }
  .cd-icon-btn.danger:hover { border-color: rgba(239,68,68,0.3); color: #f87171; }

  /* Group body & routes */
  .cd-group-body {
    padding: 0 0.75rem 0.75rem;
  }
  .cd-empty-routes {
    text-align: center;
    color: rgba(255,255,255,0.25);
    font-size: 0.75rem;
    padding: 0.75rem !important;
  }
  .cd-route-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.65rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 8px;
    margin-bottom: 0.35rem;
    cursor: pointer;
    transition: background 0.15s;
  }
  .cd-route-row:last-child { margin-bottom: 0; }
  .cd-route-row:active { background: rgba(255,255,255,0.05); }
  .cd-route-left {
    flex: 1;
    min-width: 0;
  }
  .cd-route-name {
    font-weight: 600;
    color: #fff;
    font-size: 0.8rem;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .cd-route-meta {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.15rem;
  }
  .cd-route-meta span {
    font-size: 0.65rem;
    color: rgba(255,255,255,0.3);
    font-weight: 600;
  }
  .cd-route-right {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
  }
  .cd-route-status {
    width: 7px;
    height: 7px;
    border-radius: 50%;
  }
  .cd-route-status.active { background: #4ade80; }
  .cd-route-status.inactive { background: #f87171; }

  /* Empty state */
  .cd-empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: rgba(255,255,255,0.25);
    border: 1px dashed rgba(255,255,255,0.08);
    border-radius: 12px;
  }
  .cd-empty-state p {
    font-size: 0.82rem;
    margin-top: 0.5rem;
  }

  /* Settings cards */
  .cd-settings-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.75rem;
  }
  .cd-settings-card h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .cd-settings-card h2 svg { color: rgba(255,255,255,0.4); }
  .cd-settings-card.danger {
    border-color: rgba(239,68,68,0.15);
  }
  .cd-danger-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
  }
  .cd-danger-item:last-child { border-bottom: none; }
  .cd-danger-item h4 {
    font-size: 0.82rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.1rem;
  }
  .cd-danger-item p {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.3);
  }
  .cd-btn-danger {
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.2);
    color: #f87171;
    padding: 0.35rem 0.65rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
  }

  /* Field cards */
  .cd-field-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 0.65rem;
    overflow: hidden;
  }
  .cd-field-card-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
  }
  .cd-field-req {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    cursor: pointer;
    flex-shrink: 0;
  }
  .cd-field-req input { accent-color: #c9a96e; width: 15px; height: 15px; }
  .cd-field-req span { font-size: 0.6rem; font-weight: 600; color: rgba(255,255,255,0.35); text-transform: uppercase; }
  .cd-field-card-body {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
  }
  .cd-field-label {
    font-size: 0.6rem;
    font-weight: 600;
    color: rgba(255,255,255,0.3);
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.15rem;
  }

  /* Code block */
  .cd-code-block {
    background: #0f172a;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    padding: 0.65rem 0.75rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .cd-code-block code, .cd-code-block pre {
    font-family: 'SF Mono', Monaco, 'Fira Code', monospace;
    font-size: 0.7rem;
    color: #38bdf8;
    white-space: pre-wrap;
    word-break: break-all;
    margin: 0;
  }

  /* Response grid */
  .cd-response-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  /* ===== Horizontal Pipeline Flow ===== */
  @keyframes pf-flow {
    0%   { left: -6px; opacity: 0; }
    15%  { opacity: 1; }
    85%  { opacity: 1; }
    100% { left: calc(100% - 2px); opacity: 0; }
  }

  .pf {
    display: flex;
    align-items: flex-start;
    gap: 0;
    overflow-x: auto;
    padding: 0.75rem 0 1rem;
    margin-bottom: 1rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(201,169,110,0.2) transparent;
  }
  .pf::-webkit-scrollbar { height: 5px; }
  .pf::-webkit-scrollbar-track { background: transparent; }
  .pf::-webkit-scrollbar-thumb { background: rgba(201,169,110,0.2); border-radius: 4px; }

  /* Columns */
  .pf-col {
    flex-shrink: 0;
    min-width: 120px;
  }
  .pf-col-label {
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.25);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
  }

  /* Entry & End cards */
  .pf-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 1rem 1.2rem;
    border-radius: 12px;
    text-align: center;
  }
  .pf-card-entry {
    background: linear-gradient(135deg, rgba(201,169,110,0.12) 0%, rgba(201,169,110,0.04) 100%);
    border: 1px solid rgba(201,169,110,0.25);
  }
  .pf-card-entry .pf-card-icon { color: #c9a96e; }
  .pf-card-entry .pf-card-title { font-size: 0.8rem; font-weight: 700; color: #c9a96e; }
  .pf-card-end {
    background: linear-gradient(135deg, rgba(239,68,68,0.08) 0%, rgba(239,68,68,0.02) 100%);
    border: 1px solid rgba(239,68,68,0.2);
  }
  .pf-card-end .pf-card-icon { color: #f87171; }
  .pf-card-end .pf-card-title { font-size: 0.8rem; font-weight: 700; color: #f87171; }

  /* Validation checks */
  .pf-col-checks { min-width: 140px; }
  .pf-checks { display: flex; flex-direction: column; gap: 0.3rem; }
  .pf-check-row {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.45rem 0.65rem;
    border-radius: 8px;
  }
  .pf-check-on {
    background: rgba(74,222,128,0.08);
    border: 1px solid rgba(74,222,128,0.2);
    color: #4ade80;
  }
  .pf-check-off {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.3);
  }

  /* Arrows / connectors */
  .pf-arrow {
    display: flex;
    align-items: center;
    padding: 0 0.4rem;
    flex-shrink: 0;
    color: rgba(201,169,110,0.35);
    align-self: center;
    gap: 0;
  }
  .pf-arrow-line {
    position: relative;
    width: 28px;
    height: 2px;
    background: rgba(201,169,110,0.2);
    border-radius: 1px;
    overflow: hidden;
  }
  .pf-arrow-dot {
    position: absolute;
    top: -2px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #c9a96e;
    box-shadow: 0 0 6px rgba(201,169,110,0.5);
    animation: pf-flow 2.5s ease-in-out infinite;
  }
  .pf-arrow svg { flex-shrink: 0; }

  /* Tier wrap (priority + optional arrow) */
  .pf-tier-wrap {
    display: contents;
  }

  /* Priority tier column */
  .pf-col-tier {
    min-width: 240px;
    max-width: 380px;
  }
  .pf-prio-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(201,169,110,0.15);
    color: #c9a96e;
    font-size: 0.55rem;
    font-weight: 800;
    flex-shrink: 0;
  }

  /* Group blocks */
  .pf-group {
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 10px;
    padding: 0.6rem 0.7rem;
    margin-bottom: 0.5rem;
    transition: border-color 0.2s;
  }
  .pf-group:hover { border-color: rgba(201,169,110,0.2); }
  .pf-dimmed { opacity: 0.4; }
  .pf-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.3rem;
    margin-bottom: 0.25rem;
  }
  .pf-group-name { font-size: 0.78rem; font-weight: 700; color: #fff; }
  .pf-badge-red {
    font-size: 0.55rem;
    font-weight: 800;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    background: rgba(239,68,68,0.12);
    color: #f87171;
  }
  .pf-group-meta {
    display: flex;
    gap: 0.2rem;
    flex-wrap: wrap;
    margin-bottom: 0.3rem;
  }
  .pf-pill {
    font-size: 0.6rem;
    font-weight: 600;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.35);
    white-space: nowrap;
  }

  /* Group filters */
  .pf-group-filters {
    display: flex;
    gap: 0.2rem;
    flex-wrap: wrap;
    padding-top: 0.3rem;
    margin-bottom: 0.3rem;
    border-top: 1px solid rgba(255,255,255,0.04);
  }
  .pf-filter {
    font-size: 0.58rem;
    font-weight: 600;
    padding: 0.08rem 0.35rem;
    border-radius: 4px;
    white-space: nowrap;
  }
  .pf-filter-on { background: rgba(201,169,110,0.12); color: #c9a96e; }
  .pf-filter-off { background: rgba(255,255,255,0.03); color: rgba(255,255,255,0.2); text-decoration: line-through; }

  /* Routes inside groups */
  .pf-routes {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }
  .pf-route {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 7px;
    padding: 0.35rem 0.5rem;
    transition: border-color 0.2s;
  }
  .pf-route:hover { border-color: rgba(255,255,255,0.12); }
  .pf-route-top {
    display: flex;
    align-items: center;
    gap: 0.3rem;
  }
  .pf-status {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
  }
  .pf-status.on { background: #4ade80; box-shadow: 0 0 5px rgba(74,222,128,0.4); }
  .pf-status.off { background: #f87171; }
  .pf-route-name { font-size: 0.72rem; font-weight: 600; color: rgba(255,255,255,0.85); }
  .pf-route-price {
    margin-left: auto;
    font-size: 0.65rem;
    font-weight: 700;
    color: rgba(201,169,110,0.8);
  }
  .pf-route-meta {
    display: flex;
    gap: 0.15rem;
    flex-wrap: wrap;
    margin-top: 0.15rem;
    padding-left: 0.9rem;
  }
  .pf-pill-sm {
    font-size: 0.55rem;
    font-weight: 600;
    padding: 0.05rem 0.3rem;
    border-radius: 3px;
    background: rgba(255,255,255,0.035);
    color: rgba(255,255,255,0.3);
    white-space: nowrap;
  }
  .pf-route-checks {
    display: flex;
    gap: 0.15rem;
    flex-wrap: wrap;
    margin-top: 0.2rem;
    padding-left: 0.9rem;
  }
  .pf-chk {
    font-size: 0.55rem;
    font-weight: 600;
    padding: 0.06rem 0.3rem;
    border-radius: 3px;
    white-space: nowrap;
  }
  .pf-chk-validation { background: rgba(59,130,246,0.12); color: #60a5fa; }
  .pf-chk-dedupe { background: rgba(168,85,247,0.12); color: #c084fc; }
  .pf-chk-suppression { background: rgba(239,68,68,0.1); color: #f87171; }
  .pf-chk-filter { background: rgba(201,169,110,0.12); color: #c9a96e; }
  .pf-no-routes {
    font-size: 0.65rem;
    color: rgba(255,255,255,0.15);
    text-align: center;
    padding: 0.4rem;
  }

  /* ===== Entity Row List ===== */
  /* ---- Sort Pills ---- */
  .sort-pills { display: flex; gap: 0.35rem; flex-wrap: wrap; }
  .sort-pill {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
  }
  .sort-pill:hover { border-color: rgba(201,169,110,0.25); color: rgba(255,255,255,0.6); background: rgba(201,169,110,0.06); }
  .sort-pill.active { border-color: rgba(201,169,110,0.4); color: #c9a96e; background: rgba(201,169,110,0.1); }
  .sort-pill span { font-size: 0.55rem; margin-left: 0.15rem; }

  /* ---- Entity List ---- */
  .entity-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 0.35rem;
    counter-reset: entity-rank;
    position: relative;
  }
  /* Scroll shadow top/bottom fade */
  .entity-list::before,
  .entity-list::after {
    content: '';
    position: sticky;
    left: 0; right: 0;
    height: 0;
    z-index: 2;
    pointer-events: none;
    display: block;
  }

  /* Stagger entrance animation */
  @keyframes entityRowIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .entity-row-stagger {
    animation: entityRowIn 0.35s ease-out both;
  }
  .entity-row-stagger:nth-child(1)  { animation-delay: 0s; }
  .entity-row-stagger:nth-child(2)  { animation-delay: 0.03s; }
  .entity-row-stagger:nth-child(3)  { animation-delay: 0.06s; }
  .entity-row-stagger:nth-child(4)  { animation-delay: 0.07s; }
  .entity-row-stagger:nth-child(5)  { animation-delay: 0.09s; }
  .entity-row-stagger:nth-child(6)  { animation-delay: 0.1s; }
  .entity-row-stagger:nth-child(7)  { animation-delay: 0.11s; }
  .entity-row-stagger:nth-child(8)  { animation-delay: 0.12s; }
  .entity-row-stagger:nth-child(9)  { animation-delay: 0.13s; }
  .entity-row-stagger:nth-child(10) { animation-delay: 0.14s; }
  .entity-row-stagger:nth-child(n+11) { animation-delay: 0.16s; }

  .entity-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.65rem 0.9rem 0.65rem 1rem;
    background: rgba(255,255,255,0.015);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    counter-increment: entity-rank;
  }
  /* Alternating subtle background */
  .entity-row:nth-child(even) {
    background: rgba(255,255,255,0.025);
  }
  /* Left accent bar */
  .entity-row::before {
    content: '';
    position: absolute;
    left: 0; top: 20%; bottom: 20%;
    width: 2px;
    border-radius: 1px;
    background: rgba(201,169,110,0);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  }
  /* Ambient glow on hover */
  .entity-row::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(201,169,110,0.04), transparent 40%);
    transition: opacity 0.3s ease;
    pointer-events: none;
  }
  .entity-row:hover::after { opacity: 1; }
  .entity-row:hover {
    background: rgba(201,169,110,0.04);
    border-color: rgba(201,169,110,0.18);
    transform: translateX(2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12), 0 0 0 1px rgba(201,169,110,0.06);
  }
  .entity-row:hover::before {
    background: linear-gradient(180deg, rgba(201,169,110,0.3), rgba(201,169,110,0.7), rgba(201,169,110,0.3));
    top: 10%; bottom: 10%;
    width: 2.5px;
  }
  .entity-row:active {
    transform: translateX(1px) scale(0.997);
    transition-duration: 0.06s;
  }

  .entity-row-main { display: flex; align-items: center; gap: 0.6rem; min-width: 180px; flex: 1; }
  .entity-row-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; transition: transform 0.2s ease; }
  .entity-row:hover .entity-row-dot { transform: scale(1.25); }
  .entity-row-dot.dot-green { background: #4ade80; box-shadow: 0 0 6px rgba(74,222,128,0.35); }
  .entity-row-dot.dot-red { background: #f87171; box-shadow: 0 0 6px rgba(248,113,113,0.3); opacity: 0.6; }
  .entity-row-info { min-width: 0; flex: 1; }
  .entity-row-name {
    font-size: 0.84rem;
    font-weight: 650;
    color: rgba(255,255,255,0.92);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
    letter-spacing: -0.005em;
  }
  .entity-row:hover .entity-row-name { color: #c9a96e; }
  .entity-row-sub {
    font-size: 0.68rem;
    color: rgba(255,255,255,0.3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: color 0.2s ease;
  }
  .entity-row:hover .entity-row-sub { color: rgba(255,255,255,0.45); }
  .entity-row-tag {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    background: rgba(201,169,110,0.12);
    color: #c9a96e;
  }

  .entity-spark-wrap {
    width: 72px;
    height: 28px;
    flex-shrink: 0;
    opacity: 0.6;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 4px;
    padding: 2px;
  }
  .entity-row:hover .entity-spark-wrap {
    opacity: 1;
    transform: scaleY(1.1);
    background: rgba(201,169,110,0.04);
  }
  .entity-spark-svg { width: 100%; height: 100%; display: block; }

  .entity-row-stats {
    display: flex;
    gap: 0;
    align-items: center;
    margin-left: auto;
    padding-left: 0.5rem;
  }

  .entity-stat-cell {
    min-width: 72px;
    text-align: right;
    padding: 0.15rem 0.75rem;
    position: relative;
  }
  /* Vertical separator between stat cells */
  .entity-stat-cell + .entity-stat-cell::before {
    content: '';
    position: absolute;
    left: 0; top: 15%; bottom: 15%;
    width: 1px;
    background: rgba(255,255,255,0.06);
    transition: background 0.2s ease;
  }
  .entity-row:hover .entity-stat-cell + .entity-stat-cell::before {
    background: rgba(201,169,110,0.12);
  }
  .entity-stat-label {
    font-size: 0.58rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.22);
    margin-bottom: 2px;
  }
  .entity-stat-value {
    font-family: 'Poppins', 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    color: rgba(255,255,255,0.6);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
    transition: color 0.2s ease;
  }
  .entity-row:hover .entity-stat-value { color: rgba(255,255,255,0.8); }
  .entity-stat-value.val-green { color: #4ade80; }
  .entity-row:hover .entity-stat-value.val-green { color: #6ee7a0; }
  .entity-stat-value.val-gold { color: #c9a96e; }
  .entity-stat-value.val-red { color: #f87171; }

  .entity-stat-bar {
    height: 3px;
    background: rgba(255,255,255,0.05);
    border-radius: 3px;
    margin-top: 4px;
    overflow: hidden;
  }
  .entity-stat-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 0;
  }
  .entity-stat-bar-fill.bar-gold { background: linear-gradient(90deg, rgba(201,169,110,0.4), #c9a96e); }
  .entity-stat-bar-fill.bar-green { background: linear-gradient(90deg, rgba(74,222,128,0.35), #4ade80); }
  .entity-stat-bar-fill.bar-red { background: linear-gradient(90deg, rgba(248,113,113,0.35), #f87171); }

  .entity-row-delete {
    background: none;
    border: none;
    color: rgba(255,255,255,0.15);
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    opacity: 0;
    transform: scale(0.85);
  }
  .entity-row:hover .entity-row-delete { opacity: 1; transform: scale(1); }
  .entity-row-delete:hover { color: #f87171; background: rgba(248,113,113,0.12); transform: scale(1.1) !important; }

  /* ---- Skeleton Loading Rows ---- */
  @keyframes shimmer {
    0% { background-position: -400px 0; }
    100% { background-position: 400px 0; }
  }
  .entity-skeleton {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.65rem 0.9rem 0.65rem 1rem;
    background: rgba(255,255,255,0.015);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 8px;
  }
  .entity-skeleton:nth-child(even) { background: rgba(255,255,255,0.025); }
  .skel-bone {
    border-radius: 4px;
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.06) 37%, rgba(255,255,255,0.03) 63%);
    background-size: 800px 100%;
    animation: shimmer 1.6s ease infinite;
  }
  .skel-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
  .skel-name { width: 120px; height: 12px; }
  .skel-sub { width: 80px; height: 9px; margin-top: 4px; }
  .skel-spark { width: 64px; height: 24px; flex-shrink: 0; border-radius: 4px; }
  .skel-stat { width: 50px; height: 12px; }
  .skel-bar { width: 60px; height: 3px; margin-top: 4px; }
  .entity-skeleton:nth-child(2) .skel-bone { animation-delay: 0.15s; }
  .entity-skeleton:nth-child(3) .skel-bone { animation-delay: 0.3s; }
  .entity-skeleton:nth-child(4) .skel-bone { animation-delay: 0.45s; }
  .entity-skeleton:nth-child(5) .skel-bone { animation-delay: 0.6s; }

  /* ---- Entity Row Count Badge ---- */
  .entity-count-badge {
    font-size: 0.62rem;
    font-weight: 700;
    color: rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.04);
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    letter-spacing: 0.02em;
    font-variant-numeric: tabular-nums;
  }

  /* Modal size variants */
  .modal-wide { width: 680px; max-width: 95vw; }
  .modal-xlg { width: 880px; max-width: 95vw; }

  /* Collapsible section toggles */
  .cd-section-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.5rem 0.65rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    cursor: pointer;
    color: #fff;
    transition: background 0.15s, border-color 0.15s;
  }
  .cd-section-toggle:hover {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.1);
  }
  .cd-section-toggle-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .cd-section-toggle-left span {
    font-size: 0.82rem;
    font-weight: 600;
  }
  .cd-section-toggle-chevron {
    width: 12px;
    height: 12px;
    color: rgba(255,255,255,0.3);
    transition: transform 0.2s ease;
    flex-shrink: 0;
  }
  .cd-section-toggle-badge {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.1rem 0.45rem;
    border-radius: 10px;
    background: rgba(201,169,110,0.12);
    color: #c9a96e;
    white-space: nowrap;
  }
  .cd-section-content {
    margin-top: 0.65rem;
    padding: 0.1rem 0.25rem;
  }

  /* Filter sections */
  .cd-filter-section {
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 0.65rem;
    margin-bottom: 0.6rem;
  }
  .cd-filter-section.and-section { border-color: rgba(34,197,94,0.25); background: rgba(34,197,94,0.03); }
  .cd-filter-section.or-section { border-color: rgba(234,179,8,0.25); background: rgba(234,179,8,0.03); }
  .cd-filter-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
  }
  .cd-filter-section-title {
    font-size: 0.72rem;
    font-weight: 700;
  }
  .cd-filter-section.and-section .cd-filter-section-title { color: #4ade80; }
  .cd-filter-section.or-section .cd-filter-section-title { color: #fbbf24; }
  .cd-filter-row {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    align-items: flex-end;
    padding: 0.45rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 8px;
    margin-bottom: 0.35rem;
  }
  .cd-filter-row:last-child { margin-bottom: 0; }

  /* Suppression */
  .cd-suppression-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    cursor: pointer;
  }
  .cd-suppression-item:last-child { border-bottom: none; }
  .cd-suppression-item input[type="checkbox"] { accent-color: #c9a96e; width: 18px; height: 18px; }

  /* Info box */
  .cd-info-box {
    background: rgba(59,130,246,0.06);
    border: 1px solid rgba(59,130,246,0.15);
    border-radius: 10px;
    padding: 0.65rem 0.85rem;
    margin-bottom: 0.75rem;
  }
  .cd-info-box p {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
    margin: 0;
  }
  .cd-info-box strong { color: rgba(255,255,255,0.7); }

  /* Lang tabs */
  .cd-lang-tabs {
    display: flex;
    gap: 0;
    margin-bottom: -1px;
  }
  .cd-lang-tab {
    flex: 1;
    padding: 0.4rem 0.5rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-bottom: none;
    color: rgba(255,255,255,0.4);
    font-size: 0.68rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-align: center;
  }
  .cd-lang-tab:first-child { border-radius: 8px 0 0 0; }
  .cd-lang-tab:last-child { border-radius: 0 8px 0 0; }
  .cd-lang-tab.active { background: #0f172a; color: #38bdf8; border-color: rgba(255,255,255,0.08); }

  /* Onboarding is now handled by Driver.js — see desktop/src/css/tour.css */

  /* ===== TEST LEADS ===== */
  .tl-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    align-items: start;
  }

  .tl-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .tl-json-preview {
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    padding: 0.75rem;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.72rem;
    color: rgba(255,255,255,0.6);
    white-space: pre-wrap;
    word-break: break-all;
    line-height: 1.5;
    overflow: auto;
  }

  .tl-status-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
  }

  .tl-status-success {
    background: rgba(52,199,89,0.15);
    color: #34c759;
  }

  .tl-status-error {
    background: rgba(239,68,68,0.15);
    color: #ef4444;
  }

  .tl-status-warning {
    background: rgba(255,159,10,0.15);
    color: #ff9f0a;
  }

  .tl-history-list {
    max-height: 400px;
    overflow-y: auto;
  }

  .tl-history-item {
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    cursor: pointer;
    transition: background 0.15s;
  }

  .tl-history-item:hover {
    background: rgba(255,255,255,0.02);
  }

  .tl-history-item:last-child {
    border-bottom: none;
  }

  @media (max-width: 768px) {
    .tl-layout {
      grid-template-columns: 1fr;
    }
  }

  /* ===== Destination Detail ===== */
  .dd-header {
    padding: 0.75rem 1rem 0;
  }
  .dd-header-top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .dd-name-input {
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
    border: none;
    background: transparent;
    padding: 0;
    width: 100%;
    font-family: inherit;
  }
  .dd-name-input:focus {
    outline: 2px solid #c9a96e;
    outline-offset: 2px;
    padding: 0.15rem 0.35rem;
    background: rgba(201,169,110,0.04);
    border-radius: 4px;
  }
  .dd-header-meta {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.3);
    margin-top: 0.15rem;
  }
  .dd-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
  }
  .dd-toggle-pill {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    background: rgba(239,68,68,0.15);
    color: #f87171;
    border: 1px solid rgba(239,68,68,0.3);
  }
  .dd-toggle-pill.active {
    background: rgba(34,197,94,0.15);
    color: #4ade80;
    border-color: rgba(34,197,94,0.3);
  }

  .dd-config-container {
    max-width: 900px;
    margin: 0.75rem auto 2rem;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }
  .dd-section {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
  }
  .dd-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .dd-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  .dd-section-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: rgba(201,169,110,0.15);
    color: #c9a96e;
    font-weight: 800;
    font-size: 0.7rem;
    border-radius: 4px;
  }
  .dd-section-badge {
    padding: 0.15rem 0.5rem;
    font-size: 0.6rem;
    font-weight: 700;
    color: rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.04);
    text-transform: uppercase;
    border-radius: 4px;
  }
  .dd-section-badge.complete {
    background: rgba(34,197,94,0.1);
    color: #4ade80;
  }
  .dd-section-body {
    padding: 1rem;
  }
  .dd-label {
    display: block;
    font-size: 0.6rem;
    font-weight: 700;
    color: rgba(255,255,255,0.55);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.35rem;
  }
  .dd-hint {
    font-size: 0.6rem;
    color: rgba(255,255,255,0.25);
    margin-top: 0.2rem;
  }

  /* Delivery method selector */
  .dd-method-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 1rem;
  }
  .dd-method-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
  }
  .dd-method-option:hover {
    border-color: rgba(201,169,110,0.3);
  }
  .dd-method-option.selected {
    background: rgba(201,169,110,0.08);
    border-color: #c9a96e;
    color: #c9a96e;
  }
  .dd-method-option strong {
    display: block;
    font-size: 0.8rem;
  }
  .dd-method-option span {
    display: block;
    font-size: 0.65rem;
    color: rgba(255,255,255,0.3);
    margin-top: 0.1rem;
  }
  .dd-method-option.selected span {
    color: rgba(201,169,110,0.6);
  }
  .dd-endpoint-box {
    padding: 0.75rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px;
  }

  /* Mode tabs */
  .dd-mode-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1rem;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    overflow: hidden;
  }
  .dd-mode-tab {
    flex: 1;
    padding: 0.5rem;
    background: transparent;
    border: none;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: all 0.2s;
  }
  .dd-mode-tab.active {
    background: rgba(201,169,110,0.1);
    color: #c9a96e;
  }

  /* Mapping rows */
  .dd-mapping-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
  }
  .dd-mapping-header h4 {
    margin: 0;
    font-size: 0.7rem;
    font-weight: 700;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  .dd-mappings-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
  }
  .dd-mapping-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 4px;
  }
  .dd-empty-state {
    padding: 0.75rem;
    text-align: center;
    color: rgba(255,255,255,0.2);
    font-style: italic;
    font-size: 0.7rem;
    background: rgba(255,255,255,0.02);
    border: 1px dashed rgba(255,255,255,0.08);
    border-radius: 4px;
  }
  .dd-remove-btn {
    width: 24px;
    height: 24px;
    background: transparent;
    border: 1px solid rgba(239,68,68,0.3);
    color: #f87171;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    flex-shrink: 0;
    transition: all 0.2s;
  }
  .dd-remove-btn:hover {
    background: rgba(239,68,68,0.15);
  }

  /* Template helpers */
  .dd-template-helper {
    background: rgba(59,130,246,0.04);
    border: 1px solid rgba(59,130,246,0.15);
    border-radius: 6px;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
  }
  .dd-preset-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.35rem;
  }
  .dd-preset-btn {
    padding: 0.4rem 0.5rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
  }
  .dd-preset-btn:hover {
    background: rgba(255,255,255,0.05);
  }
  .dd-preset-btn strong {
    display: block;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.7);
  }
  .dd-preset-btn span {
    display: block;
    font-size: 0.55rem;
    color: rgba(255,255,255,0.25);
    margin-top: 0.1rem;
  }
  .dd-variable-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
  }
  .dd-variable-tag {
    padding: 0.15rem 0.4rem;
    background: rgba(201,169,110,0.1);
    color: #c9a96e;
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 0.6rem;
    cursor: pointer;
    border: none;
    border-radius: 3px;
    transition: all 0.2s;
  }
  .dd-variable-tag:hover {
    background: #c9a96e;
    color: #1a1a1a;
  }

  /* JSON editor */
  .dd-json-editor {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.02);
    color: #D1CFBF;
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 0.75rem;
    resize: vertical;
    min-height: 160px;
    border-radius: 6px;
  }
  .dd-json-editor:focus {
    outline: none;
    background: rgba(201,169,110,0.04);
    border-color: #c9a96e;
  }
  .dd-json-editor.dd-json-error {
    border-color: #ef4444;
  }
  .dd-validation-error {
    padding: 0.5rem 0.75rem;
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.3);
    color: #f87171;
    font-size: 0.7rem;
    margin-top: 0.35rem;
    border-radius: 4px;
    font-family: 'SF Mono', Monaco, monospace;
  }

  /* Preview */
  .dd-preview-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.06);
  }
  .dd-json-preview {
    padding: 0.75rem;
    background: rgba(0,0,0,0.2);
    color: #c9a96e;
    border: 1px solid rgba(201,169,110,0.15);
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 0.65rem;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 250px;
    overflow-y: auto;
    border-radius: 6px;
  }

  /* Test modal */
  .dd-test-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 1rem;
  }
  .dd-test-result-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 4px;
  }
  .dd-test-result-header.success {
    background: rgba(34,197,94,0.1);
    color: #4ade80;
  }
  .dd-test-result-header.error {
    background: rgba(239,68,68,0.1);
    color: #f87171;
  }

  /* ──── Import Wizard ──── */

  .import-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    padding: 1.25rem 0 0.5rem;
  }

  .import-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: rgba(255,255,255,0.2);
    transition: color 0.3s;
  }
  .import-step.active { color: rgba(255,255,255,0.5); }
  .import-step.current { color: #c9a96e; }

  .import-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    border: 2px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.2);
    transition: all 0.3s;
  }
  .import-step.active .import-step-num {
    border-color: rgba(201,169,110,0.25);
    color: rgba(255,255,255,0.5);
    background: rgba(201,169,110,0.06);
  }
  .import-step.current .import-step-num {
    border-color: #c9a96e;
    color: #c9a96e;
    background: rgba(201,169,110,0.12);
  }

  .import-step-line {
    width: 56px;
    height: 2px;
    background: rgba(255,255,255,0.05);
    margin: 0 0.75rem;
    transition: background 0.3s;
  }
  .import-step-line.active { background: rgba(201,169,110,0.25); }

  .import-wizard-panel { max-width: 640px; margin: 0 auto; }

  .import-wizard-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.06);
  }

  .import-file-summary {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 1.25rem;
  }
  .import-file-summary-meta {
    font-size: 0.72rem;
    font-weight: 400;
    color: rgba(255,255,255,0.35);
  }

  .import-status-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 500;
    padding: 0.12rem 0.5rem;
    border-radius: 3px;
    white-space: nowrap;
  }

  .import-mini-progress {
    width: 100%;
    max-width: 80px;
    height: 3px;
    background: rgba(255,255,255,0.06);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 0.25rem;
  }
  .import-mini-progress-bar {
    height: 100%;
    background: #c9a96e;
    border-radius: 2px;
    transition: width 0.5s ease;
  }

  .import-pulse-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #c9a96e;
    animation: import-pulse 1.5s infinite;
    flex-shrink: 0;
  }
  @keyframes import-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
  }

  .import-review-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
  .import-review-section {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    padding: 1rem;
  }
  .import-review-section h3 {
    font-size: 0.68rem;
    font-weight: 700;
    color: rgba(255,255,255,0.3);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 0.5rem;
  }
  .import-review-section p {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.7);
    margin: 0.15rem 0;
  }
  .import-review-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
  }
  .import-review-badge {
    font-size: 0.68rem;
    color: #c9a96e;
    background: rgba(201,169,110,0.1);
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
  }
  .import-review-mapping-row {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.5);
    padding: 0.15rem 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
  }
  .import-review-mapping-row .arrow {
    color: rgba(255,255,255,0.15);
    font-size: 0.72rem;
  }

  .import-hub-table tr { cursor: pointer; transition: background 0.15s; }
  .import-hub-table tr:hover { background: rgba(255,255,255,0.02); }
  .import-hub-table td { vertical-align: middle; }

/* ===== Logs (audit trail) ===== */
.logs-filter-bar {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 0.75rem;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.logs-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: flex-end;
}
.logs-filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 110px;
}
.logs-filter-group label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.4);
  font-weight: 600;
}
.logs-filter-group .form-input {
  padding: 0.35rem 0.55rem;
  font-size: 0.78rem;
  height: auto;
}

.logs-table-wrap {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  overflow: hidden;
}
.logs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}
.logs-table thead {
  background: rgba(0,0,0,0.25);
}
.logs-table th {
  text-align: left;
  padding: 0.55rem 0.75rem;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.4);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.logs-table tbody tr.logs-row {
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.logs-table tbody tr.logs-row:hover {
  background: rgba(201,169,110,0.04);
}
.logs-table tbody tr.logs-row-expanded {
  background: rgba(201,169,110,0.06);
}
.logs-table td {
  padding: 0.55rem 0.75rem;
  vertical-align: middle;
}

.logs-method {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.7);
}
.logs-method-get    { background: rgba(96,165,250,0.12); color: #60a5fa; }
.logs-method-post   { background: rgba(74,222,128,0.12); color: #4ade80; }
.logs-method-put    { background: rgba(251,191,36,0.12); color: #fbbf24; }
.logs-method-patch  { background: rgba(251,146,60,0.12); color: #fb923c; }
.logs-method-delete { background: rgba(248,113,113,0.14); color: #f87171; }

.logs-status {
  display: inline-block;
  min-width: 38px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  text-align: center;
}
.log-status-ok       { background: rgba(74,222,128,0.12); color: #4ade80; }
.log-status-redirect { background: rgba(96,165,250,0.12); color: #60a5fa; }
.log-status-warn     { background: rgba(251,191,36,0.14); color: #fbbf24; }
.log-status-err      { background: rgba(248,113,113,0.16); color: #f87171; }
.log-status-pending  { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.5); }

.logs-row-details td {
  background: rgba(0,0,0,0.25);
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.logs-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
}
.logs-detail-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.35);
  margin-bottom: 0.2rem;
}
.logs-detail-value {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.85);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  word-break: break-all;
}
.logs-detail-json {
  margin: 0;
  padding: 0.6rem 0.75rem;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.7);
  overflow-x: auto;
  white-space: pre-wrap;
  max-height: 320px;
  overflow-y: auto;
}

/* ===== Logs: primary filter row (chips + tenant + date + live tail) ===== */
.logs-primary-row {
  align-items: center;
  gap: 0.5rem;
}

.logs-chip-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  padding: 0.2rem;
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
}
.logs-chip {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,0.55);
  font-size: 0.74rem;
  font-weight: 500;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
}
.logs-chip:hover { background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.85); }
.logs-chip.active {
  background: rgba(201,169,110,0.15);
  color: #f5e1b8;
}

/* Status class chips ("2xx 3xx 4xx 5xx") */
.logs-status-chip-group {
  display: inline-flex;
  gap: 0.3rem;
  padding: 0.2rem;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
}
.logs-status-chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(255,255,255,0.45);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.3rem 0.55rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
  min-width: 48px;
  position: relative;
}
.logs-status-chip:hover { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.85); }
/* The little check mark icon shown when active. Drawn via :before so we don't
   need extra DOM. */
.logs-status-chip.active::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.35);
  flex-shrink: 0;
}
.logs-status-chip-ok.active {
  background: rgba(74,222,128,0.22);
  color: #86efac;
  border-color: rgba(74,222,128,0.6);
  box-shadow: inset 0 0 0 1px rgba(74,222,128,0.25);
}
.logs-status-chip-redirect.active {
  background: rgba(96,165,250,0.22);
  color: #93c5fd;
  border-color: rgba(96,165,250,0.6);
  box-shadow: inset 0 0 0 1px rgba(96,165,250,0.25);
}
.logs-status-chip-warn.active {
  background: rgba(251,191,36,0.22);
  color: #fcd34d;
  border-color: rgba(251,191,36,0.6);
  box-shadow: inset 0 0 0 1px rgba(251,191,36,0.25);
}
.logs-status-chip-err.active {
  background: rgba(248,113,113,0.26);
  color: #fca5a5;
  border-color: rgba(248,113,113,0.65);
  box-shadow: inset 0 0 0 1px rgba(248,113,113,0.3);
}

/* Live tail toggle */
.logs-live-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.2);
  color: rgba(255,255,255,0.55);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  font-family: inherit;
}
.logs-live-btn:hover { background: rgba(255,255,255,0.04); color: rgba(255,255,255,0.8); }
.logs-live-btn.active {
  border-color: rgba(74,222,128,0.4);
  background: rgba(74,222,128,0.1);
  color: #4ade80;
}
.logs-live-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  flex-shrink: 0;
}
.logs-live-btn.active .logs-live-dot {
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74,222,128,0.7);
  animation: logs-live-pulse 1.5s infinite;
}
@keyframes logs-live-pulse {
  0%   { box-shadow: 0 0 0 0   rgba(74,222,128,0.6); }
  70%  { box-shadow: 0 0 0 6px rgba(74,222,128,0); }
  100% { box-shadow: 0 0 0 0   rgba(74,222,128,0); }
}

/* ===== Logs: activity sparkline strip ===== */
.logs-spark {
  margin: 0 0 0.9rem;
  padding: 0.5rem 0.6rem 0.35rem;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
}
.logs-spark-row {
  display: flex;
  align-items: flex-end;
  gap: 1px;
  height: 56px;
}
.logs-spark-bar {
  flex: 1 1 0;
  height: 100%;
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-start;
  min-width: 2px;
  cursor: default;
  position: relative;
  border-radius: 2px;
  overflow: hidden;
  background: rgba(255,255,255,0.02);
}
.logs-spark-bar:hover { background: rgba(255,255,255,0.06); }
.logs-spark-seg { width: 100%; transition: opacity 0.15s; }
.logs-spark-ok    { background: #4ade80; }
.logs-spark-redir { background: #60a5fa; }
.logs-spark-warn  { background: #fbbf24; }
.logs-spark-err   { background: #f87171; }
.logs-spark-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 0.3rem;
  font-size: 0.62rem;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.02em;
}

/* Tenant pill shown in the cross-tenant view */
.logs-tenant-pill {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.18rem 0.5rem;
  border-radius: 4px;
  background: rgba(201,169,110,0.12);
  color: #d6b87a;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Update diff table (Field | Before | After) shown in the expanded row. */
.logs-diff {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 0.78rem;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 6px;
  overflow: hidden;
  background: rgba(0,0,0,0.25);
}
.logs-diff thead th {
  background: rgba(0,0,0,0.3);
  text-align: left;
  padding: 0.4rem 0.65rem;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.4);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.logs-diff tbody td {
  padding: 0.55rem 0.65rem;
  vertical-align: top;
  border-top: 1px solid rgba(255,255,255,0.05);
  word-break: break-word;
}
.logs-diff-field {
  color: rgba(255,255,255,0.65);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  font-weight: 600;
}
.logs-diff-before {
  color: rgba(255,255,255,0.55);
  background: rgba(248,113,113,0.05);
  border-left: 2px solid rgba(248,113,113,0.4);
}
.logs-diff-after {
  color: rgba(255,255,255,0.85);
  background: rgba(74,222,128,0.05);
  border-left: 2px solid rgba(74,222,128,0.5);
}
.logs-diff pre {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.7rem;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 200px;
  overflow-y: auto;
  color: inherit;
}
.logs-diff span {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.74rem;
}

/* Resource link in the action cell */
.logs-resource-link {
  color: #c9a96e;
  font-size: 0.7rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  cursor: pointer;
  text-decoration: none;
  border-bottom: 1px dotted rgba(201,169,110,0.3);
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.logs-resource-link:hover {
  color: #f5e1b8;
  border-bottom-color: rgba(245,225,184,0.6);
}

/* Inline filter chips on lead.query rows. Two-tone label/value pair so the
   reader can scan the filter set the user searched by. */
.logs-filter-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 0.2rem;
  padding: 0.08rem 0.4rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  font-size: 0.66rem;
  line-height: 1.3;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

