/* ============================================================
   VARIÁVEIS GLOBAIS E PALETA
   Altere aqui cores e medidas que são reutilizadas no sistema.
   ============================================================ */
:root {
  --red: #e3262d;
  --red-dark: #b9141b;
  --red-soft: #fff0f1;
  --orange: #f59a3d;
  --blue: #3b82f6;
  --green: #20a464;
  --ink: #24272c;
  --muted: #747b85;
  --line: #e7e9ed;
  --bg: #f7f8fa
}

.start-video {
  width: 100%;
  max-width: 620px;
  margin: 24px 0 22px;
  border-radius: 14px;
  overflow: hidden;
  background: #111;
  box-shadow: 0 12px 30px rgba(30, 35, 45, .12);
  aspect-ratio: 16 / 9;
}

.start-video iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

* {
  box-sizing: border-box
}

body {
  margin: 0;
  font-family: Inter, Segoe UI, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink)
}

button,
input,
select,
textarea {
  font: inherit
}

.hidden {
  display: none !important
}

/* ============================================================
   TELA INICIAL / ACESSO
   Componentes usados na página pública de entrada.
   ============================================================ */
.start {
  min-height: 100vh;
  background: radial-gradient(circle at 10% 15%, #e3262d14, transparent 25%), radial-gradient(circle at 90% 80%, #3b82f612, transparent 24%), #f8f9fb;
  display: flex;
  flex-direction: column
}

.start-head {
  height: 76px;
  padding: 0 6%;
  display: flex;
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--line)
}

.start-brand {
  display: flex;
  align-items: center;
  gap: 11px
}

.start-logo {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--red-dark), var(--red));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 20px;
  box-shadow: 0 7px 18px #e3262d2b
}

.start-brand b {
  font-size: 19px
}

.start-brand small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 2px
}

.start-body {
  width: min(1120px, 92%);
  margin: auto;
  display: grid;
  grid-template-columns: 1fr 470px;
  gap: 75px;
  align-items: center;
  padding: 50px 0
}

.start-copy .tag,
.login-copy .tag {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 20px;
  background: var(--red-soft);
  border: 1px solid #f2cdd0;
  color: var(--red-dark);
  font-size: 11px;
  font-weight: 900
}

.start-copy h1 {
  font-size: 46px;
  line-height: 1.08;
  letter-spacing: -1.4px;
  margin: 18px 0 13px
}

.start-copy h1 span,
.login-copy h1 span {
  color: var(--red)
}

.start-copy>p {
  max-width: 580px;
  color: #68707a;
  font-size: 16px;
  line-height: 1.65
}

.start-benefits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 28px
}

.start-benefit {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px
}

.start-benefit i {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--red-soft);
  color: var(--red-dark);
  font-style: normal
}

.start-benefit b {
  display: block;
  font-size: 12px;
  margin-top: 8px
}

.start-benefit small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
  margin-top: 3px
}

.start-card,
.login-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 18px 50px #1e232d1a;
  position: relative
}

.start-card:before,
.login-card:before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 5px;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(90deg, var(--red), #ef4444, var(--orange))
}

.start-card h2 {
  font-size: 23px;
  margin: 0 0 5px
}

.start-card>p {
  color: var(--muted);
  font-size: 12px;
  margin: 0 0 20px
}

.start-option {
  width: 100%;
  min-height: 74px;
  margin: 9px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  display: grid;
  grid-template-columns: 43px 1fr 20px;
  align-items: center;
  text-align: left;
  padding: 12px 13px;
  cursor: pointer;
  transition: .16s
}

.start-option:hover {
  transform: translateY(-2px);
  border-color: #e5a4a8;
  background: #fffafa;
  box-shadow: 0 8px 20px #e3262d12
}

.start-option .ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--red-soft);
  color: var(--red-dark);
  font-style: normal;
  font-size: 17px
}

.start-option:nth-of-type(2) .ico {
  background: #fff4e8;
  color: #c96d16
}

.start-option:nth-of-type(3) .ico {
  background: #edf4ff;
  color: #2865bd
}

.start-option b {
  display: block;
  font-size: 13px
}

.start-option small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 3px
}

.start-option em {
  font-style: normal;
  font-size: 23px;
  color: #aeb4bc
}

.start-anon {
  margin-top: 18px;
  padding: 11px;
  border-radius: 9px;
  background: #f7faf8;
  color: #4d6b59;
  font-size: 10px;
  text-align: center;
  border: 1px solid #dceee3
}

.start-foot {
  text-align: center;
  color: #9298a0;
  font-size: 10px;
  padding: 14px;
  border-top: 1px solid var(--line);
  background: #fff
}

/* ============================================================
   LOGIN ADMINISTRATIVO
   Layout e componentes da autenticação.
   ============================================================ */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #fff6f6 0%, #fff 55%, #f3f7ff 100%)
}

.login-head {
  height: 74px;
  padding: 0 6%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-bottom: 1px solid var(--line)
}

.login-body {
  width: min(1050px, 92%);
  margin: auto;
  min-height: calc(100vh - 74px);
  display: grid;
  grid-template-columns: 1fr 440px;
  gap: 70px;
  align-items: center
}

.login-copy h1 {
  font-size: 42px;
  line-height: 1.08;
  letter-spacing: -1px;
  margin: 16px 0 10px
}

.login-copy>p {
  color: #68707a;
  line-height: 1.65;
  max-width: 550px
}

.login-help {
  display: grid;
  gap: 10px;
  margin-top: 25px
}

.login-help div {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 12px
}

