/* ========================================
   LOTE MAP - Sistema de Loteamentos
   CSS Principal
======================================== */

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

:root {
  --primary: #1a5276;
  --primary-dark: #154360;
  --primary-light: #2980b9;
  --secondary: #27ae60;
  --danger: #e74c3c;
  --warning: #f39c12;
  --info: #3498db;
  --dark: #1c2833;
  --light: #f4f6f7;
  --white: #ffffff;
  --gray: #bdc3c7;
  --text: #2c3e50;
  --shadow: 0 4px 20px rgba(0,0,0,0.15);
  --radius: 12px;
  --transition: all 0.3s ease;
}

html, body {
  height: 100%;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--light);
  color: var(--text);
  overflow-x: hidden;
}

#app {
  min-height: 100vh;
}

/* ========== HEADER ========== */
.app-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  max-width: 1400px;
  margin: 0 auto;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: white;
}

.header-logo .logo-icon {
  font-size: 28px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.header-logo .logo-text {
  display: flex;
  flex-direction: column;
}

.header-logo .logo-name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 1px;
  line-height: 1;
}

.header-logo .logo-sub {
  font-size: 11px;
  opacity: 0.85;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn {
  padding: 8px 18px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.btn-primary {
  background: var(--secondary);
  color: white;
}

.btn-primary:hover {
  background: #219a52;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(39,174,96,0.4);
}

.btn-secondary {
  background: rgba(255,255,255,0.2);
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.3);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  background: #c0392b;
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
}

.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
}

