/* ── CSS Variables ──────────────────────────────────────────────────────── */
:root {
  --bg:          #0a0a0a;
  --surface:     #111111;
  --surface2:    #1a1a1a;
  --border:      #2a2a2a;
  --text:        #e8e8e8;
  --text-muted:  #888888;
  --accent:      #f0a500;
  --accent-hover:#ffc040;
  --danger:      #d94f4f;
  --success:     #3fba6a;
  --radius:      8px;
  --radius-sm:   4px;
  --shadow:      0 4px 20px rgba(0,0,0,0.5);
}

/* ── Reset & Base ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
img { display: block; max-width: 100%; }

/* ── Header ─────────────────────────────────────────────────────────────── */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  flex-shrink: 0;
}
.logo:hover { color: var(--text); }
.logo-icon { font-size: 22px; }
.logo-text { font-size: 17px; font-weight: 700; letter-spacing: -0.3px; }
.logo-sub {
  font-size: 12px;
  color: var(--accent);
  padding: 2px 6px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.main-nav { display: flex; gap: 4px; align-items: center; }
.nav-link {
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  transition: color 0.15s, background 0.15s;
}
.nav-link:hover, .nav-link.active { color: var(--text); background: var(--surface2); }
.nav-link--secondary { color: var(--text-muted); }
.nav-link--secondary:hover { color: var(--accent); background: transparent; }
.nav-link--cart { position: relative; }
.cart-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--accent);
  color: #000;
  font-size: 11px;
  font-weight: 700;
  margin-left: 4px;
  vertical-align: middle;
}

/* ── Main content ───────────────────────────────────────────────────────── */
.main-content {
  flex: 1;
  max-width: 1600px;
  margin: 0 auto;
  padding: 24px;
  width: 100%;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 20px 24px;
  text-align: center;
}
.footer-inner { max-width: 1600px; margin: 0 auto; }
.site-footer p { color: var(--text-muted); font-size: 13px; }
.footer-sub { margin-top: 4px; font-size: 11px; }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  text-decoration: none;
  white-space: nowrap;
}
.btn--primary { background: var(--accent); color: #000; }
.btn--primary:hover { background: var(--accent-hover); color: #000; }
.btn--ghost { background: transparent; border-color: var(--border); color: var(--text-muted); }
.btn--ghost:hover { color: var(--text); border-color: var(--text-muted); }
.btn--danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn--danger:hover { background: #c03030; }
.btn--sm { padding: 5px 10px; font-size: 13px; }
.btn--full { width: 100%; }

/* ── Filter bar ─────────────────────────────────────────────────────────── */
.filter-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 20px;
}

.filter-form { display: flex; flex-direction: column; gap: 14px; }

/* Featured hero on the landing page */
.featured-hero {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 21 / 9;
  max-height: 480px;
  margin: 0 0 24px 0;
  border-radius: var(--radius-lg, 10px);
  overflow: hidden;
  background: #222 center/cover no-repeat;
  text-decoration: none;
  color: #fff;
  cursor: pointer;
  transition: transform 0.25s ease;
}
.featured-hero:hover { transform: translateY(-2px); }
.featured-hero__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.65) 100%);
}
.featured-hero__label {
  display: inline-block;
  align-self: flex-start;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.featured-hero__title {
  margin: 0 0 8px 0;
  font-size: 22px;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.featured-hero__cat {
  display: inline-block;
  align-self: flex-start;
  font-size: 13px;
  background: rgba(255,255,255,0.18);
  padding: 3px 10px;
  border-radius: 12px;
  backdrop-filter: blur(4px);
}
@media (max-width: 600px) {
  .featured-hero { aspect-ratio: 4 / 3; max-height: 300px; }
  .featured-hero__overlay { padding: 16px; }
  .featured-hero__title { font-size: 17px; }
}

.search-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
}

.search-input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 9px 14px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s;
}
.search-input:focus { border-color: var(--accent); }
.search-input::placeholder { color: var(--text-muted); }

