
* {
  box-sizing: border-box;
}

:root {
  --bg: #f1f5f9;
  --navy: #071b2f;
  --navy2: #0d2947;
  --blue: #1254a1;
  --blue-light: #e9f2ff;
  --green: #16865b;
  --green-light: #eaf8f2;
  --orange: #d97706;
  --red: #b42318;
  --text: #152238;
  --muted: #64748b;
  --white: #ffffff;
  --border: #dbe3ec;
  --shadow: 0 16px 45px rgba(15, 38, 62, .10);
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family:
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background:
    radial-gradient(circle at top,
      #ffffff 0%,
      #f3f6fa 48%,
      #e7edf4 100%);
  color: var(--text);
}

body {
  min-height: 100vh;
}

button {
  font-family: inherit;
}

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topo {
  min-height: 98px;
  background:
    linear-gradient(135deg, #051526, #0c2948);
  color: white;
  display: grid;
  grid-template-columns: 86px 1fr 86px;
  align-items: center;
  padding: 10px 28px;
  box-shadow: 0 6px 24px rgba(3, 20, 36, .24);
}

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

.brasao-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.28);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  letter-spacing: .5px;
  background: rgba(255,255,255,.08);
  box-shadow:
    inset 0 0 14px rgba(255,255,255,.08),
    0 4px 14px rgba(0,0,0,.24);
}

.titulo-institucional {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.titulo-institucional strong {
  font-size: 19px;
  letter-spacing: .9px;
}

.titulo-institucional span {
  font-size: 13px;
  opacity: .8;
}

.conteudo {
  flex: 1;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 42px 24px 90px;
}

.titulo-pagina {
  text-align: center;
  margin-bottom: 36px;
}

.titulo-pagina h1 {
  margin: 0;
  font-size: clamp(29px, 4vw, 44px);
  color: var(--navy);
  letter-spacing: -.8px;
}

.titulo-pagina p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.setores-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.setor-card {
  min-height: 240px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.94);
  border-radius: 28px;
  padding: 30px;
  cursor: pointer;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 22px;
  align-items: center;
  text-align: left;
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    border-color .18s ease;
}

.setor-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 55px rgba(15,38,62,.15);
}

.setor-vtr:hover {
  border-color: #74a8e3;
}

.setor-publico:hover {
  border-color: #70c5a2;
}

.setor-icone {
  width: 96px;
  height: 96px;
  border-radius: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 50px;
}

.setor-vtr .setor-icone {
  background: var(--blue-light);
}

.setor-publico .setor-icone {
  background: var(--green-light);
}

.setor-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.setor-info strong {
  font-size: 25px;
  color: var(--navy);
}

.setor-info span {
  color: var(--muted);
  font-size: 15px;
}

.contador {
  min-width: 90px;
  text-align: center;
}

.contador span {
  display: block;
  font-size: 42px;
  font-weight: 900;
  color: var(--navy);
}

.contador small {
  color: var(--muted);
}

.oculto {
  display: none !important;
}

.tela-setor {
  position: relative;
}

.voltar {
  border: none;
  background: transparent;
  color: var(--blue);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  padding: 10px 0;
  margin-bottom: 8px;
}

.icone-grande {
  font-size: 55px;
  margin-bottom: 8px;
}

.opcoes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.opcao {
  min-height: 210px;
  border: 1px solid var(--border);
  border-radius: 26px;
  background: white;
  box-shadow: var(--shadow);
  cursor: pointer;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: center;
  justify-content: center;
  transition:
    transform .16s ease,
    border-color .16s ease,
    box-shadow .16s ease;
}

.opcao:hover {
  transform: translateY(-4px);
  border-color: #9ab7d6;
  box-shadow: 0 23px 50px rgba(15,38,62,.14);
}

.opcao:active {
  transform: scale(.98);
}

.opcao-icone {
  font-size: 54px;
  min-height: 62px;
  display: flex;
  align-items: center;
}

.opcao strong {
  font-size: 20px;
  color: var(--navy);
}

.prioridade-area {
  display: flex;
  justify-content: center;
  margin: -12px 0 28px;
}

.btn-prioridade {
  border: 2px solid #f3c36b;
  background: #fff9e8;
  color: #8a5500;
  border-radius: 50px;
  padding: 15px 26px;
  cursor: pointer;
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 15px;
  transition: .18s;
}

.btn-prioridade.ativa {
  background: #fff0bd;
  border-color: #d28b00;
  box-shadow: 0 7px 22px rgba(210,139,0,.18);
}

.statusbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  min-height: 48px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  font-size: 13px;
  color: var(--muted);
}

.status-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #d97706;
  margin-right: 7px;
}

.status-dot.online {
  background: #16a34a;
  box-shadow: 0 0 0 4px rgba(22,163,74,.10);
}