.btn-lg {
  padding: 12px 28px;
  font-size: 16px;
  border-radius: 10px;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

.btn-whatsapp {
  background: #25d366;
  color: white;
}

.btn-whatsapp:hover {
  background: #1da851;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37,211,102,0.4);
}

/* ========== HERO SECTION ========== */
.hero-section {
  background: linear-gradient(180deg, #1a5276 0%, #1a3a5c 100%);
  color: white;
  padding: 40px 20px 30px;
  text-align: center;
}

.hero-title {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 8px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
  font-size: 16px;
  opacity: 0.85;
  margin-bottom: 20px;
}

/* ========== LEGEND ========== */
.legend-bar {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  border-radius: 50px;
  padding: 8px 20px;
  display: inline-flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}

.legend-dot {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 2px solid rgba(255,255,255,0.5);
}

.legend-dot.livre { background: #27ae60; }
.legend-dot.vendido { background: #e74c3c; }
.legend-dot.reservado { background: #f39c12; }
.legend-dot.negociacao { background: #3498db; }

/* ========== STATS BAR ========== */
.stats-bar {
  background: white;
  border-bottom: 1px solid #e8ecef;
  padding: 12px 20px;
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.stat-number {
  font-weight: 800;
  font-size: 20px;
}

.stat-number.livre { color: #27ae60; }
.stat-number.vendido { color: #e74c3c; }
.stat-number.reservado { color: #f39c12; }
.stat-number.negociacao { color: #3498db; }

/* ========== MAP SECTION ========== */
.map-section {
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

.map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.map-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.map-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.zoom-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 2px solid var(--primary);
  background: white;
  color: var(--primary);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  font-weight: 700;
}

.zoom-btn:hover {
  background: var(--primary);
  color: white;
}

/* ========== MAP CANVAS ========== */
.map-container {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
  border: 2px solid #e8ecef;
}

.map-scroll-wrapper {
  overflow: auto;
  cursor: grab;
  max-height: 70vh;
  min-height: 500px;
  position: relative;
}

.map-scroll-wrapper:active {
  cursor: grabbing;
}

.map-scroll-wrapper.touch-scrolling {
  cursor: default;
}

#loteamento-svg {
  display: block;
  transition: transform 0.1s;
  transform-origin: 0 0;
  user-select: none;
}

/* Lote styles */
.lote {
  cursor: pointer;
  transition: all 0.2s ease;
}

.lote:hover rect,
.lote:hover polygon,
.lote:hover path {
  filter: brightness(0.85);
  stroke-width: 3;
}

.lote.livre rect,
.lote.livre polygon,
.lote.livre path {
  fill: #27ae60;
  stroke: #1e8449;
}

.lote.vendido rect,
.lote.vendido polygon,
.lote.vendido path {
  fill: #e74c3c;
  stroke: #c0392b;
}

.lote.reservado rect,
.lote.reservado polygon,
.lote.reservado path {
  fill: #f39c12;
  stroke: #d68910;
}

.lote.negociacao rect,
.lote.negociacao polygon,
.lote.negociacao path {
  fill: #3498db;
  stroke: #2874a6;
}

.lote-number {
  pointer-events: none;
  font-weight: 700;
  font-size: 11px;
  fill: white;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  text-anchor: middle;
  dominant-baseline: middle;
}

.street-label {
  font-size: 10px;
  fill: #555;
  font-weight: 600;
  text-anchor: middle;
  pointer-events: none;
}

.quadra-label {
  font-size: 13px;
  fill: #333;
  font-weight: 800;
  text-anchor: middle;
  pointer-events: none;
}

/* ========== MODAL ========== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  background: white;
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: slideUp 0.3s ease;
}

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

.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  border-radius: 16px 16px 0 0;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close {
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close:hover {
  background: rgba(255,255,255,0.35);
}

.modal-body {
  padding: 20px 24px;
}

.modal-footer {
  padding: 16px 24px 20px;
  display: flex;
  gap: 10px;
  flex-direction: column;
}

/* ========== LOTE INFO CARDS ========== */
.lote-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 16px;
}

.badge-livre { background: #d4efdf; color: #1e8449; }
.badge-vendido { background: #fadbd8; color: #c0392b; }
.badge-reservado { background: #fdebd0; color: #d68910; }
.badge-negociacao { background: #d6eaf8; color: #2874a6; }

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.info-card {
  background: var(--light);
  border-radius: 10px;
  padding: 12px;
  border-left: 4px solid var(--primary);
}

.info-card-label {
  font-size: 11px;
  color: #888;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.info-card-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.info-card-value.price {
  color: var(--secondary);
  font-size: 18px;
}

/* ========== FORM STYLES ========== */
.form-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--light);
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  margin-bottom: 5px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid #e8ecef;
  border-radius: 8px;
  font-size: 14px;
  transition: var(--transition);
  font-family: inherit;
  color: var(--text);
  background: white;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(52,152,219,0.15);
}

.form-control::placeholder {
  color: #bbb;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ========== ADMIN PANEL ========== */
.admin-layout {
  display: flex;
  min-height: 100vh;
  background: #f0f2f5;
}

.admin-sidebar {
  width: 260px;
  background: var(--dark);
  color: white;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  transition: var(--transition);
}

.admin-sidebar-header {
  padding: 20px;
  background: rgba(0,0,0,0.2);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.admin-sidebar-logo {
  font-size: 20px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-sidebar-nav {
  flex: 1;
  padding: 16px 0;
  overflow-y: auto;
}

.nav-section-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.4);
  padding: 8px 20px 4px;
  font-weight: 700;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
  border-left: 3px solid transparent;
  color: rgba(255,255,255,0.75);
}

.nav-item:hover {
  background: rgba(255,255,255,0.08);
  color: white;
}

.nav-item.active {
  background: rgba(52,152,219,0.2);
  border-left-color: var(--info);
  color: white;
}

.nav-item i {
  width: 20px;
  text-align: center;
  font-size: 16px;
}

.admin-content {
  margin-left: 260px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.admin-topbar {
  background: white;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  position: sticky;
  top: 0;
  z-index: 50;
}

.admin-page-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-main {
  padding: 28px;
  flex: 1;
}

/* ========== CARDS STATS ADMIN ========== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: white;
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  gap: 16px;
  border-left: 5px solid var(--primary);
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.stat-card.green { border-left-color: #27ae60; }
.stat-card.red { border-left-color: #e74c3c; }
.stat-card.yellow { border-left-color: #f39c12; }
.stat-card.blue { border-left-color: #3498db; }

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.stat-icon.green { background: #d4efdf; color: #1e8449; }
.stat-icon.red { background: #fadbd8; color: #c0392b; }
.stat-icon.yellow { background: #fdebd0; color: #d68910; }
.stat-icon.blue { background: #d6eaf8; color: #2874a6; }

.stat-info h3 {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

.stat-info p {
  font-size: 13px;
  color: #888;
  margin-top: 3px;
}

/* ========== TABLES ========== */
.table-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  overflow: hidden;
}

.table-header {
  padding: 18px 24px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.table-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.table-responsive {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

thead th {
  background: #f8f9fa;
  padding: 12px 16px;
  text-align: left;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #888;
  border-bottom: 2px solid #e8ecef;
}

tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid #f5f5f5;
  vertical-align: middle;
}

tbody tr:hover {
  background: #fafafa;
}

tbody tr:last-child td {
  border-bottom: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 700;
}

/* ========== LOGIN PAGE ========== */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.login-bg-pattern {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    45deg,
    rgba(255,255,255,0.03) 0px,
    rgba(255,255,255,0.03) 2px,
    transparent 2px,
    transparent 20px
  );
}

.login-card {
  background: white;
  border-radius: 20px;
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 25px 70px rgba(0,0,0,0.3);
  position: relative;
  z-index: 1;
}

.login-logo {
  text-align: center;
  margin-bottom: 28px;
}

.login-logo .logo-icon {
  font-size: 48px;
  margin-bottom: 8px;
  display: block;
}

.login-logo h1 {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 1px;
}

.login-logo p {
  font-size: 13px;
  color: #888;
  margin-top: 4px;
}

.login-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
  text-align: center;
}

.alert {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.alert-danger {
  background: #fadbd8;
  color: #c0392b;
  border: 1px solid #f1948a;
}

.alert-success {
  background: #d4efdf;
  color: #1e8449;
  border: 1px solid #82e0aa;
}

/* ========== LOTE EDITOR (ADMIN) ========== */
.editor-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 16px;
  background: white;
  border-radius: var(--radius);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.status-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0.6;
}

.status-btn.active {
  opacity: 1;
  box-shadow: 0 3px 10px rgba(0,0,0,0.2);
  transform: scale(1.02);
}

.status-btn.livre { background: #d4efdf; color: #1e8449; }
.status-btn.vendido { background: #fadbd8; color: #c0392b; }
.status-btn.reservado { background: #fdebd0; color: #d68910; }
.status-btn.negociacao { background: #d6eaf8; color: #2874a6; }

/* ========== MOBILE MENU ========== */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 22px;
  cursor: pointer;
  padding: 4px;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
}

/* ========== NOTIFICATION ========== */
.notification {
  position: fixed;
  top: 80px;
  right: 20px;
  background: white;
  border-radius: 10px;
  padding: 14px 18px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  z-index: 9999;
  animation: slideInRight 0.3s ease;
  max-width: 320px;
}

@keyframes slideInRight {
  from { transform: translateX(100px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.notification.success { border-left: 4px solid #27ae60; color: #1e8449; }
.notification.error { border-left: 4px solid #e74c3c; color: #c0392b; }
.notification.info { border-left: 4px solid #3498db; color: #2874a6; }

/* ========== EMPTY STATE ========== */
.empty-state {
  text-align: center;
  padding: 50px 20px;
  color: #aaa;
}

.empty-state i {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.empty-state p {
  font-size: 15px;
}

/* ========== TABS ========== */
.tabs {
  display: flex;
  border-bottom: 2px solid #e8ecef;
  margin-bottom: 20px;
  gap: 4px;
}

.tab {
  padding: 10px 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #888;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
}

.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab:hover {
  color: var(--primary-light);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ========== PHOTO GALLERY ========== */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.photo-item {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: #f0f0f0;
  cursor: pointer;
  transition: var(--transition);
}

.photo-item:hover {
  transform: scale(1.05);
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ========== SEARCH ========== */
.search-bar {
  position: relative;
}

.search-bar input {
  padding-left: 38px;
}

.search-bar i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #aaa;
}

/* ========== PROGRESS BAR ========== */
.progress-wrapper {
  margin: 12px 0;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 4px;
  color: #666;
  font-weight: 600;
}

.progress-bar {
  height: 8px;
  background: #e8ecef;
  border-radius: 50px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 50px;
  transition: width 0.5s ease;
}

/* ========== SEPARATOR ========== */
.separator {
  height: 1px;
  background: #f0f0f0;
  margin: 16px 0;
}

/* ========== FLOATING ACTION ========== */
.fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--secondary);
  color: white;
  border: none;
  box-shadow: 0 6px 20px rgba(39,174,96,0.4);
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 500;
}

.fab:hover {
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 10px 30px rgba(39,174,96,0.5);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
  }

  .admin-sidebar {
    transform: translateX(-100%);
  }

  .admin-sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay.open {
    display: block;
  }

  .admin-content {
    margin-left: 0;
  }

  .admin-main {
    padding: 16px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .header-content {
    padding: 10px 16px;
  }

  .hero-title {
    font-size: 24px;
  }

  .map-section {
    padding: 12px;
  }

  .legend-bar {
    gap: 12px;
    padding: 8px 14px;
  }

  .modal {
    max-height: 95vh;
  }

  .modal-body {
    padding: 16px;
  }

  .modal-header {
    padding: 16px;
  }

  .admin-topbar {
    padding: 12px 16px;
  }

  .stats-bar {
    gap: 16px;
    padding: 10px 16px;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .login-card {
    padding: 28px 20px;
  }

  .hero-title {
    font-size: 20px;
  }
}

/* ========== PRINT ========== */
@media print {
  .admin-sidebar,
  .admin-topbar,
  .btn,
  .fab {
    display: none !important;
  }

  .admin-content {
    margin-left: 0;
  }
}

/* ========== SPINNER ========== */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f0f0f0;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ========== SELECT ========== */
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
  padding-right: 36px;
}

/* ========== CHIPS ========== */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
  background: #f0f0f0;
  color: #666;
}

/* ========== MAP SVG TOOLTIP ========== */
.map-tooltip {
  position: fixed;
  background: rgba(0,0,0,0.85);
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  pointer-events: none;
  z-index: 5000;
  white-space: nowrap;
  display: none;
}

/* ========== SECTION ========== */
.section-header {
  margin-bottom: 20px;
}

.section-header h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}

.section-header p {
  color: #888;
  font-size: 14px;
}

/* Dark mode for SVG map */
.map-container .compass {
  font-size: 20px;
  text-anchor: middle;
}

/* Upload area */
.upload-area {
  border: 2px dashed #ccc;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  color: #888;
}

.upload-area:hover {
  border-color: var(--primary);
  background: #f8faff;
  color: var(--primary);
}

.upload-area input[type="file"] {
  display: none;
}
