/* ==========================================================================
   White Bot Admin - Strict Dark Minimalist Design System
   Matches Luxury Dark Architecture: No bubbly pills, sharp 6-8px borders,
   matte carbon surfaces, glowing SVG analytics curves.
   ========================================================================== */

/* --- Global utility --- */
.hidden { display: none !important; }

:root {
  --bg-app: #0c0d12;
  --bg-sidebar: #101217;
  --bg-card: #14171f;
  --bg-card-hover: #171b24;
  --bg-input: #12141a;
  --bg-pill: #1a1d26;

  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-active: rgba(255, 255, 255, 0.14);
  --border-cyan: rgba(0, 242, 254, 0.35);

  --text-main: #f0f2f5;
  --text-secondary: #8b949e;
  --text-muted: #525964;

  --accent-cyan: #00f2fe;
  --accent-violet: #8a2be2;
  --accent-pink: #ec4899;
  --accent-emerald: #10b981;
  --accent-red: #ef4444;

  --radius-card: 8px;
  --radius-btn: 6px;
  --radius-pill: 6px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --transition-fast: 0.15s ease;
}

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

/* Remove default number input spinners across the entire app */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type=number] {
  -moz-appearance: textfield;
}

body.theme-dark {
  background-color: var(--bg-app);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.5;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   1. TOPBAR
   ========================================================================== */


/* ==========================================================================
   2. SIDEBAR LAYOUT
   ========================================================================== */

.app-layout {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.sidebar {
  width: 220px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px 12px;
  flex-shrink: 0;
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 38px;
  padding: 0 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-btn);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
  text-align: left;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
}

.nav-item.active {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-active);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.nav-item.active .nav-icon {
  color: var(--accent-cyan);
}

.logout-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 38px;
  padding: 0 12px;
  background: transparent;
  border: none;
  border-radius: var(--radius-btn);
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.logout-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--accent-red);
}

/* ==========================================================================
   3. MAIN CONTENT STAGE
   ========================================================================== */

.main-content {
  flex: 1;
  background: var(--bg-app);
  overflow-y: auto;
  padding: 24px 32px 60px 32px;
}

.view-panel {
  display: none;
  animation: fadeIn 0.15s ease-out;
}

.view-panel.active {
  display: block;
}

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

.view-header {
  margin-bottom: 24px;
}

.view-header.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.view-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.3px;
}

.view-subtitle {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-top: 3px;
}

/* ==========================================================================
   4. KPI GRID & CARDS (Strict 8px radius)
   ========================================================================== */

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

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 116px;
  transition: border-color var(--transition-fast);
}

.kpi-card:hover {
  border-color: var(--border-active);
}

.kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kpi-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.kpi-icon-wrap {
  color: var(--text-muted);
}

.supplier-pill {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: var(--radius-btn);
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.kpi-value {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.5px;
  margin: 8px 0;
}

.kpi-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
}

.trend-badge {
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
}

.trend-badge.positive {
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.1);
}

.trend-badge.neutral {
  color: var(--text-secondary);
}

.trend-sub {
  color: var(--text-muted);
  font-size: 11.5px;
}

.dash-filters-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 10px 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

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

.dfilter-label {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.dash-select {
  height: 32px;
  background: var(--bg-pill);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-btn);
  color: var(--text-main);
  padding: 0 10px;
  font-size: 12px;
  outline: none;
  cursor: pointer;
  transition: var(--transition-fast);
}

.dash-select:focus {
  border-color: rgba(255, 255, 255, 0.25);
}

.kpi-supplier-mini-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 8px 0;
}

.kpi-supp-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}

.kpi-supp-title {
  color: var(--text-secondary);
  font-size: 11.5px;
}

.kpi-supp-val {
  font-weight: 600;
  color: var(--text-main);
  font-size: 12.5px;
}

.dash-cfg-link {
  font-size: 11px;
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition-fast);
}

.dash-cfg-link:hover {
  color: #fff;
  text-decoration: underline;
}

.chart-empty-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(12, 13, 18, 0.85);
  backdrop-filter: blur(2px);
  z-index: 5;
  text-align: center;
  padding: 20px;
}

.empty-chart-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.chart-empty-placeholder h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
}

.chart-empty-placeholder p {
  font-size: 12px;
  color: var(--text-muted);
  max-width: 420px;
  line-height: 1.4;
}

.dash-breakdown-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
}

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

.content-card-header {
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.card-inner-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
}

.card-inner-sub {
  font-size: 11.5px;
  color: var(--text-muted);
}

.status-badge.ok {
  color: var(--accent-emerald);
  font-weight: 600;
}

.status-badge.low {
  color: var(--accent-red);
  font-weight: 600;
}

/* ==========================================================================
   5. CHART CARD (Wave Curves matching screenshot)
   ========================================================================== */

.content-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 20px 24px;
  margin-bottom: 24px;
}

.content-card.no-padding {
  padding: 0;
  overflow: hidden;
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
}

.card-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

.chart-controls {
  display: flex;
  gap: 8px;
}

.pill-toggle {
  display: flex;
  background: var(--bg-pill);
  padding: 2px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
}

.pill-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: var(--transition-fast);
}

.pill-btn.active {
  background: #252a36;
  color: #fff;
  font-weight: 600;
}

.svg-chart-container {
  position: relative;
  width: 100%;
  height: 300px;
  margin-top: 10px;
}

#sales-svg-chart {
  width: 100%;
  height: 100%;
  display: block;
}

.chart-grid-line {
  stroke: rgba(255, 255, 255, 0.04);
  stroke-width: 1;
}

.chart-axis-text {
  fill: var(--text-muted);
  font-size: 11px;
  font-family: var(--font-mono);
}

.chart-line {
  fill: none;
  stroke-width: 2.5;
}

.line-cyan {
  stroke: var(--accent-cyan);
}

.line-violet {
  stroke: #a855f7;
}

.chart-dot {
  cursor: pointer;
  transition: r 0.2s ease;
}

.chart-dot:hover {
  r: 6;
}

