/* ========================================================
 *
 * COMPANY:     226ERS
 * PROJECT:     Stockout - Gestion de roturas de stock
 * FILE:        style.css
 * DESCRIPTION: Hoja de estilos unica de la aplicacion. Sin
 *              dependencias externas: la pagina tiene que
 *              cargar tambien desde la red interna.
 *
 * ======================================================== */

/* --------------------------------------------------------
 * Variables
 */
:root {
    --bg:          #f4f5f7;
    --surface:     #ffffff;
    --border:      #e2e5ea;
    --border-soft: #eef0f3;
    --ink:         #1c2127;
    --ink-soft:    #5b6672;
    --ink-faint:   #8b96a3;

    --accent:      #c8102e;
    --accent-dark: #a30d26;

    --ok:          #1a7f4b;
    --ok-bg:       #e7f5ed;
    --warn:        #a35a00;
    --warn-bg:     #fdf2e2;
    --alert:       #b3261e;
    --alert-bg:    #fdeceb;

    --radius:      8px;
    --shadow:      0 1px 2px rgba(28, 33, 39, .06), 0 1px 3px rgba(28, 33, 39, .04);
}

/* --------------------------------------------------------
 * Base
 */
* { box-sizing: border-box; }

/* El atributo HTML "hidden" tiene que ganar siempre, aunque un
 * selector mas especifico (p.ej. ".bulk-bar { display: flex }")
 * fije su propio display: sin esto, un elemento que datatable.js
 * oculta con el.hidden = true (el menu de columnas, la barra de
 * accion masiva) se queda visible desde el primer momento. */
[hidden] { display: none !important; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
    background: var(--border-soft);
    padding: .1em .35em;
    border-radius: 4px;
    font-size: .9em;
}

.wrap {
    max-width: none;
    margin: 0;
    padding: 0 1.5rem;
}

.muted      { color: var(--ink-faint); }
.strong     { font-weight: 600; }
.block      { display: block; }
.mt         { margin-top: 1rem; }
.num        { text-align: right; font-variant-numeric: tabular-nums; }
.text-alert { color: var(--alert); }
.lead       { color: var(--ink-soft); margin: 0 0 1rem; }
.empty      { color: var(--ink-faint); margin: 0; padding: .5rem 0; }

/* --------------------------------------------------------
 * Barra superior
 */
.topbar {
    background: #14181d;
    color: #fff;
    box-shadow: var(--shadow);
}

.topbar-inner {
    display: flex;
    align-items: center;
    gap: 2rem;
    min-height: 56px;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: baseline;
    gap: .5rem;
    color: #fff;
    font-weight: 700;
    letter-spacing: -.01em;
}
.brand:hover { text-decoration: none; }

.brand-mark {
    background: var(--accent);
    padding: .15rem .4rem;
    border-radius: 4px;
    font-size: .8rem;
    letter-spacing: .04em;
}

.brand-name { font-size: 1.05rem; }

.mainnav {
    display: flex;
    gap: .25rem;
    margin-right: auto;
}

