/* Painel dos BDRs da Atlaas Clínica: tela escura, nas cores da marca, feita para ficar aberta (TV ou computador). */
:root {
  color-scheme: dark;
  --fundo: #040A22;
  --cartao: #0A1438;
  --cartao-2: #0E1A46;
  --linha: rgba(253, 253, 253, .1);
  --texto: #F2F3F8;
  --apagado: #9AA1C2;
  --laranja: #E34013;
  --laranja-claro: #FF7A4D;
  --b1: #3B82F6;
  --b2: #FF7A4D;
  --b3: #22C55E;
  --b4: #A855F7;
  --bom: #4ADE80;
  --atencao: #FACC15;
  --ruim: #F87171;
  --raio: 14px;
  --titulo: "Exo 2", "Segoe UI", system-ui, sans-serif;
  --corpo: "DM Sans", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--fundo); color: var(--texto); font-family: var(--corpo); font-size: 15px; }
body { padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px)); }
[hidden] { display: none !important; }

.pb { max-width: 1600px; margin: 0 auto; padding-block: 20px 32px; display: flex; flex-direction: column; gap: 16px; }
.pb-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.pb-marca { display: flex; align-items: center; gap: 16px; min-width: 0; }
.pb-marca img { width: 110px; height: auto; flex: none; }
.pb-marca h1 { margin: 0; font-family: var(--titulo); font-weight: 700; font-size: 22px; }
.pb-sub { margin: 2px 0 0; color: var(--apagado); font-size: 14px; }
.pb-status { margin: 0; display: flex; align-items: center; gap: 8px; color: var(--apagado); font-size: 13px; }
.pb-status .ponto { width: 9px; height: 9px; border-radius: 50%; background: var(--bom); box-shadow: 0 0 0 4px rgba(74, 222, 128, .15); }
.pb-status.buscando .ponto { background: var(--laranja-claro); box-shadow: 0 0 0 4px rgba(255, 122, 77, .18); animation: pulso 1.2s ease-in-out infinite; }
.pb-status.erro .ponto { background: var(--ruim); box-shadow: 0 0 0 4px rgba(248, 113, 113, .18); }
@keyframes pulso { 50% { opacity: .5; } }
.pb-acoes { display: flex; align-items: center; gap: 14px; }
.pb-atualizar { font: inherit; font-weight: 700; font-size: 14px; background: var(--laranja); color: #fff; border: 0; border-radius: 999px; padding: 9px 18px; cursor: pointer; box-shadow: 0 6px 18px rgba(227, 64, 19, .3); }
.pb-atualizar:hover { background: #F2521F; }
.pb-atualizar:disabled { cursor: progress; opacity: .6; box-shadow: none; }
.pb-atualizar:focus-visible { outline: 2px solid var(--laranja-claro); outline-offset: 2px; }
.pb-aviso { margin: 0; padding: 10px 14px; border-radius: 10px; background: rgba(248, 113, 113, .12); border: 1px solid rgba(248, 113, 113, .35); color: #FCA5A5; font-size: 14px; }

.pb-sec { margin: 4px 0 10px; font-family: var(--titulo); font-weight: 700; font-size: 18px; }
.pb-sec span { color: var(--apagado); font-weight: 500; font-size: 14px; margin-left: 6px; }

/* quadro do mês: um quadro só, a empresa toda, e cada BDR embaixo */
.pb-mes-sec .pb-sec { margin: 0; }
.pb-mes { display: flex; flex-direction: column; gap: 12px; }
.pb-mes-topo { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pb-mes-kpi { background: var(--cartao-2); border: 1px solid var(--linha); border-left: 4px solid var(--cor); border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; min-width: 0; }
.pb-mes-kpi .r { font-size: 13px; color: var(--apagado); display: flex; align-items: center; gap: 7px; }
.pb-mes-kpi .r i { width: 14px; height: 3px; border-radius: 2px; background: var(--cor); }
.pb-mes-kpi b { font-family: var(--titulo); font-weight: 800; font-size: 32px; line-height: 1.15; font-variant-numeric: tabular-nums; color: var(--cor); }
.pb-mes-kpi small { font-size: 12px; color: var(--apagado); }
.pb-mes-graf svg { width: 100%; height: auto; display: block; }
.pb-mes-graf .g { stroke: rgba(253, 253, 253, .08); stroke-width: 1; }
.pb-mes-graf .hoje { stroke: var(--laranja-claro); stroke-width: 1; stroke-dasharray: 3 3; opacity: .55; }
.pb-mes-graf text { fill: var(--apagado); font-family: var(--corpo); font-size: 11px; }
.pb-mes-graf .ey { text-anchor: end; }
.pb-mes-graf .ed { text-anchor: start; fill: #4ADE80; }
.pb-mes-graf .ex { text-anchor: middle; }
.pb-mes-graf .hojex { fill: var(--laranja-claro); font-weight: 700; }
.pb-mes-ind { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; min-width: 520px; }
.pb-mes-ind th, .pb-mes-ind td { padding: 8px 10px; text-align: right; border-bottom: 1px solid var(--linha); white-space: nowrap; }
.pb-mes-ind th:first-child, .pb-mes-ind td:first-child { text-align: left; }
.pb-mes-ind th { font-size: 12px; font-weight: 600; color: var(--apagado); }
.pb-mes-ind td:first-child { font-family: var(--titulo); font-weight: 700; font-size: 15px; }
.pb-mes-ind td:first-child i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--cor); margin-right: 8px; }
.pb-mes-ind b { font-family: var(--titulo); font-size: 20px; }
.pb-mes-ind small { color: var(--apagado); font-size: 12px; }
.pb-mes-ind td.lider b { color: var(--laranja-claro); }
.pb-mes-ind td.lider b::before { content: "▲ "; font-size: 11px; }

/* totais do time */
.pb-time { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 10px; margin-bottom: 12px; }
.pb-kpi { background: linear-gradient(180deg, var(--cartao-2), var(--cartao)); border: 1px solid var(--linha); border-radius: var(--raio); padding: 12px 14px; min-width: 0; }
.pb-kpi .r { font-size: 12.5px; color: var(--apagado); }
.pb-kpi .v { font-family: var(--titulo); font-weight: 700; font-size: 28px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.pb-kpi .s { font-size: 12px; color: var(--apagado); font-variant-numeric: tabular-nums; }

/* um cartão por BDR */
.pb-bdrs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 12px; }
.pb-bdr { background: var(--cartao); border: 1px solid var(--linha); border-top: 3px solid var(--cor, var(--b1)); border-radius: var(--raio); padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pb-bdr-topo { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.pb-bdr h3 { margin: 0; font-family: var(--titulo); font-weight: 700; font-size: 20px; }
.pb-vivo { font-size: 13px; color: var(--apagado); display: flex; align-items: center; gap: 7px; }
.pb-vivo .ponto { width: 8px; height: 8px; border-radius: 50%; background: var(--apagado); }
.pb-vivo.bom .ponto { background: var(--bom); }
.pb-vivo.atencao .ponto { background: var(--atencao); }
.pb-vivo.ruim .ponto { background: var(--ruim); }
.pb-vivo.ruim { color: #FCA5A5; }
.pb-grade { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pb-m { background: var(--cartao-2); border-radius: 10px; padding: 9px 10px; min-width: 0; }
.pb-m .r { font-size: 12px; color: var(--apagado); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-m .v { font-family: var(--titulo); font-weight: 700; font-size: 22px; font-variant-numeric: tabular-nums; }
.pb-m .s { font-size: 11.5px; color: var(--apagado); font-variant-numeric: tabular-nums; }
.pb-m.destaque .v { color: var(--laranja-claro); }

.pb-duas { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 12px; }
.pb-card { background: var(--cartao); border: 1px solid var(--linha); border-radius: var(--raio); padding: 16px 18px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.pb-card h2 { margin: 0; font-family: var(--titulo); font-weight: 600; font-size: 16px; }
.pb-nota { margin: 0; color: var(--apagado); font-size: 12.5px; line-height: 1.45; }
.pb-vazio { color: var(--apagado); font-size: 14px; margin: 4px 0; }

/* agenda */
.pb-dia { font-size: 12.5px; color: var(--apagado); text-transform: uppercase; letter-spacing: .06em; margin: 6px 0 4px; }
.pb-reuniao { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--linha); }
.pb-reuniao .h { font-family: var(--titulo); font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; }
.pb-reuniao .q { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pb-reuniao .q i { width: 9px; height: 9px; border-radius: 50%; background: var(--cor, var(--apagado)); flex: none; }
.pb-sit { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 10px; background: rgba(253, 253, 253, .08); color: var(--texto); white-space: nowrap; }
.pb-sit.realizada { background: rgba(74, 222, 128, .15); color: var(--bom); }
.pb-sit.no-show, .pb-sit.perdida { background: rgba(248, 113, 113, .15); color: var(--ruim); }
.pb-sit.aguardando { background: rgba(250, 204, 21, .14); color: var(--atencao); }

/* ligações por hora */
.pb-legenda { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--apagado); }
.pb-legenda span { display: inline-flex; align-items: center; gap: 6px; }
.pb-legenda i { width: 10px; height: 10px; border-radius: 3px; background: var(--cor); }
.pb-horas { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 6px; align-items: end; height: 190px; padding-top: 18px; }
.pb-hora { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; min-width: 0; }
.pb-hora .barras { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.pb-hora .barra { width: min(16px, 45%); background: var(--cor); border-radius: 4px 4px 0 0; position: relative; min-height: 2px; }
.pb-hora .barra b { position: absolute; top: -17px; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 600; color: var(--texto); font-variant-numeric: tabular-nums; }
.pb-hora .barra.zero { background: rgba(253, 253, 253, .1); }
.pb-hora .barra.zero b { display: none; }
.pb-hora .rot { font-size: 11.5px; color: var(--apagado); }
.pb-hora.agora .rot { color: var(--laranja-claro); font-weight: 700; }

/* semana */
.pb-tabela-rolo { overflow-x: auto; }
.pb-tabela { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; min-width: 760px; }
.pb-tabela th, .pb-tabela td { padding: 8px 10px; text-align: right; border-bottom: 1px solid var(--linha); white-space: nowrap; }
.pb-tabela th:first-child, .pb-tabela td:first-child { text-align: left; }
.pb-tabela thead th { font-size: 12px; font-weight: 600; color: var(--apagado); }
.pb-tabela thead tr:first-child th { font-family: var(--titulo); font-size: 14px; color: var(--texto); border-bottom: 2px solid var(--cor, var(--linha)); text-align: center; }
.pb-tabela tbody tr.hoje td { background: rgba(255, 122, 77, .07); }
.pb-tabela tbody tr.feriado td { color: var(--apagado); }
.pb-tabela tfoot td { font-weight: 700; border-bottom: 0; border-top: 2px solid var(--linha); }
.pb-tabela .sep { border-left: 1px solid var(--linha); }

@media (max-width: 980px) {
  .pb-duas { grid-template-columns: minmax(0, 1fr); }
  .pb-mes-topo { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .pb-grade { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pb-marca img { width: 84px; }
  .pb-marca h1 { font-size: 19px; }
  .pb-horas { gap: 3px; }
  .pb-hora .barra b { font-size: 10px; }
}