.chart-legend {
  display: flex;
  gap: 20px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  font-size: 12px;
  color: var(--text-secondary);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.legend-dot.cyan { background-color: var(--accent-cyan); }
.legend-dot.violet { background-color: #a855f7; }
.legend-dot.emerald { background-color: var(--accent-emerald); }

.chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(18, 20, 27, 0.95);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-btn);
  padding: 8px 12px;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11.5px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.5);
  z-index: 50;
  transition: opacity 0.1s ease;
}

.chart-tooltip.hidden {
  display: none;
}

/* ==========================================================================
   6. TABLES (Strict High-Density Layout)
   ========================================================================== */

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.filter-bar-col {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ---- Sync Button Group ---- */
.sync-btn-group {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

/* ---- Supplier Overview Cards Row ---- */
.supplier-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}

@media (max-width: 1200px) {
  .supplier-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .supplier-stats-row {
    grid-template-columns: 1fr;
  }
}

.supplier-stat-card.all-suppliers {
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.45) 0%, rgba(15, 23, 42, 0.65) 100%);
  border: 1px solid rgba(99, 102, 241, 0.35);
  box-shadow: 0 4px 20px -2px rgba(99, 102, 241, 0.12);
}

.supplier-stat-card.all-suppliers:hover {
  border-color: rgba(99, 102, 241, 0.6);
  box-shadow: 0 6px 24px -2px rgba(99, 102, 241, 0.2);
}

.all-logo {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
  color: #818cf8;
}

.all-badge {
  background: rgba(99, 102, 241, 0.12);
  color: #a5b4fc;
  border-color: rgba(99, 102, 241, 0.25);
}

.supplier-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.supplier-stat-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.025);
}

.supplier-stat-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.supplier-logo {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
}

.supplier-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.supplier-stat-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
}

.supplier-api-badge {
  font-size: 10px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.3px;
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.supplier-stat-nums {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  background: rgba(0, 0, 0, 0.22);
  border-radius: 6px;
  padding: 8px 10px;
}

.supplier-stat-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sstat-val {
  font-size: 17px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #f1f5f9;
  line-height: 1.2;
}

.sstat-label {
  font-size: 10px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Margin row inside card */
.supplier-margin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.sm-label {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 500;
}

.sm-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sm-input {
  width: 62px;
  height: 28px;
  padding: 0 6px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border-subtle);
  border-radius: 5px;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  text-align: center;
  transition: var(--transition-fast);
}

.sm-input:focus {
  border-color: var(--accent-cyan);
  outline: none;
  background: rgba(0, 0, 0, 0.65);
  box-shadow: 0 0 0 1px rgba(0, 242, 254, 0.3);
}

.sm-preview {
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.08);
  padding: 3px 6px;
  border-radius: 4px;
  border: 1px solid rgba(16, 185, 129, 0.2);
  min-width: 42px;
  text-align: center;
}

.btn-xs {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 5px;
  cursor: pointer;
}

/* ---- Unified Catalog Toolbar ---- */
.catalog-toolbar {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 10px 14px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toolbar-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 300px;
}

.search-icon {
  position: absolute;
  left: 10px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input-wrap input,
#filter-products-search {
  width: 100%;
  height: 32px;
  padding: 0 12px 0 32px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-btn);
  color: var(--text-main);
  font-size: 12px;
  transition: var(--transition-fast);
}

.search-input-wrap input:hover,
#filter-products-search:hover {
  border-color: var(--border-active);
}

.search-input-wrap input:focus,
#filter-products-search:focus {
  border-color: rgba(255, 255, 255, 0.25);
  outline: none;
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}


.toolbar-bottom-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

#product-category-filters .pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
}

#product-category-filters .pill-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.16);
}

#product-category-filters .pill-btn.active {
  background: rgba(0, 242, 254, 0.12);
  border-color: rgba(0, 242, 254, 0.4);
  color: #00f2fe;
  font-weight: 600;
}

.toolbar-subfilters-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
  padding: 6px 10px !important;
  background: rgba(13, 17, 23, 0.55) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 8px !important;
  margin-top: 8px !important;
}

.subfilters-left {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-wrap: wrap !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

.subfilters-right {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-shrink: 0 !important;
  margin-left: auto !important;
}

.subfilter-group {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  height: 30px !important;
  box-sizing: border-box !important;
  background: rgba(255, 255, 255, 0.035) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 6px !important;
  padding: 0 8px !important;
  transition: border-color 0.18s ease, background 0.18s ease !important;
}

.subfilter-group:hover {
  border-color: rgba(0, 242, 254, 0.3) !important;
  background: rgba(255, 255, 255, 0.055) !important;
}

.subfilter-label {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  font-size: 10.5px !important;
  color: #8b949e !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  line-height: 1 !important;
  user-select: none !important;
}

.subfilter-label svg {
  flex-shrink: 0;
  opacity: 0.8;
  color: var(--accent-cyan);
  transition: opacity 0.15s ease, filter 0.15s ease;
}

.subfilter-group:hover .subfilter-label svg {
  opacity: 1;
  filter: drop-shadow(0 0 4px rgba(0, 242, 254, 0.45));
}

.subfilter-select {
  height: 100% !important;
  padding: 0 16px 0 2px !important;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%238b949e' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 2px center !important;
  border: none !important;
  color: #e2e8f0 !important;
  font-size: 11.5px !important;
  cursor: pointer !important;
  outline: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  transition: var(--transition-fast) !important;
  line-height: 28px !important;
}

.subfilter-select option {
  background: #141720 !important;
  color: #f1f5f9 !important;
}

.subfilter-select:focus {
  color: var(--accent-cyan) !important;
}

.subfilter-reset-btn {
  height: 30px !important;
  padding: 0 10px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  border-radius: 6px !important;
  background: rgba(255, 255, 255, 0.035) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #8b949e !important;
  cursor: pointer !important;
  transition: var(--transition-fast) !important;
  user-select: none !important;
}

.subfilter-reset-btn:hover {
  background: rgba(239, 68, 68, 0.12) !important;
  border-color: rgba(239, 68, 68, 0.35) !important;
  color: #f87171 !important;
}

.ml-auto {
  margin-left: auto;
}


/* ---- Supplier Tab Switcher ---- */
.supplier-tab-group {
  display: flex;
  gap: 4px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-btn);
  padding: 3px;
}