.login-help i {
  font-style: normal;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #eaf7ef;
  color: #198754;
  display: grid;
  place-items: center;
  font-weight: 900
}

.login-card {
  padding: 30px
}

.login-card-head {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 22px
}

.login-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--red-soft);
  color: var(--red-dark);
  display: grid;
  place-items: center;
  font-size: 19px
}

.login-card h2 {
  font-size: 22px;
  margin: 0 0 3px
}

.login-card .sub {
  font-size: 11px;
  color: var(--muted);
  margin: 0
}

.login-card label {
  font-size: 12px;
  font-weight: 800;
  display: block;
  margin: 15px 0 7px
}

.field {
  height: 47px;
  border: 1px solid #dfe2e7;
  border-radius: 9px;
  background: #fbfcfd;
  display: flex;
  align-items: center
}

.field:focus-within {
  border-color: #d95d63;
  box-shadow: 0 0 0 3px #e3262d12;
  background: #fff
}

.field span {
  width: 40px;
  text-align: center;
  color: var(--red-dark);
  font-size: 16px
}

.field input {
  width: 100%;
  height: 100%;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 10px 0 0 !important
}

.hint {
  font-size: 10px;
  color: #8a9098;
  margin-top: 4px
}

.login-btn {
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--red-dark), var(--red));
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  margin-top: 20px;
  box-shadow: 0 8px 18px #e3262d2b
}

.back {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 8px 12px;
  color: #5e6670;
  font-weight: 700;
  cursor: pointer
}

@media(max-width:850px) {

  .start-body,
  .login-body {
    grid-template-columns: 1fr;
    gap: 25px
  }

  .start-copy h1,
  .login-copy h1 {
    font-size: 35px
  }

  .start-benefits {
    grid-template-columns: 1fr
  }

  .login-body {
    padding: 30px 0
  }

  .start-body {
    padding: 30px 0
  }
}

@media(max-width:600px) {

  .start-head,
  .login-head {
    padding: 0 18px
  }

  .start-body,
  .login-body {
    width: 92%
  }

  .start-card,
  .login-card {
    padding: 23px
  }
}

