/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0a0f;
  --surface: #111118;
  --surface2: #1a1a24;
  --border: rgba(255,255,255,0.07);
  --accent: #c9a84c;
  --accent2: #e8c97a;
  --lost: #e05c5c;
  --found: #4caf89;
  --text: #f0eee8;
  --text-muted: #888;
  --radius: 16px;
  --shadow: 0 8px 40px rgba(0,0,0,0.5);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 48px;
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-logo { display: flex; align-items: baseline; gap: 6px; text-decoration: none; }
.logo-vit {
  font-family: 'Playfair Display', serif;
  font-size: 22px; font-weight: 900;
  color: var(--accent);
  letter-spacing: 2px;
}
.logo-lf {
  font-family: 'Space Mono', monospace;
  font-size: 13px; color: var(--text-muted);
  letter-spacing: 1px;
}

.nav-links { display: flex; gap: 32px; }
.nav-link {
  font-size: 14px; font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.5px;
  transition: color 0.2s;
  position: relative;
  padding-bottom: 4px;
}
.nav-link::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 0; height: 1px; background: var(--accent);
  transition: width 0.3s;
}
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

.nav-cta {
  background: var(--accent);
  color: #0a0a0f;
  border: none; border-radius: 8px;
  padding: 10px 22px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: background 0.2s, transform 0.15s;
}
.nav-cta:hover { background: var(--accent2); transform: translateY(-1px); }

/* ===== PAGE SYSTEM ===== */
.page { display: none; padding-top: 80px; min-height: 100vh; }
.page.active { display: block; }

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: calc(100vh - 80px);
  display: flex; flex-direction: column;
  justify-content: center;
  padding: 80px 10%;
  overflow: hidden;
}

.hero-bg-text {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Playfair Display', serif;
  font-size: clamp(160px, 28vw, 380px);
  font-weight: 900;
  color: rgba(201,168,76,0.04);
  pointer-events: none;
  white-space: nowrap;
  letter-spacing: -10px;
  user-select: none;
}

.hero::before {
  content: '';
  position: absolute; top: -200px; right: -200px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(201,168,76,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content { position: relative; max-width: 700px; }

.hero-tag {
  font-family: 'Space Mono', monospace;
  font-size: 12px; color: var(--accent);
  letter-spacing: 3px; text-transform: uppercase;
  margin-bottom: 20px;
  display: flex; align-items: center; gap: 10px;
}
.hero-tag::before {
  content: ''; display: inline-block;
  width: 30px; height: 1px; background: var(--accent);
}

.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(44px, 6vw, 78px);
  font-weight: 900; line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 24px;
  color: var(--text);
}
.hero-title em { color: var(--accent); font-style: italic; }

.hero-sub {
  font-size: 17px; color: var(--text-muted);
  line-height: 1.7; max-width: 500px;
  margin-bottom: 40px;
}

.hero-btns { display: flex; gap: 16px; flex-wrap: wrap; }

.btn-primary {
  background: var(--accent);
  color: #0a0a0f;
  border: none; border-radius: 10px;
  padding: 15px 32px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px; font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.3px;
}
.btn-primary:hover { background: var(--accent2); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(201,168,76,0.3); }

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 15px 32px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px; font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  backdrop-filter: blur(10px);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* Stats */
.hero-stats {
  display: flex; align-items: center; gap: 0;
  margin-top: 64px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 40px;
  width: fit-content;
  position: relative;
}
.stat-card { text-align: center; padding: 0 32px; }
.stat-num {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 36px; font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; letter-spacing: 1px; }
.stat-divider { width: 1px; height: 40px; background: var(--border); }

/* ===== HOW IT WORKS ===== */
.how-it-works {
  padding: 100px 10%;
  border-top: 1px solid var(--border);
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  margin-bottom: 48px;
  color: var(--text);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s;
}
.step-card::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0; transition: opacity 0.3s;
}
.step-card:hover { border-color: rgba(201,168,76,0.3); transform: translateY(-4px); }
.step-card:hover::before { opacity: 1; }

