/* Painel de Chamados Russi — visual neutro */
:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --borda: #e3e5e9;
  --texto: #1c2230;
  --muted: #6b7280;
  --escuro: #151a23;
  --escuro-2: #232a36;
  --primaria: #1f2937;
  --primaria-h: #111827;
  --foco: #4b5563;
  --verde: #15803d;
  --vermelho: #b91c1c;
  --laranja: #c2410c;
  --amarelo: #a16207;
  --azul: #1d4ed8;
  --raio: 8px;
  --sombra: 0 1px 2px rgba(16, 24, 40, .05);
  font-size: 15px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; background: var(--bg); color: var(--texto); line-height: 1.5; }
a { color: var(--primaria); }
h1, h2, h3, h4 { margin: 0 0 .6em; line-height: 1.25; }
h3 { font-size: 1rem; }
h4 { font-size: .95rem; }
code { background: #eef0f3; padding: 1px 5px; border-radius: 4px; }
.muted { color: var(--muted); }
.pequeno { font-size: .82rem; }
.centro { text-align: center; }
.direita { text-align: right; }
.bloco { display: block; }
.ico { width: 18px; height: 18px; flex: none; }

/* ---------- Estrutura ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 236px; background: var(--escuro); color: #cfd4dc; flex: none; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 22px 20px 18px; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.07); }
.logo { max-width: 150px; max-height: 52px; object-fit: contain; filter: brightness(0) invert(1); }
.logo-texto { font-weight: 800; letter-spacing: .28em; font-size: 1.35rem; color: #fff; filter: none; }
.brand-sub { font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; color: #8b93a1; }
.sidebar nav { padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; }
.sidebar nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 6px; color: #c3c9d2; text-decoration: none; font-size: .93rem; }
.sidebar nav a:hover { background: var(--escuro-2); color: #fff; }
.sidebar nav a.ativo { background: #fff; color: var(--escuro); font-weight: 600; }
.nav-sep { margin: 16px 12px 6px; font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: #6b7381; }
.principal { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topo { display: flex; align-items: center; gap: 14px; padding: 14px 28px; background: var(--card); border-bottom: 1px solid var(--borda); position: sticky; top: 0; z-index: 5; }
.topo h1 { font-size: 1.15rem; margin: 0; flex: 1; }
.menu-btn { display: none; background: none; border: 1px solid var(--borda); border-radius: 6px; font-size: 1.1rem; padding: 4px 10px; cursor: pointer; }
.usuario { display: flex; align-items: center; gap: 8px; }
.usuario-link { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; padding: 4px 8px; border-radius: 6px; }
.usuario-link:hover { background: var(--bg); }
.usuario-info { display: flex; flex-direction: column; line-height: 1.2; }
.usuario-info small { color: var(--muted); font-size: .76rem; }
.sino { position: relative; display: flex; color: var(--muted); padding: 6px; border-radius: 6px; }
.sino:hover { background: var(--bg); color: var(--texto); }
.sino.tem { color: var(--texto); }
.sino-num { position: absolute; top: 0; right: -2px; background: var(--vermelho); color: #fff; font-size: .64rem; font-weight: 700; border-radius: 10px; padding: 1px 5px; line-height: 1.3; }
.avisos { list-style: none; margin: 0; padding: 0; }
.avisos li { border-bottom: 1px solid #eef0f3; }
.avisos li:last-child { border-bottom: 0; }
.avisos a { display: block; padding: 12px 16px; text-decoration: none; color: inherit; }
.avisos a:hover { background: #f8f9fb; }
.avisos li.nao-lido a { background: #f3f6fd; }
.avisos li.nao-lido strong::before { content: "● "; color: var(--azul); }
.avisos .aviso-texto { display: block; font-size: .86rem; color: #374151; margin-top: 2px; }
.fila-box { background: #f6f7f9; border: 1px solid var(--borda); border-radius: 6px; padding: 8px 12px; margin: 10px 0; font-size: .86rem; }
.estrelas { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.estrelas input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.estrelas label { font-size: 1.9rem; color: #d1d5db; cursor: pointer; line-height: 1; }
.estrelas label:hover, .estrelas label:hover ~ label, .estrelas input:checked ~ label { color: #f59e0b; }
.estrelas input:focus-visible + label { outline: 2px solid var(--foco); border-radius: 4px; }
.nota-estrelas { color: #f59e0b; font-size: 1.1rem; letter-spacing: 1px; }
.nota-estrelas .apagada { color: #d1d5db; }
.form-sair { margin: 0; display: flex; }
.sair { background: none; border: 0; cursor: pointer; color: var(--muted); padding: 6px; border-radius: 6px; display: flex; }
.sair:hover { background: var(--bg); color: var(--vermelho); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--primaria); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: .78rem; font-weight: 700; flex: none; }
.avatar-p { width: 26px; height: 26px; font-size: .66rem; background: #64748b; }
.conteudo { padding: 24px 28px; flex: 1; }
.rodape { padding: 16px 28px; font-size: .8rem; color: var(--muted); border-top: 1px solid var(--borda); background: var(--card); text-align: center; }

/* ---------- Componentes ---------- */
.card { background: var(--card); border: 1px solid var(--borda); border-radius: var(--raio); padding: 20px; margin-bottom: 18px; box-shadow: var(--sombra); }
.card.sem-padding { padding: 0; overflow: hidden; }
.card-cab { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.card-cab h3 { margin: 0; }
details.card > summary { cursor: pointer; list-style: none; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary h3 { display: inline; margin: 0; }
details.card > summary::after { content: "▾"; float: right; color: var(--muted); }
details.card[open] > summary { margin-bottom: 14px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 15px; border-radius: 6px; border: 1px solid var(--borda); background: #fff; color: var(--texto); font: inherit; font-size: .9rem; font-weight: 500; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: #f3f4f6; }
.btn-primario { background: var(--primaria); border-color: var(--primaria); color: #fff; }
.btn-primario:hover { background: var(--primaria-h); }
.btn-sucesso { background: var(--verde); border-color: var(--verde); color: #fff; }
.btn-sucesso:hover { background: #166534; }
.btn-perigo { background: #fff; border-color: #f1c4c4; color: var(--vermelho); }
.btn-perigo:hover { background: #fdf0f0; }
.btn-perigo-cheio { background: var(--vermelho); border-color: var(--vermelho); color: #fff; }
.btn-perigo-cheio:hover { background: #991b1b; }
.acao-recolhida > summary { list-style: none; align-self: flex-start; }
.acao-recolhida > summary::-webkit-details-marker { display: none; }
.acao-recolhida[open] > summary { margin-bottom: 4px; background: #f3f4f6; }
.acao-recolhida > form.acao { border-top: 0; padding-top: 6px; }
.btn-pequeno { padding: 5px 11px; font-size: .82rem; }
.btn-bloco { width: 100%; }
.link { background: none; border: 0; color: var(--azul); cursor: pointer; padding: 0 4px; font: inherit; font-size: .85rem; }
.link.perigo { color: var(--vermelho); font-size: 1.1rem; }
.inline { display: inline; }

.alerta { padding: 11px 15px; border-radius: 6px; margin-bottom: 14px; border: 1px solid; font-size: .92rem; }
.alerta-sucesso { background: #effaf2; border-color: #bfe5cb; color: #14532d; }
.alerta-erro { background: #fdf1f1; border-color: #f2c5c5; color: #7f1d1d; }
.alerta-aviso { background: #fff8eb; border-color: #f3dca8; color: #713f12; }

/* Formulários */
.form label, .form fieldset { display: flex; flex-direction: column; gap: 5px; font-size: .88rem; font-weight: 500; margin-bottom: 14px; }
.form fieldset { border: 0; padding: 0; }
.form legend { font-weight: 600; font-size: .88rem; margin-bottom: 6px; padding: 0; }
input, select, textarea { font: inherit; font-size: .92rem; padding: 8px 11px; border: 1px solid #cfd3da; border-radius: 6px; background: #fff; color: var(--texto); width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid #c7ccd4; border-color: var(--foco); }
input:disabled { background: #f3f4f6; color: var(--muted); }
textarea { resize: vertical; }
input[type=checkbox], input[type=radio] { width: auto; }
.form-largo { max-width: 900px; }
.form-compacto label { margin-bottom: 10px; }
.acoes-form { display: flex; gap: 10px; justify-content: flex-end; margin-top: 6px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 12px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 14px; }
.col-2 { grid-column: span 2; }
.linha-opcoes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-bottom: 10px; }
.linha-opcoes input[type=date] { max-width: 190px; }
.radio, .check { display: inline-flex !important; flex-direction: row !important; align-items: center; gap: 7px; font-weight: 400 !important; margin: 0 !important; cursor: pointer; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.checks-coluna { flex-direction: column; justify-content: center; }
.opcoes-prio { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.opcao-prio { flex-direction: row !important; align-items: flex-start; gap: 9px !important; border: 1px solid var(--borda); border-left-width: 4px; border-radius: 6px; padding: 10px 12px; cursor: pointer; margin: 0 !important; }
.opcao-prio span { display: flex; flex-direction: column; }
.opcao-prio small { font-weight: 400; color: var(--muted); font-size: .78rem; line-height: 1.35; }
.opcao-prio:has(input:checked) { background: #f6f7f9; border-color: #9aa1ac; }
.prio-borda-critica { border-left-color: var(--vermelho) !important; }
.prio-borda-alta { border-left-color: var(--laranja) !important; }
.prio-borda-media { border-left-color: #ca8a04 !important; }
.prio-borda-baixa { border-left-color: #64748b !important; }

/* Toggle switch */
.toggle { display: flex !important; flex-direction: row !important; align-items: center; gap: 10px; cursor: pointer; font-weight: 400 !important; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle-ui { width: 40px; height: 22px; background: #cbd0d8; border-radius: 22px; position: relative; flex: none; transition: background .15s; }
.toggle-ui::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: #fff; top: 2px; left: 2px; transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.toggle input:checked + .toggle-ui { background: var(--verde); }
.toggle input:checked + .toggle-ui::after { left: 20px; }
.toggle input:focus-visible + .toggle-ui { outline: 2px solid var(--foco); outline-offset: 2px; }
.toggle-grande { align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--borda); }
.toggle-grande > span:last-child { display: flex; flex-direction: column; }
.toggle-grande small { color: var(--muted); font-size: .82rem; }
.toggle.desabilitado { opacity: .5; }

/* Badges */
.badge, .prio, .com { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: .74rem; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.prio-critica { background: #fde8e8; color: #991b1b; border-color: #f7c6c6; }
.prio-alta { background: #fff0e6; color: #9a3412; border-color: #fbd3b8; }
.prio-media { background: #fef7e0; color: #854d0e; border-color: #f4e1a6; }
.prio-baixa { background: #eef1f5; color: #475569; border-color: #dbe0e7; }
.st-aberto { background: #eef2ff; color: #3730a3; }
.st-em_analise { background: #e0f2fe; color: #075985; }
.st-aguardando_solicitante { background: #fce7f3; color: #9d174d; }
.st-aguardando_aprovacao { background: #fef3c7; color: #92400e; }
.st-em_desenvolvimento { background: #ede9fe; color: #5b21b6; }
.st-em_teste { background: #ccfbf1; color: #115e59; }
.st-concluido { background: #dcfce7; color: #166534; }
.st-cancelado { background: #f1f2f4; color: #6b7280; }
.badge-atraso { background: var(--vermelho); color: #fff; }
.orc-pendente { background: #fef3c7; color: #92400e; }
.orc-aprovado { background: #dcfce7; color: #166534; }
.orc-recusado { background: #fde8e8; color: #991b1b; }
.orc-coberto { background: #e0f2fe; color: #075985; }
.orc-cancelado { background: #f1f2f4; color: #6b7280; text-decoration: line-through; }
.orc-substituido { background: #f1f2f4; color: #6b7280; }
.mod-inicial { background: #f3f4f6; color: #4b5563; }
.mod-acrescimo { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.mod-substituicao { background: #fff7ed; color: #9a3412; border-color: #fed7aa; }
.com { font-weight: 500; background: #fff; border-color: var(--borda); color: var(--muted); }
.com-baliza::before, .com-russi::before { content: "● "; }
.com-baliza::before { color: #7c3aed; }
.com-russi::before { color: #d97706; }
.perfil-admin { background: #1f2937; color: #fff; }
.perfil-gestor { background: #e0e7ff; color: #3730a3; }
.perfil-solicitante { background: #eef1f5; color: #475569; }
.perfil-desenvolvedor { background: #ede9fe; color: #5b21b6; }
.tag-baliza { font-size: .68rem; background: #ede9fe; color: #5b21b6; padding: 1px 7px; border-radius: 10px; font-weight: 600; }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: var(--card); border: 1px solid var(--borda); border-radius: var(--raio); padding: 15px 17px; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--sombra); }
a.kpi:hover { border-color: #b8bec8; }
.kpi span { font-size: .8rem; color: var(--muted); font-weight: 500; }
.kpi strong { font-size: 1.8rem; line-height: 1.15; font-weight: 700; }
.kpi strong.kpi-txt { font-size: 1.25rem; padding: 6px 0 3px; }
.kpi small { color: var(--muted); font-size: .76rem; }
.kpi-critico strong { color: var(--vermelho); }
.kpi-alerta { border-color: #f2c5c5; background: #fffafa; }
.kpi-alerta strong { color: var(--vermelho); }

.grid-dash { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 18px; align-items: start; }
.grid-dash .col-2 { grid-column: span 2; }
.dash-dupla { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 0 18px; align-items: start; }
.col-titulo { min-width: 220px; }
.barra-linha { grid-template-columns: 120px 1fr 28px; }

/* Barras */
.barras { display: flex; flex-direction: column; gap: 9px; }
.barra-linha { display: grid; grid-template-columns: 130px 1fr 30px; align-items: center; gap: 10px; font-size: .84rem; }
.barra-rot { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barra-trilho { background: #eef0f3; border-radius: 4px; height: 10px; overflow: hidden; }
.barra { display: block; height: 100%; background: #4b5563; border-radius: 4px; min-width: 2px; }
.barra-val { text-align: right; font-weight: 600; }
.b-critica { background: var(--vermelho); } .b-alta { background: #ea580c; } .b-media { background: #ca8a04; } .b-baixa { background: #94a3b8; }
.b-aberto { background: #6366f1; } .b-em_analise { background: #0284c7; } .b-aguardando_solicitante { background: #db2777; } .b-aguardando_aprovacao { background: #d97706; } .b-em_desenvolvimento { background: #7c3aed; } .b-em_teste { background: #0d9488; }

/* Tabelas */
.tabela-scroll { overflow-x: auto; }
.tabela { width: 100%; border-collapse: collapse; font-size: .88rem; }
.tabela th { text-align: left; font-weight: 600; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--borda); background: #fafbfc; white-space: nowrap; }
.tabela td { padding: 11px 14px; border-bottom: 1px solid #eef0f3; vertical-align: middle; }
.tabela tfoot td { font-weight: 600; background: #fafbfc; }
.tabela-compacta td { padding: 8px 10px; }
.tabela-compacta th { padding: 8px 10px; }
.tabela td small.bloco { font-size: .78rem; margin-top: 1px; }
.tabela .num a { font-weight: 600; text-decoration: none; color: var(--muted); }
.linha-link { cursor: pointer; }
.linha-link:hover td { background: #f8f9fb; }
.linha-final td { opacity: .6; }
.vazio { text-align: center; color: var(--muted); padding: 30px !important; }
.tabela-cab { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--borda); font-size: .9rem; }
.tabela-cab .btn { margin-left: auto; }
.neg { color: var(--verde); }
.linha-fora td.valor strong { text-decoration: line-through; color: var(--muted); }
.sit-ok { background: #dcfce7; color: #166534; }
.sit-faturar { background: #e0f2fe; color: #075985; }
.sit-fora { background: #f1f2f4; color: #4b5563; }
.sit-pendente { background: #fef3c7; color: #92400e; }
.sit-nao { background: #fde8e8; color: #991b1b; }
.hist-mini summary { cursor: pointer; font-size: .8rem; color: var(--azul); white-space: nowrap; }
.hist-mini ol { margin: 6px 0 0; padding-left: 16px; font-size: .78rem; min-width: 280px; }
.hist-mini li { margin-bottom: 4px; text-decoration: none; }
.linha-fora .hist-mini, .linha-fora .hist-mini * { text-decoration: none; }
.kpi-destaque { border-color: #9aa1ac; border-width: 2px; }
.tempo { font-weight: 600; white-space: nowrap; }
.tempo.sla-ok { color: var(--verde); } .tempo.sla-alerta { color: var(--amarelo); } .tempo.sla-estourado { color: var(--vermelho); }

.filtros { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 14px; }
.filtros input[type=search] { flex: 1 1 220px; width: auto; }
.filtros select { width: auto; flex: 0 1 auto; }
.inline-label { display: flex; align-items: center; gap: 8px; font-size: .88rem; }
.inline-label input { width: auto; }
.inline-edit { display: flex; gap: 8px; }
.inline-edit input { max-width: 300px; padding: 5px 9px; }

.atalhos { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; width: 100%; }
.chip { font-size: .8rem; padding: 3px 10px; border: 1px solid var(--borda); border-radius: 20px; text-decoration: none; color: var(--texto); background: #fff; }
.chip:hover { border-color: #aeb4bd; }
.chip.ativo { background: var(--primaria); color: #fff; border-color: var(--primaria); }
.impressao-periodo { display: none; }
.paginacao { display: flex; gap: 4px; justify-content: center; padding: 14px; }
.paginacao a, .paginacao span { padding: 5px 11px; border-radius: 5px; text-decoration: none; border: 1px solid var(--borda); font-size: .85rem; }
.paginacao a.ativo { background: var(--primaria); color: #fff; border-color: var(--primaria); }

/* ---------- Tela do chamado ---------- */
.cab-chamado { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.cab-linha { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.titulo-chamado { font-size: 1.35rem; margin-bottom: 4px; }
.fluxo { display: flex; list-style: none; padding: 0; margin: 0 0 18px; background: var(--card); border: 1px solid var(--borda); border-radius: var(--raio); overflow: hidden; }
.fluxo li { flex: 1; padding: 10px 8px 10px 22px; font-size: .78rem; color: var(--muted); position: relative; text-align: center; background: #fff; }
.fluxo li + li::before { content: ""; position: absolute; left: -1px; top: 0; bottom: 0; width: 14px; background: linear-gradient(to bottom right, transparent 49%, var(--borda) 50%, transparent 52%) top/100% 50% no-repeat, linear-gradient(to top right, transparent 49%, var(--borda) 50%, transparent 52%) bottom/100% 50% no-repeat; }
.fluxo li.feito { color: var(--verde); background: #f6fbf7; }
.fluxo li.feito span::before { content: "✓ "; }
.fluxo li.atual { color: #fff; background: var(--primaria); font-weight: 600; }
.fluxo-cancelado li { opacity: .45; }
.layout-chamado { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.texto-livre { white-space: normal; word-wrap: break-word; }
.card-acoes { border-left: 4px solid var(--primaria); }
.acao { padding: 14px 0; border-top: 1px solid var(--borda); display: flex; flex-direction: column; gap: 9px; }
.acao:first-of-type { border-top: 0; padding-top: 4px; }
.acao h4 { margin: 0; }
.acao .btn { align-self: flex-start; }
.acao .botoes { display: flex; gap: 8px; flex-wrap: wrap; }
.campos-orcamento label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; font-weight: 500; }
.campos-orcamento.oculto { display: none; }
.vigente-box { background: #f6f7f9; border: 1px solid var(--borda); border-radius: 6px; padding: 8px 12px; font-size: .88rem; }
.modalidade { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.modalidade legend { font-weight: 600; font-size: .86rem; margin-bottom: 6px; padding: 0; }
.opcao-mod { display: flex; gap: 9px; align-items: flex-start; border: 1px solid var(--borda); border-radius: 6px; padding: 9px 11px; cursor: pointer; font-size: .88rem; }
.opcao-mod span { display: flex; flex-direction: column; }
.opcao-mod small { color: var(--muted); font-size: .78rem; line-height: 1.35; }
.opcao-mod:has(input:checked) { background: #f6f7f9; border-color: #9aa1ac; }
.previa { margin: 0; padding: 8px 12px; border-left: 3px solid var(--azul); background: #f3f6fd; font-size: .86rem; border-radius: 0 6px 6px 0; }
.cobranca-resumo { display: flex; flex-direction: column; gap: 2px; padding-bottom: 12px; border-bottom: 1px solid var(--borda); }
.cobranca-resumo strong { font-size: 1.35rem; }
.pendente-mini { display: block; color: #92400e; font-size: .74rem; }
.pendente-linha { margin-top: 6px; font-size: .84rem; color: #92400e; background: #fef3c7; padding: 4px 9px; border-radius: 5px; }
h4.sub { margin: 12px 0 6px; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.hist-orc { list-style: none; padding: 0; margin: 0; font-size: .86rem; }
.hist-orc li { padding: 8px 0; border-bottom: 1px solid #f0f1f4; }
.hist-orc li:last-child { border-bottom: 0; }
.hist-linha { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.hist-orc li.riscado .hist-linha strong { text-decoration: line-through; color: var(--muted); }
.hist-just { margin-top: 4px; font-size: .8rem; background: #fafbfc; border: 1px dashed #d8dce2; border-radius: 5px; padding: 4px 8px; }

.conversa { display: flex; flex-direction: column; gap: 12px; max-height: 620px; overflow-y: auto; padding: 4px 4px 12px; }
.msg { max-width: 82%; background: #f3f4f6; border-radius: 10px; padding: 10px 14px; align-self: flex-start; border: 1px solid #e8eaee; }
.msg-baliza { background: #f6f3ff; border-color: #e7e0fb; }
.msg-minha { align-self: flex-end; background: #eef3fb; border-color: #dde6f4; }
.msg-cab { display: flex; align-items: center; gap: 7px; font-size: .82rem; margin-bottom: 5px; flex-wrap: wrap; }
.msg-cab time { color: var(--muted); font-size: .76rem; margin-left: auto; }
.msg-corpo { font-size: .92rem; word-wrap: break-word; }
.evento { align-self: center; text-align: center; max-width: 90%; font-size: .84rem; }
.evento-linha { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; }
.evento-msg { background: #fafbfc; border: 1px dashed #d8dce2; border-radius: 8px; padding: 7px 12px; margin-top: 5px; color: #374151; text-align: left; }
.seta { color: var(--muted); }
.anexo { display: inline-flex; align-items: center; gap: 5px; margin: 6px 8px 0 0; font-size: .82rem; text-decoration: none; background: #fff; border: 1px solid var(--borda); padding: 3px 9px; border-radius: 5px; color: var(--texto); }
.anexo small { color: var(--muted); }
.anexo:hover { border-color: #aeb4bd; }
.anexo-bloco { display: flex; margin: 0 0 6px; padding: 7px 10px; }
.anexo-bloco span { display: flex; flex-direction: column; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.nova-msg { border-top: 1px solid var(--borda); padding-top: 14px; margin-top: 6px; }
.nova-msg-rodape { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.nova-msg-rodape .btn-primario { margin-left: auto; }
.btn-arquivo { cursor: pointer; }

.sla-valor { font-size: 1.6rem; font-weight: 700; }
.sla-ok .sla-valor { color: var(--verde); } .sla-alerta .sla-valor { color: var(--amarelo); } .sla-estourado .sla-valor { color: var(--vermelho); }
.sla-barra { height: 8px; background: #eef0f3; border-radius: 4px; overflow: hidden; margin: 6px 0; }
.sla-barra span { display: block; height: 100%; }
.sla-ok .sla-barra span { background: var(--verde); } .sla-alerta .sla-barra span { background: #ca8a04; } .sla-estourado .sla-barra span { background: var(--vermelho); }
.relogio { color: #7c3aed; margin-top: 3px; }
.dados { margin: 14px 0 0; font-size: .88rem; }
.dados dt { color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; margin-top: 10px; }
.dados dd { margin: 2px 0 0; }
.pessoas { list-style: none; padding: 0; margin: 0 0 12px; }
.pessoas li { display: flex; align-items: center; gap: 9px; padding: 6px 0; border-bottom: 1px solid #f0f1f4; font-size: .88rem; }
.pessoas li > span:nth-child(2) { display: flex; flex-direction: column; flex: 1; line-height: 1.25; }
.pessoas small { color: var(--muted); font-size: .74rem; }
.lista-perfis { padding-left: 18px; font-size: .9rem; }
.lista-perfis li { margin-bottom: 6px; }

/* ---------- Login / instalação ---------- */
.tela-simples { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; background: linear-gradient(160deg, #151a23 0%, #2b3341 100%); padding: 20px; }
.caixa-simples { width: 100%; max-width: 400px; background: #fff; border-radius: 12px; padding: 34px 32px 26px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.caixa-logo { text-align: center; margin-bottom: 24px; }
.caixa-logo p { margin: 8px 0 0; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .16em; }
.logo-grande { max-width: 190px; max-height: 80px; object-fit: contain; }
.logo-grande.logo-texto { color: var(--escuro); font-size: 2rem; font-weight: 800; letter-spacing: .3em; }
.rodape-simples { background: transparent; border: 0; color: #9aa3b2; margin-top: 18px; }

/* ---------- Responsivo ---------- */
@media (max-width: 1100px) {
  .layout-chamado { grid-template-columns: 1fr; }
  .grid-dash { grid-template-columns: 1fr 1fr; }
  .grid-dash .col-2 { grid-column: span 2; }
  .dash-dupla { grid-template-columns: 1fr; }
  .opcoes-prio { grid-template-columns: 1fr 1fr; }
  .modalidade { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  .sidebar { position: fixed; left: -250px; z-index: 20; transition: left .2s; }
  .sidebar.aberta { left: 0; box-shadow: 0 0 40px rgba(0,0,0,.4); }
  .menu-btn { display: block; }
  .conteudo, .topo { padding-left: 16px; padding-right: 16px; }
  .usuario-info { display: none; }
  .grid-2, .grid-3, .grid-4, .grid-dash { grid-template-columns: 1fr; }
  .grid-dash .col-2, .col-2 { grid-column: auto; }
  .fluxo { flex-wrap: wrap; }
  .fluxo li { flex: 1 1 33%; }
  .cab-chamado { flex-direction: column; }
  .msg { max-width: 95%; }
}
@media print {
  .sidebar, .topo, .nao-imprimir, .rodape { display: none !important; }
  .impressao-periodo { display: block; font-weight: 600; margin: 0 0 12px; }
  .conteudo { padding: 0; }
  .card { box-shadow: none; break-inside: avoid; }
  body { background: #fff; }
}