/* Search autocomplete dropdown */
.search-input-wrap { flex: 1; }
.search-input-wrap .search-input { width: 100%; box-sizing: border-box; }
#searchSuggest {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 6px 24px rgba(0,0,0,0.18);
  max-height: 320px;
  overflow-y: auto;
  z-index: 100;
}
#searchSuggest li {
  padding: 8px 14px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-size: 14px;
}
#searchSuggest li[aria-selected="true"],
#searchSuggest li:hover {
  background: var(--accent);
  color: #fff;
}
#searchSuggest li strong { font-weight: 700; }
#searchSuggest .suggest-count {
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
#searchSuggest li[aria-selected="true"] .suggest-count,
#searchSuggest li:hover .suggest-count { color: rgba(255,255,255,0.85); }

.filter-chips { display: flex; flex-direction: column; gap: 10px; }
.filter-group { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.filter-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.6px; flex-shrink: 0; width: 60px; }
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-row--wrap { flex-wrap: wrap; }

.chip {
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.chip:hover { border-color: var(--accent); color: var(--text); }
.chip--active { background: var(--accent); border-color: var(--accent); color: #000; font-weight: 600; }
.chip--active:hover { color: #000; }
.chip-count { font-size: 11px; opacity: 0.7; }

/* ── Gallery CTA ───────────────────────────────────────────────────────── */
.gallery-cta {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

/* ── Results meta ───────────────────────────────────────────────────────── */
.results-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.results-meta strong { color: var(--text); }

/* ── Asset grid ─────────────────────────────────────────────────────────── */
.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.asset-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.asset-card:hover {
  transform: scale(1.04);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}

.card-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--surface2);
  overflow: hidden;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.asset-card:hover .card-thumb img { transform: scale(1.06); }

.thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  background: var(--surface2);
}

.video-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: rgba(0,0,0,0.75);
  color: #fff;
}

/* Drag shield: invisible overlay that prevents image dragging */
.drag-shield {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.card-info {
  padding: 10px 12px;
}
.card-category {
  display: inline-block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 4px;
}
.card-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 6px;
}
.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}
.gps-dot { cursor: help; }

/* ── Pagination ─────────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
  padding: 16px 0;
}
.page-btn {
  padding: 8px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: all 0.15s;
}
.page-btn:hover { color: var(--text); border-color: var(--text-muted); }
.page-info { font-size: 14px; color: var(--text-muted); }

/* ── Empty state ────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 80px 24px;
}
.empty-icon { font-size: 64px; margin-bottom: 16px; }
.empty-title { font-size: 22px; font-weight: 600; margin-bottom: 8px; }
.empty-sub { color: var(--text-muted); margin-bottom: 24px; }

/* ── Lightbox ───────────────────────────────────────────────────────────── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(4px);
}
.lightbox.is-open { display: flex; align-items: center; justify-content: center; }

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 36px;
  cursor: pointer;
  z-index: 10;
  line-height: 1;
  opacity: 0.8;
  transition: opacity 0.15s;
}
.lightbox-close:hover { opacity: 1; }

.lightbox-prev, .lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 22px;
  width: 44px;
  height: 60px;
  cursor: pointer;
  z-index: 10;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }
.lightbox-prev:hover, .lightbox-next:hover { background: rgba(0,0,0,0.8); }

.lightbox-inner {
  display: flex;
  align-items: stretch;
  max-width: calc(100vw - 120px);
  max-height: calc(100vh - 40px);
  width: 100%;
  gap: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.lightbox-media {
  flex: 1;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  max-height: calc(100vh - 40px);
}
.lightbox-media img {
  max-width: 100%;
  max-height: calc(100vh - 40px);
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}
.lbImageShield {
  position: absolute;
  inset: 0;
}

.lightbox-panel {
  width: 400px;
  flex-shrink: 0;
  background: var(--surface);
  padding: 20px;
  overflow-y: auto;
  font-size: 14px;
}
.lb-loading { color: var(--text-muted); }

.lb-category {
  display: inline-block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 10px;
}
.lb-description { line-height: 1.5; margin-bottom: 16px; }

.lb-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.lb-tag {
  padding: 3px 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 12px;
  color: var(--text-muted);
}

.lb-meta { border-top: 1px solid var(--border); padding-top: 14px; }
.lb-meta-row {
  display: flex;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
}
.lb-meta-row:last-child { border-bottom: none; }
.lb-meta-key { color: var(--text-muted); font-size: 12px; width: 90px; flex-shrink: 0; }
.lb-meta-val { font-size: 13px; word-break: break-word; }

/* Map-specific lightbox (no prev/next arrows) */
.lightbox-inner--map .lightbox-panel { width: 280px; }

