/* ==========================================================================
   Amazon Sellers & Geocoded Map Intelligence Styles (Stripe Minimalist Theme)
   Strict adherence to GEMINI.md Rule 1 (Clean white/light-gray, no dark/neon/glow)
   ========================================================================== */

/* App Views Layout */
.app-view {
  display: block;
}

.app-view.hidden {
  display: none !important;
}

/* KPI Cards Grid */
.sellers-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

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

@media (max-width: 640px) {
  .sellers-kpi-grid {
    grid-template-columns: 1fr;
  }
}

.kpi-card {
  background: #ffffff;
  border: 1px solid #e3e8ee;
  border-radius: 8px;
  padding: 16px 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.kpi-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.kpi-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #697386;
  margin-bottom: 6px;
}

.kpi-value {
  font-size: 26px;
  font-weight: 700;
  color: #0a2540;
  line-height: 1.2;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.kpi-tag {
  font-size: 12px;
  font-weight: 600;
  color: #00875a;
  background: #e3fcef;
  padding: 2px 6px;
  border-radius: 12px;
}

.kpi-sub {
  font-size: 12px;
  color: #8792a2;
  margin-top: 4px;
}

/* View Mode Toggles */
.view-mode-toggles {
  display: inline-flex;
  background: #f1f4f8;
  padding: 3px;
  border-radius: 6px;
  border: 1px solid #e3e8ee;
  gap: 2px;
}

.btn-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 500;
  color: #4f5b66;
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-toggle:hover {
  color: #0a2540;
}

.btn-toggle.active {
  background: #ffffff;
  color: #635bff;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Map Card Container */
.map-card-wrap {
  border: 1px solid #e3e8ee;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  margin-bottom: 20px;
  transition: all 0.2s ease;
}

.map-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: #fafbfc;
  border-bottom: 1px solid #e3e8ee;
  font-size: 12px;
}

.map-status-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: #3c4257;
}

.status-pulse-dot {
  width: 8px;
  height: 8px;
  background: #00d924;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(0, 217, 36, 0.2);
  display: inline-block;
}

.map-tip {
  color: #697386;
  font-style: italic;
  font-size: 12px;
}

.map-controls-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-map-preset {
  background: #ffffff;
  border: 1px solid #e3e8ee;
  border-radius: 6px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 500;
  color: #4f566b;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-map-preset:hover {
  background: #f7fafc;
  color: #0a2540;
  border-color: #cbd5e1;
}

.btn-map-preset.active {
  background: #f4f3ff;
  color: #635bff;
  border-color: #c4b5fd;
  font-weight: 600;
}

.sync-viewport-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 500;
  color: #4f566b;
  background: #f1f4f8;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid #e3e8ee;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.sync-viewport-label:hover {
  background: #e8ecf2;
  color: #0a2540;
}

.sync-viewport-label input[type="checkbox"] {
  accent-color: #635bff;
  cursor: pointer;
}

#sellersLeafletMap {
  height: 520px;
  width: 100%;
  background: #f8fafc;
  z-index: 10;
}

/* Leaflet Custom Minimalist Popup */
.leaflet-popup-content-wrapper {
  background: #ffffff !important;
  color: #3c4257 !important;
  border-radius: 8px !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05) !important;
  border: 1px solid #e3e8ee !important;
  padding: 0 !important;
}

.leaflet-popup-content {
  margin: 14px 16px !important;
  line-height: 1.4 !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

.leaflet-popup-tip {
  background: #ffffff !important;
  box-shadow: none !important;
  border: 1px solid #e3e8ee !important;
}

/* Seller Popup Card */
.seller-popup-card {
  font-size: 13px;
}

.seller-popup-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f4f8;
}

.seller-popup-name {
  font-size: 14px;
  font-weight: 700;
  color: #0a2540;
}

.seller-popup-biz {
  font-size: 11px;
  color: #697386;
  margin-top: 1px;
}

.badge-fba {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: #e3fcef;
  color: #00875a;
  border: 1px solid #abf5d1;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.badge-fbm {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  background: #f1f4f8;
  color: #4f5b66;
  border: 1px solid #e3e8ee;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.seller-popup-address {
  font-size: 12px;
  color: #4f5b66;
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.seller-popup-meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #697386;
  margin-bottom: 10px;
  background: #f8fafc;
  padding: 6px 8px;
  border-radius: 4px;
}

