/* Intranet Primebid: identidade sobre o Metronic 8.2.9 (demo38).
   Carregado DEPOIS de style.bundle.css. Nunca editar os bundles em wwwroot/assets. */

/* No demo38 o primary é verde e o success é azul: primary vira o vermelho da marca e o success volta a ser verde. */
:root, [data-bs-theme=light] {
  --bs-primary: #E80514; --bs-primary-rgb: 232,5,20; --bs-primary-active: #C20411; --bs-primary-light: #FFECEE;
  --bs-primary-clarity: rgba(232,5,20,.2); --bs-primary-inverse: #fff; --bs-text-primary: #E80514;
  --bs-link-color: #E80514; --bs-link-color-rgb: 232,5,20; --bs-link-hover-color: #C20411; --bs-link-hover-color-rgb: 194,4,17;
  --bs-focus-ring-color: rgba(232,5,20,.25);
  --bs-component-active-bg: #E80514; --bs-component-hover-color: #E80514; --bs-component-checked-bg: #E80514;
  --bs-menu-link-color-hover: #E80514; --bs-menu-link-color-show: #E80514; --bs-menu-link-color-here: #E80514; --bs-menu-link-color-active: #E80514;
  --bs-success: #17C653; --bs-success-rgb: 23,198,83; --bs-success-active: #04B440; --bs-success-light: #DFFFEA;
  --bs-success-clarity: rgba(23,198,83,.2); --bs-text-success: #17C653;
}
[data-bs-theme=dark] { /* depois do bloco claro: os dois seletores casam no <html> */
  --bs-primary: #E80514; --bs-primary-rgb: 232,5,20; --bs-primary-active: #FF2E3B; --bs-text-primary: #FF2E3B;
  --bs-primary-clarity: rgba(232,5,20,.2); --bs-primary-light: #2A1215;
  --bs-link-color: #FF2E3B; --bs-link-color-rgb: 255,46,59; --bs-link-hover-color: #FF5A64; --bs-link-hover-color-rgb: 255,90,100;
  --bs-component-active-bg: #E80514; --bs-component-hover-color: #FF2E3B; --bs-component-checked-bg: #E80514;
  --bs-menu-link-color-hover: #FF2E3B; --bs-menu-link-color-show: #FF2E3B; --bs-menu-link-color-here: #FF2E3B; --bs-menu-link-color-active: #FF2E3B;
  --bs-success: #00A261; --bs-success-rgb: 0,162,97; --bs-success-active: #01BF73; --bs-success-light: #1F212A;
  --bs-success-clarity: rgba(0,162,97,.2); --bs-text-success: #00A261;
}

/* Verde escrito direto no bundle (Bootstrap compilado), que não lê variável */
.form-check-input:checked, .form-check-input[type=checkbox]:indeterminate { background-color: var(--bs-primary); border-color: var(--bs-primary); }
.nav-pills { --bs-nav-pills-link-active-bg: var(--bs-primary); }
.progress { --bs-progress-bar-bg: var(--bs-primary); }

/* Validação do servidor: a mensagem sai no toastr; o campo com erro fica com a borda vermelha (classe gerada pelo tag helper) */
.input-validation-error { border-color: var(--bs-danger) !important; }

/* Barra de meta com o marcador "esperado hoje" (o Metronic não tem) */
.meta-barra { position: relative; height: 8px; border-radius: 4px; background: var(--bs-gray-200); }
.meta-barra > .meta-feito { height: 8px; border-radius: 4px; max-width: 100%; }
.meta-barra > .meta-esperado { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--bs-gray-800); }

