/* Módulo Apps (métricas do MaisQI): mesmo escuro e mesmas peças do módulo Vídeos (vd-*); aqui só o que é próprio
   (barras do tempo de uso, tabela de usuários, compras e ligas). Fontes em rem: seguem Ajustes › Aparência. */
.casca[data-area='apps'] .principal { background: #0D0D14; color-scheme: dark; }
.vd-ap-raiz .vd-kpis + .vd-kpis { margin-top: 8px; }
.vd-ap-raiz .vd-sync-linha { margin: 0 2px 12px; }
.vd-ap-raiz .vd-kpi b { font-size: 1.5rem; }

/* selos (status, Premium, teste) */
.vd-ap-selo { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 0.8125rem; font-weight: 650;
  border: 1px solid var(--vd-borda-n); color: var(--vd-ajuda); background: var(--vd-neutro2); white-space: nowrap; margin-left: 6px; vertical-align: 0.05em; }
.vd-ap-selo.vd-ap-ouro { border-color: rgba(212, 176, 98, .55); color: var(--vd-ouro-rc); background: rgba(212, 176, 98, .1); }
.vd-ap-selo.vd-ap-ok { border-color: rgba(34, 176, 125, .5); color: #7FE0B8; background: rgba(34, 176, 125, .1); }
.vd-ap-selo.vd-ap-aviso { border-color: rgba(232, 182, 76, .5); color: var(--vd-ouro); background: rgba(232, 182, 76, .08); }
.vd-ap-selo.vd-ap-mudo { color: var(--vd-mudo); }

/* tempo de uso: hoje / semana / mês */
.vd-ap-tempo-linha { display: grid; grid-template-columns: minmax(7.5rem, 1fr) auto; gap: 2px 12px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--vd-borda-n); }
.vd-ap-tempo-linha:last-of-type { border-bottom: 0; }
.vd-ap-tempo-rot { color: var(--vd-ajuda); font-size: 0.9375rem; }
.vd-ap-tempo-linha > b { font-size: 1.25rem; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.vd-ap-tempo-linha > .vd-sub { grid-column: 1 / -1; }

/* barras por dia */
.vd-ap-graf { margin-top: 10px; }
.vd-ap-graf-max { font-size: 0.75rem; color: var(--vd-mudo); text-align: right; margin-bottom: 4px; }
.vd-ap-barras { display: flex; align-items: stretch; gap: 3px; height: 9.5rem; padding-bottom: 1.4rem; position: relative; border-bottom: 1px solid #4A4363; }
.vd-ap-barra { flex: 1 1 0; min-width: 0; position: relative; display: flex; align-items: flex-end; }
.vd-ap-barra i { display: block; width: 100%; border-radius: 3px 3px 0 0; background: var(--vd-ciano); opacity: .85; }
.vd-ap-barra.vd-ap-hoje i { background: var(--vd-ouro-rc); opacity: 1; }
.vd-ap-barra.vd-ap-sem { background: repeating-linear-gradient(45deg, transparent 0 4px, rgba(74, 67, 99, .35) 4px 6px); border-radius: 3px 3px 0 0; }
.vd-ap-barra span { position: absolute; top: calc(100% + 0.3rem); left: 50%; transform: translateX(-50%); font-size: 0.6875rem; color: var(--vd-mudo); white-space: nowrap; }

/* usuários: tabela no computador, cartões no celular */
.vd-ap-legenda-tab { margin: 8px 2px; }
.vd-cartao.vd-ap-sem-pad { padding: 0; overflow: hidden; }
.vd-ap-tabela-box { overflow-x: auto; }
.vd-ap-tabela { width: 100%; border-collapse: collapse; font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
.vd-ap-tabela th { text-align: left; font-size: 0.8125rem; font-weight: 700; color: var(--vd-ajuda); text-transform: uppercase; letter-spacing: .05em;
  padding: 12px 14px; border-bottom: 1px solid var(--vd-borda-n); background: var(--vd-neutro2); position: sticky; top: 0; white-space: nowrap; }
.vd-ap-tabela td { padding: 11px 14px; border-bottom: 1px solid var(--vd-borda-n); white-space: nowrap; }
.vd-ap-tabela tbody tr { cursor: pointer; }
.vd-ap-tabela tbody tr:hover, .vd-ap-tabela tbody tr:focus-visible { background: rgba(255, 255, 255, .035); outline: none; }
.vd-ap-tabela .vd-ap-n { text-align: right; }
.vd-ap-tabela .vd-ap-nome { font-weight: 650; max-width: 18rem; overflow: hidden; text-overflow: ellipsis; }
.vd-ap-cartoes { display: none; flex-direction: column; gap: 8px; }
.vd-ap-pessoa { display: flex; flex-direction: column; gap: 6px; width: 100%; text-align: left; padding: 12px 14px; border-radius: 14px; background: var(--vd-neutro); border: 1px solid var(--vd-borda-n); }
.vd-ap-pessoa-topo { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.vd-ap-pessoa-topo strong { font-size: 1rem; }
.vd-ap-pessoa-topo .vd-ap-selo { margin-left: 0; }
.vd-ap-pessoa-linha { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 0.9375rem; color: var(--vd-texto-forte); }
.vd-ap-pessoa-linha.vd-sub { color: var(--vd-mudo); font-size: 0.875rem; }

/* ficha da pessoa */
.vd-ap-defs { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: 10px 16px; margin: 6px 0 4px; }
.vd-ap-defs > div { display: flex; flex-direction: column; gap: 2px; }
.vd-ap-defs b { font-size: 1rem; }

/* compras */
.vd-ap-compra { padding: 10px 12px; border-radius: 12px; background: var(--vd-neutro2); border: 1px solid var(--vd-borda-n); }
.vd-ap-compra-topo { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.vd-ap-compra-topo strong { font-size: 0.9375rem; }
.vd-ap-valor { font-variant-numeric: tabular-nums; color: var(--vd-ouro-rc); white-space: nowrap; }
.vd-ap-compra-linha { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; margin-top: 4px; font-size: 0.875rem; color: var(--vd-mudo); }
.vd-ap-compra-linha .vd-ap-selo { margin-left: 0; }

/* ligas */
.vd-ap-liga { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.vd-ap-liga li { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr) auto auto; gap: 10px; align-items: baseline; padding: 8px 2px; border-bottom: 1px solid var(--vd-borda-n); font-variant-numeric: tabular-nums; }
.vd-ap-liga li:last-child { border-bottom: 0; }
.vd-ap-pos { color: var(--vd-mudo); font-weight: 700; }
.vd-ap-liga-nome { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 900px) {
  .vd-ap-raiz .vd-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vd-cartao.vd-ap-sem-pad { display: none; }
  .vd-ap-cartoes { display: flex; }
  .vd-ap-barras { height: 8rem; }
  .casca[data-area='apps'] .topo-subs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 0.4rem 16px 0.5rem; scroll-padding-inline: 16px; }
  .casca[data-area='apps'] .topo-subs .pilula { flex: none; height: 3rem; padding: 0 1rem; border-radius: 999px !important; border-width: 1px !important; font-size: 0.9375rem; }
  .casca[data-area='apps'] .topo-subs .pilula::after { inset: 0; }
}
@media (min-width: 901px) {
  .vd-ap-raiz .vd-kpi b { font-size: 1.75rem; }
}