.seller-popup-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.btn-popup-primary {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #635bff;
  color: #ffffff !important;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 4px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-popup-primary:hover {
  background: #0a2540;
}

.btn-popup-secondary {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: #0a2540 !important;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 4px;
  text-decoration: none;
  border: 1px solid #c1c9d2;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-popup-secondary:hover {
  background: #f8fafc;
  border-color: #a1abb7;
}

/* Custom Marker Cluster Styling (Stripe Blurple Theme) */
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
  background-color: rgba(99, 91, 255, 0.2) !important;
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
  background-color: #635bff !important;
  color: #ffffff !important;
  font-family: 'Inter', sans-serif !important;
  font-weight: 700 !important;
  font-size: 12px !important;
  border: 2px solid #ffffff !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
}

/* Sellers Table Styling */
.table-seller-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.seller-avatar {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: #e3e8ee;
  color: #4f5b66;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}

.seller-meta-name {
  font-weight: 600;
  color: #0a2540;
  display: block;
}

.seller-meta-sub {
  font-size: 11px;
  color: #697386;
  font-family: monospace;
}

.coord-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f1f4f8;
  border: 1px solid #e3e8ee;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 11px;
  color: #4f5b66;
  cursor: pointer;
  transition: all 0.15s ease;
}

.coord-pill:hover {
  background: #e3e8ee;
  color: #0a2540;
}

.btn-locate {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  color: #635bff;
  background: #f4f3ff;
  border: 1px solid #dcd7fe;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-locate:hover {
  background: #635bff;
  color: #ffffff;
  border-color: #635bff;
}

.btn-amz-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 500;
  color: #ff9900;
  background: #fff8e6;
  border: 1px solid #ffe2a8;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn-amz-link:hover {
  background: #ff9900;
  color: #ffffff;
  border-color: #ff9900;
}

/* Seller Drawer Sections */
.seller-drawer-section {
  margin-bottom: 24px;
}

.seller-drawer-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #697386;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.address-comparison-box {
  background: #f8fafc;
  border: 1px solid #e3e8ee;
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 10px;
}

.address-tag-verified {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: #00875a;
  background: #e3fcef;
  padding: 2px 6px;
  border-radius: 3px;
  margin-bottom: 6px;
  display: inline-block;
}

.address-tag-original {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: #697386;
  background: #e3e8ee;
  padding: 2px 6px;
  border-radius: 3px;
  margin-bottom: 6px;
  display: inline-block;
}

.address-content-text {
  font-size: 13px;
  font-weight: 500;
  color: #0a2540;
  line-height: 1.4;
}

.detail-table-kv {
  width: 100%;
  border-collapse: collapse;
}

.detail-table-kv tr {
  border-bottom: 1px solid #f1f4f8;
}

.detail-table-kv td {
  padding: 8px 0;
  font-size: 13px;
}

.detail-table-kv td:first-child {
  color: #697386;
  width: 140px;
}

.detail-table-kv td:last-child {
  color: #0a2540;
  font-weight: 500;
  text-align: right;
}

/* Seller Drawer Layout Width Enhancement */
#sellerDrawerOverlay .stripe-drawer {
  width: 640px;
  max-width: 95vw;
}

/* Products Count Badge in Table & Map Popup */
.badge-products-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  color: #53389e;
  background: #f4f3ff;
  border: 1px solid #dcd7fe;
  border-radius: 12px;
  white-space: nowrap;
}

.badge-storefront-products {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  font-size: 11px;
  font-weight: 600;
  color: #53389e;
  background: #f4f3ff;
  border: 1px solid #dcd7fe;
  border-radius: 4px;
  margin-top: 4px;
}

/* Storefront Catalog & Inventory Breakdown in Drawer */
.asins-summary-card {
  background: #fafbfc;
  border: 1px solid #e3e8ee;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 16px;
}

.asins-summary-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  color: #697386;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.asins-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.asins-metric-box {
  background: #ffffff;
  border: 1px solid #e3e8ee;
  border-radius: 6px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.asins-metric-num {
  font-size: 18px;
  font-weight: 700;
  color: #0a2540;
  display: flex;
  align-items: center;
  gap: 6px;
}

.asins-metric-label {
  font-size: 11px;
  font-weight: 500;
  color: #697386;
}