.step-num {
  font-family: 'Playfair Display', serif;
  font-size: 52px; font-weight: 900;
  color: rgba(201,168,76,0.12);
  line-height: 1; margin-bottom: 16px;
}
.step-card h3 { font-size: 18px; font-weight: 600; margin-bottom: 10px; }
.step-card p { font-size: 14px; color: var(--text-muted); line-height: 1.7; }

/* ===== RECENT SECTION ===== */
.recent-section { padding: 60px 10% 100px; }
.recent-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 36px; }
.view-all { font-size: 13px; color: var(--accent); text-decoration: none; letter-spacing: 0.5px; }
.view-all:hover { text-decoration: underline; }

/* ===== ITEMS GRID ===== */
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.item-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s;
  animation: fadeUp 0.4s ease both;
}
.item-card:hover { transform: translateY(-6px); border-color: rgba(201,168,76,0.25); box-shadow: var(--shadow); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.item-img {
  width: 100%; height: 180px;
  object-fit: cover;
  background: var(--surface2);
  display: flex; align-items: center; justify-content: center;
  font-size: 48px;
}
.item-img img { width: 100%; height: 100%; object-fit: cover; }

.item-body { padding: 18px 20px 20px; }

.item-badge {
  display: inline-block;
  font-size: 10px; font-weight: 600;
  letter-spacing: 1.5px; text-transform: uppercase;
  padding: 4px 10px; border-radius: 20px;
  margin-bottom: 10px;
}
.badge-lost { background: rgba(224,92,92,0.15); color: var(--lost); }
.badge-found { background: rgba(76,175,137,0.15); color: var(--found); }

.item-name { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.item-location { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.item-time { font-size: 11px; color: var(--text-muted); font-family: 'Space Mono', monospace; }

.empty-state {
  grid-column: 1/-1;
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
  font-size: 15px;
}

/* ===== BROWSE PAGE ===== */
.browse-header {
  padding: 60px 10% 40px;
  border-bottom: 1px solid var(--border);
}

.page-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 900; line-height: 1.1;
  margin-bottom: 12px;
}
.page-title em { color: var(--accent); font-style: italic; }
.page-sub { font-size: 15px; color: var(--text-muted); }

.filter-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 24px 10%;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 80px; z-index: 10;
}

.search-wrap {
  flex: 1; min-width: 200px;
  position: relative;
}
.search-icon {
  position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%);
  font-size: 18px; color: var(--text-muted);
  pointer-events: none;
}
.search-wrap input {
  width: 100%; padding: 12px 16px 12px 40px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.search-wrap input:focus { border-color: var(--accent); }
.search-wrap input::placeholder { color: var(--text-muted); }

.filter-select {
  padding: 12px 16px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  outline: none; cursor: pointer;
  transition: border-color 0.2s;
}
.filter-select:focus { border-color: var(--accent); }

.btn-clear {
  padding: 12px 20px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px; cursor: pointer;
  transition: all 0.2s;
}
.btn-clear:hover { border-color: var(--accent); color: var(--accent); }

#page-browse .items-grid { padding: 32px 10% 80px; }

/* ===== REPORT PAGE ===== */
.report-header { padding: 60px 10% 40px; }

.report-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 10% 100px;
}

.type-toggle {
  display: flex; gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 40px;
  width: fit-content;
}

.toggle-btn {
  padding: 12px 28px;
  background: transparent;
  border: none; border-radius: 9px;
  color: var(--text-muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px; font-weight: 500;
  cursor: pointer;
  transition: all 0.25s;
}
.toggle-btn.active {
  background: var(--accent);
  color: #0a0a0f;
  font-weight: 600;
}

/* Form */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group.full { grid-column: 1 / -1; }

label {
  font-size: 13px; font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}
.req { color: var(--accent); }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="datetime-local"],
select, textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  padding: 13px 16px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  width: 100%;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  background: var(--surface2);
}
input::placeholder, textarea::placeholder { color: var(--text-muted); }
textarea { resize: vertical; min-height: 100px; }

select option { background: var(--surface2); }