.mainnav a {
    color: #c3cad3;
    padding: .45rem .8rem;
    border-radius: 6px;
    font-weight: 500;
}
.mainnav a:hover { background: rgba(255, 255, 255, .08); color: #fff; text-decoration: none; }
.mainnav a.is-active { background: rgba(255, 255, 255, .13); color: #fff; }

/* Desplegable de "Configuración": sin JavaScript, con :hover y
 * :focus-within (asi tambien se abre navegando con el
 * teclado). El enlace del propio grupo sigue llevando a una
 * pagina real (la primera del submenu), no es solo un tirador. */
/* Sin display:flex aqui, el enlace "Configuración" no hereda
 * el centrado vertical que los demas items del menu tienen
 * por ser hijos directos de .mainnav (flex); se quedaba
 * pegado arriba en vez de centrado como el resto. */
.mainnav-dropdown { position: relative; display: flex; align-items: center; }

.mainnav-trigger::after {
    content: " ▾";
    font-size: .7em;
    opacity: .7;
}

.mainnav-dropdown-menu {
    display: none;
    position: absolute;
    /* Pegado al disparador, sin margen: un hueco aqui es una
     * zona muerta para el raton (dista de .mainnav-dropdown,
     * que es lo unico con :hover) y el menu se cierra solo
     * antes de llegar a el. El hueco visual con la barra se
     * consigue con padding-top, que SI cuenta como parte del
     * area con :hover. */
    top: 100%;
    left: 0;
    z-index: 50;
    flex-direction: column;
    min-width: 10rem;
    padding: .6rem .35rem .35rem;
    background: #1c2127;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .35);
}

.mainnav-dropdown:hover > .mainnav-dropdown-menu,
.mainnav-dropdown:focus-within > .mainnav-dropdown-menu {
    display: flex;
}

.mainnav-dropdown-menu a { white-space: nowrap; }

.whoami {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .85rem;
    color: #8b96a3;
}
.whoami input {
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .15);
    color: #fff;
    border-radius: 6px;
    padding: .3rem .5rem;
    width: 9rem;
    font-size: .85rem;
}
.whoami input::placeholder { color: #6b7683; }
.whoami button {
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .15);
    color: #fff;
    border-radius: 6px;
    padding: .3rem .5rem;
    cursor: pointer;
}
.whoami button:hover { background: rgba(255, 255, 255, .2); }

/* --------------------------------------------------------
 * Estructura de pagina
 */
main.wrap { padding-top: 1.5rem; padding-bottom: 3rem; }

.page-title {
    font-size: 1.4rem;
    font-weight: 650;
    letter-spacing: -.015em;
    margin: 0 0 1.25rem;
}

.crumbs { margin: -.5rem 0 1rem; font-size: .9rem; }

.cols {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 1.25rem;
    align-items: start;
}

@media (max-width: 1040px) {
    .cols { grid-template-columns: minmax(0, 1fr); }
}

.col-main, .col-side { min-width: 0; }
.col-side { display: flex; flex-direction: column; gap: 1.25rem; }

.footer {
    border-top: 1px solid var(--border);
    padding: 1.25rem 0;
    color: var(--ink-faint);
    font-size: .85rem;
}

/* --------------------------------------------------------
 * Paneles
 */
.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.1rem 1.25rem;
    margin-bottom: 1.25rem;
}

.panel:last-child { margin-bottom: 0; }

/* El panel sin margenes contiene tablas anchas: se desplaza
 * el panel, nunca el cuerpo de la pagina. */
.panel-flush { padding: 0; overflow-x: auto; }
.panel-flush .table { border-radius: 0; }
.table-wide { min-width: 1100px; }

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .9rem;
}
.panel-head h2 {
    font-size: .8rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--ink-soft);
    margin: 0;
}
.panel-head-inset { padding: 1.1rem 1.25rem 0; margin-bottom: 0; }

.headline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin: -.5rem 0 1.25rem;
}
.headline-title { font-size: 1.15rem; margin: 0 0 .3rem; }
.headline-meta { margin: 0; display: flex; gap: .6rem; flex-wrap: wrap; font-size: .85rem; }
.headline-badges { display: flex; gap: .4rem; flex-wrap: wrap; }

/* --------------------------------------------------------
 * Indicadores del panel de control
 */
.kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: .9rem;
    margin-bottom: 1.5rem;
}

.kpi {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: .9rem 1rem;
    display: flex;
    flex-direction: column;
    gap: .2rem;
    color: var(--ink);
    transition: border-color .12s, transform .12s;
}
a.kpi:hover { text-decoration: none; border-color: var(--ink-faint); transform: translateY(-1px); }

.kpi-value { font-size: 1.7rem; font-weight: 650; letter-spacing: -.02em; line-height: 1.1; }
.kpi-label { font-size: .78rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .04em; }

.kpi-alert { border-left: 3px solid var(--alert); }
.kpi-alert .kpi-value { color: var(--alert); }
.kpi-warn  { border-left: 3px solid var(--warn); }
.kpi-warn  .kpi-value { color: var(--warn); }
.kpi-static { background: transparent; box-shadow: none; border-style: dashed; }

/* --------------------------------------------------------
 * Tablas
 */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}

.table th {
    text-align: left;
    font-size: .72rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--ink-faint);
    padding: .4rem .55rem;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    background: #fafbfc;
}

/* .table th pesa mas que .num (clase+elemento contra solo clase),
 * asi que sin esto un <th class="num"> se quedaba alineado a la
 * izquierda pese a la clase, aunque su <td> si respetara .num. */
