/* css/busca.css — busca global (resultados agrupados) e ficha 360 em modal. Só variáveis do tema; carrega antes de shell.css */
.busca-resultados { max-height: min(70vh, 460px); right: auto; width: min(540px, calc(100vw - 24px)); }
.busca-grupo { padding: 8px 12px 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--soft); border-bottom: 1px solid var(--line); position: sticky; top: 0; }
.busca-linha { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.busca-linha .people-name { min-width: 0; overflow-wrap: anywhere; }
.busca-tipo { flex: none; font-size: 10.5px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--chip); color: var(--muted); }
.busca-sub { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.busca-chip { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--chip); color: var(--muted); white-space: nowrap; }
.busca-chip.on { background: color-mix(in srgb, var(--ext) 16%, transparent); color: var(--ext); }
.busca-chip.off { background: color-mix(in srgb, var(--inc-col) 14%, transparent); color: var(--inc-col); }
.busca-vazio { padding: 14px 12px; font-size: 12.5px; color: var(--muted); }

.ficha-overlay { display: none; position: fixed; inset: 0; z-index: 10000; align-items: center; justify-content: center; padding: 20px; background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(2px); }
.ficha-box { width: 100%; max-width: 860px; max-height: 92vh; overflow-y: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 48px rgba(0,0,0,.28); padding: 0 22px 22px; color: var(--ink); }
.ficha-bar { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: 12px 0 8px; background: var(--panel); }
.ficha-voltar, .ficha-fechar { background: none; border: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; border-radius: 6px; padding: 4px 8px; }
.ficha-fechar { font-size: 22px; line-height: 1; }
.ficha-voltar:hover, .ficha-fechar:hover { color: var(--ink); background: var(--soft); }
.ficha-head { display: flex; gap: 14px; align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.ficha-avatar { flex: none; width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.ficha-id { min-width: 0; }
.ficha-id h3 { margin: 0; font-size: 18px; line-height: 1.25; overflow-wrap: anywhere; }
.ficha-id p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.ficha-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.ficha-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 14px 0; }
.ficha-kpi { background: var(--soft); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; }
.ficha-kpi span { font-size: 10.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.ficha-kpi b { display: block; font-size: 20px; line-height: 1.25; }
.ficha-kpi small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.ficha-kpi.bad b { color: var(--inc-col); }
.ficha-sec { margin-top: 16px; }
.ficha-sec h4 { margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.ficha-sec h5 { margin: 10px 0 2px; font-size: 12px; color: var(--ink); }
.ficha-nota { margin: 0 0 6px; font-size: 12px; color: var(--muted); }
.ficha-texto { margin: 0 0 6px; font-size: 13px; line-height: 1.5; }
.ficha-linha { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 5px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.ficha-linha small { color: var(--muted); font-size: 11.5px; text-align: right; }
.ficha-linha a { color: var(--accent); text-decoration: none; }
.ficha-link { background: none; border: none; padding: 0; font: inherit; font-weight: 600; color: var(--accent); cursor: pointer; text-align: left; }
.ficha-link:hover { text-decoration: underline; }
.ficha-tbl { width: 100%; font-size: 12.5px; border-collapse: collapse; }
.ficha-tbl th, .ficha-tbl td { text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--line); }
.ficha-tbl th { font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.ficha-tickets { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.ficha-tk { display: grid; grid-template-columns: 96px 1fr auto; gap: 10px; align-items: baseline; padding: 6px 10px; font-size: 12px; border-bottom: 1px solid var(--line); }
.ficha-tk:last-child { border-bottom: none; }
.ficha-tk b { color: var(--accent); font-family: monospace; }
.ficha-tk span { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ficha-tk small { color: var(--muted); white-space: nowrap; }
.ficha-bars { display: flex; align-items: flex-end; gap: 6px; height: 90px; margin: 4px 0 10px; border-bottom: 1px solid var(--line); }
.ficha-bar-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; position: relative; }
.ficha-bar-col i { display: block; width: 100%; max-width: 28px; background: var(--accent); border-radius: 3px 3px 0 0; }
.ficha-bar-col span { position: absolute; bottom: -16px; font-size: 10px; color: var(--muted); }
.ficha-bars + .ficha-tickets { margin-top: 22px; }
@media (max-width: 640px) { .ficha-box { padding: 0 14px 16px; } .ficha-tk { grid-template-columns: 1fr; } }
