﻿  :root {
    --bg: #f4f6f9;
    --sidebar-bg: #ffffff;
    --content-bg: #ffffff;
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #eef2ff;
    --accent: #06b6d4;
    --success: #10b981;
    --success-bg: #ecfdf5;
    --warning: #f59e0b;
    --danger: #ef4444;
    --text: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --input-bg: #f8fafc;
    --input-focus: #4f46e5;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
    --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,.08), 0 2px 4px -2px rgba(0,0,0,.04);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -4px rgba(0,0,0,.04);
    --radius: 10px;
    --radius-sm: 6px;
    --radius-lg: 14px;
    --transition: all .2s ease;
  }

    .bg-indigo { background: #eef2ff; } .text-indigo { color: #4f46e5; }
  .bg-cyan { background: #ecfeff; } .text-cyan { color: #06b6d4; }
  .bg-amber { background: #fffbeb; } .text-amber { color: #d97706; }
  .bg-rose { background: #fff1f2; } .text-rose { color: #e11d48; }
  .bg-emerald { background: #ecfdf5; } .text-emerald { color: #059669; }
  .bg-purple { background: #faf5ff; } .text-purple { color: #9333ea; }
  .bg-sky { background: #f0f9ff; } .text-sky { color: #0284c7; }
  .bg-orange { background: #fff7ed; } .text-orange { color: #ea580c; }
  .bg-teal { background: #f0fdfa; } .text-teal { color: #0d9488; }
  .bg-slate { background: #f1f5f9; } .text-slate { color: #475569; }


    .logo-google { background: #f1f3f4; }
  .logo-meta {background: #ebf5ff;}
  .logo-klaviyo { background: #f3f0ff; }
  .logo-tiktok { background: #f0fafa; }
  .logo-bing { background: #fff8eb; }
  .logo-pricerunner { background: #eef7ed; }
  .logo-snapchat { background: #fff8eb; }
  .logo-pinterest {background: #ebf5ff;}
  
  .generic-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
 
 .platform-picker { margin-bottom: 14px; }
  .platform-picker .form-label { margin-bottom: 8px; }
  .platform-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  }
  .platform-card {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: var(--radius-sm);
    border: 1px solid var(--border); background: #fff;
    cursor: pointer; transition: var(--transition);
    position: relative;
  }
  .platform-card:hover { border-color: #c7d2fe; background: #fafafe; }
  .platform-card.selected {
    border-color: var(--primary); background: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(79,70,229,.1);
  }
  .platform-card.selected::after {
    content: '';
    position: absolute; top: 6px; right: 6px;
    width: 16px; height: 16px; border-radius: 50%;
    background: var(--primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: center;
  }
  .platform-info { min-width: 0; }
  .platform-name { font-size: 12px; font-weight: 600; color: var(--text); line-height: 1.2; }
  .platform-desc { font-size: 10px; color: var(--text-muted); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  .stats-bar {
    display: flex; gap: 12px; margin-bottom: 24px;
  }
  .stat-item {
    flex: 1; display: flex; align-items: center; gap: 12px;
    padding: 14px 16px;
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  }
  .stat-info {}
  .stat-value { font-size: 18px; font-weight: 700; color: var(--text); }
  .stat-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }

  .tab-buttons {
    display: flex; gap: 4px; margin-bottom: 28px;
    background: var(--border-light); border-radius: var(--radius);
    padding: 4px;
  }
  .tab-button {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px;
    padding: 10px 16px; border-radius: var(--radius-sm);
    font-family: inherit; font-size: 13px; font-weight: 500;
    color: var(--text-secondary); background: none; border: none;
    cursor: pointer; transition: var(--transition);
    white-space: nowrap;
  }
  .tab-button svg { width: 16px; height: 16px; }
  .tab-button:hover { color: var(--text); background: rgba(255,255,255,.5); }
  .tab-button.active {
    color: var(--primary); background: #fff;
    box-shadow: var(--shadow-sm);
  }

    .section-divider {
    display: flex; align-items: center; gap: 12px;
    margin: 28px 0 16px; padding: 0;
  }
  .section-divider h3 {
    font-size: 12px; font-weight: 600; text-transform: uppercase;
    letter-spacing: .8px; color: var(--text-muted); white-space: nowrap;
  }
  .section-divider::after {
    content: ''; flex: 1; height: 1px; background: var(--border);
  }

  .field-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    transition: var(--transition);
    overflow: hidden;
  }
  .field-card:hover { border-color: #c7d2fe; box-shadow: var(--shadow); }

  .field-card-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px;
    cursor: pointer;
    user-select: none;
  }
  .field-card-header-left {
    display: flex; align-items: center; gap: 12px;
  }
  .field-card-icon {
    width: 34px; height: 34px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
  }
  .field-card-icon svg { width: 18px; height: 18px; }
  .field-card-title {
    font-size: 14px; font-weight: 600; color: var(--text);
  }
  .field-card-header-right {
    display: flex; align-items: center; gap: 12px;
  }
  .field-card-chevron {
    width: 20px; height: 20px; color: var(--text-muted);
    transition: transform .2s;
  }
  .field-card.open .field-card-chevron { transform: rotate(180deg); }
  .field-card-body {
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
  }
  .field-card.open .field-card-body { max-height: 600px; }
  .field-card-body-inner {
    padding: 0 18px 18px;
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  }
  .field-card-body-inner .full-width { grid-column: 1 / -1; }

  .enabled-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 8px; border-radius: 20px;
    font-size: 11px; font-weight: 600;
    background: var(--success-bg); color: var(--success);
  }
  .disabled-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 8px; border-radius: 20px;
    font-size: 11px; font-weight: 600;
    background: #f1f5f9; color: var(--text-muted);
  }

  @keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
  .field-card { animation: fadeIn .3s ease both; }
  .field-card:nth-child(2) { animation-delay: .04s; }
  .field-card:nth-child(3) { animation-delay: .08s; }
  .field-card:nth-child(4) { animation-delay: .12s; }
  .field-card:nth-child(5) { animation-delay: .16s; }
  .field-card:nth-child(6) { animation-delay: .20s; }

    .switch {
    position: relative; width: 42px; height: 24px; flex-shrink: 0;
  }
  .switch input { opacity: 0; width: 0; height: 0; }
  .switch-slider {
    position: absolute; inset: 0; cursor: pointer;
    background: #cbd5e1; border-radius: 24px;
    transition: var(--transition);
  }
  .switch-slider::before {
    content: ''; position: absolute; left: 3px; top: 3px;
    width: 18px; height: 18px; border-radius: 50%;
    background: #fff; transition: var(--transition);
    box-shadow: 0 1px 3px rgba(0,0,0,.15);
  }
  .switch input:checked + .switch-slider { background: var(--success); }
  .switch input:checked + .switch-slider::before { transform: translateX(18px); }

   .form-group { margin-bottom: 14px; }
  .form-group:last-child { margin-bottom: 0; }

  .form-label {
    display: block; font-size: 12px; font-weight: 500;
    color: var(--text-secondary); margin-bottom: 5px;
  }
  .form-input, .form-select {
    width: 100%; padding: 9px 12px;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-family: inherit; font-size: 13px; color: var(--text);
    background: var(--input-bg);
    transition: var(--transition);
  }
  .form-input:focus, .form-select:focus {
    outline: none;
    border-color: var(--input-focus);
    box-shadow: 0 0 0 3px rgba(79,70,229,.1);
    background: #fff;
  }
  .form-input::placeholder { color: var(--text-muted); }
  .form-select {
    appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center;
    padding-right: 32px;
  }

  .toggle-row {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 0;
  }
  .toggle-row span {
    font-size: 13px; color: var(--text);
  }

   .settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .settings-card {
    background: #fff; border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px;
  }
  .settings-card h4 {
    font-size: 14px; font-weight: 600; margin-bottom: 14px;
    display: flex; align-items: center; gap: 8px;
  }
  .settings-card h4 svg { width: 18px; height: 18px; color: var(--primary); }

  .tab-content-description {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 20px;
  }

  .rule-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 12px;
    transition: var(--transition);
  }
  .rule-card:hover { border-color: #c7d2fe; }
  .rule-row {
    display: flex; align-items: center; gap: 10px;
  }
  .rule-row .form-select { flex: 1; }
  .rule-row .form-input { flex: 1; }

  /*.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 6px; padding: 9px 12px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-family: inherit; font-size: 13px; font-weight: 500;
    cursor: pointer; transition: var(--transition);
  }
  .btn svg { width: 16px; height: 16px; }*/
  .btn-danger-ghost {
    background: transparent; color: var(--danger);
    flex-shrink: 0;
  }
  .btn-danger-ghost:hover { background: #fef2f2; }

  .add-rule-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 14px;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    background: none; color: var(--text-muted);
    font-family: inherit; font-size: 13px; font-weight: 500;
    cursor: pointer; transition: var(--transition);
  }
  .add-rule-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
  }
  .add-rule-btn svg { width: 18px; height: 18px; }

  .special-field-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  }
  .special-field-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    transition: var(--transition);
  }
  .special-field-card:hover { border-color: #c7d2fe; }
  .special-field-row {
    display: flex; align-items: center; justify-content: space-between;
  }
  .special-field-info {
    display: flex; align-items: center; gap: 10px;
  }
  .special-field-icon {
    width: 32px; height: 32px;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    background: var(--primary-light);
    flex-shrink: 0;
  }
  .special-field-icon svg { width: 16px; height: 16px; color: var(--primary); }
  .special-field-title {
    font-size: 13px; font-weight: 600; color: var(--text);
  }
  .special-field-card .form-group { margin-top: 14px; margin-bottom: 0; }

  @media (max-width: 768px) {
    .special-field-grid { grid-template-columns: 1fr; }
    .rule-row { flex-wrap: wrap; }
  }
