/* ═══════════════════════════════════════════════════════════════
   ANGEL HUB FINDER — EXACT STYLES (MATCHING ORIGINAL DASHBOARD)
   Dark Slate Theme, 2-Column Sidebar Layout & 15-Column Table
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg-main: #090d16;
  --bg-sidebar: #0f172a;
  --bg-card: #131d31;
  --bg-card-hover: #1a2744;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(255, 107, 0, 0.5);
  
  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --text-dim: #64748B;
  
  --accent-orange: #FF6B00;
  --accent-orange-glow: rgba(255, 107, 0, 0.25);
  --accent-blue: #3B82F6;
  --accent-purple: #A855F7;
  --accent-green: #10B981;
  --accent-yellow: #F59E0B;
  --accent-red: #EF4444;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;
  
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Sarabun', sans-serif;
  --font-mono: 'Fira Code', monospace;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 0px;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

#products, .catalog-full-section, #catalogStickyHeader {
  scroll-margin-top: 0px !important;
}

/* ═══════════════════════════════════════════════════════════════
   DASHBOARD 2-COLUMN LAYOUT
   ═══════════════════════════════════════════════════════════════ */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

/* ── SIDEBAR (PERMANENTLY FIXED & NEVER MOVES) ── */
.dashboard-sidebar {
  width: 240px;
  min-width: 240px;
  max-width: 240px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  bottom: 70px !important;
  height: calc(100vh - 70px) !important;
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 500;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.75rem;
  padding: 0 4px;
}

.brand-emoji {
  font-size: 1.75rem;
}

.brand-title {
  display: block;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.3px;
  color: #FFF;
}

.brand-sub {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.15s ease;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.04);
  color: #FFF;
}

.nav-link.active {
  background-color: #1e293b;
  color: #FFF;
  font-weight: 600;
}

.sidebar-section {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.section-title {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0 8px;
  margin-bottom: 8px;
}

.extension-status-text {
  font-size: 0.72rem;
  color: var(--accent-green);
  padding: 8px 10px;
  margin-top: 8px;
}

/* Sidebar Selected Items Queue Box */
.sidebar-queue-box {
  margin-top: 1.25rem;
  background: rgba(255, 107, 0, 0.08);
  border: 1px solid rgba(255, 107, 0, 0.3);
  border-radius: var(--radius-md);
  padding: 10px;
}

.queue-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: #FF9E40;
}

.btn-toggle-queue {
  background: transparent;
  border: none;
  color: #FF9E40;
  cursor: pointer;
  font-size: 0.75rem;
}

.queue-items-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
  max-height: 180px;
  overflow-y: auto;
}

.queue-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
}

.queue-item-name {
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #FFF;
}

.btn-remove-queue-item {
  color: #EF4444;
  background: none;
  border: none;
  cursor: pointer;
  font-weight: bold;
}

.btn-clear-queue-link {
  display: block;
  width: 100%;
  margin-top: 6px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.72rem;
  text-decoration: underline;
  cursor: pointer;
  text-align: left;
}

.btn-clear-queue-link:hover {
  color: #EF4444;
}

/* Sidebar Footer & User Profile Bottom Card */
.sidebar-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.user-profile-bottom-card {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.user-profile-bottom-card:hover {
  background: rgba(255, 107, 0, 0.1);
  border-color: rgba(255, 107, 0, 0.3);
}

.user-avatar-wrap {
  position: relative;
  width: 34px;
  height: 34px;
  background: #1e293b;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.online-indicator-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 8px;
  height: 8px;
  background: var(--accent-green);
  border: 2px solid var(--bg-sidebar);
  border-radius: 50%;
}

.user-text-info {
  flex: 1;
  min-width: 0;
}

.user-display-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #FFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.user-plan-badge {
  font-size: 0.65rem;
  font-weight: 600;
  color: #FBBF24;
  letter-spacing: 0.2px;
}

.user-settings-icon {
  font-size: 0.9rem;
  color: var(--text-dim);
  transition: transform 0.2s;
}

.user-profile-bottom-card:hover .user-settings-icon {
  transform: rotate(45deg);
  color: #FFF;
}

.sidebar-footer-tools {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-link, .btn-theme-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  color: var(--text-muted);
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.footer-link:hover, .btn-theme-toggle:hover {
  background-color: rgba(255, 255, 255, 0.04);
  color: #FFF;
}

.footer-link:hover, .btn-theme-toggle:hover {
  background-color: rgba(255, 255, 255, 0.04);
  color: #FFF;
}

/* ── MAIN CONTENT (SCROLLS INDEPENDENTLY) ── */
.dashboard-main {
  flex: 1;
  min-width: 0;
  margin-left: 240px !important;
  width: calc(100% - 240px) !important;
  max-width: calc(100% - 240px) !important;
  padding: 12px 18px 95px 18px;
  overflow-x: hidden;
}

/* Top Sync Bar */
.top-sync-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 0.85rem;
}

.workspace-link-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s;
}

.workspace-link-pill:hover {
  background: rgba(255, 255, 255, 0.1);
}

.sync-actions-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-sync-action {
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #60A5FA;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
}

.db-live-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  color: var(--accent-green);
  background: rgba(16, 185, 129, 0.1);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
}

/* Content Section Common */
.content-section {
  margin-bottom: 2.5rem;
}

/* ═══════════════════════════════════════════════════════════════
   SECTION 1: AI STRATEGY BANNER & KPIS
   ═══════════════════════════════════════════════════════════════ */
.ai-strategy-banner {
  background: linear-gradient(90deg, rgba(255, 107, 0, 0.12), rgba(168, 85, 247, 0.1));
  border: 1px solid rgba(255, 107, 0, 0.25);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  display: flex;
  gap: 12px;
  margin-bottom: 1.5rem;
}

.banner-icon {
  font-size: 1.5rem;
}

.banner-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.92rem;
  color: #FFF;
  margin-bottom: 4px;
}

.banner-desc {
  font-size: 0.82rem;
  color: #CBD5E1;
  line-height: 1.5;
}

.pill-inline {
  background: rgba(255, 255, 255, 0.1);
  padding: 1px 6px;
  border-radius: 4px;
  color: #FFF;
  font-weight: 600;
}

.kpi-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.kpi-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.kpi-card:hover {
  background-color: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.kpi-card.highlight-purple {
  border-color: rgba(168, 85, 247, 0.35);
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), var(--bg-card));
}

.kpi-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.box-blue { background: rgba(59, 130, 246, 0.15); color: #60A5FA; }
.box-purple { background: rgba(168, 85, 247, 0.15); color: #C084FC; }
.box-orange { background: rgba(255, 107, 0, 0.15); color: #FB923C; }

.kpi-label {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 500;
}

.kpi-number {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: #FFF;
  line-height: 1.2;
}

.kpi-sub {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.kpi-gauge-card {
  gap: 16px;
}

.gauge-donut-wrap {
  width: 44px;
  height: 44px;
  position: relative;
}

.gauge-donut-svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.donut-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 3.5;
}

.donut-segment {
  fill: none;
  stroke: var(--accent-orange);
  stroke-width: 3.5;
  stroke-linecap: round;
}

.gauge-percent {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.72rem;
  color: #FFF;
}

/* ═══════════════════════════════════════════════════════════════
   SECTION 2: DUAL ANALYTICS GRID (DONUT & LINE CHARTS)
   ═══════════════════════════════════════════════════════════════ */
.dual-analytics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
}

@media (max-width: 992px) {
  .dual-analytics-grid {
    grid-template-columns: 1fr;
  }
}

.analytics-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
}

.analytics-card-header {
  margin-bottom: 8px;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 700;
  color: #FFF;
}

.card-sub {
  font-size: 0.7rem;
  color: var(--text-dim);
}

/* Category Donut Layout */
.category-analytics-body {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 175px;
}

.chart-box-donut {
  width: 155px;
  height: 155px;
  position: relative;
  flex-shrink: 0;
}

.cat-legend-list {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  max-height: 160px;
  overflow-y: auto;
  padding-right: 4px;
}

.cat-legend-list::-webkit-scrollbar {
  width: 4px;
}

.cat-legend-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.cat-legend-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.cat-legend-list::-webkit-scrollbar-thumb:hover {
  background: #FF6B00;
}

.cat-legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.cat-legend-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.cat-color-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  flex-shrink: 0;
}

.cat-name {
  flex: 1;
  font-size: 0.72rem;
  color: #E2E8F0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-right: 4px;
}

.cat-count {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  color: var(--text-dim);
  white-space: nowrap;
}

/* Signal Line Chart Layout */
.signal-chart-body {
  display: flex;
  flex-direction: column;
  height: 175px;
  gap: 6px;
}

.chart-box-line {
  flex: 1;
  width: 100%;
  min-height: 125px;
  position: relative;
}

.signal-quick-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.sig-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  font-weight: 600;
  color: #CBD5E1;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sig-pill-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #FFF;
}

.sig-pill-btn.active {
  border-color: #FF6B00;
  color: #FF9E40;
  background: rgba(255, 107, 0, 0.15);
}

/* ═══════════════════════════════════════════════════════════════
   SECTION 3: GOLDEN STRATEGIES
   ═══════════════════════════════════════════════════════════════ */
.golden-strategies-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
}

/* แถวบน: การ์ด 1-3 (span 2 คอลัมน์ต่อใบ) */
.golden-strategies-grid .golden-card {
  grid-column: span 2;
}

/* แถวล่าง: การ์ด 4 และ 5 — center 2 ใบในกริด 6 คอลัมน์ */
.golden-strategies-grid .golden-card:nth-child(4) {
  grid-column: 2 / span 2;
}
.golden-strategies-grid .golden-card:nth-child(5) {
  grid-column: 4 / span 2;
}

.golden-card {
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  cursor: pointer;
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
}

.golden-card:hover {
  transform: translateY(-3px);
}

.gold-purple { background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), var(--bg-card)); border: 1px solid rgba(168, 85, 247, 0.3); }
.gold-green { background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), var(--bg-card)); border: 1px solid rgba(16, 185, 129, 0.3); }
.gold-orange { background: linear-gradient(135deg, rgba(255, 107, 0, 0.15), var(--bg-card)); border: 1px solid rgba(255, 107, 0, 0.3); }
.gold-blue { background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), var(--bg-card)); border: 1px solid rgba(59, 130, 246, 0.3); }

