/**
 * BADR Analyser - Helium 10 Mobile Suite
 * Re-engineered from official Helium 10 Android APK
 */

@font-face {
  font-family: 'Nunito Sans';
  src: url('./fonts/NunitoSans_400Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: 'Nunito Sans';
  src: url('./fonts/NunitoSans_600SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
}
@font-face {
  font-family: 'Nunito Sans';
  src: url('./fonts/NunitoSans_700Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
}
@font-face {
  font-family: 'Nunito Sans';
  src: url('./fonts/NunitoSans_800ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-style: normal;
}

:root {
  /* Helium 10 Signature Color Palette (Reverse-Engineered from APK) */
  --h10-canvas: #0e141b;
  --h10-sidebar: #141c24;
  --h10-sidebar-border: #1f2b37;
  --h10-card: #19232e;
  --h10-card-subtle: #151d27;
  --h10-card-hover: #1f2c3a;
  --h10-input-bg: #121921;
  --h10-border: #263545;
  --h10-border-subtle: #1e2a38;
  --h10-border-hover: #374a5e;
  
  /* Primary Action Colors (Helium 10 Royal Electric Blue #0A6FE8) */
  --h10-primary: #0a6fe8;
  --h10-primary-hover: #0281ff;
  --h10-primary-active: #005bc7;
  --h10-primary-glow: rgba(10, 111, 232, 0.25);
  --h10-primary-light: rgba(10, 111, 232, 0.12);
  
  /* Status & Metric Accents */
  --h10-green: #33cc99;
  --h10-green-subtle: rgba(51, 204, 153, 0.12);
  --h10-green-border: rgba(51, 204, 153, 0.3);
  --h10-amber: #f59e0b;
  --h10-amber-subtle: rgba(245, 158, 11, 0.12);
  --h10-cyan: #10a3b1;
  --h10-cyan-subtle: rgba(16, 163, 177, 0.12);
  --h10-rose: #fc5a5a;
  --h10-rose-subtle: rgba(252, 90, 90, 0.12);
  
  /* Typography Colors */
  --text-main: #ffffff;
  --text-secondary: #9bb0c4;
  --text-dim: #60758a;
  --text-disabled: #415264;
  
  /* Fonts: Official Helium 10 Nunito Sans */
  --font-main: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Inter', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Menlo, Monaco, Consolas, monospace;
  
  /* Radii & Shadows */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;
  
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-float: 0 8px 24px rgba(0, 0, 0, 0.45);
}

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

html, body {
  height: 100%;
}

body {
  font-family: var(--font-main);
  background-color: var(--h10-canvas);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* App Shell Layout */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* ==========================================================================
   SIDEBAR NAVIGATION (Helium 10 Suite Sidebar)
   ========================================================================== */
.sidebar {
  width: 260px;
  background: var(--h10-sidebar);
  border-right: 1px solid var(--h10-sidebar-border);
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  flex-shrink: 0;
  z-index: 20;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px 18px 8px;
  border-bottom: 1px solid var(--h10-border-subtle);
  margin-bottom: 16px;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 14px rgba(10, 111, 232, 0.35);
  flex-shrink: 0;
  padding: 3px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-details {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #fff;
  line-height: 1.2;
}

.brand-tag {
  font-size: 0.68rem;
  color: var(--h10-cyan);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  width: 100%;
  text-align: left;
}

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

.nav-item.active {
  background: rgba(10, 111, 232, 0.16);
  border-color: rgba(10, 111, 232, 0.4);
  color: #fff;
  font-weight: 700;
}

.nav-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  transition: color 0.15s ease;
  flex-shrink: 0;
}

.nav-item:hover .nav-icon {
  color: #fff;
}

.nav-item.active .nav-icon {
  color: var(--h10-primary);
}

.badge {
  margin-left: auto;
  font-size: 0.65rem;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-dim);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge.live {
  background: var(--h10-green-subtle);
  color: var(--h10-green);
  border: 1px solid var(--h10-green-border);
}

/* Marketplace Selector Footer */
.marketplace-card {
  margin-top: auto;
  padding: 14px;
  background: var(--h10-card-subtle);
  border: 1px solid var(--h10-border);
  border-radius: var(--radius-md);
}

.market-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  color: var(--text-dim);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--h10-green);
  box-shadow: 0 0 8px var(--h10-green);
  display: inline-block;
  animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
  0%, 100% { opacity: 0.9; transform: scale(0.95); }
  50% { opacity: 1; transform: scale(1.15); }
}

.market-select {
  width: 100%;
  padding: 8px 10px;
  background: var(--h10-canvas);
  border: 1px solid var(--h10-border);
  border-radius: var(--radius-xs);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 8px;
  outline: none;
  cursor: pointer;
}

.market-select:focus {
  border-color: var(--h10-primary);
}

.market-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-dim);
}

.market-stats strong {
  color: var(--text-secondary);
}

/* ==========================================================================
   MAIN CONTENT & HEADER
   ========================================================================== */
.main-content {
  flex: 1;
  padding: 24px 32px 48px 32px;
  overflow-y: auto;
  min-width: 0;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--h10-border-subtle);
  gap: 20px;
}

