:root {
  /* Identidade Bagé */
  --marca: #0a934d;
  --marca-escuro: #067338;
  --marca-profundo: #04522a;
  --marca-claro: #e7f5ed;
  --marca-medio: #47ae79;

  --fundo: #f4f7f5;
  --superficie: #ffffff;
  --texto: #17231c;
  --texto-2: #5a6a61;
  --borda: #dfe7e2;

  /* Cores dos status (mesma lógica da planilha) */
  --verde: #0a934d;
  --branco: #8a978f;
  --amarelo: #d9a40b;
  --vermelho: #cf4b4b;

  --raio: 16px;
  --sombra: 0 1px 2px rgba(4, 82, 42, .05), 0 4px 14px rgba(4, 82, 42, .07);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--fundo);
  color: var(--texto);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.45;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--marca); }
h1 { font-size: 1.9rem; margin: .2rem 0; letter-spacing: -.02em; font-weight: 800; }
h2 { font-size: 1.2rem; margin: 0; font-weight: 700; }
h3 { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--texto-2); margin: 0 0 .5rem; }

/* Topo */
.topo {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .7rem 1.5rem; background: var(--superficie);
  border-bottom: 3px solid var(--marca);
  position: sticky; top: 0; z-index: 10;
}
.marca img { height: 44px; display: block; }
.topo-acoes { display: flex; align-items: center; gap: .75rem; }
.atualizado { color: var(--texto-2); font-size: .85rem; }
.botao {
  background: var(--marca); color: #fff; border: 0;
  padding: .5rem .95rem; border-radius: 10px; text-decoration: none; font-size: .9rem; font-weight: 600;
  transition: background .15s;
}
.botao:hover { background: var(--marca-escuro); }

/* Faixa verde de abertura */
.faixa {
  background:
    radial-gradient(circle at 85% -20%, rgba(255,255,255,.14) 0, transparent 45%),
    linear-gradient(135deg, var(--marca) 0%, var(--marca-escuro) 60%, var(--marca-profundo) 100%);
  color: #fff;
  padding: 2.5rem 1.5rem 5.5rem;
}
.faixa-compacta { padding: 1.5rem 1.5rem 4.5rem; }
.faixa-interna { max-width: 1200px; margin: 0 auto; }
.faixa-pre {
  display: inline-block; margin: 0 0 .6rem;
  font-size: 1.05rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 800;
  padding: .35rem .9rem; border-radius: 99px;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .35);
}
.faixa-sub { margin: .25rem 0 0; opacity: .85; }
.migalha { font-size: .85rem; opacity: .85; }
.migalha a { color: #fff; text-decoration: none; font-weight: 600; }
.migalha a:hover { text-decoration: underline; }

.conteudo { max-width: 1200px; width: 100%; margin: -3.5rem auto 0; padding: 0 1.5rem 2rem; flex: 1; }

/* Página inicial: módulos */
.modulos { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 1.25rem; }
.card-modulo {
  position: relative; overflow: hidden;
  display: block; background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--raio);
  padding: 1.6rem 1.6rem 1.25rem; color: inherit; text-decoration: none; box-shadow: var(--sombra);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
a.card-modulo:hover { transform: translateY(-3px); border-color: var(--marca); box-shadow: 0 10px 28px rgba(4, 82, 42, .16); }
.card-simbolo {
  position: absolute; right: -18px; top: -10px; height: 170px;
  opacity: .12; mix-blend-mode: multiply; pointer-events: none;
  transition: opacity .2s;
}
a.card-modulo:hover .card-simbolo { opacity: .22; }
.card-pre { margin: 0; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--marca); font-weight: 700; }
.destaque { display: flex; align-items: center; gap: .8rem; margin: 1.1rem 0 1rem; }
.destaque-num { font-size: 4rem; font-weight: 800; color: var(--marca); line-height: 1; letter-spacing: -.03em; }
.destaque-rot { font-size: 1rem; color: var(--texto-2); line-height: 1.25; font-weight: 500; }
.mini-status { list-style: none; padding: 0; margin: 0 0 1.1rem; display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; font-size: .9rem; color: var(--texto-2); }
.mini-status li::before { content: ""; display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; margin-right: .4rem; background: var(--c); }
.mini-status strong { color: var(--texto); }
.rodape-card {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  font-size: .8rem; color: var(--texto-2); border-top: 1px solid var(--borda); padding-top: .85rem;
}
.rodape-card strong { color: var(--texto); font-size: .95rem; }
.conversao { white-space: nowrap; }
.conversao strong { color: var(--marca); font-size: 1.05rem; }
.card-erro code { display: block; margin-top: .5rem; font-size: .8rem; color: var(--vermelho); white-space: pre-wrap; }