.golden-card-tag { font-size: 0.72rem; font-weight: 700; color: #FFF; margin-bottom: 6px; }
.golden-card-title { font-family: var(--font-heading); font-size: 0.95rem; font-weight: 700; color: #FFF; margin-bottom: 4px; }
.golden-card-desc { font-size: 0.78rem; color: #CBD5E1; margin-bottom: 12px; flex: 1; }
.golden-card-btn { font-size: 0.76rem; font-weight: 600; color: var(--accent-orange); }

/* ═══════════════════════════════════════════════════════════════
   SECTION 4: PRODUCTS CATALOG & 15-COLUMN TABLE
   ═══════════════════════════════════════════════════════════════ */
/* ═══════════════════════════════════════════════════════════════
   SECTION 4: PRODUCTS CATALOG & STICKY FILTER TOOLBAR
   ═══════════════════════════════════════════════════════════════ */
.catalog-sticky-header-zone {
  position: sticky !important;
  top: 0 !important;
  z-index: 200 !important;
  background: var(--bg-main) !important;
  padding: 4px 0 6px 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  margin-bottom: 8px !important;
}

.quick-signal-filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.btn-quick-signal {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-quick-signal:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #FFF;
}

.btn-quick-signal.active {
  background: #FFF;
  color: #000;
  border-color: #FFF;
  font-weight: 700;
}

.qsf-count {
  display: inline-block;
  margin-left: 4px;
  padding: 0 6px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.12);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.btn-quick-signal.active .qsf-count {
  background: rgba(0, 0, 0, 0.12);
}

body.light-theme .qsf-count {
  background: rgba(15, 23, 42, 0.08);
}

body.light-theme .btn-quick-signal.active .qsf-count {
  background: rgba(255, 255, 255, 0.2);
}

.comm-filter-chip {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  padding: 2px 8px !important;
  cursor: pointer;
}

.input-comm-percent {
  width: 44px;
  height: 22px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 107, 0, 0.45);
  border-radius: 4px;
  color: #F3D37A;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.8rem;
  text-align: center;
  padding: 0 2px;
  outline: none;
  transition: all 0.15s ease;
}

.input-comm-percent:focus {
  background: rgba(0, 0, 0, 0.8);
  border-color: #FF6B00;
  box-shadow: 0 0 8px rgba(255, 107, 0, 0.6);
  color: #FFF;
}

.comm-filter-chip.active .input-comm-percent {
  background: #FFF;
  color: #D4AF37;
  border-color: #D4AF37;
}

.input-comm-percent::-webkit-inner-spin-button,
.input-comm-percent::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.input-comm-percent {
  -moz-appearance: textfield;
}

.catalog-toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 2px;
  flex-wrap: wrap;
}

.search-box-wrap {
  flex: 1;
  min-width: 200px;
  position: relative;
}

.search-box-wrap input {
  width: 100%;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 6px 12px;
  color: #FFF;
  font-size: 0.78rem;
  outline: none;
}

.search-box-wrap input:focus {
  border-color: var(--border-focus);
}

.btn-search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
}

.dropdown-filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.toolbar-select {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #FFF;
  padding: 5px 8px;
  border-radius: var(--radius-md);
  font-size: 0.76rem;
  outline: none;
}

