
  :root {
    --brand:       #3DD68C;
    --brand-dark:  #28B876;
    --brand-light: #6FE6AD;
    --dark:        #0D1B3E;
    --dark-2:      #152444;
    --text:        #0D1B3E;
    --text-muted:  #6B7280;
    --border:      #E0E4EC;
    --bg:          #EEF0EC;
    --white:       #FFFFFF;
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  body { font-family: 'Poppins', sans-serif; background: var(--bg); color: var(--text); padding-bottom: 120px; font-size: 14px; }

  .topbar {
    position: sticky; top: 0; z-index: 200;
    background: rgba(255,255,255,0.96); border: 1px solid var(--border); border-radius: 14px;
    box-shadow: 0 8px 32px rgba(18,19,42,0.12); backdrop-filter: blur(10px);
    padding: 0.7rem 1.5rem; display: flex; justify-content: space-between; align-items: center;
    margin: 16px auto; max-width: 900px; width: 90%;
  }
  .topbar-left { display: flex; align-items: center; gap: 10px; }
  .topbar-title { font-weight: 700; color: var(--dark); font-size: 0.9rem; letter-spacing: -0.01em; }
  .badge-ctv { background: var(--dark); color: #fff; font-size: 0.62rem; font-weight: 700; letter-spacing: 1px; padding: 3px 9px; border-radius: 4px; }
  .topbar-actions { display: flex; gap: 8px; }
  .btn { display: inline-flex; align-items: center; gap: 6px; padding: 0.6rem 1.2rem; border-radius: 8px; font-size: 0.82rem; font-weight: 600; cursor: pointer; border: none; font-family: 'Poppins', sans-serif; transition: background 0.2s, transform 0.1s, box-shadow 0.2s; }
  .btn-primary { background: var(--brand); color: white; box-shadow: 0 4px 12px rgba(61,214,140,0.3); }
  .btn-primary:hover { background: var(--brand-dark); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(61,214,140,0.4); }
  .btn-secondary { background: var(--dark); color: white; }
  .btn-secondary:hover { background: var(--dark-2); }

  .container { max-width: 900px; margin: 0 auto; padding: 0 20px 80px; }

  .section-label {
    font-size: 0.68rem; color: var(--brand); text-transform: uppercase;
    letter-spacing: 2px; margin-bottom: 1rem; font-weight: 700; margin-top: 2rem;
    display: flex; align-items: center; gap: 0.5rem;
  }
  .section-label::before { content: ''; display: inline-block; width: 20px; height: 2px; background: var(--brand); border-radius: 2px; }

  .card { background: var(--white); padding: 2rem; border-radius: 16px; box-shadow: 0 4px 24px rgba(18,19,42,0.08); margin-bottom: 10px; overflow: hidden; }

  .upload-zone { border: 2px dashed #D0D3E8; padding: 2rem; text-align: center; border-radius: 12px; background: #FAFAFD; cursor: pointer; transition: 0.2s; position: relative; }
  .upload-zone:hover, .upload-zone.drag-over { border-color: var(--brand); background: #F0FBF5; }
  .upload-zone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
  .upload-icon-wrap { width: 42px; height: 42px; background: #F0FBF5; border-radius: 10px; display: flex; align-items: center; justify-content: center; margin: 0 auto 10px; font-size: 20px; }
  .upload-zone-title { font-size: 0.95rem; font-weight: 700; color: var(--dark); margin-bottom: 4px; }
  .upload-zone-sub { font-size: 0.78rem; color: var(--text-muted); }

  .metrics-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 1rem; margin-top: 1.25rem; }
  .metric-card { background: #FAFAFD; border: 1.5px solid var(--border); border-radius: 10px; padding: 1rem 1.1rem; }
  .metric-card.accent { border-color: #B8F0D8; background: #F0FBF5; border-top: 3px solid var(--brand); }
  .metric-label { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 4px; }
  .metric-value { font-size: 1.3rem; font-weight: 800; color: var(--dark); line-height: 1.1; letter-spacing: -0.02em; }
  .metric-card.accent .metric-value { color: var(--brand-dark); }

  .funnel-section { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1.5px solid var(--border); }
  .funnel-title { font-size: 0.65rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.85rem; }
  .funnel-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
  .funnel-label { font-size: 0.72rem; font-weight: 700; color: var(--text-muted); width: 38px; text-align: right; flex-shrink: 0; }
  .funnel-bar-wrap { flex: 1; background: #F0F0F8; border-radius: 4px; height: 24px; overflow: hidden; border: 1.5px solid var(--border); }
  .funnel-bar-fill { height: 100%; border-radius: 3px; display: flex; align-items: center; padding: 0 8px; transition: width 0.7s ease; }
  .funnel-bar-fill.f25  { background: var(--brand); }
  .funnel-bar-fill.f50  { background: var(--brand-dark); }
  .funnel-bar-fill.f75  { background: #1E9E64; }
  .funnel-bar-fill.f100 { background: var(--dark); }
  .funnel-pct { font-size: 0.7rem; font-weight: 700; color: #fff; }
  .funnel-num { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); min-width: 80px; text-align: right; flex-shrink: 0; }

  .creative-wrap { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1.5px solid var(--border); overflow-x: auto; }
  .creative-label { font-size: 0.65rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.75rem; }
  .data-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
  .data-table thead th { background: var(--dark); color: #fff; padding: 10px 12px; font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700; text-align: left; }
  .data-table thead th:first-child { color: var(--brand-light); }
  .data-table td { padding: 9px 12px; border-bottom: 1px solid var(--border); color: var(--text); }
  .data-table tr:last-child td { border-bottom: none; }
  .data-table tbody tr:hover td { background: #F0FBF5; }
  .data-table tfoot td { background: #F0FBF5; border-top: 2px solid var(--brand); font-weight: 700; color: var(--brand-dark); border-bottom: none; }
  .data-table .green { color: var(--brand-dark); font-weight: 700; }

  .form-row { display: grid; gap: 1.25rem; margin-bottom: 1.25rem; }
  .form-row.cols-2 { grid-template-columns: 1fr 1fr; }
  .form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
  .form-row:last-child { margin-bottom: 0; }
  .field label { display: block; margin-bottom: 0.4rem; font-weight: 600; font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
  .field input, .field select, .field textarea { width: 100%; padding: 0.7rem 1rem; border: 1.5px solid var(--border); border-radius: 8px; font-size: 0.9rem; font-family: 'Poppins', sans-serif; transition: border 0.2s, box-shadow 0.2s; background: var(--white); color: var(--text); }
  .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px rgba(61,214,140,0.12); }
  .field input[readonly] { background: #FAFAFD; color: var(--text-muted); }
  .field textarea { resize: vertical; min-height: 82px; }
  .tag-auto { display: inline-block; font-size: 0.6rem; font-weight: 700; letter-spacing: 0.8px; background: #F0FBF5; color: var(--brand-dark); border: 1.5px solid #B8F0D8; border-radius: 3px; padding: 1px 5px; margin-left: 5px; vertical-align: middle; }

  .slider-wrap { display: flex; align-items: center; gap: 10px; }
  .slider-wrap input[type="range"] { flex: 1; appearance: none; height: 4px; background: linear-gradient(to right, var(--brand) 0%, var(--brand) 47.5%, #E0E4EC 47.5%); border-radius: 2px; border: none; padding: 0; outline: none; }
  .slider-wrap input[type="range"]::-webkit-slider-thumb { appearance: none; width: 20px; height: 20px; background: var(--brand); border-radius: 50%; cursor: pointer; box-shadow: 0 2px 8px rgba(61,214,140,0.5); border: 2px solid white; margin-top: -8px; }
  .slider-wrap input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; }
  .slider-wrap input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; background: var(--brand); border-radius: 50%; cursor: pointer; border: 2px solid white; box-shadow: 0 2px 8px rgba(61,214,140,0.5); }
  .slider-val { font-size: 0.8rem; font-weight: 700; color: var(--brand); min-width: 34px; }

  .file-btn { display: inline-flex; align-items: center; gap: 6px; background: #FAFAFD; border: 1.5px solid var(--border); border-radius: 8px; padding: 0.65rem 1rem; cursor: pointer; font-size: 0.85rem; color: var(--text-muted); width: 100%; transition: border 0.2s; font-family: 'Poppins', sans-serif; }
  .file-btn:hover { border-color: var(--brand); color: var(--text); }
  .file-btn input[type="file"] { display: none; }

  .date-pill { display: inline-flex; align-items: center; gap: 4px; font-size: 0.65rem; font-weight: 700; color: var(--brand-dark); background: #F0FBF5; border: 1.5px solid #B8F0D8; border-radius: 4px; padding: 2px 8px; margin-top: 4px; }

  .auto-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; background: #FAFAFD; border: 1.5px solid var(--border); border-radius: 10px; padding: 1.25rem; }
  .auto-item label { display: block; font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-muted); margin-bottom: 4px; }
  .auto-item .auto-val { font-size: 0.95rem; font-weight: 800; color: var(--dark); }
  .auto-item .auto-val.accent { color: var(--brand-dark); }

  .helper { font-size: 0.7rem; color: var(--text-muted); margin-top: 5px; }
  #screenshotImg { max-height: 160px; border-radius: 8px; border: 1.5px solid var(--border); margin-top: 8px; }


  .sim-radio-show { display:block !important; }




  /* ── HOURLY MODE BUTTONS ──────────────────────────────────── */
  .hmode-btn {
    font-family: 'Poppins', sans-serif; font-size: 0.75rem; font-weight: 600;
    padding: 6px 14px; border: none; background: white; color: var(--text-muted);
    cursor: pointer; transition: 0.15s; border-right: 1.5px solid var(--border);
  }
  .hmode-btn:last-child { border-right: none; }
  .hmode-btn.hmode-active { background: var(--brand); color: white; }
  .flight-window {
    padding: 10px 12px; border-radius: 8px; background: #f9fbff;
    border: 1.5px solid var(--border);
  }




  /* ═══════════════════════════════════════════
     SLIDES
  ═══════════════════════════════════════════ */
  #slideDeck {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    margin-top: 0;
  }
  .slide {
    width: 1000px;
    height: 562.5px;
    position: relative;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.18);
    overflow: hidden;
    flex-shrink: 0;
    background: #0D1B3E;
  }
  .slide [contenteditable] { outline: none; cursor: text; }
  .slide [contenteditable]:hover { background: rgba(255,255,255,0.04); border-radius: 4px; }
  .slide [contenteditable]:focus { background: rgba(61,214,140,0.08); border-radius: 4px; }



  /* ── SHOWCASE THUMBNAIL STRIP ─────────────────────────────── */
  .sc-thumb {
    position: relative;
    width: 108px;
    cursor: grab;
    border-radius: 8px;
    border: 2px solid var(--border);
    background: white;
    transition: box-shadow 0.15s, border-color 0.15s, transform 0.15s;
    user-select: none;
  }
  .sc-thumb:active { cursor: grabbing; }
  .sc-thumb.drag-over {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(61,214,140,0.25);
  }
  .sc-thumb.dragging {
    opacity: 0.4;
    transform: scale(0.96);
  }
  .sc-thumb-img {
    width: 100%;
    height: 60px;
    object-fit: cover;
    border-radius: 5px 5px 0 0;
    display: block;
    pointer-events: none;
  }
  .sc-thumb-footer {
    padding: 4px 6px 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
  }
  .sc-thumb-num {
    font-size: 0.6rem;
    font-weight: 800;
    color: var(--brand-dark);
    min-width: 14px;
  }
  .sc-thumb-name {
    font-size: 0.58rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
  }
  .sc-thumb-remove {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #FEE2E2;
    color: #991B1B;
    font-size: 0.6rem;
    font-weight: 900;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
    padding: 0;
  }
  .sc-thumb-remove:hover { background: #FECACA; }

  /* ── TV BEZEL ─────────────────────────────────────────────── */
  .tv-wrap { display:flex; flex-direction:column; align-items:center; }
  .tv-bezel {
    background: #1C1C2E;
    border-radius: 10px;
    padding: 8px 8px 6px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.06);
    position: relative;
  }
  .tv-screen {
    border-radius: 4px;
    overflow: hidden;
    background: #000;
    position: relative;
  }
  .tv-screen img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
  }
  .tv-screen-glare {
    position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, transparent 50%);
    border-radius: 4px;
  }
  .tv-neck {
    width: 28px; height: 14px;
    background: linear-gradient(to bottom, #2a2a3e, #1a1a2a);
    margin: 0 auto;
  }
  .tv-base {
    width: 80px; height: 6px;
    background: linear-gradient(to bottom, #2a2a3e, #111);
    border-radius: 0 0 6px 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  }
  .tv-caption {
    margin-top: 10px;
    font-size: 0.62rem; font-weight: 700;
    color: #6B7280; text-align: center;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.5px; text-transform: uppercase;
  }

  /* ── AI INSIGHTS ──────────────────────────────────────────── */
  #aiInsightsBtn.loading { opacity:0.7; pointer-events:none; }
  .ai-row {
    display:flex; align-items:flex-start; gap:14px;
    padding:14px 20px; border-bottom:1px solid var(--border);
    background:white; transition:background 0.15s;
  }
  .ai-row:last-child { border-bottom:none; }
  .ai-row:hover { background:#FAFCFF; }
  .ai-row-check { margin-top:2px; accent-color:var(--brand); width:15px; height:15px; flex-shrink:0; cursor:pointer; }
  .ai-row-body { flex:1; }
  .ai-row-area { font-size:0.72rem; font-weight:800; color:var(--dark); text-transform:uppercase; letter-spacing:0.8px; margin-bottom:4px; }
  .ai-row-text { font-size:0.78rem; font-weight:500; color:#374151; line-height:1.6; }

  /* ── APP SLIDER ROWS ──────────────────────────────────────── */
  .app-slider-row { display: none; }
  #appTable.sliders-visible .app-slider-row { display: table-row; }
  .app-slider-row td { padding: 2px 12px 10px; background: #f7fdf9; border-bottom: 1px solid #e8f5ee; }
  #appSliderToggleBtn.active { background: #F0FBF5; border-color: var(--brand); color: var(--brand-dark); }

  /* ── OEM SLIDER ROWS ──────────────────────────────────────── */
  .oem-slider-row { display: none; }
  #oemTable.sliders-visible .oem-slider-row { display: table-row; }
  .oem-slider-row td {
    padding: 2px 12px 10px;
    background: #f7fdf9;
    border-bottom: 1px solid #e8f5ee;
  }
  #oemSliderToggleBtn.active {
    background: #F0FBF5; border-color: var(--brand); color: var(--brand-dark);
  }

  /* ── CITY SLIDER ROWS ─────────────────────────────────────── */
  .city-slider-row { display: none; }
  #cityTable.sliders-visible .city-slider-row { display: table-row; }
  .city-slider-row td {
    padding: 2px 12px 10px;
    background: #f7fdf9;
    border-bottom: 1px solid #e8f5ee;
  }
  .city-slider-wrap { display: flex; align-items: center; gap: 10px; }
  .city-share-slider {
    flex: 1; height: 4px; cursor: pointer;
    accent-color: var(--brand);
  }
  .city-slider-pct {
    font-size: 0.72rem; font-weight: 700;
    color: var(--brand-dark); min-width: 38px; text-align: right;
  }
  #sliderToggleBtn.active {
    background: #F0FBF5; border-color: var(--brand); color: var(--brand-dark);
  }

  @media (max-width: 640px) {
    .form-row.cols-2, .form-row.cols-3 { grid-template-columns: 1fr; }
    .metrics-grid { grid-template-columns: 1fr 1fr; }
    .auto-grid { grid-template-columns: 1fr 1fr; }
    .topbar-actions .btn:not(.btn-primary) { display: none; }
  }