/* ===== ÁREA ADMINISTRATIVA ===== */
.app {
  min-height: 100vh;
  display: flex;
  background: linear-gradient(135deg, #f8f9fb 0%, #f3f5f8 100%)
}

.side {
  width: 248px;
  min-height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  background: linear-gradient(180deg, #17191d 0%, #22252a 100%);
  padding: 20px 13px;
  box-shadow: 8px 0 30px rgba(24, 28, 35, .14);
  z-index: 20;
  display: flex;
  flex-direction: column
}

.logo {
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -.4px;
  padding: 3px 11px 22px;
  display: flex;
  align-items: center;
  gap: 9px
}

.logo:before {
  content: '✓';
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #b9141b, #e3262d);
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 7px 17px rgba(227, 38, 45, .3)
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 7px
}

.nav button {
  border: 1px solid transparent;
  background: transparent;
  color: #cbd0d7;
  text-align: left;
  border-radius: 10px;
  padding: 12px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: .16s;
  display: flex;
  align-items: center;
  gap: 9px
}

.nav button:hover {
  background: #2d3036;
  color: #fff;
  transform: translateX(2px)
}

.nav button.active {
  background: linear-gradient(90deg, #b9141b, #e3262d);
  color: #fff;
  box-shadow: 0 7px 18px rgba(227, 38, 45, .22)
}

.nav-badge {
  margin-left: auto;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #fff;
  color: #b9141b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 900
}

.chat-list {
  display: flex;
  flex-direction: column;
  gap: 10px
}

.chat-list-item {
  width: 100%;
  border: 1px solid #e5e8ed;
  background: #fff;
  border-radius: 13px;
  padding: 15px 17px;
  cursor: pointer;
  text-align: left;
  display: grid;
  grid-template-columns: minmax(150px, 210px) 1fr auto;
  gap: 16px;
  align-items: center;
  transition: .16s
}

.chat-list-item:hover {
  border-color: #e3262d;
  background: #fffafb;
  transform: translateY(-1px)
}

.chat-list-item.unread {
  border-color: #f0b8bc;
  box-shadow: 0 5px 18px rgba(227, 38, 45, .08)
}

.chat-list-protocol {
  font-weight: 900;
  color: #25282d;
  font-size: 13px
}

.chat-list-preview {
  color: #68717b;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.chat-list-date {
  color: #8b929b;
  font-size: 10px;
  white-space: nowrap
}

.chat-list-count {
  display: inline-flex;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #e3262d;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  margin-left: 8px
}

@media(max-width:760px) {
  .chat-list-item {
    grid-template-columns: 1fr auto;
    gap: 8px
  }

  .chat-list-preview {
    grid-column: 1 / -1
  }

  .chat-list-date {
    grid-column: 2;
    grid-row: 1
  }
}

.side .nav.logout {
  margin-top: auto;
  background: #fff;
  color: #25282d;
  justify-content: center;
  border: 0
}

.side .nav.logout:hover {
  background: #fff0f1;
  color: #b9141b;
  transform: none
}

.side .nav.logout.danger {
  font-weight: 800
}

.main {
  margin-left: 248px;
  width: calc(100% - 248px);
  min-height: 100vh;
  padding: 34px 42px 55px
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 25px
}

.top h1 {
  margin: 0;
  font-size: 30px;
  letter-spacing: -.7px;
  color: #20242a
}

.user {
  color: #747b85;
  font-size: 12px;
  margin-top: 6px
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 24px
}

.card {
  background: #fff;
  border: 1px solid #e4e7eb;
  border-radius: 15px;
  padding: 19px 20px;
  box-shadow: 0 9px 25px rgba(28, 34, 42, .06);
  position: relative;
  overflow: hidden
}

.card:before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #e3262d
}

.card:nth-child(2):before {
  background: #f59a3d
}

.card:nth-child(3):before {
  background: #3b82f6
}

.card:nth-child(4):before {
  background: #20a464
}

.muted {
  color: #747b85;
  font-size: 12px
}

.num {
  font-size: 31px;
  font-weight: 900;
  margin-top: 7px;
  color: #20242a
}

.section {
  background: #fff;
  border: 1px solid #e4e7eb;
  border-radius: 15px;
  padding: 22px;
  box-shadow: 0 9px 25px rgba(28, 34, 42, .05)
}

.section h3 {
  margin: 0 0 8px;
  font-size: 18px
}

.section p {
  line-height: 1.55
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px
}

.table th {
  background: #f8f9fb;
  color: #69717b;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .45px;
  text-align: left;
  padding: 13px 12px;
  border-top: 1px solid #e7e9ed;
  border-bottom: 1px solid #e7e9ed
}

.table th:first-child {
  border-left: 1px solid #e7e9ed;
  border-radius: 9px 0 0 0
}

.table th:last-child {
  border-right: 1px solid #e7e9ed;
  border-radius: 0 9px 0 0
}

.table td {
  padding: 14px 12px;
  border-bottom: 1px solid #eef0f3;
  color: #424850;
  background: #fff;
  vertical-align: middle
}

.table tr:hover td {
  background: #fff8f8
}

.table td:first-child {
  font-weight: 600
}

.link {
  background: none;
  border: 0;
  color: #bd1820;
  cursor: pointer;
  font-weight: 800
}

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: #fff0f1;
  color: #b9141b;
  border: 1px solid #f3d0d3;
  font-size: 10px;
  font-weight: 800
}

/* Status: fundo suave e texto sempre em tom mais escuro para manter contraste. */
.status-tag,
.status-select {
  font-weight: 800
}

.status-recebida {
  background: #ffe5e7 !important;
  color: #8f1118 !important;
  border-color: #f1b9bd !important
}

.status-analise {
  background: #fff0dc !important;
  color: #9a4f00 !important;
  border-color: #f0c58e !important
}

.status-investigacao {
  background: #fff7c7 !important;
  color: #765900 !important;
  border-color: #e9d47a !important
}

.status-aguardando {
  background: #e5f0ff !important;
  color: #164f87 !important;
  border-color: #b9d2f2 !important
}

.status-concluida {
  background: #e4f6e9 !important;
  color: #176b3b !important;
  border-color: #b9dfc4 !important
}

.status-arquivada {
  background: #e8e8e8 !important;
  color: #1f1f1f !important;
  border-color: #c5c5c5 !important
}

select.status-select {
  border-width: 1px;
  border-style: solid;
}

/* O fundo dos options acompanha o estado quando o navegador permite estilização nativa. */
select.status-select.status-recebida option {
  background: #ffe5e7;
  color: #8f1118;
}

select.status-select.status-analise option {
  background: #fff0dc;
  color: #9a4f00;
}

select.status-select.status-investigacao option {
  background: #fff7c7;
  color: #765900;
}

select.status-select.status-aguardando option {
  background: #e5f0ff;
  color: #164f87;
}

select.status-select.status-concluida option {
  background: #e4f6e9;
  color: #176b3b;
}

select.status-select.status-arquivada option {
  background: #e8e8e8;
  color: #1f1f1f;
}

/* Status colors — each state has its own background and a darker text. */
.tag.status-tag.status-recebida {
  background-color: #ffe5e7 !important;
  color: #8f1118 !important;
  border-color: #f1b9bd !important;
}

.tag.status-tag.status-analise {
  background-color: #fff0dc !important;
  color: #9a4f00 !important;
  border-color: #f0c58e !important;
}

.tag.status-tag.status-investigacao {
  background-color: #fff7c7 !important;
  color: #765900 !important;
  border-color: #e9d47a !important;
}

.tag.status-tag.status-aguardando {
  background-color: #e5f0ff !important;
  color: #164f87 !important;
  border-color: #b9d2f2 !important;
}

.tag.status-tag.status-concluida {
  background-color: #e4f6e9 !important;
  color: #176b3b !important;
  border-color: #b9dfc4 !important;
}

.tag.status-tag.status-arquivada {
  background-color: #e8e8e8 !important;
  color: #1f1f1f !important;
  border-color: #c5c5c5 !important;
}

select.status-select.status-recebida {
  background-color: #ffe5e7 !important;
  color: #8f1118 !important;
  border-color: #f1b9bd !important;
}

select.status-select.status-analise {
  background-color: #fff0dc !important;
  color: #9a4f00 !important;
  border-color: #f0c58e !important;
}

select.status-select.status-investigacao {
  background-color: #fff7c7 !important;
  color: #765900 !important;
  border-color: #e9d47a !important;
}

select.status-select.status-aguardando {
  background-color: #e5f0ff !important;
  color: #164f87 !important;
  border-color: #b9d2f2 !important;
}

select.status-select.status-concluida {
  background-color: #e4f6e9 !important;
  color: #176b3b !important;
  border-color: #b9dfc4 !important;
}

select.status-select.status-arquivada {
  background-color: #e8e8e8 !important;
  color: #1f1f1f !important;
  border-color: #c5c5c5 !important;
}

.mini {
  border: 1px solid #dfe2e7;
  background: #fff;
  border-radius: 8px;
  padding: 8px 12px;
  color: #59616b;
  font-weight: 800;
  cursor: pointer
}

.mini:hover {
  border-color: #e3262d;
  color: #b9141b;
  background: #fff8f8
}

.mini.red,
.btn {
  border: 0;
  background: linear-gradient(135deg, #b9141b, #e3262d);
  color: #fff;
  box-shadow: 0 7px 17px rgba(227, 38, 45, .18)
}

.btn {
  border-radius: 9px;
  padding: 11px 17px;
  font-weight: 800;
  cursor: pointer
}

.btn:hover {
  filter: brightness(1.04);
  transform: translateY(-1px)
}

.box {
  background: #fff;
  border: 1px solid #e4e7eb;
  border-radius: 17px;
  box-shadow: 0 18px 50px rgba(28, 34, 42, .14);
  padding: 27px;
  position: relative
}

.box h2 {
  margin: 0 0 4px;
  font-size: 22px
}

.box label {
  display: block;
  margin: 14px 0 6px;
  font-size: 12px;
  font-weight: 800;
  color: #30353b
}

.box input,
.box select,
.box textarea {
  width: 100%;
  border: 1px solid #dfe2e7;
  border-radius: 9px;
  background: #fbfcfd;
  padding: 11px 12px;
  outline: none;
  color: #30353b
}

.box input:focus,
.box select:focus,
.box textarea:focus {
  border-color: #d95d63;
  box-shadow: 0 0 0 3px rgba(227, 38, 45, .09);
  background: #fff
}

.box textarea {
  min-height: 125px;
  resize: vertical
}

.formgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px
}

.formgrid .full {
  grid-column: 1/-1
}

.success {
  background: #edf8f1;
  border: 1px solid #ccebd7;
  color: #197343;
  border-radius: 9px
}

.error {
  background: #fff0f1;
  border: 1px solid #f2c9cc;
  color: #b9141b;
  border-radius: 9px;
  padding: 10px;
  margin-top: 10px
}

.small {
  font-size: 10px;
  color: #858c95
}

/* ============================================================
   MODAIS E PRÉ-VISUALIZAÇÕES
   Janelas sobrepostas usadas nas áreas administrativa e pública.
   ============================================================ */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(20, 23, 28, .57);
  backdrop-filter: blur(3px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px
}

.modal .box {
  width: min(760px, 96vw);
  max-height: 90vh;
  overflow: auto
}

.attachment-preview-modal {
  z-index: 110;
}

.attachment-preview-box {
  width: min(980px, 96vw) !important;
  height: min(88vh, 760px);
  display: flex;
  flex-direction: column;
  padding: 20px !important;
}

.attachment-preview-head,
.attachment-preview-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.attachment-preview-head {
  padding-bottom: 14px;
  border-bottom: 1px solid #e7e9ed;
}

.attachment-preview-head strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #252a30;
  font-size: 14px;
}