/* ── Map page ───────────────────────────────────────────────────────────── */
.map-page { display: flex; flex-direction: column; height: calc(100vh - 64px); }
.map-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
  flex-shrink: 0;
}
.map-title { font-size: 16px; font-weight: 600; }
.map-count { font-size: 13px; color: var(--text-muted); flex: 1; }
#map { flex: 1; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }

/* ── Auth page ──────────────────────────────────────────────────────────── */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
}
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  width: 100%;
  max-width: 400px;
  text-align: center;
}
.auth-logo { font-size: 40px; margin-bottom: 16px; }
.auth-title { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.auth-sub { color: var(--text-muted); font-size: 14px; margin-bottom: 28px; }
.auth-form { text-align: left; display: flex; flex-direction: column; gap: 16px; }
.form-field label { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }
.form-field input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 10px 14px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s;
}
.form-field input:focus { border-color: var(--accent); }
.auth-back { display: block; margin-top: 20px; font-size: 13px; color: var(--text-muted); }

/* ── Alert ──────────────────────────────────────────────────────────────── */
.alert {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 16px;
}
.alert--error { background: rgba(217,79,79,0.15); border: 1px solid var(--danger); color: var(--danger); }

/* ── Admin page ─────────────────────────────────────────────────────────── */
.admin-page { padding-bottom: 40px; }
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.admin-header h1 { font-size: 24px; font-weight: 700; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
.stat-card--warn { border-color: var(--danger); }
.stat-card--active { border-color: var(--accent); }
.stat-num { font-size: 28px; font-weight: 700; }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.4px; }

.admin-section { margin-bottom: 32px; }
.admin-section h2 { font-size: 18px; font-weight: 600; margin-bottom: 14px; }
.section-count { font-weight: 400; color: var(--text-muted); font-size: 14px; }

.category-list { display: flex; flex-direction: column; gap: 6px; }
.category-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.cat-name { width: 120px; font-size: 14px; flex-shrink: 0; }
.cat-bar-wrap { flex: 1; height: 6px; background: var(--surface2); border-radius: 3px; }
.cat-bar { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width 0.4s; }
.cat-count { width: 40px; text-align: right; font-size: 13px; color: var(--text-muted); }

/* Section header with bulk bar */
.section-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.section-header-left { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.section-header h2 { margin: 0; }
.admin-type-filter { display: flex; gap: 6px; }
/* Suggested locations */
.suggestions-list { display: flex; flex-direction: column; gap: 8px; }
.suggestion-card {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); transition: opacity 0.3s;
}
.suggestion-thumb img { width: 60px; height: 38px; object-fit: cover; border-radius: var(--radius-sm); }
.suggestion-info { flex: 1; min-width: 0; }
.suggestion-name { font-size: 13px; font-family: monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggestion-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.suggestion-coords { font-size: 11px; color: var(--accent); font-family: monospace; margin-top: 2px; }
.suggestion-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* Admin search */
.admin-search { display: flex; align-items: center; gap: 6px; }
.admin-search-input {
  width: 200px; padding: 5px 10px; font-size: 13px;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); outline: none; transition: border-color 0.15s;
}
.admin-search-input:focus { border-color: var(--accent); }
.admin-search-input::placeholder { color: var(--text-muted); }

.bulk-bar { display: none; align-items: center; gap: 8px; }
.bulk-bar--active { display: flex; }
.bulk-count { font-size: 13px; color: var(--text-muted); }

