/* Critical layout/style guard: keeps reference design even behind HTTPS proxies. */
html, body { min-height:100%; }
body { margin:0; overflow-x:hidden; }

.report-table td.report-dim, .report-table th.report-dim {
 
    overflow: hidden!important;
}
.app-sidebar{
  width:250px!important; min-height:100vh!important; position:fixed!important; left:0!important; top:0!important; z-index:1040!important; color:#fff!important;
  background:radial-gradient(circle at 15% 75%, rgba(236,72,153,.45), transparent 22%), radial-gradient(circle at 85% 65%, rgba(59,130,246,.5), transparent 30%), linear-gradient(180deg,#10164a,#26328c)!important;
  box-shadow:8px 0 30px rgba(15,23,42,.08)!important; overflow:hidden;
}
.sidebar-inner{height:100vh!important;display:flex!important;flex-direction:column!important;padding:1.25rem!important;position:relative;z-index:1;}
.main-wrapper{margin-left:250px!important;min-height:100vh!important;}
.top-navbar{height:78px!important;background:transparent!important;}
.sidebar-nav .nav-link{color:#e8edff!important;border-radius:.85rem!important;padding:.8rem .95rem!important;margin-bottom:.35rem!important;font-weight:600!important;display:flex!important;align-items:center!important;gap:.85rem!important;}
.sidebar-nav .nav-link:hover,.sidebar-nav .nav-link.active{color:#fff!important;background:rgba(255,255,255,.15)!important;}
.brand-logo{width:44px!important;height:44px!important;border-radius:14px!important;display:grid!important;place-items:center!important;font-weight:800!important;background:linear-gradient(135deg,#60a5fa,#2dd4bf)!important;color:#fff!important;}
.sidebar-profile{background:rgba(255,255,255,.13)!important;border:1px solid rgba(255,255,255,.16)!important;border-radius:1rem!important;}
.table-wrap{width:100%;overflow-x:auto;overflow-y:visible;}
.table{width:100%;min-width:1550px;font-size:.8rem;}
.table thead th{white-space:nowrap;}
.creative-thumb{width:96px!important;height:54px!important;object-fit:cover!important;border-radius:.7rem!important;border:1px solid #e7edf6!important;display:block!important;}
.game-icon{width:46px!important;height:46px!important;object-fit:cover!important;border-radius:.7rem!important;display:block!important;}
.media-fallback{width:96px!important;height:54px!important;}


/*
@media(max-width:991px){.app-sidebar{transform:translateX(-100%);transition:.25s}.app-sidebar.show{transform:translateX(0)}.main-wrapper{margin-left:0!important}}
*/
    :root{
      --app-bg:#f5f7fb;
      --sidebar:#10164a;
      --sidebar-2:#26328c;
      --primary:#3b82f6;
      --success:#16a34a;
      --danger:#ef4444;
      --warning:#f59e0b;
      --purple:#8b5cf6;
      --muted:#64748b;
      --border:#e7edf6;
      --dark:#0f172a;
    }

    body{
      font-family:"Inter","Noto Sans KR",sans-serif;
      background:var(--app-bg);
      color:var(--dark);
      font-size:14px;
    }

    .app-sidebar{
      width:250px;
      min-height:100vh;
      position:fixed;
      left:0;
      top:0;
      z-index:1040;
      color:#fff;
      background:
        radial-gradient(circle at 15% 75%, rgba(236,72,153,.45), transparent 22%),
        radial-gradient(circle at 85% 65%, rgba(59,130,246,.5), transparent 30%),
        linear-gradient(180deg,var(--sidebar),var(--sidebar-2));
      box-shadow:8px 0 30px rgba(15,23,42,.08);
    }

    .app-sidebar::after{
      content:"";
      position:absolute;
      left:-70px;
      bottom:80px;
      width:380px;
      height:170px;
      border-radius:50%;
      background:linear-gradient(135deg,rgba(59,130,246,.35),rgba(236,72,153,.45),rgba(20,184,166,.25));
      transform:rotate(-14deg);
      z-index:0;
    }

    .sidebar-inner{
      position:relative;
      z-index:1;
      height:100vh;
      display:flex;
      flex-direction:column;
      padding:1.25rem;
    }

    .brand-logo{
      width:44px;
      height:44px;
      border-radius:14px;
      display:grid;
      place-items:center;
      font-weight:800;
      background:linear-gradient(135deg,#60a5fa,#2dd4bf);
    }

    .sidebar-nav .nav-link{
      color:#e8edff;
      border-radius:.85rem;
      padding:.8rem .95rem;
      margin-bottom:.35rem;
      font-weight:600;
      font-size:.9rem;
      display:flex;
      align-items:center;
      gap:.85rem;
    }

    .sidebar-nav .nav-link:hover,
    .sidebar-nav .nav-link.active{
      color:#fff;
      background:rgba(255,255,255,.15);
    }

    .sidebar-profile{
      background:rgba(255,255,255,.13);
      border:1px solid rgba(255,255,255,.16);
      border-radius:1rem;
    }

    .main-wrapper{
      margin-left:250px;
      min-height:100vh;
    }

    .top-navbar{
      height:78px;
      background:transparent;
    }

    .page-title{
      font-size:1.55rem;
      font-weight:800;
      letter-spacing:-.04em;
    }

    .card{
      border:1px solid var(--border);
      border-radius:1rem;
      box-shadow:0 6px 18px rgba(15,23,42,.04);
    }

    .form-control,
    .form-select,
    .btn{
      border-radius:.75rem;
      font-size:.9rem;
    }

    .form-control,
    .form-select{
      border-color:var(--border);
      min-height:44px;
    }

    .btn-light{
      background:#fff;
      border-color:var(--border);
      font-weight:700;
    }

    .text-muted{
      color:var(--muted)!important;
    }

    .kpi-icon{
      width:44px;
      height:44px;
      border-radius:50%;
      display:grid;
      place-items:center;
      font-size:1.1rem;
    }

    .icon-blue{background:#e8f0ff;color:var(--primary)}
    .icon-green{background:#dcfce7;color:var(--success)}
    .icon-orange{background:#fff4dc;color:var(--warning)}
    .icon-red{background:#ffe8e8;color:var(--danger)}
    .icon-purple{background:#f1e8ff;color:var(--purple)}
    .icon-teal{background:#dcfdfa;color:#14b8a6}

    .kpi-value{
      font-size:1.45rem;
      font-weight:800;
      letter-spacing:-.03em;
    }

    .kpi-change{
      font-size:.78rem;
      color:var(--muted);
    }

    .up{color:var(--success);font-weight:800}
    .down{color:var(--danger);font-weight:800}

    .chart-box{
      height:195px;
      position:relative;
    }

    .impact-chart-box{
      height:255px;
      position:relative;
    }

    .legend-dot{
      width:11px;
      height:11px;
      display:inline-block;
      border-radius:3px;
      margin-right:.45rem;
    }

    .summary-box{
      background:#f8fafc;
      border-radius:1rem;
    }

    .table{
      font-size:.8rem;
    }

    .table thead th{
      background:#fafbfe;
      color:#475569;
      font-weight:800;
      white-space:nowrap;
      padding:.9rem .7rem;
      border-bottom:1px solid var(--border);
    }

    .table tbody td{
      padding:.85rem .7rem;
      vertical-align:middle;
      border-bottom:1px solid var(--border);
      color:#334155;
    }

    .game-icon{
      width:46px;
      height:46px;
      object-fit:cover;
      border-radius:.7rem;
    }

    .creative-thumb{
      width:96px;
      height:54px;
      object-fit:cover;
      border-radius:.7rem;
      border:1px solid var(--border);
      transition:.2s;
    }

    .creative-thumb:hover{
      transform:scale(1.04);
    }

    .creative-id{
      max-width:135px;
      white-space:normal;
      font-weight:700;
      color:#1e293b;
    }

    .badge{
      border-radius:.55rem;
      padding:.45rem .6rem;
      font-weight:800;
    }

    .badge-evergreen{background:#dcfce7;color:#16803d}
    .badge-candidate{background:#fff4dc;color:#c46900}
    .badge-promising{background:#f1e8ff;color:#7c3aed}
    .badge-non{background:#f1f5f9;color:#64748b}

    .pagination .page-link{
      border-color:var(--border);
      color:#334155;
      border-radius:.55rem;
      margin:0 .15rem;
    }

    .pagination .active .page-link{
      background:var(--primary);
      border-color:var(--primary);
    }

    .media-preview-wrap{
  position:relative;
  display:inline-block;
}

.media-type-badge{
  position:absolute;
  top:6px;
  left:6px;
  background:rgba(15,23,42,.82);
  color:#fff;
  font-size:.65rem;
  padding:.2rem .45rem;
  border-radius:.45rem;
  font-weight:700;
}

.play-overlay{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  font-size:1.5rem;
  background:rgba(0,0,0,.18);
  border-radius:.7rem;
}

.channel-badge{
  background:#eef2ff;
  color:#3730a3;
  border-radius:.55rem;
  padding:.4rem .55rem;
  font-weight:800;
  font-size:.72rem;
}

.modal-video,
.modal-image{
  width:100%;
  max-height:72vh;
  border-radius:1rem;
  object-fit:contain;
}

.modal-youtube{
  width:100%;
  height:72vh;
  border:0;
  border-radius:1rem;
}

/*
    @media(max-width:991px){
      .app-sidebar{
        transform:translateX(-100%);
        transition:.25s;
      }

      .app-sidebar.show{
        transform:translateX(0);
      }

      .main-wrapper{
        margin-left:0;
      }
    }
*/

/*
 ========== Page 2   ========
*/  



.ai-hero-card{
  background:
    radial-gradient(circle at 12% 20%, rgba(59,130,246,.18), transparent 30%),
    radial-gradient(circle at 88% 18%, rgba(139,92,246,.18), transparent 28%),
    linear-gradient(135deg,#ffffff,#f8fbff);
  overflow:hidden;
}

.ai-glow-icon{
  width:54px;
  height:54px;
  border-radius:18px;
  display:grid;
  place-items:center;
  color:#fff;
  font-size:1.4rem;
  background:linear-gradient(135deg,#3b82f6,#8b5cf6);
  box-shadow:0 12px 35px rgba(59,130,246,.35);
  animation:pulseGlow 2.4s infinite ease-in-out;
}

@keyframes pulseGlow{
  0%,100%{transform:scale(1);box-shadow:0 12px 35px rgba(59,130,246,.28);}
  50%{transform:scale(1.05);box-shadow:0 18px 50px rgba(139,92,246,.42);}
}

.element-card{
  transition:.25s ease;
  cursor:pointer;
}

.element-card:hover{
  transform:translateY(-5px);
  box-shadow:0 16px 35px rgba(15,23,42,.09);
}

.element-score{
  width:52px;
  height:52px;
  border-radius:50%;
  display:grid;
  place-items:center;
  font-weight:800;
  color:#fff;
  background:linear-gradient(135deg,#16a34a,#2dd4bf);
}

.hypothesis-card{
  border-left:5px solid #3b82f6;
}

.hypothesis-card.validated{
  border-left-color:#16a34a;
}

.hypothesis-card.partial{
  border-left-color:#f59e0b;
}

.hypothesis-card.rejected{
  border-left-color:#ef4444;
}

.pattern-pill{
  border:1px solid var(--border);
  background:#fff;
  border-radius:999px;
  padding:.55rem .85rem;
  font-size:.8rem;
  font-weight:700;
  display:inline-flex;
  align-items:center;
  gap:.45rem;
  margin:.25rem;
}

.ai-chat-box{
  height:520px;
  display:flex;
  flex-direction:column;
}

.ai-chat-messages{
  flex:1;
  overflow:auto;
  padding-right:.35rem;
}

.chat-msg{
  display:flex;
  gap:.75rem;
  margin-bottom:1rem;
  animation:slideUp .25s ease;
}

@keyframes slideUp{
  from{opacity:0;transform:translateY(10px);}
  to{opacity:1;transform:translateY(0);}
}

.chat-avatar{
  width:34px;
  height:34px;
  border-radius:50%;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  color:#fff;
  background:linear-gradient(135deg,#3b82f6,#8b5cf6);
}

.chat-bubble{
  background:#f8fafc;
  border:1px solid var(--border);
  border-radius:1rem;
  padding:.8rem .95rem;
  font-size:.88rem;
  line-height:1.55;
}

.chat-msg.user{
  flex-direction:row-reverse;
}

.chat-msg.user .chat-avatar{
  background:#0f172a;
}

.chat-msg.user .chat-bubble{
  background:#eef2ff;
}

.typing-dots span{
  width:6px;
  height:6px;
  background:#94a3b8;
  border-radius:50%;
  display:inline-block;
  margin-right:3px;
  animation:typing 1s infinite ease-in-out;
}

.typing-dots span:nth-child(2){animation-delay:.15s}
.typing-dots span:nth-child(3){animation-delay:.3s}

@keyframes typing{
  0%,100%{transform:translateY(0);opacity:.4;}
  50%{transform:translateY(-4px);opacity:1;}
}

.creative-mini{
  width:78px;
  height:48px;
  border-radius:.65rem;
  object-fit:cover;
  border:1px solid var(--border);
}

.confidence-bar{
  height:8px;
  border-radius:999px;
  background:#e2e8f0;
  overflow:hidden;
}

.confidence-fill{
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg,#3b82f6,#8b5cf6);
}

.insight-rank{
  width:30px;
  height:30px;
  border-radius:10px;
  display:grid;
  place-items:center;
  font-weight:800;
  background:#eef2ff;
  color:#3730a3;
}

.ai-scan-active{
  position:relative;
  overflow:hidden;
}

.ai-scan-active::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(120deg, transparent 0%, rgba(59,130,246,.12) 45%, rgba(139,92,246,.2) 50%, transparent 58%);
  animation:aiScan 1.25s linear infinite;
  pointer-events:none;
}

@keyframes aiScan{
  from{transform:translateX(-100%);}
  to{transform:translateX(100%);}
}

.analysis-step{
  border:1px solid var(--border);
  border-radius:.85rem;
  padding:.75rem;
  margin-bottom:.65rem;
  background:#fff;
}

.analysis-step.done{
  border-color:#bbf7d0;
  background:#f0fdf4;
}

.analysis-progress{
  height:8px;
  border-radius:999px;
  overflow:hidden;
  background:#e2e8f0;
}

.analysis-progress-bar{
  height:100%;
  width:0%;
  background:linear-gradient(90deg,#3b82f6,#8b5cf6,#16a34a);
  transition:width .45s ease;
}
/* Light version additions */
.media-fallback{width:96px;height:54px;border:1px dashed var(--border);border-radius:.7rem;display:grid;place-items:center;background:#f8fafc;color:#64748b;font-size:1.4rem}.empty-media{height:420px;display:grid;place-items:center;background:#0f172a;color:#fff;border-radius:1rem}.side-kpi{display:flex;justify-content:space-between;gap:1rem;padding:.7rem 0;border-bottom:1px solid var(--border)}.side-kpi span{color:#64748b}.side-kpi strong{text-align:right}.creative-card{overflow:hidden}.creative-card .preview{height:168px;background:#f8fafc;display:grid;place-items:center}.creative-card .preview img,.creative-card .preview video{width:100%;height:100%;object-fit:cover}.table-wrap{overflow:auto}




.log-upload{background:#ecfdf5!important}
.log-delete{background:#fef2f2!important}
.login-shell{min-height:100vh;background:radial-gradient(circle at 20% 20%,rgba(59,130,246,.25),transparent 25%),linear-gradient(135deg,#10164a,#26328c);display:grid;place-items:center}
.login-card{max-width:420px;width:100%;border-radius:1.5rem;background:#fff;padding:2rem;box-shadow:0 25px 60px rgba(15,23,42,.25)}

.cost-stack{line-height:1.15;white-space:nowrap}.cost-main{font-weight:700}.cost-sub{font-size:.72rem;color:#6b7280;margin-top:2px;white-space:nowrap}.side-kpi .cost-sub{display:block;text-align:right}
/* Critical layout/style guard: keeps reference design even behind HTTPS proxies. */
html, body { min-height:100%; }
body { margin:0; overflow-x:hidden; }
.app-sidebar{
  width:250px!important; min-height:100vh!important; position:fixed!important; left:0!important; top:0!important; z-index:1040!important; color:#fff!important;
  background:radial-gradient(circle at 15% 75%, rgba(236,72,153,.45), transparent 22%), radial-gradient(circle at 85% 65%, rgba(59,130,246,.5), transparent 30%), linear-gradient(180deg,#10164a,#26328c)!important;
  box-shadow:8px 0 30px rgba(15,23,42,.08)!important; overflow:hidden;
}
.sidebar-inner{height:100vh!important;display:flex!important;flex-direction:column!important;padding:1.25rem!important;position:relative;z-index:1;}
.main-wrapper{margin-left:250px!important;min-height:100vh!important;}
.top-navbar{height:78px!important;background:transparent!important;}
.sidebar-nav .nav-link{color:#e8edff!important;border-radius:.85rem!important;padding:.8rem .95rem!important;margin-bottom:.35rem!important;font-weight:600!important;display:flex!important;align-items:center!important;gap:.85rem!important;}
.sidebar-nav .nav-link:hover,.sidebar-nav .nav-link.active{color:#fff!important;background:rgba(255,255,255,.15)!important;}
.brand-logo{width:44px!important;height:44px!important;border-radius:14px!important;display:grid!important;place-items:center!important;font-weight:800!important;background:linear-gradient(135deg,#60a5fa,#2dd4bf)!important;color:#fff!important;}
.sidebar-profile{background:rgba(255,255,255,.13)!important;border:1px solid rgba(255,255,255,.16)!important;border-radius:1rem!important;}
.table-wrap{width:100%;overflow-x:auto;overflow-y:visible;}
.table{width:100%;min-width:1550px;font-size:.8rem;}
.table thead th{white-space:nowrap;}
.creative-thumb{width:96px!important;height:54px!important;object-fit:cover!important;border-radius:.7rem!important;border:1px solid #e7edf6!important;display:block!important;}
.game-icon{width:46px!important;height:46px!important;object-fit:cover!important;border-radius:.7rem!important;display:block!important;}
.media-fallback{width:96px!important;height:54px!important;}

/*
@media(max-width:991px){.app-sidebar{transform:translateX(-100%);transition:.25s}.app-sidebar.show{transform:translateX(0)}.main-wrapper{margin-left:0!important}}
*/
    :root{
      --app-bg:#f5f7fb;
      --sidebar:#10164a;
      --sidebar-2:#26328c;
      --primary:#3b82f6;
      --success:#16a34a;
      --danger:#ef4444;
      --warning:#f59e0b;
      --purple:#8b5cf6;
      --muted:#64748b;
      --border:#e7edf6;
      --dark:#0f172a;
    }

    body{
      font-family:"Inter","Noto Sans KR",sans-serif;
      background:var(--app-bg);
      color:var(--dark);
      font-size:14px;
    }

    .app-sidebar{
      width:250px;
      min-height:100vh;
      position:fixed;
      left:0;
      top:0;
      z-index:1040;
      color:#fff;
      background:
        radial-gradient(circle at 15% 75%, rgba(236,72,153,.45), transparent 22%),
        radial-gradient(circle at 85% 65%, rgba(59,130,246,.5), transparent 30%),
        linear-gradient(180deg,var(--sidebar),var(--sidebar-2));
      box-shadow:8px 0 30px rgba(15,23,42,.08);
    }

    .app-sidebar::after{
      content:"";
      position:absolute;
      left:-70px;
      bottom:80px;
      width:380px;
      height:170px;
      border-radius:50%;
      background:linear-gradient(135deg,rgba(59,130,246,.35),rgba(236,72,153,.45),rgba(20,184,166,.25));
      transform:rotate(-14deg);
      z-index:0;
    }

    .sidebar-inner{
      position:relative;
      z-index:1;
      height:100vh;
      display:flex;
      flex-direction:column;
      padding:1.25rem;
    }

    .brand-logo{
      width:44px;
      height:44px;
      border-radius:14px;
      display:grid;
      place-items:center;
      font-weight:800;
      background:linear-gradient(135deg,#60a5fa,#2dd4bf);
    }

    .sidebar-nav .nav-link{
      color:#e8edff;
      border-radius:.85rem;
      padding:.8rem .95rem;
      margin-bottom:.35rem;
      font-weight:600;
      font-size:.9rem;
      display:flex;
      align-items:center;
      gap:.85rem;
    }

    .sidebar-nav .nav-link:hover,
    .sidebar-nav .nav-link.active{
      color:#fff;
      background:rgba(255,255,255,.15);
    }

    .sidebar-profile{
      background:rgba(255,255,255,.13);
      border:1px solid rgba(255,255,255,.16);
      border-radius:1rem;
    }

    .main-wrapper{
      margin-left:250px;
      min-height:100vh;
    }

    .top-navbar{
      height:78px;
      background:transparent;
    }

    .page-title{
      font-size:1.55rem;
      font-weight:800;
      letter-spacing:-.04em;
    }

    .card{
      border:1px solid var(--border);
      border-radius:1rem;
      box-shadow:0 6px 18px rgba(15,23,42,.04);
    }

    .form-control,
    .form-select,
    .btn{
      border-radius:.75rem;
      font-size:.9rem;
    }

    .form-control,
    .form-select{
      border-color:var(--border);
      min-height:44px;
    }

    .btn-light{
      background:#fff;
      border-color:var(--border);
      font-weight:700;
    }

    .text-muted{
      color:var(--muted)!important;
    }

    .kpi-icon{
      width:44px;
      height:44px;
      border-radius:50%;
      display:grid;
      place-items:center;
      font-size:1.1rem;
    }

    .icon-blue{background:#e8f0ff;color:var(--primary)}
    .icon-green{background:#dcfce7;color:var(--success)}
    .icon-orange{background:#fff4dc;color:var(--warning)}
    .icon-red{background:#ffe8e8;color:var(--danger)}
    .icon-purple{background:#f1e8ff;color:var(--purple)}
    .icon-teal{background:#dcfdfa;color:#14b8a6}

    .kpi-value{
      font-size:1.45rem;
      font-weight:800;
      letter-spacing:-.03em;
    }

    .kpi-change{
      font-size:.78rem;
      color:var(--muted);
    }

    .up{color:var(--success);font-weight:800}
    .down{color:var(--danger);font-weight:800}

    .chart-box{
      height:195px;
      position:relative;
    }

    .impact-chart-box{
      height:255px;
      position:relative;
    }

    .legend-dot{
      width:11px;
      height:11px;
      display:inline-block;
      border-radius:3px;
      margin-right:.45rem;
    }

    .summary-box{
      background:#f8fafc;
      border-radius:1rem;
    }

    .table{
      font-size:.8rem;
    }

    .table thead th{
      background:#fafbfe;
      color:#475569;
      font-weight:800;
      white-space:nowrap;
      padding:.9rem .7rem;
      border-bottom:1px solid var(--border);
    }

    .table tbody td{
      padding:.85rem .7rem;
      vertical-align:middle;
      border-bottom:1px solid var(--border);
      color:#334155;
    }

    .game-icon{
      width:46px;
      height:46px;
      object-fit:cover;
      border-radius:.7rem;
    }

    .creative-thumb{
      width:96px;
      height:54px;
      object-fit:cover;
      border-radius:.7rem;
      border:1px solid var(--border);
      transition:.2s;
    }

    .creative-thumb:hover{
      transform:scale(1.04);
    }

    .creative-id{
      max-width:135px;
      white-space:normal;
      font-weight:700;
      color:#1e293b;
    }

    .badge{
      border-radius:.55rem;
      padding:.45rem .6rem;
      font-weight:800;
    }

    .badge-evergreen{background:#dcfce7;color:#16803d}
    .badge-candidate{background:#fff4dc;color:#c46900}
    .badge-promising{background:#f1e8ff;color:#7c3aed}
    .badge-non{background:#f1f5f9;color:#64748b}

    .pagination .page-link{
      border-color:var(--border);
      color:#334155;
      border-radius:.55rem;
      margin:0 .15rem;
    }

    .pagination .active .page-link{
      background:var(--primary);
      border-color:var(--primary);
    }

    .media-preview-wrap{
  position:relative;
  display:inline-block;
}

.media-type-badge{
  position:absolute;
  top:6px;
  left:6px;
  background:rgba(15,23,42,.82);
  color:#fff;
  font-size:.65rem;
  padding:.2rem .45rem;
  border-radius:.45rem;
  font-weight:700;
}

.play-overlay{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  font-size:1.5rem;
  background:rgba(0,0,0,.18);
  border-radius:.7rem;
}

.channel-badge{
  background:#eef2ff;
  color:#3730a3;
  border-radius:.55rem;
  padding:.4rem .55rem;
  font-weight:800;
  font-size:.72rem;
}

.modal-video,
.modal-image{
  width:100%;
  max-height:72vh;
  border-radius:1rem;
  object-fit:contain;
}

.modal-youtube{
  width:100%;
  height:72vh;
  border:0;
  border-radius:1rem;
}

/*
    @media(max-width:991px){
      .app-sidebar{
        transform:translateX(-100%);
        transition:.25s;
      }

      .app-sidebar.show{
        transform:translateX(0);
      }

      .main-wrapper{
        margin-left:0;
      }
    }
*/

/*
 ========== Page 2   ========
*/  



.ai-hero-card{
  background:
    radial-gradient(circle at 12% 20%, rgba(59,130,246,.18), transparent 30%),
    radial-gradient(circle at 88% 18%, rgba(139,92,246,.18), transparent 28%),
    linear-gradient(135deg,#ffffff,#f8fbff);
  overflow:hidden;
}

.ai-glow-icon{
  width:54px;
  height:54px;
  border-radius:18px;
  display:grid;
  place-items:center;
  color:#fff;
  font-size:1.4rem;
  background:linear-gradient(135deg,#3b82f6,#8b5cf6);
  box-shadow:0 12px 35px rgba(59,130,246,.35);
  animation:pulseGlow 2.4s infinite ease-in-out;
}

@keyframes pulseGlow{
  0%,100%{transform:scale(1);box-shadow:0 12px 35px rgba(59,130,246,.28);}
  50%{transform:scale(1.05);box-shadow:0 18px 50px rgba(139,92,246,.42);}
}

.element-card{
  transition:.25s ease;
  cursor:pointer;
}

.element-card:hover{
  transform:translateY(-5px);
  box-shadow:0 16px 35px rgba(15,23,42,.09);
}

.element-score{
  width:52px;
  height:52px;
  border-radius:50%;
  display:grid;
  place-items:center;
  font-weight:800;
  color:#fff;
  background:linear-gradient(135deg,#16a34a,#2dd4bf);
}

.hypothesis-card{
  border-left:5px solid #3b82f6;
}

.hypothesis-card.validated{
  border-left-color:#16a34a;
}

.hypothesis-card.partial{
  border-left-color:#f59e0b;
}

.hypothesis-card.rejected{
  border-left-color:#ef4444;
}

.pattern-pill{
  border:1px solid var(--border);
  background:#fff;
  border-radius:999px;
  padding:.55rem .85rem;
  font-size:.8rem;
  font-weight:700;
  display:inline-flex;
  align-items:center;
  gap:.45rem;
  margin:.25rem;
}

.ai-chat-box{
  height:520px;
  display:flex;
  flex-direction:column;
}

.ai-chat-messages{
  flex:1;
  overflow:auto;
  padding-right:.35rem;
}

.chat-msg{
  display:flex;
  gap:.75rem;
  margin-bottom:1rem;
  animation:slideUp .25s ease;
}

@keyframes slideUp{
  from{opacity:0;transform:translateY(10px);}
  to{opacity:1;transform:translateY(0);}
}

.chat-avatar{
  width:34px;
  height:34px;
  border-radius:50%;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  color:#fff;
  background:linear-gradient(135deg,#3b82f6,#8b5cf6);
}

.chat-bubble{
  background:#f8fafc;
  border:1px solid var(--border);
  border-radius:1rem;
  padding:.8rem .95rem;
  font-size:.88rem;
  line-height:1.55;
}

.chat-msg.user{
  flex-direction:row-reverse;
}

.chat-msg.user .chat-avatar{
  background:#0f172a;
}

.chat-msg.user .chat-bubble{
  background:#eef2ff;
}

.typing-dots span{
  width:6px;
  height:6px;
  background:#94a3b8;
  border-radius:50%;
  display:inline-block;
  margin-right:3px;
  animation:typing 1s infinite ease-in-out;
}

.typing-dots span:nth-child(2){animation-delay:.15s}
.typing-dots span:nth-child(3){animation-delay:.3s}

@keyframes typing{
  0%,100%{transform:translateY(0);opacity:.4;}
  50%{transform:translateY(-4px);opacity:1;}
}

.creative-mini{
  width:78px;
  height:48px;
  border-radius:.65rem;
  object-fit:cover;
  border:1px solid var(--border);
}

.confidence-bar{
  height:8px;
  border-radius:999px;
  background:#e2e8f0;
  overflow:hidden;
}

.confidence-fill{
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg,#3b82f6,#8b5cf6);
}

.insight-rank{
  width:30px;
  height:30px;
  border-radius:10px;
  display:grid;
  place-items:center;
  font-weight:800;
  background:#eef2ff;
  color:#3730a3;
}

.ai-scan-active{
  position:relative;
  overflow:hidden;
}

.ai-scan-active::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(120deg, transparent 0%, rgba(59,130,246,.12) 45%, rgba(139,92,246,.2) 50%, transparent 58%);
  animation:aiScan 1.25s linear infinite;
  pointer-events:none;
}

@keyframes aiScan{
  from{transform:translateX(-100%);}
  to{transform:translateX(100%);}
}

.analysis-step{
  border:1px solid var(--border);
  border-radius:.85rem;
  padding:.75rem;
  margin-bottom:.65rem;
  background:#fff;
}

.analysis-step.done{
  border-color:#bbf7d0;
  background:#f0fdf4;
}

.analysis-progress{
  height:8px;
  border-radius:999px;
  overflow:hidden;
  background:#e2e8f0;
}

.analysis-progress-bar{
  height:100%;
  width:0%;
  background:linear-gradient(90deg,#3b82f6,#8b5cf6,#16a34a);
  transition:width .45s ease;
}
/* Light version additions */
.media-fallback{width:96px;height:54px;border:1px dashed var(--border);border-radius:.7rem;display:grid;place-items:center;background:#f8fafc;color:#64748b;font-size:1.4rem}.empty-media{height:420px;display:grid;place-items:center;background:#0f172a;color:#fff;border-radius:1rem}.side-kpi{display:flex;justify-content:space-between;gap:1rem;padding:.7rem 0;border-bottom:1px solid var(--border)}.side-kpi span{color:#64748b}.side-kpi strong{text-align:right}.creative-card{overflow:hidden}.creative-card .preview{height:168px;background:#f8fafc;display:grid;place-items:center}.creative-card .preview img,.creative-card .preview video{width:100%;height:100%;object-fit:cover}.table-wrap{overflow:auto}.filter-card{position:sticky;top:0;z-index:5}.log-upload{background:#ecfdf5!important}.log-delete{background:#fef2f2!important}.login-shell{min-height:100vh;background:radial-gradient(circle at 20% 20%,rgba(59,130,246,.25),transparent 25%),linear-gradient(135deg,#10164a,#26328c);display:grid;place-items:center}.login-card{max-width:420px;width:100%;border-radius:1.5rem;background:#fff;padding:2rem;box-shadow:0 25px 60px rgba(15,23,42,.25)}

/* Marketing Dashboard refinements */
.kpi-card-highlight{background:linear-gradient(180deg,#fff,#f8fbff); border:1px solid #dbeafe!important; box-shadow:0 10px 26px rgba(37,99,235,.08)!important;}
.clickable-cell{cursor:pointer;}
.clickable-cell:hover{color:#0d6efd;text-decoration:underline;}
.modal-chart-wrap{height:520px;position:relative;width:100%;}
.chart-wrap-lg{height:430px;position:relative;width:100%;}
.chart-wrap-xl{height:560px;position:relative;width:100%;}
.pie-layout{display:flex;gap:1.25rem;align-items:center;min-height:560px;}
.pie-chart-area{width:70%;height:540px;position:relative;}
.pie-legend-area{width:30%;max-height:540px;overflow:auto;border-left:1px solid #e7edf6;padding-left:1rem;}
.pie-legend-row{display:flex;align-items:center;gap:.6rem;padding:.45rem 0;border-bottom:1px solid #f1f5f9;font-size:.86rem;}
.legend-color{width:14px;height:14px;border-radius:4px;display:inline-block;flex:0 0 14px;}
.legend-label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.marketing-table{min-width:3100px;border-collapse:separate;border-spacing:0;}
.marketing-table th,.marketing-table td{white-space:nowrap;background:#fff;}
.marketing-table thead th{position:sticky;top:0;z-index:3;background:#fafbfe;}
.sticky-table-wrap{max-height:70vh;overflow:auto;position:relative;z-index: 1!important;}
.marketing-table th:nth-child(1),.marketing-table td:nth-child(1){position:sticky;left:0;z-index:4;min-width:150px;max-width:150px;}
.marketing-table th:nth-child(2),.marketing-table td:nth-child(2){position:sticky;left:150px;z-index:4;min-width:82px;max-width:82px;}
.marketing-table th:nth-child(3),.marketing-table td:nth-child(3){position:sticky;left:232px;z-index:4;min-width:360px;max-width:360px;overflow:hidden;text-overflow:ellipsis;}
.marketing-table th:nth-child(4),.marketing-table td:nth-child(4){position:sticky;left:592px;z-index:4;min-width:140px;max-width:140px;}
.marketing-table thead th:nth-child(-n+4){z-index:6;background:#eef6ff;}
.marketing-table td:nth-child(-n+4){background:#fff;box-shadow:1px 0 0 #edf2f7;}
.marketing-table tbody tr:hover td{background:#f8fbff;}
.marketing-table tbody tr:hover td:nth-child(-n+4){background:#f0f7ff;}
.totals-row td{font-weight:800;background:#fff7ed!important;border-top:2px solid #fb923c;}
@media(max-width:991px){.pie-layout{display:block}.pie-chart-area,.pie-legend-area{width:100%;}.pie-legend-area{border-left:0;border-top:1px solid #e7edf6;padding-left:0;padding-top:1rem}.chart-wrap-lg{height:360px}.chart-wrap-xl{height:420px}}

/* Compact multi-select replacement */
.md-native-multiselect-hidden{display:none!important;}
.md-multiselect-toggle{height:38px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background-color:#fff;}
.md-multiselect-menu{width:100%;min-width:260px;max-height:340px;overflow:hidden;border:1px solid #dbe3ef;border-radius:.85rem;}
.md-multiselect-options{max-height:250px;overflow:auto;}
.md-multiselect-item{font-size:.88rem;padding:.45rem .5rem;cursor:pointer;white-space:normal;}
.md-multiselect-item:hover{background:#eef6ff;}
.md-multiselect-search{position:sticky;top:0;z-index:1;background:#fff;}

/* Marketing overview compact table sizing */
.marketing-table{
  font-size:.9em!important;
  min-width:2600px!important;
}
.marketing-table th,
.marketing-table td{
  padding:.42rem .45rem!important;
  line-height:1.25!important;
  vertical-align:middle!important;
  white-space:normal!important;
  word-break:break-word!important;
  overflow-wrap:anywhere!important;
  max-width:130px;
}
.marketing-table thead th{
  white-space:normal!important;
}
.marketing-table th:nth-child(1),.marketing-table td:nth-child(1){left:0!important;min-width:100px!important;width:100px!important;max-width:100px!important;}
.marketing-table th:nth-child(2),.marketing-table td:nth-child(2){left:100px!important;min-width:60px!important;width:60px!important;max-width:60px!important;text-align:center;}
.marketing-table th:nth-child(3),.marketing-table td:nth-child(3){left:160px!important;min-width:170px!important;width:170px!important;max-width:170px!important;}
.marketing-table th:nth-child(4),.marketing-table td:nth-child(4){left:330px!important;min-width:100px!important;width:100px!important;max-width:100px!important;}
.marketing-table .game-icon{width:38px!important;height:38px!important;margin:auto;}
.marketing-table .btn{padding:.22rem .45rem!important;font-size:.78rem!important;}

/* Visual Charts grid view selector */
.chart-grid-toolbar{
  border:1px solid #dbeafe!important;
  background:linear-gradient(180deg,#fff,#f8fbff);
}
.visual-chart-grid.full-grid > .col-12{
  flex:0 0 auto;
  width:100%!important;
}
.visual-chart-grid.half-grid > .col-12{
  flex:0 0 auto;
  width:50%!important;
}
.visual-chart-grid.half-grid > .col-12:nth-last-child(1):nth-child(odd){
  width:100%!important;
}
.visual-chart-grid.half-grid .card{
  height:100%;
}
.visual-chart-grid.half-grid .chart-wrap-lg{
  height:420px;
}
.visual-chart-grid.half-grid .chart-wrap-xl{
  height:520px;
}
.visual-chart-grid.half-grid .pie-layout{
  min-height:520px;
}
.visual-chart-grid.half-grid .pie-chart-area{
  height:500px;
}
.visual-chart-grid.half-grid .pie-legend-area{
  max-height:500px;
}
body.dark-mode .chart-grid-toolbar,
[data-theme="dark"] .chart-grid-toolbar{
  background:#111827!important;
  border-color:#334155!important;
}
@media(max-width:1199px){
  .visual-chart-grid.half-grid > .col-12{width:100%!important;}
}

/* Airbridge table readability fixes */
.marketing-table.airbridge-table{
  font-size:.9em!important;
  min-width:3400px!important;
}
.marketing-table.airbridge-table th,
.marketing-table.airbridge-table td{
  padding:.40rem .44rem!important;
  line-height:1.22!important;
  vertical-align:middle!important;
  white-space:normal!important;
  word-break:normal!important;
  overflow-wrap:break-word!important;
  max-width:130px!important;
}
.marketing-table.airbridge-table thead th{
  text-align:center!important;
  font-weight:700!important;
  font-size:.84em!important;
}
.marketing-table.airbridge-table th:nth-child(1),.marketing-table.airbridge-table td:nth-child(1){left:0!important;min-width:100px!important;width:100px!important;max-width:100px!important;}
.marketing-table.airbridge-table th:nth-child(2),.marketing-table.airbridge-table td:nth-child(2){left:100px!important;min-width:60px!important;width:60px!important;max-width:60px!important;text-align:center!important;}
.marketing-table.airbridge-table th:nth-child(3),.marketing-table.airbridge-table td:nth-child(3){left:160px!important;min-width:170px!important;width:170px!important;max-width:170px!important;}
.marketing-table.airbridge-table th:nth-child(4),.marketing-table.airbridge-table td:nth-child(4){left:330px!important;min-width:100px!important;width:100px!important;max-width:100px!important;}
.marketing-table.airbridge-table .creative-id{
  white-space:normal!important;
  word-break:break-word!important;
  overflow-wrap:anywhere!important;
  line-height:1.2!important;
}
.marketing-table.airbridge-table td:nth-child(n+5){
  text-align:center;
}
.marketing-table.airbridge-table td:nth-child(9),
.marketing-table.airbridge-table td:nth-child(10),
.marketing-table.airbridge-table td:nth-child(n+11){
  text-align:right;
  font-variant-numeric:tabular-nums;
}
body.dark-mode .marketing-table.airbridge-table th,
body.dark-mode .marketing-table.airbridge-table td,
[data-theme="dark"] .marketing-table.airbridge-table th,
[data-theme="dark"] .marketing-table.airbridge-table td{
  background:#111827!important;
}
body.dark-mode .marketing-table.airbridge-table thead th,
[data-theme="dark"] .marketing-table.airbridge-table thead th{
  background:#1f2937!important;
}


/* Stronger current menu highlight */
.sidebar-nav .nav-link.active,
.sidebar-nav .nav-link.current-menu{
  color:#fff!important;
  background:linear-gradient(90deg,rgba(255,255,255,.28),rgba(255,255,255,.12))!important;
  box-shadow:inset 4px 0 0 #ffffff, 0 10px 22px rgba(15,23,42,.18)!important;
  transform:translateX(2px);
}
.sidebar-nav .nav-link.active i,
.sidebar-nav .nav-link.current-menu i{
  color:#fff!important;
  filter:drop-shadow(0 2px 4px rgba(0,0,0,.18));
}
body.dark-mode .sidebar-nav .nav-link.active,
body.dark-mode .sidebar-nav .nav-link.current-menu,
[data-theme="dark"] .sidebar-nav .nav-link.active,
[data-theme="dark"] .sidebar-nav .nav-link.current-menu{
  background:linear-gradient(90deg,rgba(96,165,250,.36),rgba(255,255,255,.12))!important;
  box-shadow:inset 4px 0 0 #60a5fa, 0 10px 22px rgba(0,0,0,.28)!important;
}

/* Half-grid: keep previous chart layout, only limit filter field widths */
.visual-chart-grid.half-grid form.row .form-control,
.visual-chart-grid.half-grid form.row .form-select,
.visual-chart-grid.half-grid form.row .md-multiselect-toggle,
.visual-chart-grid.half-grid form.row .dropdown,
.visual-chart-grid.half-grid form.row .btn{
  max-width:150px;
}
.visual-chart-grid.half-grid form.row .md-mode-manual .form-select,
.visual-chart-grid.half-grid form.row .md-mode-manual .md-multiselect-toggle,
.visual-chart-grid.half-grid form.row .md-mode-manual .dropdown{
  max-width:150px;
}
.visual-chart-grid.half-grid .md-multiselect-menu{
  min-width:220px;
}

/* Half-grid: make Bootstrap column wrappers obey the same 150px filter limit */
.visual-chart-grid.half-grid form.row > [class*="col-md-"]{
  flex:0 0 auto!important;
  width:auto!important;
  max-width:150px!important;
}
.visual-chart-grid.half-grid form.row > [class*="col-md-"] .form-label{
  max-width:150px;
  white-space:normal;
}
.visual-chart-grid.half-grid form.row > [class*="col-md-"] .btn{
  white-space:normal;
}

/* Data Management / ETL jobs */
.etl-log-tail {
  background: #0f172a;
  color: #d1fae5;
  border-radius: 12px;
  padding: 14px;
  max-height: 460px;
  overflow: auto;
  font-size: 0.82rem;
  line-height: 1.45;
  white-space: pre-wrap;
}
.etl-jobs-table td, .etl-jobs-table th { white-space: nowrap; }
body.dark-mode .etl-log-tail, body[data-theme="dark"] .etl-log-tail {
  background: #020617;
  color: #bbf7d0;
}

/* PDF-style report page */
.report-page{background:#fff;color:#111;padding:22px 18px 60px;min-height:calc(100vh - 80px);font-family:Arial, Helvetica, sans-serif;}
.report-page h1{font-size:24px;font-weight:800;margin:0 0 70px 0;color:#111;}
.report-tabs{display:flex;gap:8px;margin:8px 0 18px;align-items:center;flex-wrap:wrap;}
.report-tabs a{font-size:12px;font-weight:800;color:#334155;text-decoration:none;border:1px solid #cbd5e1;background:#fff;border-radius:999px;padding:7px 12px;line-height:1;box-shadow:0 2px 6px rgba(15,23,42,.05);transition:.18s;}
.report-tabs a:hover{background:#f1f5f9;color:#111827;border-color:#94a3b8;}
.report-tabs a.active{background:#111827;color:#fff;border-color:#111827;box-shadow:0 6px 14px rgba(15,23,42,.16);}
.report-tabs a.disabled{opacity:.9;cursor:default;}
.report-filter{display:flex;flex-wrap:wrap;gap:8px 10px;align-items:end;margin:0 0 12px 0;padding:8px;border:1px solid #d9d9d9;background:#f7f7f7;}
.report-filter label{font-size:11px;font-weight:700;display:flex;flex-direction:column;gap:2px;}
.report-filter input,.report-filter select{height:28px;border:1px solid #aaa;background:#fff;font-size:12px;padding:2px 6px;max-width:150px;}
.report-section{margin:13px 0 24px;}
.report-section h3{font-size:13px;font-weight:800;margin:0 0 3px;color:#111;}
.report-table-wrap{overflow:auto;border:1px solid #9ea7b3;background:#fff;}
.report-table{border-collapse:collapse;width:max-content;min-width:100%;font-size:10px;line-height:1.15;color:#111;}
.report-table th,.report-table td{border:1px solid #bfc7d1;padding:2px 5px;white-space:nowrap;text-align:right;vertical-align:middle;}
.report-table th{background:#000;color:#fff;font-weight:800;text-align:center;position:sticky;top:0;z-index:2;}
.report-table td.report-dim,.report-table th.report-dim{text-align:left;background:#eef2f6;color:#111;font-weight:700;}
.report-table th.report-dim{background:#000;color:#fff;}
.report-table .report-cost{background:#f2f2f2;}
.report-table th.report-cost{background:#111;color:#fff;}
.report-table .report-roas{background:#e9f5e9;}
.report-table th.report-roas{background:#7fb069;color:#001b00;}
.report-table .report-roas-ssot{background:#fff1dd;}
.report-table th.report-roas-ssot{background:#ff8c1a;color:#fff;}
.report-table .report-arpu{background:#fff7ea;}
.report-table th.report-arpu{background:#ff9d22;color:#fff;}
.report-table .report-rr{background:#f2edff;}
.report-table th.report-rr{background:#6c3fd9;color:#fff;}
.report-table tbody tr:nth-child(even) td:not(.report-dim){background-color:#fafafa;}
.report-table tbody tr:nth-child(even) td.report-roas{background-color:#e1f1e1;}
.report-table tbody tr:nth-child(even) td.report-roas-ssot,.report-table tbody tr:nth-child(even) td.report-arpu{background-color:#fff0d8;}
.report-table tbody tr:nth-child(even) td.report-rr{background-color:#ece6ff;}
.report-table .report-total td{background:#dfe5ed!important;font-weight:800;border-top:2px solid #7d8794;}
.report-group-cell{min-width:70px;max-width:180px;white-space:normal!important;}
body.dark-mode .report-page{background:#fff;color:#111;}
body.dark-mode .report-filter{background:#f7f7f7;color:#111;}
body.dark-mode .report-table-wrap{background:#fff;}

/* Report filter refinements */
.report-filter .md-multiselect{max-width:180px;min-width:130px;}
.report-filter .md-multiselect-toggle{height:28px;font-size:12px;padding:2px 22px 2px 6px;line-height:1.2;}
.report-filter .md-multiselect-menu{min-width:220px;}
.report-filter .btn{height:28px;padding:2px 9px;font-size:12px;}
.report-threshold-row .form-select,.report-threshold-row .form-control{font-size:12px;}

/* Report daily chart area, modeled after the provided PDF chart grid. */
.report-chart-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:22px;
  margin:34px 0 22px;
}
.report-chart-card{
  background:#fff;
  border:1px solid #8a8a8a;
  padding:12px 14px 10px;
  min-height:238px;
  box-shadow:none;
}
.report-chart-card h3{
  font-size:13px;
  font-weight:800;
  color:#6f6f6f;
  margin:0 0 8px;
  line-height:1.2;
}
.report-chart-box{
  height:198px;
  position:relative;
}
.report-chart-box canvas{width:100%!important;height:100%!important;}
body.dark-mode .report-chart-card{background:#fff;color:#111;border-color:#8a8a8a;}
body.dark-mode .report-chart-card h3{color:#6f6f6f;}
@media (max-width: 1280px){.report-chart-grid{grid-template-columns:repeat(2,minmax(0,1fr));}.report-chart-card:last-child:nth-child(odd){grid-column:1/-1;}}
@media (max-width: 760px){.report-chart-grid{grid-template-columns:1fr;gap:14px}.report-chart-card{min-height:240px}.report-chart-box{height:200px;}}

/* Report view modern filter and template styles */
.report-page h1{margin-bottom:28px!important;}
.report-filter-modern{display:block!important;border:1px solid #dbe4ef!important;background:linear-gradient(180deg,#ffffff,#f8fafc)!important;border-radius:18px!important;padding:16px!important;box-shadow:0 10px 26px rgba(15,23,42,.07)!important;margin-bottom:18px!important;}
.report-filter-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:12px;align-items:end;}
.report-filter-field{display:flex;flex-direction:column;gap:6px;min-width:0;}
.report-filter-field-wide{grid-column:span 2;}
.report-filter-field label{font-size:11px;font-weight:800;color:#475569;text-transform:uppercase;letter-spacing:.035em;margin:0;}
.report-filter-field input,.report-filter-field select{height:38px;width:100%;max-width:none!important;border:1px solid #d6e1ef;border-radius:12px;background:#fff;color:#0f172a;font-size:13px;padding:6px 10px;box-shadow:inset 0 1px 0 rgba(255,255,255,.8);}
.report-filter-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:flex-end;margin-top:12px;padding-top:12px;border-top:1px solid #e6edf5;}
.report-filter-actions .btn{height:36px!important;border-radius:10px!important;padding:6px 13px!important;font-size:13px!important;font-weight:700;}
.report-filter-modern .md-multiselect{width:100%!important;min-width:0!important;max-width:none!important;display:block;}
.report-filter-modern .md-multiselect-toggle{height:38px!important;border:1px solid #d6e1ef!important;border-radius:12px!important;background:#fff!important;color:#0f172a!important;font-size:13px!important;padding:7px 34px 7px 10px!important;line-height:1.25!important;max-width:none!important;width:100%;}
.report-filter-modern .md-multiselect-menu{min-width:260px!important;width:100%!important;max-width:360px;border-radius:14px!important;border:1px solid #dbe4ef!important;box-shadow:0 18px 40px rgba(15,23,42,.16)!important;z-index:1080;}
.report-filter-modern .md-multiselect-options{max-height:240px!important;}
.report-filter-modern .md-multiselect-item{font-size:13px!important;padding:7px 8px!important;}
.report-filter-modern .md-multiselect-search{height:34px!important;border-radius:10px!important;font-size:13px!important;}
@media(max-width:900px){.report-filter-field-wide{grid-column:span 1}.report-filter-actions{justify-content:flex-start}}

.report-template-default{}
.report-template-simple{font-family:Arial,Helvetica,sans-serif!important;}
.report-template-simple .report-chart-card{border-color:#d1d5db;background:#fff;box-shadow:none;}
.report-template-simple .report-table th{background:#374151!important;color:#fff!important;}
.report-template-simple .report-table .report-cost,.report-template-simple .report-table .report-roas,.report-template-simple .report-table .report-roas-ssot,.report-template-simple .report-table .report-arpu,.report-template-simple .report-table .report-rr{background:#f9fafb!important;}
.report-template-simple .report-table tbody tr:nth-child(even) td:not(.report-dim){background:#f3f4f6!important;}
.report-template-simple .report-tabs a.active{color:#111827;}

.report-template-classic{font-family:Georgia,'Times New Roman',serif!important;background:#fffaf0!important;}
.report-template-classic .report-chart-card{border:1px solid #b08d57;background:#fffdf7;}
.report-template-classic .report-table th{background:#1f2937!important;color:#fff!important;}
.report-template-classic .report-table th.report-roas{background:#548235!important;color:#fff!important;}
.report-template-classic .report-table th.report-roas-ssot,.report-template-classic .report-table th.report-arpu{background:#bf9000!important;color:#fff!important;}
.report-template-classic .report-table th.report-rr{background:#7030a0!important;color:#fff!important;}
.report-template-classic .report-tabs a.active{color:#8b4513;}

.report-template-modern{font-family:Inter,Arial,Helvetica,sans-serif!important;background:#f8fafc!important;}
.report-template-modern .report-chart-card{border:1px solid #dbeafe;background:#fff;border-radius:16px;box-shadow:0 10px 28px rgba(37,99,235,.08);}
.report-template-modern .report-section h3{color:#2563eb;}
.report-template-modern .report-table th{background:#0f172a!important;color:#e0f2fe!important;}
.report-template-modern .report-table th.report-roas{background:#10b981!important;color:#fff!important;}
.report-template-modern .report-table th.report-roas-ssot,.report-template-modern .report-table th.report-arpu{background:#f97316!important;color:#fff!important;}
.report-template-modern .report-table th.report-rr{background:#8b5cf6!important;color:#fff!important;}
.report-template-modern .report-tabs a.active{color:#2563eb;}

.report-template-professional{font-family:'Segoe UI',Arial,Helvetica,sans-serif!important;background:#ffffff!important;}
.report-template-professional .report-chart-card{border:1px solid #9fb3c8;background:#fff;box-shadow:0 8px 20px rgba(15,76,129,.08);}
.report-template-professional .report-section h3{color:#0f4c81;}
.report-template-professional .report-table th{background:#0f4c81!important;color:#fff!important;}
.report-template-professional .report-table th.report-roas{background:#2f855a!important;color:#fff!important;}
.report-template-professional .report-table th.report-roas-ssot,.report-template-professional .report-table th.report-arpu{background:#dd6b20!important;color:#fff!important;}
.report-template-professional .report-table th.report-rr{background:#553c9a!important;color:#fff!important;}
.report-template-professional .report-tabs a.active{color:#0f4c81;}
body.dark-mode .report-filter-modern{background:linear-gradient(180deg,#ffffff,#f8fafc)!important;color:#111!important;}
.report-filter-modern .report-filter-field > label{display:block!important;flex-direction:initial!important;gap:0!important;}

/* Report view: clearer OS & Media grouping separators */
.report-osmedia-table td.report-os-cell,
.report-osmedia-table td.report-media-cell{
  border-top-color:transparent!important;
  border-bottom-color:transparent!important;
}
.report-osmedia-table td.report-os-cell{
  min-width:82px;
  color:#111;
  background:#eef2f6!important;
}
.report-osmedia-table td.report-media-cell{
  min-width:120px;
  color:#111;
  background:#eef2f6!important;
}
.report-osmedia-table tr.report-ios-start > td{
  border-top:1.5px solid #444!important;
}
.report-osmedia-table tr.report-media-start > td:nth-child(n+2){
  border-top:1.1px solid #444!important;
}
.report-osmedia-table tr.report-media-start.report-ios-start > td{
  border-top:1.5px solid #444!important;
}

.report-osmedia-table th:nth-child(3){
  width:170px;
  min-width:170px;
  max-width:170px;
  white-space:normal!important;
}

.report-osmedia-table td.report-campaign-cell{
  width:170px;
  min-width:170px;
  max-width:170px;
  white-space:normal!important;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.report-osmedia-table .report-total td{
  border-top:2px solid #444!important;
}

/* Report full-screen mode and Excel/HTML export-friendly report surface */
.report-page:fullscreen,
.report-page.report-fullscreen-fallback{
  background:#fff!important;
  color:#111!important;
  width:100vw!important;
  height:100vh!important;
  max-width:none!important;
  overflow:auto!important;
  padding:20px!important;
  z-index:99999!important;
}
.report-page:fullscreen .report-filter,
.report-page.report-fullscreen-fallback .report-filter{
  position:sticky;
  top:0;
  z-index:10;
}
.report-page:fullscreen .report-chart-grid,
.report-page.report-fullscreen-fallback .report-chart-grid{
  max-width:none!important;
}
.report-filter-actions #fullScreenReportBtn,
.report-filter-actions #downloadReportBtn{
  min-width:96px;
}

body.dark-mode .report-tabs a{background:#1f2937;color:#e5e7eb;border-color:#334155;}
body.dark-mode .report-tabs a.active{background:#2563eb;color:#fff;border-color:#2563eb;}

/* Report table nominal column show/hide filters */
.report-table th.report-nominal-header{
  position:relative;
  padding-right:18px!important;
  vertical-align:middle;
}
.report-table th.report-nominal-header .report-th-label{
  display:block;
  padding-right:8px;
  line-height:1.15;
}
.report-nominal-filter-btn{
  position:absolute;
  right:3px;
  top:50%;
  transform:translateY(-50%);
  width:13px;
  height:13px;
  min-width:13px;
  padding:0;
  border:0;
  border-radius:3px;
  background:rgba(255,255,255,.18);
  color:inherit;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:8px;
  line-height:1;
  cursor:pointer;
  opacity:.82;
}
.report-nominal-filter-btn:hover,
.report-nominal-filter-btn.active{
  opacity:1;
  background:#ffffff;
  color:#111827;
  box-shadow:0 0 0 1px rgba(17,24,39,.35);
}
.report-nominal-filter-menu{
  position:fixed;
  z-index:20000;
  min-width:70px;
  max-width:220px;
  max-height:260px;
  overflow:auto;
  padding:5px 6px;
  background:#fff;
  color:#111827;
  border:1px solid #4b5563;
  box-shadow:0 10px 22px rgba(15,23,42,.22);
  font-family:Arial, sans-serif;
  font-size:11px;
}
.report-nominal-filter-item{
  display:flex;
  align-items:center;
  gap:5px;
  min-height:20px;
  margin:0;
  padding:2px 1px;
  white-space:nowrap;
  cursor:pointer;
}
.report-nominal-filter-item input{
  width:11px;
  height:11px;
  margin:0;
  flex:0 0 auto;
}
.report-row-hidden-by-filter{
  display:none!important;
}
body.dark-mode .report-nominal-filter-menu{
  background:#ffffff;
  color:#111827;
}

/* Report parameter popup, selected option chips, chart popup, and repaired multi-selects */
.report-selected-options{display:flex;flex-wrap:wrap;gap:7px 9px;align-items:center;margin:0 0 16px;padding:10px 12px;border:1px solid #d7e3f1;background:#f8fbff;border-radius:14px;color:#334155;font-size:12px;box-shadow:0 6px 16px rgba(15,23,42,.05)}
.report-selected-options-title{font-weight:900;color:#0f172a;margin-right:2px;display:flex;gap:6px;align-items:center}
.report-selected-options span{background:#fff;border:1px solid #dbeafe;border-radius:999px;padding:4px 8px;line-height:1.2;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.report-selected-options strong{color:#111827;font-weight:800}
.report-parameters-modal .form-control{border-radius:10px;border-color:#d6e1ef;height:38px;font-size:13px}
.report-parameters-modal .form-text{font-size:11px;color:#64748b}
.report-chart-card{cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease}
.report-chart-card:hover{transform:translateY(-1px);box-shadow:0 10px 28px rgba(15,23,42,.12);border-color:#94a3b8}
.report-chart-modal-content{background:#f8fafc}
.report-chart-modal-content .modal-header{background:#fff;border-bottom:1px solid #dbe4ef}
.report-chart-modal-content .modal-body{padding:18px;height:calc(100vh - 66px)}
#reportChartModalCanvas{width:100%!important;height:100%!important;background:#fff;border:1px solid #dbe4ef;border-radius:18px;padding:12px;box-shadow:0 14px 40px rgba(15,23,42,.12)}
.report-filter-modern .md-multiselect{position:relative;width:100%!important;min-width:0!important;max-width:none!important;display:block}
.report-filter-modern .md-multiselect-menu{padding:8px!important;min-width:100%!important;width:max-content!important;max-width:360px!important;border-radius:14px!important;border:1px solid #dbe4ef!important;box-shadow:0 18px 40px rgba(15,23,42,.16)!important;z-index:1080;overflow:hidden;background:#fff!important}
.report-filter-modern .md-multiselect-options{max-height:250px!important;overflow-y:auto!important;overflow-x:hidden!important;display:flex!important;flex-direction:column!important;gap:2px!important;padding-right:2px!important}
.report-filter-modern .md-multiselect-item{display:flex!important;align-items:center!important;gap:8px!important;width:100%!important;white-space:nowrap!important;font-size:13px!important;line-height:1.25!important;padding:7px 8px!important;margin:0!important;border-radius:9px!important;color:#0f172a!important;background:#fff!important}
.report-filter-modern .md-multiselect-item:hover{background:#f1f5f9!important}
.report-filter-modern .md-multiselect-item input{flex:0 0 auto!important;width:14px!important;height:14px!important;margin:0!important}
.report-filter-modern .md-multiselect-item span{display:block!important;overflow:hidden!important;text-overflow:ellipsis!important;min-width:0!important;max-width:300px!important}
.report-filter-modern .md-multiselect-search{width:100%!important;height:34px!important;border-radius:10px!important;font-size:13px!important;margin-bottom:7px!important}

/*
@media(max-width:760px){.report-selected-options span{white-space:normal}.report-chart-modal-content .modal-body{padding:10px}.report-filter-modern .md-multiselect-menu{max-width:calc(100vw - 32px)!important}}
*/
/* Airbridge-compatible report layout */
.report-page.report-platform-airbridge .report-chart-card h3,
.report-chart-grid-airbridge .report-chart-card h3 {
  color: #6b7280;
  font-weight: 600;
}
.report-chart-grid-airbridge {
  grid-template-columns: repeat(3, minmax(280px, 1fr));
  align-items: stretch;
}
.report-chart-grid-airbridge .report-chart-box {
  height: 260px;
}
.report-table th.report-revenue {
  background: #2f5597 !important;
  color: #fff !important;
}
.report-table th.report-cost {
  background: #111 !important;
  color: #fff !important;
}
.report-table th.report-roas {
  background: #f97316 !important;
  color: #fff !important;
}
.report-table th.report-arpu {
  background: #9dc3e6 !important;
  color: #111 !important;
}
.report-table th.report-rr {
  background: #70ad47 !important;
  color: #111 !important;
}
.report-table td.report-revenue,
.report-table td.report-cost,
.report-table td.report-roas,
.report-table td.report-arpu,
.report-table td.report-rr {
  text-align: right;
}
.report-table th.report-dim .report-th-label { padding-right: 18px; }
@media (max-width: 1200px) {
  .report-chart-grid-airbridge { grid-template-columns: repeat(2, minmax(260px, 1fr)); }
}
/*
@media (max-width: 760px) {
  .report-chart-grid-airbridge { grid-template-columns: 1fr; }
}*/

/* Report chart popup: centered 60% screen preview with optional value labels. */
#reportChartModal .report-chart-modal-dialog{
  width:60vw!important;
  max-width:60vw!important;
  height:60vh!important;
  margin-left:auto!important;
  margin-right:auto!important;
}
#reportChartModal .report-chart-modal-content{
  height:60vh!important;
  border-radius:18px!important;
  overflow:hidden!important;
  box-shadow:0 24px 70px rgba(15,23,42,.28)!important;
}
#reportChartModal .report-chart-modal-content .modal-body{
  height:calc(60vh - 64px)!important;
  padding:14px!important;
  background:#f8fafc!important;
}
#reportChartModalCanvas{
  width:100%!important;
  height:100%!important;
  background:#fff!important;
  border:1px solid #dbe4ef!important;
  border-radius:14px!important;
  padding:10px!important;
}
.report-chart-value-toggle{
  display:inline-flex;
  align-items:center;
  gap:5px;
  font-size:12px;
  font-weight:700;
  color:#334155;
  padding:5px 8px;
  border:1px solid #dbe4ef;
  border-radius:999px;
  background:#f8fafc;
}
.report-chart-value-toggle input{width:13px;height:13px;margin:0;}
@media(max-width:900px){
  #reportChartModal .report-chart-modal-dialog{width:92vw!important;max-width:92vw!important;height:68vh!important;}
  #reportChartModal .report-chart-modal-content{height:68vh!important;}
  #reportChartModal .report-chart-modal-content .modal-body{height:calc(68vh - 72px)!important;}
}

/* Data Management import pages */
.dm-import-menu{display:flex;gap:.5rem;flex-wrap:wrap;padding:.35rem;background:var(--bs-body-bg,#fff);border:1px solid rgba(120,120,120,.18);border-radius:14px;box-shadow:0 8px 24px rgba(0,0,0,.04)}
.dm-import-tab{display:inline-flex;align-items:center;gap:.25rem;padding:.6rem .95rem;border-radius:11px;text-decoration:none;font-weight:700;font-size:.92rem;color:var(--bs-body-color,#222);border:1px solid transparent;transition:all .15s ease;background:transparent}
.dm-import-tab:hover{background:rgba(13,110,253,.08);border-color:rgba(13,110,253,.15);text-decoration:none}
.dm-import-tab.active{background:linear-gradient(135deg,#0d6efd,#4f8df7);color:#fff;border-color:rgba(13,110,253,.65);box-shadow:0 8px 18px rgba(13,110,253,.22)}
.dm-import-layout .dm-form-col{flex:0 0 auto;width:65%}
.dm-import-layout .dm-doc-col{flex:0 0 auto;width:25%;max-width:25%}
.dm-doc-card{background:linear-gradient(180deg,rgba(248,250,252,.98),rgba(255,255,255,.98));border-left:4px solid rgba(13,110,253,.55)}
.dm-doc-card table{font-size:.78rem}.dm-doc-card code{white-space:normal}
[data-theme="dark"] .dm-doc-card,.dark-mode .dm-doc-card{background:linear-gradient(180deg,rgba(30,41,59,.98),rgba(15,23,42,.98))}
@media (max-width:1199.98px){.dm-import-layout .dm-form-col,.dm-import-layout .dm-doc-col{width:100%;max-width:100%}.dm-import-tab{flex:1 1 210px;justify-content:center}}

/* Data Management menu and active sidebar item refinements */
.sidebar-nav .nav-item.active > .nav-link,
.sidebar-nav .nav-item.current-menu > .nav-link{
  color:#fff!important;
  background:linear-gradient(135deg,rgba(255,255,255,.22),rgba(255,255,255,.10))!important;
  box-shadow: inset 0px 0px 0 #fff, 0 10px 22px rgba(0, 0, 0, .18) !important;
}
.dm-import-menu{
  display:flex!important;
  align-items:center!important;
  gap:.55rem!important;
  flex-wrap:wrap!important;
  padding:.5rem!important;
  background:linear-gradient(135deg,rgba(13,110,253,.06),rgba(32,201,151,.05))!important;
  border:1px solid rgba(13,110,253,.14)!important;
  border-radius:18px!important;
  box-shadow:0 14px 34px rgba(31,41,55,.08)!important;
}
.dm-import-tab{
  min-height:42px!important;
  padding:.66rem 1.05rem!important;
  border-radius:14px!important;
  font-weight:800!important;
  color:#334155!important;
  background:rgba(255,255,255,.76)!important;
  border:1px solid rgba(148,163,184,.22)!important;
  box-shadow:0 6px 16px rgba(15,23,42,.04)!important;
}
.dm-import-tab:hover{transform:translateY(-1px);background:#fff!important;border-color:rgba(13,110,253,.32)!important;color:#0d6efd!important;}
.dm-import-tab.active{background:linear-gradient(135deg,#0d6efd,#3b82f6)!important;color:#fff!important;border-color:#0d6efd!important;box-shadow:0 12px 22px rgba(13,110,253,.28)!important;}
body.dark-mode .dm-import-menu,[data-theme="dark"] .dm-import-menu{background:rgba(15,23,42,.72)!important;border-color:rgba(148,163,184,.2)!important;}
body.dark-mode .dm-import-tab,[data-theme="dark"] .dm-import-tab{background:rgba(30,41,59,.86)!important;color:#e5e7eb!important;border-color:rgba(148,163,184,.18)!important;}
