/* =====================================================
   YELLOWBOX ML HUB — style.css
   ===================================================== */

/* ---------- RESET & BASE ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0d0d0d;
  color: #e8e8e8;
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ---------- SCROLLBAR ---------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #1a1a1a; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #f5c518; }

/* ---------- SIDEBAR ---------- */
.sidebar {
  width: 220px;
  min-width: 220px;
  background: #161616;
  border-right: 1px solid #252525;
  display: flex;
  flex-direction: column;
  transition: width 0.25s ease, min-width 0.25s ease;
  overflow: hidden;
  position: relative;
  z-index: 100;
}
.sidebar.collapsed {
  width: 60px;
  min-width: 60px;
}
.sidebar.collapsed .logo-text,
.sidebar.collapsed .nav-section-label,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .sidebar-collapse span {
  display: none;
}
.sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 10px 0;
}
.sidebar.collapsed .sidebar-collapse {
  justify-content: center;
  padding: 12px 0;
}

/* Logo */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px;
  border-bottom: 1px solid #252525;
  flex-shrink: 0;
}
.logo-icon {
  width: 34px;
  height: 34px;
  background: #f5c518;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 12px;
  color: #000;
  flex-shrink: 0;
}
.logo-title {
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  white-space: nowrap;
}
.logo-sub {
  font-size: 10px;
  color: #888;
  white-space: nowrap;
}
.logo-text { display: flex; flex-direction: column; }

