.dashboard-page { min-height: 100vh; }

.dash-header {
  background: linear-gradient(135deg, #1e40af, #2563eb);
  color: #fff; padding: 16px 20px;
}
.dash-header .header-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 960px; margin: 0 auto;
}
.header-brand { display: flex; align-items: center; gap: 12px; }
.dash-header .header-icon { font-size: 2rem; }
.dash-header h1 { font-size: 1.15rem; font-weight: 700; }
.dash-header p { font-size: .8rem; opacity: .75; }
.guard-link { border-color: rgba(255,255,255,.4); color: #fff; }
.guard-link:hover { background: rgba(255,255,255,.15); }

.dash-main { max-width: 960px; margin: 0 auto; padding: 20px 16px; }

.stats-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 14px; margin-bottom: 16px;
}
@media (max-width: 600px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}
.stat-card {
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px 14px; text-align: center;
}
.stat-icon { font-size: 1.6rem; margin-bottom: 6px; }
.stat-value { font-size: 2rem; font-weight: 800; color: var(--blue); }
.stat-label { font-size: .78rem; color: var(--gray-500); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-top: 2px; }

.dash-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 16px; margin-bottom: 16px;
}
@media (max-width: 600px) {
  .dash-grid { grid-template-columns: 1fr; }
  .stats-row { gap: 10px; }
  .stat-value { font-size: 1.6rem; }
}

.vendor-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--gray-100);
}
.vendor-row:last-child { border-bottom: none; }
.vendor-name { font-weight: 600; font-size: .9rem; }
.vendor-bar-wrap { flex: 1; margin: 0 12px; height: 8px; background: var(--gray-100); border-radius: 4px; overflow: hidden; }
.vendor-bar { height: 100%; background: var(--blue); border-radius: 4px; transition: width .4s; }
.vendor-count { font-size: .85rem; font-weight: 700; color: var(--blue); min-width: 24px; text-align: right; }

/* Trend chart */
.trend-chart { display: flex; align-items: flex-end; gap: 6px; height: 100px; padding-top: 8px; }
.trend-bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.trend-bar {
  width: 100%; background: var(--blue); border-radius: 4px 4px 0 0;
  min-height: 4px; transition: height .4s;
}
.trend-bar.today { background: var(--green); }
.trend-label { font-size: .65rem; color: var(--gray-400); white-space: nowrap; }
.trend-val { font-size: .72rem; font-weight: 700; color: var(--gray-700); }

/* Entries list */
.entries-list { display: flex; flex-direction: column; gap: 12px; }

.entry-card {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px; background: var(--gray-50); border-radius: 10px;
  border: 1px solid var(--gray-100); transition: background .15s;
}
.entry-card:hover { background: var(--gray-100); }

.entry-thumb {
  width: 64px; height: 64px; border-radius: 8px;
  object-fit: cover; cursor: pointer; flex-shrink: 0;
  background: var(--gray-200);
}
.entry-thumb-placeholder {
  width: 64px; height: 64px; border-radius: 8px;
  background: var(--gray-200); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
}

.entry-body { flex: 1; min-width: 0; }
.entry-vendor { font-weight: 700; font-size: .95rem; margin-bottom: 3px; }
.entry-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.tag {
  font-size: .72rem; font-weight: 600; padding: 2px 8px;
  border-radius: 20px; display: inline-flex; align-items: center; gap: 3px;
}
.tag-plate { background: #dbeafe; color: #1d4ed8; }
.tag-auto { background: #dcfce7; color: #15803d; }
.tag-gps { background: #fce7f3; color: #9d174d; }
.entry-time { font-size: .78rem; color: var(--gray-400); }

.last-updated { font-size: .75rem; color: var(--gray-400); }
#load-more-wrap { text-align: center; margin-top: 16px; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-bg { position: absolute; inset: 0; background: rgba(0,0,0,.75); }
.lightbox-content {
  position: relative; z-index: 1; max-width: 90vw; max-height: 90vh;
  background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.lightbox-content img { max-width: 90vw; max-height: 70vh; display: block; object-fit: contain; }
.lightbox-close {
  position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,.5);
  color: #fff; border: none; border-radius: 50%; width: 32px; height: 32px;
  font-size: 1rem; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.lb-meta { padding: 12px 16px; font-size: .85rem; color: var(--gray-700); }