/* Pontos de cor */
.ponto { display: inline-block; width: .65rem; height: .65rem; border-radius: 50%; margin-right: .45rem; background: var(--c); vertical-align: middle; }
.ponto-verde    { --c: var(--verde); }
.ponto-branco   { --c: var(--branco); }
.ponto-amarelo  { --c: var(--amarelo); }
.ponto-vermelho { --c: var(--vermelho); }

/* Funil */
.funil {
  display: flex; height: 12px; border-radius: 99px; overflow: hidden; gap: 3px;
  margin-bottom: 1rem; background: var(--superficie); padding: 3px; box-shadow: var(--sombra);
}
.funil-parte { border-radius: 99px; }
.fundo-verde    { background: var(--verde); }
.fundo-branco   { background: var(--branco); }
.fundo-amarelo  { background: var(--amarelo); }
.fundo-vermelho { background: var(--vermelho); }

/* Cards de status */
.status-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.card-status {
  font: inherit; text-align: left; cursor: pointer;
  display: flex; flex-direction: column; gap: .15rem;
  background: var(--superficie); border: 1px solid var(--borda); border-top: 5px solid var(--c);
  border-radius: var(--raio); padding: 1rem 1.15rem; box-shadow: var(--sombra); color: inherit;
  transition: transform .15s, box-shadow .15s;
}
.card-status:hover { transform: translateY(-2px); }
.card-status.ativo { box-shadow: 0 0 0 2px var(--c), 0 8px 22px rgba(4, 82, 42, .14); }
.borda-verde    { --c: var(--verde); }
.borda-branco   { --c: var(--branco); }
.borda-amarelo  { --c: var(--amarelo); }
.borda-vermelho { --c: var(--vermelho); }
.card-status-titulo { font-weight: 600; }
.card-status-num { font-size: 2.6rem; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.card-status-desc { font-size: .85rem; color: var(--texto-2); }
.card-status-pct { font-size: .78rem; font-weight: 600; color: var(--c); margin-top: .35rem; }
.borda-branco .card-status-pct { color: var(--texto-2); }

/* Painel do grupo */
.painel-grupo { background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--raio); padding: 1.35rem; box-shadow: var(--sombra); }
.painel-cab { margin-bottom: 1rem; }
.contagem { font-size: .85rem; font-weight: 700; background: var(--marca-claro); color: var(--marca-escuro); border-radius: 99px; padding: .1rem .6rem; margin-left: .35rem; }
.resumos { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.25rem; }
.resumo { background: var(--fundo); border-radius: 12px; padding: .9rem 1rem; }
.resumo h3 { font-size: .9rem; font-weight: 800; color: var(--texto); letter-spacing: .03em; margin-bottom: .8rem; }