/* Storefront Catalog Section & Search/Filters */
.asins-toolbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.asins-filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.asins-search-input {
  flex: 1;
  min-width: 180px;
  background: #ffffff;
  border: 1px solid #e3e8ee;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  color: #0a2540;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.asins-search-input:focus {
  border-color: #635bff;
  box-shadow: 0 0 0 2px rgba(99, 91, 255, 0.12);
}

.asins-filter-pills {
  display: inline-flex;
  background: #f1f4f8;
  padding: 2px;
  border-radius: 6px;
  gap: 2px;
}

.asins-pill {
  border: none;
  background: transparent;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 500;
  color: #4f566b;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.asins-pill:hover {
  color: #0a2540;
}

.asins-pill.active {
  background: #ffffff;
  color: #635bff;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Catalog ASINs Table */
.asins-table-wrap {
  border: 1px solid #e3e8ee;
  border-radius: 6px;
  background: #ffffff;
  overflow: hidden;
  max-height: 420px;
  overflow-y: auto;
}

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

.asins-table th {
  background: #fafbfc;
  color: #697386;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px 10px;
  border-bottom: 1px solid #e3e8ee;
  position: sticky;
  top: 0;
  z-index: 1;
}

.asins-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #f1f4f8;
  color: #3c4257;
  vertical-align: middle;
}

.asins-table tr:hover td {
  background: #f8fafc;
}

.asin-link {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 600;
  color: #0066c0;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
}

.asin-link:hover {
  text-decoration: underline;
  color: #c45500;
}

.badge-status-active {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 600;
  color: #00875a;
  background: #e3fcef;
  border-radius: 3px;
}

.badge-status-removed {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 600;
  color: #697386;
  background: #f1f4f8;
  border-radius: 3px;
}

/* Pagination inside drawer */
.asins-pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 4px 0 4px;
  font-size: 11px;
  color: #697386;
}

.asins-page-btn {
  background: #ffffff;
  border: 1px solid #e3e8ee;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 500;
  color: #4f566b;
  cursor: pointer;
  transition: all 0.15s ease;
}

.asins-page-btn:hover:not(:disabled) {
  background: #f8fafc;
  color: #0a2540;
  border-color: #cbd5e1;
}

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

/* ==========================================================================
   Saved Sellers Feature (Stripe Minimalist Theme)
   ========================================================================== */

/* Drawer Header Save Button */
.btn-drawer-header-save {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #dcd7fe;
  color: #635bff;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-drawer-header-save:hover {
  background: #f4f3ff;
  border-color: #635bff;
}

.btn-drawer-header-save.is-saved {
  background: #635bff;
  border-color: #635bff;
  color: #ffffff;
}

.btn-drawer-header-save.is-saved:hover {
  background: #53389e;
  border-color: #53389e;
}

/* Drawer Body Save Button */
.btn-drawer-body-save {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #dcd7fe;
  color: #635bff;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-drawer-body-save:hover {
  background: #f4f3ff;
  border-color: #635bff;
}

.btn-drawer-body-save.is-saved {
  background: #635bff;
  border-color: #635bff;
  color: #ffffff;
}

.btn-drawer-body-save.is-saved:hover {
  background: #53389e;
  border-color: #53389e;
}

/* Map Popup Card Save Button */
.btn-popup-save {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #ffffff;
  border: 1px solid #e3e8ee;
  color: #4f566b;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-popup-save:hover {
  background: #f8fafc;
  border-color: #635bff;
  color: #635bff;
}

.btn-popup-save.is-saved {
  background: #f4f3ff;
  border-color: #635bff;
  color: #635bff;
  font-weight: 700;
}

/* Table Row Save Icon Button */
.btn-table-save {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: #ffffff;
  border: 1px solid #e3e8ee;
  color: #a3acb9;
  border-radius: 4px;
  cursor: pointer;
  vertical-align: middle;
  transition: all 0.15s ease;
}

.btn-table-save:hover {
  background: #f4f3ff;
  border-color: #dcd7fe;
  color: #635bff;
}

.btn-table-save.is-saved {
  background: #f4f3ff;
  border-color: #635bff;
  color: #635bff;
}

/* Saved Empty State */
.saved-empty-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}

.saved-empty-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #f4f3ff;
  color: #635bff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.saved-empty-title {
  font-size: 15px;
  font-weight: 600;
  color: #0a2540;
  margin-bottom: 6px;
}

.saved-empty-desc {
  font-size: 13px;
  color: #697386;
  max-width: 420px;
  line-height: 1.5;
  margin-bottom: 16px;
}