.page-title-area h2 {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: #fff;
}

.page-title-area p {
  color: var(--text-secondary);
  font-size: 0.84rem;
  margin-top: 3px;
}

.action-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* ==========================================================================
   BUTTONS (Helium 10 Style)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  outline: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--h10-primary);
  color: #fff;
  border-color: var(--h10-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.btn-primary:hover {
  background: var(--h10-primary-hover);
  border-color: var(--h10-primary-hover);
  box-shadow: 0 0 12px var(--h10-primary-glow);
}

.btn-primary:active {
  background: var(--h10-primary-active);
}

.btn-secondary {
  background: var(--h10-card);
  color: var(--text-main);
  border: 1px solid var(--h10-border);
}

.btn-secondary:hover {
  background: var(--h10-card-hover);
  border-color: var(--h10-border-hover);
  color: #fff;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 0.75rem;
}

.btn-block {
  width: 100%;
}

/* ==========================================================================
   CARDS & FILTER PANELS (Helium 10 Exact Replica)
   ========================================================================== */
.glass-card {
  background: var(--h10-card);
  border: 1px solid var(--h10-border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--h10-border-subtle);
  flex-wrap: wrap;
  gap: 12px;
}

.panel-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.preset-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.preset-btn {
  background: var(--h10-card-subtle);
  border: 1px solid var(--h10-border);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 4px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.preset-btn:hover {
  background: rgba(10, 111, 232, 0.15);
  border-color: var(--h10-primary);
  color: #fff;
}

.preset-btn.preset-reset {
  border-color: rgba(244, 63, 94, 0.35);
  color: var(--h10-rose);
}

.preset-btn.preset-reset:hover {
  background: var(--h10-rose-subtle);
  border-color: var(--h10-rose);
}

/* 4-Column Aligned Filter Grid */
.filter-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  align-items: end;
}

@media (max-width: 1280px) {
  .filter-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .filter-grid {
    grid-template-columns: 1fr;
  }
}

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

.form-group label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Embedded Affix Inputs (Helium 10 Style) */
.input-with-affix {
  display: flex;
  align-items: center;
  background: var(--h10-input-bg);
  border: 1px solid var(--h10-border);
  border-radius: var(--radius-xs);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  overflow: hidden;
  height: 38px;
}

.input-with-affix:focus-within {
  border-color: var(--h10-primary);
  box-shadow: 0 0 0 1px var(--h10-primary);
}

.input-affix {
  padding: 0 10px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-dim);
  user-select: none;
  background: rgba(255, 255, 255, 0.02);
  border-right: 1px solid var(--h10-border-subtle);
  height: 100%;
  display: flex;
  align-items: center;
}

.input-with-affix .form-control {
  border: none;
  background: transparent;
  padding: 8px 10px;
  height: 100%;
  box-shadow: none;
}

.input-with-affix .form-control:focus {
  box-shadow: none;
  border: none;
}

