/* Estilos de pantallas especificas. El aspecto general (colores, tarjetas, menu) esta en ui.css. */
.panel-card { transition: box-shadow .15s, transform .15s; text-decoration: none; color: inherit; }
.panel-card:hover, .panel-card:focus { box-shadow: 0 .5rem 1rem rgba(0,0,0,.15); transform: translateY(-2px); color: inherit; }
.panel-num { font-size: 2rem; font-weight: 600; line-height: 1; }

/* Foto al marcar: vista previa de la camara (espejo, como un selfie) y foto guardada. */
.foto-panel { margin-top: 1rem; text-align: center; }
.foto-panel video { width: 100%; max-width: 420px; max-height: 55vh; border-radius: .75rem; background: #000; transform: scaleX(-1); object-fit: cover; }
.foto-detalle { max-width: 100%; max-height: 70vh; border-radius: .75rem; }
.nota-marca { display: block; font-size: .8rem; }

/* Foto de perfil: vista previa y comparacion con la foto de la marca. */
.foto-perfil-prev { width: 100%; max-width: 280px; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 50%; background: #000; }
.foto-comparar { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; align-items: flex-start; }
.foto-comparar figure { margin: 0; text-align: center; }
.foto-comparar img { max-width: 100%; max-height: 50vh; border-radius: .75rem; }
.foto-comparar .perfil img { width: 160px; height: 160px; object-fit: cover; border-radius: 50%; }
.pf-botones { max-width: 420px; }

/* Tablero: graficas en SVG (sin estilos en linea por la CSP) */
.t-ok { color: var(--ok); } .t-warn { color: var(--warn); } .t-bad { color: var(--bad); }
.grafica { width: 100%; height: 9rem; display: block; }
.grafica .g-p, .dot.g-p { fill: var(--ok); background: var(--ok); }
.grafica .g-r, .dot.g-r { fill: var(--warn); background: var(--warn); }
.grafica .g-s, .dot.g-s { fill: var(--bad); background: var(--bad); }
.leyenda span { margin-right: 1rem; white-space: nowrap; }
.dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; vertical-align: -.05rem; }
.barra { width: 100%; height: .6rem; display: block; margin: .25rem 0; }
.barra .fondo { fill: var(--surface-2); }
.barra .v-ok { fill: var(--ok); } .barra .v-warn { fill: var(--warn); } .barra .v-bad { fill: var(--bad); }
.top-lista { list-style: none; padding: 0; margin: .5rem 0 0; }
.top-lista li { display: flex; justify-content: space-between; gap: .5rem; padding: .35rem 0; border-bottom: 1px solid var(--border); }
.top-lista li:last-child { border-bottom: 0; }
.grafica .g-ok, .dot.g-ok { fill: var(--ok); background: var(--ok); }
.grafica .g-warn, .dot.g-warn { fill: var(--warn); background: var(--warn); }
.grafica .g-bad, .dot.g-bad { fill: var(--bad); background: var(--bad); }
.grafica .g-muted { fill: var(--surface-2); }
.grafica .g-meta { stroke: var(--text-muted); stroke-width: .6; stroke-dasharray: 3 2; vector-effect: non-scaling-stroke; }
.badge.estado-ok { background: rgba(22, 163, 74, .15); color: var(--ok); }
.badge.estado-warn { background: rgba(180, 83, 9, .15); color: var(--warn); }
.badge.estado-bad { background: rgba(220, 38, 38, .13); color: var(--bad); }
.badge.estado-muted { background: var(--surface-2); color: var(--text-muted); }

/* Tablero: grafica diaria detallada (ejes y etiquetas en HTML para que el texto no se deforme) */
.graf-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.graf-kpis > div { background: var(--surface-2); border-radius: .9rem; padding: .6rem .8rem; }
.graf-kpis small { display: block; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.graf-kpis strong { display: block; font-size: 1.25rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.2; }
.graf-kpis span { font-size: .8rem; color: var(--text-muted); }
.graf-wrap { display: flex; gap: .4rem; }
.graf-y { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; flex: none; width: 1.8rem; height: 11rem; font-size: .72rem; line-height: 1; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.graf-wrap.con-v .graf-y { margin-top: 1.3rem; }
.graf-area { flex: 1 1 auto; min-width: 0; }
.graf-area .grafica { height: 11rem; }
.grafica .g-grid { stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 4 3; }
.grafica .g-base { stroke: var(--text-muted); stroke-width: 1; vector-effect: non-scaling-stroke; }
.grafica .g-fin, .dot.g-fin { fill: var(--surface-2); background: var(--surface-2); border: 1px solid var(--border); }
.grafica .g-fin { stroke: none; }
.grafica g:hover rect.g-p, .grafica g:hover rect.g-r, .grafica g:hover rect.g-s { filter: brightness(1.15); }
.graf-v, .graf-x { display: flex; }
.graf-v { height: 1.3rem; }
.graf-v span { flex: 1 1 0; min-width: 0; text-align: center; font-size: .68rem; font-weight: 700; font-variant-numeric: tabular-nums; align-self: flex-end; }
.graf-x { height: 2.3rem; margin-top: .25rem; }
.graf-x span { flex: 1 1 0; min-width: 0; position: relative; }
.graf-x b { position: absolute; left: 50%; top: 0; transform: translateX(-50%); white-space: nowrap; font-size: .72rem; font-weight: 600; color: var(--text-muted); }
.graf-x .es-fin b { opacity: .6; }
.graf-detalle > summary { cursor: pointer; font-weight: 600; color: var(--brand-link); }
.btn-mapa { display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; margin-left: .35rem; border-radius: 50%; vertical-align: middle; color: var(--brand-link); background: rgba(var(--brand-rgb), .1); transition: background .15s, transform .15s; }
.btn-mapa:hover, .btn-mapa:focus-visible { background: var(--brand); color: var(--brand-contrast); transform: scale(1.1); }
.btn-mapa .ico { width: 1.05rem; height: 1.05rem; }
@media (max-width: 575.98px) { .graf-v span { font-size: .55rem; } .graf-x b { font-size: .62rem; } .graf-y { width: 1.4rem; } }