/* Foto do Google por cima das iniciais (Views/Shared/_Avatar.cshtml) */
.avatar-foto { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* Cor de cada app de origem dos links (Modelo/Documentos.cs, App.Do) */
.app-docs { --app: #4285F4; } .app-planilha { --app: #0F9D58; } .app-apresentacao { --app: #F4B400; } .app-formulario { --app: #7248B9; }
.app-drive { --app: #5F6368; } .app-clickup { --app: #7B68EE; } .app-notion { --app: var(--bs-gray-900); } .app-figma { --app: #F24E1E; }
.app-youtube { --app: #FF0000; } .app-link { --app: var(--bs-gray-600); }
.app-icone { background: color-mix(in srgb, var(--app) 14%, transparent) !important; }
.app-icone i, .app-selo i { color: var(--app) !important; }

/* Explorador de documentos (Views/Documentos): visual próprio, fora dos componentes do Metronic.
   Lado esquerdo: busca + árvore (pastas e links juntos); direito: prévia do link aberto. Cada lado rola sozinho. */
.exp {
  --exp-borda: var(--bs-gray-200); --exp-lado: var(--bs-gray-100); --exp-guia: var(--bs-gray-300); --exp-texto: var(--bs-gray-800);
  display: grid; grid-template-columns: 340px minmax(0, 1fr); height: calc(100dvh - 170px); min-height: 560px;
  background: var(--bs-body-bg); border: 1px solid var(--exp-borda); border-radius: 18px; overflow: hidden;
}
.exp-lado { display: flex; flex-direction: column; min-height: 0; background: var(--exp-lado); border-right: 1px solid var(--exp-borda); }
.exp-topo { display: flex; gap: .4rem; padding: .85rem .85rem .2rem; }
.exp-busca { flex: 1; min-width: 0; display: flex; align-items: center; gap: .5rem; height: 36px; margin: 0; padding: 0 .55rem 0 .7rem; border: 1px solid var(--exp-borda); border-radius: 10px; background: var(--bs-body-bg); color: var(--bs-gray-500); cursor: text; transition: border-color .15s, box-shadow .15s; }
.exp-busca:focus-within { border-color: var(--bs-primary); box-shadow: 0 0 0 3px var(--bs-primary-light); }
.exp-busca i { font-size: 16px; }
.exp-busca input { flex: 1; width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--bs-gray-900); font-size: 14px; }
.exp-busca input::-webkit-search-cancel-button { display: none; }
kbd.exp-kbd { padding: 1px 6px; border: 1px solid var(--bs-gray-300); border-radius: 5px; background: var(--bs-body-bg); box-shadow: none; color: var(--bs-gray-600); font-family: inherit; font-size: 11px; font-weight: 500; }
.exp-secao { display: flex; justify-content: space-between; padding: .8rem 1.1rem .35rem; font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--bs-gray-500); }

/* árvore: linhas de 30px; o recuo e a guia de nível vêm do .exp-filhos (aninhado) */
.exp-arvore { flex: 1; overflow-y: auto; padding: 0 .5rem 1rem; scrollbar-width: thin; scrollbar-color: var(--bs-gray-300) transparent; }
.exp-arvore::-webkit-scrollbar { width: 8px; }
.exp-arvore::-webkit-scrollbar-thumb { background: var(--bs-gray-300); border: 2px solid var(--exp-lado); border-radius: 8px; }
.exp-pasta > summary { list-style: none; }
.exp-pasta > summary::-webkit-details-marker { display: none; }
.exp-filhos { margin-left: 15px; padding-left: 6px; border-left: 1px solid var(--exp-guia); }
.exp-linha, .exp-link { display: flex; align-items: center; gap: .4rem; margin: 1px 0; border-radius: 8px; color: var(--exp-texto); font-size: 13.5px; cursor: pointer; transition: background .12s, box-shadow .12s; }
.exp-linha { height: 32px; padding: 0 .3rem 0 .4rem; }
.exp-link { min-height: 40px; padding: .3rem .45rem; gap: .55rem; text-decoration: none; }
.exp-linha:hover, .exp-link:hover { background: var(--bs-body-bg); box-shadow: 0 0 0 1px var(--exp-borda); color: var(--bs-gray-900); }
.exp-linha:focus-visible, .exp-link:focus-visible { outline: 2px solid var(--bs-primary); outline-offset: -2px; }
.exp-seta { width: 14px; height: 14px; flex-shrink: 0; fill: none; stroke: var(--bs-gray-500); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.exp-pasta[open] > summary .exp-seta { transform: rotate(90deg); }
.exp-pasta.vazia > summary .exp-seta { visibility: hidden; }
.exp-ico { width: 16px; height: 16px; flex-shrink: 0; fill: none; stroke: var(--bs-gray-600); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.exp-ico-aberta, .exp-pasta[open]:not(.vazia) > summary .exp-ico-fechada { display: none; }
.exp-pasta[open]:not(.vazia) > summary .exp-ico-aberta { display: block; }
.exp-pasta.vazia > summary .exp-ico, .exp-pasta.vazia > summary .exp-nome { opacity: .55; }
.exp-nome { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.exp-pasta.principal > summary .exp-nome { font-weight: 600; color: var(--bs-gray-900); }
.exp-inicial { width: 20px; height: 20px; flex-shrink: 0; display: grid; place-items: center; border-radius: 6px; background: var(--bs-primary-light); color: var(--bs-primary); font-size: 11px; font-weight: 700; }
.exp-qtd { padding-right: .2rem; font-size: 11.5px; color: var(--bs-gray-500); }
.exp-acoes { display: none; gap: 2px; }
.exp-linha:hover .exp-acoes, .exp-linha:focus-within .exp-acoes, .exp-acoes:has(.show) { display: inline-flex; }
.exp-linha:hover .exp-qtd, .exp-linha:focus-within .exp-qtd, .exp-linha:has(.exp-acoes .show) .exp-qtd { display: none; }
.exp-mini { width: 22px; height: 22px; display: inline-grid; place-items: center; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--bs-gray-600); }
.exp-mini i { font-size: 15px; color: inherit; }
.exp-mini:hover, .exp-mini.show { background: var(--exp-lado); box-shadow: 0 0 0 1px var(--exp-borda); color: var(--bs-gray-900); }
.exp-link.ativo { background: var(--bs-primary-light); box-shadow: none; }
.exp-link.ativo .exp-link-titulo { color: var(--bs-primary); }
.exp-app { width: 22px; height: 22px; flex-shrink: 0; display: grid; place-items: center; border-radius: 6px; }
.exp-app i { font-size: 13px; }
.exp-link-texto { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.exp-link-titulo { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.exp-link-app { font-size: 11.5px; color: var(--bs-gray-500); }
.exp-nada { margin: 0; padding: 1rem .8rem; font-size: 13.5px; color: var(--bs-gray-500); }

/* menu do ⋯ e do + (o KTMenu abre e fecha; aqui só a aparência) */
.exp-menu.menu-sub-dropdown { min-width: 210px; padding: 5px; border: 1px solid var(--exp-borda); border-radius: 12px; box-shadow: 0 12px 32px rgba(0, 0, 0, .12); }
.exp-menu .menu-item { padding: 0; }
.exp-menu .menu-link { display: flex; align-items: center; gap: .6rem; padding: .45rem .6rem; border-radius: 8px; color: var(--bs-gray-800); font-size: 13.5px; font-weight: 500; }
.exp-menu .menu-link i { font-size: 16px; color: var(--bs-gray-600); }
.exp-menu .menu-link:hover { background: var(--exp-lado) !important; color: var(--bs-gray-900) !important; }
.exp-menu .exp-perigo-item, .exp-menu .exp-perigo-item i, .exp-menu .exp-perigo-item:hover { color: var(--bs-danger) !important; }
.exp-sep { height: 1px; margin: 4px 6px; background: var(--exp-borda); }

/* painel da direita */
.exp-painel { display: flex; flex-direction: column; min-width: 0; min-height: 0; transition: opacity .15s; }
.exp-painel.carregando { opacity: .45; }
.exp-cabecalho { display: flex; align-items: flex-start; gap: 1rem; padding: .85rem 1.25rem .8rem; border-bottom: 1px solid var(--exp-borda); }
.exp-titulo { flex: 1; min-width: 0; }
.exp-caminho { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--bs-gray-500); }
.exp-titulo h1 { margin: .1rem 0 .4rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 18px; font-weight: 600; color: var(--bs-gray-900); }
.exp-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: 12px; color: var(--bs-gray-500); }
.exp-selo { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .5rem; border-radius: 6px; font-weight: 600; color: var(--app); }
.exp-selo i { font-size: 12px; }
.exp-botoes { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.exp-grupo { display: flex; overflow: hidden; border: 1px solid var(--exp-borda); border-radius: 10px; }
.exp-grupo form { display: flex; margin: 0; }
.exp-grupo > * + * { border-left: 1px solid var(--exp-borda); }
.exp-icone-btn { width: 34px; height: 34px; flex-shrink: 0; display: inline-grid; place-items: center; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--bs-gray-600); transition: background .12s, color .12s; }
.exp-icone-btn i { font-size: 16px; color: inherit; }
.exp-icone-btn:hover { background: var(--exp-lado); color: var(--bs-gray-900); }
.exp-icone-btn-borda { width: 36px; height: 36px; border: 1px solid var(--exp-borda); border-radius: 10px; background: var(--bs-body-bg); }
.exp-perigo:hover { background: var(--bs-danger-light); color: var(--bs-danger); }
.exp-btn { display: inline-flex; align-items: center; gap: .45rem; height: 34px; padding: 0 .9rem; border: 1px solid var(--bs-gray-300); border-radius: 10px; background: var(--bs-body-bg); color: var(--bs-gray-900); font-size: 13.5px; font-weight: 600; white-space: nowrap; transition: background .12s, border-color .12s, box-shadow .12s; }
.exp-btn i { font-size: 15px; color: inherit; }
.exp-btn:hover { border-color: var(--bs-gray-400); box-shadow: 0 2px 6px rgba(0, 0, 0, .08); color: var(--bs-gray-900); }
.exp-btn-principal { border-color: transparent; background: var(--bs-primary); color: var(--bs-primary-inverse); }
.exp-btn-principal:hover { border-color: transparent; background: var(--bs-primary-active); color: var(--bs-primary-inverse); }
.exp-descricao { margin: 0; padding: .6rem 1.25rem; border-bottom: 1px solid var(--exp-borda); font-size: 13.5px; color: var(--bs-gray-700); }
.exp-previa { flex: 1; min-height: 0; background: var(--exp-lado); }
.exp-previa iframe { display: block; width: 100%; height: 100%; border: 0; }
.exp-dica { display: flex; align-items: center; gap: .4rem; padding: .45rem 1.25rem; border-top: 1px solid var(--exp-borda); font-size: 12px; color: var(--bs-gray-500); }
.exp-dica i { font-size: 14px; }

/* estado vazio do painel e cartão de "sem prévia" */
.exp-centro { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; padding: 2rem; text-align: center; }
.exp-centro h2 { margin: 0; font-size: 18px; font-weight: 600; color: var(--bs-gray-900); }
.exp-centro p { max-width: 320px; margin: 0 0 .9rem; font-size: 14px; line-height: 1.5; color: var(--bs-gray-600); }
.exp-centro-lado { height: auto; padding: 2rem 1rem; }
.exp-app-grande { width: 56px; height: 56px; border-radius: 16px; margin-bottom: .6rem; }
.exp-app-grande i { font-size: 26px; }
.exp-pilha { display: flex; margin-bottom: 1rem; }
.exp-pilha .exp-app { width: 48px; height: 48px; border: 2px solid var(--bs-body-bg); border-radius: 14px; }
.exp-pilha .exp-app i { font-size: 22px; }
.exp-pilha .exp-app:nth-child(1) { transform: rotate(-8deg); }
.exp-pilha .exp-app:nth-child(2) { position: relative; z-index: 1; margin-left: -10px; }
.exp-pilha .exp-app:nth-child(3) { margin-left: -10px; transform: rotate(8deg); }
.exp-dica-kbd { margin-top: .9rem; font-size: 12px; color: var(--bs-gray-500); }
.exp-recentes { width: 100%; max-width: 380px; margin-top: 1.5rem; text-align: left; }

@media (hover: none) { .exp-acoes { display: inline-flex; } .exp-qtd { display: none; } } /* sem mouse (celular): ações sempre à vista */
@media (max-width: 991.98px) { /* celular: ou a lista, ou o documento; o "voltar" do painel volta para a lista */
  .exp { grid-template-columns: 1fr; height: auto; min-height: 0; }
  .exp.com-previa .exp-lado, .exp:not(.com-previa) .exp-painel { display: none; }
  .exp-lado { border-right: 0; }
  .exp-previa { flex: none; height: 75dvh; }
  .exp-cabecalho { flex-wrap: wrap; padding: .75rem 1rem; }
  .exp-titulo { order: 1; flex-basis: calc(100% - 50px); }
  .exp-botoes { order: 2; width: 100%; }
  .exp-botoes .exp-btn { margin-left: auto; }
}

/* O Metronic não tem min-w-0: sem ele, item flex com text-truncate não encolhe e empurra o resto para fora do card */
.min-w-0 { min-width: 0 !important; }

/* Cartões de opção (radio .btn-check + .btn): o foco do Bootstrap some com o tema; sem isto, quem usa teclado não vê onde está */
.btn-check:focus-visible + .btn { outline: 2px solid var(--bs-primary); outline-offset: 2px; }

/* Organograma: árvore horizontal com ul/li (o Metronic não tem) */
.org { overflow-x: auto; padding-bottom: 2rem; }
.org ul { display: flex; justify-content: center; position: relative; margin: 0; padding: 1.25rem 0 0; }
.org > ul { padding-top: 0; width: max-content; min-width: 100%; } /* sem isso o lado esquerdo da árvore larga fica cortado e sem rolagem */
.org li { list-style: none; position: relative; padding: 1.25rem .4rem 0; text-align: center; }
.org li::before, .org li::after { content: ""; position: absolute; top: 0; right: 50%; width: 50%; height: 1.25rem; border-top: 1px solid var(--bs-gray-400); }
.org li::after { right: auto; left: 50%; border-left: 1px solid var(--bs-gray-400); }
.org li:only-child { padding-top: 0; }
.org li:only-child::before, .org li:only-child::after, .org > ul > li::before, .org > ul > li::after { display: none; }
.org > ul > li { padding-top: 0; }
.org li:first-child::before, .org li:last-child::after { border: 0; }
.org li:last-child::before { border-right: 1px solid var(--bs-gray-400); }
.org ul ul::before { content: ""; position: absolute; top: 0; left: 50%; height: 1.25rem; border-left: 1px solid var(--bs-gray-400); }
.org .pessoa { display: inline-block; min-width: 11rem; max-width: 15rem; }