.table th.num { text-align: right; }

.table td {
    padding: .4rem .55rem;
    border-bottom: 1px solid var(--border-soft);
    vertical-align: top;
    line-height: 1.35;
}

.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #fafbfc; }

/* Tablas con muchas columnas (Deteccion, Productos,
 * Expediciones...): un poco mas apretadas todavia, para que
 * quepa mas sin obligar a desplazar tanto en horizontal. */
.table-compact td, .table-compact th { padding: .3rem .5rem; }

.row-todo { background: #fffaf5; }
.row-todo:hover { background: #fff5eb; }

.sku {
    display: inline-block;
    margin-left: .4rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .78rem;
    color: var(--ink-soft);
    background: var(--border-soft);
    padding: .05rem .3rem;
    border-radius: 3px;
}

/* Columna propia de referencia en las tablas de producto: el
 * mismo estilo de codigo que .sku, pero sin el margen izquierdo
 * (ahi solo tenia sentido pegado al nombre) ni el fondo, que
 * repetido en cada fila de una tabla larga pesa demasiado. */
.ref-cell {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .82rem;
    color: var(--ink-soft);
    white-space: nowrap;
}

/* --------------------------------------------------------
 * Tablas interactivas (ordenar, filtrar, columnas, seleccion
 * multiple). Ver js/datatable.js: todo esto es progressive
 * enhancement sobre una tabla renderizada por PHP normal y
 * corriente, que sigue funcionando igual sin JavaScript.
 */
.datatable-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    flex-wrap: wrap;
    padding: .85rem 1.1rem;
    border-bottom: 1px solid var(--border);
}

.datatable-toolbar .filters { flex-wrap: nowrap; }

.datatable-filter { min-width: 16rem; }

.datatable-count { font-size: .8rem; color: var(--ink-faint); white-space: nowrap; }

.datatable-columns { position: relative; }

.datatable-columns-menu {
    position: absolute;
    right: 0;
    top: calc(100% + .35rem);
    z-index: 20;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(28, 33, 39, .14);
    padding: .5rem;
    min-width: 12rem;
    display: flex;
    flex-direction: column;
    gap: .1rem;
}

.datatable-columns-menu label {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .35rem .5rem;
    border-radius: 5px;
    font-size: .85rem;
    cursor: pointer;
    white-space: nowrap;
}
.datatable-columns-menu label:hover { background: var(--border-soft); }

/* --------------------------------------------------------
 * Desplegable con busqueda (js/searchselect.js): sustituye a
 * un <select> normal para listas largas. El <select> real se
 * queda oculto ([hidden], ver mas abajo) pero sigue siendo el
 * que manda el valor al enviar el formulario.
 */
/* Sin width:100% aqui a proposito: dentro de .form label (grid
 * de Crecimiento) ya se estira solo por ser hijo flex en columna
 * con el align-items:stretch por defecto; dentro de .filters
 * (fila de Incidencias) NO debe estirarse, o se comeria el resto
 * de la barra de filtros. */
.search-select { position: relative; display: flex; flex-direction: column; }

.search-select-trigger {
    font: inherit;
    font-size: .9rem;
    text-align: left;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: .4rem .55rem;
    min-width: 11rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}
.search-select-trigger:not(.has-value) { color: var(--ink-faint); }
.search-select-trigger::after { content: "▾"; font-size: .7em; opacity: .6; flex: none; }
.search-select-trigger:hover { border-color: var(--ink-faint); }
.search-select-trigger.is-open { border-color: var(--accent); }
.search-select-trigger.has-error { border-color: var(--alert); }

.search-select-panel {
    position: absolute;
    top: calc(100% + .35rem);
    left: 0;
    z-index: 30;
    width: max(100%, 16rem);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(28, 33, 39, .14);
    padding: .5rem;
    display: flex;
    flex-direction: column;
    gap: .4rem;
}

.search-select-input {
    font: inherit;
    font-size: .85rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: .35rem .5rem;
}

.search-select-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 15rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: .1rem;
}

.search-select-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .4rem .5rem;
    border-radius: 5px;
    font-size: .85rem;
    cursor: pointer;
}
.search-select-item:hover { background: var(--border-soft); }
.search-select-item.is-selected { background: var(--alert-bg); font-weight: 600; }
.search-select-item.is-selected::after { content: "✓"; margin-left: auto; color: var(--accent); }