.supplier-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.supplier-tab:hover {
  color: var(--text-main);
  background: rgba(255,255,255,0.04);
}

.supplier-tab.active {
  background: var(--bg-card);
  color: var(--text-main);
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.stab-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.stab-dot.all-dot    { background: #94a3b8; }
.stab-dot.libre-dot  { background: #cbd5e1; }
.stab-dot.cyber-dot  { background: #cbd5e1; }
.stab-dot.manual-dot { background: #94a3b8; }

/* ---- Supplier badge in table rows ---- */
.supplier-row-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.3px;
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.badge-libre,
.badge-cyber,
.badge-manual {
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.supplier-row-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.ext-id-tag {
  display: inline-block;
  margin-left: 6px;
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
  padding: 1px 5px;
  border-radius: 3px;
}


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

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12.5px;
}

.data-table th {
  background: #111319;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-subtle);
}

.data-table td {
  padding: 13px 18px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
  vertical-align: middle;
}

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

.product-title {
  font-weight: 600;
  color: var(--text-main);
}

.category-tag {
  font-size: 10.5px;
  color: var(--text-muted);
  display: block;
}

.mono-cell {
  font-family: var(--font-mono);
  font-size: 12px;
}

.input-margin-edit,
.input-price-edit {
  width: 76px;
  height: 28px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-btn);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 0 8px;
  transition: var(--transition-fast);
}

.input-margin-edit:focus,
.input-price-edit:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.35);
  background: #141720;
}

.sm-suffix {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  margin-left: 2px;
}

/* Switch Toggle */
.switch {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 18px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #272a34;
  transition: .2s;
  border-radius: 18px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 12px;
  width: 12px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .2s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--accent-emerald);
}

input:checked + .slider:before {
  transform: translateX(16px);
}

/* ==========================================================================
   7. BUTTONS & FORMS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  font-size: 12.5px;
  font-weight: 500;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: var(--transition-fast);
  border: 1px solid transparent;
}

.btn-primary {
  background: #252a36;
  border-color: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.btn-primary:hover {
  background: #323847;
  border-color: var(--border-cyan);
}

.btn-secondary {
  background: transparent;
  border-color: var(--border-subtle);
  color: var(--text-secondary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.btn-xs {
  height: 26px;
  padding: 0 8px;
  font-size: 11px;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

/* ---- Settings Modern 3-Section Layout ---- */
.settings-nav-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 4px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  width: fit-content;
  flex-wrap: wrap;
}

.spill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
}

.spill-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.spill-btn.active {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-weight: 600;
}

.spill-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono);
}

.spill-btn.active .spill-num {
  background: #fff;
  color: #0d1117;
}

.settings-flow-container {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.settings-card-section {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: var(--transition-fast);
}

.settings-card-section:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

.settings-card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.015);
}

.sec-badge {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sec-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sec-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  margin: 0;
}

.sec-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

.sec-card-body {
  padding: 20px;
}

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

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

.label-hint {
  font-size: 11px;
  color: #64748b;
  font-weight: 400;
  margin-left: 4px;
}

/* Providers Config Grid (CyberYozh & LibreService) */
.suppliers-config-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 860px) {
  .suppliers-config-grid {
    grid-template-columns: 1fr;
  }
}

.provider-config-box {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.provider-box-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.provider-box-icon {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.provider-box-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.provider-box-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.mb-0 {
  margin-bottom: 0 !important;
}

/* Wallets Modern Grid */
.wallets-modern-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.wallet-field-card {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wallet-field-card.full-w {
  grid-column: 1 / -1;
}

@media (max-width: 768px) {
  .wallets-modern-grid {
    grid-template-columns: 1fr;
  }
  .wallet-field-card.full-w {
    grid-column: auto;
  }
}

.wallet-field-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.w-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0 !important;
}

.w-net-tag {
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: #cbd5e1;
  letter-spacing: 0.4px;
}

.wallet-field-card input {
  width: 100%;
  height: 38px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-btn);
  padding: 0 12px;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.3px;
  transition: var(--transition-fast);
  outline: none;
}

.wallet-field-card input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.28);
  background: #141720;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="search"],
.form-group input,
.form-group select,
.select-input {
  width: 100%;
  height: 38px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-btn);
  padding: 0 12px;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 12.5px;
  transition: var(--transition-fast);
  outline: none;
}

