:root {
  --fundo: #f5f5f4;
  --cartao: #ffffff;
  --borda: #e2e2e0;
  --texto: #171717;
  --texto-suave: #6b6b68;
  --primaria: #111111;
  --primaria-escura: #000000;
  --perigo: #b91c1c;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--fundo);
  color: var(--texto);
  font-size: 15px;
}
a { color: var(--texto); text-decoration: none; font-weight: 500; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

.topo { background: #0b0b0b; color: #fff; }
.logo-topo { height: 36px; display: block; }
.topo-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; gap: 24px; min-height: 56px; flex-wrap: wrap;
}
.marca { color: #fff; font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 12px; letter-spacing: .02em; }
.marca:hover { text-decoration: none; }
.marca .divisor { color: #52525b; font-weight: 400; }
.topo nav { display: flex; gap: 4px; flex: 1; }
.topo nav a {
  color: #a1a1aa; padding: 7px 14px; border-radius: 999px; font-weight: 500;
  transition: color .15s, background .15s;
}
.topo nav a:hover { color: #fff; background: #27272a; text-decoration: none; }
.topo nav a.ativo { color: #0b0b0b; background: #fff; font-weight: 600; }
.sessao { display: flex; align-items: center; gap: 12px; }
.quem { color: #e2e8f0; font-size: 14px; }
.quem small { color: #94a3b8; }

.conteudo { max-width: 1100px; margin: 28px auto; padding: 0 20px; }

.cartao {
  background: var(--cartao); border: 1px solid var(--borda);
  border-radius: 14px; padding: 24px; margin-bottom: 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}
.cartao-estreito { max-width: 420px; margin: 60px auto; }

h1 { font-size: 22px; margin: 0 0 16px; }
h2 { font-size: 17px; margin: 0 0 12px; }

.cabecalho-pagina {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 18px; flex-wrap: wrap;
}
.cabecalho-pagina h1 { margin: 0; }

label { display: block; font-weight: 600; font-size: 13px; margin: 12px 0 4px; }
input[type=text], input[type=email], input[type=password], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--borda);
  border-radius: 7px; font: inherit; background: #fff;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: 2px solid #b8b8b4; border-color: var(--primaria);
}

.btn {
  display: inline-block; border: 0; border-radius: 7px; cursor: pointer;
  padding: 9px 16px; font: inherit; font-weight: 600;
  background: var(--primaria); color: #fff;
}
.btn:hover { background: var(--primaria-escura); }
.btn-suave { background: #e5e7eb; color: var(--texto); padding: 6px 12px; }
.btn-suave:hover { background: #d1d5db; }
.btn-mini { padding: 5px 10px; font-size: 13px; }

.erro {
  background: #fef2f2; border: 1px solid #fecaca; color: var(--perigo);
  padding: 10px 14px; border-radius: 7px; margin-bottom: 14px; font-size: 14px;
}

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--borda); }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--texto-suave); }
tr:hover td { background: #f8fafc; }
td.num { color: var(--texto-suave); white-space: nowrap; }

.selo {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.selo-azul    { background: #dbeafe; color: #1e40af; }
.selo-amarelo { background: #fef3c7; color: #92400e; }
.selo-roxo    { background: #ede9fe; color: #5b21b6; }
.selo-verde   { background: #d1fae5; color: #065f46; }
.selo-cinza   { background: #e5e7eb; color: #374151; }
.selo-vermelho{ background: #fee2e2; color: #b91c1c; }
.selo-laranja { background: #ffedd5; color: #c2410c; }

.contador.alerta { border-color: #fecaca; background: #fef2f2; }
.contador.alerta .valor { color: #b91c1c; }

.prio-baixa   { color: #6b7280; }
.prio-media   { color: #334155; font-weight: 600; }
.prio-alta    { color: #c2410c; font-weight: 700; }
.prio-critica { color: #b91c1c; font-weight: 700; }

.filtros {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px;
}
.filtros .campo { min-width: 150px; flex: 1; }
.filtros label { margin-top: 0; }

.contadores { display: flex; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.contador {
  background: var(--cartao); border: 1px solid var(--borda); border-radius: 10px;
  padding: 12px 18px; min-width: 140px;
}
.contador .valor { font-size: 26px; font-weight: 700; }
.contador .rotulo { font-size: 13px; color: var(--texto-suave); }

.linha-meta {
  display: flex; gap: 16px; flex-wrap: wrap; color: var(--texto-suave);
  font-size: 13px; margin-bottom: 14px;
}
.descricao-chamado { white-space: pre-wrap; line-height: 1.55; }

.evento { border-left: 3px solid var(--borda); padding: 8px 14px; margin: 10px 0; }
.evento.interno { border-left-color: #f59e0b; background: #fffbeb; border-radius: 0 7px 7px 0; }
.evento.sistema { color: var(--texto-suave); font-size: 13px; }
.evento .autor { font-weight: 600; font-size: 13px; }
.evento .quando { color: var(--texto-suave); font-size: 12px; margin-left: 6px; }
.evento .texto { margin: 4px 0 0; white-space: pre-wrap; line-height: 1.5; }

.acoes-tecnico { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }

.layout-chamado {
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  gap: 18px; align-items: start;
}
.coluna-lateral { position: sticky; top: 20px; }
.coluna-lateral label { margin-top: 14px; }
.coluna-lateral form:first-of-type label { margin-top: 0; }
@media (max-width: 860px) {
  .layout-chamado { grid-template-columns: 1fr; }
  .coluna-lateral { position: static; order: -1; }
}
.detalhes-lista { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; }
.detalhes-lista dt {
  font-size: 12px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--texto-suave); font-weight: 600; padding-top: 2px;
}
.detalhes-lista dd { margin: 0; font-size: 14px; }
.detalhes-lista dd small { color: var(--texto-suave); }
.check-inline { display: flex; align-items: center; gap: 6px; font-weight: 400; font-size: 13px; margin: 8px 0; }
.check-inline input { width: auto; }
.vazio { color: var(--texto-suave); padding: 30px 0; text-align: center; }

.estado-vazio { text-align: center; padding: 48px 20px; }
.estado-vazio .icone { font-size: 44px; margin-bottom: 10px; }
.estado-vazio h2 { margin-bottom: 8px; }
.estado-vazio p { color: var(--texto-suave); margin: 0 0 22px; line-height: 1.6; }

.campos-duplos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .campos-duplos { grid-template-columns: 1fr; } }

.anexos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.anexo {
  display: inline-flex; align-items: center; gap: 4px;
  background: #f4f4f3; border: 1px solid #d6d6d3; border-radius: 999px;
  padding: 4px 12px; font-size: 13px; color: #171717;
}
.anexo:hover { background: #e8e8e6; text-decoration: none; }
.anexo small { color: #6b7280; }
.dica-anexo { font-size: 12px; color: var(--texto-suave); margin: 4px 0 0; }
input[type=file] { width: 100%; padding: 8px; border: 1px dashed var(--borda); border-radius: 7px; background: #fafbfc; font-size: 13px; }

/* Bloco opcional de categoria/prioridade na abertura de chamado */
.ajustes-opcionais { margin-top: 16px; border: 1px solid var(--borda); border-radius: 8px; padding: 0 14px; }
.ajustes-opcionais > summary { cursor: pointer; padding: 12px 0; font-weight: 600; font-size: 14px; list-style: none; }
.ajustes-opcionais > summary::-webkit-details-marker { display: none; }
.ajustes-opcionais > summary::before { content: "\25B8"; display: inline-block; margin-right: 8px; color: var(--texto-suave); transition: transform .15s ease; }
.ajustes-opcionais[open] > summary::before { transform: rotate(90deg); }
.ajustes-opcionais .op { color: var(--texto-suave); font-weight: 400; }
.ajuste-dica { font-size: 12.5px; color: var(--texto-suave); margin: 0 0 12px; line-height: 1.5; }
.ajustes-opcionais .campos-duplos { padding-bottom: 14px; }

/* Confirmação rica após abrir um chamado */
.abertura-ok { display: flex; gap: 14px; align-items: flex-start;
  background: rgba(31,157,85,.10); border: 1px solid rgba(31,157,85,.30);
  border-left: 4px solid #1f9d55; border-radius: 10px; padding: 16px 18px; margin-bottom: 20px; }
.abertura-ok .ok-icone { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%;
  background: #1f9d55; color: #fff; font-weight: 700; font-size: 15px;
  display: flex; align-items: center; justify-content: center; }
.abertura-ok .ok-texto strong { font-size: 16px; }
.abertura-ok .ok-texto p { margin: 5px 0 0; font-size: 14px; line-height: 1.5; }
.abertura-ok .ok-ia { color: var(--texto-suave); font-style: italic; }

/* Atalhos de "problemas comuns" + dica de descrição na abertura de chamado */
.problemas-comuns { margin-bottom: 14px; }
.pc-titulo { font-size: 13px; color: var(--texto-suave); margin: 0 0 8px; }
.pc-grade { display: flex; flex-wrap: wrap; gap: 8px; }
.pc-chip { background: var(--cartao); border: 1px solid var(--borda); color: var(--texto);
  border-radius: 999px; padding: 7px 14px; font-size: 13.5px; cursor: pointer;
  transition: border-color .12s, background .12s; }
.pc-chip:hover { border-color: var(--texto-suave); }
.pc-chip.ativo { background: var(--primaria); color: #fff; border-color: var(--primaria); }
html[data-theme="dark"] .pc-chip.ativo { background: #ececea; color: #111; border-color: #ececea; }
.desc-dica { font-size: 12.5px; color: var(--texto-suave); margin: 4px 0 0; line-height: 1.5; }
.form-inline { display: inline-flex; gap: 6px; align-items: center; }

/* ============================= MODO ESCURO ============================= */
html { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }
html[data-theme="dark"] body {
  --fundo: #131312;
  --cartao: #1d1d1c;
  --borda: #2f2f2d;
  --texto: #ececea;
  --texto-suave: #a3a3a0;
  --primaria: #f4f4f3;
  --primaria-escura: #ffffff;
}
html[data-theme="dark"] .btn { color: #111; }
html[data-theme="dark"] .btn-suave { background: #2f2f2d; color: #ececea; }
html[data-theme="dark"] .btn-suave:hover { background: #3c3c3a; }
html[data-theme="dark"] input[type=text],
html[data-theme="dark"] input[type=email],
html[data-theme="dark"] input[type=password],
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background: #242423; color: #ececea; border-color: #3c3c3a;
}
html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus { outline-color: #5a5a57; }
html[data-theme="dark"] input[type=file] { background: #242423; border-color: #3c3c3a; color: #a3a3a0; }
html[data-theme="dark"] tr:hover td { background: #242423; }
html[data-theme="dark"] .erro { background: #2c1a1a; border-color: #5b2b2b; color: #f0a8a8; }
html[data-theme="dark"] .selo-azul    { background: #1e3a5f; color: #9cc4f0; }
html[data-theme="dark"] .selo-amarelo { background: #4a3510; color: #f0cc80; }
html[data-theme="dark"] .selo-roxo    { background: #3b2a63; color: #c4b0f0; }
html[data-theme="dark"] .selo-verde   { background: #143d2a; color: #8fdcb4; }
html[data-theme="dark"] .selo-cinza   { background: #333331; color: #c9c9c6; }
html[data-theme="dark"] .selo-vermelho{ background: #4a1717; color: #f0a0a0; }
html[data-theme="dark"] .selo-laranja { background: #4a2a10; color: #f0b585; }
html[data-theme="dark"] .prio-baixa   { color: #8f8f8c; }
html[data-theme="dark"] .prio-media   { color: #b0bcd0; }
html[data-theme="dark"] .prio-alta    { color: #f0a070; }
html[data-theme="dark"] .prio-critica { color: #f08585; }
html[data-theme="dark"] .evento.interno { background: #2e2612; border-left-color: #c9962e; }
html[data-theme="dark"] .anexo { background: #2a2a28; border-color: #3f3f3d; color: #ececea; }
html[data-theme="dark"] .anexo:hover { background: #333331; }
html[data-theme="dark"] .anexo small { color: #8f8f8c; }
html[data-theme="dark"] .contador.alerta { border-color: #5b2b2b; background: #2c1a1a; }
html[data-theme="dark"] .contador.alerta .valor { color: #f08585; }
html[data-theme="dark"] .cartao { box-shadow: none; }
.tema-btn { background: transparent; border: 1px solid #3c3c3a; color: #e2e8f0; border-radius: 999px; cursor: pointer; padding: 5px 10px; font-size: 15px; line-height: 1; }
.tema-btn:hover { background: #27272a; }

/* Pesquisa de satisfação */
.estrelas { display: flex; flex-direction: row-reverse; justify-content: center; gap: 4px; margin: 6px 0 4px; }
.estrelas input { display: none; }
.estrelas label { font-size: 34px; color: #d3d3d0; cursor: pointer; transition: color .1s; margin: 0; }
.estrelas label:hover,
.estrelas label:hover ~ label,
.estrelas input:checked ~ label { color: #eda100; }
.nota-dada { font-size: 22px; color: #eda100; margin: 0 0 8px; }
.nota-dada small { color: var(--texto-suave); font-size: 13px; }
.estrela-vazia { color: #d3d3d0; }
html[data-theme="dark"] .estrelas label { color: #3f3f3d; }
html[data-theme="dark"] .estrelas label:hover,
html[data-theme="dark"] .estrelas label:hover ~ label,
html[data-theme="dark"] .estrelas input:checked ~ label { color: #eda100; }
html[data-theme="dark"] .estrela-vazia { color: #3f3f3d; }

/* Sugestões da base de conhecimento na abertura do chamado */
.sugestoes {
  background: #fefce8; border: 1px solid #f2e29b; border-radius: 10px;
  padding: 12px 16px; margin-top: 8px;
}
.sugestoes-titulo { margin: 0 0 6px; font-size: 13px; font-weight: 700; }
.sugestoes ul { margin: 0; padding: 0 0 0 4px; list-style: none; }
.sugestoes li { padding: 4px 0; font-size: 14px; }
.sugestoes small { color: var(--texto-suave); }
html[data-theme="dark"] .sugestoes { background: #2e2612; border-color: #5c4a1a; }
.cartao-cta { border-style: dashed; }

/* Card de sugestão da IA */
.cartao-ia { border-color: #c7b8f0; background: #f6f2fe; }
html[data-theme="dark"] .cartao-ia { border-color: #4a3a7a; background: #241c38; }

/* Pré-atendimento automático (assistente IA) */
.evento.assistente { border-left-color: #7c5cd6; background: #f6f2fe; border-radius: 0 7px 7px 0; }
html[data-theme="dark"] .evento.assistente { background: #241c38; border-left-color: #9085e9; }
.pre-resolveu {
  background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 10px;
  padding: 12px 16px; margin: 14px 0; font-size: 14px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.pre-resolveu .pre-nao { color: var(--texto-suave); font-size: 13px; }
html[data-theme="dark"] .pre-resolveu { background: #0f2a1a; border-color: #1f5c40; }

/* ---- Acompanhamento do colaborador: avisos, novidades e linha do tempo ---- */
.aviso-linha { display:flex; align-items:center; gap:10px; flex-wrap:wrap; border-radius:10px; padding:11px 14px; margin-bottom:14px; font-size:14px; }
.aviso-aguardando { background:#fff7ed; border:1px solid #fed7aa; color:#9a3412; }
.aviso-novidade { background:#eff6ff; border:1px solid #bfdbfe; color:#1e40af; }
html[data-theme="dark"] .aviso-aguardando { background:#2a1c0c; border-color:#5b3b16; color:#f0b585; }
html[data-theme="dark"] .aviso-novidade { background:#12233f; border-color:#1e3a5f; color:#9cc4f0; }

.pill { display:inline-block; margin-left:8px; padding:1px 8px; border-radius:999px; font-size:11px; font-weight:700; vertical-align:middle; }
.pill-aguardando { background:#f59e0b; color:#3a2408; }
.pill-novidade { background:#3b82f6; color:#fff; }
tr.linha-aguardando { background:#fff7ed; }
tr.linha-novidade { background:#eff6ff; }
html[data-theme="dark"] tr.linha-aguardando { background:rgba(245,158,11,.09); }
html[data-theme="dark"] tr.linha-novidade { background:rgba(59,130,246,.09); }

.nav-badge { display:inline-block; min-width:18px; text-align:center; background:#ef4444; color:#fff; border-radius:999px; font-size:11px; font-weight:700; padding:0 5px; line-height:18px; }

.linha-tempo { list-style:none; display:flex; padding:0; margin:0 0 20px; }
.linha-tempo li { position:relative; flex:1; text-align:center; font-size:12.5px; color:var(--texto-suave); padding-top:26px; }
.linha-tempo li .lt-ponto { position:absolute; top:5px; left:50%; transform:translateX(-50%); width:14px; height:14px; border-radius:50%; background:var(--borda); border:2px solid var(--cartao); z-index:1; }
.linha-tempo li::before { content:""; position:absolute; top:11px; left:-50%; width:100%; height:3px; background:var(--borda); }
.linha-tempo li:first-child::before { display:none; }
.linha-tempo li.lt-feito .lt-ponto, .linha-tempo li.lt-atual .lt-ponto { background:#22c55e; }
.linha-tempo li.lt-feito::before, .linha-tempo li.lt-atual::before { background:#22c55e; }
.linha-tempo li.lt-atual { color:var(--texto); font-weight:700; }
.linha-tempo li.lt-atual .lt-ponto { box-shadow:0 0 0 4px rgba(34,197,94,.25); }