/* Checkbox */
.row-check, #selectAll { width: 16px; height: 16px; cursor: pointer; accent-color: var(--accent); }

/* ── Admin grid cards ──────────────────────────────────────────────────── */
.admin-grid-header {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}
.admin-grid-select-all {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
}
.admin-grid-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
.admin-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
  position: relative;
}
.admin-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.admin-card--hidden { opacity: 0.45; }
.admin-card-check {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  background: rgba(0,0,0,0.5);
  border-radius: var(--radius-sm);
  padding: 4px 6px;
  line-height: 1;
}
.admin-card-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--surface2);
  overflow: hidden;
  cursor: pointer;
}
.admin-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.admin-card:hover .admin-card-thumb img { transform: scale(1.04); }
.admin-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  background: var(--surface2);
}
.admin-card-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: rgba(100,150,255,0.25);
  color: #6496ff;
}
.admin-card-ai {
  position: absolute;
  bottom: 8px;
  right: 8px;
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
}
.admin-card-body { padding: 10px 12px 6px; }
.admin-card-cat {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 3px;
}
.admin-card-name {
  font-family: monospace;
  font-size: 12px;
  word-break: break-all;
  line-height: 1.3;
  margin-bottom: 2px;
}
.admin-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.3;
  margin-bottom: 2px;
}
.admin-card-meta {
  font-size: 11px;
  color: var(--text-muted);
}
.admin-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px 10px;
  gap: 6px;
}
.admin-card-btns {
  display: flex;
  gap: 4px;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}