.dual-range-group {
  display: flex;
  align-items: center;
  background: var(--h10-input-bg);
  border: 1px solid var(--h10-border);
  border-radius: var(--radius-xs);
  height: 38px;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dual-range-group:focus-within {
  border-color: var(--h10-primary);
  box-shadow: 0 0 0 1px var(--h10-primary);
}

.dual-range-group .form-control {
  border: none;
  background: transparent;
  padding: 8px 8px;
  height: 100%;
  box-shadow: none;
  min-width: 0;
  flex: 1;
}

.dual-range-group .form-control:focus {
  box-shadow: none;
  border: none;
}

.range-separator {
  color: var(--text-dim);
  font-size: 0.72rem;
  padding: 0 6px;
  user-select: none;
}

/* Standalone Form Controls */
.form-control {
  width: 100%;
  height: 38px;
  padding: 8px 12px;
  background: var(--h10-input-bg);
  border: 1px solid var(--h10-border);
  border-radius: var(--radius-xs);
  color: #fff;
  font-size: 0.84rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
  border-color: var(--h10-primary);
  box-shadow: 0 0 0 1px var(--h10-primary);
}

.form-control.large {
  height: 46px;
  font-size: 0.95rem;
  padding: 10px 16px;
}

select.form-control {
  cursor: pointer;
}

/* ==========================================================================
   METRIC CARDS (ZERO OVERFLOW GUARANTEE)
   ========================================================================== */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}

@media (max-width: 900px) {
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 10px;
  }
}

.metric-card {
  background: #151e29;
  border: 1px solid #243447;
  border-radius: var(--radius-sm);
  padding: 8px 12px 8px 14px;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  position: relative;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.metric-card:hover {
  border-color: var(--h10-border-hover);
}

/* Left Accent Indicator Lines */
.metric-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--h10-border);
}

