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

body {
  font-family: Arial, sans-serif;
  background: #F5F5F5;
  color: #333333;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===================== NAVBAR ===================== */
.navbar {
  background: #F95A1B;
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #FFFFFF;
  font-weight: bold;
  font-size: 18px;
}
.navbar-brand img { height: 36px; }
.navbar-menu { display: flex; gap: 8px; }
.nav-link {
  color: #FFFFFF;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 14px;
  transition: background 0.2s;
}
.nav-link:hover { background: rgba(255,255,255,0.2); }
.nav-link-danger:hover { background: rgba(255,0,0,0.3); }

/* ===================== CONTAINER ===================== */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 30px 20px;
  flex: 1;
}

/* ===================== PAGE HEADER ===================== */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 25px;
}
.page-header h1 {
  font-size: 24px;
  color: #1F6D8C;
}
.page-header p {
  font-size: 14px;
  color: #888;
  margin-top: 4px;
}

/* ===================== CARDS ===================== */
.card {
  background: #FFFFFF;
  border-radius: 8px;
  padding: 25px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.card-title {
  font-size: 16px;
  color: #1F6D8C;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #F5F5F5;
}

/* ===================== STATS ===================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-bottom: 20px;
}
.stat-card {
  background: #FFFFFF;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border-top: 4px solid #F95A1B;
}
.stat-number {
  font-size: 24px;
  font-weight: bold;
  color: #F95A1B;
}
.stat-label {
  font-size: 13px;
  color: #888;
  margin-top: 5px;
}

/* ===================== FORMS ===================== */
.form-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}
.form-col-2 { grid-column: span 2; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label { font-size: 13px; font-weight: bold; color: #555; }
.form-control {
  padding: 8px 12px;
  border: 1px solid #DDD;
  border-radius: 6px;
  font-size: 14px;
  color: #333;
  background: #FFFFFF;
  transition: border-color 0.2s;
}
.form-control:focus {
  outline: none;
  border-color: #F95A1B;
  box-shadow: 0 0 0 3px rgba(249,90,27,0.1);
}
.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  align-items: center;
}
.form-hint {
  font-size: 12px;
  color: #888;
  margin-top: 10px;
  font-style: italic;
}

/* ===================== BUTTONS ===================== */
.btn {
  padding: 9px 18px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  text-decoration: none;
  display: inline-block;
  transition: opacity 0.2s;
}
.btn:hover { opacity: 0.85; }
.btn-primary { background: #F95A1B; color: #FFFFFF; }
.btn-secondary { background: #1F6D8C; color: #FFFFFF; }
.btn-success { background: #28a745; color: #FFFFFF; }
.btn-warning { background: #ffc107; color: #333; }
.btn-danger { background: #dc3545; color: #FFFFFF; }
.btn-block { width: 100%; text-align: center; }
.btn-sm { padding: 5px 10px; font-size: 12px; }

/* ===================== TABLE ===================== */
.table-responsive { overflow-x: auto; }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.table thead tr { background: #1F6D8C; color: #FFFFFF; }
.table thead th {
  padding: 12px 10px;
  text-align: left;
  font-weight: bold;
  white-space: nowrap;
}
.table thead th a { color: #FFFFFF; text-decoration: none; }
.table thead th a:hover { text-decoration: underline; }
.table tbody tr:nth-child(even) { background: #F9F9F9; }
.table tbody tr:hover { background: #FFF0E8; }
.table tbody td {
  padding: 10px;
  border-bottom: 1px solid #EEE;
  vertical-align: middle;
}
.td-actions { display: flex; gap: 5px; flex-wrap: wrap; }

/* ===================== BADGES ===================== */
.badge {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
}
.badge-orange { background: #FFF0E8; color: #F95A1B; }
.badge-blue { background: #E8F4F8; color: #1F6D8C; }
.badge-success { background: #d4edda; color: #155724; }
.badge-danger { background: #f8d7da; color: #721c24; }

/* ===================== ALERTS ===================== */
.alert {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: 14px;
}
.alert-danger { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }

/* ===================== PAGINATION ===================== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #EEE;
}
.pagination-info { font-size: 14px; color: #888; }

/* ===================== TOP BAIRROS ===================== */
.top-bairros { display: flex; flex-direction: column; gap: 10px; }
.top-bairro-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 10px;
  background: #F9F9F9;
  border-radius: 6px;
}
.top-bairro-rank {
  width: 28px;
  height: 28px;
  background: #F95A1B;
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 13px;
  flex-shrink: 0;
}
.top-bairro-nome { flex: 1; font-weight: bold; }
.top-bairro-total { font-size: 13px; color: #888; }

/* ===================== LOGIN ===================== */
.login-body {
  background: #F5F5F5;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}
.login-container {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.login-logo { text-align: center; margin-bottom: 20px; }
.login-logo img { height: 60px; }
.login-title {
  text-align: center;
  font-size: 22px;
  color: #1F6D8C;
  margin-bottom: 5px;
}
.login-subtitle {
  text-align: center;
  font-size: 13px;
  color: #888;
  margin-bottom: 25px;
}

/* ===================== FOOTER ===================== */
.footer {
  background: #333333;
  color: #AAAAAA;
  text-align: center;
  padding: 15px;
  font-size: 12px;
}
.footer a { color: #F95A1B; text-decoration: none; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .form-col-2 { grid-column: span 1; }
  .navbar { padding: 0 15px; }
  .navbar-brand span { display: none; }
  .container { padding: 15px; }
}

/* ===================== CIDADE SELECTOR ===================== */
.cidade-selector {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}