.price-range-filter {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 5px 8px;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.price-range-sep {
  color: var(--text-muted);
}

.input-price-bound {
  width: 64px;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  color: #FFF;
  font-size: 0.76rem;
  outline: none;
  padding: 2px 0;
  font-variant-numeric: tabular-nums;
}

.input-price-bound::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

body.light-theme .price-range-filter {
  background: #FFFFFF !important;
  border-color: #CBD5E1 !important;
  color: #475569 !important;
}

body.light-theme .input-price-bound {
  color: #0D1B2A !important;
  border-bottom-color: #CBD5E1 !important;
}

.stats-counter-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.stats-counter-label b {
  color: #FFF;
}

.selected-highlight {
  color: var(--accent-orange);
}

.link-clear-selection {
  color: var(--text-dim);
  text-decoration: underline;
  cursor: pointer;
}

.link-clear-selection:hover {
  color: #EF4444;
}

/* Button to filter only selected items */
.btn-filter-selected-pill {
  background: rgba(255, 107, 0, 0.15);
  border: 1px solid rgba(255, 107, 0, 0.45);
  color: #FF9E40;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.btn-filter-selected-pill:hover {
  background: rgba(255, 107, 0, 0.3);
  color: #FFF;
  transform: translateY(-1px);
}

.btn-filter-selected-pill.active {
  background: #FF6B00;
  color: #FFF;
  box-shadow: 0 0 10px rgba(255, 107, 0, 0.5);
}

.btn-bar-filter-selected {
  background: rgba(255, 107, 0, 0.22);
  border: 1px solid rgba(255, 107, 0, 0.55);
  color: #FF9E40;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-bar-filter-selected:hover {
  background: rgba(255, 107, 0, 0.4);
  color: #FFF;
  transform: translateY(-1px);
}

.btn-bar-filter-selected.active {
  background: #FF6B00;
  color: #FFF;
  border-color: #FF8800;
  box-shadow: 0 0 12px rgba(255, 107, 0, 0.6);
}

/* View Switcher */
.view-mode-buttons {
  display: flex;
  background: #0f172a;
  padding: 2px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  gap: 2px;
}

.btn-mode {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-mode.active {
  background: #1E3A5A;
  color: #FFF;
}

.btn-export-csv-main {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: #FFF;
  padding: 5px 10px;
  border-radius: var(--radius-md);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.btn-export-csv-main:hover {
  background: rgba(255, 107, 0, 0.15);
  border-color: rgba(255, 107, 0, 0.4);
  color: #FF9E40;
}

/* ═══════════════════════════════════════════════════════════════
   15-COLUMN TABLE VIEW (COMPACT FIT TO 1 SCREEN)
   ═══════════════════════════════════════════════════════════════ */
.table-card-container {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  margin-bottom: 6px;
}

.main-products-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.76rem;
  text-align: left;
  min-width: 1100px;
}

.main-products-table th {
  background: #1e293b;
  padding: 7px 6px;
  color: #94A3B8;
  font-weight: 600;
  font-size: 0.72rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.th-sortable {
  cursor: pointer !important;
  user-select: none;
  transition: all 0.15s ease;
  position: relative;
}

.th-sortable:hover {
  background: #1E3A5A !important;
  color: #FFF !important;
}

.th-sortable.sorted-asc,
.th-sortable.sorted-desc {
  background: rgba(255, 107, 0, 0.15) !important;
  color: #FF9E40 !important;
  border-bottom: 2px solid #FF6B00 !important;
}

.sort-icon {
  display: inline-block;
  margin-left: 2px;
  font-size: 0.65rem;
  opacity: 0.45;
  vertical-align: middle;
}

.th-sortable:hover .sort-icon {
  opacity: 0.9;
}

.th-sortable.sorted-asc .sort-icon,
.th-sortable.sorted-desc .sort-icon {
  opacity: 1;
  color: #FF9E40;
  font-weight: bold;
}

.main-products-table td {
  padding: 4px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
  color: #CBD5E1;
  height: 52px;
}

.main-products-table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.main-products-table tr.selected td {
  background: rgba(255, 107, 0, 0.08);
}

.text-center { text-align: center; }
.text-right { text-align: right; }

.table-thumb-img {
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  min-height: 48px !important;
  max-width: 48px !important;
  max-height: 48px !important;
  border-radius: 6px;
  object-fit: cover;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: block;
  margin: 0 auto;
}

.table-title {
  font-weight: 500;
  color: #F8FAFC;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cat-badge-table {
  font-size: 0.7rem;
  color: #94A3B8;
  white-space: nowrap;
}

.price-val-table {
  color: #F3D37A;
  font-weight: 700;
  font-family: var(--font-heading);
  white-space: nowrap;
}

.comm-val-table {
  color: #FB923C;
  font-weight: 600;
  white-space: nowrap;
}

.sig-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.68rem;
  font-weight: 600;
  white-space: nowrap;
}

.sig-badge-pill.badge-single { background: rgba(148, 163, 184, 0.15); color: #CBD5E1; border: 1px solid rgba(148, 163, 184, 0.25); }
.sig-badge-pill.badge-proven { background: rgba(16, 185, 129, 0.15); color: #34D399; border: 1px solid rgba(16, 185, 129, 0.3); }
.sig-badge-pill.badge-rocket { background: rgba(249, 115, 22, 0.15); color: #FB923C; border: 1px solid rgba(249, 115, 22, 0.35); }
.sig-badge-pill.badge-hidden { background: rgba(168, 85, 247, 0.15); color: #C084FC; border: 1px solid rgba(168, 85, 247, 0.3); }
.sig-badge-pill.badge-rising { background: rgba(59, 130, 246, 0.15); color: #60A5FA; border: 1px solid rgba(59, 130, 246, 0.3); }
.sig-badge-pill.badge-fading { background: rgba(239, 68, 68, 0.15); color: #F87171; border: 1px solid rgba(239, 68, 68, 0.3); }

.table-actions-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.btn-tbl-action {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94A3B8;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
}

.btn-tbl-action:hover {
  background: rgba(255, 107, 0, 0.2);
  border-color: rgba(255, 107, 0, 0.4);
  color: #FFF;
}

/* Pagination Bar */
.pagination-footer-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  margin-bottom: 6px;
  padding: 2px 0;
}

.btn-page-nav {
  background: #1e293b;
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 4px 14px;
  border-radius: var(--radius-md);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-page-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.page-indicator-text {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-family: var(--font-heading);
}

.page-indicator-text b {
  color: #FFF;
}

/* ═══════════════════════════════════════════════════════════════
   GRID VIEW MODE (STRICTLY 2 ROWS - ASPECT RATIO 9:16 - CENTERED)
   ═══════════════════════════════════════════════════════════════ */
.products-grid-container {
  display: grid;
  grid-template-columns: repeat(var(--grid-cols, 7), var(--grid-card-w, 155px));
  grid-template-rows: repeat(2, var(--grid-card-h, 275px));
  justify-content: center !important;
  align-content: start;
  gap: 10px;
  width: 100%;
  margin: 0 auto 6px auto;
}

.product-card {
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  width: var(--grid-card-w, 155px);
  height: var(--grid-card-h, 275px);
  transition: all 0.2s ease;
  position: relative;
}

.product-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 107, 0, 0.45);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
}

.product-card.selected {
  border-color: #FF6B00;
  box-shadow: 0 0 14px rgba(255, 107, 0, 0.35);
  background: rgba(255, 107, 0, 0.04);
}

.product-card-top-thumb {
  position: relative;
  width: 100%;
  height: calc(100% - 90px);
  background: #0B1120;
  overflow: hidden;
}

.grid-card-checkbox {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 5;
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #FF6B00;
}

.grid-card-signal-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 5;
  font-size: 0.65rem;
  padding: 2px 6px;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-card:hover .product-img {
  transform: scale(1.05);
}

.product-card-body {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  height: 90px;
  justify-content: space-between;
}

.product-category-tag {
  font-size: 0.68rem;
  color: #94A3B8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #F8FAFC;
  height: 2.5em;
  line-height: 1.25em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.product-financials {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}

.product-price {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  color: #F3D37A;
}

.product-comm-rate {
  font-size: 0.72rem;
  color: #34D399;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.12);
  padding: 2px 6px;
  border-radius: 4px;
}

.product-comm-rate span {
  color: #94A3B8;
  font-size: 0.66rem;
  font-weight: normal;
}

/* ═══════════════════════════════════════════════════════════════
   LIST VIEW MODE (IMAGE 96PX HEIGHT & DYNAMIC ROW FIT)
   ═══════════════════════════════════════════════════════════════ */
.products-list-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin-bottom: 6px;
}

.list-row {
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.15s ease;
  height: 112px;
  min-height: 112px;
  max-height: 112px;
}

.list-row:hover {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.list-row.selected {
  background: rgba(255, 107, 0, 0.08);
  border-color: rgba(255, 107, 0, 0.4);
}

.list-check-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.list-row-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #FF6B00;
}

.list-thumb-wrap {
  width: 96px !important;
  height: 96px !important;
  min-width: 96px !important;
  min-height: 96px !important;
  max-width: 96px !important;
  max-height: 96px !important;
  border-radius: 8px;
  overflow: hidden;
  background: #0B1120;
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.list-thumb {
  width: 96px !important;
  height: 96px !important;
  object-fit: cover;
  transition: transform 0.2s;
}

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

.list-info {
  flex: 1;
  min-width: 0;
}

.list-title {
  font-weight: 600;
  color: #F8FAFC;
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.list-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.list-meta-tag {
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
}

.list-meta-tag.cat-pill {
  background: rgba(255, 255, 255, 0.06);
  color: #94A3B8;
}

.list-meta-tag.price-pill {
  background: rgba(252, 211, 77, 0.12);
  color: #F3D37A;
  font-weight: 700;
  font-family: var(--font-heading);
}

.list-meta-tag.comm-pill {
  background: rgba(16, 185, 129, 0.12);
  color: #34D399;
  font-weight: 700;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.list-meta-tag.sold-pill {
  background: rgba(96, 165, 250, 0.1);
  color: #93C5FD;
}

.list-spark-wrap {
  flex-shrink: 0;
  width: 70px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.list-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.btn-open-shopee-pill {
  background: rgba(255, 107, 0, 0.12);
  border: 1px solid rgba(255, 107, 0, 0.3);
  color: #FF9E40;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s;
}

.btn-open-shopee-pill:hover {
  background: #FF6B00;
  color: #FFF;
}

/* ═══════════════════════════════════════════════════════════════
   MODAL OVERLAY & POPUP STYLES
   ═══════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1.5rem;
  overflow-y: auto;
  animation: fadeIn 0.15s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

.modal-card-lg {
  max-width: 860px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1.25rem 1.5rem;
  background: #1f2937;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-tag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-orange);
  letter-spacing: 0.5px;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: #FFF;
  margin-top: 2px;
}

.btn-modal-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 4px;
}

.btn-modal-close:hover {
  color: #FFF;
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 1rem 1.5rem;
  background: #1f2937;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn-modal-action {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: #FFF;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
}

.btn-modal-action:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-modal-primary {
  background: var(--accent-orange);
  border-color: var(--accent-orange);
  color: #FFF;
}

.btn-modal-primary:hover {
  background: #B88A17;
}

.modal-footer-nav {
  display: flex;
  gap: 8px;
  margin-right: auto;
}

/* Product Detail Grid */
.product-modal-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.5rem;
}

.modal-thumb-box {
  position: relative;
  aspect-ratio: 1;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.modal-thumb-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-signal-floating {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  color: #FFF;
}

.modal-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 1rem;
}

.m-kpi-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: 8px;
  display: flex;
  flex-direction: column;
}

.m-kpi-lbl {
  font-size: 0.66rem;
  color: var(--text-dim);
  margin-bottom: 2px;
}

.m-kpi-val {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: #FFF;
}

.text-yellow { color: #F3D37A !important; }
.text-orange { color: #FB923C !important; }
.text-green { color: #34D399 !important; }
.text-gold { color: #FBBF24 !important; }
.text-blue { color: #60A5FA !important; }
.text-purple { color: #C084FC !important; }

.modal-ai-brief {
  background: rgba(255, 107, 0, 0.08);
  border: 1px solid rgba(255, 107, 0, 0.25);
  border-radius: var(--radius-md);
  padding: 10px 14px;
}

.brief-title {
  font-size: 0.76rem;
  font-weight: 700;
  color: #FF9E40;
  margin-bottom: 4px;
}

.brief-text {
  font-size: 0.78rem;
  color: #E2E8F0;
  line-height: 1.45;
}

/* Content Tools Workspaces */
.tool-step-pills {
  display: flex;
  gap: 8px;
  margin-bottom: 1.25rem;
}

.tool-step-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.tool-step-btn.active {
  background: var(--accent-orange);
  color: #FFF;
  border-color: var(--accent-orange);
}

.tool-result-box {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #CBD5E1;
  white-space: pre-wrap;
  max-height: 260px;
  overflow-y: auto;
}

/* ═══════════════════════════════════════════════════════════════
   USER PROFILE & SETTINGS MODAL STYLES
   ═══════════════════════════════════════════════════════════════ */
.profile-settings-layout {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.profile-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
}

.profile-avatar-big {
  position: relative;
  width: 56px;
  height: 56px;
  background: #1e293b;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  border: 2px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.profile-tier-badge {
  position: absolute;
  bottom: -4px;
  background: var(--accent-orange);
  color: #FFF;
  font-family: var(--font-heading);
  font-size: 0.6rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: var(--radius-full);
}

.profile-info-main {
  flex: 1;
  min-width: 0;
}

.profile-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.p-name {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: #FFF;
}

.p-status-pill {
  font-size: 0.68rem;
  color: var(--accent-green);
  background: rgba(16, 185, 129, 0.12);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.p-email {
  font-size: 0.76rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.p-tier-banner {
  margin-top: 6px;
  font-size: 0.78rem;
  color: #FBBF24;
}

.settings-sections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
}

.settings-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.s-box-title {
  font-family: var(--font-heading);
  font-size: 0.84rem;
  font-weight: 700;
  color: #FFF;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.s-box-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.s-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.s-row b {
  color: #FFF;
}

.s-token-wrap {
  margin-top: 4px;
}

.token-lbl {
  font-size: 0.72rem;
  color: var(--text-dim);
  display: block;
  margin-bottom: 4px;
}

.token-input-group {
  display: flex;
  gap: 6px;
}

.token-input {
  flex: 1;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #60A5FA;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  outline: none;
}

.btn-copy-token {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #FFF;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.8rem;
}

.settings-select {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #FFF;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  outline: none;
}

.btn-logout-action {
  width: 100%;
  margin-top: 6px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #F87171;
  padding: 8px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-logout-action:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #FFF;
}

/* ═══════════════════════════════════════════════════════════════
   PERMANENT FIXED BOTTOM STATUS BAR & HELP MENU (TALLER & ORANGE GLOW)
   ═══════════════════════════════════════════════════════════════ */
.fixed-bottom-status-bar {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 70px !important;
  background: linear-gradient(180deg, rgba(255, 107, 0, 0.12) 0%, rgba(13, 19, 33, 0.98) 28%, rgba(9, 13, 24, 0.99) 100%) !important;
  backdrop-filter: blur(18px) !important;
  -webkit-backdrop-filter: blur(18px) !important;
  border-top: 1.5px solid rgba(255, 107, 0, 0.5) !important;
  box-shadow: 0 -3px 12px rgba(255, 107, 0, 0.15), 0 -1px 3px rgba(0, 0, 0, 0.7) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0 24px !important;
  z-index: 999999 !important;
  font-family: var(--font-body);
}

.dashboard-layout {
  padding-bottom: 78px;
}

.status-bar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.status-indicator-dot {
  width: 10px;
  height: 10px;
  background: #10B981;
  border-radius: 50%;
  box-shadow: 0 0 10px #10B981;
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.status-brand-label {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.86rem;
  letter-spacing: 0.5px;
  color: #FFF;
  text-shadow: 0 0 10px rgba(255, 107, 0, 0.4);
}

.status-divider {
  color: rgba(255, 255, 255, 0.2);
}

.status-db-info b {
  color: #FF6B00;
}

.status-sync-time b {
  color: #34D399;
}

/* Center Selection Zone */
.status-bar-center {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  margin: 0 16px;
}

.status-selection-idle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: #E2E8F0;
  background: rgba(255, 107, 0, 0.12);
  padding: 6px 18px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 107, 0, 0.35);
  box-shadow: 0 0 12px rgba(255, 107, 0, 0.15);
}

.idle-hint-text b {
  color: #FF6B00;
}

.status-selection-active {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(255, 107, 0, 0.22) 0%, rgba(249, 115, 22, 0.14) 100%);
  border: 1.5px solid rgba(255, 107, 0, 0.6);
  padding: 5px 16px;
  border-radius: var(--radius-full);
  box-shadow: 0 0 14px rgba(255, 107, 0, 0.22);
}

.btn-bar-filter-selected {
  background: rgba(255, 107, 0, 0.15);
  border: 1.5px solid rgba(255, 107, 0, 0.45);
  color: #FFF;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-bar-filter-selected b {
  color: #FF6B00;
  font-size: 0.95rem;
}

.btn-bar-filter-selected:hover {
  background: rgba(255, 107, 0, 0.3);
  border-color: #FF6B00;
  transform: translateY(-1px);
}

.btn-bar-filter-selected.active {
  background: linear-gradient(135deg, #FF6B00 0%, #B88A17 100%);
  border-color: #B88A17;
  color: #FFF;
  box-shadow: 0 0 12px rgba(255, 107, 0, 0.45);
}

.btn-bar-filter-selected.active b {
  color: #FFF;
}

.sel-thumbs-preview {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  max-height: 28px !important;
  overflow: hidden !important;
}

.thumb-mini-circle,
.sel-thumbs-preview img {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  max-width: 28px !important;
  max-height: 28px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  border: 1.5px solid #FF6B00 !important;
  background: #14243A !important;
  display: inline-block !important;
  flex-shrink: 0 !important;
}

.sel-action-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-bar-action {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #E2E8F0;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.btn-bar-action:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #FFF;
  transform: translateY(-1px);
}

.btn-bar-seo:hover { border-color: #3B82F6; color: #60A5FA; }
.btn-bar-prompt:hover { border-color: #8B5CF6; color: #C084FC; }
.btn-bar-clip:hover { border-color: #EC4899; color: #F472B6; }
.btn-bar-post:hover { border-color: #10B981; color: #34D399; }

.btn-bar-export {
  background: linear-gradient(135deg, #FF6B00 0%, #FF8800 100%);
  border: none;
  color: #FFF;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(255, 107, 0, 0.4);
}

.btn-bar-export:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-bar-clear {
  background: none;
  border: none;
  color: #F87171;
  font-size: 0.78rem;
  cursor: pointer;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.btn-bar-clear:hover {
  background: rgba(239, 68, 68, 0.15);
  text-decoration: underline;
}

/* Right HELP & MANUAL Menu Buttons */
.status-bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.btn-bottom-menu {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #CBD5E1;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-bottom-menu:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  color: #FFF;
  transform: translateY(-1px);
}

.btn-menu-manual {
  background: rgba(59, 130, 246, 0.18);
  border-color: rgba(59, 130, 246, 0.45);
  color: #93C5FD;
}

.btn-menu-manual:hover {
  background: rgba(59, 130, 246, 0.32);
  border-color: #3B82F6;
  color: #FFF;
}

.menu-label-bold {
  font-weight: 700;
}

/* Modal Help & Manual Styles */
.modal-card-xl {
  max-width: 880px !important;
  max-height: 85vh;
}

.help-tabs-nav {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
  margin-bottom: 18px;
}

.help-tab-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 7px 16px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.help-tab-btn.active {
  background: #3B82F6;
  border-color: #3B82F6;
  color: #FFF;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.help-pane-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #FFF;
  margin-bottom: 10px;
}

.help-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.help-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.help-feature-card {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
}

.h-card-icon {
  font-size: 1.5rem;
  margin-bottom: 6px;
}

.h-card-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #F8FAFC;
  margin-bottom: 4px;
}

.h-card-desc {
  font-size: 0.76rem;
  color: var(--text-dim);
  line-height: 1.45;
}

.signals-guide-table {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sig-guide-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}

.sig-guide-badge {
  min-width: 150px;
}

.sig-guide-desc {
  font-size: 0.8rem;
  color: #CBD5E1;
  line-height: 1.45;
}

.workflow-steps-vertical {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wf-step-item {
  display: flex;
  gap: 14px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 16px;
}

.wf-num {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #FF6B00 0%, #FF8800 100%);
  color: #FFF;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.95rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wf-content h5 {
  font-size: 0.84rem;
  color: #FFF;
  margin-bottom: 4px;
}

.wf-content p {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 16px;
}

.faq-q {
  font-size: 0.84rem;
  font-weight: 700;
  color: #FF9E40;
  margin-bottom: 4px;
}

.faq-a {
  font-size: 0.78rem;
  color: #CBD5E1;
  line-height: 1.5;
}



/* Toast Container */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: #1e293b;
  color: #FFF;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  font-size: 0.82rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  animation: slideIn 0.2s ease;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@media (max-width: 1024px) {
  .dashboard-sidebar {
    display: none !important;
  }
  .dashboard-main {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 1rem 1rem 80px 1rem !important;
  }
  .product-modal-grid {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════════════════
   SMART TOOLTIPS & HELP CURSOR
   ═══════════════════════════════════════════════════════════════ */
.sig-badge-pill,
.modal-signal-floating,
.grid-card-signal-badge,
.btn-quick-signal,
.sig-pill-btn,
.m-kpi-box,
[data-tooltip] {
  cursor: help !important;
}

.m-kpi-box {
  position: relative;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.m-kpi-box:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 107, 0, 0.4);
  transform: translateY(-1px);
}

.info-dot {
  font-size: 0.68rem;
  opacity: 0.6;
  margin-left: 3px;
  vertical-align: middle;
  transition: opacity 0.15s;
}

.m-kpi-box:hover .info-dot {
  opacity: 1;
}

.custom-angel-tooltip {
  position: fixed;
  z-index: 1000000;
  max-width: 290px;
  background: rgba(11, 17, 32, 0.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 107, 0, 0.45);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.8), 0 0 16px rgba(255, 107, 0, 0.2);
  border-radius: 8px;
  padding: 9px 13px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  font-family: var(--font-body);
}

.custom-angel-tooltip.show {
  opacity: 1;
  transform: translateY(0);
}

.tooltip-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  color: #FF9E40;
  margin-bottom: 4px;
}

.tooltip-body-text {
  font-size: 0.74rem;
  color: #E2E8F0;
  line-height: 1.45;
}

/* ═══════════════════════════════════════════════════════════════
   LIGHT THEME COMPLETE COLOR SYSTEM (HIGH CONTRAST & CLEAR FONTS)
   ═══════════════════════════════════════════════════════════════ */
body.light-theme {
  --bg-main: #F1F5F9;
  --bg-sidebar: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F8FAFC;
  --border-subtle: #E2E8F0;
  --border-focus: #D4AF37;
  
  --text-main: #0D1B2A;
  --text-muted: #475569;
  --text-dim: #64748B;
  
  background-color: #F1F5F9 !important;
  color: #0D1B2A !important;
}

/* Sidebar in Light Mode (Dark Navy Slate matching Image 2) */
body.light-theme .dashboard-sidebar {
  background-color: #0D1B2A !important;
  border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
}

body.light-theme .brand-text h1,
body.light-theme .brand-title {
  color: #FFFFFF !important;
}

body.light-theme .nav-section-title {
  color: #64748B !important;
}

body.light-theme .nav-link,
body.light-theme .sidebar-nav .nav-link,
body.light-theme a.nav-link {
  color: #CBD5E1 !important;
}

body.light-theme .nav-link:hover,
body.light-theme .sidebar-nav .nav-link:hover,
body.light-theme a.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.08) !important;
  color: #FFFFFF !important;
}

body.light-theme .nav-link.active,
body.light-theme .sidebar-nav .nav-link.active,
body.light-theme a.nav-link.active {
  background-color: #B88A17 !important;
  color: #FFFFFF !important;
  font-weight: 700 !important;
}

body.light-theme .user-profile-bottom-card {
  background: #14243A !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

body.light-theme .user-profile-bottom-card:hover {
  background: #1E3A5A !important;
}

body.light-theme .user-name {
  color: #FFFFFF !important;
}

body.light-theme .footer-link,
body.light-theme .btn-theme-toggle {
  color: #94A3B8 !important;
}

body.light-theme .footer-link:hover,
body.light-theme .btn-theme-toggle:hover {
  background-color: rgba(255, 255, 255, 0.08) !important;
  color: #FFFFFF !important;
}

/* Cards & Charts in Light Mode (Exact Classes Matching HTML) */
body.light-theme .ai-strategy-banner {
  background: #F2E9D8 !important;
  border: 1px solid #F3D37A !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

body.light-theme .banner-title {
  color: #B88A17 !important;
  font-weight: 800 !important;
}

body.light-theme .banner-desc {
  color: #475569 !important;
}

body.light-theme .banner-desc b {
  color: #0D1B2A !important;
}

body.light-theme .pill-inline {
  background: #F2E9D8 !important;
  color: #B88A17 !important;
  border: 1px solid #F3D37A !important;
}

/* KPI Cards in Light Mode */
body.light-theme .kpi-card {
  background: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

body.light-theme .kpi-card:hover {
  background: #F8FAFC !important;
  border-color: #CBD5E1 !important;
}

body.light-theme .kpi-card.highlight-purple {
  background: #FAF5FF !important;
  border: 1px solid #E9D5FF !important;
}

body.light-theme .kpi-label {
  color: #475569 !important;
  font-weight: 600 !important;
}

body.light-theme .kpi-number {
  color: #0D1B2A !important;
  font-weight: 800 !important;
}

body.light-theme .kpi-sub {
  color: #64748B !important;
}

body.light-theme .gauge-percent {
  color: #0D1B2A !important;
  font-weight: 800 !important;
}

body.light-theme .donut-bg {
  stroke: #E2E8F0 !important;
}

/* Analytics Cards (Donut & Line Chart) in Light Mode */
body.light-theme .analytics-card {
  background: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

body.light-theme .card-title {
  color: #0D1B2A !important;
  font-weight: 800 !important;
}

body.light-theme .card-sub {
  color: #64748B !important;
}

body.light-theme .cat-legend-item {
  background: #F8FAFC !important;
  border: 1px solid #E2E8F0 !important;
}

body.light-theme .cat-legend-item:hover {
  background: #F1F5F9 !important;
}

body.light-theme .cat-name {
  color: #14243A !important;
  font-weight: 500 !important;
}

body.light-theme .cat-count {
  color: #64748B !important;
}

body.light-theme .sig-pill-btn {
  background: #F8FAFC !important;
  border: 1px solid #CBD5E1 !important;
  color: #1E3A5A !important;
}

body.light-theme .sig-pill-btn:hover {
  background: #F1F5F9 !important;
  color: #0D1B2A !important;
}

body.light-theme .sig-pill-btn.active {
  background: #F2E9D8 !important;
  border-color: #B88A17 !important;
  color: #B88A17 !important;
}

body.light-theme .section-title {
  color: #0D1B2A !important;
}

/* Golden Strategy Cards in Light Mode (High Contrast & Clear Typography) */
body.light-theme .golden-card {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
}

body.light-theme .gold-purple {
  background: linear-gradient(135deg, #FAF5FF 0%, #FFFFFF 100%) !important;
  border: 1px solid #D8B4FE !important;
}

body.light-theme .gold-purple .golden-card-tag {
  color: #7E22CE !important;
  font-weight: 700 !important;
}

body.light-theme .gold-purple .golden-card-title {
  color: #1E1B4B !important;
  font-weight: 800 !important;
}

body.light-theme .gold-purple .golden-card-desc {
  color: #1E3A5A !important;
}

body.light-theme .gold-purple .golden-card-btn {
  color: #7E22CE !important;
  font-weight: 700 !important;
}

body.light-theme .gold-green {
  background: linear-gradient(135deg, #F0FDF4 0%, #FFFFFF 100%) !important;
  border: 1px solid #86EFAC !important;
}

body.light-theme .gold-green .golden-card-tag {
  color: #15803D !important;
  font-weight: 700 !important;
}

body.light-theme .gold-green .golden-card-title {
  color: #064E3B !important;
  font-weight: 800 !important;
}

body.light-theme .gold-green .golden-card-desc {
  color: #1E3A5A !important;
}

body.light-theme .gold-green .golden-card-btn {
  color: #15803D !important;
  font-weight: 700 !important;
}

body.light-theme .gold-orange {
  background: linear-gradient(135deg, #F2E9D8 0%, #FFFFFF 100%) !important;
  border: 1px solid #F3D37A !important;
}

body.light-theme .gold-orange .golden-card-tag {
  color: #C2410C !important;
  font-weight: 700 !important;
}

body.light-theme .gold-orange .golden-card-title {
  color: #431407 !important;
  font-weight: 800 !important;
}

body.light-theme .gold-orange .golden-card-desc {
  color: #1E3A5A !important;
}

body.light-theme .gold-orange .golden-card-btn {
  color: #C2410C !important;
  font-weight: 700 !important;
}

body.light-theme .gold-blue {
  background: linear-gradient(135deg, #EFF6FF 0%, #FFFFFF 100%) !important;
  border: 1px solid #93C5FD !important;
}

body.light-theme .gold-blue .golden-card-tag {
  color: #1D4ED8 !important;
  font-weight: 700 !important;
}

body.light-theme .gold-blue .golden-card-title {
  color: #1E3A8A !important;
  font-weight: 800 !important;
}

body.light-theme .gold-blue .golden-card-desc {
  color: #1E3A5A !important;
}

body.light-theme .gold-blue .golden-card-btn {
  color: #1D4ED8 !important;
  font-weight: 700 !important;
}

body.light-theme .gold-breakout .golden-card-tag {
  color: #B91C1C !important;
  font-weight: 700 !important;
}

body.light-theme .gold-breakout .golden-card-title {
  color: #7F1D1D !important;
  font-weight: 800 !important;
}

body.light-theme .gold-breakout .golden-card-desc {
  color: #1E3A5A !important;
}

body.light-theme .gold-breakout .golden-card-btn {
  color: #B91C1C !important;
  font-weight: 700 !important;
}

/* Toolbar & Filters in Light Mode */
body.light-theme .catalog-sticky-header-zone {
  background: #F1F5F9 !important;
}

body.light-theme .btn-quick-signal {
  background: #FFFFFF !important;
  border-color: #CBD5E1 !important;
  color: #1E3A5A !important;
}

body.light-theme .btn-quick-signal:hover {
  background: #F8FAFC !important;
  color: #0D1B2A !important;
}

body.light-theme .btn-quick-signal.active {
  background: #0D1B2A !important;
  color: #FFFFFF !important;
  border-color: #0D1B2A !important;
}

body.light-theme .comm-filter-chip {
  background: #FFFFFF !important;
  border-color: #CBD5E1 !important;
  color: #1E3A5A !important;
}

body.light-theme .comm-filter-chip.active {
  background: #0D1B2A !important;
  color: #FFFFFF !important;
  border-color: #0D1B2A !important;
}

body.light-theme .input-comm-percent {
  background: #F8FAFC !important;
  border-color: #F59E0B !important;
  color: #B88A17 !important;
}

body.light-theme .search-box-wrap input {
  background: #FFFFFF !important;
  border-color: #CBD5E1 !important;
  color: #0D1B2A !important;
}

body.light-theme .toolbar-select {
  background: #FFFFFF !important;
  border-color: #CBD5E1 !important;
  color: #0D1B2A !important;
}

body.light-theme .stats-counter-label {
  color: #475569 !important;
}

body.light-theme .stats-counter-label b {
  color: #0D1B2A !important;
}

body.light-theme .btn-mode {
  color: #64748B !important;
}

body.light-theme .btn-mode.active {
  background: #B88A17 !important;
  color: #FFFFFF !important;
  border-color: #B88A17 !important;
}

body.light-theme .btn-export-csv-main {
  background: #FFFFFF !important;
  border-color: #CBD5E1 !important;
  color: #0D1B2A !important;
}

body.light-theme .btn-export-csv-main:hover {
  background: #F2E9D8 !important;
  border-color: #B88A17 !important;
  color: #B88A17 !important;
}

/* List View in Light Mode (Matching Image 2 - Soft & Crisp) */
body.light-theme .list-row {
  background: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
  height: 112px !important;
  min-height: 112px !important;
  max-height: 112px !important;
}

body.light-theme .list-row:hover {
  background: #F8FAFC !important;
  border-color: #94A3B8 !important;
}

body.light-theme .list-row:hover .list-title {
  color: #B88A17 !important;
}

body.light-theme .list-row.selected {
  background: #F2E9D8 !important;
  border: 1.5px solid #B88A17 !important;
}

body.light-theme .list-row.selected .list-title {
  color: #0D1B2A !important;
  font-weight: 700 !important;
}

body.light-theme .list-thumb-wrap {
  width: 96px !important;
  height: 96px !important;
  background: #F8FAFC !important;
  border: 1px solid #E2E8F0 !important;
  border-radius: 8px !important;
}

body.light-theme .list-thumb {
  width: 96px !important;
  height: 96px !important;
}

body.light-theme .list-title {
  color: #0D1B2A !important;
  font-weight: 600 !important;
  font-size: 0.88rem !important;
}

body.light-theme .list-cat-tag {
  color: #475569 !important;
  background: #F1F5F9 !important;
  border-color: #E2E8F0 !important;
}

body.light-theme .list-price {
  color: #D4AF37 !important;
  font-weight: 700 !important;
  font-size: 0.95rem !important;
}

body.light-theme .list-comm {
  color: #059669 !important;
  background: #ECFDF5 !important;
  font-weight: 600 !important;
}

body.light-theme .list-sales-badge {
  color: #475569 !important;
  background: #F1F5F9 !important;
  border-color: #E2E8F0 !important;
}

body.light-theme .btn-list-action {
  background: #F1F5F9 !important;
  border-color: #CBD5E1 !important;
  color: #1E3A5A !important;
}

body.light-theme .btn-list-action:hover {
  background: #B88A17 !important;
  color: #FFFFFF !important;
  border-color: #B88A17 !important;
}

/* Table View in Light Mode */
body.light-theme .table-responsive-wrapper {
  background: #FFFFFF !important;
  border-color: #E2E8F0 !important;
}

body.light-theme .main-products-table th {
  background: #F8FAFC !important;
  color: #475569 !important;
  border-bottom: 1px solid #E2E8F0 !important;
}

body.light-theme .th-sortable:hover {
  background: #E2E8F0 !important;
  color: #0D1B2A !important;
}

body.light-theme .th-sortable.sorted-asc,
body.light-theme .th-sortable.sorted-desc {
  background: #F2E9D8 !important;
  color: #C2410C !important;
  border-bottom: 2px solid #B88A17 !important;
}

body.light-theme .main-products-table td {
  background: #FFFFFF !important;
  color: #14243A !important;
  border-bottom: 1px solid #F1F5F9 !important;
}

body.light-theme .main-products-table tr:hover td {
  background: #F8FAFC !important;
}

body.light-theme .main-products-table tr.selected td {
  background: #F2E9D8 !important;
}

body.light-theme .table-title {
  color: #0D1B2A !important;
}

body.light-theme .cat-badge-table {
  color: #64748B !important;
}

body.light-theme .price-val-table {
  color: #B88A17 !important;
}

body.light-theme .comm-val-table {
  color: #047857 !important;
}

body.light-theme .btn-tbl-action {
  background: #F1F5F9 !important;
  border-color: #CBD5E1 !important;
  color: #1E3A5A !important;
}

body.light-theme .btn-tbl-action:hover {
  background: #FF6B00 !important;
  color: #FFFFFF !important;
}

/* Grid View in Light Mode */
body.light-theme .product-card {
  background: #FFFFFF !important;
  border-color: #E2E8F0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
}

body.light-theme .product-card:hover {
  border-color: #D4AF37 !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1) !important;
}

body.light-theme .product-card.selected {
  border-color: #D4AF37 !important;
  background: #F2E9D8 !important;
}

body.light-theme .product-title {
  color: #0D1B2A !important;
}

body.light-theme .product-category-tag {
  color: #64748B !important;
}

body.light-theme .product-price {
  color: #B88A17 !important;
}

body.light-theme .product-comm-rate {
  color: #047857 !important;
  background: #ECFDF5 !important;
}

/* Pagination in Light Mode */
body.light-theme .btn-page-nav {
  background: #FFFFFF !important;
  border-color: #CBD5E1 !important;
  color: #0D1B2A !important;
}

body.light-theme .page-indicator-text {
  color: #475569 !important;
}

body.light-theme .page-indicator-text b {
  color: #0D1B2A !important;
}

/* ═══════════════════════════════════════════════════════════════
   ALL MODALS & POPUPS IN LIGHT THEME (HIGH CONTRAST & CLEAR TYPOGRAPHY)
   ═══════════════════════════════════════════════════════════════ */
body.light-theme .modal-overlay {
  background: rgba(15, 23, 42, 0.6) !important;
  backdrop-filter: blur(4px) !important;
}

body.light-theme .modal-card {
  background: #FFFFFF !important;
  border: 1px solid #CBD5E1 !important;
  color: #0D1B2A !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
}

body.light-theme .modal-header {
  background: #F8FAFC !important;
  border-bottom: 1px solid #E2E8F0 !important;
}

body.light-theme .modal-tag {
  color: #B88A17 !important;
  font-weight: 700 !important;
}

body.light-theme .modal-title {
  color: #0D1B2A !important;
  font-weight: 800 !important;
}

body.light-theme .btn-modal-close {
  color: #64748B !important;
}

body.light-theme .btn-modal-close:hover {
  color: #0D1B2A !important;
  background: #E2E8F0 !important;
  border-radius: 4px;
}

body.light-theme .modal-body {
  background: #FFFFFF !important;
  color: #0D1B2A !important;
}

/* Modal 1: Product Detail Modal */
body.light-theme .m-kpi-box {
  background: #F8FAFC !important;
  border: 1px solid #E2E8F0 !important;
}

body.light-theme .m-kpi-box:hover {
  background: #F1F5F9 !important;
  border-color: #CBD5E1 !important;
}

body.light-theme .m-kpi-lbl {
  color: #64748B !important;
  font-weight: 600 !important;
}

body.light-theme .m-kpi-val {
  color: #0D1B2A !important;
  font-weight: 800 !important;
}

body.light-theme .text-yellow { color: #D4AF37 !important; }
body.light-theme .text-orange { color: #B88A17 !important; }
body.light-theme .text-green { color: #059669 !important; }
body.light-theme .text-gold { color: #D4AF37 !important; }
body.light-theme .text-blue { color: #2563EB !important; }
body.light-theme .text-purple { color: #9333EA !important; }

body.light-theme .modal-ai-brief {
  background: #F2E9D8 !important;
  border: 1px solid #FED7AA !important;
}

body.light-theme .brief-title {
  color: #C2410C !important;
  font-weight: 800 !important;
}

body.light-theme .brief-text {
  color: #1E3A5A !important;
  font-weight: 500 !important;
  line-height: 1.5 !important;
}

body.light-theme .modal-footer {
  background: #F8FAFC !important;
  border-top: 1px solid #E2E8F0 !important;
}

body.light-theme .btn-modal-action {
  background: #FFFFFF !important;
  border: 1px solid #CBD5E1 !important;
  color: #0D1B2A !important;
  font-weight: 600 !important;
}

body.light-theme .btn-modal-action:hover {
  background: #F1F5F9 !important;
  border-color: #94A3B8 !important;
  color: #0D1B2A !important;
}

body.light-theme .btn-modal-primary {
  background: #B88A17 !important;
  border-color: #B88A17 !important;
  color: #FFFFFF !important;
}

body.light-theme .btn-modal-primary:hover {
  background: #C2410C !important;
  color: #FFFFFF !important;
}

/* ═══════════════════════════════════════════════════════════════
   LIGHT THEME MODAL V2 OVERRIDES (DAYLIGHT MODE COMPLETE FIX)
   ═══════════════════════════════════════════════════════════════ */

/* Modal Direct Link Banner */
body.light-theme .modal-direct-link-banner {
  background: #ECFDF5 !important;
  border: 1px solid #A7F3D0 !important;
}
body.light-theme .badge-hash-check {
  background: #D1FAE5 !important;
  color: #065F46 !important;
}
body.light-theme .direct-link-url {
  color: #059669 !important;
  font-weight: 600 !important;
}
body.light-theme .btn-copy-direct-link {
  background: #10B981 !important;
  color: #FFFFFF !important;
}
body.light-theme .btn-copy-direct-link:hover {
  background: #059669 !important;
}

/* Modal Thumbnail Box */
body.light-theme .modal-thumb-box-v2 {
  background: #F1F5F9 !important;
  border: 1px solid #E2E8F0 !important;
}

/* Modal Angel Score Card */
body.light-theme .modal-angel-score-card {
  background: #F8FAFC !important;
  border: 1px solid #E2E8F0 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
}
body.light-theme .angel-score-card-header .score-label {
  color: #0D1B2A !important;
  font-weight: 800 !important;
}
body.light-theme .score-value-big {
  color: #B88A17 !important;
  font-weight: 800 !important;
}
body.light-theme .score-value-big small {
  color: #64748B !important;
}
body.light-theme .score-bar-item .bar-title {
  color: #1E3A5A !important;
  font-weight: 600 !important;
}
body.light-theme .score-bar-item .bar-track {
  background: #E2E8F0 !important;
}
body.light-theme .score-bar-item .bar-num {
  color: #0D1B2A !important;
  font-weight: 700 !important;
}

/* Modal Rank Chart Card */
body.light-theme .modal-rank-chart-card {
  background: #F8FAFC !important;
  border: 1px solid #E2E8F0 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
}
body.light-theme .r-chart-title {
  color: #0D1B2A !important;
  font-weight: 800 !important;
}
body.light-theme .r-chart-top-tag {
  background: #F2E9D8 !important;
  color: #C2410C !important;
  border: 1px solid #F3D37A !important;
}
body.light-theme .rank-chart-subtext {
  color: #C2410C !important;
  font-weight: 700 !important;
}

/* Modal 8 KPI Grid */
body.light-theme .modal-kpi-grid-v2 .m-kpi-card {
  background: #F8FAFC !important;
  border: 1px solid #E2E8F0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}
body.light-theme .modal-kpi-grid-v2 .m-kpi-card:hover {
  background: #FFFFFF !important;
  border-color: #B88A17 !important;
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.12) !important;
}
body.light-theme .modal-kpi-grid-v2 .m-kpi-lbl {
  color: #475569 !important;
  font-weight: 600 !important;
}
body.light-theme .modal-kpi-grid-v2 .m-kpi-val {
  color: #0D1B2A !important;
  font-weight: 800 !important;
}
body.light-theme .modal-kpi-grid-v2 .m-kpi-val.text-yellow { color: #D4AF37 !important; }
body.light-theme .modal-kpi-grid-v2 .m-kpi-val.text-orange { color: #B88A17 !important; }
body.light-theme .modal-kpi-grid-v2 .m-kpi-val.text-green  { color: #059669 !important; }
body.light-theme .modal-kpi-grid-v2 .m-kpi-val.text-gold   { color: #D4AF37 !important; }
body.light-theme .modal-kpi-grid-v2 .m-kpi-val.text-blue   { color: #2563EB !important; }
body.light-theme .modal-kpi-grid-v2 .m-kpi-val.text-purple { color: #9333EA !important; }

/* Modal Formula Note */
body.light-theme .modal-formula-note {
  background: #EFF6FF !important;
  border: 1px solid #BFDBFE !important;
  color: #1E40AF !important;
  font-weight: 600 !important;
}

/* Modal Highlights & Risks Callout Boxes */
body.light-theme .callout-highlights {
  background: #F0FDF4 !important;
  border: 1px solid #86EFAC !important;
  color: #166534 !important;
}
body.light-theme .callout-highlights .c-box-title {
  color: #15803D !important;
  font-weight: 800 !important;
}
body.light-theme .callout-highlights .c-box-list li {
  color: #166534 !important;
  font-weight: 600 !important;
}

body.light-theme .callout-risks {
  background: #F2E9D8 !important;
  border: 1px solid #F3D37A !important;
  color: #B88A17 !important;
}
body.light-theme .callout-risks .c-box-title {
  color: #B88A17 !important;
  font-weight: 800 !important;
}
body.light-theme .callout-risks .c-box-list li {
  color: #B88A17 !important;
  font-weight: 600 !important;
}

/* Modal Header Badges */
body.light-theme .modal-rank-badge {
  background: #F2E9D8 !important;
  color: #C2410C !important;
  border: 1px solid #F3D37A !important;
}
body.light-theme .modal-tag {
  background: #F1F5F9 !important;
  color: #475569 !important;
  border: 1px solid #CBD5E1 !important;
}

/* Velocity Modal Light Theme Overrides */
body.light-theme .velocity-tile {
  background: #F8FAFC !important;
  border: 1px solid #E2E8F0 !important;
}
body.light-theme .velocity-tile-label {
  color: #64748B !important;
}
body.light-theme .velocity-tile-count {
  color: #0D1B2A !important;
}
body.light-theme .velocity-tile-climbing.active { background: #DCFCE7 !important; border-color: #16A34A !important; }
body.light-theme .velocity-tile-climbing.active .velocity-tile-count { color: #16A34A !important; }
body.light-theme .velocity-tile-declining.active { background: #FEE2E2 !important; border-color: #DC2626 !important; }
body.light-theme .velocity-tile-declining.active .velocity-tile-count { color: #DC2626 !important; }
body.light-theme .velocity-tile-stable.active { background: #F1F5F9 !important; border-color: #64748B !important; }
body.light-theme .velocity-tile-stable.active .velocity-tile-count { color: #1E3A5A !important; }

/* Modal 2: Content Tools Modal */
body.light-theme .tool-step-btn {
  background: #F1F5F9 !important;
  border: 1px solid #CBD5E1 !important;
  color: #475569 !important;
}

body.light-theme .tool-step-btn:hover {
  background: #E2E8F0 !important;
  color: #0D1B2A !important;
}

body.light-theme .tool-step-btn.active {
  background: #B88A17 !important;
  color: #FFFFFF !important;
  border-color: #B88A17 !important;
}

body.light-theme .tool-result-box {
  background: #F8FAFC !important;
  border: 1px solid #CBD5E1 !important;
  color: #0D1B2A !important;
}

/* Modal 3: Profile & Settings Modal */
body.light-theme .profile-card-header {
  background: #F8FAFC !important;
  border: 1px solid #E2E8F0 !important;
}

body.light-theme .profile-avatar-big {
  background: #E2E8F0 !important;
  border-color: #CBD5E1 !important;
}

body.light-theme .p-name {
  color: #0D1B2A !important;
}

body.light-theme .p-email {
  color: #64748B !important;
}

body.light-theme .p-email b {
  color: #0D1B2A !important;
}

body.light-theme .p-tier-banner {
  background: #F2E9D8 !important;
  border: 1px solid #FED7AA !important;
  color: #9A3412 !important;
}

body.light-theme .settings-box {
  background: #F8FAFC !important;
  border: 1px solid #E2E8F0 !important;
}

body.light-theme .s-box-title {
  color: #0D1B2A !important;
  font-weight: 700 !important;
}

body.light-theme .s-row span {
  color: #475569 !important;
}

body.light-theme .s-row b {
  color: #0D1B2A !important;
}

body.light-theme .settings-select {
  background: #FFFFFF !important;
  border: 1px solid #CBD5E1 !important;
  color: #0D1B2A !important;
}

body.light-theme .token-input {
  background: #FFFFFF !important;
  border: 1px solid #CBD5E1 !important;
  color: #0D1B2A !important;
}

body.light-theme .btn-copy-token {
  background: #F1F5F9 !important;
  border: 1px solid #CBD5E1 !important;
  color: #0D1B2A !important;
}

body.light-theme .btn-logout-action {
  background: #FEF2F2 !important;
  border: 1px solid #FECACA !important;
  color: #DC2626 !important;
}

/* Modal 4: Help & Manual Modal */
body.light-theme .help-tabs-nav {
  border-bottom: 1px solid #E2E8F0 !important;
}

body.light-theme .help-tab-btn {
  background: #F1F5F9 !important;
  border: 1px solid #CBD5E1 !important;
  color: #475569 !important;
}

body.light-theme .help-tab-btn:hover {
  background: #E2E8F0 !important;
  color: #0D1B2A !important;
}

body.light-theme .help-tab-btn.active {
  background: #2563EB !important;
  color: #FFFFFF !important;
  border-color: #2563EB !important;
}

body.light-theme .help-pane-title {
  color: #0D1B2A !important;
  font-weight: 800 !important;
}

body.light-theme .help-text {
  color: #475569 !important;
}

body.light-theme .help-feature-card {
  background: #F8FAFC !important;
  border: 1px solid #E2E8F0 !important;
}

body.light-theme .h-card-title {
  color: #0D1B2A !important;
  font-weight: 700 !important;
}

body.light-theme .h-card-desc {
  color: #475569 !important;
}

body.light-theme .sig-guide-row {
  background: #F8FAFC !important;
  border: 1px solid #E2E8F0 !important;
}

body.light-theme .sig-guide-desc {
  color: #1E3A5A !important;
}

body.light-theme .sig-guide-desc b {
  color: #0D1B2A !important;
}

body.light-theme .wf-step-item {
  background: #F8FAFC !important;
  border: 1px solid #E2E8F0 !important;
}

body.light-theme .wf-content h5 {
  color: #0D1B2A !important;
  font-weight: 700 !important;
}

body.light-theme .wf-content p {
  color: #475569 !important;
}

body.light-theme .faq-item {
  background: #F8FAFC !important;
  border: 1px solid #E2E8F0 !important;
}

body.light-theme .faq-q {
  color: #C2410C !important;
  font-weight: 700 !important;
}

body.light-theme .faq-a {
  color: #1E3A5A !important;
}

body.light-theme .faq-a b {
  color: #0D1B2A !important;
}

/* ═══════════════════════════════════════════════════════════════
   ADMIN CONTROL PANEL & TIER MATRIX STYLES
   ═══════════════════════════════════════════════════════════════ */
.modal-card-admin {
  max-width: 960px !important;
  max-height: 88vh;
}

.modal-header-admin {
  background: linear-gradient(135deg, #1E1B4B 0%, #0D1B2A 100%);
  border-bottom: 1px solid rgba(255, 107, 0, 0.3);
}

.modal-tag-admin {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #FF9E40;
  letter-spacing: 0.5px;
  background: rgba(255, 107, 0, 0.15);
  border: 1px solid rgba(255, 107, 0, 0.35);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.admin-tabs-nav {
  gap: 8px;
  margin-bottom: 20px;
}

.admin-tab-btn {
  font-size: 0.82rem;
  padding: 8px 18px;
}

.admin-pane-header {
  margin-bottom: 18px;
}

.admin-pane-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #FFF;
  margin-bottom: 4px;
}

.admin-pane-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Tier Matrix Grid */
.tier-matrix-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.tier-config-card {
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tier-card-starter { border-top: 3px solid #94A3B8; }
.tier-card-pro { border-top: 3px solid #3B82F6; background: rgba(59, 130, 246, 0.04); }
.tier-card-founder { border-top: 3px solid #FF6B00; background: rgba(255, 107, 0, 0.05); }

.tier-card-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.tier-badge-pill {
  font-size: 0.84rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  width: fit-content;
}

.badge-starter { background: rgba(148, 163, 184, 0.15); color: #CBD5E1; border: 1px solid #64748B; }
.badge-pro { background: rgba(59, 130, 246, 0.18); color: #93C5FD; border: 1px solid #3B82F6; }
.badge-founder { background: rgba(255, 107, 0, 0.2); color: #FF9E40; border: 1px solid #FF6B00; }

.tier-sub-lbl {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.tier-card-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.config-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.config-field label {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
}

.input-with-unit {
  display: flex;
  align-items: center;
  gap: 8px;
}

.input-with-unit span {
  font-size: 0.76rem;
  color: var(--text-dim);
  white-space: nowrap;
}

.admin-num-input,
.admin-text-input,
.admin-select {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  color: #FFF;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-family: var(--font-heading);
  outline: none;
  width: 100%;
}

.admin-num-input:focus,
.admin-text-input:focus,
.admin-select:focus {
  border-color: #FF6B00;
  box-shadow: 0 0 8px rgba(255, 107, 0, 0.3);
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.18);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  color: #E2E8F0;
}

.admin-toggle-switch {
  appearance: none;
  width: 36px;
  height: 20px;
  background: #1E3A5A;
  border-radius: 99px;
  position: relative;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.admin-toggle-switch::before {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  background: #FFFFFF;
  transition: all 0.2s ease;
}

.admin-toggle-switch:checked {
  background: #10B981;
}

.admin-toggle-switch:checked::before {
  transform: translateX(16px);
}

/* License Generator Box */
.license-create-box {
  background: rgba(255, 107, 0, 0.05);
  border: 1px solid rgba(255, 107, 0, 0.25);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
}

.l-create-row {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1.5fr 1.5fr;
  gap: 12px;
  align-items: flex-end;
}

.l-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.l-input-group label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
}

.btn-admin-primary {
  background: linear-gradient(135deg, #FF6B00 0%, #B88A17 100%);
  border: none;
  color: #FFF;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  height: 35px;
}

.btn-admin-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.admin-table-wrapper {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow-x: auto;
  max-height: 320px;
}

.admin-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.admin-data-table th {
  background: rgba(0, 0, 0, 0.4);
  padding: 10px 14px;
  text-align: left;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border-subtle);
}

.admin-data-table td {
  padding: 10px 14px;
  color: #CBD5E1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.admin-data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.btn-tbl-copy,
.btn-tbl-revoke,
.btn-tbl-del {
  background: none;
  border: 1px solid var(--border-subtle);
  color: #CBD5E1;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  cursor: pointer;
  margin-right: 4px;
  transition: all 0.15s;
}

.btn-tbl-copy:hover { background: #3B82F6; color: #FFF; border-color: #3B82F6; }
.btn-tbl-revoke:hover { background: #EF4444; color: #FFF; border-color: #EF4444; }
.btn-tbl-del:hover { background: #64748B; color: #FFF; border-color: #64748B; }

/* Security Cards Grid */
.security-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.security-feature-card {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 18px;
}

.sec-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sec-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.sec-info {
  flex: 1;
}

.sec-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #FFF;
  margin-bottom: 3px;
}

.sec-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.backup-actions-box {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.btn-admin-action {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: #FFF;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-admin-action:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #FF6B00;
  color: #FF6B00;
}

.modal-footer-admin {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-save-hint {
  font-size: 0.78rem;
  color: #34D399;
}

/* Light Theme overrides for Admin Panel */
body.light-theme .modal-header-admin {
  background: linear-gradient(135deg, #F8FAFC 0%, #FFFFFF 100%) !important;
  border-bottom: 1px solid #E2E8F0 !important;
}

body.light-theme .admin-pane-title {
  color: #0D1B2A !important;
}

body.light-theme .tier-config-card {
  background: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
}

body.light-theme .admin-num-input,
body.light-theme .admin-text-input,
body.light-theme .admin-select {
  background: #F8FAFC !important;
  border: 1px solid #CBD5E1 !important;
  color: #0D1B2A !important;
}

body.light-theme .switch-row {
  background: #F1F5F9 !important;
  color: #0D1B2A !important;
}

body.light-theme .license-create-box {
  background: #F2E9D8 !important;
  border: 1px solid #FED7AA !important;
}

body.light-theme .admin-table-wrapper {
  background: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
}

body.light-theme .admin-data-table th {
  background: #F8FAFC !important;
  color: #475569 !important;
  border-bottom: 1px solid #E2E8F0 !important;
}

body.light-theme .admin-data-table td {
  color: #14243A !important;
  border-bottom: 1px solid #F1F5F9 !important;
}

body.light-theme .security-feature-card {
  background: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
}

body.light-theme .sec-title {
  color: #0D1B2A !important;
}

body.light-theme .sec-desc {
  color: #475569 !important;
}

/* ═══════════════════════════════════════════════════════════════
   PRODUCT DETAIL MODAL V2 (EXACT ORIGINAL DESIGN WITH RANK CHART)
   ═══════════════════════════════════════════════════════════════ */
.modal-header-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.modal-rank-badge {
  background: rgba(255, 107, 0, 0.15);
  color: #FF6B00;
  border: 1px solid rgba(255, 107, 0, 0.3);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 9999px;
}
.modal-direct-link-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}
.banner-left {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}
.badge-hash-check {
  position: relative;
  background: #10B981;
  color: #000;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  cursor: help;
  display: inline-flex;
  align-items: center;
}
.badge-hash-check:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  background: #0D1B2A;
  color: #FFFFFF;
  font-size: 0.76rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 6px;
  white-space: normal;
  width: 290px;
  line-height: 1.45;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  z-index: 9999;
  pointer-events: none;
}
.badge-hash-check:hover::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 2px);
  left: 18px;
  border-width: 6px;
  border-style: solid;
  border-color: #0D1B2A transparent transparent transparent;
  z-index: 9999;
}
.direct-link-url {
  color: #10B981;
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: underline;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.btn-copy-direct-link {
  background: rgba(16, 185, 129, 0.2);
  color: #10B981;
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.btn-copy-direct-link:hover {
  background: #10B981;
  color: #000;
}

.product-modal-grid-v2 {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 18px;
}
@media (max-width: 768px) {
  .product-modal-grid-v2 {
    grid-template-columns: 1fr;
  }
}

.modal-thumb-box-v2 {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #131d31;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  margin-bottom: 14px;
}
.modal-thumb-box-v2 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-angel-score-card {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}
.angel-score-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.score-icon { font-size: 1.1rem; }
.score-label { font-size: 0.85rem; font-weight: 700; color: #F8FAFC; }
.score-value-big {
  margin-left: auto;
  font-size: 1.25rem;
  font-weight: 800;
  color: #FF6B00;
}
.score-value-big small { font-size: 0.75rem; color: #94A3B8; font-weight: 400; }

.score-bars-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.score-bar-item {
  display: grid;
  grid-template-columns: 120px 1fr 28px;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
}
.bar-title { color: #94A3B8; }
.bar-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #FF6B00, #FF8800);
  border-radius: 9999px;
}
.bar-num { text-align: right; color: #F8FAFC; font-weight: 700; }

/* Rank Chart Card */
.modal-rank-chart-card {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 14px;
}
.rank-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.r-chart-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #F8FAFC;
}
.r-chart-top-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: #FF6B00;
  background: rgba(255, 107, 0, 0.15);
  padding: 2px 8px;
  border-radius: 4px;
}
.rank-chart-canvas-wrap {
  position: relative;
  width: 100%;
  height: 110px;
}
.rank-chart-subtext {
  font-size: 0.73rem;
  color: #FF6B00;
  margin-top: 6px;
  text-align: center;
}

/* 8 KPI Grid */
.modal-kpi-grid-v2 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}
@media (max-width: 600px) {
  .modal-kpi-grid-v2 {
    grid-template-columns: repeat(2, 1fr);
  }
}
.m-kpi-card {
  position: relative;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: help;
  transition: border-color 0.2s, background 0.2s;
}
.m-kpi-card:hover {
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(255, 107, 0, 0.5);
}
.m-kpi-card:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #0D1B2A;
  color: #FFFFFF;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 6px;
  white-space: normal;
  width: 190px;
  line-height: 1.35;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.18);
  z-index: 9999;
  pointer-events: none;
  text-align: center;
}
.m-kpi-card:hover::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 1px);
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: #0D1B2A transparent transparent transparent;
  z-index: 9999;
}
.m-kpi-card .m-kpi-lbl {
  font-size: 0.68rem;
  color: #94A3B8;
}
.m-kpi-card .m-kpi-val {
  font-size: 0.92rem;
  font-weight: 700;
}

.modal-formula-note {
  font-size: 0.72rem;
  color: #64748B;
  background: rgba(15, 23, 42, 0.5);
  padding: 6px 10px;
  border-radius: 6px;
  margin-bottom: 12px;
}

/* Highlights & Risks Callouts */
.modal-callouts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 600px) {
  .modal-callouts-grid {
    grid-template-columns: 1fr;
  }
}
.callout-box {
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-size: 0.75rem;
}
.callout-highlights {
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #A7F3D0;
}
.callout-risks {
  background: rgba(245, 158, 11, 0.06);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: #F3D37A;
}
.c-box-title {
  font-weight: 700;
  margin-bottom: 6px;
  font-size: 0.8rem;
}
.c-box-list {
  padding-left: 16px;
}
.c-box-list li {
  margin-bottom: 4px;
  line-height: 1.35;
}


/* ── Rank Velocity & Forecast (วิเคราะห์แนวโน้ม) ── */
.velocity-tiles-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.velocity-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: all 0.15s ease;
}

.velocity-tile-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.velocity-tile-count {
  font-size: 1.5rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #FFF;
}

.velocity-tile-climbing.active { background: rgba(34, 197, 94, 0.15); border-color: #22C55E; }
.velocity-tile-climbing.active .velocity-tile-count { color: #22C55E; }
.velocity-tile-declining.active { background: rgba(239, 68, 68, 0.15); border-color: #EF4444; }
.velocity-tile-declining.active .velocity-tile-count { color: #EF4444; }
.velocity-tile-stable.active { background: rgba(148, 163, 184, 0.15); border-color: #94A3B8; }
.velocity-tile-stable.active .velocity-tile-count { color: #94A3B8; }

.velocity-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

/* ⚠️ 2026-08-25 — เจอจริง: velocityModal ไม่มี override ความสูงเหมือน breakoutModal เลย ใช้ .modal-card
   default (max-height: 90vh) เฉยๆ ทำให้เหลือพื้นที่ว่างด้านล่างระหว่างลิสต์กับ footer แล้ว .velocity-list
   (max-height: 55vh ตายตัวด้านบน) ต้อง scroll สั้นกว่าที่ควร — ใช้ pattern เดียวกับ #breakoutModal */
#velocityModal .modal-card {
  height: calc(100vh - 10px - 70px - 10px);
  max-height: none !important;
  margin-top: 0;
}

#velocityModal .modal-body {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#velocityModal #velocityContent {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.velocity-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}

.velocity-row-spark {
  flex-shrink: 0;
  width: 70px;
  height: 36px;
}

.velocity-row-info {
  flex: 1;
  min-width: 0;
}

.velocity-row-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #F8FAFC;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.velocity-row-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.velocity-row-rate {
  flex-shrink: 0;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.velocity-row-rate.climbing { color: #22C55E; }
.velocity-row-rate.declining { color: #EF4444; }
.velocity-row-rate.stable { color: #94A3B8; }

body.light-theme .velocity-tile {
  background: #FFFFFF !important;
  border-color: #E2E8F0 !important;
}

body.light-theme .velocity-tile-label {
  color: #475569 !important;
}

body.light-theme .velocity-tile-count {
  color: #0D1B2A !important;
}

body.light-theme .velocity-row {
  background: #FFFFFF !important;
  border-color: #E2E8F0 !important;
}

body.light-theme .velocity-row-title {
  color: #0D1B2A !important;
}

/* ═══════════════════════════════════════════════════════════════
   CYBER RADAR LOADING SPLASH SCREEN (ANIMATION & STYLING)
   ═══════════════════════════════════════════════════════════════ */
.radar-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at center, rgba(19, 27, 46, 0.98) 0%, rgba(11, 15, 25, 0.99) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.5s;
}

.radar-loading-overlay.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.radar-loading-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 440px;
  width: 90%;
  padding: 36px 28px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 107, 0, 0.35);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(255, 107, 0, 0.15);
  animation: radarCardEntrance 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes radarCardEntrance {
  0% { transform: scale(0.9) translateY(20px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

/* 3D Neon Radar Disc */
.radar-scanner-circle {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  position: relative;
  background: radial-gradient(circle, rgba(255, 107, 0, 0.1) 0%, rgba(15, 23, 42, 0.8) 70%);
  border: 2px solid rgba(255, 107, 0, 0.5);
  box-shadow: 0 0 25px rgba(255, 107, 0, 0.3), inset 0 0 20px rgba(255, 107, 0, 0.2);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Rotating Sweep Beam */
.radar-sweep-beam {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(255, 107, 0, 0) 0deg, rgba(255, 107, 0, 0.1) 270deg, rgba(255, 107, 0, 0.7) 360deg);
  animation: radarSweepAnim 2s linear infinite;
  z-index: 1;
}

@keyframes radarSweepAnim {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Pulse Ripple Rings */
.radar-ripple-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(255, 107, 0, 0.3);
  pointer-events: none;
}
.radar-ripple-ring.ring-1 { width: 40px; height: 40px; }
.radar-ripple-ring.ring-2 { width: 80px; height: 80px; }
.radar-ripple-ring.ring-3 { width: 116px; height: 116px; }

/* Radar Blips */
.radar-blip {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  z-index: 2;
  animation: radarBlipPulse 2s infinite ease-in-out;
}
.radar-blip.blip-1 { top: 28px; left: 38px; background: #10B981; box-shadow: 0 0 8px #10B981; animation-delay: 0.3s; }
.radar-blip.blip-2 { bottom: 32px; right: 28px; background: #FF6B00; box-shadow: 0 0 8px #FF6B00; animation-delay: 1s; }
.radar-blip.blip-3 { top: 40px; right: 35px; background: #8B5CF6; box-shadow: 0 0 8px #8B5CF6; animation-delay: 1.5s; }

@keyframes radarBlipPulse {
  0%, 100% { opacity: 0.2; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.4); }
}

.radar-center-core {
  font-size: 1.6rem;
  z-index: 3;
  filter: drop-shadow(0 0 10px rgba(255, 107, 0, 0.8));
  animation: corePulse 2s ease-in-out infinite alternate;
}

@keyframes corePulse {
  0% { transform: scale(0.95); }
  100% { transform: scale(1.1); }
}

/* Info & Status Text */
.radar-loading-info {
  width: 100%;
}

.radar-loading-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 900;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.radar-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 107, 0, 0.12);
  border: 1px solid rgba(255, 107, 0, 0.3);
  padding: 5px 14px;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #FF6B00;
  margin-bottom: 8px;
  transition: all 0.3s ease;
}

.pulse-radar-dot {
  width: 8px;
  height: 8px;
  background-color: #FF6B00;
  border-radius: 50%;
  box-shadow: 0 0 8px #FF6B00;
  animation: pulseDot 1.2s infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(0.8); opacity: 0.6; }
  50% { transform: scale(1.3); opacity: 1; }
}

.radar-loading-subtitle {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}

/* Progress Track & Bar */
.radar-progress-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
  margin-bottom: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.radar-progress-bar {
  width: 15%;
  height: 100%;
  background: linear-gradient(90deg, #FF6B00 0%, #FF8800 50%, #F59E0B 100%);
  border-radius: 9999px;
  box-shadow: 0 0 14px rgba(255, 107, 0, 0.6);
  transition: width 0.3s ease;
  position: relative;
}

.radar-progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: shimmerProgress 1.5s infinite;
}

@keyframes shimmerProgress {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.radar-progress-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-dim);
  font-family: var(--font-code);
}

/* ════════════════════════════════════════════════════════════════
   BREAKOUT CANDIDATE RADAR — Card, Modal, List Styles
   ════════════════════════════════════════════════════════════════ */

/* Breakout Modal — ชิดขอบบน ไม่มี outer scroll bar */
#breakoutModal {
  align-items: flex-start;
  padding: 10px 1.5rem 0;        /* 10px ชิดบน, ไม่มี padding ล่าง */
}

#breakoutModal .modal-card {
  /* ความสูง = viewport - 10px (บน) - 70px (bottom bar) - 10px (ช่องว่างล่าง) */
  height: calc(100vh - 10px - 70px - 10px);
  max-height: none !important;
  margin-top: 0;
}

#breakoutModal .modal-body {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  gap: 0;
}

.gold-breakout {
  background: linear-gradient(135deg, rgba(239,68,68,0.12) 0%, rgba(255,107,0,0.10) 50%, rgba(251,191,36,0.08) 100%);
  border: 1px solid rgba(239,68,68,0.35);
  position: relative;
  overflow: hidden;
}
.gold-breakout::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 200px; height: 100%;
  background: linear-gradient(135deg, transparent, rgba(239,68,68,0.06));
  pointer-events: none;
}
.gold-breakout:hover { border-color: rgba(239,68,68,0.7); box-shadow: 0 8px 32px rgba(239,68,68,0.18); }
.gold-breakout .golden-card-tag { color: #F87171; }
.gold-breakout .golden-card-btn { background: rgba(239,68,68,0.15); border-color: rgba(239,68,68,0.4); color: #F87171; }
.gold-breakout:hover .golden-card-btn { background: rgba(239,68,68,0.28); }

.breakout-live-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #F87171;
  background: rgba(239,68,68,0.15);
  border: 1px solid rgba(239,68,68,0.35);
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
  animation: breakout-pulse 2.5s ease-in-out infinite;
}
@keyframes breakout-pulse { 0%,100%{opacity:1} 50%{opacity:0.6} }

.breakout-legend-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.breakout-legend-item { display: flex; align-items: center; gap: 6px; }

.breakout-grade {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 900;
  flex-shrink: 0;
}
.grade-s { background: rgba(239,68,68,0.2);  color: #EF4444; border: 1px solid rgba(239,68,68,0.4); }
.grade-a { background: rgba(255,107,0,0.18); color: #FF6B00; border: 1px solid rgba(255,107,0,0.4); }
.grade-b { background: rgba(251,191,36,0.18);color: #FBBF24; border: 1px solid rgba(251,191,36,0.4); }
.grade-c { background: rgba(148,163,184,0.12);color: #94A3B8; border: 1px solid rgba(148,163,184,0.3); }

.breakout-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
@media (max-width: 600px) { .breakout-stats-row { grid-template-columns: repeat(2, 1fr); } }
.breakout-stat-tile { background: rgba(255,255,255,0.04); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 10px 12px; text-align: center; }
.breakout-stat-label { font-size: 0.72rem; color: var(--text-muted); font-weight: 600; margin-bottom: 4px; }
.breakout-stat-count { font-size: 1.6rem; font-weight: 800; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.breakout-stat-count.text-red    { color: #EF4444; }
.breakout-stat-count.text-orange { color: #FF6B00; }
.breakout-stat-count.text-yellow { color: #FBBF24; }

.breakout-list { display: flex; flex-direction: column; gap: 8px; flex: 1; overflow-y: auto; overflow-x: hidden; padding-right: 4px; min-height: 0; }

.breakout-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  transition: border-color 0.15s, background 0.15s;
}
.breakout-row:hover { border-color: rgba(239,68,68,0.4); background: rgba(239,68,68,0.05); }
.breakout-rank-num { font-size: 0.75rem; font-weight: 700; color: var(--text-muted); min-width: 28px; text-align: right; }
.breakout-score-badge { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; font-weight: 900; flex-shrink: 0; }
.breakout-info { flex: 1; min-width: 0; }
.breakout-name { font-size: 0.82rem; font-weight: 700; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px; }
.breakout-meta { display: flex; gap: 5px; flex-wrap: wrap; }
.breakout-meta-chip { font-size: 0.68rem; font-weight: 600; color: var(--text-muted); background: rgba(255,255,255,0.06); padding: 1px 7px; border-radius: 4px; }
.breakout-scores-col { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; min-width: 90px; }
.breakout-total-score { font-size: 1.3rem; font-weight: 900; line-height: 1; }
.breakout-total-score small { font-size: 0.7rem; font-weight: 600; color: var(--text-muted); }
.breakout-sub-scores { display: flex; gap: 6px; font-size: 0.68rem; font-weight: 700; color: var(--text-muted); }
.breakout-accel-text { font-size: 0.68rem; font-weight: 600; color: var(--text-muted); text-align: right; }
.breakout-btn-detail { flex-shrink: 0; font-size: 0.72rem; font-weight: 700; color: #FF6B00; background: rgba(255,107,0,0.1); border: 1px solid rgba(255,107,0,0.3); border-radius: 6px; padding: 5px 10px; cursor: pointer; transition: all 0.15s; white-space: nowrap; }
.breakout-btn-detail:hover { background: rgba(255,107,0,0.22); border-color: #FF6B00; }

/* Light Theme Overrides */
body.light-theme .gold-breakout { background: linear-gradient(135deg, rgba(239,68,68,0.06) 0%, rgba(255,107,0,0.05) 100%) !important; border-color: rgba(239,68,68,0.3) !important; }
body.light-theme .breakout-live-badge { color: #DC2626 !important; background: #FEF2F2 !important; border-color: #FECACA !important; }
body.light-theme .breakout-legend-row { background: #F8FAFC !important; border-color: #E2E8F0 !important; color: #475569 !important; }
body.light-theme .breakout-stat-tile { background: #F8FAFC !important; border-color: #E2E8F0 !important; }
body.light-theme .breakout-stat-count { color: #0D1B2A !important; }
body.light-theme .breakout-stat-count.text-red    { color: #DC2626 !important; }
body.light-theme .breakout-stat-count.text-orange { color: #B88A17 !important; }
body.light-theme .breakout-stat-count.text-yellow { color: #D4AF37 !important; }
body.light-theme .breakout-row { background: #FFFFFF !important; border-color: #E2E8F0 !important; }
body.light-theme .breakout-row:hover { background: #FEF2F2 !important; border-color: rgba(239,68,68,0.5) !important; }
body.light-theme .breakout-name { color: #0D1B2A !important; }
body.light-theme .breakout-meta-chip { background: #F1F5F9 !important; color: #475569 !important; }
body.light-theme .breakout-sub-scores { color: #64748B !important; }
body.light-theme .breakout-accel-text { color: #64748B !important; }
body.light-theme .breakout-btn-detail { color: #B88A17 !important; background: #F2E9D8 !important; border-color: #F3D37A !important; }
body.light-theme .breakout-btn-detail:hover { background: #F2E9D8 !important; border-color: #B88A17 !important; }

/* ── Breakout Footer Grade Toggle Buttons ── */
.breakout-footer {
  justify-content: space-between !important;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.breakout-grade-toggles {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.breakout-grade-toggle-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}

.btn-grade-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
  user-select: none;
}

/* Grade A — Orange */
.grade-a-toggle {
  color: #FF6B00;
  background: rgba(255,107,0,0.08);
  border-color: rgba(255,107,0,0.3);
}
.grade-a-toggle:hover { background: rgba(255,107,0,0.16); border-color: rgba(255,107,0,0.5); }
.grade-a-toggle.active {
  background: rgba(255,107,0,0.22);
  border-color: #FF6B00;
  box-shadow: 0 0 0 2px rgba(255,107,0,0.2);
}

/* Grade B — Yellow */
.grade-b-toggle {
  color: #FBBF24;
  background: rgba(251,191,36,0.08);
  border-color: rgba(251,191,36,0.3);
}
.grade-b-toggle:hover { background: rgba(251,191,36,0.16); border-color: rgba(251,191,36,0.5); }
.grade-b-toggle.active {
  background: rgba(251,191,36,0.22);
  border-color: #FBBF24;
  box-shadow: 0 0 0 2px rgba(251,191,36,0.2);
}

/* Grade C — Gray */
.grade-c-toggle {
  color: #94A3B8;
  background: rgba(148,163,184,0.08);
  border-color: rgba(148,163,184,0.25);
}
.grade-c-toggle:hover { background: rgba(148,163,184,0.14); border-color: rgba(148,163,184,0.45); }
.grade-c-toggle.active {
  background: rgba(148,163,184,0.2);
  border-color: #94A3B8;
  box-shadow: 0 0 0 2px rgba(148,163,184,0.18);
}

/* Count badge inside toggle button */
.btn-grade-toggle-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: rgba(255,255,255,0.1);
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 800;
}
.grade-a-toggle .btn-grade-toggle-count { background: rgba(255,107,0,0.18); }
.grade-b-toggle .btn-grade-toggle-count { background: rgba(251,191,36,0.18); }
.grade-c-toggle .btn-grade-toggle-count { background: rgba(148,163,184,0.15); }

/* Hint text: "✓ เลือกไว้ N รายการ" */
.breakout-selected-hint {
  font-size: 0.72rem;
  font-weight: 700;
  color: #22C55E;
  white-space: nowrap;
  min-width: 0;
}

/* Light Theme */
body.light-theme .breakout-footer { background: #F8FAFC !important; border-color: #E2E8F0 !important; }
body.light-theme .grade-a-toggle { color: #B88A17; background: #F2E9D8; border-color: #F3D37A; }
body.light-theme .grade-a-toggle.active { background: #F2E9D8; border-color: #B88A17; }
body.light-theme .grade-b-toggle { color: #D4AF37; background: #F2E9D8; border-color: #F3D37A; }
body.light-theme .grade-b-toggle.active { background: #F2E9D8; border-color: #D4AF37; }
body.light-theme .grade-c-toggle { color: #475569; background: #F1F5F9; border-color: #CBD5E1; }
body.light-theme .grade-c-toggle.active { background: #E2E8F0; border-color: #64748B; }

/* ════════════════════════════════════════════════════════════════
   PRODUCT DETAIL MODAL — ชิดขอบบน 10px, เหนือ bottom bar 10px
   bottom bar height = 70px → total bottom offset = 70 + 10 = 80px
   ════════════════════════════════════════════════════════════════ */
#productDetailModal {
  align-items: flex-start;
  padding: 10px 1.5rem 0;
}

#productDetailModal .modal-card {
  /* top=10px + bottom bar 70px + gap 10px = 90px total */
  height: calc(100vh - 10px - 70px - 10px);
  max-height: none !important;
  margin-top: 0;
}

#productDetailModal .modal-body {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

/* ════════════════════════════════════════════════════════════════
   USER PROFILE & SETTINGS MODAL — top 10px, bottom 10px above bar
   ════════════════════════════════════════════════════════════════ */
#userProfileModal {
  align-items: flex-start;
  padding: 10px 1.5rem 0;
}

#userProfileModal .modal-card {
  /* top 10px + bottom bar 70px + gap 10px = 90px */
  height: calc(100vh - 90px);
  max-height: none !important;
  margin-top: 0;
}

#userProfileModal .modal-body {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}






/* ── Signal Trend Analysis Box ────────────────────────────────── */
.signal-trend-analysis {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 10px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  animation: fadeIn 0.2s ease;
}
.trend-direction-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid;
  text-align: center;
  flex-shrink: 0;
}
.trend-emoji { font-size: 1.4rem; line-height: 1; }
.trend-label { font-size: 0.68rem; font-weight: 800; margin-top: 4px; letter-spacing: 0.3px; }
.trend-body { flex: 1; min-width: 0; }
.trend-cat-label { font-size: 0.68rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.trend-text { font-size: 0.8rem; font-weight: 500; color: var(--text-secondary); line-height: 1.5; margin-bottom: 6px; }
.trend-ratios { display: flex; align-items: center; gap: 8px; font-size: 0.72rem; font-weight: 700; }
body.light-theme .signal-trend-analysis { background: #F8FAFC !important; border-color: #E2E8F0 !important; }
body.light-theme .trend-text { color: #1E3A5A !important; }
body.light-theme .trend-cat-label { color: #64748B !important; }
