/* ─────────────────────────────────────────────
   Theft Register — Main Stylesheet
   CSS custom properties allow admin color changes
   ───────────────────────────────────────────── */

:root {
  --color-primary:  #1a3a5c;
  --color-accent:   #e63946;
  --color-bg:       #f8f9fa;
  --color-surface:  #ffffff;
  --color-border:   #dee2e6;
  --color-text:     #212529;
  --color-muted:    #6c757d;
  --color-success:  #198754;
  --color-danger:   #dc3545;
  --color-info:     #0dcaf0;
  --color-warning:  #ffc107;

  --radius-sm: 4px;
  --radius:    8px;
  --radius-lg: 12px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.1);
  --shadow:    0 2px 8px rgba(0,0,0,.12);
  --shadow-lg: 0 4px 20px rgba(0,0,0,.15);

  --font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SFMono-Regular', Menlo, Consolas, monospace;

  --nav-height: 60px;
  --sidebar-width: 260px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Navigation ─────────────────────────────── */
.topnav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-primary);
  height: var(--nav-height);
  box-shadow: var(--shadow);
}
.topnav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.nav-brand { color: #fff; font-size: 1.25rem; font-weight: 700; }
.nav-brand:hover { text-decoration: none; opacity: .9; }
.nav-brand-text { letter-spacing: -.3px; }
.nav-logo { height: 40px; width: auto; }
.topnav-right { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.nav-link { color: rgba(255,255,255,.9); font-size: .9rem; padding: .4rem .75rem; border-radius: var(--radius-sm); transition: background .15s; }
.nav-link:hover { background: rgba(255,255,255,.15); text-decoration: none; color: #fff; }
.nav-lang { font-size: .8rem; opacity: .8; }
.nav-flag { display: inline-flex; align-items: center; opacity: .55; text-decoration: none; transition: opacity .15s; border-radius: 2px; overflow: hidden; }
.nav-flag:hover { opacity: 1; }
.nav-flag-active { opacity: 1; }
.nav-register { color: #fff; opacity: .9; font-weight: 500; }
.nav-register:hover { opacity: 1; text-decoration: underline; }

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle { background: none; border: none; cursor: pointer; font-family: inherit; font-size: .9rem; }
.nav-dropdown-menu { display: none; position: absolute; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: var(--shadow-lg); min-width: 180px; z-index: 200; }
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu { display: block; }
.dropdown-item { display: flex; align-items: center; padding: .6rem 1rem; color: var(--color-text); font-size: .9rem; }
.dropdown-item:hover { background: var(--color-bg); text-decoration: none; }
.dropdown-divider { border: none; border-top: 1px solid var(--color-border); margin: .25rem 0; }
.dropdown-form { margin: 0; }
.dropdown-logout { width: 100%; background: none; border: none; cursor: pointer; font-family: inherit; font-size: .9rem; text-align: left; color: var(--color-danger); }

/* ── Buttons ────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary  { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.btn-primary:hover { background: color-mix(in srgb, var(--color-primary) 85%, #000); color: #fff; }
.btn-accent   { background: var(--color-accent); color: #fff; border-color: var(--color-accent); }
.btn-outline  { background: transparent; border-color: var(--color-primary); color: var(--color-primary); }
.btn-outline:hover { background: var(--color-primary); color: #fff; }
.btn-danger   { background: var(--color-danger); color: #fff; border-color: var(--color-danger); }
.btn-danger:hover { background: #b02a37; color: #fff; }
.btn-sm       { padding: .3rem .75rem; font-size: .8rem; }
.btn-full     { width: 100%; justify-content: center; }

/* ── Flash messages ─────────────────────────── */
.flash-container { position: sticky; top: var(--nav-height); z-index: 99; }
.flash { display: flex; align-items: center; justify-content: space-between; padding: .75rem 1.5rem; font-size: .9rem; }
.flash-success { background: #d1e7dd; color: #0a3622; }
.flash-error   { background: #f8d7da; color: #58151c; }
.flash-info    { background: #cff4fc; color: #055160; }
.flash-warning { background: #fff3cd; color: #664d03; }
.flash-close   { background: none; border: none; cursor: pointer; font-size: 1.2rem; line-height: 1; padding: 0 .25rem; opacity: .7; }
.flash-close:hover { opacity: 1; }

/* ── Main content ───────────────────────────── */
.main-content { max-width: 1200px; width: 100%; margin: 0 auto; padding: 2rem 1rem; flex: 1; }
.page-container { max-width: 900px; margin: 0 auto; }
.page-title { font-size: 1.75rem; margin-bottom: 1.5rem; color: var(--color-primary); }
.section-title { font-size: 1.2rem; margin: 1.5rem 0 1rem; color: var(--color-primary); border-bottom: 2px solid var(--color-border); padding-bottom: .5rem; }

/* ── Hero ───────────────────────────────────── */
.hero { padding: 2.5rem 1.5rem; background: var(--color-primary); color: #fff; border-radius: var(--radius-lg); margin-bottom: 2.5rem; }
.hero-layout { display: flex; align-items: center; justify-content: center; gap: 2.5rem; max-width: 900px; margin: 0 auto; }
.hero-image-col { flex: 0 0 auto; display: flex; justify-content: center; align-items: center; }
.hero-text-col { flex: 1 1 0; }
.hero-title { font-size: 2.5rem; margin-bottom: .5rem; }
.hero-subtitle { font-size: 1.2rem; opacity: .9; margin-bottom: .75rem; font-weight: 600; }
.hero-intro { opacity: .85; margin-bottom: .75rem; }
.hero-description2 { opacity: .8; margin-bottom: 0; }
.hero .btn { margin: 0 .25rem; }
.hero .btn-outline { border-color: rgba(255,255,255,.7); color: #fff; }
.hero .btn-outline:hover { background: rgba(255,255,255,.2); }
@media (max-width: 700px) {
  .hero-layout { flex-direction: column; text-align: center; gap: 1.5rem; }
}

/* ── Municipality accordion ─────────────────── */
.municipalities-section { margin-top: 2rem; }
.municipalities-list { display: flex; flex-direction: column; gap: .5rem; }
.municipality-group { border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; }
.municipality-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  cursor: pointer;
  background: var(--color-surface);
  user-select: none;
  list-style: none;
}
.municipality-summary:hover { background: var(--color-bg); }
.municipality-summary::marker, .municipality-summary::-webkit-details-marker { display: none; }
.municipality-name { font-weight: 600; color: var(--color-primary); }
.municipality-count { margin-left: auto; margin-right: 1rem; }
.municipality-body { padding: 1rem; border-top: 1px solid var(--color-border); background: var(--color-surface); }
.municipality-viewall { text-align: right; margin-top: .75rem; }

/* ── Tables ─────────────────────────────────── */
.table-responsive { overflow-x: auto; }
.objects-table, .admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
.objects-table th, .admin-table th {
  text-align: left;
  padding: .6rem .75rem;
  background: var(--color-bg);
  border-bottom: 2px solid var(--color-border);
  font-weight: 600;
  white-space: nowrap;
}
.objects-table td, .admin-table td {
  padding: .6rem .75rem;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}
.objects-table tr:hover td, .admin-table tr:hover td { background: var(--color-bg); }
.report-id-cell { font-family: monospace; font-size: .85rem; white-space: nowrap; }
.row-unread td { font-weight: 600; }

/* ── Thumbnails ─────────────────────────────── */
.thumb { width: 50px; height: 50px; object-fit: cover; border-radius: var(--radius-sm); }
.no-thumb { font-size: 1.5rem; }
.td-thumb { width: 60px; }

/* ── Badges ─────────────────────────────────── */
.badge { display: inline-block; padding: .2em .6em; border-radius: 999px; font-size: .75rem; font-weight: 700; background: var(--color-muted); color: #fff; }
.badge-blue   { background: #0d6efd; }
.badge-green  { background: var(--color-success); }
.badge-red    { background: var(--color-danger); }
.badge-yellow { background: #d97706; }
.badge-accent { background: var(--color-accent); }
.unread-dot   { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--color-accent); }

/* ── Forms ──────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: .4rem; font-size: .9rem; }
.form-input {
  width: 100%;
  padding: .55rem .85rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-family: inherit;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.form-input:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(26,58,92,.15); }
.form-input:disabled { background: var(--color-bg); cursor: not-allowed; color: var(--color-muted); }
.form-textarea { resize: vertical; min-height: 100px; }
.form-select { appearance: auto; }
.form-select-sm { padding: .3rem .6rem; font-size: .85rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: #fff; }
.form-hint { font-size: .8rem; color: var(--color-muted); margin-top: .25rem; display: block; }
.form-check-group { margin: .5rem 0; }
.check-label { display: flex; align-items: center; gap: .6rem; cursor: pointer; font-weight: normal; }
.form-check { width: 1rem; height: 1rem; cursor: pointer; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.5rem; }
.form-row  { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.5rem; }
.form-actions { display: flex; gap: .75rem; align-items: center; margin-top: 1.5rem; }
.form-section { border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.5rem; }
.required { color: var(--color-accent); }

/* ── Auth card ──────────────────────────────── */
.auth-container { max-width: 440px; margin: 2rem auto; }
.auth-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 2rem; box-shadow: var(--shadow); }
.auth-card-center { text-align: center; }
.auth-title { font-size: 1.5rem; margin-bottom: 1.5rem; color: var(--color-primary); }
.auth-switch { text-align: center; margin-top: 1.25rem; font-size: .9rem; color: var(--color-muted); }
.auth-hint { font-size: .85rem; color: var(--color-muted); margin-top: 1rem; }
.verify-success { background: #d1e7dd; padding: 1rem; border-radius: var(--radius); color: #0a3622; margin-bottom: 1rem; }
.verify-error   { background: #f8d7da; padding: 1rem; border-radius: var(--radius); color: #58151c; margin-bottom: 1rem; }
.verify-info    { background: #cff4fc; padding: 1rem; border-radius: var(--radius); color: #055160; margin-bottom: 1rem; }
.auth-forgot    { margin-top: .75rem; }
.auth-desc      { color: var(--color-muted); font-size: .95rem; margin-bottom: 1.25rem; }
.auth-info      { background: #cff4fc; padding: 1rem; border-radius: var(--radius); color: #055160; margin-bottom: 1rem; }
.auth-error     { background: #f8d7da; padding: 1rem; border-radius: var(--radius); color: #58151c; margin-bottom: 1rem; }

/* ── File upload ────────────────────────────── */
.upload-area { position: relative; border: 2px dashed var(--color-border); border-radius: var(--radius); padding: 1.5rem; text-align: center; transition: border-color .15s; }
.upload-area:hover, .upload-area.dragover { border-color: var(--color-primary); }
.upload-input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.upload-label { cursor: pointer; }
.upload-icon { font-size: 2rem; display: block; margin-bottom: .5rem; }
.photo-preview { max-width: 200px; max-height: 200px; object-fit: cover; border-radius: var(--radius-sm); margin-top: .75rem; }
.hidden { display: none; }

/* ── Object detail ──────────────────────────── */
.object-detail { max-width: 800px; }
.object-card { display: grid; grid-template-columns: auto 1fr; gap: 2rem; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 2rem; }
.object-photo img { width: 250px; height: 250px; object-fit: cover; border-radius: var(--radius); }
.object-report-id { font-size: .8rem; font-weight: 600; letter-spacing: .05em; color: var(--color-muted); background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius-sm); display: inline-block; padding: .2rem .6rem; margin-bottom: .5rem; }
.object-report-id strong { color: var(--color-primary); }
.object-status-banner { padding: .85rem 1.1rem; border-radius: var(--radius); margin-bottom: 1rem; font-size: .95rem; }
.object-status-banner--pending  { background: #fff8e1; border: 1px solid #f9a825; color: #6d4c00; }
.object-status-banner--rejected { background: #fff0f0; border: 1px solid #e63946; color: #7a0000; }
.object-name { font-size: 1.5rem; margin-bottom: 1rem; color: var(--color-primary); }
.detail-table { width: 100%; border-collapse: collapse; }
.detail-table th { text-align: left; padding: .5rem .75rem .5rem 0; color: var(--color-muted); font-weight: 600; font-size: .9rem; width: 160px; vertical-align: top; }
.detail-table td { padding: .5rem 0; border-bottom: 1px solid var(--color-border); }
.muni-code { color: var(--color-muted); font-size: .85rem; }
.object-notes { margin-top: 1.5rem; }
.back-link { display: inline-block; color: var(--color-muted); font-size: .9rem; margin-bottom: 1.5rem; }
.back-link:hover { color: var(--color-primary); }

/* ── Dashboard ──────────────────────────────── */
.dashboard-header { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.dashboard-header h1 { margin: 0; }
.dashboard-header p { flex: 1 1 100%; color: var(--color-muted); margin: 0; }

/* ── Error page ─────────────────────────────── */
.error-page { text-align: center; padding: 4rem 1rem; }
.error-code { font-size: 5rem; font-weight: 900; color: var(--color-accent); line-height: 1; }
.error-title { font-size: 1.75rem; margin: 1rem 0 .5rem; }
.error-detail { color: var(--color-muted); margin-bottom: 1.5rem; }
.error-ref { font-size: .8rem; color: var(--color-muted); display: block; margin-bottom: 1.5rem; font-family: var(--font-mono); }
.error-actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }

/* ── Pagination ─────────────────────────────── */
.pagination { display: flex; gap: .25rem; align-items: center; justify-content: center; flex-wrap: wrap; margin: 1.5rem 0; }
.page-link { padding: .4rem .75rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); font-size: .9rem; color: var(--color-primary); }
.page-link:hover { background: var(--color-bg); text-decoration: none; }
.page-current { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.page-current:hover { background: var(--color-primary); }
.page-disabled { color: var(--color-muted); cursor: not-allowed; }
.page-ellipsis { padding: .4rem .5rem; color: var(--color-muted); }

/* ── Static page ────────────────────────────── */
.static-page h1 { margin-bottom: 1.5rem; }
.static-body { max-width: 720px; line-height: 1.8; }
.static-body p { margin-bottom: 1rem; }

/* ── Footer ─────────────────────────────────── */
.site-footer { background: var(--color-primary); color: rgba(255,255,255,.85); font-size: .85rem; margin-top: auto; }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 1.5rem 1.5rem 1rem; }
.footer-top { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; padding-bottom: 1rem; border-bottom: 1px solid rgba(255,255,255,.15); margin-bottom: .75rem; }
.footer-logo { max-height: 80px; max-width: 180px; width: auto; height: auto; object-fit: contain; display: block; }
.footer-logo-link { display: inline-block; }
.footer-brand { color: #fff; font-size: 1.1rem; font-weight: 700; text-decoration: none; }
.footer-brand:hover { opacity: .85; }
.footer-nav { display: flex; gap: 1.5rem; flex-wrap: wrap; align-items: center; }
.footer-link { color: rgba(255,255,255,.85); text-decoration: none; font-size: .9rem; transition: color .15s; }
.footer-link:hover { color: #fff; text-decoration: underline; }
.footer-copy { text-align: center; color: rgba(255,255,255,.55); font-size: .8rem; }

/* ── Empty state ────────────────────────────── */
.empty-state { color: var(--color-muted); text-align: center; padding: 2rem; font-style: italic; }

/* ── Results count ──────────────────────────── */
.results-count { color: var(--color-muted); font-size: .9rem; margin-bottom: 1rem; }

/* ── Search form ────────────────────────────── */
.search-form { margin-bottom: 1.5rem; }
.search-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.search-input { flex: 1 1 280px; }
.search-select { flex: 0 1 260px; }

/* ── Admin layout ───────────────────────────── */
.admin-body { background: #f1f3f5; }
.admin-wrapper { display: flex; min-height: 100vh; }

.admin-sidebar {
  width: var(--sidebar-width);
  background: var(--color-primary);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  overflow-y: auto;
  z-index: 50;
}
.sidebar-brand { padding: 1.25rem 1rem; border-bottom: 1px solid rgba(255,255,255,.15); display: flex; flex-direction: column; align-items: center; gap: .5rem; text-align: center; }
.sidebar-home { color: #fff; font-size: 1rem; font-weight: 700; display: block; text-decoration: none; }
.sidebar-logo { max-height: 36px; max-width: 160px; width: auto; height: auto; object-fit: contain; display: block; }
.sidebar-tag { font-size: .7rem; background: rgba(255,255,255,.2); padding: .2em .6em; border-radius: 999px; }
.sidebar-nav { flex: 1; padding: 1rem 0; }
.sidebar-link {
  display: block;
  padding: .7rem 1.25rem;
  color: rgba(255,255,255,.8);
  font-size: .9rem;
  text-align: center;
  transition: background .1s, color .1s;
}
.sidebar-link:hover { background: rgba(255,255,255,.1); color: #fff; text-decoration: none; }
.sidebar-active { background: rgba(255,255,255,.15); color: #fff; font-weight: 600; }
.sidebar-user { padding: 1rem; border-top: 1px solid rgba(255,255,255,.15); font-size: .85rem; color: rgba(255,255,255,.7); text-align: center; }
.sidebar-logout { background: none; border: none; cursor: pointer; font-family: inherit; font-size: .85rem; color: rgba(255,255,255,.6); margin-top: .4rem; padding: 0; }
.sidebar-logout:hover { color: #fff; }

.admin-main { margin-left: var(--sidebar-width); flex: 1; display: flex; flex-direction: column; }
.admin-header { background: #fff; border-bottom: 1px solid var(--color-border); padding: 1.25rem 2rem; box-shadow: var(--shadow-sm); }
.admin-title { font-size: 1.4rem; color: var(--color-primary); margin: 0; }
.admin-content { padding: 2rem; flex: 1; }

.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1.25rem; text-align: center; }
.stat-value { font-size: 2rem; font-weight: 700; color: var(--color-primary); }
.stat-label { font-size: .85rem; color: var(--color-muted); margin-top: .25rem; }

.admin-filters { margin-bottom: 1rem; }
.filter-form { display: flex; gap: .5rem; }
.admin-toolbar { margin-bottom: 1rem; }

/* Admin table override */
.admin-table th, .admin-table td { font-size: .85rem; }
.admin-table form { margin: 0; }

/* ── Admin user detail ───────────────────────── */
.admin-user-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.admin-user-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.admin-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 700px) { .admin-detail-grid { grid-template-columns: 1fr; } }
.admin-detail-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1.25rem; }
.admin-detail-card-title { font-size: 1rem; font-weight: 600; color: var(--color-primary); margin: 0 0 1rem; padding-bottom: .5rem; border-bottom: 1px solid var(--color-border); }
.admin-info-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.admin-info-table th { text-align: left; color: var(--color-muted); font-weight: 500; padding: .35rem .75rem .35rem 0; white-space: nowrap; width: 40%; }
.admin-info-table td { padding: .35rem 0; word-break: break-word; }

/* ── Settings ───────────────────────────────── */
.settings-form { max-width: 700px; }
.settings-section { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.5rem; }
.settings-section h2 { font-size: 1rem; margin-bottom: 1rem; color: var(--color-primary); }
.settings-section--danger { border-color: #e63946; }
.settings-section--danger h2 { color: #e63946; }
.color-row { display: flex; gap: .5rem; align-items: center; }
.color-picker { width: 50px; height: 40px; padding: 2px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); cursor: pointer; }
.color-text { width: 120px; }
.current-logo { margin-bottom: .75rem; }

/* ── Pages form ─────────────────────────────── */
.page-form { max-width: 900px; }

/* ── Contact/Message detail ─────────────────── */
.message-detail { max-width: 800px; }
.message-card { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; }
.message-meta { background: var(--color-bg); padding: 1rem 1.25rem; font-size: .9rem; border-bottom: 1px solid var(--color-border); display: flex; flex-direction: column; gap: .3rem; }
.message-body { padding: 1.5rem; line-height: 1.8; }

/* ── Responsive ─────────────────────────────── */
@media (max-width: 768px) {
  .form-grid, .form-row { grid-template-columns: 1fr; }
  .object-card { grid-template-columns: 1fr; }
  .object-photo img { width: 100%; height: 200px; }
  .hero-title { font-size: 1.75rem; }
  .admin-sidebar { width: 100%; height: auto; position: static; flex-direction: row; overflow-x: auto; }
  .admin-wrapper { flex-direction: column; }
  .admin-main { margin-left: 0; }
  .sidebar-nav { display: flex; flex-direction: row; padding: .5rem; overflow-x: auto; }
  .sidebar-link { white-space: nowrap; }
  .sidebar-user { display: none; }
  .topnav-right { gap: .25rem; }
  .nav-link { padding: .35rem .5rem; font-size: .85rem; }
  .nav-links { display: none; }
  .nav-profile { margin-left: auto; }
}

/* ── Nav restructure ─────────────────────────── */
.nav-links {
  display: flex;
  align-items: center;
  gap: .25rem;
  margin-left: 1.5rem;
  flex: 1;
}
.nav-profile {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-left: auto;
  flex-shrink: 0;
}
.nav-profile-btn {
  display: flex;
  align-items: center;
  gap: .4rem;
}
.nav-avatar-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.nav-unread-dot {
  position: absolute;
  top: -6px;
  right: -7px;
  background: #e63946;
  color: #fff;
  font-size: .6rem;
  font-weight: 700;
  line-height: 1;
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.dropdown-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e63946;
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  margin-left: auto;
}
.icon-person {
  opacity: .9;
  flex-shrink: 0;
}
.profile-username {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dropdown-caret {
  font-size: .7rem;
  opacity: .8;
}
.dropdown-header {
  padding: .75rem 1rem .5rem;
}
.dropdown-username {
  display: block;
  font-weight: 700;
  font-size: .9rem;
}
.dropdown-email {
  display: block;
  font-size: .75rem;
  color: var(--color-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}
.btn-primary-sm {
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: .35rem .9rem;
  font-size: .85rem;
  font-weight: 600;
}
.btn-primary-sm:hover { opacity: .9; text-decoration: none; }
.badge-accent { background: var(--color-accent); }

/* ── Contact opts on report form ─────────────── */
.contact-opts {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  background: #f8f9ff;
}
.contact-opts h3 {
  font-size: 1rem;
  margin-bottom: .5rem;
  color: var(--color-primary);
}

/* ── Contact info box on object page ─────────── */
.contact-info-box {
  background: #f0f7ff;
  border: 1px solid #b8d4f0;
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-top: 1.5rem;
}
.contact-info-box h3 { margin-bottom: .75rem; color: var(--color-primary); }
.contact-info-box p { margin: .4rem 0; }

/* ── Message form on object page ─────────────── */
.contact-reporter-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 1.5rem;
}
.contact-reporter-box h3 { margin-bottom: 1rem; color: var(--color-primary); }
.pii-hint { margin-top: .5rem; }

/* ── Current photo (edit report form) ────────── */
.current-photo-wrap { margin: .5rem 0; }
.current-photo-thumb {
  max-width: 220px;
  max-height: 180px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  object-fit: cover;
}

/* ── Extra photos section (edit report + object page) ── */
.extra-photos-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}
.extra-photos-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.extra-photo-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .4rem;
  align-items: center;
}
.extra-photo-thumb {
  width: 160px;
  height: 130px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}
.delete-photo-form { text-align: center; }

/* ── Extra photos gallery on public object page ── */
.extra-photos-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: .75rem;
}
.extra-photos-gallery .extra-photo-item img {
  width: 140px;
  height: 110px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: opacity .15s;
}
.extra-photos-gallery .extra-photo-item img:hover { opacity: .85; }

/* ── Danger button ────────────────────────────── */
.btn-danger {
  background: var(--color-danger);
  color: #fff;
  border-color: var(--color-danger);
}
.btn-danger:hover { background: #bb2d3b; border-color: #b02a37; }
.btn-success      { background: #198754; color: #fff; border-color: #198754; }
.btn-success:hover { background: #157347; color: #fff; border-color: #146c43; }
.pending-actions  { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.5rem; }
.pending-actions-wrap { display: flex; flex-direction: column; gap: 1.25rem; margin-top: 1.5rem; }
.reject-form      { border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1rem; background: #fff8f8; }
.rejection-reason-box { margin-top: .75rem; padding: .6rem .9rem; background: var(--color-bg); border-left: 3px solid var(--color-danger); border-radius: var(--radius-sm); font-size: .9rem; }
.pending-header   { margin-bottom: 1rem; }
.pending-desc     { color: var(--color-muted); }
.form-hint        { font-size: .8rem; color: var(--color-muted); font-weight: 400; }

/* ── Table actions cell ─────────────────────────── */
.table-actions { white-space: nowrap; }
.table-actions .btn { margin-right: .25rem; }

/* ── Home page sections ──────────────────────── */
.home-section {
  width: 100%;
  margin-bottom: 3rem;
}
.home-search-section {
  margin-bottom: 2rem;
}
.home-search-section .search-form {
  margin-bottom: 0;
}

/* ── County button grid (with coat of arms) ──── */
.county-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}
.county-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 1rem .6rem .75rem;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--color-text);
  transition: border-color .15s, background .15s, box-shadow .15s, transform .15s;
  box-shadow: var(--shadow-sm);
  text-align: center;
}
.county-btn:hover {
  border-color: var(--color-primary);
  background: #f0f5ff;
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  color: var(--color-primary);
}
.county-btn-empty { opacity: .55; }
.county-btn-empty:hover { opacity: .8; }
.county-arms {
  height: 58px;
  width: auto;
  max-width: 70px;
  object-fit: contain;
  margin-bottom: .6rem;
}
.county-btn-name {
  font-size: .78rem;
  font-weight: 600;
  line-height: 1.25;
  word-break: break-word;
  hyphens: auto;
}
.county-btn-count {
  font-size: .72rem;
  color: var(--color-accent);
  font-weight: 700;
  margin-top: .2rem;
  min-height: 1em;
}
@media (max-width: 900px) {
  .county-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 600px) {
  .county-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── Hero actions ────────────────────────────── */
.hero-actions {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1rem;
}

/* ── Latest reports card grid (home page) ─────── */
.report-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
  width: 100%;
}
.report-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .15s, transform .15s, border-color .15s;
  min-width: 0;
}
.report-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  border-color: var(--color-primary);
}
.report-card-img {
  width: 100%;
  height: 160px;
  overflow: hidden;
  background: #edf0f3;
  flex-shrink: 0;
}
.report-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.report-card-no-img {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--color-muted);
}
.report-card-body {
  padding: .75rem;
  display: flex;
  flex-direction: column;
  gap: .25rem;
  flex: 1;
}
.report-card-title {
  font-weight: 600;
  font-size: .9rem;
  color: var(--color-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.report-card-meta {
  font-size: .78rem;
  color: var(--color-muted);
}
.report-card-police {
  margin-top: .3rem;
  align-self: flex-start;
  font-size: .7rem;
}

@media (max-width: 1000px) {
  .report-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
  .report-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ── News cards (home page) ─────────────────────────────────────────────── */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.news-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-sm);
}
.news-card-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: .4rem;
  flex-wrap: wrap;
}
.news-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-primary);
  margin: 0;
}
.news-date {
  font-size: .78rem;
  color: var(--color-muted);
  white-space: nowrap;
}
.news-card-body {
  font-size: .9rem;
  color: var(--color-text);
  line-height: 1.55;
  margin: 0;
}

/* ── Hero logo ──────────────────────────────────────────────────────────── */
.hero-logo-link { display: inline-block; margin-bottom: .75rem; }
.hero-logo { max-height: 240px; max-width: 480px; width: auto; height: auto; object-fit: contain; filter: drop-shadow(0 2px 8px rgba(0,0,0,.35)); }
@media (max-width: 600px) { .hero-logo { max-height: 140px; } }

/* ── Admin Dashboard ─────────────────────────── */
.dash-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card  { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1.25rem 1rem; text-align: center; }
.stat-number { font-size: 2rem; font-weight: 700; color: var(--color-primary); line-height: 1.1; }
.stat-label  { font-size: .8rem; color: var(--color-muted); margin-top: .3rem; }
.stat-approved .stat-number { color: #2e7d32; }
.stat-denied   .stat-number { color: var(--color-danger, #e63946); }
.stat-pending  .stat-number { color: #e65100; }
.stat-new      .stat-number { color: #1565c0; }
.dash-section  { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1.25rem 1.5rem; margin-bottom: 1.5rem; }
.dash-section h2 { font-size: 1rem; color: var(--color-primary); margin-bottom: 1rem; }
.dash-section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.dash-section-header h2 { margin: 0; }
.badge-blue   { background: #e3f2fd; color: #1565c0; }
.badge-green  { background: #e8f5e9; color: #2e7d32; }