.form-group textarea {
  width: 100%;
  min-height: 85px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-btn);
  padding: 10px 12px;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 12.5px;
  line-height: 1.5;
  resize: vertical;
  transition: var(--transition-fast);
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.select-input:focus {
  outline: none;
  border-color: var(--accent-cyan);
  background: #141722;
  box-shadow: 0 0 0 1px rgba(0, 242, 254, 0.25);
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.hint {
  display: block;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 4px;
}

.hint strong {
  color: var(--accent-cyan);
}

.input-with-suffix {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-suffix .suffix {
  position: absolute;
  right: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.input-with-action {
  position: relative;
  display: flex;
  align-items: center;
}

.btn-toggle-eye {
  position: absolute;
  right: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 12.5px;
}

.info-label {
  color: var(--text-secondary);
}

.mono-val {
  font-family: var(--font-mono);
  color: var(--text-main);
  font-weight: 600;
}

/* ==========================================================================
   8. MODALS & TOASTS
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-backdrop.hidden {
  display: none;
}

.modal-box {
  width: 440px;
  background: #141720;
  border: 1px solid var(--border-active);
  border-radius: var(--radius-card);
  box-shadow: 0 12px 36px rgba(0,0,0,0.6);
  padding: 24px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 2000;
}

.toast {
  background: #171b26;
  border: 1px solid var(--border-active);
  border-radius: var(--radius-btn);
  padding: 12px 18px;
  color: #fff;
  font-size: 12.5px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.5);
  animation: slideUp 0.2s ease-out;
}

.toast.success { border-left: 3px solid var(--accent-emerald); }
.toast.error { border-left: 3px solid var(--accent-red); }

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

/* ---- Product Creation Wizard Modal ---- */
.modal-wide {
  width: 560px;
  max-width: 95vw;
}

.wizard-steps {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.wstep {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 500;
  transition: var(--transition-fast);
}

.wstep.active {
  color: var(--accent-cyan);
  font-weight: 600;
}

.wstep.done {
  color: var(--accent-emerald);
}

.wstep-num {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono);
}

.wstep.active .wstep-num {
  background: var(--accent-cyan);
  color: #0b0d13;
  box-shadow: 0 0 8px rgba(0, 242, 254, 0.4);
}

.wstep.done .wstep-num {
  background: var(--accent-emerald);
  color: #0b0d13;
}

.wstep-arrow {
  color: rgba(255, 255, 255, 0.2);
  font-size: 13px;
}

.wizard-step.hidden {
  display: none;
}

/* Category Selection Grid */
.cat-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 14px 0;
  min-height: 40px;
}

.cat-chip {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cat-chip:hover {
  color: var(--text-main);
  border-color: var(--border-active);
  background: rgba(255, 255, 255, 0.08);
}

.cat-chip.selected {
  background: rgba(0, 242, 254, 0.12);
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  font-weight: 600;
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.2);
}

.cat-chip-count {
  font-size: 10px;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.1);
  padding: 1px 5px;
  border-radius: 10px;
}

.cat-new-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--border-subtle);
  border-radius: 8px;
}

.cat-new-label {
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
}

.cat-new-input {
  flex: 1;
  padding: 6px 10px;
  font-size: 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  color: #fff;
}

.cat-new-input:focus {
  border-color: var(--accent-cyan);
  outline: none;
}

/* Wizard Context Header */
.wizard-ctx-row {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 8px 14px;
  margin-bottom: 16px;
  font-size: 12px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.wctx-label {
  color: var(--text-muted);
  margin-right: 6px;
}

.wctx-val {
  color: var(--accent-cyan);
  font-weight: 600;
}

/* Pricing Mode Toggle */
.pricing-mode-toggle {
  display: flex;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 3px;
  margin-bottom: 16px;
  gap: 4px;
}

.pricing-mode-btn {
  flex: 1;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 500;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
}

.pricing-mode-btn:hover {
  color: var(--text-main);
}

.pricing-mode-btn.active {
  background: var(--bg-card);
  color: var(--text-main);
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-subtle);
}

.required-star {
  color: var(--accent-red);
  margin-left: 2px;
}

/* Table action buttons */
.table-actions-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-del-prod {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #ef4444;
  border-radius: 4px;
  padding: 3px 6px;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-del-prod:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
}

.product-margin-calc {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--accent-emerald);
  margin-top: 2px;
  display: block;
}

/* Empty State Styling */
.empty-state-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 44px 20px;
  text-align: center;
}

.empty-state-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  margin-bottom: 12px;
}

.empty-state-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
}

.empty-state-desc {
  font-size: 12px;
  color: var(--text-muted);
  max-width: 400px;
  margin-bottom: 16px;
  line-height: 1.4;
}

.empty-state-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

/* ==========================================================================
   AUTO-SYNC LIVE INDICATOR BADGE
   ========================================================================== */
.sync-auto-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.22);
  border-radius: var(--radius-btn);
  padding: 5px 10px;
  font-size: 11.5px;
  color: var(--text-secondary);
  user-select: none;
}

.sync-auto-badge strong {
  color: var(--accent-emerald);
  font-weight: 600;
  font-family: var(--font-mono);
}

.sync-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulse-live 2s infinite ease-in-out;
}

@keyframes pulse-live {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.6; }
}

/* ==========================================================================
   SIM & PRODUCT TYPE BADGES (Физы vs Вирты vs Прокси)
   ========================================================================== */
.product-cell-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.product-badge-row {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.prod-type-badge {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  letter-spacing: 0.2px;
  line-height: 1.2;
}

.badge-phys {
  background: rgba(16, 185, 129, 0.13);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.32);
}

.badge-virt {
  background: rgba(99, 102, 241, 0.13);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.32);
}

.badge-proxy {
  background: rgba(0, 242, 254, 0.10);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 242, 254, 0.25);
}

.badge-dc {
  background: rgba(59, 130, 246, 0.14);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.badge-isp {
  background: rgba(20, 184, 166, 0.14);
  color: #2dd4bf;
  border: 1px solid rgba(20, 184, 166, 0.35);
}

.badge-lte {
  background: rgba(168, 85, 247, 0.14);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.35);
}

.badge-rot {
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.badge-esim {
  background: rgba(14, 165, 233, 0.14);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.35);
}

.badge-vpn {
  background: rgba(236, 72, 153, 0.14);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.35);
}

.badge-acc {
  background: rgba(249, 115, 22, 0.14);
  color: #fb923c;
  border: 1px solid rgba(249, 115, 22, 0.35);
}

/* ==========================================================================
   RESPONSIVE TABLE CONTAINER
   ========================================================================== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

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

.table-responsive::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
}

.table-responsive::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   PAGINATION BAR & CONTROLS (10, 20, 50, 100, 200)
   ========================================================================== */
.table-pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-top: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.01);
  font-size: 12.5px;
  color: var(--text-secondary);
  flex-wrap: wrap;
  gap: 12px;
}

.pagination-info {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.pagination-info strong {
  color: var(--text-main);
  font-family: var(--font-mono);
}

.pagination-size-selector {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pg-size-label {
  font-size: 12px;
  color: var(--text-muted);
}

.pagination-size-selector .subfilter-select {
  padding: 4px 22px 4px 8px;
  font-size: 12px;
  height: 28px;
  background-position: right 6px center;
}

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

.pg-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-pill);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: var(--transition-fast);
}