.status-dot.offline {
  background: #dc2626;
}

.relogio {
  font-variant-numeric: tabular-nums;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(3, 15, 27, .62);
  backdrop-filter: blur(7px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.modal-card {
  width: min(430px, 100%);
  background: white;
  border-radius: 30px;
  padding: 36px 30px;
  box-shadow: 0 30px 90px rgba(0,0,0,.28);
  text-align: center;
  animation: modalEntrada .2s ease;
}

@keyframes modalEntrada {
  from {
    transform: scale(.93);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.check {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: #e8f7ef;
  color: #16865b;
  margin: 0 auto 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 900;
}

.modal-label {
  display: block;
  font-size: 13px;
  letter-spacing: 1.6px;
  color: var(--muted);
  font-weight: 800;
}

.senha-numero {
  font-size: 74px;
  line-height: 1;
  margin: 18px 0 14px;
  color: var(--navy);
  font-weight: 950;
  letter-spacing: 2px;
}

.senha-tipo {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.senha-prioridade {
  display: inline-block;
  margin-top: 13px;
  padding: 8px 14px;
  background: #fff3c4;
  color: #8a5500;
  border-radius: 20px;
  font-weight: 800;
  font-size: 13px;
}

.modal-msg {
  color: var(--muted);
  margin: 24px 0;
  font-size: 14px;
}

.modal-card button {
  width: 100%;
  min-height: 52px;
  background: var(--navy);
  color: white;
  border: none;
  border-radius: 15px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

.toast {
  position: fixed;
  top: 118px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: #10243a;
  color: white;
  border-radius: 14px;
  padding: 12px 18px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: .2s;
  z-index: 1200;
  box-shadow: 0 12px 35px rgba(0,0,0,.22);
}

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

/* =====================================================
   TABLET
===================================================== */

@media (max-width: 900px) {

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

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

  .opcao {
    min-height: 135px;
    flex-direction: row;
    justify-content: flex-start;
    padding: 25px;
    text-align: left;
  }

  .opcao-icone {
    width: 65px;
    font-size: 43px;
  }

}

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

@media (max-width: 600px) {

  .topo {
    min-height: 78px;
    grid-template-columns: 56px 1fr 56px;
    padding: 7px 10px;
  }

  .brasao-placeholder {
    width: 47px;
    height: 47px;
    font-size: 11px;
  }

  .titulo-institucional strong {
    font-size: 14px;
  }

  .titulo-institucional span {
    font-size: 10px;
  }

  .conteudo {
    padding: 28px 14px 80px;
  }

  .titulo-pagina {
    margin-bottom: 24px;
  }

  .titulo-pagina h1 {
    font-size: 30px;
  }

  .titulo-pagina p {
    font-size: 14px;
  }

  .setor-card {
    min-height: 155px;
    border-radius: 23px;
    padding: 20px;
    grid-template-columns: 65px 1fr;
    gap: 15px;
  }

  .setor-icone {
    width: 65px;
    height: 65px;
    border-radius: 18px;
    font-size: 34px;
  }

  .setor-info strong {
    font-size: 19px;
  }

  .setor-info span {
    font-size: 12px;
  }

  .contador {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 7px;
    text-align: left;
    min-width: 0;
    padding-left: 80px;
    margin-top: -20px;
  }

  .contador span {
    font-size: 18px;
  }

  .contador small {
    font-size: 11px;
  }

  .opcao {
    min-height: 105px;
    border-radius: 20px;
    padding: 18px;
    gap: 12px;
  }

  .opcao-icone {
    width: 52px;
    min-height: 40px;
    font-size: 35px;
  }

  .opcao strong {
    font-size: 17px;
  }

  .icone-grande {
    font-size: 45px;
  }

  .senha-numero {
    font-size: 62px;
  }

  .statusbar {
    padding: 0 12px;
    font-size: 11px;
  }

}


/* =====================================================
   TS SENHAS — LOGOS REAIS NO CABEÇALHO DA EMISSÃO
   ===================================================== */

.topo .brasao {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

.topo .logo-cabecalho {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.topo .brasao-pcpi {
  width: 76px !important;
  height: 76px !important;
}

.topo .brasao-piaui {
  width: 105px !important;
  height: 76px !important;
}

.topo .logo-pcpi {
  filter:
    drop-shadow(0 3px 6px rgba(0,0,0,.35))
    drop-shadow(0 0 6px rgba(255,215,90,.22));
}

.topo .logo-ts {
  filter:
    drop-shadow(0 3px 6px rgba(0,0,0,.35))
    drop-shadow(0 0 8px rgba(57,255,20,.28));
}

@media (max-width: 600px) {

  .topo .brasao-pcpi {
    width: 52px !important;
    height: 52px !important;
  }

  .topo .brasao-piaui {
    width: 72px !important;
    height: 52px !important;
  }
}

