@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

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

:root {
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --primary-light: #DBEAFE;
  --success: #10B981;
  --success-dark: #059669;
  --danger: #EF4444;
  --danger-dark: #DC2626;
  --warning: #F59E0B;
  --bg: #F1F5F9;
  --card: #FFFFFF;
  --text: #1E293B;
  --text-light: #64748B;
  --text-muted: #94A3B8;
  --border: #E2E8F0;
  --sidebar-bg: #0F172A;
  --sidebar-hover: #1E293B;
  --sidebar-active: rgba(37,99,235,0.15);
  --sidebar-text: #94A3B8;
  --sidebar-text-active: #FFFFFF;
  --sidebar-width: 260px;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 25px -5px rgba(0,0,0,.15), 0 8px 10px -6px rgba(0,0,0,.1);
  --transition: .18s ease;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

body { font-family: 'Inter', sans-serif; color: var(--text); background: var(--bg); }

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius-sm); font-size: 14px;
  font-weight: 500; cursor: pointer; border: none; text-decoration: none;
  transition: all var(--transition); white-space: nowrap; font-family: inherit;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: var(--success-dark); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: var(--danger-dark); }
.btn-secondary { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-ghost { background: transparent; color: var(--text-light); }
.btn-ghost:hover { background: var(--bg); color: var(--text); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-full { width: 100%; justify-content: center; padding: 12px; font-size: 15px; }
.btn-icon { padding: 6px; border-radius: var(--radius-sm); }

/* ===== Form Controls ===== */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-group:last-child { margin-bottom: 0; }
.form-label { font-size: 13px; font-weight: 500; color: var(--text); }
.form-label span { color: var(--danger); margin-left: 2px; }
.form-control {
  padding: 10px 12px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; color: var(--text); background: var(--card); font-family: inherit;
  transition: border-color var(--transition), box-shadow var(--transition); width: 100%;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { resize: vertical; min-height: 90px; }
select.form-control { cursor: pointer; }
.input-group { position: relative; }
.input-group .form-control { padding-right: 40px; }
.input-group-icon { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); cursor: pointer; background: none; border: none; }
.form-hint { font-size: 12px; color: var(--text-muted); }

/* ===== Alerts & Toast ===== */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; display: flex; align-items: center; gap: 8px; }
.alert-error { background: #FEF2F2; color: var(--danger); border: 1px solid #FECACA; }
.alert-success { background: #ECFDF5; color: var(--success-dark); border: 1px solid #A7F3D0; }
.alert-info { background: #EFF6FF; color: var(--primary); border: 1px solid #BFDBFE; }

.toast-container { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast {
  padding: 12px 18px; border-radius: var(--radius); background: var(--text); color: #fff;
  font-size: 14px; font-weight: 500; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 10px;
  animation: slideIn .2s ease; min-width: 240px; max-width: 360px;
}
.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
.toast-info { background: var(--primary); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; transform: translateX(100%); } }

/* ===== Badges ===== */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 500; }
.badge-pending { background: #FEF3C7; color: #92400E; }
.badge-resolved { background: #D1FAE5; color: #065F46; }
.badge-review { background: #FFE4D6; color: #9A3412; }
.badge-rejected { background: #FEE2E2; color: #991B1B; }
.badge-active { background: #D1FAE5; color: #065F46; }
.badge-inactive { background: #F1F5F9; color: #64748B; }
.badge-admin { background: var(--primary-light); color: var(--primary-dark); }

/* ===== Modal ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; z-index: 1000;
  padding: 16px; animation: fadeInOverlay .15s ease;
}
.modal-overlay.hidden { display: none; }
@keyframes fadeInOverlay { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--card); border-radius: var(--radius-lg); width: 100%; max-width: 520px;
  box-shadow: var(--shadow-lg); animation: slideUp .2s ease; max-height: 90vh; overflow-y: auto;
}
.modal-sm { max-width: 400px; }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-header { padding: 20px 24px 0; display: flex; align-items: center; justify-content: space-between; }
.modal-header h3 { font-size: 18px; font-weight: 600; color: var(--text); }
.modal-close { background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 4px; border-radius: var(--radius-sm); transition: all var(--transition); font-size: 20px; line-height: 1; }
.modal-close:hover { background: var(--bg); color: var(--text); }
.modal-body { padding: 20px 24px; }
.modal-footer { padding: 0 24px 20px; display: flex; gap: 10px; justify-content: flex-end; }

/* ===== Confirm Dialog ===== */
.confirm-icon { text-align: center; font-size: 48px; margin-bottom: 12px; }
.confirm-message { text-align: center; color: var(--text-light); font-size: 15px; line-height: 1.5; }

/* ===== LOGIN PAGE ===== */
.login-page { min-height: 100vh; display: flex; background: var(--bg); }
.login-left {
  width: 460px; flex-shrink: 0; background: linear-gradient(135deg, #0F172A 0%, #1e3a5f 50%, #1D4ED8 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px; position: relative; overflow: hidden;
}
.login-left::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.login-brand { position: relative; text-align: center; }
.login-brand-icon {
  width: 80px; height: 80px; background: rgba(255,255,255,.1); border-radius: 20px;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; border: 1px solid rgba(255,255,255,.15);
}
.login-brand-name { font-size: 32px; font-weight: 700; color: #fff; letter-spacing: -.5px; margin-bottom: 8px; }
.login-brand-sub { font-size: 15px; color: rgba(255,255,255,.6); }
.login-features { margin-top: 48px; display: flex; flex-direction: column; gap: 16px; width: 100%; }
.login-feature { display: flex; align-items: center; gap: 14px; }
.login-feature-icon { width: 40px; height: 40px; background: rgba(255,255,255,.08); border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.login-feature-text { color: rgba(255,255,255,.75); font-size: 14px; }
.login-feature-text strong { display: block; color: #fff; font-weight: 500; margin-bottom: 2px; }
.login-right { flex: 1; display: flex; align-items: center; justify-content: center; padding: 32px; }
.login-card { width: 100%; max-width: 400px; }
.login-card-header { margin-bottom: 32px; }
.login-card-header h2 { font-size: 26px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.login-card-header p { color: var(--text-light); font-size: 15px; }
.login-form { display: flex; flex-direction: column; gap: 0; }
.login-form .form-group { margin-bottom: 18px; }
.login-submit { margin-top: 8px; }

@media (max-width: 768px) {
  .login-left { display: none; }
  .login-right { padding: 24px; }
}

/* ===== DASHBOARD / MAP ===== */
.app-wrapper { display: flex; height: 100%; overflow: hidden; }

.sidebar {
  width: var(--sidebar-width); background: var(--sidebar-bg); display: flex;
  flex-direction: column; flex-shrink: 0; position: relative; z-index: 100;
}
.sidebar-brand {
  padding: 20px; display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,.06); flex-shrink: 0;
}
.sidebar-brand-icon {
  width: 38px; height: 38px; background: var(--primary); border-radius: 10px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.sidebar-brand-name { font-size: 15px; font-weight: 700; color: #fff; letter-spacing: -.3px; }
.sidebar-brand-sub { font-size: 11px; color: var(--sidebar-text); }

.sidebar-section { flex: 1; overflow-y: auto; padding: 12px 0; }
.sidebar-section-label { font-size: 10px; font-weight: 600; letter-spacing: 1px; color: rgba(255,255,255,.25); text-transform: uppercase; padding: 8px 20px 4px; }
.sidebar-nav-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 20px;
  color: var(--sidebar-text); cursor: pointer; transition: all var(--transition);
  font-size: 14px; font-weight: 500; border: none; background: none; width: 100%;
  text-decoration: none; text-align: left;
}
.sidebar-nav-item:hover { background: var(--sidebar-hover); color: #fff; }
.sidebar-nav-item.active { background: var(--sidebar-active); color: var(--sidebar-text-active); }
.sidebar-nav-item.active .nav-icon { color: var(--primary); }
.nav-icon { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 8px; flex-shrink: 0; }
.sidebar-nav-item:hover .nav-icon { background: rgba(255,255,255,.06); }
.sidebar-nav-item.active .nav-icon { background: rgba(37,99,235,.2); }
.nav-label { flex: 1; }

.sidebar-footer { padding: 16px; border-top: 1px solid rgba(255,255,255,.06); flex-shrink: 0; }
.user-card { display: flex; align-items: center; gap: 10px; }
.user-avatar { width: 36px; height: 36px; background: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; color: #fff; flex-shrink: 0; }
.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 13px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11px; color: var(--sidebar-text); }
.btn-logout { background: none; border: none; cursor: pointer; color: var(--sidebar-text); padding: 6px; border-radius: 6px; transition: all var(--transition); flex-shrink: 0; }
.btn-logout:hover { color: var(--danger); background: rgba(239,68,68,.1); }

.map-wrapper { flex: 1; position: relative; overflow: hidden; }
#map { width: 100%; height: 100%; }

.map-info-bar {
  position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  background: var(--text); color: #fff; padding: 10px 20px; border-radius: 99px;
  font-size: 13px; font-weight: 500; z-index: 999; display: flex; align-items: center; gap: 8px;
  box-shadow: var(--shadow-lg); white-space: nowrap;
}
.map-info-bar.hidden { display: none; }
.map-info-bar .btn-cancel-pick { padding: 2px 10px; font-size: 12px; background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.25); cursor: pointer; border-radius: 99px; margin-left: 6px; }
.map-info-bar .btn-cancel-pick:hover { background: rgba(255,255,255,.25); }

/* Map picking cursor */
.map-wrapper.picking #map { cursor: crosshair !important; }

/* Leaflet popup customization */
.leaflet-popup-content-wrapper { border-radius: var(--radius) !important; padding: 0 !important; overflow: hidden; min-width: 240px; }
.leaflet-popup-content { margin: 0 !important; }
.popup-card { font-family: 'Inter', sans-serif; }
.popup-thumb { width: 100%; height: 140px; object-fit: cover; display: block; }
.popup-thumb-placeholder { width: 100%; height: 100px; background: var(--bg); display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 13px; }
.popup-body { padding: 14px 16px; }
.popup-type { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.popup-desc { font-size: 12px; color: var(--text-light); margin-bottom: 10px; line-height: 1.4; }
.popup-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.popup-date { font-size: 11px; color: var(--text-muted); }
.popup-footer { padding: 0 16px 14px; }
.popup-footer .btn { width: 100%; justify-content: center; font-size: 13px; }

/* Custom markers */
.marker-icon { width: 32px; height: 40px; cursor: pointer; filter: drop-shadow(0 2px 4px rgba(0,0,0,.3)); }

/* ===== ADMIN PAGES ===== */
.admin-page { min-height: 100vh; background: var(--bg); }
.admin-topbar {
  background: var(--card); border-bottom: 1px solid var(--border); padding: 0 24px;
  height: 64px; display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 100; box-shadow: var(--shadow);
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.topbar-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.topbar-brand-icon { width: 32px; height: 32px; background: var(--primary); border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.topbar-brand-name { font-size: 15px; font-weight: 700; color: var(--text); }
.topbar-divider { width: 1px; height: 24px; background: var(--border); }
.topbar-page-title { font-size: 15px; font-weight: 600; color: var(--text-light); }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-user { display: flex; align-items: center; gap: 8px; }
.topbar-user-name { font-size: 13px; font-weight: 500; color: var(--text); }

.admin-content { padding: 28px 32px; max-width: 1200px; margin: 0 auto; }

.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.page-header-left h1 { font-size: 22px; font-weight: 700; color: var(--text); }
.page-header-left p { font-size: 14px; color: var(--text-light); margin-top: 2px; }

.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.search-input-wrapper { position: relative; flex: 1; min-width: 220px; }
.search-input-wrapper svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.search-input { padding: 9px 12px 9px 36px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; color: var(--text); background: var(--card); font-family: inherit; width: 100%; transition: border-color var(--transition); }
.search-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }

.card { background: var(--card); border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); overflow: hidden; }

.data-table { width: 100%; border-collapse: collapse; }
.data-table thead tr { background: var(--bg); border-bottom: 2px solid var(--border); }
.data-table th { padding: 12px 16px; font-size: 12px; font-weight: 600; color: var(--text-light); text-transform: uppercase; letter-spacing: .5px; text-align: left; white-space: nowrap; }
.data-table td { padding: 14px 16px; font-size: 14px; color: var(--text); border-bottom: 1px solid var(--border); }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: #f8fafc; }
.data-table .cell-name { font-weight: 500; }
.data-table .cell-muted { color: var(--text-light); }
.table-actions { display: flex; align-items: center; gap: 6px; }
.empty-state { text-align: center; padding: 48px 16px; color: var(--text-muted); }
.empty-state-icon { font-size: 40px; margin-bottom: 12px; }
.empty-state p { font-size: 14px; }

/* Photo upload area */
.photo-upload-zone {
  border: 2px dashed var(--border); border-radius: var(--radius); padding: 20px;
  text-align: center; cursor: pointer; transition: all var(--transition); background: var(--bg);
}
.photo-upload-zone:hover { border-color: var(--primary); background: var(--primary-light); }
.photo-upload-zone input[type="file"] { display: none; }
.photo-upload-zone p { font-size: 13px; color: var(--text-light); margin-top: 6px; }
.photo-previews { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.photo-preview-item { position: relative; width: 72px; height: 72px; border-radius: 8px; overflow: hidden; border: 2px solid var(--border); }
.photo-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.photo-preview-remove { position: absolute; top: 2px; right: 2px; background: rgba(0,0,0,.6); color: #fff; border: none; border-radius: 50%; width: 18px; height: 18px; font-size: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; }

/* Location info */
.location-display { background: var(--bg); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 13px; color: var(--text-light); display: flex; align-items: center; gap: 8px; }
.location-display strong { color: var(--text); }

/* Stats bar */
.stats-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; }
.stat-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--text-light); margin-bottom: 4px; }
.stat-value { font-size: 28px; font-weight: 700; color: var(--text); }
.stat-card.primary .stat-value { color: var(--primary); }
.stat-card.success .stat-value { color: var(--success); }
.stat-card.warning .stat-value { color: var(--warning); }

/* Report photo section label */
.section-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); margin-bottom: 10px; }

/* Responsive admin */
@media (max-width: 640px) {
  .admin-content { padding: 16px; }
  .topbar-page-title { display: none; }
  .topbar-divider { display: none; }
}

/* ===== NAV BADGE ===== */
.nav-badge {
  background: var(--danger); color: #fff; font-size: 11px; font-weight: 700;
  padding: 1px 7px; border-radius: 99px; min-width: 20px; text-align: center;
}

/* ===== REPORTS PANEL ===== */
.reports-panel {
  width: 0; overflow: hidden; flex-shrink: 0;
  transition: width .28s cubic-bezier(.4,0,.2,1);
  background: var(--card); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; position: relative; z-index: 50;
}
.reports-panel.open { width: 360px; }

.panel-header {
  padding: 16px 18px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0; background: var(--card);
}
.panel-header h2 { font-size: 15px; font-weight: 700; color: var(--text); }
.panel-header-sub { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.panel-close { background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 6px; border-radius: 6px; line-height: 1; font-size: 18px; transition: all var(--transition); }
.panel-close:hover { background: var(--bg); color: var(--text); }

.panel-stats { padding: 12px 18px; display: flex; gap: 0; border-bottom: 1px solid var(--border); background: var(--bg); flex-shrink: 0; }
.panel-stat { flex: 1; text-align: center; padding: 4px 0; }
.panel-stat + .panel-stat { border-left: 1px solid var(--border); }
.panel-stat-val { font-size: 22px; font-weight: 700; color: var(--text); line-height: 1; }
.panel-stat-lbl { font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); font-weight: 600; margin-top: 3px; }
.panel-stat.pending .panel-stat-val { color: var(--warning); }
.panel-stat.resolved .panel-stat-val { color: var(--success); }
.panel-stat.review .panel-stat-val { color: #EA580C; }
.panel-stat-val { font-size: 20px; }

/* ===== Ad slot (sidebar) ===== */
.sidebar-ad { padding: 12px 16px; flex-shrink: 0; }
.ad-slot {
  background: rgba(255,255,255,.04); border: 1px dashed rgba(255,255,255,.12);
  border-radius: 10px; padding: 8px; text-align: center; overflow: hidden;
}
.ad-slot-label {
  font-size: 9px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
  color: rgba(255,255,255,.3); margin-bottom: 6px; display: block;
}
.ad-slot .adsbygoogle { display: block; min-height: 90px; }
.ad-slot-placeholder { font-size: 11px; color: rgba(255,255,255,.35); padding: 24px 8px; line-height: 1.5; }

/* ===== Auditoria de envio (admin) ===== */
.report-audit { margin-top: 10px; border-top: 1px dashed var(--border); padding-top: 8px; }
.report-audit summary { font-size: 11px; font-weight: 600; color: var(--text-muted); cursor: pointer; list-style: none; }
.report-audit summary::-webkit-details-marker { display: none; }
.report-audit[open] summary { color: var(--text); }
.report-audit-body { margin-top: 6px; display: flex; flex-direction: column; gap: 3px; }
.report-audit-body div { font-size: 11px; color: var(--text); line-height: 1.45; word-break: break-word; }
.report-audit-body span { display: inline-block; min-width: 92px; color: var(--text-muted); font-weight: 600; }

/* ===== LGPD consent banner ===== */
.lgpd-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 2000;
  max-width: 980px; margin: 0 auto; background: #fff; color: var(--text);
  border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 12px 40px rgba(15,23,42,.22);
  padding: 16px 18px; display: flex; align-items: center; gap: 18px;
  animation: slideUp .25s ease;
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.lgpd-banner-text { flex: 1; min-width: 0; }
.lgpd-banner-text strong { font-size: 14px; display: block; margin-bottom: 2px; }
.lgpd-banner-text p { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; margin: 0; }
.lgpd-banner-text a { color: var(--primary); font-weight: 600; text-decoration: none; }
.lgpd-banner-text a:hover { text-decoration: underline; }
.lgpd-banner-actions { display: flex; gap: 8px; flex-shrink: 0; }
@media (max-width: 640px) {
  .lgpd-banner { flex-direction: column; align-items: stretch; }
  .lgpd-banner-actions { justify-content: flex-end; }
}

/* ===== Legal / policy page ===== */
.legal-wrap { max-width: 820px; margin: 0 auto; padding: 32px 24px 80px; }
.legal-wrap h1 { font-size: 26px; margin-bottom: 4px; }
.legal-updated { color: var(--text-muted); font-size: 13px; margin-bottom: 28px; }
.legal-wrap h2 { font-size: 17px; margin: 28px 0 8px; }
.legal-wrap p, .legal-wrap li { font-size: 14px; line-height: 1.7; color: var(--text); }
.legal-wrap ul { padding-left: 20px; margin: 6px 0; }
.legal-back { display: inline-flex; align-items: center; gap: 6px; color: var(--primary); text-decoration: none; font-size: 14px; font-weight: 600; margin-bottom: 20px; }

.panel-toolbar { padding: 10px 12px; display: flex; gap: 8px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.panel-search { flex: 1; }
.panel-search .form-control { padding: 8px 10px; font-size: 13px; }
.panel-filter { width: 110px; font-size: 13px; padding: 8px 10px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-family: inherit; color: var(--text); background: var(--card); cursor: pointer; }
.panel-filter:focus { outline: none; border-color: var(--primary); }

.panel-body { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 8px; }

.report-card {
  border: 1.5px solid var(--border); border-radius: var(--radius);
  background: var(--card); overflow: hidden;
  transition: box-shadow var(--transition), border-color var(--transition);
  flex-shrink: 0;
}
.report-card:hover { box-shadow: var(--shadow); border-color: #C0CADC; }
.report-card.resolved { opacity: .72; }

.report-card-header { padding: 12px 14px 8px; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.report-card-info { flex: 1; min-width: 0; }
.report-card-type { font-size: 13px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.report-card-meta { font-size: 11px; color: var(--text-muted); margin-top: 4px; display: flex; flex-direction: column; gap: 3px; }
.report-card-meta-row { display: flex; align-items: center; gap: 4px; }

.report-card-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.report-card-thumb { width: 54px; height: 54px; border-radius: 8px; object-fit: cover; cursor: pointer; border: 1.5px solid var(--border); transition: transform var(--transition); display: block; }
.report-card-thumb:hover { transform: scale(1.05); }
.report-card-thumb-placeholder { width: 54px; height: 54px; border-radius: 8px; background: var(--bg); border: 1.5px solid var(--border); display: flex; align-items: center; justify-content: center; }

.report-card-desc { padding: 0 14px 10px; font-size: 12px; color: var(--text-light); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.report-card-actions { padding: 0 10px 10px; display: flex; gap: 5px; flex-wrap: wrap; }
.report-card-actions .btn { font-size: 12px; padding: 5px 10px; }

.panel-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; padding: 40px 20px; text-align: center; color: var(--text-muted); }
.panel-empty-icon { font-size: 36px; margin-bottom: 10px; }
.panel-empty p { font-size: 13px; }

/* Highlighted card when viewing on map */
@keyframes cardPulse { 0%,100%{border-color:var(--primary);box-shadow:0 0 0 0 rgba(37,99,235,.4)} 50%{border-color:var(--primary);box-shadow:0 0 0 4px rgba(37,99,235,.15)} }
.report-card.highlight { animation: cardPulse .8s ease 2; border-color: var(--primary); }

/* ===== CAROUSEL ===== */
.carousel-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 2000;
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 20px;
}
.carousel-overlay.hidden { display: none; }

.carousel-close {
  position: absolute; top: 20px; right: 24px; background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18); color: #fff; width: 40px; height: 40px;
  border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 20px; transition: background var(--transition); line-height: 1;
}
.carousel-close:hover { background: rgba(255,255,255,.25); }
.carousel-header { text-align: center; }
.carousel-title { font-size: 14px; font-weight: 600; color: rgba(255,255,255,.85); }
.carousel-subtitle { font-size: 12px; color: rgba(255,255,255,.4); margin-top: 2px; }

.carousel-stage { position: relative; display: flex; align-items: center; justify-content: center; }
.carousel-img-box { max-width: min(85vw, 720px); max-height: 62vh; display: flex; align-items: center; justify-content: center; }
.carousel-img { max-width: 100%; max-height: 62vh; object-fit: contain; border-radius: var(--radius); display: block; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.carousel-no-photo { color: rgba(255,255,255,.4); font-size: 14px; text-align: center; padding: 80px 40px; }
.carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
  color: #fff; width: 48px; height: 48px; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
  transition: all var(--transition); user-select: none;
}
.carousel-arrow:hover:not(:disabled) { background: rgba(255,255,255,.28); }
.carousel-arrow:disabled { opacity: .25; cursor: default; }
.carousel-arrow.prev { right: calc(100% + 12px); }
.carousel-arrow.next { left: calc(100% + 12px); }

.carousel-footer { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.carousel-dots { display: flex; gap: 8px; align-items: center; }
.carousel-dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.3); border: none; cursor: pointer; padding: 0; transition: all .15s ease; }
.carousel-dot.active { background: #fff; width: 9px; height: 9px; }
.carousel-counter { font-size: 12px; color: rgba(255,255,255,.4); }

/* ===== Map Search Bar ===== */
.map-search-bar {
  position: absolute;
  top: 15px;
  left: 60px; /* offset Leaflet controls */
  z-index: 1000;
  display: flex;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 4px;
  width: 340px;
  max-width: calc(100% - 80px);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.map-search-bar:focus-within {
  border-color: var(--primary);
  box-shadow: 0 10px 25px -5px rgba(0,0,0,.15), 0 0 0 3px rgba(37,99,235,.12);
}
.map-search-bar input {
  flex: 1;
  border: none;
  padding: 8px 12px;
  font-size: 13px;
  background: transparent;
  outline: none;
  color: var(--text);
  font-family: inherit;
}
.map-search-bar button {
  background: var(--primary);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  padding: 8px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.map-search-bar button:hover {
  background: var(--primary-dark);
}
.map-search-bar button:active {
  transform: scale(.95);
}

/* ===== Profile Photo Upload ===== */
.profile-photo-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}
.profile-photo-preview {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 2px dashed var(--border);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: all var(--transition);
}
.profile-photo-upload:hover .profile-photo-preview {
  border-color: var(--primary);
  background: var(--primary-light);
}
.profile-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