.field-hint { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* Image Upload */
.image-drop {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s;
  background: var(--surface);
  position: relative;
  overflow: hidden;
}
.image-drop:hover { border-color: var(--accent); background: var(--surface2); }
.drop-icon { font-size: 36px; margin-bottom: 10px; }
.image-drop p { font-size: 14px; color: var(--text-muted); }
.drop-hint { font-size: 12px; margin-top: 4px; }
#image-preview {
  max-height: 200px; max-width: 100%;
  border-radius: 8px; margin-top: 16px;
  object-fit: contain;
}

/* Form Divider */
.form-divider {
  position: relative;
  text-align: center;
  margin: 8px 0;
}
.form-divider::before {
  content: ''; position: absolute;
  top: 50%; left: 0; right: 0; height: 1px;
  background: var(--border);
}
.form-divider span {
  position: relative; background: var(--bg);
  padding: 0 16px;
  font-size: 12px; color: var(--text-muted);
  letter-spacing: 1px; text-transform: uppercase;
}

.btn-submit {
  width: 100%; margin-top: 32px;
  padding: 18px;
  background: var(--accent);
  color: #0a0a0f;
  border: none; border-radius: 12px;
  font-family: 'Playfair Display', serif;
  font-size: 18px; font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: all 0.25s;
}
.btn-submit:hover { background: var(--accent2); transform: translateY(-2px); box-shadow: 0 10px 30px rgba(201,168,76,0.25); }

/* ===== MODAL ===== */
.modal-overlay {
  display: none; position: fixed;
  inset: 0; background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  z-index: 200;
  align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }

.modal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  max-width: 560px; width: 100%;
  max-height: 85vh; overflow-y: auto;
  position: relative;
  animation: modalIn 0.3s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: var(--surface2); border: none;
  width: 32px; height: 32px; border-radius: 50%;
  color: var(--text-muted); font-size: 14px;
  cursor: pointer; z-index: 1;
  transition: background 0.2s, color 0.2s;
}
.modal-close:hover { background: var(--accent); color: #0a0a0f; }

.modal-img {
  width: 100%; max-height: 260px;
  object-fit: cover;
  border-radius: 20px 20px 0 0;
}
.modal-img-placeholder {
  width: 100%; height: 180px;
  background: var(--surface2);
  border-radius: 20px 20px 0 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 60px;
}

.modal-body { padding: 24px 28px 28px; }
.modal-badge { margin-bottom: 12px; }
.modal-title {
  font-family: 'Playfair Display', serif;
  font-size: 26px; font-weight: 700;
  margin-bottom: 12px; line-height: 1.2;
}
.modal-desc { font-size: 14px; color: var(--text-muted); line-height: 1.7; margin-bottom: 20px; }

.modal-meta { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.meta-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.meta-icon { font-size: 16px; width: 24px; text-align: center; }
.meta-label { color: var(--text-muted); min-width: 60px; }
.meta-value { color: var(--text); font-weight: 500; }

.modal-contact {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
}
.modal-contact h4 { font-size: 12px; color: var(--text-muted); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 12px; }
.contact-row { display: flex; align-items: center; gap: 10px; font-size: 13px; margin-bottom: 8px; }
.contact-row:last-child { margin-bottom: 0; }

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: 32px; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 14px 28px;
  border-radius: 40px;
  font-size: 14px;
  z-index: 300;
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
  white-space: nowrap;
  box-shadow: var(--shadow);
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { border-color: var(--found); color: var(--found); }
.toast.error { border-color: var(--lost); color: var(--lost); }

/* ===== LOCATION AUTOCOMPLETE ===== */
.location-wrap {
  position: relative;
}
.location-wrap input {
  width: 100%;
  padding-right: 36px;
}
.loc-arrow {
  position: absolute; right: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted); font-size: 16px;
  pointer-events: none;
}
.loc-suggestions {
  display: none;
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  z-index: 50;
  max-height: 260px; overflow-y: auto;
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
}
.loc-suggestions.open { display: block; }

.loc-group-label {
  font-size: 10px; font-weight: 600;
  color: var(--accent);
  letter-spacing: 1.5px; text-transform: uppercase;
  padding: 10px 16px 4px;
}
.loc-option {
  padding: 10px 16px;
  font-size: 13px; color: var(--text);
  cursor: pointer;
  transition: background 0.15s;
}
.loc-option:hover, .loc-option.highlighted {
  background: rgba(201,168,76,0.1);
  color: var(--accent);
}
.loc-option mark {
  background: transparent;
  color: var(--accent);
  font-weight: 600;
}
.browse-loc { min-width: 220px; }


::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .navbar { padding: 16px 20px; }
  .nav-links { display: none; }
  .hero { padding: 60px 6%; }
  .how-it-works, .recent-section { padding: 60px 6%; }
  .browse-header, .report-header { padding: 40px 6% 24px; }
  .filter-bar { padding: 16px 6%; }
  #page-browse .items-grid { padding: 24px 6% 60px; }
  .report-container { padding: 0 6% 80px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-group.full { grid-column: 1; }
  .hero-stats { padding: 20px; flex-wrap: wrap; }
  .stat-card { padding: 0 16px; }
}

/* ===== MATCH MODAL ===== */
.match-modal-card {
  border-color: rgba(201,168,76,0.3);
  box-shadow: 0 0 60px rgba(201,168,76,0.12);
}
.match-header {
  padding: 32px 28px 20px;
  text-align: center;
}
.match-pulse {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(201,168,76,0.15);
  border: 2px solid var(--accent);
  margin: 0 auto 16px; position: relative;
}
.match-pulse::before {
  content: '🔔'; position: absolute;
  top: 50%; left: 50%; transform: translate(-50%,-50%); font-size: 24px;
}
.match-pulse::after {
  content: ''; position: absolute; inset: -8px; border-radius: 50%;
  border: 2px solid rgba(201,168,76,0.3);
  animation: pulse-ring 1.5s ease-out infinite;
}
@keyframes pulse-ring {
  0%   { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.5); opacity: 0; }
}
.match-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px; font-weight: 700; margin-bottom: 8px; line-height: 1.3;
}
.match-sub { font-size: 14px; color: var(--text-muted); line-height: 1.6; }
.match-sub strong { color: var(--accent); }
.match-sub em { color: var(--text); font-style: italic; }
.match-list { padding: 0 20px; display: flex; flex-direction: column; gap: 10px; }
.match-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 16px;
  cursor: pointer; transition: all 0.2s;
}
.match-card:hover {
  border-color: var(--accent);
  background: rgba(201,168,76,0.05);
  transform: translateX(4px);
}
.match-img {
  width: 52px; height: 52px; border-radius: 10px;
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; flex-shrink: 0; overflow: hidden;
}
.match-img img { width: 100%; height: 100%; object-fit: cover; }
.match-info { flex: 1; min-width: 0; }
.match-name { font-size: 15px; font-weight: 600; margin: 4px 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.match-loc  { font-size: 12px; color: var(--text-muted); margin-bottom: 2px; }
.match-contact { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.match-arrow { color: var(--accent); font-size: 18px; flex-shrink: 0; }
.match-actions { display: flex; gap: 12px; padding: 20px 20px 8px; }
.match-actions .btn-primary,
.match-actions .btn-secondary { flex: 1; padding: 13px; font-size: 14px; }
.match-emailjs-note {
  text-align: center; font-size: 12px; color: var(--text-muted);
  padding: 0 20px 20px; line-height: 1.6;
}
.match-emailjs-note strong { color: var(--accent); }

/* ===== MATCH NOTIFY BAR ===== */
.match-notify-bar {
  margin-top: 14px;
  background: rgba(201,168,76,0.08);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-muted);
  min-height: 38px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.notify-sending { color: var(--text-muted); }
#match-notify-status { font-weight: 600; }

/* ===== MY POSTS PAGE ===== */
.myposts-email-bar {
  padding: 24px 10%;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 80px; z-index: 10;
}
.myposts-hint { font-size: 12px; color: var(--text-muted); }

/* ===== MY POST CARD ACTIONS ===== */
.item-card-actions {
  display: flex; gap: 8px;
  padding: 0 20px 16px;
}
.btn-edit {
  flex: 1; padding: 8px;
  background: rgba(201,168,76,0.12);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 8px;
  color: var(--accent);
  font-size: 12px; font-weight: 600;
  cursor: pointer; font-family: 'DM Sans', sans-serif;
  transition: all 0.2s;
}
.btn-edit:hover { background: rgba(201,168,76,0.22); }
.btn-delete {
  flex: 1; padding: 8px;
  background: rgba(224,92,92,0.1);
  border: 1px solid rgba(224,92,92,0.3);
  border-radius: 8px;
  color: var(--lost);
  font-size: 12px; font-weight: 600;
  cursor: pointer; font-family: 'DM Sans', sans-serif;
  transition: all 0.2s;
}
.btn-delete:hover { background: rgba(224,92,92,0.2); }

/* ===== GPS BUTTON ===== */
.btn-map-pin {
  margin-top: 8px;
  padding: 9px 16px;
  background: rgba(201,168,76,0.1);
  border: 1px dashed rgba(201,168,76,0.4);
  border-radius: 8px;
  color: var(--accent);
  font-size: 12px; font-weight: 500;
  cursor: pointer; font-family: 'DM Sans', sans-serif;
  transition: all 0.2s; width: 100%;
  text-align: left;
}
.btn-map-pin:hover { background: rgba(201,168,76,0.18); }

/* ===== MATCH SCORE BADGE ===== */
.match-score {
  display: inline-block;
  background: rgba(76,175,137,0.15);
  color: var(--found);
  border-radius: 20px;
  font-size: 11px; font-weight: 700;
  padding: 2px 10px;
  margin-left: 8px;
  letter-spacing: 0.5px;
}

/* ===== EDIT FORM ===== */
.edit-form-body { padding: 24px 28px 28px; }
.edit-form-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px; font-weight: 700;
  margin-bottom: 20px; color: var(--text);
}

/* ===== CONNECTION STATUS ===== */
.conn-status {
  position: fixed; bottom: 80px; left: 50%;
  transform: translateX(-50%);
  padding: 8px 20px; border-radius: 20px;
  font-size: 13px; font-weight: 500;
  z-index: 400; display: none;
  transition: all 0.3s;
}
.conn-status.offline {
  display: block;
  background: rgba(224,92,92,0.15);
  border: 1px solid var(--lost);
  color: var(--lost);
}
.conn-status.online {
  display: block;
  background: rgba(76,175,137,0.15);
  border: 1px solid var(--found);
  color: var(--found);
}

/* ===== SITE FOOTER ===== */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  margin-top: 60px;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding: 48px 10%;
  border-bottom: 1px solid var(--border);
}