.pg-nav-btn:hover:not(:disabled) {
  background: var(--bg-card-hover);
  color: var(--text-main);
  border-color: var(--border-active);
}

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

.pg-numbers {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pg-num-btn {
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: var(--transition-fast);
}

.pg-num-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border-color: var(--border-subtle);
}

.pg-num-btn.active {
  background: rgba(0, 242, 254, 0.12);
  color: var(--accent-cyan);
  border-color: var(--border-cyan);
  font-weight: 600;
  box-shadow: 0 0 8px rgba(0, 242, 254, 0.2);
}

.pg-ellipsis {
  padding: 0 4px;
  color: var(--text-muted);
  font-size: 12px;
  user-select: none;
}

/* ==========================================================================
   MOBILE HEADER & BACKDROP (Hidden on desktop, shown on mobile)
   ========================================================================== */
.mobile-header {
  display: none;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(3px);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.sidebar-backdrop.active {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

.sidebar-header-mobile {
  display: none;
}

/* ==========================================================================
   DEVICE ADAPTIVENESS & RESPONSIVE BREAKPOINTS
   ========================================================================== */

/* 1. Large Tablets & Small Laptops (<= 1100px) */
@media (max-width: 1100px) {
  .supplier-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .supplier-stat-card.manual {
    grid-column: span 2;
  }
}

/* 2. Tablets & Mobile Landscape (<= 860px) */
@media (max-width: 860px) {
  body.theme-dark {
    overflow-y: auto;
    height: auto;
    min-height: 100vh;
  }

  /* Show Mobile Header */
  .mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
    padding: 0 16px;
    background: var(--bg-sidebar);
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    z-index: 999;
  }

  .mobile-menu-btn {
    background: transparent;
    border: none;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    cursor: pointer;
    border-radius: var(--radius-btn);
  }

  .mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.06);
  }

  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .mobile-brand-title {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-main);
  }

  .mobile-brand-badge {
    font-size: 9.5px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 4px;
    background: rgba(0, 242, 254, 0.14);
    color: var(--accent-cyan);
    border: 1px solid rgba(0, 242, 254, 0.3);
  }

  /* Drawer Sidebar */
  .app-layout {
    flex-direction: column;
    overflow: visible;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    z-index: 1001;
    transform: translateX(-100%);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 4px 0 28px rgba(0, 0, 0, 0.7);
  }

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

  .sidebar-header-mobile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 6px 16px 6px;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 12px;
  }

  .sidebar-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 0.5px;
  }

  .sidebar-close-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-btn);
  }

  .sidebar-close-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.08);
  }

  .main-content {
    padding: 16px 12px;
    overflow-y: visible;
  }

  /* Top Toolbar and Headers */
  .view-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .sync-btn-group {
    width: 100%;
    flex-wrap: wrap;
  }

  .toolbar-top-row {
    flex-direction: column;
    gap: 10px;
  }

  .search-input-wrap {
    width: 100%;
  }

  .search-input-wrap input {
    width: 100%;
  }

  .supplier-tab-group {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .supplier-tab {
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Subfilters adaptation */
  .toolbar-subfilters-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    padding: 8px !important;
  }

  .subfilters-left {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    width: 100% !important;
  }

  .subfilters-right {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    margin-left: 0 !important;
    padding-top: 6px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
  }

  .subfilter-group {
    flex: 1 1 calc(50% - 6px) !important;
    min-width: 130px !important;
  }

  .subfilters-right .subfilter-group {
    flex: 1 1 auto !important;
  }

  .subfilters-right .subfilter-reset-btn {
    flex-shrink: 0 !important;
  }

  .subfilter-select {
    width: 100% !important;
  }

  /* Tables minimum widths so inputs never get squeezed to 0 */
  .data-table th,
  .data-table td {
    padding: 10px 10px;
  }

  .data-table th:first-child,
  .data-table td:first-child {
    min-width: 180px;
  }

  .input-price-edit,
  .input-margin-edit {
    min-width: 60px;
  }
}

/* 3. Mobile Phones (<= 580px) */
@media (max-width: 580px) {
  .supplier-stats-row {
    grid-template-columns: 1fr;
  }
  .supplier-stat-card.manual {
    grid-column: span 1;
  }

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

  .toolbar-bottom-row {
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 4px;
    flex-wrap: nowrap;
  }

  .subfilter-group {
    flex: 1 1 100%;
    min-width: 100%;
  }

  .table-pagination-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .pagination-info {
    justify-content: space-between;
    width: 100%;
  }

  .pagination-nav {
    justify-content: center;
    width: 100%;
  }

  .pg-nav-text {
    display: none;
  }
}

/* ==========================================================================
   Product Delivery File Upload & Dropzone (Strict Dark Minimalist)
   ========================================================================== */
