/* === COMPONENTS — Bottom sheet, tables, avatars, progress bars, ninebox, risk, alerts, spans, heatmap, funnel, costs, bands, pulse, health ring, animations === */

/* BOTTOM SHEET */
.sheet-overlay{position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:900;opacity:0;pointer-events:none;transition:opacity .3s ease;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}.sheet-overlay.open{opacity:1;pointer-events:auto}
.sheet{position:fixed;bottom:0;left:0;right:0;z-index:910;background:var(--bg-secondary);border-radius:20px 20px 0 0;box-shadow:0 -8px 40px rgba(0,0,0,.25),0 -1px 0 var(--glass-border);transform:translateY(100%);transition:transform .35s cubic-bezier(.32,.72,0,1);max-height:88vh;display:flex;flex-direction:column;backdrop-filter:blur(16px);border-top:1px solid var(--glass-border)}.sheet.open{transform:translateY(0)}
.sheet-handle{width:36px;height:4px;border-radius:2px;background:var(--text-tertiary);opacity:.3;margin:10px auto 0;flex-shrink:0}
.sheet-header{display:flex;align-items:center;justify-content:space-between;padding:1rem 1.25rem .5rem;flex-shrink:0}.sheet-title{font-size:1.05rem;font-weight:700;letter-spacing:-.3px}
.sheet-close{width:32px;height:32px;border-radius:50%;border:none;background:var(--bg-tertiary);color:var(--text-secondary);display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:1rem;transition:all var(--transition)}.sheet-close:hover{background:var(--danger-bg);color:var(--danger)}
.sheet-body{padding:.5rem 1.25rem 2rem;overflow-y:auto;-webkit-overflow-scrolling:touch;flex:1}.sheet-body::-webkit-scrollbar{width:4px}.sheet-body::-webkit-scrollbar-thumb{background:linear-gradient(180deg,#0891b2,#14b8a6);border-radius:2px}
.sheet-kpi-row{display:grid;grid-template-columns:repeat(4,1fr);gap:.4rem;margin-bottom:1rem}.sheet-kpi-mini{background:var(--bg-tertiary);border-radius:10px;padding:.55rem .3rem;text-align:center;overflow:hidden}.sheet-kpi-mini .val{font-size:1.25rem;font-weight:700;font-family:'Space Mono',monospace;white-space:nowrap}.sheet-kpi-mini .lbl{font-size:.72rem;text-transform:uppercase;letter-spacing:.03em;color:var(--text-secondary);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sheet-chart{height:200px;margin-bottom:1rem;position:relative}.sheet-chart canvas{width:100%!important;height:100%!important}
.sheet-section-title{font-size:.72rem;font-weight:600;color:var(--text-tertiary);text-transform:uppercase;letter-spacing:.8px;margin:1rem 0 .5rem;padding-top:.5rem;border-top:1px solid var(--border)}
.sheet-list-item{display:flex;align-items:center;justify-content:space-between;padding:.45rem 0;border-bottom:1px solid var(--border);font-size:.78rem}.sheet-list-item:last-child{border-bottom:none}.sheet-list-name{font-weight:500}.sheet-list-val{font-family:'Space Mono',monospace;font-weight:600;font-size:.75rem}
.sheet-tag{display:inline-block;padding:.12rem .4rem;border-radius:5px;font-size:.62rem;font-weight:600;margin-right:.25rem}

.table-wrap{overflow-x:auto}.table-wrap table{width:100%;border-collapse:collapse;font-size:.78rem}.table-wrap th{text-align:left;padding:.6rem .65rem;color:var(--text-tertiary);font-weight:600;font-size:.65rem;text-transform:uppercase;letter-spacing:.8px;border-bottom:1px solid var(--border)}.table-wrap td{padding:.55rem .65rem;border-bottom:1px solid var(--border);vertical-align:middle}.table-wrap tr:last-child td{border-bottom:none}.table-wrap tbody tr:hover{background:var(--accent-light)}
.avatar{width:34px;height:34px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-size:.7rem;font-weight:700;color:#FFF;margin-right:.4rem;vertical-align:middle;flex-shrink:0}.status-dot{display:inline-block;width:7px;height:7px;border-radius:50%;margin-right:.3rem;vertical-align:middle}.status-dot.active{background:var(--success)}.status-dot.away{background:var(--warning)}.status-dot.off{background:var(--text-tertiary)}
.progress-bar{width:100%;height:6px;border-radius:3px;background:var(--bg-tertiary);overflow:hidden}.progress-bar-fill{height:100%;border-radius:3px;transition:width .8s ease}
.ninebox{display:grid;grid-template-columns:repeat(3,1fr);gap:4px;aspect-ratio:1}.ninebox-cell{border-radius:8px;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:.3rem;cursor:default;transition:transform .2s}.ninebox-cell:hover{transform:scale(1.03)}.ninebox-count{font-family:'Space Mono',monospace;font-size:1.6rem;font-weight:800;line-height:1}.ninebox-label{font-size:.68rem;text-transform:uppercase;letter-spacing:.5px;margin-top:.2rem;text-align:center;font-weight:700;line-height:1.1}
.risk-item{display:flex;align-items:center;gap:.6rem;padding:.5rem 0;border-bottom:1px solid var(--border)}.risk-item:last-child{border-bottom:none}.risk-name{font-size:.75rem;font-weight:500;min-width:85px}.risk-score{font-family:'Space Mono',monospace;font-size:.72rem;font-weight:700;min-width:35px;text-align:right}.risk-bar{height:6px;border-radius:3px;background:var(--bg-tertiary);overflow:hidden;flex:1}.risk-bar-fill{height:100%;border-radius:3px;transition:width .6s ease}
.alert-item{display:flex;gap:.55rem;padding:.45rem 0;border-bottom:1px solid var(--border);align-items:flex-start}.alert-item:last-child{border-bottom:none}.alert-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0;margin-top:.3rem}.alert-dot.red{background:var(--danger)}.alert-dot.yellow{background:var(--warning)}.alert-dot.blue{background:var(--accent)}.alert-text{font-size:.73rem;line-height:1.4;color:var(--text-secondary)}.alert-text strong{color:var(--text-primary);font-weight:600}
.span-item{display:flex;align-items:center;gap:.6rem;padding:.45rem 0;border-bottom:1px solid var(--border)}.span-item:last-child{border-bottom:none}.span-avatar{width:34px;height:34px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:.72rem;font-weight:700;color:#FFF;flex-shrink:0}.span-info{flex:1}.span-name{font-size:.75rem;font-weight:600}.span-dept{font-size:.62rem;color:var(--text-tertiary)}.span-ratio{font-family:'Space Mono',monospace;font-size:.8rem;font-weight:700}.span-ratio.good{color:var(--success)}.span-ratio.warn{color:var(--warning)}.span-ratio.bad{color:var(--danger)}
.heatmap{display:grid;gap:2px}.heatmap-cell{border-radius:3px;aspect-ratio:1;display:flex;align-items:center;justify-content:center;font-size:.62rem;font-weight:600;transition:transform .2s}.heatmap-cell:hover{transform:scale(1.12)}.heatmap-header{font-size:.62rem;color:var(--text-tertiary);font-weight:600;text-transform:uppercase;text-align:center;padding:.1rem}
.funnel-step{display:flex;align-items:center;gap:.6rem;padding:.45rem 0;border-bottom:1px solid var(--border)}.funnel-step:last-child{border-bottom:none}.funnel-bar{height:24px;border-radius:6px;display:flex;align-items:center;padding:0 .6rem;font-size:.68rem;font-weight:600;color:#FFF;min-width:32px}.funnel-label{font-size:.73rem;font-weight:500;min-width:90px}.funnel-val{font-family:'Space Mono',monospace;font-size:.72rem;font-weight:700;min-width:40px;text-align:right}
.cost-row{display:flex;justify-content:space-between;align-items:center;padding:.38rem 0;border-bottom:1px solid var(--border)}.cost-row:last-child{border-bottom:none}.cost-label{font-size:.7rem;color:var(--text-secondary)}.cost-val{font-family:'Space Mono',monospace;font-size:.7rem;font-weight:700}
.band-item{padding:.45rem 0;border-bottom:1px solid var(--border)}.band-item:last-child{border-bottom:none}.band-header{display:flex;justify-content:space-between;margin-bottom:.25rem}.band-name{font-size:.75rem;font-weight:500}.band-range{font-family:'Space Mono',monospace;font-size:.65rem;color:var(--text-tertiary)}.band-bar{height:8px;border-radius:4px;background:var(--bg-tertiary);position:relative}.band-fill{position:absolute;top:0;height:100%;border-radius:4px;opacity:.3}.band-marker{position:absolute;top:-3px;width:14px;height:14px;border-radius:50%;border:2px solid var(--bg-secondary);box-shadow:var(--shadow-sm)}
.pulse-question{padding:.5rem 0;border-bottom:1px solid var(--border)}.pulse-question:last-child{border-bottom:none}.pulse-q-text{font-size:.75rem;font-weight:500;margin-bottom:.3rem}.pulse-bars{display:flex;gap:2px;height:18px;border-radius:4px;overflow:hidden}.pulse-bar-seg{display:flex;align-items:center;justify-content:center;font-size:.62rem;font-weight:600;color:#FFF}.pulse-legend{display:flex;gap:.5rem;margin-top:.3rem}.pulse-legend-item{display:flex;align-items:center;gap:.15rem;font-size:.6rem;color:var(--text-tertiary)}.pulse-legend-dot{width:6px;height:6px;border-radius:50%}
.health-ring{position:relative;width:130px;height:130px;margin:0 auto .6rem}.health-center{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);text-align:center}.health-center .val{font-family:'Space Mono',monospace;font-size:1.7rem;font-weight:700;line-height:1}.health-center .lbl{font-size:.58rem;color:var(--text-tertiary);text-transform:uppercase}.health-factor{display:flex;align-items:center;gap:.4rem;padding:.2rem 0}.health-factor-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0}.health-factor-name{font-size:.72rem;flex:1}.health-factor-val{font-family:'Space Mono',monospace;font-size:.7rem;font-weight:600}
@keyframes fadeSlideUp{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:translateY(0)}}.stagger-1{animation-delay:.05s}.stagger-2{animation-delay:.1s}.stagger-3{animation-delay:.15s}.stagger-4{animation-delay:.2s}.stagger-5{animation-delay:.25s}.stagger-6{animation-delay:.3s}

/* v179/v370: Tooltip global Nodus — converte [title] em tooltip estilizado.
   v370: a bolha NAO e' mais pseudo-elemento (::after) — virou um elemento unico
   .nd-tip-bubble com position:fixed anexado no <body> e posicionado via JS
   (nodus-tooltip.js). O ::after ficava CORTADO/ATRAS de containers com
   overflow:hidden ou stacking context (a "sombra preta atras do botao"). Um
   elemento fixo no topo do body escapa de qualquer clipping/occlusao. */
.nd-tip{position:relative}
.nd-tip-bubble{position:fixed;left:0;top:0;z-index:2147483600;display:none;background:#1f2937;color:#fff;padding:7px 11px;border-radius:7px;font-size:.66rem;font-weight:500;max-width:260px;width:max-content;white-space:normal;line-height:1.4;box-shadow:0 6px 18px rgba(0,0,0,.35);pointer-events:none;text-align:center;font-family:'Outfit',sans-serif}
@media print{.nd-tip-bubble{display:none!important}}
