/* ===================================================================
   WINNING RADAR - CLEAN CRISP WHITE & SLATE LUXURY DESIGN SYSTEM
   Professional E-Commerce Intelligence Dashboard (Winning Radar Executive Intelligence Standard)
   Palette: Pure Pearl White, Cool Slate, Subtle Borders, Ruby & Emerald Accents
   =================================================================== */

:root {
  /* Surfaces & Backgrounds */
  --bg-app: #f8fafc;            /* Crisp light slate canvas */
  --bg-sidebar: #ffffff;        /* Pure white sidebar */
  --bg-header: #ffffff;         /* Pure white sticky topbar */
  --bg-card: #ffffff;           /* Pure white card surface */
  --bg-card-subtle: #f8fafc;    /* Very soft slate contrast */
  --bg-hover: #f1f5f9;          /* Subtle hover slate */
  --bg-active: #e2e8f0;         /* Active state */

  /* Borders & Dividers */
  --border-subtle: #f1f5f9;
  --border-default: #e2e8f0;    /* Crisp divider */
  --border-strong: #cbd5e1;     /* Interactive elements border */
  --border-focus: #e11d48;

  /* Typography Colors */
  --text-primary: #0f172a;      /* Deep slate obsidian for maximum crisp legibility */
  --text-secondary: #334155;    /* Slate neutral for descriptions */
  --text-muted: #64748b;        /* Cool gray for meta & timestamps */
  --text-light: #94a3b8;        /* Soft placeholder */

  /* Brand Accents */
  --crimson: #e11d48;           /* Winning Ruby Crimson */
  --crimson-hover: #be123c;
  --crimson-light: #ffe4e6;
  --crimson-subtle: rgba(225, 29, 72, 0.08);

  --emerald: #10b981;           /* Growth & High ROAS */
  --emerald-light: #ecfdf5;
  --emerald-text: #047857;

  --indigo: #4f46e5;            /* Data Intelligence Accent */
  --indigo-light: #eef2ff;
  --indigo-text: #4338ca;

  --amber: #f59e0b;             /* Warning & Hot Alerts */
  --amber-light: #fffbeb;
  --amber-text: #b45309;

  --blue: #0284c7;
  --blue-light: #f0f9ff;
  --blue-text: #0369a1;

  /* Elevation Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.06), 0 1px 2px -1px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.03);

  /* Radii */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-pill: 9999px;

  /* Typography Fonts */
  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;

  /* Dimensions */
  --sidebar-width: 270px;
  --header-height: 64px;
}

/* ===================================================================
   Reset & Base Styles
   =================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f1f5f9;
}

/* Strict Elimination of Retro Windows Scrollbar Arrows & Bevels */
*::-webkit-scrollbar,
::-webkit-scrollbar {
  width: 5px !important;
  height: 5px !important;
}

*::-webkit-scrollbar-button,
::-webkit-scrollbar-button {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

*::-webkit-scrollbar-track,
::-webkit-scrollbar-track {
  background: #f1f5f9 !important;
  border-radius: 999px !important;
}

*::-webkit-scrollbar-thumb,
::-webkit-scrollbar-thumb {
  background: #cbd5e1 !important;
  border-radius: 999px !important;
  border: 1px solid #f8fafc !important;
  transition: background 0.2s ease;
}

*::-webkit-scrollbar-thumb:hover,
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8 !important;
}

*::-webkit-scrollbar-corner,
::-webkit-scrollbar-corner {
  background: transparent !important;
}