.search-select-dot { width: .55rem; height: .55rem; border-radius: 50%; flex: none; }

.search-select-empty { padding: .5rem; color: var(--ink-faint); font-size: .82rem; text-align: center; margin: 0; }

/* Cabecera ordenable */
.table th.sortable { cursor: pointer; user-select: none; }
.table th.sortable:hover { color: var(--ink-soft); }
.table th.sortable::after {
    content: "";
    display: inline-block;
    width: .5em;
    margin-left: .3em;
    opacity: .35;
}
.table th.sortable.sort-asc::after  { content: "▲"; opacity: 1; color: var(--accent); }
.table th.sortable.sort-desc::after { content: "▼"; opacity: 1; color: var(--accent); }

/* Columna de seleccion */
.table .col-select { width: 1.6rem; padding-right: 0; }

/* Barra de accion masiva: fija al viewport (no "sticky" dentro
 * de la tabla) para que se vea aunque la tabla tenga cientos de
 * filas y el usuario este a mitad de scroll, no solo al llegar
 * al final. */
.bulk-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
    background: #14181d;
    color: #fff;
    padding: .7rem 1.5rem;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, .25);
}
.bulk-bar .bulk-count { font-weight: 650; }
.bulk-bar .btn {
    background: rgba(255, 255, 255, .1);
    border-color: rgba(255, 255, 255, .18);
    color: #fff;
}
.bulk-bar .btn:hover { background: rgba(255, 255, 255, .2); }
.bulk-bar select { font-size: .85rem; padding: .3rem .5rem; }

/* --------------------------------------------------------
 * Distintivos
 */
.badge {
    display: inline-block;
    padding: .12rem .45rem;
    border-radius: 4px;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .02em;
    background: var(--border-soft);
    color: var(--ink-soft);
    white-space: nowrap;
}

.badge-ok    { background: var(--ok-bg);    color: var(--ok); }
.badge-warn  { background: var(--warn-bg);  color: var(--warn); }
.badge-alert { background: var(--alert-bg); color: var(--alert); }

.badge-status-open    { background: var(--alert-bg); color: var(--alert); }
.badge-status-managed { background: var(--warn-bg);  color: var(--warn); }
.badge-status-closed  { background: var(--ok-bg);    color: var(--ok); }

