/* Tokens de la paleta validada (validate_palette.js: ALL CHECKS PASS en light y dark). Los valores dark no son un flip automático: son los mismos ocho tonos escalonados para la superficie oscura. */ :root { color-scheme: light; --surface-1: #fcfcfb; --page: #f9f9f7; --text-primary: #0b0b0b; --text-secondary: #52514e; --text-muted: #898781; --grid: #e1e0d9; --axis: #c3c2b7; --border: rgba(11, 11, 11, 0.1); --hover-wash: rgba(11, 11, 11, 0.04); --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --series-4: #eda100; --series-5: #e87ba4; --series-6: #008300; --series-other: #898781; /* Rampa secuencial (un solo tono, claro→oscuro) para el heatmap */ --seq-0: #f0efec; --seq-1: #cde2fb; --seq-2: #9ec5f4; --seq-3: #6da7ec; --seq-4: #3987e5; --seq-5: #256abf; --seq-6: #184f95; --seq-7: #0d366b; --good: #006300; --critical: #d03b3b; --font: system-ui, -apple-system, "Segoe UI", sans-serif; --radius: 10px; } @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { color-scheme: dark; --surface-1: #1a1a19; --page: #0d0d0d; --text-primary: #ffffff; --text-secondary: #c3c2b7; --text-muted: #898781; --grid: #2c2c2a; --axis: #383835; --border: rgba(255, 255, 255, 0.1); --hover-wash: rgba(255, 255, 255, 0.06); --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500; --series-5: #d55181; --series-6: #008300; --seq-0: #383835; --seq-1: #0d366b; --seq-2: #184f95; --seq-3: #256abf; --seq-4: #2a78d6; --seq-5: #3987e5; --seq-6: #6da7ec; --seq-7: #9ec5f4; --good: #0ca30c; --critical: #d03b3b; } } :root[data-theme="dark"] { color-scheme: dark; --surface-1: #1a1a19; --page: #0d0d0d; --text-primary: #ffffff; --text-secondary: #c3c2b7; --text-muted: #898781; --grid: #2c2c2a; --axis: #383835; --border: rgba(255, 255, 255, 0.1); --hover-wash: rgba(255, 255, 255, 0.06); --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500; --series-5: #d55181; --series-6: #008300; --seq-0: #383835; --seq-1: #0d366b; --seq-2: #184f95; --seq-3: #256abf; --seq-4: #2a78d6; --seq-5: #3987e5; --seq-6: #6da7ec; --seq-7: #9ec5f4; --good: #0ca30c; --critical: #d03b3b; } * { box-sizing: border-box; } body { margin: 0; background: var(--page); color: var(--text-primary); font-family: var(--font); -webkit-font-smoothing: antialiased; } /* ── Layout ── */ .app { max-width: 1400px; margin: 0 auto; padding: 24px 20px 64px; } .topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; } .topbar h1 { font-size: 22px; font-weight: 650; margin: 0 0 4px; letter-spacing: -0.01em; } .topbar .sub { color: var(--text-secondary); font-size: 13px; margin: 0; } .topbar .sub b { color: var(--text-primary); font-weight: 600; } /* Fecha de corte: el dato que responde "¿hasta cuándo llega esta data?" */ .corte { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 9px; font-size: 13px; color: var(--text-secondary); background: var(--surface-1); border: 1px solid var(--border); border-radius: 8px; padding: 7px 12px; width: fit-content; } .corte b { color: var(--text-primary); font-weight: 640; } .corte .punto { width: 7px; height: 7px; border-radius: 50%; background: var(--good); flex: none; } .corte-sep { color: var(--axis); } .corte-sec { color: var(--text-muted); font-size: 12.5px; } .verif { font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border); white-space: nowrap; cursor: help; } .verif-ok { color: var(--good); } .verif-viejo { color: var(--critical); border-color: var(--critical); } .comp-h { font-size: 12.5px; color: var(--text-secondary); margin-bottom: 8px; display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; } .comp-var { color: var(--text-muted); } .comp-var b.up { color: var(--critical); } .comp-var b.down { color: var(--good); } .aviso { margin: 14px 0 0; font-size: 12px; line-height: 1.5; color: var(--text-muted); border-left: 2px solid var(--axis); padding-left: 10px; } .icon-btn { background: var(--surface-1); border: 1px solid var(--border); color: var(--text-secondary); border-radius: 8px; padding: 7px 11px; font-size: 13px; cursor: pointer; font-family: var(--font); } .icon-btn:hover { background: var(--hover-wash); color: var(--text-primary); } /* ── Filtros: una sola fila sobre los gráficos ── */ .filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 20px; } .field { display: flex; flex-direction: column; gap: 5px; min-width: 0; } .field label { font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); } .field select, .field input { font-family: var(--font); font-size: 13px; padding: 7px 9px; border-radius: 7px; border: 1px solid var(--border); background: var(--page); color: var(--text-primary); min-width: 150px; } .seg { display: flex; border: 1px solid var(--border); border-radius: 7px; overflow: hidden; } .seg button { font-family: var(--font); font-size: 13px; padding: 7px 12px; border: 0; background: var(--page); color: var(--text-secondary); cursor: pointer; white-space: nowrap; } .seg button + button { border-left: 1px solid var(--border); } .seg button[aria-pressed="true"] { background: var(--series-1); color: #fff; font-weight: 600; } /* ── Stat tiles ── */ .tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 20px; } .tile { background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; } .tile .k { font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px; } .tile .v { font-size: 30px; font-weight: 640; line-height: 1.05; letter-spacing: -0.02em; } .tile .d { font-size: 12px; color: var(--text-secondary); margin-top: 6px; } .tile .d .up { color: var(--critical); font-weight: 600; } .tile .d .down { color: var(--good); font-weight: 600; } /* ── Cards de gráfico ── */ .grid { display: grid; gap: 16px; } .grid.two { grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); } .card { background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; min-width: 0; } .card header { margin-bottom: 14px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; } .card h2 { font-size: 14px; font-weight: 620; margin: 0; } .card .note { font-size: 12px; color: var(--text-muted); margin: 3px 0 0; } .legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-secondary); } .legend span { display: inline-flex; align-items: center; gap: 6px; } .swatch { width: 10px; height: 10px; border-radius: 3px; flex: none; } /* ── Tooltip ── */ .tt { background: var(--surface-1); border: 1px solid var(--border); border-radius: 8px; padding: 9px 11px; font-size: 12.5px; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14); } .tt .tt-h { font-weight: 640; margin-bottom: 6px; color: var(--text-primary); } .tt .tt-r { display: flex; align-items: center; gap: 7px; color: var(--text-secondary); white-space: nowrap; } .tt .tt-r b { color: var(--text-primary); font-variant-numeric: tabular-nums; margin-left: auto; padding-left: 14px; } .tt .tt-p { color: var(--text-muted); font-size: 11.5px; margin-top: 6px; font-style: italic; } /* ── Heatmap de estacionalidad ── */ .heat { overflow-x: auto; } .heat table { border-collapse: separate; border-spacing: 2px; font-size: 12px; } .heat th { font-weight: 600; color: var(--text-muted); font-size: 11px; padding: 2px 4px; } .heat th.y { text-align: right; } .heat td { width: 44px; height: 28px; border-radius: 4px; text-align: center; font-variant-numeric: tabular-nums; font-size: 11.5px; cursor: default; } /* Columna de total anual: fuera de la rampa de color y separada de los meses. */ .heat th.th-total { padding-left: 14px; } .heat td.td-total { width: 62px; padding-left: 14px; text-align: right; font-weight: 650; color: var(--text-primary); background: none; font-size: 12px; } .heat td.td-total.parcial { color: var(--text-muted); font-weight: 600; } .heat td.td-total .ast { color: var(--text-muted); margin-left: 1px; } .heat-nota { margin: 9px 0 0; font-size: 11.5px; color: var(--text-muted); } /* ── Tabla de datos ── */ .tablewrap { overflow-x: auto; } table.data { border-collapse: collapse; width: 100%; font-size: 12.5px; } table.data th, table.data td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--grid); white-space: nowrap; } table.data th { color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; } table.data td.n { text-align: right; font-variant-numeric: tabular-nums; } table.data tbody tr:hover { background: var(--hover-wash); } .footnote { margin-top: 22px; padding: 14px 16px; font-size: 12.5px; line-height: 1.55; color: var(--text-secondary); background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius); } .footnote b { color: var(--text-primary); } .footnote code { background: var(--page); padding: 1px 5px; border-radius: 4px; font-size: 12px; border: 1px solid var(--border); } .loading { color: var(--text-muted); font-size: 13px; padding: 40px; text-align: center; } /* ── Pestañas ── */ .tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; /* En móvil las pestañas no caben: se desplazan en vez de ensanchar la página. */ overflow-x: auto; scrollbar-width: none; min-width: 0; } .tabs::-webkit-scrollbar { display: none; } .tabs button { white-space: nowrap; flex-shrink: 0; } .tabs button { font-family: var(--font); font-size: 14px; font-weight: 550; padding: 10px 16px; border: 0; background: none; color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; } .tabs button:hover { color: var(--text-primary); } .tabs .tab-link { margin-left: auto; align-self: center; padding: 8px 4px; font-size: 14px; color: var(--series-1); text-decoration: none; white-space: nowrap; } .tabs .tab-link:hover { text-decoration: underline; } .tabs button.activa { color: var(--series-1); border-bottom-color: var(--series-1); } /* ── Proyección ── */ .btn-primario { font-family: var(--font); font-size: 13px; font-weight: 600; padding: 8px 18px; border: 0; border-radius: 7px; background: var(--series-1); color: #fff; cursor: pointer; } .btn-primario:hover:not(:disabled) { filter: brightness(1.08); } .btn-primario:disabled { background: var(--axis); color: var(--surface-1); cursor: default; } .avanzado { background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 18px; } .avanzado summary { padding: 11px 16px; cursor: pointer; font-size: 12.5px; color: var(--text-secondary); font-weight: 550; } .avanzado-body { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; padding: 0 16px 14px; border-top: 1px solid var(--grid); } .nota-avanzado { flex-basis: 100%; margin: 4px 0 0; font-size: 12px; line-height: 1.5; color: var(--text-muted); } /* Pasos del progreso */ .pasos { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; } .paso { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-muted); padding: 5px 12px 5px 9px; border-radius: 999px; border: 1px solid var(--border); } .paso .bolita { width: 8px; height: 8px; border-radius: 50%; background: var(--axis); flex: none; } .paso.hecho { color: var(--text-secondary); } .paso.hecho .bolita { background: var(--good); } .paso.activo { color: var(--text-primary); border-color: var(--series-1); } .paso.activo .bolita { background: var(--series-1); animation: latido 1.1s ease-in-out infinite; } @keyframes latido { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } } .paso-msg { margin: 12px 0 0; font-size: 12.5px; color: var(--text-secondary); } .cierre-kpis { display: flex; gap: 32px; flex-wrap: wrap; margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--grid); } .cierre-kpis > div { display: flex; flex-direction: column; gap: 3px; } .cierre-kpis .ck { font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); } .cierre-kpis .cv { font-size: 26px; font-weight: 640; letter-spacing: -0.02em; } .cierre-kpis .cv.up { color: var(--critical); } .cierre-kpis .cv.down { color: var(--good); } .cierre-kpis .cd { font-size: 12px; color: var(--text-secondary); } .resumen dl { margin: 0; display: grid; grid-template-columns: 190px 1fr; gap: 9px 20px; } .resumen dt { font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); padding-top: 2px; } .resumen dd { margin: 0; font-size: 13px; line-height: 1.55; color: var(--text-secondary); } @media (max-width: 680px) { .resumen dl { grid-template-columns: 1fr; gap: 2px 0; } } /* Veredicto de tendencia */ .veredicto { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 9px 13px; border-radius: 8px; margin-bottom: 14px; border: 1px solid var(--border); background: var(--page); } .veredicto .v-icono { font-size: 15px; line-height: 1; } .veredicto .v-titulo { font-weight: 640; font-size: 13.5px; } .veredicto .v-detalle { font-size: 12.5px; color: var(--text-secondary); } .veredicto .v-aviso { font-size: 11.5px; color: var(--text-muted); font-style: italic; border-left: 2px solid var(--axis); padding-left: 8px; } .tend-sube .v-icono, .tend-sube .v-titulo { color: var(--critical); } .tend-baja .v-icono, .tend-baja .v-titulo { color: var(--good); } .tend-estable .v-icono, .tend-estable .v-titulo { color: var(--text-secondary); } .opciones-serie { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; margin-top: 12px; } .opciones-serie label { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-secondary); cursor: pointer; } .opciones-serie label.deshabilitada { opacity: 0.45; cursor: default; } .opciones-serie .swatch { width: 12px; height: 3px; border-radius: 2px; } .opciones-serie .swatch-linea { width: 14px; height: 0; border-top: 2px dashed var(--text-muted); display: inline-block; } .nota-inline { font-size: 11.5px; color: var(--text-muted); font-style: italic; } .chip-ok, .chip-off { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border); } .chip-ok { color: var(--good); } .chip-off { color: var(--text-muted); } .card.err { color: var(--critical); font-size: 13px; margin-bottom: 16px; } .card.vacio { color: var(--text-muted); font-size: 13px; line-height: 1.6; } /* ── Gestión territorial ── */ .chips-veredicto { display: flex; gap: 8px; flex-wrap: wrap; } .chip-v { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font); font-size: 12.5px; color: var(--text-secondary); padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--page); cursor: pointer; } .chip-v:hover { background: var(--hover-wash); } .chip-v.activo { border-color: var(--series-1); color: var(--text-primary); font-weight: 600; } .chip-v b { color: var(--text-primary); } .chip-v.estatico { cursor: default; border: 0; background: none; padding: 0; font-size: 12px; } .chip-v.estatico:hover { background: none; } .chips-veredicto .swatch { width: 9px; height: 9px; border-radius: 50%; } .chip-v.estatico .swatch { width: 8px; height: 8px; border-radius: 50%; } .explica { margin: 0 0 14px; padding: 10px 13px; font-size: 13.5px; line-height: 1.55; color: var(--text-primary); background: var(--page); border-left: 3px solid var(--series-1); border-radius: 0 8px 8px 0; } /* Dirección heredada: el color codifica polaridad, no identidad. */ .dir-chip { font-size: 11.5px; font-weight: 600; white-space: nowrap; } .dir-chip[data-dir="sube"] { color: var(--critical); } .dir-chip[data-dir="baja"] { color: var(--good); } .dir-chip[data-dir="estable"] { color: var(--text-muted); } .poco-vol { display: inline-block; margin-left: 7px; font-size: 10.5px; font-style: italic; color: var(--text-muted); cursor: help; white-space: nowrap; } /* Escala ordinal de veredictos: 5 pasos validados en claro y oscuro. */ :root { --v-bajo: #008300; --v-freno: #2a78d6; --v-sigue: #898781; --v-empeoro: #eda100; --v-disparo: #d03b3b; } @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --v-bajo: #0ca30c; --v-freno: #3987e5; --v-sigue: #898781; --v-empeoro: #c98500; --v-disparo: #d03b3b; } } :root[data-theme="dark"] { --v-bajo: #0ca30c; --v-freno: #3987e5; --v-sigue: #898781; --v-empeoro: #c98500; --v-disparo: #d03b3b; }