.dropzone {
  border: 1px dashed var(--border-active, #30363d);
  border-radius: var(--radius-card, 6px);
  background: var(--bg-card, #0d1117);
  padding: 14px 18px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent-cyan, #00f2fe);
  background: rgba(0, 242, 254, 0.04);
  box-shadow: 0 0 14px rgba(0, 242, 254, 0.12);
}

.dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.dropzone-icon {
  stroke: var(--text-muted, #8b949e);
  margin-bottom: 2px;
  transition: stroke 0.2s ease;
}

.dropzone:hover .dropzone-icon, .dropzone.dragover .dropzone-icon {
  stroke: var(--accent-cyan, #00f2fe);
}

.dropzone-text {
  font-size: 12.5px;
  color: var(--text-primary, #c9d1d9);
}

.dropzone-link {
  color: var(--accent-cyan, #00f2fe);
  text-decoration: underline;
  cursor: pointer;
}

.dropzone-hint {
  font-size: 11px;
  color: var(--text-muted, #8b949e);
}

.file-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #161b22;
  border: 1px solid var(--border-active, #30363d);
  border-radius: var(--radius-btn, 6px);
  padding: 7px 12px;
  font-size: 12px;
  color: var(--text-primary, #c9d1d9);
  transition: border-color 0.15s ease;
}

.file-item:hover {
  border-color: #484f58;
}

.file-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}

.file-badge {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 242, 254, 0.1);
  color: var(--accent-cyan, #00f2fe);
  border: 1px solid rgba(0, 242, 254, 0.25);
  flex-shrink: 0;
}

.file-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 250px;
}

.file-size {
  font-size: 11px;
  color: var(--text-muted, #8b949e);
  flex-shrink: 0;
}

.file-del-btn {
  background: transparent;
  border: none;
  color: var(--text-muted, #8b949e);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  font-size: 14px;
  line-height: 1;
}

.file-del-btn:hover {
  color: var(--accent-red, #f85149);
  background: rgba(248, 81, 73, 0.1);
}

.file-uploading-bar {
  height: 2px;
  background: var(--accent-cyan, #00f2fe);
  border-radius: 2px;
  margin-top: 4px;
  animation: pulse-bar 1s infinite alternate;
}

@keyframes pulse-bar {
  0% { opacity: 0.4; }
  100% { opacity: 1; }
}

/* ==========================================================================
   Broadcast Module - Minimalist Clean Styles
   ========================================================================== */

.broadcast-btn-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr 34px;
  gap: 8px;
  align-items: center;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-btn);
  padding: 6px 8px;
  transition: var(--transition-fast);
}

.broadcast-btn-row:hover {
  border-color: var(--border-active);
}

.broadcast-btn-row input {
  height: 32px;
  font-size: 12.5px;
  padding: 0 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: var(--text-main);
  outline: none;
}

.broadcast-btn-row input:focus {
  border-color: var(--accent-cyan);
}

.btn-remove-row {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-remove-row:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.25);
  color: var(--accent-red);
}

.empty-buttons-hint {
  font-size: 12px;
  color: var(--text-muted);
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.15);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-btn);
  text-align: center;
}

.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.3px;
}

.status-tag.completed {
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.status-tag.running, .status-tag.pending {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.status-tag.failed {
  background: rgba(239, 68, 68, 0.1);
  color: var(--accent-red);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.media-tag-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  padding: 1px 6px;
  border-radius: 3px;
  border: 1px solid var(--border-subtle);
}

.progress-track {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  transition: width 0.3s ease;
}

.progress-fill.completed {
  background: var(--accent-emerald);
}

.progress-fill.running {
  background: #f59e0b;
}

.progress-fill.failed {
  background: var(--accent-red);
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.spin-icon {
  animation: spin 0.85s linear infinite;
}

/* ==========================================================================
   FINTECH CRYPTO & DEPOSITS / TRANSACTIONS / SHARED DESIGN SYSTEM
   Clean matte carbon aesthetic, anti-AI vibe, strict responsive standards
   ========================================================================== */

/* Sub-navigation segmented bar */
.subnav-segmented-bar {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 3px;
  gap: 3px;
  margin-bottom: 18px;
  max-width: 100%;
}

.subnav-segment-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
  white-space: nowrap;
}

.subnav-segment-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.subnav-segment-btn.active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.subnav-segment-btn svg {
  color: inherit;
  opacity: 0.8;
}

.subnav-segment-btn.active svg {
  opacity: 1;
  color: var(--accent-cyan);
}

/* Filter select container */
.filter-select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.filter-select {
  height: 32px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-btn);
  color: var(--text-main);
  font-size: 12px;
  font-weight: 500;
  padding: 0 28px 0 10px;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: all var(--transition-fast);
}

.filter-select:hover {
  border-color: var(--border-active);
  background: rgba(255, 255, 255, 0.06);
}

.filter-select:focus {
  border-color: rgba(255, 255, 255, 0.25);
}

.filter-select option {
  background: #12151d;
  color: #f1f5f9;
}

.filter-select-wrap::after {
  content: '';
  position: absolute;
  right: 11px;
  top: 50%;
  width: 5px;
  height: 5px;
  border-right: 1.5px solid var(--text-secondary);
  border-bottom: 1.5px solid var(--text-secondary);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

/* Network & Token Badges */
.network-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono);
  padding: 2.5px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.network-badge .net-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.network-badge .net-sep {
  color: var(--text-muted);
  font-size: 10px;
  margin: 0 1px;
}

.network-badge.tron {
  border-color: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.04);
}
.network-badge.tron .net-dot { background: #ef4444; }

.network-badge.bsc {
  border-color: rgba(245, 158, 11, 0.25);
  color: #fde68a;
  background: rgba(245, 158, 11, 0.04);
}
.network-badge.bsc .net-dot { background: #f59e0b; }

.network-badge.ton {
  border-color: rgba(14, 165, 233, 0.25);
  color: #7dd3fc;
  background: rgba(14, 165, 233, 0.04);
}
.network-badge.ton .net-dot { background: #0ea5e9; }

.network-badge.btc {
  border-color: rgba(249, 115, 22, 0.25);
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.04);
}
.network-badge.btc .net-dot { background: #f97316; }

.network-badge.eth {
  border-color: rgba(129, 140, 248, 0.25);
  color: #c7d2fe;
  background: rgba(129, 140, 248, 0.04);
}
.network-badge.eth .net-dot { background: #818cf8; }

/* Status tags refined */
.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2.5px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
}

.status-tag .status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.status-tag.credited, .status-tag.confirmed {
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}
.status-tag.credited .status-dot, .status-tag.confirmed .status-dot {
  background: #10b981;
}

.status-tag.pending {
  background: rgba(245, 158, 11, 0.1);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.25);
}
.status-tag.pending .status-dot {
  background: #f59e0b;
}

.status-tag.failed {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
}
.status-tag.failed .status-dot {
  background: #ef4444;
}

/* Table cell micro-details */
.cell-datetime {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.cell-datetime .date-val {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

.cell-datetime .time-val {
  font-size: 11px;
  color: var(--text-muted);
}

.user-meta-name {
  font-weight: 600;
  color: var(--text-main);
  font-size: 12.5px;
  line-height: 1.3;
}

.user-meta-tag {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
}

.crypto-amount {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
}

.crypto-token {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-left: 2px;
}

.amount-usd-badge {
  font-size: 13px;
  font-weight: 600;
  color: #10b981;
  font-family: var(--font-mono);
}

/* Wallet address & Explorer TX links */
.wallet-cell-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.wallet-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.wallet-row .addr-text {
  font-size: 11.5px;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.btn-icon-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.btn-icon-copy:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-active);
  color: var(--text-main);
}

.btn-icon-copy.copied {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.35);
  color: #10b981;
}

.tx-row {
  display: flex;
  align-items: center;
}

.tx-hash-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #7dd3fc;
  text-decoration: none;
  transition: color var(--transition-fast);
  opacity: 0.85;
}

.tx-hash-link:hover {
  color: #38bdf8;
  opacity: 1;
  text-decoration: underline;
}

.tx-hash-link svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.tx-note-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 1.5px 6px;
  border-radius: 4px;
  border: 1px dashed var(--border-subtle);
  cursor: default;
}

.tx-note-badge svg {
  flex-shrink: 0;
  opacity: 0.6;
}

/* Actions in deposits table */
.deposit-actions-row {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}

.btn-icon-cancel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 4px;
  color: #f87171;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.btn-icon-cancel:hover {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.45);
  color: #ef4444;
}

.cell-empty-dash {
  font-size: 12px;
  color: var(--text-muted);
}

/* Pagination button refinements */
.btn-page-nav {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  font-size: 12px;
}

.pg-total-tag {
  color: var(--text-muted);
  font-size: 11.5px;
}

/* Promo code badges */
.promo-code-pill {
  display: inline-flex;
  padding: 2px 7px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 4px;
  color: #38bdf8;
  font-size: 12.5px;
  font-weight: 600;
}

/* Broadcast responsive grid */
.broadcast-grid {
  display: grid;
  grid-template-columns: minmax(340px, 1fr) minmax(360px, 1.25fr);
  gap: 20px;
  align-items: start;
}

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

/* Additional responsive rules */
@media (max-width: 860px) {
  .subnav-segmented-bar {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .subnav-segmented-bar::-webkit-scrollbar {
    display: none;
  }
  .subnav-segment-btn {
    flex: 1 0 auto;
    justify-content: center;
  }
  .dash-filters-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .dash-filter-group {
    width: 100%;
    flex-wrap: wrap;
  }
  .dash-filter-group.ml-auto {
    margin-left: 0;
  }
  .filter-select-wrap,
  .filter-select {
    width: 100%;
  }
  .supplier-tab-group {
    width: 100%;
    overflow-x: auto;
  }
}

@media (max-width: 580px) {
  .table-pagination-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .pagination-actions {
    display: flex;
    justify-content: space-between;
    width: 100%;
  }
  .btn-page-nav {
    flex: 1;
    justify-content: center;
  }
}

/* ---- Mirrors Section Styles ---- */
.mirrors-top-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

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

.mirror-metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mirror-metric-card.bonus-card {
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.35) 0%, rgba(15, 23, 42, 0.6) 100%);
  border-color: rgba(99, 102, 241, 0.3);
}

.mirror-metric-card.dimmed-mode {
  opacity: 0.45;
  filter: grayscale(0.4);
  border-color: rgba(255, 255, 255, 0.08) !important;
  background: rgba(15, 23, 42, 0.4) !important;
}

.mirror-metric-card.dimmed-mode:hover {
  opacity: 0.75;
  filter: none;
}

.mirror-metric-card.active-mode {
  box-shadow: 0 0 0 1px rgba(6, 182, 212, 0.35), 0 8px 20px -4px rgba(6, 182, 212, 0.15);
}

.mirror-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mcard-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.mcard-tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.mcard-badge {
  font-size: 10px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.mcard-badge.active-badge {
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.25);
}

.mcard-num {
  font-size: 24px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #f1f5f9;
  line-height: 1.1;
}

.text-emerald {
  color: #10b981;
}

.mcard-hint {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

.mirror-bonus-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

.input-prefix-wrap {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 0 10px;
  height: 34px;
}

.input-prefix {
  font-size: 13px;
  color: #94a3b8;
  font-family: var(--font-mono);
  font-weight: 600;
  margin-right: 4px;
}

.input-suffix {
  font-size: 10.5px;
  color: #64748b;
  font-weight: 600;
  margin-left: 4px;
  letter-spacing: 0.5px;
}

.mirror-bonus-input {
  background: transparent;
  border: none;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  width: 90px;
  outline: none;
}

.token-copy-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}

.token-code {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #94a3b8;
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-copy-token {
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  transition: color 0.15s ease;
}

.btn-copy-token:hover {
  color: #f1f5f9;
}

/* ==========================================================================
   Bot Menu Constructor & Telegram Live Preview Styles
   Strict Dark Minimalist Design, Vector SVG icons, No Unicode emojis
   ========================================================================== */

.botmenu-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 1fr);
  gap: 24px;
  align-items: flex-start;
  margin-top: 18px;
}

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

.botmenu-col-editor {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.botmenu-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  padding: 12px 16px;
  border-radius: var(--radius-card);
  border: 1px solid var(--border-subtle);
}

.botmenu-toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.botmenu-toolbar-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.botmenu-toolbar-hint {
  font-size: 12px;
  color: var(--text-secondary);
}

.botmenu-row-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color var(--transition-fast);
}