.footer-logo {
  display: flex; align-items: baseline; gap: 6px;
  margin-bottom: 12px;
}

.footer-tagline {
  font-size: 13px; color: var(--text-muted);
  line-height: 1.6; max-width: 260px;
}

.footer-links-title {
  font-size: 11px; font-weight: 600;
  color: var(--accent);
  letter-spacing: 1.5px; text-transform: uppercase;
  margin-bottom: 14px;
}

.footer-center a {
  display: block;
  font-size: 13px; color: var(--text-muted);
  text-decoration: none; margin-bottom: 8px;
  transition: color 0.2s;
}
.footer-center a:hover { color: var(--accent); }

.footer-right p {
  font-size: 13px; color: var(--text-muted);
  margin-bottom: 6px;
}
.footer-dept {
  font-size: 11px !important;
  color: var(--accent) !important;
  margin-top: 8px !important;
  letter-spacing: 0.5px;
}

.footer-bottom {
  padding: 20px 10%;
  text-align: center;
}
.footer-bottom p {
  font-size: 12px; color: var(--text-muted);
  margin-bottom: 4px; line-height: 1.6;
}
.footer-bottom p:first-child {
  color: var(--text);
  font-weight: 500;
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 32px 6%;
  }
  .footer-bottom { padding: 16px 6%; }
}

/* ===== CATEGORY GRID ===== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
}
.cat-btn {
  padding: 10px 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 12px; font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.cat-btn:hover { border-color: var(--accent); color: var(--accent); }
.cat-btn.active {
  background: rgba(201,168,76,0.15);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 700;
}

/* ===== IMAGE UPLOAD BUTTONS ===== */
.image-upload-btns {
  display: flex; gap: 10px; margin-top: 10px;
}
.btn-upload-opt {
  flex: 1; padding: 11px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all 0.2s;
}
.btn-upload-opt:hover { border-color: var(--accent); color: var(--accent); }
.btn-camera { border-color: rgba(76,175,137,0.4); color: var(--found); }
.btn-camera:hover { border-color: var(--found); background: rgba(76,175,137,0.08); }

