.texto-largo { white-space: pre-line; }
.descripcion-corta { max-width: 32rem; white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
tr[role="button"] { cursor: pointer; }
.items-tabla td { vertical-align: top; }
.items-tabla textarea { min-height: 2.5rem; }
.editor-formato { min-height: 4.5rem; max-height: 22rem; overflow-y: auto; white-space: pre-wrap; }
.editor-formato:focus { border-color: var(--md-naranja); box-shadow: 0 0 0 .2rem rgba(254,69,13,.18); outline: 0; }
.barra-formato .btn { width: 2.2rem; }
.tabla-oc td { vertical-align: top; }
.tabla-oc .no-pedido td:not(:first-child) { opacity: .45; }
.zona-archivo { border: 2px dashed var(--bs-border-color); border-radius: .5rem; padding: .9rem 1rem; cursor: pointer; transition: border-color .15s, background-color .15s; }
.zona-archivo:hover, .zona-archivo:focus { border-color: var(--md-naranja); outline: 0; }
.zona-archivo.arrastrando { border-color: var(--md-naranja); background: rgba(254,69,13,.08); }
.zona-archivo .elegido { display: flex; align-items: center; gap: .6rem; }
.zona-archivo .elegido.d-none { display: none !important; }
.zona-archivo #ver-archivo { font-weight: 600; word-break: break-all; }
.tabla-avance td { vertical-align: top; }
.tabla-avance .no-pedido td:not(:first-child) { opacity: .45; }
.zona-unica .elegido { display: flex; align-items: center; gap: .6rem; }
.zona-unica .elegido.d-none { display: none !important; }
.zona-unica .ver-archivo { word-break: break-all; }
.avance { min-width: 7rem; }
.avance .progress { height: .45rem; }
/* Pantalla de inicio: toda la cajita entra al área; los enlaces de adentro van a su lugar. */
.portada .area { position: relative; transition: border-color .15s, transform .15s, box-shadow .15s; }
.portada .area:hover { border-color: var(--md-naranja); transform: translateY(-2px); box-shadow: 0 .5rem 1.2rem rgba(0,0,0,.08); }
.portada .area-entrar { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.portada .area-datos a, .portada .area-atajos a { position: relative; z-index: 2; }
.portada .area-icono { display: inline-flex; align-items: center; justify-content: center; width: 3rem; height: 3rem; border-radius: .8rem; background: rgba(254,69,13,.12); color: var(--md-naranja); }
.portada .area-datos li { margin-bottom: .2rem; }
/* Reportes: colores de los gráficos (paleta validada para daltonismo, claro y oscuro). */
:root { --serie-1: #2a78d6; --serie-2: #eb6834; --serie-3: #1baf7a; --serie-4: #eda100; --serie-5: #e87ba4; --serie-otros: #a3a29c; --graf-guia: rgba(0,0,0,.09); --graf-base: rgba(0,0,0,.28); }
[data-bs-theme=dark] { --serie-1: #3987e5; --serie-2: #d95926; --serie-3: #199e70; --serie-4: #c98500; --serie-5: #d55181; --serie-otros: #6b6a64; --graf-guia: rgba(255,255,255,.08); --graf-base: rgba(255,255,255,.3); }
.serie-1 { fill: var(--serie-1); background: var(--serie-1); }
.serie-2 { fill: var(--serie-2); background: var(--serie-2); }
.serie-3 { fill: var(--serie-3); background: var(--serie-3); }
.serie-4 { fill: var(--serie-4); background: var(--serie-4); }
.serie-5 { fill: var(--serie-5); background: var(--serie-5); }
.serie-otros { fill: var(--serie-otros); background: var(--serie-otros); }
svg.grafico { width: 100%; height: auto; display: block; overflow: visible; }
svg.grafico .guia { stroke: var(--graf-guia); stroke-width: 1; }
svg.grafico .guia.base { stroke: var(--graf-base); }
svg.grafico .eje { fill: var(--bs-secondary-color); font-size: 12px; }
svg.grafico .zona { fill: transparent; cursor: default; }
svg.grafico .zona:hover { fill: var(--graf-guia); }
svg.grafico.rueda path { stroke: var(--bs-card-bg, var(--bs-body-bg)); stroke-width: 2; cursor: default; }
svg.grafico.rueda path:hover { opacity: .85; }
svg.grafico .vacio { stroke: var(--graf-guia); }
.rueda-caja { width: 200px; max-width: 100%; }
.leyenda li { display: flex; align-items: center; gap: .5rem; padding: .2rem 0; }
.leyenda .muestra { width: .8rem; height: .8rem; border-radius: 3px; flex: none; }
.leyenda .nombre { flex: 1; }
.leyenda .valor { font-weight: 600; white-space: nowrap; }
.leyenda .pct { width: 3.2rem; text-align: right; color: var(--bs-secondary-color); }
.leyenda-fila { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; }
.dato .etiqueta { font-size: .85rem; color: var(--bs-secondary-color); }
.dato .cifra { font-size: 1.6rem; font-weight: 600; line-height: 1.3; white-space: nowrap; }
.dato .detalle { font-size: .8rem; color: var(--bs-secondary-color); }
.tip-grafico { position: fixed; display: none; z-index: 2000; pointer-events: none; white-space: pre-line; font-size: .85rem;
  background: var(--bs-body-bg); color: var(--bs-body-color); border: 1px solid var(--bs-border-color); border-radius: .5rem; padding: .4rem .6rem; box-shadow: 0 .3rem 1rem rgba(0,0,0,.15); }
svg.grafico .vacio-texto { fill: var(--bs-secondary-color); font-size: 14px; paint-order: stroke; stroke: var(--bs-card-bg, var(--bs-body-bg)); stroke-width: 8px; }