.botmenu-row-card:hover {
  border-color: var(--border-active);
}

.botmenu-row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 8px;
}

.botmenu-row-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.botmenu-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

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

.botmenu-btn-item {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all var(--transition-fast);
  position: relative;
}

.botmenu-btn-item.selected {
  border-color: #00f2fe !important;
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.25);
  background: rgba(0, 242, 254, 0.04);
}

.botmenu-btn-item.hover-sync {
  border-color: rgba(0, 242, 254, 0.55);
}

.botmenu-btn-item.dragging {
  opacity: 0.4;
  border-style: dashed;
}

.botmenu-btn-item.drag-over {
  border-top: 2px solid #00f2fe;
}

.botmenu-btn-item.disabled {
  opacity: 0.45;
  filter: grayscale(0.8);
}

.botmenu-btn-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.botmenu-btn-drag-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.botmenu-btn-handle {
  color: var(--text-muted);
  display: flex;
  align-items: center;
}

.botmenu-btn-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-secondary);
}

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

.btn-icon-subtle {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  border-radius: 4px;
  padding: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.btn-icon-subtle:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-subtle);
}

.btn-icon-subtle.danger:hover {
  color: var(--accent-red);
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.25);
}

.botmenu-btn-fields {
  display: grid;
  grid-template-columns: 2fr 1.6fr 1fr;
  gap: 8px;
  align-items: center;
}

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