.metric-card.accent-blue::before { background: #38bdf8; }
.metric-card.accent-green::before { background: #34d399; }
.metric-card.accent-amber::before { background: #fbbf24; }
.metric-card.accent-cyan::before { background: #22d3ee; }

.metric-label {
  font-size: 0.7rem;
  color: #cbd5e1;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.metric-value {
  font-size: clamp(1.1rem, 3.8vw, 1.4rem);
  font-weight: 800;
  font-family: var(--font-mono);
  color: #ffffff;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  margin-bottom: 2px;
}

.metric-card.accent-blue .metric-value { color: #38bdf8; }
.metric-card.accent-green .metric-value { color: #34d399; }
.metric-card.accent-amber .metric-value { color: #fbbf24; }
.metric-card.accent-cyan .metric-value { color: #22d3ee; }

.metric-sub {
  font-size: 0.68rem;
  color: #94a3b8;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   RESULTS CARD & HIGH-DENSITY DATA TABLE (Helium 10 Grid)
   ========================================================================== */
.results-card {
  background: var(--h10-card);
  border: 1px solid var(--h10-border);
  border-radius: var(--radius-md);
  padding: 0;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  margin-bottom: 24px;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: var(--h10-card-subtle);
  border-bottom: 1px solid var(--h10-border);
  flex-wrap: wrap;
  gap: 12px;
}

.results-header h3 {
  font-size: 0.98rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.results-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-mini {
  position: relative;
  width: 220px;
}

.search-mini .form-control {
  height: 32px;
  font-size: 0.78rem;
  padding: 6px 10px 6px 28px;
  border-radius: var(--radius-xs);
}

.search-mini-icon {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

/* Table Responsive Container with Dedicated Scroller */
.table-responsive {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 420px;
  width: 100%;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: var(--h10-border-hover) var(--h10-card-subtle);
}

.table-responsive::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

.table-responsive::-webkit-scrollbar-track {
  background: var(--h10-card-subtle);
}

.table-responsive::-webkit-scrollbar-thumb {
  background: var(--h10-border-hover);
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
  background: var(--text-dim);
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
  font-size: 0.82rem;
}

.data-table thead th {
  padding: 10px 14px;
  background: var(--h10-sidebar);
  color: var(--text-dim);
  font-size: 0.68rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--h10-border);
  white-space: nowrap;
  user-select: none;
  position: sticky;
  top: 0;
  z-index: 5;
  box-shadow: 0 1px 0 var(--h10-border);
}

.data-table thead th.sortable {
  cursor: pointer;
  transition: color 0.15s ease;
}

.data-table thead th.sortable:hover {
  color: #fff;
}

.sort-icon {
  display: inline-block;
  margin-left: 4px;
  font-size: 0.65rem;
  opacity: 0.4;
}

.sortable.active-sort .sort-icon {
  opacity: 1;
  color: var(--h10-primary);
}

.data-table tbody tr {
  border-bottom: 1px solid var(--h10-border-subtle);
  transition: background-color 0.12s ease;
}

.data-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.012);
}

.data-table tbody tr:hover {
  background: var(--h10-card-hover);
}

.data-table td {
  padding: 10px 14px;
  color: var(--text-secondary);
  vertical-align: middle;
  white-space: nowrap;
}

/* Product Column Cell */
.product-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 320px;
  white-space: normal;
}

.product-thumb {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-xs);
  object-fit: cover;
  background: var(--h10-sidebar);
  border: 1px solid var(--h10-border-subtle);
  flex-shrink: 0;
}

.product-meta .p-title {
  font-weight: 600;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.8rem;
  line-height: 1.3;
}

.product-meta .p-cat {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 2px;
}

/* ASIN Pill with 1-Click Copy */
.asin-pill {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--h10-cyan);
  background: var(--h10-cyan-subtle);
  padding: 3px 7px;
  border-radius: var(--radius-xs);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  border: 1px solid rgba(56, 189, 248, 0.2);
  transition: all 0.15s ease;
}

.asin-pill:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: var(--h10-cyan);
}

.val-bold {
  font-weight: 700;
  color: #fff;
  font-family: var(--font-mono);
}

.val-positive {
  color: var(--h10-green);
  font-weight: 700;
}

.margin-pill {
  display: inline-block;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--h10-green-subtle);
  color: var(--h10-green);
  border: 1px solid var(--h10-green-border);
}

/* Pagination Footer */
.pagination-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: var(--h10-card-subtle);
  border-top: 1px solid var(--h10-border);
  font-size: 0.78rem;
  color: var(--text-dim);
  flex-wrap: wrap;
  gap: 12px;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.page-btn {
  background: var(--h10-card);
  border: 1px solid var(--h10-border);
  color: var(--text-secondary);
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.15s ease;
}

.page-btn:hover:not(:disabled) {
  background: var(--h10-card-hover);
  color: #fff;
  border-color: var(--h10-border-hover);
}

.page-btn.active {
  background: var(--h10-primary);
  color: #fff;
  border-color: var(--h10-primary);
}

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

/* ==========================================================================
   SEARCH BAR (Xray & Cerebro)
   ========================================================================== */
.search-card {
  background: var(--h10-card);
  border: 1px solid var(--h10-border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
}

.search-input-group {
  display: flex;
  gap: 12px;
  align-items: center;
}

.search-input-group .form-control {
  flex: 1;
}

.quick-chips-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 10px;
}

.quick-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--h10-border-subtle);
  color: var(--text-secondary);
  font-size: 0.74rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.quick-chip:hover, .quick-chip:active {
  background: rgba(14, 115, 246, 0.18);
  border-color: var(--h10-primary);
  color: #fff;
}

/* ==========================================================================
   FBA PROFITABILITY CALCULATOR (Helium 10 Replica)
   ========================================================================== */
.calc-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 1024px) {
  .calc-container {
    grid-template-columns: 1fr;
  }
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 16px 0;
}

.dimensions-group {
  grid-column: span 2;
}

.dimensions-inputs {
  display: flex;
  gap: 8px;
}

.profit-highlight {
  display: flex;
  gap: 12px;
  margin: 16px 0;
}

.profit-box {
  flex: 1;
  background: var(--h10-card-subtle);
  border: 1px solid var(--h10-border);
  border-radius: var(--radius-sm);
  padding: 14px 10px;
  text-align: center;
}

.profit-box .label {
  font-size: 0.68rem;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.profit-box .val {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
  font-family: var(--font-mono);
  margin-top: 4px;
}

.fee-breakdown {
  border-top: 1px solid var(--h10-border-subtle);
  padding-top: 14px;
  margin-top: 14px;
}

.fee-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.fee-row.total {
  border-top: 1px solid var(--h10-border);
  margin-top: 8px;
  padding-top: 10px;
  font-size: 0.92rem;
  color: #fff;
}

.monthly-projection {
  margin-top: 18px;
  background: var(--h10-green-subtle);
  border: 1px solid var(--h10-green-border);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.monthly-projection h4 {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--h10-green);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.projection-stats {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 0.82rem;
}

/* ==========================================================================
   FRANKENSTEIN KEYWORD PROCESSOR
   ========================================================================== */
.frankenstein-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 1024px) {
  .frankenstein-layout {
    grid-template-columns: 1fr;
  }
}

.fk-textarea {
  height: 220px;
  resize: vertical;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.5;
}

.fk-textarea-out {
  height: 140px;
  resize: vertical;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.fk-backend-box {
  height: 90px;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  color: var(--h10-green);
  margin-bottom: 12px;
}

.fk-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 0;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.byte-counter-box {
  margin: 14px 0;
}

.byte-meter {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 6px;
}

.byte-meter-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--h10-green), var(--h10-cyan));
  transition: width 0.3s ease;
}

