/* ==========================================================================
   Chamados de TI — estilo (gabarito mo-consolidado, prefixo ct-)
   ========================================================================== */

:root {
  --ct-bg: #f4f5f9;
  --ct-card: #ffffff;
  --ct-border: #e3e6ef;
  --ct-text: #1f2937;
  --ct-muted: #6b7280;
  --ct-primary: #e20380;   /* magenta MAXI */
  --ct-primary-soft: #fde7f3;
  --ct-positive: #16a34a;
  --ct-negative: #dc2626;
  --ct-row-hover: #f9fafb;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--ct-bg);
  color: var(--ct-text);
  margin: 0;
  padding: 0;
}
body.ct-guard { visibility: hidden; }
body.acesso-permitido { visibility: visible; }

.ct-layout {
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px 24px 64px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ------ Hero ------ */
.page-hero {
  background: var(--ct-card);
  border: 1px solid var(--ct-border);
  border-radius: 12px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.page-hero .eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ct-primary);
  background: var(--ct-primary-soft);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 6px;
}
.page-hero h1 { font-size: 24px; font-weight: 700; margin: 4px 0 6px; }
.page-hero p  { color: var(--ct-muted); margin: 0; font-size: 14px; }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ------ Botões ------ */
.btn-primary, .btn-secondary, .btn-ghost {
  font-family: inherit;
  font-weight: 600;
  font-size: 13px;
  border-radius: 8px;
  padding: 10px 16px;
  cursor: pointer;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background .15s, border .15s;
}
.btn-primary  { background: var(--ct-primary); color: white; }
.btn-primary:hover  { background: #c00270; }
.btn-primary:disabled { opacity: .6; cursor: default; }
.btn-secondary { background: var(--ct-card); color: var(--ct-text); border-color: var(--ct-border); }
.btn-secondary:hover { background: #f5f7fb; }
.btn-ghost { background: none; color: var(--ct-muted); padding: 6px 10px; }
.btn-ghost:hover { color: var(--ct-text); }

/* ------ Filtros (caixas de seleção múltipla) ------
   Cada grupo é um role="group" de checkboxes desenhados como chips. O input
   fica visualmente escondido mas continua no fluxo de foco e de teclado —
   é ele que o leitor de tela anuncia, e o <span> ao lado é só a pintura.
   Nenhuma marcada = todas.

   Grupo é <div role="group">, e não <fieldset>/<legend>: o <legend> não entra
   como item de flex (o navegador o posiciona na área da borda do fieldset), e
   o rótulo não para ao lado dos chips de forma previsível entre navegadores. */
.ct-filters {
  background: var(--ct-card);
  border: 1px solid var(--ct-border);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ct-grupo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.ct-grupo-rotulo {
  flex: none;
  width: 78px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ct-muted);
}

.ct-opcao { position: relative; display: inline-flex; }
.ct-opcao input {
  position: absolute;
  inset: 0;                 /* cobre exatamente o chip — com width/height em
                               % a caixa pode passar do rótulo e roubar o
                               clique do chip vizinho */
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
.ct-opcao span {
  display: inline-flex;
  align-items: center;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ct-text);
  background: var(--ct-card);
  border: 1px solid var(--ct-border);
  border-radius: 999px;
  padding: 5px 13px;
  cursor: pointer;
  user-select: none;
  transition: background .12s, border-color .12s, color .12s;
}
.ct-opcao:hover span { background: #f5f7fb; border-color: #cbd2e4; }
.ct-opcao input:checked + span {
  background: var(--ct-primary-soft);
  border-color: var(--ct-primary);
  color: #a30259;
  font-weight: 600;
}
/* Marcado também responde ao mouse: sem isto o chip já marcado é o único da
   fila que não dá sinal de que é clicável (para desmarcar). */
.ct-opcao:hover input:checked + span { background: #fbd5e9; }
.ct-opcao input:focus-visible + span {
  outline: 2px solid var(--ct-primary);
  outline-offset: 2px;
}

.ct-filtros-rodape {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  border-top: 1px solid var(--ct-border);
  padding-top: 12px;
}
.ct-busca {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--ct-muted);
  flex: 1 1 260px;
  max-width: 420px;
}
.ct-busca span { font-weight: 600; }
.ct-busca input {
  font-family: inherit;
  font-size: 13px;
  padding: 8px 10px;
  border: 1px solid var(--ct-border);
  border-radius: 8px;
  background: white;
  width: 100%;
  box-sizing: border-box;
}
.ct-filtros-rodape .btn-secondary { margin-left: auto; }
.ct-filtros-rodape .btn-secondary[hidden] { display: none; }

/* ------ Cards KPI ------ */
.ct-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}
.ct-card {
  background: var(--ct-card);
  border: 1px solid var(--ct-border);
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ct-card .label { font-size: 12px; color: var(--ct-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.ct-card .value { font-size: 24px; font-weight: 700; }
.ct-card .hint  { font-size: 12px; color: var(--ct-muted); }

/* ------ Seções ------ */
.ct-section {
  background: var(--ct-card);
  border: 1px solid var(--ct-border);
  border-radius: 12px;
  padding: 18px 22px;
}
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 12px;
  flex-wrap: wrap;
}
.section-header h2 { font-size: 16px; font-weight: 700; margin: 0; }
.section-header small { color: var(--ct-muted); font-size: 12px; }

/* ------ Abas (Evento × Internos) ------
   Uma aba por vez: empilhar as duas listas deixava a página comprida demais
   para uma tela de trabalho. O que está abaixo das abas — cartões, filtros,
   fila e métricas — pertence à aba aberta, e por isso elas ficam no topo. */
.ct-abas {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  background: var(--ct-card);
  border: 1px solid var(--ct-border);
  border-radius: 12px;
  padding: 6px;
}
.ct-aba {
  flex: 1 1 220px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ct-muted);
  background: none;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 11px 16px;
  cursor: pointer;
  transition: background .14s, color .14s, border-color .14s;
}
.ct-aba i { font-size: 13px; }
.ct-aba:hover { background: #f5f7fb; color: var(--ct-text); }
.ct-aba[aria-selected="true"] {
  background: var(--ct-primary-soft);
  border-color: var(--ct-primary);
  color: #a30259;
}
.ct-aba:focus-visible { outline: 2px solid var(--ct-primary); outline-offset: 2px; }

/* Contador do rótulo: o que está EM ABERTO naquela aba (aberto, visualizado
   e em atendimento) — é o que avisa que está chegando trabalho do lado que
   não se está olhando. Some quando é zero: um "0" permanente é ruído. */
.ct-aba-contador {
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ct-muted);
  background: #eef0f6;
}
.ct-aba[aria-selected="true"] .ct-aba-contador { color: white; background: var(--ct-primary); }
.ct-aba-contador[hidden] { display: none; }

/* ------ Painel da aba ------ */
.ct-bloco-fila[hidden] { display: none; }
.ct-bloco-nota { margin: 0 0 12px; font-size: 12px; color: var(--ct-muted); }
.ct-fila-meta .info { color: var(--ct-muted); font-size: 12px; font-variant-numeric: tabular-nums; }

/* Escopo ao lado do título das métricas — os números são de uma aba só. */
.ct-escopo {
  font-size: 12px;
  font-weight: 600;
  color: var(--ct-primary);
  background: var(--ct-primary-soft);
  border-radius: 999px;
  padding: 3px 10px;
  margin-left: 6px;
  vertical-align: middle;
}

/* ------ Tabela ------ */
.table-wrapper { overflow-x: auto; }
.ct-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.ct-table thead th {
  text-align: left;
  font-weight: 600;
  color: var(--ct-muted);
  padding: 10px 12px;
  border-bottom: 1px solid var(--ct-border);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.ct-table thead th.num { text-align: right; }
.ct-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--ct-border);
  vertical-align: middle;
}
.ct-table tbody td.num { text-align: right; font-variant-numeric: tabular-nums; }
.ct-table tbody tr.ct-linha { cursor: pointer; }
.ct-table tbody tr.ct-linha:hover { background: var(--ct-row-hover); }
.ct-table tbody td.empty { text-align: center; color: var(--ct-muted); padding: 24px; }

/* ------ Badges de status / prioridade ------
   Um sistema, duas regras:
   1) STATUS é sempre um chip NEUTRO com um ponto colorido. O estado se lê
      pelo ponto; a tabela inteira continua legível porque o texto não muda
      de cor a cada linha.
   2) PRIORIDADE só ganha cor quando pede ação (crítica e alta). Média e
      baixa ficam em texto discreto. Aqui cor significa "olhe para isto" —
      não "esta é outra categoria". Pintar tudo é o mesmo que não pintar
      nada: seis cores concorrendo viram ruído e nada salta.
*/
.ct-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
}
.ct-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--dot, #94a3b8);
  flex: none;
}
.ct-badge.st-aberto         { --dot: #f59e0b; }  /* pedindo atenção */
.ct-badge.st-visualizado    { --dot: #8b5cf6; }  /* TI já respondeu */
.ct-badge.st-em_atendimento { --dot: #3b82f6; }  /* em andamento */
.ct-badge.st-resolvido      { --dot: #10b981; }  /* concluído */
.ct-badge.st-fechado        { --dot: #94a3b8; }
.ct-badge.st-cancelado      { --dot: #cbd5e1; color: #94a3b8; }

.ct-badge.pr-critica { background: #fef2f2; border-color: #fecaca; color: #b91c1c; --dot: #dc2626; }
.ct-badge.pr-alta    { background: #fff7ed; border-color: #fed7aa; color: #c2410c; --dot: #ea580c; }
.ct-badge.pr-media,
.ct-badge.pr-baixa {
  background: transparent; border-color: transparent;
  color: var(--ct-muted); font-weight: 500; padding-left: 2px;
}
.ct-badge.pr-vazia {
  background: transparent; color: #94a3b8;
  border: 1px dashed #cbd5e1; font-weight: 500; padding-left: 10px;
}
.ct-badge.pr-media::before,
.ct-badge.pr-baixa::before,
.ct-badge.pr-vazia::before { display: none; }

/* ------ Fila: ao vivo, novos chamados e paginação ------ */
.ct-fila-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* Sinal discreto de que a tela se atualiza sozinha — sem ele o usuário
   fica sem saber se o que vê é atual (era a queixa: só atualizava no F5). */
.ct-live {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: var(--ct-muted);
}
.ct-live i {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ct-positive); flex: none;
  animation: ct-pulso 2.4s ease-in-out infinite;
}
.ct-live.pausado i { background: #cbd5e1; animation: none; }
@keyframes ct-pulso {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(22,163,74,.35); }
  50%      { opacity: .55; box-shadow: 0 0 0 5px rgba(22,163,74,0); }
}

.ct-novos {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; margin-bottom: 12px;
  font-family: inherit; font-size: 13px; font-weight: 600;
  color: #92400e; background: #fffbeb;
  border: 1px solid #fde68a; border-radius: 8px;
  padding: 10px 14px; cursor: pointer;
  animation: ct-desce .25s ease-out;
}
.ct-novos:hover { background: #fef3c7; }
.ct-novos[hidden] { display: none; }
@keyframes ct-desce { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* Linha recém-chegada: um flash âmbar que se apaga sozinho. */
@keyframes ct-flash { from { background: #fef9c3; } to { background: transparent; } }
.ct-table tbody tr.ct-novo { animation: ct-flash 3s ease-out; }

.ct-paginacao {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--ct-border);
  font-size: 12.5px; color: var(--ct-muted);
}
.ct-paginacao[hidden] { display: none; }
.ct-paginacao button { padding: 7px 13px; font-size: 12.5px; }
.ct-paginacao button:disabled { opacity: .45; cursor: default; }
.ct-paginacao .pag-info { font-variant-numeric: tabular-nums; }

/* ------ Detalhe inline (linha expansível sob a clicada) ------ */
.ct-detalhe-row > td { background: #fcfdff; padding: 0 !important; }
.ct-detalhe {
  padding: 16px 20px;
  border-left: 3px solid var(--ct-primary);
}
.ct-detalhe-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}
.ct-detalhe-head h3 { margin: 0; font-size: 15px; }
.ct-detalhe-head .meta { font-size: 12px; color: var(--ct-muted); margin-top: 3px; }
.ct-detalhe-descricao {
  background: #f8fafc;
  border: 1px solid var(--ct-border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  white-space: pre-wrap;
  margin-bottom: 12px;
}
.ct-detalhe-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
}
.ct-detalhe h4 {
  margin: 0 0 8px;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--ct-muted);
  letter-spacing: 0.04em;
}
/* A barra de ações carrega SÓ as transições de estado (assumir, resolver,
   fechar...). A classificação saiu daqui: espremida no fim da linha, brigava
   por espaço com os botões e ficava longe de onde se lê o chamado. */
.ct-acoes { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 10px 0 14px; }
.ct-acoes .fechar { margin-left: auto; }

/* Coluna da direita: blocos empilhados que preenchem a altura — antes o
   "Acompanhamento do solicitante" terminava no meio e deixava um vão. */
.ct-coluna { display: flex; flex-direction: column; gap: 12px; }
.ct-bloco {
  border: 1px solid var(--ct-border);
  border-radius: 10px;
  padding: 12px 14px;
  background: white;
}
.ct-bloco h4 { margin: 0 0 10px; }
.ct-bloco .codigo-acomp {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12.5px; background: #f8fafc;
  border: 1px dashed var(--ct-border); border-radius: 6px;
  padding: 6px 10px; display: inline-block; user-select: all;
}

.ct-classificar { display: flex; flex-direction: column; gap: 10px; }
.ct-classificar .campos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ct-classificar label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 11px; font-weight: 600; color: var(--ct-muted);
  text-transform: uppercase; letter-spacing: .04em;
}
.ct-classificar select {
  font-family: inherit; font-size: 13px; padding: 8px 10px;
  border: 1px solid var(--ct-border); border-radius: 8px; background: white;
  color: var(--ct-text);
}
.ct-classificar button { justify-content: center; }
@media (max-width: 700px) {
  .ct-classificar .campos { grid-template-columns: 1fr; }
}

/* Comentários */
.ct-comentarios { display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow-y: auto; }
.ct-comentario {
  border: 1px solid var(--ct-border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  background: white;
}
.ct-comentario.interno { background: #fffbeb; border-color: #fde68a; }
.ct-comentario .quem { font-weight: 600; font-size: 12px; }
.ct-comentario .quando { color: var(--ct-muted); font-weight: 400; }
.ct-comentario .tag-interno { color: #b45309; font-size: 11px; font-weight: 700; margin-left: 6px; }
.ct-comentario p { margin: 4px 0 0; white-space: pre-wrap; }
.ct-novo-comentario { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.ct-novo-comentario textarea {
  font-family: inherit;
  font-size: 13px;
  border: 1px solid var(--ct-border);
  border-radius: 8px;
  padding: 8px 10px;
  resize: vertical;
  min-height: 60px;
}
.ct-novo-comentario .linha { display: flex; align-items: center; gap: 12px; justify-content: flex-end; }
.ct-novo-comentario label.check { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ct-muted); }

/* Linha do tempo */
.ct-timeline { list-style: none; margin: 0; padding: 0; font-size: 12.5px; }
.ct-timeline li { padding: 5px 0; border-bottom: 1px dashed var(--ct-border); display: flex; gap: 8px; }
.ct-timeline li:last-child { border-bottom: none; }
.ct-timeline .quando { color: var(--ct-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ------ Métricas ------ */
.ct-metricas-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.ct-metricas-grid .table-wrapper { border: 1px solid var(--ct-border); border-radius: 10px; padding: 4px 8px; }
.ct-metricas-grid h4 { margin: 10px 8px 6px; font-size: 12px; text-transform: uppercase; color: var(--ct-muted); letter-spacing: 0.04em; }

/* ------ Toast / prompt ------ */
.ct-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 99999;
  background: #111827;
  color: white;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 13.5px;
  box-shadow: 0 10px 30px rgba(0,0,0,.3);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .2s, transform .2s;
}
.ct-toast.show { opacity: 1; transform: none; }
.ct-toast.erro { background: #b91c1c; }

.ct-modal {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
}
.ct-modal[hidden] { display: none; }
.ct-modal .backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.55); }
.ct-modal .panel {
  position: relative; background: white; border-radius: 12px;
  width: min(480px, 92vw); padding: 20px 22px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  display: flex; flex-direction: column; gap: 12px;
}
.ct-modal h3 { margin: 0; font-size: 15px; }
.ct-modal textarea {
  font-family: inherit; font-size: 13px;
  border: 1px solid var(--ct-border); border-radius: 8px;
  padding: 8px 10px; min-height: 70px; resize: vertical;
}
.ct-modal .acoes { display: flex; justify-content: flex-end; gap: 8px; }

/* Guia da tela: alvos que são contêineres transparentes (grid de cards,
   barra de botões) ganham fundo ao serem destacados — sem isso o overlay
   escuro do tour vaza pelos vãos entre os filhos. */
.ct-cards.gt-highlight, .hero-actions.gt-highlight {
  background: var(--ct-bg);
  padding: 8px;
}

/* ------ Página pública (abrir-chamado) ------ */
.ct-publico {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 20px 64px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ct-publico-header { text-align: center; padding: 8px 0 4px; }
.ct-publico-header img { height: 46px; }
.ct-publico-header h1 { font-size: 22px; margin: 12px 0 4px; }
.ct-publico-header p { color: var(--ct-muted); font-size: 14px; margin: 0; }
.ct-form { display: flex; flex-direction: column; gap: 12px; }
.ct-form .duas { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ct-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--ct-muted); font-weight: 600; }
.ct-form input, .ct-form select, .ct-form textarea {
  font-family: inherit;
  font-size: 14px;
  padding: 10px 12px;
  border: 1px solid var(--ct-border);
  border-radius: 8px;
  background: white;
}
.ct-form textarea { min-height: 110px; resize: vertical; }
.ct-form .obrigatorio::after { content: ' *'; color: var(--ct-negative); }
.ct-form .ct-grupo { display: flex; flex-direction: column; gap: 12px; }
.ct-form .ct-grupo[hidden] { display: none; }
.ct-hp { position: absolute; left: -9999px; top: -9999px; height: 0; overflow: hidden; }

/* Chips de exemplo do formulário de abertura (página pública). Nome parecido,
   coisa diferente dos chips de filtro da fila (.ct-opcao, lá em cima): estes
   são botões de exemplo que preenchem o campo, não caixas de seleção. */
.ct-exemplos {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  font-size: 12.5px; color: var(--ct-muted);
  margin-bottom: 14px;
}
.ct-chip {
  font-family: inherit; font-size: 12px; font-weight: 600;
  color: var(--ct-primary); background: var(--ct-primary-soft);
  border: 1px solid transparent; border-radius: 999px;
  padding: 5px 12px; cursor: pointer;
  transition: border .15s, background .15s;
}
.ct-chip:hover { border-color: var(--ct-primary); background: white; }

/* Avaliação (5 estrelas) na consulta pública */
.ct-estrelas { display: flex; gap: 4px; }
.ct-estrelas button {
  background: none; border: none; cursor: pointer;
  font-size: 24px; color: #d1d5db; padding: 2px;
  transition: color .1s, transform .1s;
}
.ct-estrelas button:hover { transform: scale(1.15); }
.ct-estrelas button.on { color: #f59e0b; }
.ct-avaliacao-feita {
  border: 1px solid #fde68a; background: #fffbeb;
  border-radius: 8px; padding: 8px 12px;
  font-size: 13px; margin: 8px 0;
}

.ct-sucesso {
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  border-radius: 12px;
  padding: 18px 20px;
}
.ct-sucesso h2 { margin: 0 0 6px; font-size: 17px; color: #15803d; }
.ct-sucesso .codigo {
  font-family: ui-monospace, Consolas, monospace;
  background: white;
  border: 1px dashed #86efac;
  border-radius: 8px;
  padding: 8px 12px;
  display: inline-block;
  margin: 8px 0;
  font-size: 13px;
  user-select: all;
}
.ct-acompanhamento { font-size: 13.5px; }
.ct-acompanhamento .linha-status { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0; }

@media (max-width: 900px) {
  .ct-cards { grid-template-columns: repeat(2, 1fr); }
  .ct-detalhe-grid, .ct-metricas-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .ct-cards { grid-template-columns: 1fr; }
  .ct-form .duas { grid-template-columns: 1fr; }
}

/* ── Fotos do chamado ──────────────────────────────────────────────────────
   O aviso troca de cor conforme o resultado: verde quando anexou, âmbar
   quando não. Não uso vermelho de propósito — foto que não subiu NÃO é erro
   do chamado, que foi aberto com sucesso; tratar como falha grave faria a
   pessoa achar que precisa abrir tudo de novo. */
.ct-fotos-ok { color: #15803d; font-size: 13px; margin: 6px 0 0; }
.ct-fotos-falhou { color: #b45309; font-size: 13px; margin: 6px 0 0; }
#bloco-fotos input[type="file"] { font-size: 13px; }

/* Miniaturas na fila do TI. `object-fit: cover` mantém a grade alinhada com
   foto de qualquer proporção — print de tela é deitado, foto de celular é em
   pé, e sem isso a lista fica serrilhada. */
.ct-anexos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ct-anexo {
  width: 104px; height: 104px; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--ct-borda, #e2e8f0); background: #f8fafc;
  display: block; cursor: zoom-in;
}
.ct-anexo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ct-anexo-erro {
  display: flex; align-items: center; justify-content: center;
  width: 104px; height: 104px; border-radius: 8px; font-size: 11px;
  border: 1px dashed #cbd5e1; color: #64748b; text-align: center; padding: 6px;
}