.botmenu-field-input {
  width: 100%;
  padding: 7px 10px;
  font-size: 12px;
  border-radius: 5px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  outline: none;
  font-family: inherit;
  transition: border-color var(--transition-fast);
}

.botmenu-field-input:focus {
  border-color: var(--accent-cyan);
}

.botmenu-field-select {
  width: 100%;
  padding: 7px 10px;
  font-size: 12px;
  border-radius: 5px;
  background: #14171f;
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  outline: none;
  font-family: inherit;
}

/* Telegram Mockup Section (Right Column) */
.botmenu-col-preview {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tg-mock-tabs {
  display: flex;
  background: var(--bg-card);
  padding: 4px;
  border-radius: var(--radius-card);
  border: 1px solid var(--border-subtle);
  overflow-x: auto;
  gap: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.tg-mock-tabs::-webkit-scrollbar {
  height: 4px;
}

.tg-mock-tabs::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.tg-mock-tab {
  flex: 0 0 auto;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
  padding: 6px 9px;
  border-radius: 5px;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all var(--transition-fast);
}

.tg-mock-tab:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.tg-mock-tab.active {
  background: rgba(0, 242, 254, 0.12);
  color: var(--accent-cyan);
  font-weight: 600;
  border: 1px solid rgba(0, 242, 254, 0.25);
}

.tg-preview-mode-bar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(15, 23, 42, 0.6);
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
}

.tg-preview-mode-switch {
  display: flex;
  gap: 6px;
}

.tg-mode-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tg-mode-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.tg-mode-btn.active {
  background: rgba(0, 242, 254, 0.15);
  border-color: rgba(0, 242, 254, 0.4);
  color: var(--accent-cyan);
  font-weight: 600;
}

.tg-preview-hint {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
}

.tg-device-frame {
  background: #0f141c;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
}

.tg-header {
  background: #17212b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tg-header-bot {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0c0d12;
  font-weight: 700;
  font-size: 13px;
}

.tg-bot-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.tg-bot-name {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 4px;
}

.tg-bot-status {
  font-size: 11px;
  color: #6c7883;
}

.tg-chat-viewport {
  background: #0e1621;
  min-height: 380px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
  position: relative;
  background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 16px 16px;
}

.tg-bubble {
  background: #182533;
  border-radius: 10px;
  overflow: hidden;
  max-width: 95%;
  align-self: flex-start;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.tg-bubble-media {
  width: 100%;
  max-height: 160px;
  object-fit: cover;
  display: block;
  background: #111b24;
}

.tg-bubble-media-placeholder {
  width: 100%;
  height: 90px;
  background: linear-gradient(135deg, #182533 0%, #203042 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 11px;
  gap: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.tg-bubble-content {
  padding: 10px 12px;
  font-size: 12.5px;
  line-height: 1.45;
  color: #f5f5f5;
  white-space: pre-wrap;
  word-break: break-word;
}

.tg-bubble-time {
  float: right;
  font-size: 10px;
  color: #6c7883;
  margin-left: 8px;
  margin-top: 4px;
}

/* Telegram Inline Keyboard Simulation */
.tg-inline-keyboard {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 6px;
  width: 100%;
}

.tg-keyboard-row {
  display: flex;
  gap: 5px;
  width: 100%;
}

.tg-kb-btn {
  flex: 1;
  background: #2b5278;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
  padding: 8px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  transition: all 0.12s ease;
  user-select: none;
  position: relative;
}

.tg-kb-btn:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.tg-kb-btn:active {
  transform: translateY(0);
}

.tg-kb-btn.selected {
  outline: 2px solid #00f2fe !important;
  outline-offset: 1px;
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.55);
  filter: brightness(1.2);
}

.tg-kb-btn.hover-sync {
  outline: 1.5px dashed rgba(0, 242, 254, 0.8) !important;
  outline-offset: 1px;
}

.tg-kb-btn-idx {
  position: absolute;
  top: 2px;
  right: 4px;
  font-size: 8px;
  font-family: var(--font-mono);
  opacity: 0.65;
  pointer-events: none;
}

.tg-kb-btn.style-primary {
  background: #2b5278;
  color: #ffffff;
}

.tg-kb-btn.style-success {
  background: #1e5a32;
  color: #bbf7d0;
}

.tg-kb-btn.style-danger {
  background: #7a2727;
  color: #fecaca;
}

.tg-kb-btn-icon {
  display: flex;
  align-items: center;
  opacity: 0.9;
}

.botmenu-btn-pos-badge {
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.22);
  color: var(--accent-cyan);
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

/* Active Button Inspector Toolbar under Preview */
.tg-selected-btn-card {
  background: #0f172a;
  border: 1px solid rgba(0, 242, 254, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 16px rgba(0, 242, 254, 0.12);
  border-radius: var(--radius-card);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: fadeIn 0.2s ease;
}

.tg-selected-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tg-selected-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}

.tg-selected-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.tg-btn-tool {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 4px 8px;
  border-radius: 5px;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tg-btn-tool:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.tg-btn-tool.cyan {
  background: rgba(0, 242, 254, 0.12);
  border-color: rgba(0, 242, 254, 0.3);
  color: var(--accent-cyan);
}

.tg-btn-tool.cyan:hover {
  background: rgba(0, 242, 254, 0.22);
}

.tg-btn-tool.danger:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: var(--accent-red);
}