.badge--photo { background: rgba(63,186,106,0.2); color: #3fba6a; }
.badge--video { background: rgba(100,150,255,0.2); color: #6496ff; }

.ai-badge {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
}
.ai-badge--done { background: rgba(63,186,106,0.2); color: #3fba6a; }
.ai-badge--fail { background: rgba(217,79,79,0.2); color: var(--danger); }
.ai-badge--pending { background: var(--surface2); color: var(--text-muted); }

.toggle-btn {
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.toggle-btn--on { background: rgba(63,186,106,0.15); border-color: #3fba6a; color: #3fba6a; }
.toggle-btn--off { background: rgba(136,136,136,0.1); border-color: var(--border); color: var(--text-muted); }

.admin-note { font-size: 13px; color: var(--text-muted); margin-top: 12px; }
.admin-map-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.admin-map-header h2 { margin: 0; }
.admin-map-wrap { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 8px; }
.admin-map { height: 400px; }
.admin-map-popup { text-align: center; min-width: 140px; }
.admin-map-popup img { width: 120px; height: 75px; object-fit: cover; border-radius: 4px; margin-bottom: 6px; display: block; }
.admin-map-popup .popup-name { font-size: 11px; color: #666; margin-bottom: 4px; word-break: break-all; }
.admin-map-popup .popup-cat { font-size: 12px; font-weight: 600; margin-bottom: 6px; }
.admin-map-popup button { font-size: 12px; padding: 4px 12px; background: #f0a500; color: #000; border: none; border-radius: 4px; cursor: pointer; font-weight: 600; }

/* ── Tagger status panel ───────────────────────────────────────────────── */
.tagger-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.tagger-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.tagger-header h2 { margin: 0; }
.tagger-status {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  border-radius: 12px;
  background: var(--surface2);
  color: var(--text-muted);
}
.tagger-status--running {
  background: rgba(240,165,0,0.15);
  color: var(--accent);
  animation: tagger-pulse 2s ease-in-out infinite;
}
.tagger-status--idle { background: rgba(63,186,106,0.15); color: var(--success); }
.tagger-status--warn { background: rgba(217,79,79,0.15); color: var(--danger); }
@keyframes tagger-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.tagger-progress-wrap {
  height: 6px;
  background: var(--surface2);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 12px;
}
.tagger-progress-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.6s ease;
}
.tagger-stats {
  display: flex;
  gap: 20px;
  font-size: 14px;
  color: var(--text-muted);
}
.tagger-stat strong { color: var(--text); }
.tagger-pct { margin-left: auto; font-weight: 600; color: var(--accent); }
.tagger-last {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-muted);
  min-height: 18px;
}

/* ── Edit 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;
}
.modal-overlay--open { display: flex; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 620px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 {
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 380px;
}
.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
}
.modal-close:hover { color: var(--text); }
.modal-body { padding: 20px; }
.modal-thumb { text-align: center; margin-bottom: 16px; }
.modal-thumb img { max-width: 200px; border-radius: var(--radius-sm); }
.modal-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 14px;
}
.modal-hint { font-weight: 400; text-transform: none; letter-spacing: 0; }
.modal-hint-block {
  font-size: 13px; color: var(--text-muted); margin-bottom: 16px;
  padding: 10px 12px; background: var(--surface2); border-radius: var(--radius-sm);
}
.modal-input {
  display: block;
  width: 100%;
  margin-top: 5px;
  padding: 8px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
}
.modal-input:focus { outline: none; border-color: var(--accent); }
.modal-row { display: flex; gap: 12px; }
.modal-half { flex: 1; }
.modal-map {
  height: 280px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 10px;
  z-index: 1;
}
.modal-coords { align-items: flex-end; margin-bottom: 0; }
.modal-input--sm { padding: 6px 8px; font-size: 13px; font-family: monospace; }
.modal-coord-clear {
  margin-bottom: 14px;
  flex-shrink: 0;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
}

/* ── Lightbox admin edit ────────────────────────────────────────────────── */
.lb-admin-edit {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.lb-admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.lb-admin-header strong {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
}
.lb-admin-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}
.lb-admin-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}
.lb-admin-label span {
  font-weight: 400;
}
.lb-admin-input {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 6px 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
}
.lb-admin-input:focus {
  outline: none;
  border-color: var(--accent);
}
select.lb-admin-input {
  cursor: pointer;
}

/* ── Lightbox pricing ───────────────────────────────────────────────────── */
.lb-pricing {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.lb-pricing-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px;
}
.lb-pricing-note {
  font-size: 11px;
  color: var(--text-muted);
  margin: 0 0 12px;
}
.lb-pricing-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.lb-pricing-options--single {
  grid-template-columns: 1fr;
}
.lb-price-card--wide {
  max-width: 100%;
}
.lb-price-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lb-price-card-info {
  min-width: 0;
}
.lb-price-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}
.lb-price-px {
  font-size: 11px;
  color: var(--text-muted);
  margin: 2px 0 0;
}
.lb-price-amount {
  font-size: 26px;
  font-weight: 800;
  color: var(--accent);
  margin: 0;
  line-height: 1;
}
.lb-price-card .btn {
  display: block;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  white-space: normal !important;
  font-size: 12px;
  padding: 7px 8px;
}
.lb-license-link {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin: 0;
}
.lb-license-link a { color: var(--accent); }

/* ── Lightbox map ────────────────────────────────────────────────────────── */
.lb-map {
  margin-top: 16px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.lb-map iframe {
  display: block;
  width: 100%;
  height: 180px;
  border: none;
}
.lb-map-link {
  display: block;
  text-align: center;
  font-size: 11px;
  padding: 5px;
  background: var(--surface2);
  color: var(--accent);
  text-decoration: none;
}
.lb-map-link:hover { text-decoration: underline; }

/* ── Licence page ────────────────────────────────────────────────────────── */
.license-page {
  max-width: 820px;
  margin: 0 auto;
  padding: 32px 0 64px;
}
.license-heading {
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 6px;
}
.license-effective {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 32px;
}
.license-body { display: flex; flex-direction: column; gap: 28px; }
.license-section h2 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--accent);
}
.license-section p,
.license-section li {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary, var(--text));
}
.license-section ul { padding-left: 20px; margin: 0; }
.license-section li { margin-bottom: 6px; }
.license-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 8px;
}
.license-table th,
.license-table td {
  padding: 10px 12px;
  border: 1px solid var(--border);
  text-align: left;
}
.license-table th {
  background: var(--surface2);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
}
.license-cta { margin-top: 40px; text-align: center; }