/* Nav */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 0;
}
.nav-section-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: #555;
  padding: 14px 16px 6px;
  white-space: nowrap;
  overflow: hidden;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  color: #999;
  text-decoration: none;
  border-radius: 0;
  transition: all 0.15s;
  cursor: pointer;
  white-space: nowrap;
  border-left: 3px solid transparent;
  font-size: 13px;
}
.nav-item:hover { color: #f5c518; background: rgba(245, 197, 24, 0.06); }
.nav-item.active {
  color: #f5c518;
  background: rgba(245, 197, 24, 0.1);
  border-left-color: #f5c518;
}
.nav-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Collapse button */
.sidebar-collapse {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: none;
  border: none;
  border-top: 1px solid #252525;
  color: #666;
  cursor: pointer;
  font-size: 12px;
  transition: color 0.15s;
  width: 100%;
  white-space: nowrap;
}
.sidebar-collapse:hover { color: #f5c518; }

/* ---------- MAIN WRAPPER ---------- */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.25s;
}

/* ---------- TOPBAR ---------- */
.topbar {
  height: 52px;
  background: #161616;
  border-bottom: 1px solid #252525;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  flex-shrink: 0;
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.topbar-title { font-weight: 700; font-size: 16px; color: #fff; }
.badge-live {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 7px;
  letter-spacing: 0.5px;
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.6} }

.topbar-right { display: flex; align-items: center; gap: 14px; }
.online-info { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #777; }
.online-dot { color: #22c55e; font-size: 10px; }
.tz-info { color: #555; }
.topbar-clock { font-family: monospace; font-size: 13px; color: #aaa; letter-spacing: 1px; }

/* Buttons */
.btn-add-vendor {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f5c518;
  color: #000;
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-add-vendor:hover { background: #ffd740; transform: translateY(-1px); }

.btn-primary {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f5c518;
  color: #000;
  border: none;
  border-radius: 6px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-primary:hover { background: #ffd740; }

.btn-csv {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #252525;
  color: #ccc;
  border: 1px solid #333;
  border-radius: 6px;
  padding: 7px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-csv:hover { background: #2e2e2e; color: #f5c518; border-color: #f5c518; }

/* ---------- CONTENT ---------- */
.content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  position: relative;
}

/* ---------- PAGES ---------- */
.page { display: none; }
.page.active { display: block; }

.page-header { margin-bottom: 18px; }
.page-title { font-size: 22px; font-weight: 800; color: #fff; }
.page-subtitle { font-size: 12px; color: #666; margin-top: 3px; }

.page-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

/* ---------- METRIC CARDS ---------- */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
@media (max-width: 1400px) { .metrics-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .metrics-grid { grid-template-columns: repeat(2, 1fr); } }

.metric-card {
  background: #1a1a1a;
  border: 1px solid #252525;
  border-radius: 8px;
  padding: 14px 16px;
  transition: border-color 0.2s;
}
.metric-card:hover { border-color: #f5c518; }

.metric-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #666;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.metric-value {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.metric-value.metric-lg { font-size: 18px; }
.metric-sub {
  font-size: 11px;
  color: #666;
  margin-top: 5px;
}
.metric-sub.green { color: #22c55e; }

/* ---------- CHARTS ---------- */
.charts-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.charts-row:has(.chart-large) { grid-template-columns: 2fr 1fr; }
.charts-row:has(.chart-card:nth-child(3)) { grid-template-columns: repeat(3, 1fr); }

.chart-card {
  background: #1a1a1a;
  border: 1px solid #252525;
  border-radius: 8px;
  padding: 14px;
  overflow: hidden;
}
.chart-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.chart-icon { font-size: 14px; }
.chart-title { font-size: 12px; font-weight: 600; color: #ccc; flex: 1; }
.chart-actions { display: flex; gap: 8px; }
.chart-select {
  background: #252525;
  border: 1px solid #333;
  color: #ccc;
  border-radius: 5px;
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
  outline: none;
}
.chart-select:focus { border-color: #f5c518; }
.chart-body { position: relative; min-height: 180px; display: flex; align-items: center; justify-content: center; }
.chart-large .chart-body { min-height: 210px; }
.chart-donut-wrap { min-height: 180px; }
.chart-body canvas { width: 100% !important; }
.chart-no-data {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #555;
  font-size: 12px;
  pointer-events: none;
}
.chart-no-data.hidden { display: none; }

/* ---------- SEARCH / TABLE ---------- */
.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 160px;
}
.search-icon {
  position: absolute;
  left: 10px;
  color: #555;
}
.search-input-wrap input {
  width: 100%;
  background: #1e1e1e;
  border: 1px solid #2e2e2e;
  color: #ddd;
  border-radius: 6px;
  padding: 8px 10px 8px 34px;
  font-size: 12px;
  outline: none;
  transition: border-color 0.2s;
}
.search-input-wrap input:focus { border-color: #f5c518; }
.search-results { font-size: 11px; color: #666; white-space: nowrap; }

.vendor-search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
  background: #1a1a1a;
  border: 1px solid #252525;
  border-radius: 8px;
}

/* Table */
.vendor-table-wrap {
  background: #1a1a1a;
  border: 1px solid #252525;
  border-radius: 8px;
  overflow: auto;
}
.vendor-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.vendor-table th {
  background: #1e1e1e;
  color: #888;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid #252525;
  white-space: nowrap;
}
.vendor-table td {
  padding: 11px 14px;
  border-bottom: 1px solid #1e1e1e;
  color: #ccc;
  vertical-align: middle;
}
.vendor-table tr:last-child td { border-bottom: none; }
.vendor-table tr:hover td { background: rgba(245,197,24,0.04); }
.empty-row td {
  text-align: center;
  color: #555;
  padding: 30px;
}

/* Status badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
}
.badge-green { background: rgba(34,197,94,0.15); color: #22c55e; }
.badge-yellow { background: rgba(245,197,24,0.15); color: #f5c518; }
.badge-red { background: rgba(239,68,68,0.15); color: #ef4444; }
.badge-gray { background: rgba(150,150,150,0.15); color: #888; }
.badge-blue { background: rgba(59,130,246,0.15); color: #3b82f6; }

/* ---------- VENDOR CARD (vendedores page) ---------- */
.vendors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.vendor-card {
  background: #1a1a1a;
  border: 1px solid #252525;
  border-radius: 10px;
  padding: 18px;
  cursor: pointer;
  transition: all 0.2s;
}
.vendor-card:hover { border-color: #f5c518; transform: translateY(-2px); }
.vendor-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.vendor-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f5c518, #ff6b35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  color: #000;
  flex-shrink: 0;
}
.vendor-card-name { font-size: 14px; font-weight: 700; color: #fff; }
.vendor-card-id { font-size: 11px; color: #666; }
.vendor-card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}
.vendor-stat { background: #242424; border-radius: 6px; padding: 8px 10px; }
.vendor-stat-label { font-size: 9px; color: #666; text-transform: uppercase; letter-spacing: 0.5px; }
.vendor-stat-value { font-size: 14px; font-weight: 700; color: #f5c518; margin-top: 2px; }
.vendor-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
.btn-sm {
  flex: 1;
  padding: 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
}
.btn-sm-primary { background: #f5c518; color: #000; }
.btn-sm-primary:hover { background: #ffd740; }
.btn-sm-danger { background: rgba(239,68,68,0.15); color: #ef4444; border: 1px solid rgba(239,68,68,0.3); }
.btn-sm-danger:hover { background: rgba(239,68,68,0.25); }

/* ---------- MODAL ---------- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: #1a1a1a;
  border: 1px solid #2e2e2e;
  border-radius: 12px;
  width: 100%;
  max-width: 900px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid #252525;
}
.modal-header h2 { font-size: 18px; font-weight: 800; color: #fff; }
.modal-sub { font-size: 11px; color: #666; margin-top: 3px; }
.modal-close {
  background: none;
  border: none;
  color: #666;
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  transition: color 0.15s;
}
.modal-close:hover { color: #f5c518; }
.modal-tabs {
  display: flex;
  gap: 0;
  padding: 0 20px;
  border-bottom: 1px solid #252525;
  background: #161616;
}
.modal-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: #777;
  font-size: 12px;
  font-weight: 600;
  padding: 10px 16px;
  cursor: pointer;
  transition: all 0.15s;
}
.modal-tab:hover { color: #ccc; }
.modal-tab.active { color: #f5c518; border-bottom-color: #f5c518; }
.modal-content { flex: 1; overflow-y: auto; padding: 16px 20px; }
.modal-tab-pane { display: none; }
.modal-tab-pane.active { display: block; }
.modal-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

/* ---------- CATALOG GRID ---------- */
.catalog-group {
  margin-bottom: 16px;
  padding: 14px;
  background: linear-gradient(180deg, #141414 0%, #101010 100%);
  border: 1px solid #242424;
  border-radius: 14px;
}
.catalog-group--full {
  border-color: rgba(245,197,24,0.35);
  box-shadow: inset 0 0 0 1px rgba(245,197,24,0.06);
}
.catalog-group-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.catalog-group-title {
  font-size: 13px;
  font-weight: 800;
  color: #f5c518;
}
.catalog-group-sub {
  font-size: 11px;
  color: #777;
  margin-top: 3px;
}
.catalog-group-count {
  min-width: 26px;
  height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(245,197,24,0.12);
  color: #f5c518;
  border: 1px solid rgba(245,197,24,0.18);
  font-size: 11px;
  font-weight: 800;
}
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 14px;
}
.catalog-item {
  background: linear-gradient(180deg, #1d1d1d 0%, #171717 100%);
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s;
}
.catalog-item:hover { border-color: rgba(245,197,24,0.5); transform: translateY(-1px); }
.catalog-item--full {
  border-color: rgba(245,197,24,0.34);
  box-shadow: 0 10px 24px rgba(245,197,24,0.06);
}
.catalog-item-media {
  cursor: pointer;
  background: #252525;
}
.catalog-item-img {
  width: 100%;
  height: 140px;
  object-fit: contain;
  background: #252525;
  padding: 8px;
}
.catalog-item-img-placeholder {
  width: 100%;
  height: 140px;
  background: #252525;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
}
.catalog-item-info { padding: 10px; }
.catalog-item-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.catalog-open-link {
  margin-left: auto;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid #3a3a3a;
  background: #202020;
  color: #f5c518;
  cursor: pointer;
  flex-shrink: 0;
}
.catalog-open-link:hover { background: #2b2b2b; border-color: #f5c518; }
.catalog-item-title {
  font-size: 11px;
  color: #ccc;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
  line-height: 1.5;
  flex: 1;
}
.catalog-item-price { font-size: 16px; font-weight: 800; color: #f5c518; margin-top: 4px; }
.catalog-item-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 7px;
}
.catalog-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid #313131;
  color: #9e9e9e;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.catalog-chip--full {
  background: linear-gradient(180deg, rgba(245,197,24,0.18), rgba(245,197,24,0.08));
  border-color: rgba(245,197,24,0.3);
  color: #f5c518;
}
.catalog-item-stock { font-size: 10px; color: #888; margin-top: 7px; }
.catalog-item-id { font-size: 9px; color: #444; margin-top: 4px; font-family: monospace; }
.catalog-pricing-inline {
  margin-top: 10px;
  padding: 10px;
  background: linear-gradient(180deg, #141414 0%, #111 100%);
  border: 1px solid #262626;
  border-radius: 10px;
}
.catalog-pricing-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}
.catalog-pricing-title {
  font-size: 11px;
  font-weight: 800;
  color: #f5c518;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.catalog-pricing-live {
  font-size: 10px;
  color: #6f6f6f;
  line-height: 1.4;
}
.catalog-pricing-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.catalog-pricing-field span {
  display: block;
  font-size: 10px;
  color: #777;
  margin-bottom: 5px;
  font-weight: 700;
}
.catalog-pricing-field input {
  width: 100%;
  height: 36px;
  background: #202020;
  border: 1px solid #323232;
  color: #eee;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 12px;
  outline: none;
}
.catalog-pricing-field input:focus { border-color: #f5c518; }
.catalog-pricing-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}
.catalog-price-pill {
  padding: 9px 8px;
  border-radius: 10px;
  background: #1b1b1b;
  border: 1px solid #2a2a2a;
}
.catalog-price-pill span {
  display: block;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #666;
  margin-bottom: 4px;
  font-weight: 700;
}
.catalog-price-pill strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: #f5c518;
  line-height: 1.1;
}
.catalog-price-pill small {
  display: block;
  font-size: 10px;
  color: #888;
  margin-top: 4px;
}
.catalog-price-pill--pos strong,
.catalog-price-pill--pos small { color: #22c55e; }
.catalog-price-pill--neg strong,
.catalog-price-pill--neg small { color: #ef4444; }

/* ---------- CATALOG VENDOR GROUP (ACCORDION) ---------- */
.catalog-summary {
  font-size: 11px;
  color: #666;
  margin-bottom: 16px;
  padding: 8px 12px;
  background: #161616;
  border-radius: 6px;
  border: 1px solid #252525;
}
.catalog-vendor-section {
  margin-bottom: 10px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #2a2a2a;
}
.catalog-vendor-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #1a1a1a 0%, #202020 100%);
  border-left: 4px solid #f5c518;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s ease;
  margin-bottom: 0;
}
.catalog-vendor-header:hover {
  background: linear-gradient(135deg, #222 0%, #272727 100%);
}
.catalog-vendor-header--open {
  background: linear-gradient(135deg, #1e1a00 0%, #222000 100%) !important;
  border-left-color: #f5c518;
}
.catalog-vendor-avatar {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #f5c518, #e6b800);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  color: #000;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(245,197,24,0.3);
}
.catalog-vendor-info { flex: 1; min-width: 0; }
.catalog-vendor-name {
  font-size: 15px;
  font-weight: 700;
  color: #f0f0f0;
  letter-spacing: 0.3px;
}
.catalog-vendor-meta {
  font-size: 11px;
  color: #666;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.catalog-vendor-chevron {
  font-size: 12px;
  color: #f5c518;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}
.catalog-vendor-body {
  background: #111;
  border-top: 1px solid #2a2a2a;
  padding: 16px;
}
.catalog-items-count {
  font-size: 11px;
  color: #777;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #1e1e1e;
}
@media (max-width: 680px) {
  .catalog-grid { grid-template-columns: 1fr; }
  .catalog-pricing-inputs,
  .catalog-pricing-pills { grid-template-columns: 1fr; }
}

/* ---------- METRICAS ERRO 403 ---------- */
.metricas-error-403 {
  background: linear-gradient(135deg, #1a0a0a 0%, #200e0e 100%);
  border: 1px solid #3a1515;
  border-left: 4px solid #ff4d4d;
  border-radius: 12px;
  padding: 28px 24px;
  text-align: center;
  margin: 8px 0;
}
.metricas-error-icon {
  font-size: 36px;
  margin-bottom: 12px;
  display: block;
}
.metricas-error-title {
  font-size: 16px;
  font-weight: 700;
  color: #ff6b6b;
  margin-bottom: 10px;
}
.metricas-error-desc {
  font-size: 13px;
  color: #888;
  line-height: 1.6;
  margin-bottom: 18px;
}
.metricas-error-desc strong { color: #f5c518; }
.metricas-error-steps {
  background: #1a1a1a;
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 20px;
  text-align: left;
  display: inline-block;
  min-width: 280px;
}
.metricas-error-step {
  font-size: 12px;
  color: #aaa;
  padding: 4px 0;
  line-height: 1.5;
}
.metricas-error-step strong { color: #f5c518; }
.btn-secondary {
  background: transparent;
  border: 1px solid #444;
  color: #888;
  padding: 8px 18px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s ease;
}
.btn-secondary:hover {
  border-color: #666;
  color: #ccc;
}


/* ---------- METRICAS AVISO PERMISSAO ---------- */
.metricas-aviso-permissao {
  margin-top: 16px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #1a1500 0%, #1e1900 100%);
  border: 1px solid #3a2e00;
  border-left: 4px solid #f5c518;
  border-radius: 10px;
  text-align: center;
}
/* ---------- EMPTY STATE ---------- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: #555;
}
.empty-icon { font-size: 48px; margin-bottom: 14px; }
.empty-state h3 { font-size: 16px; color: #888; margin-bottom: 8px; }
.empty-state p { font-size: 13px; margin-bottom: 16px; }

/* ---------- REPORTS ---------- */
.reports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px;
}
.report-card {
  background: #1a1a1a;
  border: 1px solid #252525;
  border-radius: 8px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.report-card:hover { border-color: #f5c518; }
.report-icon { font-size: 32px; flex-shrink: 0; }
.report-info { flex: 1; }
.report-info h3 { font-size: 14px; font-weight: 700; color: #fff; margin-bottom: 4px; }
.report-info p { font-size: 11px; color: #666; }

/* ---------- SETTINGS ---------- */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.settings-card {
  background: #1a1a1a;
  border: 1px solid #252525;
  border-radius: 8px;
  padding: 20px;
}
.settings-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
}
.form-group { margin-bottom: 14px; }
.form-group label {
  display: block;
  font-size: 11px;
  color: #888;
  margin-bottom: 5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-input {
  width: 100%;
  background: #252525;
  border: 1px solid #333;
  color: #ddd;
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 12px;
  outline: none;
  transition: border-color 0.2s;
}
.form-input:focus { border-color: #f5c518; }
.toggle-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.toggle-group label:first-child { margin-bottom: 0; font-size: 13px; color: #ccc; text-transform: none; letter-spacing: 0; }
.toggle { position: relative; display: inline-block; width: 38px; height: 22px; }
.toggle input { display: none; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: #333;
  border-radius: 22px;
  cursor: pointer;
  transition: 0.3s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #666;
  bottom: 3px;
  left: 3px;
  transition: 0.3s;
}
.toggle input:checked + .toggle-slider { background: rgba(245,197,24,0.2); }
.toggle input:checked + .toggle-slider::before { background: #f5c518; transform: translateX(16px); }
.settings-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #252525;
  font-size: 12px;
  color: #888;
}
.settings-info-row:last-child { border-bottom: none; }
.settings-info-row span:last-child { color: #ccc; }

/* ---------- TOAST ---------- */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #222;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 12px 16px;
  min-width: 260px;
  max-width: 380px;
  animation: slideIn 0.3s ease;
  font-size: 13px;
  color: #ddd;
}
.toast.success { border-left: 3px solid #22c55e; }
.toast.error { border-left: 3px solid #ef4444; }
.toast.info { border-left: 3px solid #3b82f6; }
.toast.warning { border-left: 3px solid #f5c518; }
@keyframes slideIn { from { opacity:0; transform:translateX(30px); } to { opacity:1; transform:translateX(0); } }

/* ---------- LOADING ---------- */
.loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  z-index: 9998;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
}
.loading-overlay.open { display: flex; }
.loading-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid #333;
  border-top-color: #f5c518;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-overlay p { color: #ccc; font-size: 14px; }

/* ---------- UTIL ---------- */
.red { color: #ef4444 !important; }
.green { color: #22c55e !important; }
.text-yellow { color: #f5c518; }
.text-muted { color: #666; }

/* Progress bar */
.progress-bar-wrap { background: #252525; border-radius: 4px; height: 6px; overflow: hidden; }
.progress-bar { height: 100%; background: #f5c518; border-radius: 4px; transition: width 0.5s; }

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 14px;
}
.pagination button {
  background: #252525;
  border: 1px solid #333;
  color: #888;
  border-radius: 5px;
  padding: 5px 10px;
  font-size: 11px;
  cursor: pointer;
}
.pagination button.active { background: #f5c518; color: #000; border-color: #f5c518; }
.pagination button:hover:not(.active) { border-color: #f5c518; color: #f5c518; }

/* Loader inline */
.loader-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #777;
  font-size: 12px;
  padding: 20px;
}
.loader-inline::before {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid #333;
  border-top-color: #f5c518;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

/* Anuncios table in modal */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.data-table th {
  background: #1e1e1e;
  color: #777;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 9px 12px;
  text-align: left;
  border-bottom: 1px solid #252525;
  white-space: nowrap;
}
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #1e1e1e;
  color: #ccc;
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(245,197,24,0.04); }
.data-table a { color: #3b82f6; text-decoration: none; }
.data-table a:hover { text-decoration: underline; }
.data-table img { width: 40px; height: 40px; object-fit: contain; border-radius: 4px; background: #252525; }

/* Metricas modal */
/* ---------- METRICAS WRAPPER ---------- */
.metricas-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ---------- FILTROS DE PERIODO ---------- */
.metricas-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 16px;
  background: #161616;
  border: 1px solid #252525;
  border-radius: 10px;
  margin-bottom: 12px;
}
.metricas-filters-label {
  font-size: 11px;
  color: #666;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.metricas-preset-btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.metricas-preset-btn {
  background: #222;
  border: 1px solid #333;
  color: #888;
  font-size: 12px;
  padding: 5px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}
.metricas-preset-btn:hover {
  background: #2a2a2a;
  color: #f0f0f0;
  border-color: #555;
}
.metricas-preset-btn.active {
  background: #f5c518;
  color: #000;
  border-color: #f5c518;
  font-weight: 700;
}
.metricas-custom-dates {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.metricas-date-input {
  background: #1a1a1a;
  border: 1px solid #333;
  color: #e0e0e0;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
}
.metricas-date-input:focus {
  outline: none;
  border-color: #f5c518;
}
.metricas-period-label {
  font-size: 11px;
  color: #f5c518;
  margin-bottom: 14px;
  padding: 6px 12px;
  background: rgba(245,197,24,0.06);
  border-radius: 6px;
  border-left: 3px solid #f5c518;
}

/* ---------- GRID DE CARDS ---------- */
.metricas-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 8px;
}
@media (max-width: 700px) {
  .metricas-grid { grid-template-columns: repeat(2, 1fr); }
}
.metrica-box {
  background: linear-gradient(135deg, #1e1e1e 0%, #232323 100%);
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 16px 14px;
  text-align: center;
  transition: border-color 0.2s ease, transform 0.15s ease;
}
.metrica-box:hover {
  border-color: #f5c518;
  transform: translateY(-1px);
}
.metrica-box-icon {
  font-size: 22px;
  margin-bottom: 8px;
  display: block;
}
.metrica-box-label {
  font-size: 10px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin-bottom: 8px;
  font-weight: 600;
}
.metrica-box-value {
  font-size: 22px;
  font-weight: 800;
  color: #f5c518;
  line-height: 1;
  margin-bottom: 6px;
}
.metrica-box-sub {
  font-size: 10px;
  color: #555;
  margin-top: 4px;
}

/* ── Auto-refresh status bar ───────────────────────────────── */
#metLiveStatus-\\3 1 ,
[id^="metLiveStatus-"] {
  font-size: 10px;
  color: #555;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

[id^="metLastUpdate-"] {
  color: #3a3;
  font-size: 10px;
}

[id^="metCountdown-"] {
  color: #f5c518;
  font-size: 10px;
  font-weight: 700;
  min-width: 80px;
  text-align: right;
}

[id^="metStatusBar-"] {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 10px;
  background: #111;
  border: 1px solid #1e1e1e;
  border-radius: 6px;
  margin-bottom: 6px;
  flex-wrap: wrap;
  gap: 4px;
}

/* Select do intervalo de auto-refresh */
select[id^="metInterval-"] {
  background: #1a1a1a;
  color: #f5c518;
  border: 1px solid #333;
  border-radius: 4px;
  padding: 3px 6px;
  font-size: 11px;
  cursor: pointer;
  outline: none;
  transition: border-color .2s;
}
select[id^="metInterval-"]:hover { border-color: #f5c518; }
select[id^="metInterval-"] option { background: #111; color: #f5c518; }


/* ============================================================
   PAINEL VENDAS AO VIVO
   ============================================================ */

/* -- Botão na topbar -- */

/* ═══════════════════════════════════════════════════════════════
   BOTÃO "VER VENDAS AO VIVO" — visual premium YellowBox
═══════════════════════════════════════════════════════════════ */
.btn-ver-vendas {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(180deg, rgba(245,197,24,0.12), rgba(245,197,24,0.06));
  color: #f7d96c;
  border: 1px solid rgba(245,197,24,0.26);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  letter-spacing: 0.2px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.btn-ver-vendas:hover {
  color: #111;
  background: linear-gradient(180deg, #ffd84d, #f5c518);
  border-color: #f5c518;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(245,197,24,0.2);
}
.btn-ver-vendas--active {
  color: #111;
  background: linear-gradient(180deg, #ffd84d, #f5c518);
  border-color: #f5c518;
  box-shadow: 0 10px 22px rgba(245,197,24,0.18);
}
.vv-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 4px rgba(239,68,68,0.16), 0 0 8px rgba(239,68,68,0.42);
  animation: vvpulse 1.6s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes vvpulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.45; transform: scale(0.88); }
}

/* ═══════════════════════════════════════════════════════════════
   MODAL VENDAS AO VIVO — inspirado no ML, com identidade YellowBox
═══════════════════════════════════════════════════════════════ */
.lm-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 5, 0.72);
  backdrop-filter: blur(4px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
.lm-backdrop.lm-open {
  opacity: 1;
  pointer-events: all;
}

.lm-box {
  width: min(1220px, 98vw);
  max-height: 95vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 30px;
  background: linear-gradient(180deg, #121212 0%, #0d0d0d 100%);
  border: 1px solid rgba(255,212,40,0.18);
  box-shadow: 0 40px 110px rgba(0,0,0,0.62);
  transform: translateY(18px) scale(0.975);
  transition: transform 0.26s cubic-bezier(.22,1,.36,1);
}
.lm-backdrop.lm-open .lm-box {
  transform: translateY(0) scale(1);
}

.lm-hero {
  position: relative;
  padding: 22px 30px 132px;
  background:
    radial-gradient(circle at top right, rgba(255,212,40,0.34), transparent 34%),
    linear-gradient(135deg, #0b0b0b 0%, #171717 58%, #2b2205 100%);
  overflow: visible;
}
.lm-hero::after {
  content: "";
  position: absolute;
  left: -4%;
  right: -4%;
  bottom: -36px;
  height: 82px;
  background: linear-gradient(180deg, #191919 0%, #121212 100%);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.lm-hero-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.lm-brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255,212,40,0.14);
  border: 1px solid rgba(255,212,40,0.26);
  color: #ffd84d;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
}
.lm-hero-center {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.lm-title {
  font-size: 40px;
  line-height: 1.08;
  font-weight: 800;
  color: #fff7d0;
  letter-spacing: -0.6px;
}
.lm-subtitle-wrap {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(17,17,17,0.76);
  border: 1px solid rgba(255,212,40,0.18);
  box-shadow: 0 8px 22px rgba(0,0,0,0.18);
}
.lm-live-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 4px rgba(239,68,68,0.15);
  animation: vvpulse 1.6s ease-in-out infinite;
  flex-shrink: 0;
}
.lm-subtitle {
  font-size: 12px;
  color: #efe3a4;
  font-weight: 600;
}
.lm-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lm-refresh-btn,
.lm-close-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255,212,40,0.18);
  background: rgba(17,17,17,0.82);
  color: #ffd84d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  transition: all 0.18s ease;
  box-shadow: 0 10px 24px rgba(0,0,0,0.22);
}
.lm-refresh-btn:hover,
.lm-close-btn:hover {
  transform: translateY(-1px);
  background: #ffd428;
  color: #111;
}

.lm-total-card {
  margin-top: 18px;
  min-width: min(560px, 88vw);
  width: min(760px, 88vw);
  padding: 20px 26px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(14,14,14,0.98) 0%, rgba(26,26,26,0.98) 100%);
  box-shadow: 0 20px 42px rgba(0,0,0,0.34);
  border: 1px solid rgba(255,212,40,0.24);
  position: relative;
  z-index: 4;
}
.lm-total-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.lm-total-label {
  font-size: 12px;
  color: #d7c46a;
  margin-bottom: 6px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.lm-total-value {
  font-size: 50px;
  line-height: 1.02;
  font-weight: 900;
  color: #ffd84d;
  letter-spacing: -1.4px;
}
.lm-total-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,212,40,0.12);
  border: 1px solid rgba(255,212,40,0.24);
  color: #ffe58f;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  white-space: nowrap;
}
.lm-total-meta {
  margin-top: 12px;
  color: #f4efcf;
  font-size: 13px;
  font-weight: 600;
}

.lm-panel-body {
  display: grid;
  grid-template-columns: 350px minmax(0, 1fr);
  gap: 18px;
  padding: 0 24px 24px;
  margin-top: -72px;
  position: relative;
  z-index: 3;
  min-height: 0;
  overflow: hidden;
}
.lm-kpis-card,
.lm-main-card {
  background: linear-gradient(180deg, rgba(22,22,22,0.98) 0%, rgba(16,16,16,0.98) 100%);
  border: 1px solid rgba(255,212,40,0.12);
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.22);
}
.lm-kpis-card {
  padding: 18px;
}
.lm-main-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.lm-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.lm-section-title {
  font-size: 15px;
  color: #fff0ac;
  font-weight: 800;
}
.lm-section-sub {
  font-size: 12px;
  color: #bfb68f;
  margin-top: 4px;
}
.lm-count {
  font-size: 11px;
  color: #111;
  background: linear-gradient(180deg, #ffd84d, #f5c518);
  border: 1px solid rgba(255,212,40,0.35);
  border-radius: 999px;
  padding: 6px 10px;
  white-space: nowrap;
  flex-shrink: 0;
  font-weight: 800;
}

.lm-kpis {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.lm-kpi {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px;
  background: linear-gradient(180deg, rgba(31,31,31,0.96) 0%, rgba(20,20,20,0.96) 100%);
  border: 1px solid rgba(255,212,40,0.1);
  border-radius: 16px;
}
.lm-kpi--total {
  padding: 16px 16px;
  background: linear-gradient(135deg, rgba(51,39,8,0.98) 0%, rgba(20,20,20,0.98) 100%);
  border-color: rgba(255,212,40,0.26);
  box-shadow: 0 14px 26px rgba(0,0,0,0.2);
}
.lm-kpi-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffe383, #f5c518);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.lm-kpi-label {
  font-size: 11px;
  color: #b8af89;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin-bottom: 4px;
}
.lm-kpi-value {
  font-size: 23px;
  line-height: 1.1;
  font-weight: 800;
  color: #fff7d0;
}
.lm-kpi-value--total {
  font-size: 30px;
  color: #ffd84d;
  letter-spacing: -0.6px;
}

.lm-filter-bar {
  padding: 16px 18px 8px;
  border-bottom: 1px solid rgba(255,212,40,0.1);
  overflow-x: auto;
  scrollbar-width: none;
}
.lm-filter-bar::-webkit-scrollbar { display: none; }
.lm-store-chips {
  display: flex;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.lm-store-chips::-webkit-scrollbar { display: none; }
.lm-chip {
  background: #171717;
  border: 1px solid rgba(255,212,40,0.12);
  border-radius: 999px;
  color: #d8d0ad;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.lm-chip:hover {
  border-color: rgba(245,197,24,0.6);
  background: #221c07;
  color: #fff1b3;
}
.lm-chip--active {
  background: linear-gradient(180deg, #ffd84d, #f5c518);
  border-color: #f5c518;
  color: #111;
}
.lm-chip-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(17,17,17,0.18);
  color: inherit;
  font-size: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lm-feed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 18px 10px;
}
.lm-feed-title {
  font-size: 14px;
  font-weight: 800;
  color: #fff0ac;
}
.lm-feed-sub {
  font-size: 11px;
  color: #b9af88;
}

.lm-feed {
  flex: 1;
  overflow-y: auto;
  padding: 0 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lm-feed::-webkit-scrollbar { width: 6px; }
.lm-feed::-webkit-scrollbar-track { background: transparent; }
.lm-feed::-webkit-scrollbar-thumb { background: rgba(255,212,40,0.26); border-radius: 999px; }

.lm-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #c4bb96;
  font-size: 13px;
  padding: 42px 0;
  flex: 1;
  text-align: center;
}
.lm-empty-icon { font-size: 30px; }
.lm-spin { display: inline-block; animation: spin 0.9s linear infinite; font-size: 24px; }
@keyframes spin { to { transform: rotate(360deg); } }

.lm-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 14px;
  background: linear-gradient(180deg, rgba(30,30,30,0.96) 0%, rgba(20,20,20,0.96) 100%);
  border: 1px solid rgba(255,212,40,0.08);
  border-radius: 16px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.lm-card:hover {
  transform: translateY(-1px);
  border-color: rgba(245,197,24,0.45);
  box-shadow: 0 12px 22px rgba(0,0,0,0.18);
}
.lm-card--new {
  background: linear-gradient(180deg, rgba(54,42,10,0.96) 0%, rgba(27,22,6,0.96) 100%);
  border-color: rgba(245,197,24,0.45);
  animation: cardpop 0.35s cubic-bezier(.22,1,.36,1);
}
@keyframes cardpop {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.lm-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffe383, #f5c518);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.lm-card-body { flex: 1; min-width: 0; }
.lm-card-title {
  font-size: 13px;
  color: #fff4c1;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
  line-height: 1.35;
}
.lm-new-tag {
  background: #111;
  color: #f5c518;
  font-size: 9px;
  font-weight: 800;
  border-radius: 999px;
  padding: 3px 7px;
  flex-shrink: 0;
  letter-spacing: 0.4px;
}
.lm-card-meta {
  display: flex;
  gap: 10px;
  font-size: 11px;
  color: #b7ae89;
  flex-wrap: wrap;
}
.lm-card-right {
  text-align: right;
  flex-shrink: 0;
}
.lm-card-val {
  font-size: 15px;
  font-weight: 800;
  color: #ffd84d;
}
.lm-card-time {
  font-size: 11px;
  color: #aba27e;
  margin-top: 4px;
}

@media (max-width: 880px) {
  .lm-panel-body {
    grid-template-columns: 1fr;
  }
  .lm-kpis {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .lm-box {
    width: 100vw;
    max-height: 100dvh;
    border-radius: 20px 20px 0 0;
    position: fixed;
    bottom: 0;
    left: 0;
  }
  .lm-backdrop { align-items: flex-end; }
  .lm-hero {
    padding: 16px 16px 104px;
  }
  .lm-title {
    font-size: 28px;
  }
  .lm-total-card {
    min-width: 0;
    width: 100%;
    padding: 16px 18px;
  }
  .lm-total-top {
    flex-direction: column;
    align-items: flex-start;
  }
  .lm-total-value {
    font-size: 34px;
  }
  .lm-panel-body {
    padding: 0 12px 12px;
    gap: 12px;
    margin-top: -56px;
  }
  .lm-kpis {
    grid-template-columns: 1fr;
  }
  .lm-subtitle-wrap {
    max-width: 100%;
  }
  .lm-kpi-value--total {
    font-size: 26px;
  }
}