.attachment-preview-body {
  min-height: 0;
  flex: 1;
  display: grid;
  place-items: center;
  padding: 18px 0;
  overflow: auto;
  background: #f7f8fa;
  border-radius: 10px;
  margin: 16px 0;
}

.attachment-preview-body img,
.attachment-preview-body video {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.attachment-preview-body iframe {
  width: 100%;
  height: 100%;
  min-height: 480px;
  border: 0;
  background: #fff;
}

.attachment-preview-message {
  max-width: 420px;
  padding: 24px;
  text-align: center;
  color: #69717b;
  font-size: 13px;
  line-height: 1.5;
}

.attachment-preview-actions {
  justify-content: flex-end;
}

@media(max-width:650px) {
  .attachment-preview-box {
    height: min(90vh, 680px);
    padding: 15px !important;
  }

  .attachment-preview-body iframe {
    min-height: 360px;
  }
}

.panel {
  min-height: 100vh;
  background: radial-gradient(circle at 10% 15%, rgba(227, 38, 45, .06), transparent 25%), #f7f8fa;
  padding: 50px 20px
}

.panel .box {
  width: min(680px, 96vw);
  margin: 0 auto
}

.panel h2 {
  font-size: 26px
}

.panel .btn {
  margin-top: 18px
}

@media(max-width:900px) {
  .side {
    width: 210px
  }

  .main {
    margin-left: 210px;
    width: calc(100% - 210px);
    padding: 28px 24px
  }

  .cards {
    grid-template-columns: repeat(2, 1fr)
  }
}

@media(max-width:650px) {
  .side {
    position: relative;
    width: 100%;
    min-height: auto;
    height: auto
  }

  .app {
    display: block
  }

  .main {
    margin-left: 0;
    width: 100%;
    padding: 22px 15px
  }

  .side .nav {
    display: grid;
    grid-template-columns: 1fr 1fr
  }

  .side .nav.logout {
    margin-top: 12px
  }

  .cards {
    grid-template-columns: 1fr 1fr;
    gap: 10px
  }

  .card {
    padding: 15px
  }

  .num {
    font-size: 25px
  }

  .section {
    padding: 14px;
    overflow: auto
  }

  .table {
    min-width: 750px
  }

  .top {
    align-items: flex-start
  }

  .formgrid {
    grid-template-columns: 1fr
  }

  .formgrid .full {
    grid-column: auto
  }

  .modal {
    padding: 12px
  }

  .box {
    padding: 20px
  }
}

.table .mini {
  padding: 7px 11px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e4e7eb;
  color: #b9141b;
  font-weight: 800;
  cursor: pointer
}

.table .mini:hover {
  background: #fff0f1;
  border-color: #e7a8ac
}

.tag.ok {
  background: #eaf7ef;
  color: #18794e;
  border-color: #ccebd9
}

.tag.mutedtag {
  background: #f1f3f5;
  color: #6f767e;
  border-color: #dfe3e7
}

.success {
  display: inline-block;
  padding: 7px 10px;
  border-radius: 8px;
  background: #eaf8f0;
  border: 1px solid #ccebd9;
  color: #16804b;
  font-size: 11px
}

.chat-form button:disabled {
  opacity: .65;
  cursor: wait
}

.chat-attachments {
  padding: 12px 14px;
  border-top: 1px solid #e7e9ed;
  background: #fff;
}

.chat-attachments-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.chat-attachments-head b {
  font-size: 12px;
  color: #333;
}

.chat-attachments-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chat-attachment-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 260px;
  padding: 6px 9px;
  border: 1px solid #dfe2e7;
  border-radius: 7px;
  background: #fff;
  color: #b9141b;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.chat-attachment-link:hover {
  background: #fff0f1;
  border-color: #e5a4a8;
}

