/* Portal de Chamados — identidade visual Prefeitura de Cambuí (complementa o Tailwind CDN) */

:root {
  /* >>> CORES DA MARCA — troque os 2 valores abaixo se tiver o hex oficial <<< */
  --brand:       #2a4b9b;   /* azul institucional (cor principal) */
  --accent:      #c0392b;   /* vermelho heráldico (detalhes/realce) */

  /* derivadas (normalmente não precisa mexer) */
  --brand-dark:  #1e3a7a;
  --brand-soft:  #eaf0fb;
  --accent-dark: #a12f24;
  --ink:         #1b2733;
  --paper:       #f4f6f9;
}

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Libre Franklin', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

/* fundo com leve profundidade */
.bg-portal {
  background:
    radial-gradient(1200px 480px at 100% -10%, rgba(42,75,155,.08), transparent 60%),
    radial-gradient(900px 420px at -10% 110%, rgba(42,75,155,.05), transparent 60%),
    var(--paper);
}

/* ---- Barra de cabeçalho (azul institucional) ---- */
.brand-bar {
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand-dark) 100%);
  border-bottom: 3px solid var(--accent);
}
.brand-logo { height: 64px; width: auto; display: block; flex-shrink: 0; }
/* o logo é largo (brasão + nome): no celular diminui para não empurrar o menu */
@media (max-width: 640px) {
  .brand-logo { height: 42px; }
}
/* em telas bem estreitas o próprio logo já diz "Prefeitura de Cambuí":
   esconde o texto ao lado dele para o menu não estourar a largura */
@media (max-width: 480px) {
  .brand-bar a > span { display: none; }
}
.brand-link { color: rgba(255,255,255,.92); }
.brand-link:hover { color: #fff; }

/* ---- Botões ---- */
.btn-brand {
  background: var(--brand);
  transition: background .15s ease, transform .05s ease;
}
.btn-brand:hover  { background: var(--brand-dark); }
.btn-brand:active { transform: translateY(1px); }

/* faixa/acentos dourados */
.accent-bar { background: var(--accent); }
.text-accent { color: var(--accent); }

/* foco acessível */
.focus-ring:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(42,75,155,.18);
}

/* cards da home */
.card-tile {
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.card-tile:hover {
  transform: translateY(-3px);
  border-color: var(--brand);
  box-shadow: 0 12px 28px -12px rgba(42,75,155,.40);
}

/* rodapé institucional */
.brand-footer {
  background: var(--brand-dark);
  color: rgba(255,255,255,.85);
}
.brand-footer a { color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .card-tile, .btn-brand { transition: none; }
  .card-tile:hover { transform: none; }
}

/* ---- Avisos de resposta da TI (canto da tela) ---- */
.toast-wrap {
  position: fixed;
  top: 96px;            /* abaixo da barra azul do cabeçalho */
  right: 16px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;  /* só os cartões recebem clique */
}
.toast {
  pointer-events: auto;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-left: 4px solid var(--accent);
  border-radius: 14px;
  box-shadow: 0 14px 34px -14px rgba(16, 24, 40, .45);
  padding: 14px;
  animation: toast-in .25s ease-out;
}
.toast.out { animation: toast-out .2s ease-in forwards; }
.toast-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 999px;
  flex-shrink: 0;
  background: var(--brand-soft);
  color: var(--brand);
}
.toast-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  text-decoration: underline;
}
.toast-link:hover { color: var(--brand-dark); }
.toast-close {
  flex-shrink: 0;
  width: 24px; height: 24px;
  border-radius: 999px;
  line-height: 1;
  font-size: 18px;
  color: #94a3b8;
}
.toast-close:hover { background: #f1f5f9; color: #475569; }

/* no celular os avisos ficam no rodapé, onde não cobrem o conteúdo */
@media (max-width: 640px) {
  .toast-wrap { top: auto; bottom: 16px; left: 16px; right: 16px; width: auto; }
}

@keyframes toast-in  { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(14px); } }

@media (prefers-reduced-motion: reduce) {
  .toast, .toast.out { animation: none; }
}

/* conteúdo HTML vindo do GLPI (descrição/atualizações) */
.rich-content img { max-width: 100%; height: auto; border-radius: 6px; }
.rich-content table { max-width: 100%; }
.rich-content a { color: var(--brand); text-decoration: underline; }
.rich-content p { margin: 0 0 8px; }
.rich-content p:last-child { margin-bottom: 0; }