.badge-sev-low      { background: var(--border-soft); color: var(--ink-soft); }
.badge-sev-medium   { background: #eaf1fb; color: #1d4ed8; }
.badge-sev-high     { background: var(--warn-bg);  color: var(--warn); }
.badge-sev-critical { background: var(--alert);    color: #fff; }

/* Escalera nueva de Forecast::evaluate(), de menos a mas grave.
   "pedir" reutiliza el mismo azul informativo que badge-sev-medium
   (todavia no es una rotura, solo aviso de lanzar pedido);
   "rotura_sofia" es un tono intermedio entre warn y alert (una
   sola zona critica a cero, pero Central/Online todavia sirven);
   "rotura_critica" es exactamente el mismo rojo fuerte que
   badge-sev-critical: es la misma gravedad maxima. */
.badge-sev-pedir          { background: #eaf1fb;        color: #1d4ed8; }
.badge-sev-rotura_posible { background: var(--warn-bg); color: var(--warn); }
.badge-sev-rotura_sofia   { background: #fbe0d0;        color: #c2410c; }
.badge-sev-rotura_sof_cen { background: var(--alert-bg); color: var(--alert); }
.badge-sev-rotura_critica { background: var(--alert);    color: #fff; }

/* --------------------------------------------------------
 * Formularios y botones
 */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.filters {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}
.filters label { font-size: .85rem; color: var(--ink-soft); }

.inline-form { display: flex; align-items: center; gap: .4rem; }

input[type="text"], input[type="date"], input[type="number"], select, textarea {
    font: inherit;
    font-size: .9rem;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: .4rem .55rem;
    max-width: 100%;
}
input:focus, select:focus, textarea:focus {
    outline: 2px solid rgba(200, 16, 46, .25);
    outline-offset: 0;
    border-color: var(--accent);
}
input:disabled, select:disabled, textarea:disabled {
    background: #f7f8f9;
    color: var(--ink-faint);
}
textarea { width: 100%; resize: vertical; }

.check { display: flex; align-items: center; gap: .3rem; }

/* --------------------------------------------------------
 * Dominios de productos
 */
.checklist {
    max-height: 16rem;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: .5rem .75rem;
    display: flex;
    flex-direction: column;
    gap: .25rem;
    background: #fafbfc;
}
.checklist .check { font-size: .85rem; }

.conditions-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.conditions-list li {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .5rem .7rem;
    background: #fafbfc;
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    font-size: .88rem;
}
.conditions-list li > span:not(.cond-and) { flex: 1; }
.cond-and {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--ink-faint);
}

.preview-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; font-size: .85rem; }

/* Bloque plegable de la carga masiva */
details > summary.summary-link {
    cursor: pointer;
    color: var(--accent);
    font-size: .9rem;
    font-weight: 550;
    list-style: none;
}
details > summary.summary-link::-webkit-details-marker { display: none; }
details > summary.summary-link::before { content: "+ "; font-weight: 700; }
details[open] > summary.summary-link::before { content: "− "; }

.form { display: flex; flex-direction: column; gap: .9rem; align-items: flex-start; }
.form .full { width: 100%; }
.form label { display: flex; flex-direction: column; gap: .3rem; width: 100%; }
.form label > span {
    font-size: .78rem;
    font-weight: 600;
    color: var(--ink-soft);
    text-transform: uppercase;
    letter-spacing: .03em;
}

.grid2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: .9rem;
    width: 100%;
}

.btn {
    font: inherit;
    font-size: .88rem;
    font-weight: 550;
    padding: .45rem .9rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--ink);
    cursor: pointer;
    white-space: nowrap;
}
.btn:hover { background: #f7f8f9; text-decoration: none; }

.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }

.btn-plain { background: transparent; border-color: transparent; color: var(--ink-soft); }
.btn-plain:hover { background: #eceef1; }

.btn-small { padding: .25rem .6rem; font-size: .82rem; }

/* --------------------------------------------------------
 * Mensajes
 */
.flash {
    border-radius: var(--radius);
    padding: .7rem 1rem;
    margin-bottom: 1rem;
    font-size: .9rem;
    border: 1px solid transparent;
}
.flash-ok    { background: var(--ok-bg);    color: var(--ok);    border-color: #bfe3ce; }
.flash-warn  { background: var(--warn-bg);  color: var(--warn);  border-color: #f0d9b3; }
.flash-alert { background: var(--alert-bg); color: var(--alert); border-color: #f3c9c6; }

.error-detail {
    background: #14181d;
    color: #e6e9ed;
    padding: .8rem;
    border-radius: 6px;
    font-size: .8rem;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

/* --------------------------------------------------------
 * Listas de definiciones
 */
.deflist {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .35rem 1rem;
    margin: 0;
    font-size: .88rem;
}
.deflist dt { color: var(--ink-faint); }
.deflist dd { margin: 0; text-align: right; }

/* --------------------------------------------------------
 * Barras de los informes
 */
.bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .75rem; }
.bar-label { display: flex; justify-content: space-between; gap: 1rem; font-size: .85rem; }
.bar-track { background: var(--border-soft); border-radius: 3px; height: 6px; margin-top: .25rem; overflow: hidden; }
.bar-fill  { background: var(--accent); height: 100%; border-radius: 3px; }
.bar-sub   { font-size: .75rem; margin-top: .2rem; }

/* --------------------------------------------------------
 * Cronologia de seguimiento
 */
.timeline { list-style: none; margin: 0; padding: 0; }

.timeline-item {
    border-left: 2px solid var(--border);
    padding: 0 0 1rem 1rem;
    position: relative;
}
.timeline-item:last-child { padding-bottom: 0; }

.timeline-item::before {
    content: "";
    position: absolute;
    left: -5px;
    top: .35rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ink-faint);
}
.timeline-note::before   { background: var(--accent); }
.timeline-status::before { background: var(--ok); }

.timeline-meta { font-size: .78rem; color: var(--ink-faint); margin-bottom: .15rem; }
.timeline-body { font-size: .9rem; }
.timeline-system .timeline-body { color: var(--ink-soft); }