.chat-attachment-link span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-upload-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

.chat-upload-input {
  display: none;
}

.chat-upload-button {
  border: 1px solid #dfe2e7;
  background: #fff;
  color: #b9141b;
  border-radius: 8px;
  padding: 8px 11px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.chat-upload-button:hover {
  background: #fff8f8;
  border-color: #e5a4a8;
}

.chat-upload-selected {
  color: #747b85;
  font-size: 9px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-upload-help {
  margin-top: 5px;
  color: #8a9199;
  font-size: 9px;
}

.msg.system {
  justify-content: center;
}

.msg.system .msg-bubble {
  max-width: 86%;
  background: #f7f8fa;
  border-color: #e1e4e8;
  color: #626a73;
}

.msg-attachment-link {
  display: inline-flex;
  align-items: center;
  margin-top: 5px;
  color: #b9141b;
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
}

.chat-upload-status {
  margin-top: 8px;
}


.type-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  z-index: 9999;
  left: 0;
  top: calc(100% + 8px);
  width: min(340px, 90vw);
  padding: 10px 12px;
  border-radius: 8px;
  background: #1f2937;
  color: #ffffff;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 400;
  text-align: left;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.type-tooltip:hover::after,
.type-tooltip:focus-within::after {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Anexos na tabela e visualização */
.table-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  max-width: 260px;
}

.attachment-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 140px;
  padding: 4px 8px;
  border: 1px solid #dfe2e7;
  border-radius: 6px;
  background: #fff;
  color: #b9141b;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  transition: .15s;
}

.attachment-btn:hover {
  background: #fff0f1;
  border-color: #e5a4a8;
  transform: translateY(-1px);
}

.report-attachments {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #e7e9ed;
  border-radius: 10px;
  background: #f8f9fb;
}

.report-attachments b {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  color: #333;
}

.attachment-link {
  display: inline-block;
  margin: 3px 6px 3px 0;
  padding: 6px 10px;
  border: 1px solid #dfe2e7;
  border-radius: 6px;
  background: #fff;
  color: #b9141b;
  font-weight: 700;
  font-size: 11px;
  cursor: pointer;
}

.attachment-link:hover {
  background: #fff0f1;
  border-color: #e5a4a8;
}

.chat {
  margin-top: 20px;
  border: 1px solid #e4e7eb;
  border-radius: 14px;
  background: #fff;
  overflow: hidden
}

.chat-head {
  padding: 14px 16px;
  background: #f8f9fb;
  border-bottom: 1px solid #e7e9ed;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px
}

.chat-head b {
  font-size: 14px
}

.chat-head small {
  display: block;
  color: #7b838c;
  font-size: 10px;
  margin-top: 3px
}

.chat-body {
  padding: 14px;
  max-height: 330px;
  overflow: auto;
  background: #fbfcfd
}

.chat-empty {
  text-align: center;
  color: #858c95;
  font-size: 11px;
  padding: 22px
}

.msg {
  display: flex;
  margin: 8px 0
}

.msg.public {
  justify-content: flex-end
}

.msg.admin {
  justify-content: flex-start
}

.msg-bubble {
  max-width: 78%;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.45;
  border: 1px solid #e3e6ea;
  background: #fff
}

.msg.public .msg-bubble {
  background: #fff0f1;
  border-color: #f0c9cc;
  color: #5e2529
}

.msg.admin .msg-bubble {
  background: #edf4ff;
  border-color: #d4e2f7;
  color: #23456f
}

.msg-meta {
  font-size: 9px;
  color: #8a9199;
  margin-top: 4px
}

.chat-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid #e7e9ed;
  background: #fff
}

.chat-form textarea {
  flex: 1;
  min-height: 44px;
  max-height: 110px;
  resize: vertical;
  border: 1px solid #dfe2e7;
  border-radius: 9px;
  padding: 10px;
  outline: none
}

.chat-form textarea:focus {
  border-color: #d95d63;
  box-shadow: 0 0 0 3px rgba(227, 38, 45, .08)
}

.chat-form .btn {
  align-self: flex-end;
  white-space: nowrap
}

.chat-note {
  padding: 8px 14px;
  color: #7b838c;
  font-size: 9px;
  background: #fff;
  border-top: 1px solid #f0f1f3
}

.personal-data-fields,
.personalData,
#personalData,
#dadosPessoais,
#personalFields {
  display: block;
}

.security-key-box {
  margin-top: 18px;
  padding: 18px 20px;
  border: 1px solid #eadfe1;
  border-radius: 14px;
  background: linear-gradient(180deg, #fffafa 0%, #fafbfc 100%);
  box-shadow: 0 5px 16px rgba(20, 20, 20, .05)
}

.security-key-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  color: #b5121b;
  margin-bottom: 7px
}