/* ===== CATEGORY BADGE ON CARD ===== */
.item-category-badge {
  display: inline-block;
  font-size: 11px; color: var(--text-muted);
  margin-bottom: 4px;
}

/* ===== RESOLVED SECTION ===== */
.resolved-section {
  padding: 60px 10% 100px;
  border-top: 1px solid var(--border);
}
.resolved-count {
  font-size: 13px; color: var(--found);
  font-weight: 600;
}
.resolved-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 24px;
}
.resolved-card {
  background: rgba(76,175,137,0.06);
  border: 1px solid rgba(76,175,137,0.25);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.resolved-card::before {
  content: '✅';
  position: absolute; top: 16px; right: 16px;
  font-size: 20px;
}
.resolved-badge {
  font-size: 11px; font-weight: 700;
  color: var(--found); letter-spacing: 1px;
  text-transform: uppercase; margin-bottom: 8px;
}
.resolved-name { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.resolved-loc { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.resolved-time { font-size: 11px; color: var(--text-muted); font-family: 'Space Mono', monospace; }

/* ===== RESOLVE BUTTON IN MODAL ===== */
.btn-resolve {
  width: 100%; margin-top: 12px;
  padding: 12px;
  background: rgba(76,175,137,0.12);
  border: 1px solid rgba(76,175,137,0.4);
  border-radius: 10px;
  color: var(--found);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.btn-resolve:hover { background: rgba(76,175,137,0.22); }

/* ===== AI MATCH EXPLANATION ===== */
.ai-explanation {
  background: rgba(201,168,76,0.06);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: 10px;
  padding: 12px 16px;
  margin-top: 10px;
  font-size: 12px; color: var(--text-muted);
  line-height: 1.6;
}
.ai-explanation strong { color: var(--accent); }

@media (max-width: 480px) {
  .image-upload-btns { flex-direction: column; }
  .category-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ===== PREVIEW THUMBNAILS (inside original image-drop box) ===== */
.upload-previews {
  display: flex; flex-wrap: wrap; gap: 10px;
  justify-content: center;
  margin-top: 14px;
}
.upload-previews:empty { display: none; margin-top: 0; }

.preview-thumb {
  position: relative;
  width: 72px; height: 72px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  flex-shrink: 0;
  animation: fadeUp 0.3s ease;
}
.preview-thumb img { width: 100%; height: 100%; object-fit: cover; }
.preview-remove {
  position: absolute; top: 4px; right: 4px;
  width: 18px; height: 18px;
  background: rgba(0,0,0,0.75);
  border: none; border-radius: 50%;
  color: #fff; font-size: 10px;
  cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  transition: background 0.2s;
}
.preview-remove:hover { background: var(--lost); }

.preview-add-btn {
  width: 72px; height: 72px;
  border-radius: 10px;
  border: 2px dashed rgba(201,168,76,0.4);
  background: rgba(201,168,76,0.06);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  cursor: pointer; gap: 2px;
  transition: all 0.2s; flex-shrink: 0;
  color: var(--accent); font-size: 18px;
}
.preview-add-btn span { font-size: 9px; color: var(--text-muted); font-family: 'DM Sans', sans-serif; }
.preview-add-btn:hover { border-color: var(--accent); background: rgba(201,168,76,0.12); }

/* ===== MODAL MULTI IMAGE ===== */
.modal-imgs-strip {
  display: flex; gap: 6px;
  padding: 10px 12px 0;
  overflow-x: auto;
}
.modal-img-thumb {
  width: 52px; height: 52px;
  object-fit: cover; border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer; opacity: 0.6;
  transition: all 0.2s; flex-shrink: 0;
}
.modal-img-thumb.active, .modal-img-thumb:hover {
  border-color: var(--accent); opacity: 1;
}