.byte-text {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-align: right;
}

/* ==========================================================================
   LISTING SCORE & A9 INDEX AUDITOR
   ========================================================================== */
.audit-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

@media (min-width: 900px) {
  .audit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
  }
}

.audit-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
  align-items: flex-start;
}

.audit-row-2col .form-group {
  margin-bottom: 0 !important;
}

.audit-row-2col .form-group label {
  white-space: nowrap;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.audit-row-2col .form-control {
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
}

/* ==========================================================================
   TAB MANAGEMENT & TRANSITIONS
   ========================================================================== */
.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeIn 0.2s ease-in-out;
}

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

/* Desktop hidden elements */
.mobile-header,
.mobile-nav-bar,
.mobile-backdrop,
.sidebar-close-btn {
  display: none;
}

/* ==========================================================================
   MOBILE & TABLET RESPONSIVENESS (< 1024px & < 768px)
   ========================================================================== */
@media (max-width: 1024px) {
  .calc-container, .frankenstein-layout, .audit-grid {
    grid-template-columns: 1fr;
  }
  .main-content {
    padding: 24px;
  }
}

@media (max-width: 768px) {
  /* Mobile App Shell */
  .app-container {
    flex-direction: column;
    min-height: 100vh;
    position: relative;
  }

  /* Slide-in Mobile Drawer Navigation */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    max-width: 85vw;
    background: var(--h10-sidebar);
    border-right: 1px solid var(--h10-border);
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 32px rgba(0, 0, 0, 0.85);
    overflow-y: auto;
    padding: 18px 16px;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--h10-border);
    border-radius: var(--radius-xs);
    color: #fff;
    cursor: pointer;
    margin-left: auto;
  }

  .mobile-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999;
  }

  .mobile-backdrop.open {
    display: block;
  }

  /* Mobile Top App Bar */
  .mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: var(--h10-sidebar);
    border-bottom: 1px solid var(--h10-border);
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
  }

  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
  }

  .brand-icon.small {
    width: 34px;
    height: 34px;
    padding: 2px;
    flex-shrink: 0;
  }

  .mobile-brand-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--h10-card);
    border: 1px solid var(--h10-border);
    border-radius: var(--radius-sm);
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
    outline: none;
  }

  /* Swipeable Mobile Horizontal Tool Switcher */
  .mobile-nav-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 10px 16px;
    background: var(--h10-canvas);
    border-bottom: 1px solid var(--h10-border-subtle);
    position: sticky;
    top: 56px;
    z-index: 95;
    scrollbar-width: none;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
  }

  .mobile-nav-bar::-webkit-scrollbar {
    display: none;
  }

  .mobile-tab-btn {
    padding: 7px 14px;
    background: var(--h10-card);
    border: 1px solid var(--h10-border);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s ease;
    outline: none;
  }

  .mobile-tab-btn.active {
    background: var(--h10-primary);
    color: #fff;
    border-color: var(--h10-primary);
    box-shadow: 0 0 10px var(--h10-primary-glow);
  }

  /* Main View Padding */
  .main-content {
    padding: 16px;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  .top-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 14px;
  }

  .page-title-area h2 {
    font-size: 1.25rem;
  }

  .page-title-area p {
    font-size: 0.78rem;
  }

  .action-buttons {
    display: flex;
    width: 100%;
    gap: 8px;
  }

  .action-buttons .btn {
    flex: 1;
    min-width: 0;
    height: 38px;
    font-size: 0.78rem;
    padding: 0 8px;
    justify-content: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Filter Panel on Mobile */
  .glass-card {
    padding: 16px;
    margin-bottom: 16px;
    border-radius: var(--radius-md);
  }

  .panel-header:not(#bbFilterHeader) {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .filter-presets {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }

  .filter-presets::-webkit-scrollbar {
    display: none;
  }

  .preset-btn {
    flex-shrink: 0;
    padding: 5px 12px;
    font-size: 0.74rem;
  }

  .filter-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* 16px font-size prevents iOS Safari viewport auto-zooming */
  .form-control:not(textarea), .input-with-affix, .dual-range-group {
    height: 42px;
    font-size: 16px;
  }

  textarea.form-control {
    font-size: 14px;
    line-height: 1.5;
    padding: 10px 12px;
    height: auto;
  }

  #idxKeywords {
    min-height: 100px;
    height: 110px;
  }

  #lqBullets {
    min-height: 110px;
    height: 120px;
  }

  .fk-textarea {
    min-height: 140px;
    height: 150px;
  }

  .fk-backend-box {
    min-height: 80px;
    height: 85px;
  }

  .fk-textarea-out {
    min-height: 110px;
    height: 120px;
  }

  .dual-range-group .form-control {
    font-size: 16px;
  }

  .input-affix {
    font-size: 0.88rem;
    padding: 0 12px;
  }

  /* Metric Cards on Mobile (2x2 Grid) */
  .metrics-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
  }

  .metric-card {
    padding: 12px 14px;
  }

  .metric-value {
    font-size: 1.25rem;
  }

  .metric-label {
    font-size: 0.65rem;
  }

  .metric-sub {
    font-size: 0.68rem;
  }

  /* Search Cards */
  .search-card {
    padding: 14px 16px;
  }

  .search-input-group {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
  }

  .search-input-group .input-with-affix {
    width: 100%;
    height: 44px;
  }

  .search-input-group .btn {
    width: 100%;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.92rem;
    font-weight: 600;
  }

  /* Results Table on Mobile */
  .results-header {
    padding: 14px 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .results-toolbar {
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }

  .search-mini {
    width: 100%;
  }

  #bbSortSelect {
    width: 100% !important;
  }

  .table-responsive {
    margin: 0 -16px;
    width: calc(100% + 32px);
    border-radius: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .data-table {
    min-width: 820px;
  }

  .pagination-footer {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    padding: 14px 16px;
  }

  /* Calculator on Mobile */
  .calc-container {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .profit-highlight {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
  }

  .profit-box {
    padding: 10px 4px;
  }

  .profit-box .val {
    font-size: 1.15rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .dimensions-group {
    grid-column: span 1;
  }

  .frankenstein-layout {
    grid-template-columns: 1fr;
  }

  .fk-options {
    grid-template-columns: 1fr;
  }

  .audit-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .profit-highlight {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   HELIUM 10 ANDROID MOBILE SUITE (Pixel-Perfect from APK)
   ========================================================================== */

/* Top Android App Bar */
.android-app-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  height: 58px;
  padding: 0 14px;
  background: var(--h10-sidebar);
  border-bottom: 1px solid var(--h10-sidebar-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.android-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.android-logo-icon {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: transparent;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.android-logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.android-bar-title {
  font-family: var(--font-main);
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.android-bar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.market-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #192533;
  border: 1px solid var(--h10-border);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-main);
}

.market-flag {
  width: 16px;
  height: 16px;
  border-radius: 50%;
}

.android-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #192533;
  border: 1px solid var(--h10-border);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
}

.android-icon-btn:active {
  background: var(--h10-primary);
  transform: scale(0.96);
}

.android-icon-btn .btn-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  background: var(--h10-primary);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  border-radius: 10px;
  padding: 1px 5px;
  border: 2px solid var(--h10-sidebar);
}

/* Bottom Android Navigation Bar (Horizontally scrollable for all tools) */
.android-bottom-nav {
  display: none !important;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 62px;
  background: #121820;
  border-top: 1px solid #1f2b37;
  z-index: 1000;
  align-items: center;
  justify-content: flex-start;
  padding: 0 6px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  white-space: nowrap;
  scrollbar-width: none;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.4);
}

.android-bottom-nav::-webkit-scrollbar {
  display: none;
}

.nav-tab-btn {
  flex: 0 0 74px;
  width: 74px;
  min-width: 74px;
  max-width: 74px;
  padding: 6px 2px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 100%;
  background: transparent;
  border: none;
  color: #8b9bb0;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}

.tab-icon-wrap {
  width: 44px;
  height: 28px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-svg,
.tab-svg-inline {
  width: 20px;
  height: 20px;
}

.tab-svg {
  filter: brightness(0) invert(0.65);
  transition: filter 0.15s ease;
}

.tab-svg-inline {
  stroke: #8b9bb0;
  transition: stroke 0.15s ease;
}

.tab-label {
  font-family: var(--font-main);
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 72px;
  text-align: center;
  transition: color 0.15s ease;
  display: block;
}

.nav-tab-btn.active {
  color: #38bdf8;
}

.nav-tab-btn.active .tab-icon-wrap {
  background: rgba(10, 111, 232, 0.25);
}

.nav-tab-btn.active .tab-svg {
  filter: brightness(0) invert(1) drop-shadow(0 0 4px var(--h10-primary));
}

.nav-tab-btn.active .tab-svg-inline {
  stroke: #38bdf8;
}

.nav-tab-btn.active .tab-label {
  color: #38bdf8;
  font-weight: 800;
}

/* Card View Toggle Toolbar */
.view-switch-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  padding: 8px 12px;
  background: #141c25;
  border: 1px solid var(--h10-border);
  border-radius: var(--radius-md);
}

.view-mode-pills {
  display: inline-flex;
  background: #0e141b;
  border-radius: 8px;
  padding: 2px;
  border: 1px solid var(--h10-border);
}

.view-mode-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.view-mode-btn.active {
  background: var(--h10-primary);
  color: #ffffff;
}

.view-mode-btn img {
  width: 14px;
  height: 14px;
  filter: brightness(0) invert(1);
}

/* Helium 10 Product Cards (Mobile List View) */
.h10-cards-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
  margin-bottom: 24px;
}

.h10-product-card {
  background: #16202c;
  border: 1px solid #233244;
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.h10-product-card:active {
  border-color: var(--h10-primary);
}

.h10-card-header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.h10-thumb-box {
  width: 68px;
  height: 68px;
  background: #0e141b;
  border: 1px solid var(--h10-border);
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.h10-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.h10-card-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.h10-chips-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.h10-asin-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 4px;
  padding: 1px 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  cursor: pointer;
}

.h10-bsr-badge {
  font-size: 0.68rem;
  font-weight: 700;
  color: #33cc99;
  background: rgba(51, 204, 153, 0.1);
  border: 1px solid rgba(51, 204, 153, 0.25);
  border-radius: 4px;
  padding: 1px 6px;
  font-family: var(--font-mono);
}

.h10-cat-badge {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-dim);
  background: #1b2633;
  border-radius: 4px;
  padding: 1px 5px;
  max-width: 110px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.h10-card-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.35;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.h10-card-title:hover {
  color: var(--h10-primary);
}

.h10-rating-line {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  color: var(--h10-amber);
  font-weight: 700;
}

.h10-rating-line span.rev-count {
  color: var(--text-dim);
  font-weight: 400;
}

/* Metric Strip (3 Columns) */
.h10-metrics-bar {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  background: #121922;
  border: 1px solid var(--h10-border);
  border-radius: 10px;
  padding: 8px 10px;
}

.h10-metric-col {
  display: flex;
  flex-direction: column;
  text-align: center;
}

.h10-metric-col:not(:last-child) {
  border-right: 1px solid #1f2c3a;
}

.h10-met-lbl {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.h10-met-val {
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 800;
  margin-top: 1px;
}

.h10-met-val.price {
  color: #ffffff;
}

.h10-met-val.sales {
  color: #33cc99;
}

.h10-met-val.revenue {
  color: #38bdf8;
}

/* Action Strip */
.h10-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.h10-btn {
  flex: 1;
  height: 34px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--h10-border);
  background: #1c2735;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.h10-btn:active {
  background: #233244;
}

.h10-btn.primary {
  background: var(--h10-primary);
  border-color: var(--h10-primary);
}

.h10-btn.primary:active {
  background: var(--h10-primary-active);
}

.h10-btn-icon {
  width: 14px;
  height: 14px;
  filter: brightness(0) invert(1);
}

/* Slide-Up Bottom Sheet (Material 3 Filter Sheet) */
.h10-sheet-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 1100;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.h10-sheet-backdrop.open {
  display: block;
  opacity: 1;
}

.h10-bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 85vh;
  background: #16202c;
  border-top: 1px solid #2a3a4d;
  border-top-left-radius: 22px;
  border-top-right-radius: 22px;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.6);
  z-index: 1200;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.h10-bottom-sheet.open {
  transform: translateY(0);
}

.sheet-handle-bar {
  width: 44px;
  height: 4px;
  background: #3a4b60;
  border-radius: 2px;
  margin: 10px auto 4px;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--h10-border);
}

.sheet-title {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.sheet-body {
  padding: 16px 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sheet-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--h10-border);
  background: #121820;
  display: flex;
  gap: 10px;
}

/* Mobile Screen Adaptations */
@media (max-width: 768px) {
  html, body {
    height: 100%;
    overflow: hidden !important;
  }
  .app-container {
    height: 100dvh;
    max-height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden !important;
  }
  .sidebar {
    display: none !important;
  }
  .mobile-header, .mobile-nav-bar {
    display: none !important;
  }
  .android-app-bar {
    display: flex;
    flex-shrink: 0;
  }
  .android-bottom-nav {
    display: flex !important;
    flex-shrink: 0;
  }
  .main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 8px 10px 64px 10px !important;
    max-width: 100vw;
    overflow: hidden !important;
    height: auto !important;
    box-sizing: border-box;
  }
  .tab-pane.active {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 12px;
  }
  #tab-blackbox.tab-pane.active {
    overflow: hidden !important;
    padding-bottom: 0;
  }
  #bbFilterCard {
    flex-shrink: 0;
    margin-bottom: 8px;
    max-height: 55vh;
    overflow-y: auto;
  }
  .results-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden !important;
    margin-bottom: 0;
    padding: 0;
  }
  .results-header {
    flex-shrink: 0;
    padding: 12px 14px 8px 14px;
    margin-bottom: 0;
  }
  .h10-cards-container {
    flex: 1;
    min-height: 0;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    padding: 8px 12px 16px 12px;
    margin: 0;
    scrollbar-width: thin;
  }
  .pagination-footer {
    flex-shrink: 0;
    padding: 8px 14px;
    margin-top: 0;
  }
  .top-bar {
    display: none !important;
  }
  .filter-card {
    display: none;
  }
  .table-responsive.mobile-hidden {
    display: none !important;
  }
}