.security-key-consult {
  font-size: 11px;
  line-height: 1.55;
  color: #4f5660;
  margin: 0 0 12px
}

.security-key-consult strong {
  color: #20252b
}

.security-key-box input {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 12px;
  border: 1px solid #dfe3e8;
  border-radius: 9px;
  background: #fff;
  transition: border-color .18s, box-shadow .18s
}

.security-key-box input:focus {
  border-color: #d71920;
  box-shadow: 0 0 0 3px rgba(215, 25, 32, .10);
  outline: none
}

.security-key-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 9px;
  border-radius: 999px;
  background: #fff0f1;
  color: #b5121b;
  font-size: 10px;
  font-weight: 800;
  margin-bottom: 12px
}

.security-key-rules {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px
}

.security-key-rule {
  font-size: 10px;
  padding: 4px 7px;
  border-radius: 999px;
  background: #f0f2f4;
  color: #69717b;
  border: 1px solid #e5e8eb;
  transition: all .18s ease
}

.security-key-rule.ok {
  background: #e8f7ee !important;
  color: #137a45 !important;
  border: 1px solid #bfe8ce
}

.security-key-box input.rule-ok {
  border-color: #37a96b !important;
  box-shadow: 0 0 0 3px rgba(55, 169, 107, .10) !important
}

.security-key-box input.rule-error {
  border-color: #d71920 !important;
  box-shadow: 0 0 0 3px rgba(215, 25, 32, .08) !important
}

.security-key-instruction {
  font-size: 11px;
  line-height: 1.55;
  color: #4f5660;
  margin: 0 0 14px
}

.identity-fields {
  margin-top: 12px
}

.anonymous-toggle {
  display: flex !important;
  align-items: flex-start !important;
  gap: 10px !important;
  padding: 12px 13px;
  border: 1px solid #e1e5e9;
  border-radius: 11px;
  background: #fff;
  cursor: pointer;
  margin: 0 !important
}

.anonymous-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none
}

.anon-check {
  width: 18px;
  height: 18px;
  border: 2px solid #b9c0c7;
  border-radius: 5px;
  background: #fff;
  position: relative;
  flex: none
}

.anonymous-toggle input:checked+.anon-check {
  background: #c91620;
  border-color: #c91620
}

.anonymous-toggle input:checked+.anon-check:after {
  content: "✓";
  color: #fff;
  font-weight: 800;
  position: absolute;
  left: 3px;
  top: -2px;
  font-size: 14px
}

.anon-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: #272d34
}

.anon-copy strong {
  font-size: 12px
}

.anon-copy small {
  font-size: 10px;
  color: #737b84
}

.personal-data-box {
  margin-top: 12px;
  padding: 15px;
  border: 1px solid #e2e6eb;
  border-radius: 12px;
  background: #fff
}

.personal-title {
  font-size: 13px;
  font-weight: 800;
  color: #252b32
}

.personal-help {
  font-size: 10px;
  color: #707983;
  margin: 3px 0 12px
}

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

.personal-grid>div>label {
  display: block;
  font-size: 10px;
  font-weight: 800;
  color: #424950;
  margin-bottom: 5px
}

.optional {
  font-weight: 500;
  color: #8a929a
}

.personal-data-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 11px;
  border: 1px solid #dce1e6;
  border-radius: 8px;
  background: #fcfdfe
}

.personal-data-input:focus {
  outline: none;
  border-color: #c91620;
  box-shadow: 0 0 0 3px rgba(201, 22, 32, .09)
}

.privacy-ok {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #edf8f1;
  color: #247344;
  font-size: 10px
}

@media(max-width:640px) {
  .personal-grid {
    grid-template-columns: 1fr
  }
}

.dashboard-filters {
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
  border: 1px solid #e7e9ed;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(24, 28, 35, .06);
  padding: 22px;
}

.dash-filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.dash-filter-head h3 {
  font-size: 17px;
  color: #20242a
}

.dash-filter-head .muted {
  font-size: 12px
}

.dash-filter-head .link {
  border: 1px solid #e1e4e8;
  background: #fff;
  border-radius: 9px;
  padding: 8px 12px;
  font-weight: 800;
  color: #555d67;
  cursor: pointer;
}

.dash-filter-head .link:hover {
  background: #f7f8fa;
  color: #b9141b
}

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

.dash-filter-grid label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #4d5560;
  font-size: 12px;
  font-weight: 800;
}

.dash-filter-grid select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #dfe3e8;
  border-radius: 10px;
  background: #fff;
  padding: 0 13px;
  color: #292e34;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 7px rgba(20, 25, 30, .04);
}

.dash-filter-grid select:focus {
  outline: 2px solid rgba(185, 20, 27, .13);
  border-color: #b9141b;
}

.dashboard-graphs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.dashboard-graph-card {
  background: #fff;
  border: 1px solid #e7e9ed;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 8px 24px rgba(24, 28, 35, .055);
  min-width: 0;
}

.dashboard-graph-card.full {
  grid-column: 1/-1
}

.dashboard-graph-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.dashboard-graph-title b {
  font-size: 15px;
  color: #252a30
}

.dashboard-graph-title span {
  font-size: 12px;
  color: #7a818b;
  font-weight: 700
}

.dash-vchart {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  min-height: 235px;
  padding: 10px 6px 0;
  border-bottom: 1px solid #e6e8eb;
  overflow-x: auto;
}