/* ── Cart page ──────────────────────────────────────────────────────────── */
.cart-page { max-width: 800px; margin: 0 auto; padding-bottom: 40px; }
.cart-title { font-size: 24px; font-weight: 700; margin-bottom: 24px; }

.cart-items { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }

.cart-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.cart-item-thumb {
  width: 100px;
  height: 64px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface2);
  cursor: pointer;
}
.cart-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-ref {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.cart-item-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-item-size {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.cart-item-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}
.cart-item-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.cart-item-remove:hover { color: var(--danger); background: rgba(217,79,79,0.1); }

.cart-summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.cart-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 16px;
  margin-bottom: 6px;
}
.cart-summary-total {
  font-size: 28px;
  font-weight: 800;
  color: var(--accent);
}
.cart-summary-note {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 16px;
}
.cart-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.cart-actions .btn--full { flex: 1; }

/* ── Sales page ────────────────────────────────────────────────────────── */
.sales-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.sales-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.sales-table th {
  background: var(--surface2);
  padding: 10px 12px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.sales-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.sales-table tbody tr:last-child td { border-bottom: none; }
.sales-table tbody tr:hover { background: var(--surface2); }
.sales-row--completed { }
.sales-row--pending { background: rgba(240,165,0,0.04); }
.sales-row--refunded { background: rgba(217,79,79,0.04); }
.sales-date { white-space: nowrap; font-size: 12px; color: var(--text-muted); }
.sales-txn { font-family: monospace; font-size: 11px; color: var(--text-muted); }
.sales-customer-name { font-weight: 600; font-size: 13px; }
.sales-customer-email { font-size: 11px; color: var(--text-muted); }
.sales-item-line {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 250px;
}
.sales-item-line + .sales-item-line { margin-top: 2px; }
.sales-total { font-weight: 700; color: var(--accent); white-space: nowrap; }
.sales-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.sales-status--completed { background: rgba(63,186,106,0.15); color: var(--success); }
.sales-status--pending { background: rgba(240,165,0,0.15); color: var(--accent); }
.sales-status--refunded { background: rgba(217,79,79,0.15); color: var(--danger); }
.sales-status--failed { background: rgba(217,79,79,0.15); color: var(--danger); }
.sales-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
}
.sales-page-info { font-size: 13px; color: var(--text-muted); }

/* Order detail modal */
.order-detail-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.order-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.order-detail-row:last-child { border-bottom: none; }
.order-detail-row strong { color: var(--text-muted); font-size: 12px; }
.order-detail-items {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.order-detail-items th {
  background: var(--surface2);
  padding: 6px 10px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.order-detail-items td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .header-inner { padding: 0 16px; }
  .logo-sub { display: none; }
  .main-content { padding: 16px; }

  /* Lightbox: full-screen vertical scroll on mobile */
  .lightbox { align-items: flex-start; overflow-y: auto; }
  .lightbox-inner {
    flex-direction: column;
    max-width: 100vw;
    max-height: none;
    width: 100%;
    min-height: 100vh;
    border-radius: 0;
  }
  .lightbox-media {
    width: 100%;
    height: 45vw;
    min-height: 200px;
    max-height: 50vh;
    flex-shrink: 0;
  }
  .lightbox-panel {
    width: 100%;
    max-height: none;
    flex: 1;
    padding: 16px;
  }
  /* Pricing cards: side-by-side still works at full width */
  .lb-pricing-options { grid-template-columns: 1fr 1fr; }

  .lightbox-prev { left: 4px; }
  .lightbox-next { right: 4px; }
  .lightbox-close { top: 8px; right: 8px; }

  .filter-group { flex-direction: column; align-items: flex-start; }
  .filter-label { width: auto; }
}

@media (max-width: 480px) {
  .asset-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
  .stat-grid { grid-template-columns: repeat(5, 1fr); }
  /* Pricing: single column on very small screens for bigger buttons */
  .lb-pricing-options { grid-template-columns: 1fr; }
}