body {
  background-color: var(--bg-app);
  color: var(--text-primary);
  font-family: var(--font-main);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===================================================================
   Modern Form Controls (No Retro Windows 95/98 Dropdowns!)
   =================================================================== */

select,
.modern-select {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-color: #ffffff !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2.2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 14px !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: var(--radius-sm) !important;
  padding: 8px 36px 8px 12px !important;
  font-family: var(--font-main) !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  color: var(--text-primary) !important;
  box-shadow: var(--shadow-xs) !important;
  cursor: pointer !important;
  outline: none !important;
  transition: all 0.15s ease-in-out !important;
}

select:hover,
.modern-select:hover {
  border-color: #94a3b8 !important;
  background-color: #fafbfc !important;
}

select:focus,
.modern-select:focus {
  border-color: var(--crimson) !important;
  box-shadow: 0 0 0 3px var(--crimson-subtle) !important;
}

select option {
  background: #ffffff !important;
  color: #0f172a !important;
  padding: 10px 12px !important;
  font-size: 13px !important;
}

input[type="text"],
input[type="number"],
.modern-input {
  background-color: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  outline: none;
  box-shadow: var(--shadow-xs);
  transition: all 0.15s ease-in-out;
}

input[type="text"]:focus,
input[type="number"]:focus,
.modern-input:focus {
  border-color: var(--crimson);
  box-shadow: 0 0 0 3px var(--crimson-subtle);
}

/* ===================================================================
   Layout Structure: Left Sidebar + Top Bar + Content Canvas
   =================================================================== */

.app-wrapper {
  display: flex;
  width: 100vw;
  min-height: 100vh;
}

/* ===================================================================
   ARCHITECTURAL SIDEBAR NAVIGATION (Executive Command Deck)
   =================================================================== */

.app-sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background-color: #f6f8fa; /* Distinct Cool Architectural Gray */
  border-right: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 2px 0 10px rgba(15, 23, 42, 0.03);
}

.sidebar-brand {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.02);
}

.brand-icon-box,
.brand-logo-wrap {
  width: 32px;
  height: 32px;
  background: #040407;
  border: 1px solid rgba(225, 29, 72, 0.3);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  box-shadow: 0 2px 8px rgba(225, 29, 72, 0.18);
  flex-shrink: 0;
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-text-block h1 {
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
}

.brand-pill-ver {
  font-size: 8.5px;
  font-weight: 800;
  background: var(--crimson-light);
  color: var(--crimson);
  padding: 1.5px 5px;
  border-radius: 2px;
  letter-spacing: 0.05em;
}

.brand-tagline {
  font-size: 9.5px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: -0.01em;
}

/* ===================================================================
   STREAMLINED EXECUTIVE SIDEBAR NAVIGATION
   Clean, Calm, High-End SaaS: Full-Bleed Active State, Zero Clutter
   =================================================================== */

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 0 10px 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

/* Minimalist Scrollbar: Zero Arrows, 4px Flat */
.sidebar-nav::-webkit-scrollbar {
  width: 4px !important;
}

.sidebar-nav::-webkit-scrollbar-button,
.sidebar-nav::-webkit-scrollbar-button:single-button,
.sidebar-nav::-webkit-scrollbar-button:vertical:decrement,
.sidebar-nav::-webkit-scrollbar-button:vertical:increment {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: transparent !important;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: #cbd5e1 !important;
  border-radius: 0 !important;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: #94a3b8 !important;
}

/* Category Groups: Clean, Seamless Flow (No Heavy Boxes) */
.nav-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 4px;
}

/* Refined Category Title: Quiet, Elegant Typography (No Heavy Left Lines) */
.nav-group-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  padding: 10px 16px 3px 16px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-group-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  padding: 0;
  margin: 0;
  gap: 1px;
}

.nav-group-list li {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Nav Link Button: Full-Width Streamlined Item with Ideal Executive Height */
.nav-link-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100% !important;
  min-height: 38px;
  padding: 8.5px 16px;
  border-radius: 0 !important;
  background: transparent;
  border: none;
  border-left: 4px solid transparent;
  color: #475569;
  font-family: var(--font-main);
  font-size: 12.5px;
  font-weight: 550;
  text-align: left;
  cursor: pointer;
  transition: all 0.12s ease-in-out;
  position: relative;
  box-sizing: border-box;
  white-space: nowrap;
}