.dash-vitem {
  flex: 1 0 58px;
  min-width: 58px;
  max-width: 110px;
  height: 215px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 7px;
}

.dash-vvalue {
  font-size: 12px;
  font-weight: 900;
  color: #4a515a
}

.dash-vbar-wrap {
  width: 100%;
  height: 165px;
  display: flex;
  align-items: flex-end;
}

.dash-vbar {
  width: 100%;
  min-height: 5px;
  border-radius: 8px 8px 2px 2px;
  background: linear-gradient(180deg, #e3262d 0%, #b9141b 100%);
  box-shadow: 0 5px 12px rgba(185, 20, 27, .16);
  transition: height .25s ease;
}

.dash-vlabel {
  width: 100%;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: #606873;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-hchart {
  display: flex;
  flex-direction: column;
  gap: 14px
}

.dash-hrow {
  display: grid;
  grid-template-columns: minmax(110px, 150px) 1fr 30px;
  align-items: center;
  gap: 10px;
}

.dash-hlabel {
  font-size: 11px;
  font-weight: 700;
  color: #606873;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-htrack {
  height: 12px;
  background: #f0f2f4;
  border-radius: 999px;
  overflow: hidden;
}

.dash-hfill {
  height: 100%;
  min-width: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #b9141b, #e3262d);
  transition: width .25s ease;
}

.dash-hvalue {
  font-size: 12px;
  font-weight: 900;
  color: #4a515a;
  text-align: right
}

.dash-empty {
  min-height: 170px;
  display: grid;
  place-items: center;
  text-align: center;
  color: #858c95;
  font-size: 13px;
  font-weight: 700;
}

@media(max-width:900px) {
  .dashboard-graphs {
    grid-template-columns: 1fr
  }

  .dashboard-graph-card.full {
    grid-column: auto
  }
}

@media(max-width:650px) {
  .dash-filter-grid {
    grid-template-columns: 1fr
  }

  .dash-filter-head {
    align-items: flex-start;
    flex-direction: column
  }

  .dashboard-graph-card {
    padding: 16px
  }
}

.protocol-highlight {
  margin: 16px auto 18px;
  padding: 15px 18px;
  border: 2px solid #d71920;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff7f7 0%, #fff 100%);
  text-align: center;
  box-shadow: 0 5px 16px rgba(215, 25, 32, .08)
}

.protocol-highlight-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #7a3034;
  margin-bottom: 5px
}

.protocol-highlight-number {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: .08em;
  color: #b5121b;
  word-break: break-word
}

.protocol-highlight-help {
  font-size: 10px;
  color: #606873;
  margin-top: 6px
}

.security-save-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(18, 22, 28, .58);
  backdrop-filter: blur(5px);
  animation: securityOverlayIn .18s ease-out
}

.security-save-modal {
  width: min(520px, calc(100vw - 36px));
  box-sizing: border-box;
  background: #fff;
  border-radius: 18px;
  padding: 30px 28px 26px;
  text-align: center;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
  border: 1px solid #e5e8ec;
  animation: securityModalIn .22s ease-out
}

.security-save-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e8f8ef;
  color: #118548;
  font-size: 34px;
  font-weight: 900
}

.security-save-modal h3 {
  margin: 0 0 8px;
  color: #116b3b;
  font-size: 22px
}

.security-save-modal p {
  margin: 0 auto 18px;
  max-width: 430px;
  color: #5b636c;
  font-size: 13px;
  line-height: 1.6
}

.security-save-protocol {
  display: inline-block;
  padding: 11px 16px;
  margin-bottom: 20px;
  border-radius: 10px;
  background: #f6f8fa;
  border: 1px solid #e0e5ea;
  color: #20262d;
  font-weight: 900;
  letter-spacing: .5px;
  font-size: 15px
}

.security-save-home {
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 13px 18px;
  cursor: pointer;
  background: #d71920;
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  box-shadow: 0 8px 18px rgba(215, 25, 32, .20)
}

.security-save-home:hover {
  filter: brightness(.96);
  transform: translateY(-1px)
}

@keyframes securityOverlayIn {
  from {
    opacity: 0
  }

  to {
    opacity: 1
  }
}

@keyframes securityModalIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(.98)
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1)
  }
}

.full-date-input {
  cursor: pointer
}

.full-date-input::-webkit-calendar-picker-indicator {
  cursor: pointer
}

.security-save-key {
  margin: 0 auto 18px;
  max-width: 360px;
  padding: 13px 16px;
  border: 1px solid #dce9df;
  border-radius: 10px;
  background: #f3faf5;
  color: #146c3d;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-sizing: border-box;
}

.security-save-key strong {
  font-size: 13px;
  font-weight: 800;
}

.security-save-key span {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 2px;
}

#newSecurityKey,
#newSecurityKeyConfirm {
  -webkit-text-security: disc;
}

.track-page-header {
  width: 100%;
  box-sizing: border-box;
  min-height: 78px;
  padding: 16px 34px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border-bottom: 1px solid #e7e9ed;
  box-shadow: 0 2px 10px rgba(20, 25, 35, .06)
}

.track-page-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #df1720;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 22px;
  box-shadow: 0 5px 14px rgba(223, 23, 32, .20)
}

.track-page-title {
  margin: 0;
  font-size: 20px;
  line-height: 1.15;
  font-weight: 800;
  color: #111827
}

.track-page-subtitle {
  margin: 4px 0 0;
  font-size: 12px;
  color: #687385
}

.track-page-content {
  width: 100%;
  box-sizing: border-box;
  padding: 28px 20px 44px
}

.legal-warning-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(20, 23, 28, .62);
  backdrop-filter: blur(5px);
}