/* Gráfico de barras horizontais */
.barras { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .55rem; }
.barras li {
  display: grid; grid-template-columns: minmax(90px, 34%) 1fr 2rem; align-items: center; gap: .7rem;
  font-size: .9rem; border-radius: 6px; padding: .1rem .2rem; cursor: default;
}
.barras li:hover { background: rgba(10, 147, 77, .06); }
.barra-rotulo { color: var(--texto-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barra-trilho { height: 12px; background: var(--borda); border-radius: 4px; overflow: hidden; }
.barra { display: block; height: 100%; min-width: 4px; background: var(--c); border-radius: 4px; transition: width .4s ease; }
.borda-branco .barra { background: #6f7d75; }
.barra-valor { text-align: right; color: var(--texto); font-weight: 700; white-space: nowrap; }
.barra-pct { display: inline-block; min-width: 2.6rem; margin-left: .45rem; font-weight: 500; font-size: .82rem; color: var(--texto-2); text-align: right; }
.resumo .barras li { grid-template-columns: minmax(90px, 34%) 1fr 4.8rem; }

.tabela-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th {
  text-align: left; font-weight: 700; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--marca-escuro); background: var(--marca-claro);
  padding: .65rem .75rem; white-space: nowrap;
}
th:first-child { border-radius: 10px 0 0 10px; }
th:last-child { border-radius: 0 10px 10px 0; }
td { padding: .65rem .75rem; border-bottom: 1px solid var(--borda); vertical-align: top; }
tbody tr:hover { background: #f8fbf9; }
.forte { font-weight: 600; }
.nowrap { white-space: nowrap; }
.obs { color: var(--texto-2); max-width: 280px; }
.etiqueta { display: inline-block; font-size: .76rem; font-weight: 600; padding: .18rem .55rem; border-radius: 6px; background: var(--marca-claro); color: var(--marca-escuro); white-space: nowrap; }
.vazio { color: var(--texto-2); }

/* ===== Módulo Agentes de expansão ===== */
.kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; margin-bottom: 1.25rem; }
.kpi {
  background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--raio);
  padding: 1rem 1.1rem; box-shadow: var(--sombra); display: flex; flex-direction: column; gap: .15rem;
}
.kpi-num { font-size: 2.2rem; font-weight: 800; line-height: 1.05; letter-spacing: -.02em; }
.kpi-rot { font-size: .95rem; font-weight: 700; color: var(--texto); white-space: nowrap; }
.kpi-nota { font-size: .75rem; color: var(--texto-2); white-space: nowrap; }
.kpi-destaque .kpi-rot, .kpi-destaque .kpi-nota { color: #fff; }
.kpi-destaque .kpi-nota { opacity: .85; }
.kpi-destaque { background: linear-gradient(135deg, var(--marca), var(--marca-escuro)); color: #fff; border: 0; }
.verde { color: var(--marca); }

.painel-grupo + .painel-grupo, .agentes-grid + .painel-grupo { margin-top: 1.5rem; }
.painel-sub { margin: .2rem 0 0; font-size: .85rem; color: var(--texto-2); }
.ranking li { grid-template-columns: minmax(130px, 22%) 1fr 3.5rem; }
.ranking .barra-rotulo { color: var(--texto); font-weight: 600; }
.ranking .barra-trilho { height: 16px; }
.posicao { display: inline-block; width: 1.9rem; color: var(--texto-2); font-weight: 700; }

.secao-titulo { margin: 2rem 0 .5rem; }
.legenda { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; font-size: .85rem; color: var(--texto-2); margin-bottom: 1rem; }
.agentes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.card-agente {
  background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--raio);
  padding: 1.1rem 1.2rem; box-shadow: var(--sombra); display: flex; flex-direction: column; gap: .9rem;
}
.card-agente header { display: flex; align-items: center; gap: .75rem; }
.avatar {
  width: 42px; height: 42px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-weight: 800; font-size: 1.1rem;
  background: var(--marca-claro); color: var(--marca-escuro);
}
.agente-nome { font-size: 1.05rem; text-transform: none; letter-spacing: 0; color: var(--texto); margin: 0; font-weight: 700; }
.agente-pos { font-size: .78rem; color: var(--texto-2); }
.agente-indice { margin-left: auto; font-size: 1.6rem; font-weight: 800; color: var(--marca); }
.pilha { display: flex; gap: 2px; height: 12px; border-radius: 4px; overflow: hidden; }
.pilha span { min-width: 4px; }
.pilha span:first-child { border-radius: 4px 0 0 4px; }
.pilha span:last-child { border-radius: 0 4px 4px 0; }
.metricas { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: 0; padding: 0; }
.metricas li { background: var(--fundo); border-radius: 10px; padding: .55rem .4rem; text-align: center; display: flex; flex-direction: column; }
.metricas strong { font-size: 1.45rem; font-weight: 800; line-height: 1.1; }
.metricas span { font-size: .78rem; color: var(--texto-2); white-space: nowrap; }
.agente-rodape { margin: 0; font-size: .82rem; color: var(--texto-2); }
.agente-rodape strong { color: var(--texto); }
.franqueados summary { cursor: pointer; font-size: .85rem; font-weight: 600; color: var(--marca); }
.franqueados ul { list-style: none; padding: 0; margin: .5rem 0 0; font-size: .85rem; }
.franqueados li { display: flex; justify-content: space-between; gap: .5rem; padding: .3rem 0; border-bottom: 1px dashed var(--borda); }
.franqueados li span { color: var(--texto-2); }

th.num, td.num { text-align: right; }
tr.total td { font-weight: 800; background: var(--marca-claro); color: var(--marca-escuro); border-bottom: 0; }
.nota { font-size: .8rem; color: var(--texto-2); margin: .8rem 0 0; }

@media (max-width: 1000px) { .kpis { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .ranking li { grid-template-columns: minmax(100px, 38%) 1fr 3rem; }
}

/* ===== Usuários, login, menu ===== */
.topo-direita { display: flex; align-items: center; gap: .9rem; }
.menu-usuario { position: relative; }
.menu-usuario summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: .5rem;
  padding: .3rem .55rem .3rem .3rem; border-radius: 99px; border: 1px solid var(--borda);
}
.menu-usuario summary::-webkit-details-marker { display: none; }
.menu-usuario summary:hover, .menu-usuario[open] summary { border-color: var(--marca); }
.avatar-p { width: 32px; height: 32px; font-size: .9rem; }
.menu-nome { font-weight: 600; font-size: .9rem; }
.menu-seta { color: var(--texto-2); font-size: .8rem; }
.menu-lista {
  position: absolute; right: 0; top: calc(100% + .5rem); min-width: 230px; z-index: 20;
  background: var(--superficie); border: 1px solid var(--borda); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(4, 82, 42, .18); padding: .4rem; display: flex; flex-direction: column;
}
.menu-cab { padding: .6rem .7rem .7rem; border-bottom: 1px solid var(--borda); margin-bottom: .3rem; display: flex; flex-direction: column; }
.menu-cab span { font-size: .78rem; color: var(--texto-2); }
.menu-lista a, .menu-sair {
  display: block; width: 100%; text-align: left; padding: .55rem .7rem; border-radius: 8px;
  color: var(--texto); text-decoration: none; font: inherit; font-size: .92rem; background: none; border: 0; cursor: pointer;
}
.menu-lista a:hover { background: var(--marca-claro); color: var(--marca-escuro); }
.menu-lista form { margin: .3rem 0 0; padding-top: .3rem; border-top: 1px solid var(--borda); }
.menu-sair { color: var(--vermelho); font-weight: 600; }
.menu-sair:hover { background: #fbeaea; }

.aviso { padding: .75rem 1rem; border-radius: 10px; margin-bottom: 1rem; font-weight: 500; }
.aviso-ok { background: var(--marca-claro); color: var(--marca-escuro); border: 1px solid #bfe3cf; }
.aviso-erro { background: #fbeaea; color: #9b2c2c; border: 1px solid #f1c4c4; }

.formulario { display: flex; flex-direction: column; gap: .9rem; }
.formulario label { display: flex; flex-direction: column; gap: .3rem; font-weight: 600; font-size: .88rem; }
.formulario small { font-weight: 400; color: var(--texto-2); font-size: .78rem; }
.formulario input, .formulario select, .form-linha input {
  font: inherit; font-weight: 400; padding: .65rem .8rem; border-radius: 10px;
  border: 1px solid var(--borda); background: var(--superficie); color: var(--texto);
}
.formulario input:focus, .formulario select:focus, .form-linha input:focus { outline: 2px solid var(--marca); outline-offset: 0; border-color: var(--marca); }
.formulario input:disabled { background: var(--fundo); color: var(--texto-2); }
button.botao { cursor: pointer; font-family: inherit; }
.botao-grande { padding: .75rem 1rem; font-size: 1rem; margin-top: .3rem; }
.botao-sec { background: var(--marca-claro); color: var(--marca-escuro); }
.botao-sec:hover { background: #d3ecde; }
.botao-perigo { background: #fff; color: var(--vermelho); border: 1px solid #f1c4c4; }
.botao-perigo:hover { background: #fbeaea; }
.painel-estreito { max-width: 480px; }

.usuarios-layout { display: grid; grid-template-columns: 360px 1fr; gap: 1.25rem; align-items: start; }
.usuarios-layout .painel-grupo + .painel-grupo { margin-top: 0; }
.lista-usuarios { list-style: none; margin: 0; padding: 0; }
.lista-usuarios li { padding: .9rem 0; border-bottom: 1px solid var(--borda); display: flex; flex-direction: column; gap: .6rem; }
.lista-usuarios li:last-child { border-bottom: 0; }
.lu-info { display: flex; align-items: center; gap: .7rem; }
.lu-info > div { display: flex; flex-direction: column; }
.lu-login { font-size: .82rem; color: var(--texto-2); }
.selo { margin-left: auto; font-size: .75rem; font-weight: 700; padding: .2rem .6rem; border-radius: 99px; background: var(--fundo); color: var(--texto-2); }
.selo-admin { background: var(--marca-claro); color: var(--marca-escuro); }
.lu-acoes { display: flex; flex-wrap: wrap; gap: .5rem; padding-left: 3.1rem; }
.form-linha { display: flex; gap: .5rem; flex: 1; min-width: 260px; }
.form-linha input { flex: 1; padding: .45rem .7rem; min-width: 0; }

.pagina-login {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1rem;
  background:
    radial-gradient(circle at 80% 0%, rgba(255,255,255,.14) 0, transparent 45%),
    linear-gradient(135deg, var(--marca) 0%, var(--marca-escuro) 60%, var(--marca-profundo) 100%);
}
.login-caixa {
  width: 100%; max-width: 400px; background: var(--superficie); border-radius: 20px;
  padding: 2rem 2rem 2.2rem; box-shadow: 0 24px 60px rgba(0, 0, 0, .25);
}
.login-logo { width: 220px; display: block; margin: 0 auto 1.2rem; }
.login-pre { text-align: center; margin: 0; font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--marca); }
.login-caixa h1 { text-align: center; font-size: 1.4rem; margin: .2rem 0 1.4rem; }
.login-rodape { color: rgba(255,255,255,.8); font-size: .8rem; margin-top: 1.2rem; }

@media (max-width: 900px) { .usuarios-layout { grid-template-columns: 1fr; } }
@media (max-width: 520px) {
  .menu-nome { display: none; }
  .lu-acoes { padding-left: 0; }
}

/* ===== Situação dos módulos (tela inicial) ===== */
:root { --mod-ficticio: #fff8dc; --mod-ficticio-borda: #f0dc9a; --mod-futuro: #fdeeee; --mod-futuro-borda: #f2c9c9; }
.card-ficticio { background: var(--mod-ficticio); border-color: var(--mod-ficticio-borda); }
.card-futuro { background: var(--mod-futuro); border-color: var(--mod-futuro-borda); cursor: default; }
.card-futuro h2 { color: #5b3a3a; }
.modulos { grid-auto-rows: 1fr; }  /* todos os cards com a mesma altura */
.card-modulo { display: flex; flex-direction: column; }
.card-modulo .rodape-card { margin-top: auto; }
.card-ficticio .rodape-card, .card-futuro .rodape-card { border-top-color: rgba(0, 0, 0, .08); }
.futuro-desc { margin: 1rem 0 1.25rem; color: var(--texto-2); font-size: .95rem; min-height: 2.9em; }
.selo-futuro {
  font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap;
  color: #9b2c2c; background: #fff; border: 1px solid var(--mod-futuro-borda); border-radius: 99px; padding: .2rem .6rem;
}
.legenda-modulos {
  list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem 1.6rem;
  margin: 2rem 0 0; padding: 1rem; font-size: .85rem; color: var(--texto-2);
  border-top: 1px solid var(--borda);
}
.legenda-modulos li { display: inline-flex; align-items: center; gap: .5rem; }
.legenda-modulos i { width: 1.1rem; height: 1.1rem; border-radius: 5px; border: 1px solid var(--borda); }
.lm-real { background: #fff; }
.lm-ficticio { background: var(--mod-ficticio); border-color: var(--mod-ficticio-borda) !important; }
.lm-futuro { background: var(--mod-futuro); border-color: var(--mod-futuro-borda) !important; }

/* ===== Módulo Agenda da expansão ===== */
.proxima-entrevista {
  display: flex; flex-direction: column; margin: 0 0 1.1rem; padding: .7rem .9rem;
  background: var(--marca-claro); border-radius: 10px; font-size: .88rem; color: var(--texto-2);
}
.proxima-entrevista strong { color: var(--texto); font-size: 1rem; }
.pe-rot { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--marca); }

/* Cores fixas por agente (ordem das abas) */
.ag0 { --ag: #0a934d; } .ag1 { --ag: #2f6fab; } .ag2 { --ag: #d9730d; }
.ag3 { --ag: #8e44ad; } .ag4 { --ag: #0f8b8d; } .ag5 { --ag: #c2417a; }

/* Botões de agente: dentro da faixa verde, com contraste invertido */
.faixa-com-chips { padding-bottom: 5.25rem; }
.chips { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1.1rem; }
.chip {
  display: inline-flex; align-items: center; gap: .5rem; padding: .3rem 1rem .3rem .3rem;
  background: rgba(0, 0, 0, .14); border: 2px solid rgba(255, 255, 255, .55); border-radius: 99px;
  text-decoration: none; color: #fff; font-weight: 600; transition: background .15s, border-color .15s;
}
.chip:hover { background: rgba(0, 0, 0, .24); border-color: #fff; }
.chip.ativo {
  background: #fff; color: var(--marca-profundo); border-color: #fff; font-weight: 800;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .22);
}
.avatar-cor { background: var(--ag, #0a934d); color: #fff; }
.avatar-todos { background: #fff; color: var(--marca); }
.chip.ativo .avatar-todos { background: var(--marca); color: #fff; }

/* Legenda da agenda geral */
.legenda-agentes { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem .6rem; margin: -.25rem 0 1rem; padding: 0; }
.legenda-agentes li {
  display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; color: var(--texto);
  background: var(--fundo); border-radius: 99px; padding: .25rem .7rem;
}
.legenda-agentes i { width: .7rem; height: .7rem; border-radius: 3px; background: var(--ag, #0a934d); }
.legenda-agentes strong { font-weight: 800; }

.kpis-4 { grid-template-columns: repeat(4, 1fr); }

.agenda-layout { display: grid; grid-template-columns: 1fr 300px; gap: 1.25rem; align-items: start; }
.agenda-layout > * { min-width: 0; }
.agenda-layout .painel-grupo + .painel-grupo { margin-top: 0; }

.semana-nav { display: flex; align-items: center; gap: .6rem; margin-bottom: 1rem; flex-wrap: wrap; }
.semana-nav h2 { min-width: 170px; text-align: center; }
.semana-nav .botao { padding: .35rem .8rem; font-size: 1.1rem; line-height: 1; }
.desativado { opacity: .35; pointer-events: none; }
.link-hoje { font-size: .85rem; font-weight: 600; }
.semana-total { margin-left: auto; font-size: .85rem; color: var(--texto-2); font-weight: 600; }

.grade-wrap { overflow-x: auto; }
table.grade { table-layout: fixed; min-width: 760px; border-collapse: separate; border-spacing: 0; font-size: .82rem; }
.grade th, .grade td { border-bottom: 1px solid var(--borda); border-right: 1px solid var(--borda); padding: 3px; vertical-align: top; }
.grade thead th {
  background: var(--superficie); text-transform: none; letter-spacing: 0; color: var(--texto);
  padding: .5rem .3rem; text-align: center; border-bottom: 2px solid var(--borda); border-radius: 0 !important;
}
.grade thead th.hoje { background: var(--marca); color: #fff; }
.g-dsem { display: block; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; opacity: .8; }
.g-dia { display: block; font-size: 1rem; font-weight: 800; }
.grade-hora { width: 58px; text-align: right !important; color: var(--texto-2); font-weight: 600; font-size: .75rem; padding: .35rem .5rem .35rem 0 !important; background: var(--superficie) !important; border-right: 2px solid var(--borda) !important; }
.grade tbody td, .grade tbody th { height: 48px; }
.grade td.fds, .grade th.fds { background: #f6f8f7; }
.grade td.hoje { background: #f0f9f4; }
.grade td.fora, .grade th.fora { background: repeating-linear-gradient(45deg, #f7f8f8, #f7f8f8 6px, #eff1f0 6px, #eff1f0 12px); color: var(--texto-2); }
.evento {
  height: 40px; background: color-mix(in srgb, var(--ag, #0a934d) 13%, #fff); border-left: 3px solid var(--ag, #0a934d); border-radius: 6px;
  padding: .25rem .4rem; display: flex; align-items: center; overflow: hidden;
}
.evento strong {
  font-size: .78rem; line-height: 1.2; color: var(--texto);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
/* Agenda geral: várias reuniões no mesmo horário, uma linha cada */
.grade-geral tbody td, .grade-geral tbody th { height: auto; min-height: 48px; }
.grade-geral tbody tr { height: 48px; }
.grade-geral .evento { height: auto; flex-direction: column; align-items: flex-start; padding: .2rem .4rem; }
.grade-geral .evento + .evento { margin-top: 3px; }
.grade-geral .evento strong { -webkit-line-clamp: 2; font-size: .74rem; }
.ev-agente { font-size: .66rem; font-weight: 700; color: color-mix(in srgb, var(--ag, #0a934d) 80%, #000); }
.grade tbody tr:hover { background: none; }

.agenda-lista { display: none; }
.al-dia { padding: .8rem 0; border-bottom: 1px solid var(--borda); }
.al-dia:last-child { border-bottom: 0; }
.al-dia h3 { text-transform: none; letter-spacing: 0; font-size: .95rem; color: var(--texto); margin: 0 0 .5rem; display: flex; align-items: center; gap: .5rem; }
.al-dia.hoje h3 { color: var(--marca); }
.al-dia ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.al-dia li { display: flex; align-items: center; gap: .7rem; background: color-mix(in srgb, var(--ag, #0a934d) 13%, #fff); border-left: 3px solid var(--ag, #0a934d); border-radius: 8px; padding: .5rem .7rem; }
.al-hora { font-weight: 800; color: var(--texto); font-size: .85rem; min-width: 3rem; }
.al-agente { margin-left: auto; font-size: .75rem; font-weight: 700; color: color-mix(in srgb, var(--ag, #0a934d) 80%, #000); }
.al-vazio { margin: 0; font-size: .85rem; color: var(--texto-2); }

.proximas ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .55rem; }
.proximas li { display: flex; gap: .75rem; align-items: center; }
.px-data {
  width: 46px; flex: none; text-align: center; border-radius: 10px; padding: .3rem 0;
  background: color-mix(in srgb, var(--ag, #0a934d) 13%, #fff); color: color-mix(in srgb, var(--ag, #0a934d) 75%, #000);
  border-left: 3px solid var(--ag, #0a934d); display: flex; flex-direction: column; line-height: 1.1;
}
.px-agente { font-weight: 700; color: color-mix(in srgb, var(--ag, #0a934d) 80%, #000); }
.px-data span { font-size: .65rem; font-weight: 700; text-transform: uppercase; }
.px-data strong { font-size: 1.15rem; }
.px-info { display: flex; flex-direction: column; min-width: 0; }
.px-info strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.px-info span { font-size: .8rem; color: var(--texto-2); }

@media (max-width: 1000px) {
  .agenda-layout { grid-template-columns: 1fr; }
  .kpis-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .grade-wrap { display: none; }
  .agenda-lista { display: block; }
  .semana-nav h2 { min-width: 0; flex: 1; font-size: 1rem; }
  .semana-total { margin-left: 0; width: 100%; text-align: center; }
}

/* ===== Ajustes para celular ===== */
.curto { display: none; }
.usuarios-layout > *, .status-grid > *, .resumos > * { min-width: 0; }
.formulario select { width: 100%; max-width: 100%; }

@media (max-width: 520px) {
  /* tabelas cabem na tela */
  table { font-size: .84rem; }
  th { white-space: normal; font-size: .66rem; padding: .55rem .45rem; }
  td { padding: .55rem .45rem; }
  .painel-grupo { padding: 1rem .85rem; }
  .opc { display: none; }
  .longo { display: none; }
  .curto { display: inline; }
  /* formulários */
  .form-linha { min-width: 0; flex-basis: 100%; }
  .lu-acoes form:not(.form-linha) { margin-left: auto; }
}

/* Rodapé */
.rodape {
  display: flex; align-items: center; justify-content: center; gap: .6rem;
  padding: 1.25rem; font-size: .8rem; color: var(--texto-2);
  border-top: 1px solid var(--borda); background: var(--superficie);
}
.rodape-simbolo { height: 26px; mix-blend-mode: multiply; }

/* Responsivo */
@media (max-width: 900px) {
  .status-grid { grid-template-columns: repeat(2, 1fr); }
  .resumos { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .conteudo { padding: 0 1rem 1.5rem; }
  .topo { padding: .6rem 1rem; }
  .marca img { height: 34px; }
  .atualizado { display: none; }
  .faixa { padding: 1.75rem 1rem 5rem; }
  h1 { font-size: 1.5rem; }
  .modulos { grid-template-columns: 1fr; }
  .card-status-num { font-size: 2rem; }
  .destaque-num { font-size: 3.2rem; }
}