/* ==========================================================================
   PULL-UP / PULL-DOWN COLLAPSIBLE FILTER SECTION
   ========================================================================== */
.filter-card-collapsible {
  transition: all 0.25s ease;
  position: relative;
}

.filter-collapsible-body {
  display: block;
}

.filter-card-collapsible.collapsed .filter-collapsible-body {
  display: none !important;
}

#bbFilterHeader,
.filter-card-collapsible .panel-header {
  display: flex !important;
  flex-direction: row !important;
  justify-content: space-between !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: 12px !important;
  width: 100% !important;
  margin-bottom: 14px;
  padding-bottom: 10px;
}

#bbFilterHeader h3 {
  font-size: clamp(0.9rem, 3.8vw, 1.05rem);
  font-weight: 700;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
}

#bbFilterHeader .filter-collapse-btn {
  margin-left: auto;
  flex-shrink: 0;
}

.filter-collapse-btn {
  background: #192533;
  border: 1px solid var(--h10-border);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  min-width: 32px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #38bdf8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.filter-collapse-btn:active {
  background: var(--h10-primary);
  color: #fff;
}

/* Compact Summary when Collapsed */
.filter-collapsed-summary {
  display: none;
  align-items: center;
  padding: 8px 12px;
  background: #141c25;
  border: 1px solid var(--h10-border);
  border-radius: 8px;
  margin-top: 6px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.filter-card-collapsible.collapsed .filter-collapsed-summary {
  display: flex;
}

.summary-text {
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  flex-wrap: wrap;
}

.summary-cat {
  color: #ffffff;
  font-weight: 700;
}

.summary-sep {
  color: #475569;
  font-size: 0.75rem;
}

.summary-price, .summary-rev {
  color: #38bdf8;
  font-weight: 600;
}

/* Bottom Pull Handle Bar — pill only, no text */
.filter-pull-handle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 12px 6px;
  margin-top: 10px;
  border-top: 1px solid var(--h10-border-subtle);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease;
}

.filter-pull-handle:active {
  background: rgba(10, 111, 232, 0.1);
}

.filter-pull-handle .handle-pill {
  width: 44px;
  height: 4px;
  border-radius: 2px;
  background: #374a5e;
  transition: background 0.2s ease, width 0.2s ease;
}

.filter-pull-handle:hover .handle-pill,
.filter-pull-handle:active .handle-pill {
  background: var(--h10-primary);
  width: 54px;
}

.filter-pull-handle .handle-text {
  display: none;
}