.legal-warning-modal {
  width: min(720px, calc(100vw - 32px));
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border: 1px solid #e3e6ea;
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .30);
  padding: 28px;
}

.legal-warning-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 12px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff0f1;
  color: #b9141b;
  font-size: 27px;
  font-weight: 900;
}

.legal-warning-modal h3 {
  margin: 0 0 12px;
  text-align: center;
  color: #252a30;
  font-size: 21px;
}

.legal-warning-text {
  margin: 0;
  background: #fff8f8;
  border: 1px solid #f0c9cc;
  border-radius: 12px;
  padding: 16px;
  color: #3f464e;
  font-size: 13px;
  line-height: 1.65;
}

.legal-warning-check {
  display: flex !important;
  align-items: flex-start !important;
  gap: 10px !important;
  margin: 18px 0 0 !important;
  padding: 12px 13px !important;
  border: 1px solid #e1e5e9 !important;
  border-radius: 11px !important;
  background: #fff !important;
  cursor: pointer;
}

.legal-warning-check input {
  width: 18px !important;
  height: 18px !important;
  flex: none;
  margin: 2px 0 0 !important;
  accent-color: #c91620;
}

.legal-warning-check span {
  font-size: 12px !important;
  line-height: 1.45 !important;
  color: #272d34 !important
}

.legal-warning-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px
}

.legal-warning-cancel {
  border: 1px solid #dfe2e7;
  background: #fff;
  color: #59616b;
  border-radius: 9px;
  padding: 11px 16px;
  font-weight: 800;
  cursor: pointer;
}

.legal-warning-confirm {
  border: 0;
  background: linear-gradient(135deg, #b9141b, #e3262d);
  color: #fff;
  border-radius: 9px;
  padding: 11px 17px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 7px 17px rgba(227, 38, 45, .18);
}

.legal-warning-confirm:disabled {
  opacity: .5;
  cursor: not-allowed;
  box-shadow: none
}

@media(max-width:600px) {
  .legal-warning-modal {
    padding: 20px
  }

  .legal-warning-actions {
    flex-direction: column-reverse
  }

  .legal-warning-cancel,
  .legal-warning-confirm {
    width: 100%
  }
}

.tipo-ocorrencia-custom {
  position: relative;
  width: 100%;
}

.tipo-ocorrencia-button {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 13px;
  border: 1px solid #d9dee5;
  border-radius: 8px;
  background: #fff;
  color: #252a31;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.tipo-ocorrencia-button:hover,
.tipo-ocorrencia-custom.aberto .tipo-ocorrencia-button {
  border-color: #b9141b;
  box-shadow: 0 0 0 3px rgba(185, 20, 27, .10);
}

.tipo-ocorrencia-button b {
  color: #b9141b;
  font-size: 16px;
}

.tipo-ocorrencia-options {
  position: absolute;
  z-index: 99999;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  display: none;
  max-height: 390px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid #d9dee5;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 10px 25px rgba(0, 0, 0, .16);
}

.tipo-ocorrencia-custom.aberto .tipo-ocorrencia-options {
  display: block;
}

.tipo-ocorrencia-option {
  display: block;
  padding: 10px 12px;
  border-radius: 7px;
  cursor: pointer;
}

.tipo-ocorrencia-option:hover,
.tipo-ocorrencia-option:focus {
  background: #fff3f3;
}

.tipo-ocorrencia-option strong {
  display: block;
  color: #252a31;
  font-size: 14px;
}

.tipo-ocorrencia-option small {
  display: none;
  margin-top: 5px;
  color: #626b75;
  font-size: 12px;
  line-height: 1.45;
}

.tipo-ocorrencia-option:hover small,
.tipo-ocorrencia-option:focus small {
  display: block;
}

/* Lista de denúncias: filtros, atualização e indicadores de chat */
/* ============================================================
   LISTAGEM DE DENÚNCIAS
   Filtros, tabela, indicadores de novas atualizações e status.
   ============================================================ */
.report-filters {
  margin-bottom: 18px;
}

.report-filter-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.report-filter-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 12px;
}

.report-filter-grid label {
  margin: 0;
}

.report-filter-grid select {
  width: 100%;
}

.table-scroll {
  overflow-x: auto;
  width: 100%;
}

.report-unread-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 7px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #b42318;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  vertical-align: middle;
  white-space: nowrap;
}

.report-unread-badge.hidden {
  display: none;
}

.report-update-preview {
  min-width: 170px;
  max-width: 250px;
}

.report-update-preview b {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #626b75;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.report-update-preview small {
  display: block;
  margin-top: 3px;
  color: #8a9098;
  font-size: 10px;
}

.report-update-preview.is-unread b {
  color: #252a31;
  font-weight: 700;
}

/* ============================================================
   RESPONSIVIDADE
   Ajustes para telas menores.
   ============================================================ */
@media (max-width: 1050px) {
  .report-filter-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
}

@media (max-width: 650px) {
  .report-filter-head {
    flex-direction: column;
  }

  .report-filter-grid {
    grid-template-columns: 1fr;
  }
}

/* Indicador de denúncia nova: permanece até a primeira abertura do protocolo. */
.report-unread-badge.is-new {
  font-weight: 800;
  letter-spacing: .02em;
}

/* Estado das alterações da denúncia */
.report-save-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

.report-save-state {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  font-size: 13px;
  font-weight: 700;
}

.report-save-state.pending {
  color: #666;
}

.report-save-state.saved {
  color: #c1121f;
}

.report-save-row .btn:disabled {
  opacity: .65;
  cursor: wait;
}