  /* ===================================================== RESET ===================================================== */

  * {
    box-sizing: border-box;
  }

  html {
    min-height: 100%;
    scroll-behavior: smooth;
  }

  body {
    margin: 0;
    min-height: 100vh;

    background: var(--background);
    color: var(--text);

    font-family:
      Inter,
      ui-sans-serif,
      system-ui,
      -apple-system,
      BlinkMacSystemFont,
      "Segoe UI",
      sans-serif;

    font-size: 16px;
    line-height: 1.5;
  }


  /* ===================================================== VARIÁVEIS ===================================================== */

  :root {
    --primary: #117f75;
    --primary-dark: #0b625b;
    --primary-light: #dff5f2;

    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --blue-light: #e0f2fe;

    --background: #f4f7fb;
    --card: #ffffff;
    --text: #13233f;
    --muted: #64748b;
    --border: #d8e2ef;

    --danger: #dc2626;
    --danger-dark: #b91c1c;
    --danger-light: #fee2e2;

    --success: #15803d;
    --success-light: #dcfce7;

    --warning: #b45309;
    --warning-light: #fef3c7;

    --orange: #c2410c;
    --orange-light: #ffedd5;

    --shadow:
      0 10px 30px rgba(15, 23, 42, 0.07);
  }


  /* ===================================================== CABEÇALHO ===================================================== */

  .topbar {
    width: 100%;
    min-height: 72px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    padding: 14px max(20px, calc((100% - 1120px) / 2));

    background: #ffffff;
    border-bottom: 1px solid var(--border);
  }

  .brand {
    display: flex;
    align-items: center;
    gap: 12px;

    min-width: 0;
  }

  .brand-icon {
    width: 42px;
    height: 42px;

    display: grid;
    place-items: center;

    border-radius: 12px;
    background: var(--primary-light);

    font-size: 24px;
  }

  .brand strong {
    display: block;

    color: var(--text);
    font-size: 17px;
    font-weight: 800;
    line-height: 1.2;
  }

  .brand small {
    display: block;
    margin-top: 3px;

    color: var(--muted);
    font-size: 12px;
  }

  .top-actions,
  .button-row {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .top-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }


  /* ===================================================== CONTAINER E CARDS ===================================================== */

  .container {
    width: min(1120px, calc(100% - 32px));
    margin: 32px auto 60px;
  }

  .card {
    margin-bottom: 22px;
    padding: 28px;

    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;

    box-shadow: var(--shadow);
  }

  .auth-card {
    width: min(100%, 520px);
    margin: 70px auto;
  }


  /* ===================================================== TÍTULOS E TEXTOS ===================================================== */

  h1,
  h2,
  h3 {
    margin: 0;
    color: var(--text);
    line-height: 1.2;
  }

  h1 {
    margin-bottom: 12px;
    font-size: clamp(28px, 5vw, 44px);
    font-weight: 800;
  }

  h2 {
    margin-bottom: 8px;
    font-size: clamp(22px, 4vw, 30px);
    font-weight: 800;
  }

  h3 {
    font-size: 18px;
  }

  p {
    margin-top: 0;
  }

  .muted {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 17px;
  }

  .helper {
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
  }

  .eyebrow {
    display: inline-block;
    margin-bottom: 8px;

    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
  }


  /* ===================================================== FORMULÁRIOS ===================================================== */

  .form {
    display: grid;
    gap: 18px;

    width: 100%;
    margin-top: 26px;
  }

  .form label {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;

    width: 100%;

    color: var(--text);
    font-size: 15px;
    font-weight: 700;
  }

  .form input,
  .form select,
  .form textarea {
    display: block;

    width: 100%;
    min-height: 48px;

    padding: 12px 14px;

    border: 1px solid var(--border);
    border-radius: 12px;

    background: #ffffff;
    color: var(--text);

    font: inherit;
    font-size: 16px;

    transition:
      border-color 0.2s ease,
      box-shadow 0.2s ease,
      background 0.2s ease;
  }

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

  .form input::placeholder,
  .form textarea::placeholder {
    color: #94a3b8;
  }

  .form input:focus,
  .form select:focus,
  .form textarea:focus {
    outline: none;

    border-color: var(--primary);

    box-shadow:
      0 0 0 4px rgba(17, 127, 117, 0.13);
  }

  .form input:disabled,
  .form select:disabled,
  .form textarea:disabled {
    background: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
  }

  .two-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;

    width: 100%;
  }

  .checkbox-label {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 10px !important;

    color: var(--text);
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.4;
  }

  .checkbox-label input {
    flex: 0 0 auto;

    width: 18px !important;
    min-height: 18px !important;

    margin-top: 2px !important;
  }


  /* ===================================================== BOTÕES ===================================================== */

  button,
  .button-link {
    min-height: 46px;

    border: 0;
    border-radius: 12px;

    padding: 11px 16px;

    font: inherit;
    font-size: 15px;
    font-weight: 800;

    cursor: pointer;
    text-decoration: none;
    text-align: center;

    transition:
      background 0.2s ease,
      transform 0.15s ease,
      box-shadow 0.2s ease,
      opacity 0.2s ease;
  }

  button:hover,
  .button-link:hover {
    transform: translateY(-1px);
  }

  button:active,
  .button-link:active {
    transform: translateY(0);
  }

  button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
  }

  .primary-button {
    background: var(--primary);
    color: #ffffff;
    box-shadow:
      0 5px 14px rgba(17, 127, 117, 0.18);
  }

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

  .secondary-button {
    background: var(--blue-light);
    color: #164e63;
  }

  .secondary-button:hover {
    background: #cbe9f8;
  }

  .danger-button {
    background: var(--danger-light);
    color: var(--danger);
  }

  .danger-button:hover {
    background: #fecaca;
    color: var(--danger-dark);
  }

  .link-button {
    min-height: auto;
    padding: 8px 10px;

    background: transparent;
    color: var(--primary);
  }

  .link-button:hover {
    background: var(--primary-light);
  }

  .icon-button,
  .modal-close {
    min-height: auto;
    padding: 4px 10px;

    background: transparent;
    color: var(--muted);

    font-size: 30px;
    line-height: 1;
  }

  .icon-button:hover,
  .modal-close:hover {
    background: #f1f5f9;
    color: var(--text);
  }

  .hidden {
    display: none !important;
  }

  .message {
    min-height: 22px;
    margin: 0;

    color: var(--danger);
    font-size: 14px;
  }

  .message.success {
    color: var(--success);
  }


  /* ===================================================== BOAS-VINDAS ===================================================== */

  .welcome-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;

    margin-bottom: 22px;
  }


  /* ===================================================== INDICADORES DO MORADOR ===================================================== */

  .stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;

    width: 100%;
    margin: 20px 0 24px;
  }

  .stat-card {
    min-width: 0;
    min-height: 108px;

    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;

    padding: 18px;

    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 16px;

    box-shadow:
      0 5px 16px rgba(15, 23, 42, 0.04);
  }

  .stat-card span {
    display: block;

    overflow: hidden;

    color: var(--primary);
    font-size: 30px;
    font-weight: 800;
    line-height: 1;

    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .stat-card small {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
  }


  /* ===================================================== SEÇÕES ===================================================== */

  .section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    margin-bottom: 8px;
  }

  .compact-select {
    width: auto;
    min-width: 150px;
    min-height: 46px;
  }


  /* ===================================================== LISTA DE OCORRÊNCIAS ===================================================== */

  .reports-list {
    display: grid;
    gap: 12px;

    margin-top: 20px;
  }

  .report-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;

    padding: 18px;

    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 14px;

    transition:
      border-color 0.2s ease,
      box-shadow 0.2s ease;
  }

  .report-item:hover {
    border-color: #b8c9dc;

    box-shadow:
      0 5px 15px rgba(15, 23, 42, 0.05);
  }

  .compact-report {
    align-items: center;
  }

  .report-title {
    margin-bottom: 6px;

    color: var(--text);
    font-size: 17px;
    font-weight: 800;
    line-height: 1.3;
  }

  .report-meta {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
  }

  .empty-state {
    padding: 40px 20px;

    color: var(--muted);
    text-align: center;
    font-size: 17px;
  }


  /* ===================================================== AÇÕES POR ÍCONE ===================================================== */

  .report-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;

    flex-shrink: 0;
  }

  .action-icon-button {
    width: 42px;
    height: 42px;
    min-height: 42px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border-radius: 10px;

    font-size: 19px;
    line-height: 1;
  }

  .action-icon-button:hover {
    filter: brightness(0.96);
  }

  .action-icon-button[title="Detalhar"] {
    background: var(--blue-light);
    color: #0369a1;
  }

  .action-icon-button[title="Linha do tempo"] {
    background: #ede9fe;
    color: #6d28d9;
  }

  .action-icon-button[title="Editar"] {
    background: var(--warning-light);
    color: var(--warning);
  }

  .action-icon-button[title="Enviar e-mail"] {
    background: var(--primary-light);
    color: var(--primary-dark);
  }

  .action-icon-button[title="Excluir"] {
    background: var(--danger-light);
    color: var(--danger);
  }


  /* ===================================================== STATUS DAS OCORRÊNCIAS ===================================================== */

  .badge {
    display: inline-flex;
    align-items: center;

    min-height: 28px;
    margin-top: 8px;
    padding: 5px 10px;

    border-radius: 999px;

    background: #e8eef8;
    color: #334155;

    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
  }

  .badge.open {
    background: #dbeafe;
    color: #1d4ed8;
  }

  .badge.progress {
    background: var(--warning-light);
    color: #a16207;
  }

  .badge.done {
    background: var(--success-light);
    color: #166534;
  }


  /* ===================================================== PAGINAÇÃO ===================================================== */

  .pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;

    margin-top: 22px;

    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
  }

  .pagination button {
    min-height: 42px;
    padding: 9px 14px;
  }


  /* ===================================================== FOTOS ===================================================== */

  .report-photo-container {
    margin-top: 16px;
  }

  .report-photo,
  .detail-photo {
    display: block;

    width: 100%;
    max-width: 440px;
    max-height: 320px;

    object-fit: cover;

    border: 1px solid var(--border);
    border-radius: 12px;
  }


  /* ===================================================== MODAIS ===================================================== */

  .modal {
    position: fixed;
    z-index: 1000;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(15, 23, 42, 0.68);
  }

  .modal-card {
    position: relative;

    width: min(680px, 100%);
    max-height: 90vh;

    overflow-y: auto;

    padding: 30px;

    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 18px;

    box-shadow:
      0 20px 60px rgba(15, 23, 42, 0.25);
  }

  .modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
  }


  /* ===================================================== LINHA DO TEMPO ===================================================== */

  .timeline {
    display: grid;
    gap: 0;

    margin-top: 22px;
  }

  .timeline-item {
    position: relative;

    display: flex;
    gap: 14px;

    min-height: 82px;
  }

  .timeline-item:not(:last-child)::after {
    content: "";

    position: absolute;
    top: 32px;
    left: 15px;

    width: 2px;
    height: 50px;

    background: var(--border);
  }

  .timeline-dot {
    position: relative;
    z-index: 1;

    width: 32px;
    height: 32px;
    min-width: 32px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    background: var(--border);
    color: var(--muted);

    font-size: 13px;
    font-weight: 800;
  }

  .timeline-item.completed .timeline-dot {
    background: var(--primary);
    color: #ffffff;
  }

  .timeline-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
  }

  .timeline-content strong {
    color: var(--text);
  }

  .timeline-content span,
  .timeline-content small {
    color: var(--muted);
    font-size: 13px;
  }

  .timeline-item.pending {
    opacity: 0.65;
  }


  /* ===================================================== TOAST ===================================================== */

  .toast {
    position: fixed;
    z-index: 1100;
    bottom: 22px;
    left: 50%;

    max-width: calc(100% - 32px);

    padding: 13px 18px;

    transform: translateX(-50%) translateY(120px);

    background: #172033;
    color: #ffffff;

    border-radius: 12px;

    opacity: 0;
    text-align: center;

    transition:
      opacity 0.25s ease,
      transform 0.25s ease;
  }

  .toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }


  /* ===================================================== PÁGINA PÚBLICA ===================================================== */

  .public-page {
    background: #effaf8;
  }

  .public-topbar {
    border-bottom-color: #b7e4df;
  }

  .public-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;

    padding: 30px;

    background: linear-gradient(
      135deg,
      #ffffff,
      #e9faf7
    );

    border: 1px solid #b7e4df;
    border-left: 5px solid var(--primary);
    border-radius: 20px;

    box-shadow: var(--shadow);
  }

  .public-hero h1 {
    margin-top: 8px;
  }

  .public-user {
    min-width: 210px;
    padding: 16px;

    background: #e8f8f5;
    border: 1px solid #b7e4df;
    border-radius: 14px;
  }

  .public-user span,
  .public-user strong {
    display: block;
  }

  .public-user span {
    color: var(--muted);
    font-size: 12px;
  }

  .public-user strong {
    margin-top: 6px;
    color: #115e59;
    font-size: 15px;
  }

  .public-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(280px, 380px) 1fr;
    gap: 20px;

    margin-bottom: 20px;
  }

  .public-chart-card {
    min-height: 360px;
  }

  .public-chart-container {
    position: relative;

    width: 100%;
    height: 280px;

    margin-top: 18px;
  }

  .public-chart-container canvas {
    width: 100% !important;
    height: 100% !important;
  }

  .public-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;

    margin-bottom: 20px;
  }

  .public-stat-card {
    min-height: 100px;

    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;

    padding: 18px;

    background: #f8fffe;
    border: 1px solid #b7e4df;
    border-radius: 14px;

    text-align: center;
  }

  .public-stat-card:first-child {
    grid-column: 1 / -1;
  }

  .public-stat-card span {
    color: var(--primary);
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
  }

  .public-stat-card small {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
  }

  .public-report {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
  }

  .public-report-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;

    flex-shrink: 0;
  }

  .public-icon-button {
    width: 42px;
    height: 42px;
    min-height: 42px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border-radius: 10px;

    background: var(--blue-light);
    color: #0369a1;

    font-size: 19px;
  }

  .public-icon-button.timeline-button {
    background: #ede9fe;
    color: #6d28d9;
  }


  /* ===================================================== PÁGINA ADMINISTRATIVA ===================================================== */

  .admin-page {
    background: #f1f5f9;
  }

  .admin-topbar {
    background: #172554;
    border-bottom-color: #1e3a8a;
  }

  .admin-topbar .brand strong,
  .admin-topbar .brand small {
    color: #ffffff;
  }

  .admin-topbar .brand small {
    opacity: 0.75;
  }

  .admin-topbar .brand-icon {
    background: #dbeafe;
  }

  .admin-topbar .link-button {
    color: #ffffff;
  }

  .admin-topbar .link-button:hover {
    background: rgba(255, 255, 255, 0.12);
  }

  .admin-top-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
  }

  .admin-top-actions .link-button {
    width: 100%;
    text-align: right;
  }

  .admin-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;

    padding: 30px;

    background: linear-gradient(
      135deg,
      #172554,
      #1e40af
    );

    color: #ffffff;
    border-radius: 20px;

    box-shadow:
      0 12px 30px rgba(23, 37, 84, 0.2);
  }

  .admin-hero h1,
  .admin-hero p {
    color: #ffffff;
  }

  .admin-hero .muted {
    color: #dbeafe;
  }

  .admin-user {
    min-width: 230px;
    padding: 16px;

    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 14px;
  }

  .admin-user span,
  .admin-user strong {
    display: block;
  }

  .admin-user span {
    color: #bfdbfe;
    font-size: 12px;
  }

  .admin-user strong {
    margin-top: 5px;
    color: #ffffff;
  }

  .admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;

    margin: 22px 0;
  }

  .admin-stat-card {
    min-height: 110px;

    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;

    padding: 18px;

    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 16px;

    box-shadow:
      0 5px 16px rgba(15, 23, 42, 0.04);
  }

  .admin-stat-card:first-child {
    grid-column: 1 / -1;
  }

  .admin-stat-card span {
    color: var(--blue-dark);
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
  }

  .admin-stat-card small {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
  }

  .admin-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(280px, 380px) 1fr;
    gap: 20px;

    align-items: stretch;
  }

  .chart-card {
    min-height: 360px;
  }

  .chart-container {
    position: relative;

    width: 100%;
    height: 285px;

    margin-top: 18px;
  }

  .chart-container canvas {
    width: 100% !important;
    height: 100% !important;
  }

  .admin-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
  }

  .admin-filter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
  }

  .admin-report-item {
    position: relative;

    display: flex;
    flex-direction: column;
    align-items: stretch;

    min-height: 220px;

    padding: 20px 22px 78px;

    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 16px;

    box-shadow:
      0 5px 16px rgba(15, 23, 42, 0.04);
  }

  .admin-report-header {
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    min-height: 38px;
    margin-bottom: 12px;
  }

  .admin-report-header .report-title {
    flex: 1;
    min-width: 0;

    margin: 0;

    font-size: 19px;
  }

  .admin-report-status {
    position: static;
    flex: 0 0 auto;
    margin: 0;
  }

  .admin-report-main {
    width: 100%;
  }

  .admin-report-main .report-meta {
    font-size: 15px;
    line-height: 1.6;
  }

  .admin-report-actions {
    position: absolute;
    bottom: 18px;
    left: 22px;

    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
  }

  .admin-report-actions .action-icon-button {
    width: 42px;
    height: 42px;
    min-height: 42px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border-radius: 10px;
    font-size: 19px;
  }


  /* ===================================================== RESPONSIVIDADE ADMINISTRATIVA ===================================================== */

  @media (max-width: 950px) {
    .public-dashboard-grid,
    .admin-dashboard-grid {
      grid-template-columns: 1fr;
    }
  }

  @media (max-width: 650px) {
    .admin-top-actions {
      width: 100%;
      align-items: stretch;
    }

    .admin-top-actions .link-button {
      text-align: right;
    }

    .admin-hero {
      align-items: stretch;
      flex-direction: column;
      padding: 22px;
    }

    .admin-user {
      width: 100%;
      min-width: 0;
    }

    .admin-stats-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }

    .admin-stat-card {
      min-height: 92px;
      padding: 14px 10px;
    }

    .admin-stat-card:first-child {
      grid-column: 1 / -1;
    }

    .admin-stat-card span {
      font-size: 25px;
    }

    .admin-stat-card small {
      font-size: 11px;
    }

    .admin-filter-row {
      align-items: stretch;
      flex-direction: column;
    }

    .admin-filter-row select,
    .admin-actions button {
      width: 100%;
    }

    .admin-report-item {
      min-height: 230px;
      padding: 18px 16px 78px;
    }

    .admin-report-header {
      align-items: flex-start;
      gap: 12px;
    }

    .admin-report-header .report-title {
      font-size: 17px;
    }

    .admin-report-main .report-meta {
      font-size: 14px;
    }

    .admin-report-actions {
      bottom: 16px;
      left: 16px;
    }
  }


  /* ===================================================== RESPONSIVIDADE GERAL ===================================================== */

  @media (max-width: 760px) {
    .container {
      width: min(100% - 24px, 1120px);
      margin-top: 20px;
    }

    .topbar {
      align-items: flex-start;
      padding: 12px;
    }

    .top-actions {
      align-items: flex-end;
      flex-direction: column;
      gap: 4px;
    }

    .welcome-row,
    .section-heading,
    .public-hero {
      align-items: stretch;
      flex-direction: column;
    }

    .button-row {
      width: 100%;
      flex-direction: column;
    }

    .button-row > *,
    .welcome-row .primary-button,
    .welcome-row .secondary-button {
      width: 100%;
    }

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

    .section-heading .compact-select {
      width: 100%;
    }

    .report-item,
    .public-report {
      align-items: stretch;
      flex-direction: column;
    }

    .report-actions,
    .public-report-actions {
      width: 100%;
      justify-content: flex-start;
    }

    .public-user {
      width: 100%;
    }

    .public-stats-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }

    .public-stat-card {
      min-height: 85px;
      padding: 12px 8px;
    }

    .public-stat-card:first-child {
      grid-column: 1 / -1;
    }

    .public-stat-card span {
      font-size: 24px;
    }

    .public-stat-card small {
      font-size: 11px;
    }

    .modal-card {
      padding: 24px 18px;
    }
  }

  @media (max-width: 430px) {
    .container {
      width: calc(100% - 20px);
    }

    .card {
      padding: 20px 16px;
      border-radius: 16px;
    }

    h1 {
      font-size: 30px;
    }

    h2 {
      font-size: 24px;
    }

    .muted {
      font-size: 16px;
    }

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

    .stat-card {
      min-height: auto;
      text-align: center;
    }

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

    .public-stat-card:first-child {
      grid-column: auto;
    }

    .admin-stats-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-stat-card:first-child {
      grid-column: 1 / -1;
    }

    .action-icon-button,
    .public-icon-button {
      width: 40px;
      height: 40px;
      min-height: 40px;
    }

    .pagination {
      flex-wrap: wrap;
    }
  }

  /* ===================================================== AJUSTE DA TELA DO MORADOR Meus registros, Em aberto e Resolvidos na mesma linha ===================================================== */

  .stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    width: 100%;
  }

  .stats-grid .stat-card {
    min-width: 0;
    text-align: center;
  }


  /* ===================================================== AJUSTE DA TELA PÚBLICA Botões Visualizar e Linha do tempo alinhados à esquerda ===================================================== */

  .public-report-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;

    width: 100%;
  }

  .public-report-actions button {
    flex: 0 0 auto;
  }


  /* ===================================================== RESPONSIVIDADE ===================================================== */

  @media (max-width: 650px) {
    /* Mantém os três indicadores na mesma linha */
    .stats-grid {
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 8px;
    }

    .stats-grid .stat-card {
      min-height: 88px;
      padding: 12px 5px;
    }

    .stats-grid .stat-card span {
      font-size: 22px;
    }

    .stats-grid .stat-card small {
      font-size: 10px;
      line-height: 1.2;
    }

    /* Botões públicos alinhados à esquerda */
    .public-report-actions {
      width: 100%;
      justify-content: flex-start;
      align-items: center;
    }

    .public-report-actions button {
      width: 42px;
      height: 42px;
      min-height: 42px;
    }
  }

  @media (max-width: 400px) {
    /* Mesmo em celulares pequenos, mantém os três cards em uma única linha */
    .stats-grid {
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 5px;
    }

    .stats-grid .stat-card {
      padding: 10px 3px;
    }

    .stats-grid .stat-card span {
      font-size: 20px;
    }

    .stats-grid .stat-card small {
      font-size: 9px;
    }

    .public-report-actions {
      justify-content: flex-start;
    }
  }

  /* ===================================================== AJUSTE FINAL DA PÁGINA PÚBLICA ===================================================== */

  .public-report {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
  }

  .public-report-actions {
    display: flex !important;
    align-items: center;
    justify-content: flex-start !important;
    gap: 8px;

    width: auto !important;
    margin-right: auto;
  }

  .public-report-actions button {
    flex: 0 0 auto;
  }


  /* ===================================================== CELULAR ===================================================== */

  @media (max-width: 760px) {
    .public-report {
      display: flex;
      align-items: flex-start;
      flex-direction: column;
    }

    .public-report-actions {
      display: flex !important;
      align-items: center;
      justify-content: flex-start !important;

      width: 100% !important;
      margin: 0;
    }
  }

  @media (max-width: 430px) {
    .public-report-actions {
      display: flex !important;
      align-items: center;
      justify-content: flex-start !important;

      width: 100% !important;
      margin: 0;
    }
  }

  /* ===================================================== AJUSTE MOBILE DA TELA PÚBLICA ===================================================== */

  @media (max-width: 650px) {
    /* Total ocupa a primeira linha inteira */
    .public-stats-grid {
      display: grid !important;
      grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
      gap: 10px !important;
      width: 100% !important;
    }

    .public-stats-grid .public-stat-card {
      min-width: 0;
      min-height: 88px;
      padding: 12px 8px;
    }

    /* Total de registros ocupa as duas colunas */
    .public-stats-grid .public-stat-card:first-child {
      grid-column: 1 / -1 !important;
    }

    .public-stats-grid .public-stat-card span {
      font-size: 24px;
    }

    .public-stats-grid .public-stat-card small {
      font-size: 11px;
      line-height: 1.2;
    }

    /* Mantém os botões Visualizar e Linha do tempo alinhados à esquerda */
    .public-report-actions {
      display: flex !important;
      flex-direction: row !important;
      align-items: center !important;
      justify-content: flex-start !important;
      gap: 8px !important;

      width: 100% !important;
      margin: 0 !important;
    }

    .public-report-actions button {
      flex: 0 0 auto !important;
      width: 42px !important;
      height: 42px !important;
      min-height: 42px !important;
    }
  }

  /* Também mantém duas colunas em celulares pequenos, como telas com até 400px */
  @media (max-width: 400px) {
    .public-stats-grid {
      display: grid !important;
      grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
      gap: 8px !important;
    }

    .public-stats-grid .public-stat-card:first-child {
      grid-column: 1 / -1 !important;
    }

    .public-stats-grid .public-stat-card {
      min-height: 82px;
      padding: 10px 5px;
    }

    .public-stats-grid .public-stat-card span {
      font-size: 21px;
    }

    .public-stats-grid .public-stat-card small {
      font-size: 10px;
    }

    .public-report-actions {
      justify-content: flex-start !important;
    }
  }

  .action-icon-button.whatsapp-button {
    background: #dcfce7;
    color: #15803d;
  }

  .action-icon-button.whatsapp-button:hover {
    background: #bbf7d0;
  }

  /* ===================================================== TERMOS DE USO E PRIVACIDADE ===================================================== */

  .terms-box {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 10px !important;

    color: var(--muted) !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 1.5;
  }

  .terms-box input {
    flex: 0 0 auto;

    width: 18px !important;
    min-width: 18px;
    height: 18px;
    min-height: 18px !important;

    margin-top: 3px !important;
  }

  .terms-box span {
    display: block;
  }

  .terms-box input:focus {
    outline: 3px solid rgba(17, 127, 117, 0.2);
  }

  /* ===================================================== TERMOS DE USO - MOBILE ===================================================== */

  @media (max-width: 650px) {
    .terms-box {
      display: flex !important;
      flex-direction: row !important;
      align-items: flex-start !important;
      gap: 10px !important;

      width: 100%;
      padding: 12px;

      background: #f8fafc;
      border: 1px solid var(--border);
      border-radius: 10px;

      color: var(--muted) !important;
      font-size: 12px !important;
      font-weight: 400 !important;
      line-height: 1.5;

      text-align: left;
    }

    .terms-box input {
      flex: 0 0 auto;

      width: 19px !important;
      min-width: 19px !important;
      height: 19px;
      min-height: 19px !important;

      margin-top: 2px !important;
    }

    .terms-box span {
      display: block;
      flex: 1;
    }

    .auth-card {
      width: calc(100% - 20px);
      margin: 25px auto;
      padding: 20px 16px;
    }

    .auth-card .form {
      gap: 15px;
    }

    .auth-card .form label {
      font-size: 14px;
    }

    .auth-card .form input {
      min-height: 46px;
      font-size: 15px;
    }

    .auth-card .primary-button,
    .auth-card .secondary-button {
      width: 100%;
    }
  }

  @media (max-width: 400px) {
    .terms-box {
      padding: 10px;
      font-size: 11px !important;
      line-height: 1.45;
    }

    .terms-box input {
      width: 18px !important;
      min-width: 18px !important;
      height: 18px;
      min-height: 18px !important;
    }
  }

  /* ===================================================== TELA DE ACESSO ===================================================== */

  /* Remove a barra de rolagem somente quando a tela de login estiver visível. */
  body:has(#loginView:not(.hidden)) {
    overflow: hidden;
    min-height: 100vh;
  }

  /* Reduz o espaço entre o cabeçalho e o card de acesso. */
  body:has(#loginView:not(.hidden)) .auth-card {
    margin-top: 20px;
    margin-bottom: 20px;
  }

  /* Ajuste para celular. */
  @media (max-width: 650px) {
    body:has(#loginView:not(.hidden)) {
      overflow: hidden;
    }

    body:has(#loginView:not(.hidden)) .auth-card {
      width: calc(100% - 20px);
      margin-top: 12px;
      margin-bottom: 12px;
      padding: 20px 16px;
    }
  }

  /* ===================================================== FILTROS ADMINISTRATIVOS ===================================================== */

  .admin-filters {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
  }

  .admin-filter-field {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 6px !important;

    min-width: 145px;

    color: var(--text);
    font-size: 12px !important;
    font-weight: 700 !important;
  }

  .admin-filter-field input,
  .admin-filter-field select {
    min-height: 44px;
    padding: 9px 11px;
    font-size: 14px;
  }

  .admin-clear-filter {
    min-height: 44px;
    white-space: nowrap;
  }

  .report-filter-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;

    margin: 18px 0;
    padding: 13px 15px;

    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 10px;

    color: var(--muted);
    font-size: 13px;
  }

  .report-filter-summary p {
    margin: 0;
  }

  .report-filter-summary strong {
    color: var(--text);
  }

  @media (max-width: 800px) {
    .admin-filter-row {
      align-items: stretch;
      flex-direction: column;
    }

    .admin-filters {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      width: 100%;
    }

    .admin-filter-field {
      min-width: 0;
    }

    .admin-clear-filter {
      width: 100%;
    }
  }

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

    .report-filter-summary {
      flex-direction: column;
      gap: 7px;
    }
  }
  /* ===================================================== BOTÕES DESABILITADOS NOS CARDS ===================================================== */

  .admin-report-actions button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
    filter: grayscale(0.6);
    transform: none;
  }

  .admin-report-actions button:disabled:hover {
    transform: none;
    filter: grayscale(0.6);
  }


  /* Cores dos botões desabilitados */

  .admin-report-actions .detail-button:disabled {
    background: #e0f2fe;
    color: #0369a1;
  }

  .admin-report-actions .timeline-button:disabled {
    background: #ede9fe;
    color: #6d28d9;
  }

  .admin-report-actions .edit-button:disabled {
    background: #fef3c7;
    color: #a16207;
  }

  .admin-report-actions .whatsapp-button:disabled {
    background: #dcfce7;
    color: #15803d;
  }

  .admin-report-actions .email-button:disabled {
    background: var(--primary-light);
    color: var(--primary-dark);
  }

  .admin-report-actions .delete-button:disabled {
    background: #fee2e2;
    color: #b91c1c;
  }

  /* ===================================================== AVISO SOBRE ENVIO DE E-MAIL ===================================================== */

  .notice-box {
    display: block;

    margin: 16px 0;
    padding: 14px 16px;

    background: var(--blue-light);
    border: 1px solid #bae6fd;
    border-left: 4px solid var(--blue);
    border-radius: 10px;

    color: #1e3a8a;
    font-size: 14px;
    line-height: 1.55;
  }

  .notice-box strong {
    color: #1e40af;
  }


  /* ===================================================== MENSAGEM DE E-MAIL JÁ ENVIADO ===================================================== */

  .email-sent-message {
    width: 100%;
    margin-top: 10px;
    padding: 10px 12px;

    background: var(--success-light);
    border: 1px solid #bbf7d0;
    border-radius: 8px;

    color: var(--success);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
  }


  /* ===================================================== AJUSTE DO CARD DE OCORRÊNCIA COM AVISO DE E-MAIL ===================================================== */

  .report-item {
    flex-wrap: wrap;
  }

  .report-item > div:first-child {
    flex: 1 1 280px;
    min-width: 0;
  }

  .report-item .report-actions {
    flex: 0 0 auto;
  }


  /* ===================================================== BOTÕES DESABILITADOS APÓS ENVIO DO E-MAIL ===================================================== */

  .report-actions button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
    filter: grayscale(0.75);

    box-shadow: none;
    transform: none;
  }

  .report-actions button:disabled:hover,
  .report-actions button:disabled:active {
    transform: none;
    filter: grayscale(0.75);
  }


  /* Mantém a identificação visual de cada botão desabilitado */

  .report-actions .edit-button:disabled {
    background: var(--warning-light);
    color: var(--warning);
  }

  .report-actions .email-button:disabled {
    background: var(--primary-light);
    color: var(--primary-dark);
  }

  .report-actions .delete-button:disabled {
    background: var(--danger-light);
    color: var(--danger);
  }


  /* ===================================================== CORES DOS BOTÕES DE AÇÃO ===================================================== */

  .report-actions .detail-button {
    background: var(--blue-light);
    color: #0369a1;
  }

  .report-actions .timeline-button {
    background: #ede9fe;
    color: #6d28d9;
  }

  .report-actions .edit-button {
    background: var(--warning-light);
    color: var(--warning);
  }

  .report-actions .whatsapp-button {
    background: var(--success-light);
    color: var(--success);
  }

  .report-actions .email-button {
    background: var(--primary-light);
    color: var(--primary-dark);
  }

  .report-actions .delete-button {
    background: var(--danger-light);
    color: var(--danger);
  }


  /* ===================================================== MELHORIA DO TEXTO DE ORIENTAÇÃO ===================================================== */

  #reportFormCard .muted,
  #editModal .muted {
    line-height: 1.55;
  }


  /* ===================================================== RESPONSIVIDADE DO AVISO E DA MENSAGEM ===================================================== */

  @media (max-width: 650px) {
    .notice-box {
      margin: 14px 0;
      padding: 12px 13px;

      font-size: 13px;
    }

    .email-sent-message {
      margin-top: 8px;
      padding: 9px 10px;

      font-size: 12px;
    }

    .report-item {
      align-items: stretch;
    }

    .report-item .report-actions {
      width: 100%;
      justify-content: flex-start;
    }
  }

  @media (max-width: 400px) {
    .notice-box {
      font-size: 12px;
    }

    .email-sent-message {
      font-size: 11px;
    }
  }

  /* ===================================================== AJUSTE DOS CARDS COMPACTOS DE OCORRÊNCIA ===================================================== */

  .report-item.compact-report {
    display: grid;

    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;

    align-items: start;
    justify-content: initial;

    min-height: 0 !important;
    height: auto !important;

    gap: 10px 14px;
    padding: 16px;
  }

  .report-item.compact-report > div:first-child {
    grid-column: 1;
    grid-row: 1;

    min-width: 0;
    flex: initial;
  }

  .report-item.compact-report .report-actions {
    grid-column: 2;
    grid-row: 1;

    align-self: start;
    justify-content: flex-end;

    margin: 0;
  }

  .report-item.compact-report .email-sent-message {
    grid-column: 1 / -1;
    grid-row: 2;

    margin-top: 2px;
  }


  /* ===================================================== AJUSTE DOS BOTÕES DO CARD ===================================================== */

  .report-item.compact-report .action-icon-button {
    width: 42px;
    height: 42px;
    min-height: 42px;

    padding: 0;

    font-size: 19px;
    border-radius: 10px;
  }


  /* ===================================================== CELULAR ===================================================== */

  @media (max-width: 650px) {
    .report-item.compact-report {
      display: grid;

      grid-template-columns: 1fr;
      grid-template-rows: auto auto auto;

      gap: 10px;
      padding: 14px;
    }

    .report-item.compact-report > div:first-child {
      grid-column: 1;
      grid-row: 1;
    }

    .report-item.compact-report .report-actions {
      grid-column: 1;
      grid-row: 2;

      width: 100%;
      justify-content: flex-start;
    }

    .report-item.compact-report .email-sent-message {
      grid-column: 1;
      grid-row: 3;

      margin-top: 0;
    }
  }

  /* ===================================================== TELA DE PERFIL DO USUÁRIO ===================================================== */

  .profile-container {
    width: min(100%, 720px);
  }

  .profile-card {
    margin: 32px auto 60px;
  }

  .profile-card h1 {
    margin-bottom: 8px;
  }

  .profile-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
  }

  .profile-actions .button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  #profileEmail:disabled {
    background: #f1f5f9;
    color: #64748b;
    cursor: not-allowed;
  }

  @media (max-width: 650px) {
    .profile-card {
      margin-top: 20px;
      padding: 22px 16px;
    }

    .profile-actions {
      align-items: stretch;
      flex-direction: column-reverse;
    }

    .profile-actions button,
    .profile-actions .button-link {
      width: 100%;
    }
  }

  /* ===================================================== AJUSTE DOS CARDS DA TELA PÚBLICA ===================================================== */

  .public-report {
    display: grid !important;

    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;

    align-items: start !important;
    justify-content: initial !important;

    min-height: 0 !important;
    height: auto !important;

    gap: 10px 16px;
    padding: 16px;
  }

  .public-report > div:first-child {
    grid-column: 1;
    grid-row: 1;

    min-width: 0;
  }

  .public-report .public-report-actions {
    grid-column: 2;
    grid-row: 1;

    align-self: start;

    display: flex !important;
    align-items: center;
    justify-content: flex-start !important;
    gap: 8px;

    width: auto !important;
    margin: 0 !important;
  }

  .public-report .badge {
    margin-top: 8px;
  }

  .public-report .public-icon-button {
    width: 42px;
    height: 42px;
    min-height: 42px;

    padding: 0;

    font-size: 18px;
  }


  /* ===================================================== TELA PÚBLICA NO CELULAR ===================================================== */

  @media (max-width: 760px) {
    .public-report {
      display: grid !important;

      grid-template-columns: 1fr;
      grid-template-rows: auto auto;

      align-items: start !important;
      gap: 10px;

      min-height: 0 !important;
    }

    .public-report > div:first-child {
      grid-column: 1;
      grid-row: 1;
    }

    .public-report .public-report-actions {
      grid-column: 1;
      grid-row: 2;

      width: 100% !important;
      margin: 0 !important;

      justify-content: flex-start !important;
    }
  }

  /* ===================================================== AJUSTE DOS CARDS DE OCORRÊNCIA DA ÁREA ADMINISTRATIVA ===================================================== */

  .admin-report-item {
    position: static !important;

    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;

    align-items: start !important;
    justify-content: initial !important;

    min-height: 0 !important;
    height: auto !important;

    gap: 12px 18px;

    padding: 16px !important;
  }

  .admin-report-item .admin-report-header {
    grid-column: 1 / -1;
    grid-row: 1;

    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    min-height: 0 !important;
    margin-bottom: 0 !important;
  }

  .admin-report-item .admin-report-main {
    grid-column: 1;
    grid-row: 2;

    min-width: 0;
  }

  .admin-report-item .admin-report-actions {
    position: static !important;

    grid-column: 2;
    grid-row: 2;

    display: flex !important;
    align-items: center;
    justify-content: flex-end;

    gap: 8px;

    margin: 0 !important;
  }

  .admin-report-item .admin-report-actions .action-icon-button {
    width: 42px;
    height: 42px;
    min-height: 42px;

    padding: 0;
    font-size: 18px;
  }


  /* ===================================================== MENSAGEM DE E-MAIL ENVIADO NA ÁREA ADMINISTRATIVA ===================================================== */

  .admin-report-item .email-sent-message {
    grid-column: 1 / -1;
    grid-row: 3;

    margin-top: 0;
  }


  /* ===================================================== RESPONSIVIDADE DA ÁREA ADMINISTRATIVA ===================================================== */

  @media (max-width: 760px) {
    .admin-report-item {
      display: grid !important;

      grid-template-columns: 1fr;
      grid-template-rows: auto auto auto;

      gap: 10px;
      padding: 16px !important;
    }

    .admin-report-item .admin-report-header {
      grid-column: 1;
      grid-row: 1;

      width: 100%;
    }

    .admin-report-item .admin-report-main {
      grid-column: 1;
      grid-row: 2;
    }

    .admin-report-item .admin-report-actions {
      grid-column: 1;
      grid-row: 3;

      width: 100%;
      justify-content: flex-start;
    }

    .admin-report-item .email-sent-message {
      grid-column: 1;
      grid-row: 4;
    }
  }

/* Link do manual do usuário */

#btnEditProfile + .link-button {
  white-space: nowrap;
}

@media (max-width: 760px) {
  .top-actions {
    width: 100%;
    align-items: flex-end;
  }

  .top-actions .link-button {
    white-space: nowrap;
  }
}
