/* Vita Mojo Dashboard – Frontend Styles */
.vmd-dashboard {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  color: #1a1a1a;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
  max-width: 100%;
}

/* Header */
.vmd-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: #1a7fa6;
  flex-wrap: wrap;
}
.vmd-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .02em;
}
.vmd-dot-live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  animation: vmd-pulse 1.5s infinite;
  display: inline-block;
}
@keyframes vmd-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .6; transform: scale(1.25); }
}
.vmd-badge-live {
  font-size: 11px;
  background: rgba(255,255,255,.2);
  color: #fff;
  padding: 2px 10px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.4);
}
.vmd-controls {
  display: flex;
  gap: 8px;
  margin-left: auto;
  flex-wrap: wrap;
}
.vmd-controls select {
  font-size: 13px;
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.4);
  background: rgba(255,255,255,.15);
  color: #fff;
  cursor: pointer;
}
.vmd-controls select option { background: #1a7fa6; }
.vmd-btn-refresh {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.4);
  color: #fff;
  border-radius: 6px;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 16px;
  transition: background .2s;
}
.vmd-btn-refresh:hover { background: rgba(255,255,255,.3); }
.vmd-last-update {
  font-size: 11px;
  color: rgba(255,255,255,.7);
}

/* Metrics */
.vmd-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0;
  border-bottom: 1px solid #e2e8f0;
}
.vmd-metric {
  display: flex;
  flex-direction: column;
  padding: 16px 20px;
  border-right: 1px solid #e2e8f0;
}
.vmd-metric:last-child { border-right: none; }
.vmd-metric-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #6b7280;
  margin-bottom: 6px;
}
.vmd-metric-value {
  font-size: 22px;
  font-weight: 600;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Notices */
.vmd-notice {
  padding: 10px 20px;
  font-size: 13px;
  border-left: 3px solid;
}
.vmd-notice-info  { background: #eff6ff; color: #1e40af; border-color: #3b82f6; }
.vmd-notice-error { background: #fef2f2; color: #991b1b; border-color: #ef4444; }
.vmd-notice a     { color: inherit; font-weight: 600; }

/* Table */
.vmd-table-wrap {
  overflow-x: auto;
}
.vmd-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.vmd-table thead th {
  background: #f9fafb;
  padding: 10px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #6b7280;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}
.vmd-table th.vmd-sortable { cursor: pointer; }
.vmd-table th.vmd-sortable:hover { color: #1a7fa6; }
.vmd-table tbody tr {
  border-bottom: 1px solid #f3f4f6;
  transition: background .1s;
}
.vmd-table tbody tr:last-child { border-bottom: none; }
.vmd-table tbody tr:hover { background: #f9fafb; }
.vmd-table td {
  padding: 12px 16px;
  color: #374151;
  vertical-align: middle;
}
.vmd-rank  { color: #9ca3af; font-size: 12px; width: 28px; }
.vmd-name  { font-weight: 600; color: #111827; }
.vmd-num   { text-align: right; }
.vmd-bold  { font-weight: 700; }
.vmd-store-pill {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  background: #dbeafe;
  color: #1e40af;
  white-space: nowrap;
}
.vmd-bar-cell { width: 120px; }
.vmd-bar-bg   { background: #e5e7eb; border-radius: 4px; height: 6px; }
.vmd-bar-fill { height: 100%; border-radius: 4px; background: #1a7fa6; transition: width .5s ease; }
.vmd-loading  { text-align: center; color: #9ca3af; padding: 32px !important; }

/* Footer */
.vmd-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  border-top: 1px solid #e2e8f0;
  background: #f9fafb;
  font-size: 11px;
  color: #9ca3af;
}
.vmd-footer a { color: #1a7fa6; text-decoration: none; }

/* Responsive */
@media (max-width: 600px) {
  .vmd-metrics { grid-template-columns: repeat(2, 1fr); }
  .vmd-metric  { border-right: none; border-bottom: 1px solid #e2e8f0; }
  .vmd-controls { display: none; }
}
