/* Reset e variáveis */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-primary: #2d6a4f;
  --color-secundary: #ff7043;
  --color-primary-dark: #1b4332;
  --color-accent: #40916c;
  --color-background: #ebebeb;
  --color-card: #ffffff;
  --color-text: #212529;
  --color-text-muted: #6c757d;
  --color-border: #dee2e6;
  --color-status-open: #ffc107;
  --color-status-in-progress: #0d6efd;
  --color-status-resolved: #198754;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.12);
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--color-background);
  color: var(--color-text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 70px;
}

/* Header */
.header {
  background: #fff;
  color: var(--color-text);
  padding: 1rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: var(--shadow);
  border-bottom: 4px solid;
  border-image-source: linear-gradient(
    135deg,
    var(--color-primary) 50%,
    var(--color-secundary) 60%
  );
  border-image-slice: 1;
}

/* logo container now holds image and optional text */
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none; /* when wrapped in an anchor */
  color: inherit;
}

/* logo image sizing */
.logo img {
  height: 40px;
  width: auto;
  display: block;
  border-radius: 50%; /* make the logo circular */
  object-fit: cover; /* ensure it fills the round shape */
}

/* optional text next to logo if needed */
.logo-text {
  display: inline-block;
}

.nav {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.nav-link {
  color: var(--color-text);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  transition:
    background 0.2s,
    color 0.2s;
}

.nav-link:hover {
  color: var(--color-secundary);
  background-color: #ececec8d;
}

.nav-link.active {
  background: var(--color-secundary);
  color: white;
}

.logout-btn {
  display: none;
  cursor: pointer;
  color: rgb(255, 55, 55);
  border: 1px solid rgb(255, 55, 55);
  padding: 0.2rem 1rem;
  margin-right: 30px;
}

.logout-btn:hover {
  background: rgba(255, 55, 55, 0.73);
  color: white;
}

.wrap-username {
  display: flex;
  justify-content: center;
  align-items: center;
}

.username {
  display: none;
  margin-right: 10px;
}

/**
 * MENU MOBILE
 */

.nav-mobile {
  z-index: 99999;
  position: fixed;
  bottom: 0px;
  left: 50%;
  transform: translateX(-50%);
  width: calc((100%));
  /* padding: 10px 0; */
  display: none;
  background-color: #fff;
  border-top: 4px solid transparent;
  border-radius: 12px;
  background-image:
    linear-gradient(#fff, #fff),
    linear-gradient(135deg, var(--color-primary), var(--color-secundary)) !important;
  background-origin: border-box !important;
  background-clip: padding-box, border-box !important;
  overflow: hidden;
}

.username-mobile {
  display: none;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
  font-size: 1.2em;
}

.username-mobile .logout-btn {
  padding: 0.2rem 1rem;
}

.nav-mobile .menu-mobile {
  cursor: pointer;
  width: 100%;
  padding: 10px 5px;
  margin: 0 5px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: 40%;
  background-color: var(--color-card);
  font-size: 1em;
}

.menu-mobile i {
  margin-bottom: 3px;
  font-size: 1.7em;
}

.mobile-active i {
  color: var(--color-secundary);
}

.mobile-active a {
  font-weight: bold;
}

/* Main */
.main {
  flex: 1;
  padding: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.main-dashboard {
  display: none;
}

.main-form {
  max-width: 640px;
}

.section-title {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--color-primary);
}

/* Mapa */
.map-section {
  margin-bottom: 2rem;
}

.map-container {
  position: relative;
  z-index: 2;
  height: 400px;
  width: 100%;
  box-shadow: var(--shadow);
  border: 4px solid transparent;
  border-radius: 12px;
  background-image:
    linear-gradient(#fff, #fff),
    linear-gradient(135deg, var(--color-primary), var(--color-secundary)) !important;
  background-origin: border-box !important;
  background-clip: padding-box, border-box !important;
  overflow: hidden;
}

.map-container--report {
  height: 320px;
  cursor: crosshair;
}

.map-hint {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.geolocation-status {
  display: inline-block;
  margin-left: 0.75rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.geolocation-status--error {
  color: #dc3545;
}

/* Lista de denúncias (index) */
.reports-list-section .section-title {
  margin-bottom: 1rem;
}

.reports-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.report-card {
  cursor: pointer;
  background: var(--color-card);
  padding: 1rem 1.25rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--color-primary);
  transition: box-shadow 0.2s;
  cursor: pointer;
}

.report-card:hover {
  box-shadow: var(--shadow-hover);
}

.report-card .report-description {
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.report-card .report-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.report-card .report-status {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-weight: 500;
  font-size: 0.8rem;
}

.report-card .report-status.status-open {
  background: #fff3cd;
  color: #856404;
}

.report-card .report-status.status-in_progress {
  background: #cfe2ff;
  color: #084298;
}

.report-card .report-status.status-resolved {
  background: #d1e7dd;
  color: #0f5132;
}

.reports-list-empty {
  text-align: center;
  padding: 2rem;
  color: var(--color-text-muted);
  background: var(--color-card);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

/* Formulário */
.form-section {
  background: var(--color-card);
  border: 3px solid var(--color-primary);
  border-image-slice: 1;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.form-column-left .form-group {
  margin-bottom: 2rem !important;
}

.form-group select {
  padding: 10px 20px;
  outline: 0;
  border: 2px solid var(--color-accent);
  border-radius: 20px;
  cursor: pointer;
}

.form-grid-container {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}

@media (min-width: 992px) {
  .form-grid-container {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 992px) {
  .main-form {
    max-width: 1000px;
  }
}

.btn-block {
  width: 100%;
  padding: 0.8rem;
  font-size: 1.1rem;
}

.report-form .form-group {
  margin-bottom: 1.25rem;
}

.report-form label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 500;
  color: var(--color-text);
}

.report-form input[type='text'],
.report-form input[type='file'],
.report-form textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
}

.report-form textarea {
  resize: vertical;
  min-height: 80px;
}

.report-form input:focus,
.report-form textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.2);
}

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

.form-actions {
  margin-top: 1.5rem;
}

/* Botões */
.btn {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.1s;
}

.btn:active {
  transform: scale(0.98);
}

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

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

.btn-secondary {
  background: var(--color-border);
  color: var(--color-text);
}

.btn-secondary:hover {
  background: #ced4da;
}

.btn-danger {
  background: white;
  color: #dc3545;
  border: 1px solid #dc3545;
  border-radius: 10px;
}

.btn-danger:hover {
  background: #dc3545;
  color: white;
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.875rem;
}

.filters {
  margin: 10px 0 15px 0;
}

.filter-btn {
  padding: 6px 12px;
  margin-right: 6px;
  border: none;
  background: #e0e0e0;
  border-radius: 4px;
  cursor: pointer;
  transition: 0.2s;
}

.filter-btn.active {
  background: var(--color-primary);
  color: white;
  font-weight: bold;
}

.filter-btn:hover {
  background: #cfcfcf;
}

/* Dashboard */
.dashboard-description {
  margin-bottom: 1.5rem;
  color: var(--color-text-muted);
}

.dashboard-reports {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dashboard-card {
  background: var(--color-card);
  padding: 1.25rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--color-primary);
}

.dashboard-card .dashboard-card-description {
  margin-bottom: 0.75rem;
  color: var(--color-text);
}

.dashboard-card .dashboard-card-meta {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.dashboard-card .dashboard-card-image {
  max-width: 200px;
  max-height: 150px;
  border-radius: 6px;
  margin-bottom: 1rem;
  object-fit: cover;
}

.dashboard-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.dashboard-card-actions select {
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 0.9rem;
  background: white;
  cursor: pointer;
}

.dashboard-card-actions .btn {
  margin-left: 0.5rem;
}

.dashboard-empty {
  text-align: center;
  padding: 2rem;
  color: var(--color-text-muted);
  background: var(--color-card);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

/* Leaflet popup customizado */
.leaflet-popup-content-wrapper {
  border-radius: 8px;
  box-shadow: var(--shadow-hover);
}

.popup-content .popup-description {
  margin-bottom: 0.5rem;
}

.popup-content .popup-image {
  max-width: 100%;
  max-height: 200px;
  border-radius: 6px;
  margin: 0.5rem 0;
  object-fit: cover;
}

.popup-content .popup-meta {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 0.5rem;
}

/* Responsivo */
@media (max-width: 1000px) {
  .header {
    justify-content: center;
  }

  .nav {
    justify-content: space-between;
  }
}

@media (max-width: 790px) {
  .logo {
    width: 100%;
    justify-content: center;
  }

  .header {
    flex-direction: column;
    align-items: stretch;
  }

  .nav {
    justify-content: center;
  }

  .wrap-username {
    width: 100%;
    margin-bottom: 10px;
  }

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

  .map-container {
    height: 300px;
  }
}

@media (max-width: 600px) {
  .nav {
    display: none;
  }

  .nav-mobile,
  .username-mobile {
    display: flex;
  }
}

/* Dashboard filtros */
.dashboard-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--color-card);
  border-radius: 8px;
  box-shadow: var(--shadow);
  border-bottom: 3px solid var(--color-primary);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-group label {
  font-weight: 500;
  color: var(--color-text);
}

.filter-group select {
  padding: 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: white;
  font-size: 0.9rem;
}

#btn-manage-users {
  display: none;
}

/* Paginação */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.pagination .btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--color-border);
  background: white;
  color: var(--color-text);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

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

.pagination .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

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

/* Dashboard cards */
.dashboard-card {
  background: var(--color-card);
  border-radius: 8px;
  padding: 1rem;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}

.dashboard-card:hover {
  box-shadow: var(--shadow-hover);
}

.dashboard-card-image {
  max-width: 100%;
  max-height: 150px;
  border-radius: 6px;
  margin: 0.5rem 0;
  object-fit: cover;
}

.dashboard-card-description {
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.dashboard-card-meta {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.dashboard-card-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dashboard-card-actions select {
  padding: 0.3rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: white;
}

.dashboard-empty {
  text-align: center;
  padding: 2rem;
  color: var(--color-text-muted);
  background: var(--color-card);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

/* FAQ */
.faq-section {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  border-radius: 8px;
  padding: 1rem;
  box-shadow: var(--shadow);
  background: var(--color-card);
  border: 2px solid var(--color-primary);
}

.faq-question {
  margin-bottom: 0.5rem;
  color: var(--color-primary);
  font-size: 1.1rem;
}

.faq-answer {
  color: var(--color-text);
  line-height: 1.6;
}

/* Sobre */
.about-section {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
  text-align: center;
}

.about-description {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  color: var(--color-text);
}

.about-features {
  display: flex;
  flex-direction: row;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.feature {
  max-width: 300px;
  background: var(--color-card);
  border: 2px solid var(--color-primary);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.feature h3 {
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.feature p {
  color: var(--color-text-muted);
}

.about-contact {
  font-weight: 500;
  color: var(--color-text);
}

/*
*
*   Pág Login
*
*/

.login-body {
  margin: 0;
  padding: 0;
  height: 100vh;
  display: flex;
  background-color: var(--color-card);
}

.login-wrapper {
  display: flex;
  width: 100%;
  height: 100vh;
}

/* Lado Esquerdo (Formulário/Botões) */
.login-left {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--color-card);
}

.login-content {
  width: 100%;
  max-width: 400px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.login-logo {
  color: var(--color-primary);
  justify-content: center;
  margin-bottom: 2rem;
  font-size: 2.5rem;
}

.wrap-name-logo .logo {
  width: 100%;
  max-width: 100px;
}

.login-title {
  font-size: 1.75rem;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.login-subtitle {
  color: var(--color-text-muted);
  margin-bottom: 2.5rem;
  font-size: 1rem;
}

.login-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: white;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  font-weight: 500;
  padding: 0.85rem 1.5rem;
  font-size: 1.05rem;
  border-radius: 8px;
  transition:
    background 0.2s,
    box-shadow 0.2s,
    transform 0.1s;
}

.btn-google:hover {
  background: #f8f9fa;
  box-shadow: var(--shadow);
}

.btn-google:active {
  transform: scale(0.98);
}

.google-icon {
  width: 24px;
  height: 24px;
}

.back-link {
  color: var(--color-primary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

/* Lado Direito (Informações/Imagem) */
.login-right {
  flex: 1.2;
  background: linear-gradient(
    135deg,
    var(--color-primary) 0%,
    var(--color-primary-dark) 100%
  );
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  position: relative;
  overflow: hidden;
}

.login-info {
  text-align: center;
  max-width: 550px;
  /* z-index: 2; */
}

.login-info p {
  font-size: 1.15rem;
  opacity: 0.9;
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

.login-slider {
  margin-bottom: 1rem;
}

.login-image {
  width: 100%;
  max-width: 400px;
  border-radius: 12px;
  margin: 30px;
  object-fit: contain;
  box-shadow: 0 0 15px 5px rgba(0, 0, 0, 0.3);
}

.login-campaign {
  text-align: left;
  max-width: 500px;
  margin: 0 auto;
}

.login-campaign h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  line-height: 1;
}

.login-campaign p {
  font-size: 1.05rem;
  opacity: 0.9;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.login-campaign .campaign-highlight {
  font-weight: 600;
  font-size: 1.15rem;
  color: #a7f3d0;
  margin-top: 1.5rem;
}

/* Responsividade do Login */
@media (max-width: 992px) {
  .login-right {
    flex: 1;
  }
}

@media (max-width: 768px) {
  .login-wrapper {
    flex-direction: column;
  }

  .login-right {
    display: none;
  }

  .login-left {
    height: 100vh;
  }
}

/* Lista de usuários */
.users-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.user-card {
  background: var(--color-card);
  padding: 1rem 1.25rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.user-info {
  flex: 1;
}

.user-info .user-name {
  font-weight: 500;
  color: var(--color-text);
}

.user-info .user-email {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.user-role {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-role select {
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: white;
  font-size: 0.9rem;
}

.user-role .btn {
  padding: 0.4rem 0.8rem;
  font-size: 0.875rem;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background-color: var(--color-card);
  margin: 5% auto;
  padding: 2rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  width: 90%;
  max-width: 800px;
  box-shadow: var(--shadow);
  position: relative;
}

.close-modal {
  color: var(--color-text-muted);
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  position: absolute;
  top: 10px;
  right: 20px;
}

.close-modal:hover,
.close-modal:focus {
  color: var(--color-text);
  text-decoration: none;
}

/* Popup de notificação */
.notification-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease-in-out;
}

.notification-content {
  background: white;
  border-radius: 12px;
  padding: 30px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  position: relative;
  animation: slideIn 0.3s ease-out;
}

.close-notification {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  transition: color 0.2s;
}

.close-notification:hover {
  color: #333;
}

.notification-icon {
  font-size: 48px;
  color: #28a745;
  margin-bottom: 15px;
  font-weight: bold;
}

.notification-content h3 {
  color: #333;
  margin: 0 0 10px 0;
  font-size: 24px;
}

.notification-content p {
  color: #666;
  margin: 0;
  font-size: 16px;
}

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

@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