.nav-link-btn > span:not(.nav-icon):not(.nav-badge) {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.nav-link-btn .nav-icon {
  font-size: 14px;
  line-height: 1;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-link-btn:hover:not(.active) {
  background-color: #f1f5f9;
  color: #0f172a;
  border-left: 4px solid #cbd5e1;
}

/* Active State: Penuh Kiri-Kanan, Solid Red 100%, White Text, NO ARROW */
.nav-link-btn.active {
  width: 100% !important;
  border-radius: 0 !important;
  background: #e11d48 !important;
  color: #ffffff !important;
  border-left: 4px solid #9f1239 !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 8px rgba(225, 29, 72, 0.25) !important;
}

.nav-link-btn.active:hover {
  background-color: #e11d48 !important;
  color: #ffffff !important;
}

/* Strictly NO arrow icon on active state */
.nav-link-btn.active::after,
.nav-link-btn::after {
  display: none !important;
  content: none !important;
}

.nav-link-btn.active .nav-icon {
  transform: scale(1.12);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}

.nav-link-btn.active .nav-badge {
  background: #ffffff !important;
  color: #e11d48 !important;
  font-weight: 800 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
  border: none !important;
}

.nav-link-btn .nav-badge {
  margin-left: auto;
  font-size: 8.5px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  white-space: nowrap;
}

.badge-crimson {
  background: #e11d48;
  color: #ffffff;
}

.badge-emerald {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-indigo {
  background: #eef2ff;
  color: #4338ca;
  border: 1px solid rgba(99, 102, 241, 0.15);
}

/* Compact Luxury Sidebar Footer */
.sidebar-footer {
  padding: 8px 10px;
  border-top: 1px solid #e2e8f0;
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex-shrink: 0;
}

.quantum-gateway-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 2px;
  padding: 5px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gateway-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gateway-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 700;
  color: #047857;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
  animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 5px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.gateway-detail {
  font-size: 9.5px;
  color: #64748b;
  font-family: var(--font-mono);
}

.studio-bridge-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: 2px;
  padding: 5.5px 8px;
  font-size: 10.5px;
  font-weight: 700;
  color: #be123c;
  text-decoration: none;
  transition: all 0.15s ease;
}

.studio-bridge-link:hover {
  background: #ffe4e6;
  border-color: #fda4af;
  color: #9f1239;
}

/* ===================================================================
   Main Layout: Header & Main Content Canvas
   =================================================================== */

.main-viewport {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-y: auto;
  height: 100vh;
}

/* Sticky Top Bar */
.top-header {
  height: var(--header-height);
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-default);
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: var(--shadow-xs);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.breadcrumb-trail {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.breadcrumb-trail .active-crumb {
  color: var(--text-primary);
  font-weight: 800;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.country-selector-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tier-badge-pro {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #ffffff;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Content Canvas */
.content-canvas {
  padding: 24px 28px 48px 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* View Header Banner */
.view-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
}

.view-header-info h2 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.view-header-info p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
  font-weight: 500;
}

.view-header-stats {
  display: flex;
  align-items: center;
  gap: 14px;
}

.kpi-pill {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  min-width: 110px;
}

.kpi-pill-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.kpi-pill-val {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
  margin-top: 2px;
  font-family: var(--font-mono);
}

/* Filter Controls Bar */
.filter-bar {
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  box-shadow: var(--shadow-xs);
}

.category-pill-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.cat-pill-btn {
  background: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.cat-pill-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.cat-pill-btn.active {
  background: var(--text-primary);
  color: #ffffff;
  border-color: var(--text-primary);
}

.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  margin-left: auto;
  min-width: 260px;
}

.search-input-wrap .search-icon {
  position: absolute;
  left: 12px;
  font-size: 13px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input-wrap input {
  padding-left: 34px !important;
  width: 100%;
}

.filter-divider {
  width: 1px;
  height: 24px;
  background: var(--border-default);
}

/* ===================================================================
   Table System: Clean White, Crisp Borders, Hover Highlights
   =================================================================== */

.card-container {
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.intel-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  text-align: left;
}

.intel-table th {
  background: #f8fafc;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-default);
  white-space: nowrap;
}

.intel-table td {
  padding: 12px 12px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  vertical-align: middle;
  background: #ffffff;
  transition: background 0.15s ease;
  white-space: nowrap;
}

.intel-table td:nth-child(2) {
  white-space: normal;
}

.intel-table tr:last-child td {
  border-bottom: none;
}

.intel-table tbody tr:hover td {
  background-color: #f8fafc;
}

/* Table Specific Elements */
.product-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 280px;
}

.product-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: #f8fafc;
  border: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.product-real-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-meta h4 {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.product-meta p {
  font-size: 11.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
}

.rank-badge {
  font-size: 12px;
  font-weight: 800;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  color: var(--text-secondary);
}

.rank-1 { background: #fef3c7; color: #b45309; }
.rank-2 { background: #f1f5f9; color: #475569; }
.rank-3 { background: #fed7aa; color: #c2410c; }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.status-exploding {
  background: var(--crimson-light);
  color: var(--crimson);
  border: 1px solid rgba(225, 29, 72, 0.2);
}

.status-rising {
  background: var(--emerald-light);
  color: var(--emerald-text);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-cashcow {
  background: var(--indigo-light);
  color: var(--indigo-text);
  border: 1px solid rgba(79, 70, 229, 0.2);
}

.mono-metric {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
}

.growth-positive {
  color: var(--emerald-text);
  font-weight: 700;
}

.growth-negative {
  color: #dc2626;
  font-weight: 700;
}

.action-btn-sm {
  background: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-family: var(--font-main);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.action-btn-sm:hover {
  background: var(--crimson);
  border-color: var(--crimson);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(225, 29, 72, 0.25);
}

.action-btn-secondary {
  background: #f8fafc;
  border: 1px solid var(--border-default);
}

.action-btn-secondary:hover {
  background: #f1f5f9;
  border-color: var(--border-strong);
  color: var(--text-primary);
  box-shadow: none;
}

/* ===================================================================
   WINNING RADAR HIGH-DENSITY METRICS & TABLE COMPONENTS
   =================================================================== */

/* Winning Radar Smooth Curved Wave Sparkline */
.trend-wave-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.trend-wave-svg {
  display: block;
  width: 82px;
  height: 28px;
  overflow: visible;
}

/* Winning Radar Best-Selling 3-Thumbnail Cards */
.omni-thumb-group {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.omni-thumb-box {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.omni-thumb-box:hover {
  transform: translateY(-2px) scale(1.06);
  border-color: #2563eb;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
  z-index: 5;
}

.omni-thumb-icon {
  font-size: 19px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.omni-thumb-real-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Winning Radar Metric Formatting */
.metric-revenue-bold {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.metric-units-bold {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
}

.growth-arrow-up {
  display: inline-flex;
  align-items: center;
  gap: 2.5px;
  color: #16a34a;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 11.5px;
}

.growth-arrow-up::after {
  content: '▲';
  font-size: 8px;
}

/* Winning Radar Shop Type Badges */
.badge-official-mall {
  display: inline-block;
  padding: 1.5px 6px;
  border-radius: 3px;
  background: #fee2e2;
  color: #dc2626;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.badge-star-seller {
  display: inline-block;
  padding: 1.5px 6px;
  border-radius: 3px;
  background: #ffedd5;
  color: #c2410c;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.badge-direct-factory {
  display: inline-block;
  padding: 1.5px 6px;
  border-radius: 3px;
  background: #fef3c7;
  color: #b45309;
  font-size: 10px;
  font-weight: 800;
}

/* Winning Radar Active Date Filter Pill */
.filter-date-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
}

/* Table / Grid View Toggle */
.view-mode-toggle {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
}

.view-mode-btn {
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 600;
  border: none;
  background: transparent;
  color: #64748b;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.view-mode-btn.active {
  background: #ffffff;
  color: #0f172a;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

/* Rich Product Metadata Cell */
.meta-product-rich {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.meta-product-rich .prod-title-bold {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
}

.meta-product-rich .prod-sub-meta {
  font-size: 11px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
}

.copy-id-btn {
  cursor: pointer;
  color: #3b82f6;
  transition: color 0.12s ease;
}
.copy-id-btn:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

/* ===================================================================
   Grid Cards: Categories, Creatives, Ads, Sounds
   =================================================================== */

.intel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.intel-card {
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  min-width: 0;
}

.intel-card:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

/* New Standard Card Top Bar: Badges Row */
.card-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
  min-width: 0;
}

.card-badges-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}

/* Modern Soft Pill Badges */
.badge-pill-soft {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 3.5px 9px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.badge-blue-soft {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #dbeafe;
}

.badge-emerald-soft {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #d1fae5;
}

.badge-rose-soft {
  background: #fff1f2;
  color: #be123c;
  border: 1px solid #ffe4e6;
}

.badge-indigo-soft {
  background: #eef2ff;
  color: #4338ca;
  border: 1px solid #e0e7ff;
}

.badge-slate-soft {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.badge-danger-soft {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fee2e2;
}

.card-icon-title {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.card-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.card-title-meta {
  width: 100%;
  min-width: 0;
}

.card-title-meta h3 {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  margin: 4px 0 2px 0;
  word-break: break-word;
}

.card-title-meta p {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
  word-break: break-word;
}
  font-size: 11.5px;
  color: var(--text-muted);
}

.card-metrics-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  background: #f8fafc;
  border-radius: var(--radius-sm);
  padding: 12px;
}

.metric-box {
  display: flex;
  flex-direction: column;
}

.metric-box-label {
  font-size: 10.5px;
  color: var(--text-muted);
  font-weight: 600;
}

.metric-box-val {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
  font-family: var(--font-mono);
  margin-top: 2px;
}

.card-highlight-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 11.5px;
  color: #166534;
  line-height: 1.4;
}

.card-alert-box {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 11.5px;
  color: #991b1b;
  line-height: 1.4;
}

.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

/* ===================================================================
   Decision Lab & Margin Simulator
   =================================================================== */

.decision-lab-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 1024px) {
  .decision-lab-grid {
    grid-template-columns: 1fr;
  }
}

.calc-panel {
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.calc-panel-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-group label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

.result-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.result-kpi-box {
  background: #f8fafc;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 14px;
}

.result-kpi-box.highlight {
  background: var(--crimson-light);
  border-color: rgba(225, 29, 72, 0.25);
}

.result-kpi-box.highlight .metric-box-val {
  color: var(--crimson);
}

.result-kpi-box.emerald-hl {
  background: var(--emerald-light);
  border-color: rgba(16, 185, 129, 0.25);
}

.result-kpi-box.emerald-hl .metric-box-val {
  color: var(--emerald-text);
}

/* ===================================================================
   Modal System: Crisp White Luxury Floating Dialogs
   =================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.show {
  display: flex;
}

.modal-sheet {
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 680px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalScaleUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleUp {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-sheet-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-sheet-header h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close-btn {
  background: #f1f5f9;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.modal-close-btn:hover {
  background: #e2e8f0;
  color: var(--text-primary);
}

.modal-sheet-body {
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.dissect-section {
  background: #f8fafc;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.dissect-section-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--crimson);
  margin-bottom: 6px;
}

.dissect-section-text {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.5;
}

.script-remake-card {
  background: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-top: 8px;
}

.script-remake-header {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--indigo-text);
  margin-bottom: 4px;
}

.modal-sheet-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-default);
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.btn-primary-action {
  background: var(--crimson);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 9px 18px;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  box-shadow: 0 2px 6px rgba(225, 29, 72, 0.25);
}

.btn-primary-action:hover {
  background: var(--crimson-hover);
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.35);
}

/* ===================================================================
   Progress Bars & Sparklines
   =================================================================== */

.progress-bar-wrap {
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 4px;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #e11d48, #be123c);
  border-radius: 999px;
}

.progress-bar-emerald {
  background: linear-gradient(90deg, #10b981, #059669);
}

.sparkline-preview {
  display: inline-flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 20px;
  max-height: 20px;
  overflow: hidden;
  vertical-align: middle;
}

.sparkline-bar {
  width: 3.5px;
  background: #cbd5e1;
  border-radius: 2px 2px 0 0;
  display: inline-block;
  flex-shrink: 0;
}

.sparkline-bar.active {
  background: var(--crimson);
}
