/* ============================================================================
   STOCK V2 — UI stylesheet (módulo nuevo, independiente de main.css)
   ============================================================================ */

#pills-stock-v2 {
    flex-direction: column;
    height: calc(100vh - 110px);
    overflow: hidden;
}

#pills-stock-v2.show.active {
    display: flex !important;
    height: calc(100vh - 110px) !important;
    min-height: 0;
    overflow: hidden;
}

.stv2-layout {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 10px;
    background: rgba(10, 14, 26, 0.6);
}

/* ── Sidebar ──────────────────────────────────────────────────────────── */
.stv2-sidebar {
    width: 320px;
    flex: 0 0 320px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-right: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(255, 255, 255, 0.015);
}

.stv2-sidebar-toolbar {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

/* Filtros rápidos: reusa .fv2-qf-btn (forms_v2.css) + dos variantes propias que faltaban ahí */
.fv2-qf-btn--all.is-active {
    background: rgba(99, 102, 241, 0.18);
    border-color: rgba(129, 140, 248, 0.4);
    color: #a5b4fc;
}
.fv2-qf-btn--archived.is-active {
    background: rgba(148, 163, 184, 0.16);
    border-color: rgba(148, 163, 184, 0.4);
    color: #cbd5e1;
}

/* Selector de orden — mismos tokens oscuros que .fv2-pick-row */
.stv2-sort-select {
    width: 100%;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: #94a3b8;
    border-radius: 6px;
    height: 2rem;
    padding: 0 0.6rem;
    font-size: 0.78rem;
}
.stv2-sort-select:hover, .stv2-sort-select:focus { border-color: rgba(148, 163, 184, 0.35); color: #e2e8f0; outline: none; }

.stv2-list {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.stv2-section-title {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: rgba(148, 163, 184, 0.6);
    padding: 0.5rem 0.35rem 0.15rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.stv2-card {
    position: relative;
    width: 100%;
    text-align: left;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 10px;
    padding: 0.55rem 0.65rem;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.stv2-card:hover { background: rgba(255, 255, 255, 0.06); border-color: rgba(148, 163, 184, 0.25); }
.stv2-card.is-selected { border-color: #6366f1; background: rgba(99, 102, 241, 0.12); }

.stv2-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.4rem;
}

.stv2-card-title {
    font-size: 0.86rem;
    font-weight: 650;
    color: #f1f5f9;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
}

.stv2-card-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.stv2-card-meta {
    font-size: 0.68rem;
    color: rgba(148, 163, 184, 0.75);
}

.stv2-card-actions {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    flex: 0 0 auto;
}

.stv2-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.stv2-badge {
    font-size: 0.66rem;
    font-weight: 600;
    padding: 0.1rem 0.42rem;
    border-radius: 999px;
    border: 1px solid transparent;
}

.stv2-badge--success { background: rgba(74, 222, 128, 0.14); color: #4ade80; border-color: rgba(74, 222, 128, 0.28); }
.stv2-badge--warning { background: rgba(251, 191, 36, 0.14); color: #fbbf24; border-color: rgba(251, 191, 36, 0.28); }
.stv2-badge--danger  { background: rgba(248, 113, 113, 0.14); color: #f87171; border-color: rgba(248, 113, 113, 0.28); }
.stv2-badge--secondary { background: rgba(148, 163, 184, 0.14); color: rgba(226, 232, 240, 0.8); border-color: rgba(148, 163, 184, 0.28); }
.stv2-badge--muted { background: rgba(148, 163, 184, 0.08); color: rgba(148, 163, 184, 0.7); }

/* Botones fav/pin deshabilitados mientras la request está en curso */
#stockV2List .fv2-row-btn:disabled,
#stockV2Main .fv2-row-btn:disabled { opacity: .45; cursor: wait; }

.stv2-empty-state {
    padding: 1.1rem 0.9rem;
    text-align: center;
    font-size: 0.78rem;
    color: rgba(148, 163, 184, 0.7);
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(148, 163, 184, 0.2);
    border-radius: 10px;
}

/* ── Main / detail panel ─────────────────────────────────────────────── */
.stv2-main {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    min-height: 0;
}

.stv2-main-placeholder {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(148, 163, 184, 0.55);
    font-size: 0.9rem;
    flex-direction: column;
    gap: 0.6rem;
}
.stv2-main-placeholder i { font-size: 2rem; opacity: 0.5; }

.stv2-detail-header {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.7rem 0.9rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.stv2-detail-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: #f8fafc;
    min-width: 0;
}
.stv2-detail-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.stv2-detail-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.stv2-actions-sep {
    width: 1px;
    height: 18px;
    background: rgba(148, 163, 184, 0.18);
    margin: 0 0.15rem;
    flex-shrink: 0;
}

.stv2-tabs {
    flex: 0 0 auto;
    display: flex;
    gap: 0.2rem;
    padding: 0 0.9rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.stv2-tab-btn {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: rgba(148, 163, 184, 0.75);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.55rem 0.7rem;
    cursor: pointer;
}
.stv2-tab-btn:hover { color: #e5edf7; }
.stv2-tab-btn.is-active { color: #c7d2fe; border-bottom-color: #6366f1; }

.stv2-tab-panel { flex: 1 1 auto; overflow-y: auto; padding: 0.9rem; display: none; }
.stv2-tab-panel.is-active { display: block; }

/* Talles de calzado — mismo formato que el stock v1 (stock-detail-shoe-chip) */
.stv2-shoe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.6rem;
}
.stv2-shoe-chip {
    border-radius: 10px;
    padding: 0.65rem 0.7rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid transparent;
    display: grid;
    gap: 0.32rem;
    min-width: 0;
}
.stv2-shoe-chip-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.4rem;
    min-width: 0;
}
.stv2-shoe-chip-head strong { font-size: 0.84rem; color: #e5edf7; white-space: nowrap; }
.stv2-shoe-status {
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 0.1rem 0.4rem;
    border-radius: 6px;
    white-space: nowrap;
    flex: 0 0 auto;
}
.stv2-shoe-value { font-size: 1.25rem; font-weight: 700; color: #f8fafc; line-height: 1; }
.stv2-shoe-value-label { font-size: 0.7rem; font-weight: 600; color: rgba(148, 163, 184, 0.6); text-transform: uppercase; margin-left: 0.25rem; }

.stv2-shoe-chip--success { border-color: rgba(74, 222, 128, 0.18); background: linear-gradient(180deg, rgba(74, 222, 128, 0.07), rgba(255, 255, 255, 0.02)); }
.stv2-shoe-chip--warning { border-color: rgba(251, 191, 36, 0.28); background: linear-gradient(180deg, rgba(251, 191, 36, 0.1), rgba(255, 255, 255, 0.02)); }
.stv2-shoe-chip--danger  { border-color: rgba(248, 113, 113, 0.3); background: linear-gradient(180deg, rgba(248, 113, 113, 0.1), rgba(255, 255, 255, 0.02)); }
.stv2-shoe-chip--success .stv2-shoe-status { background: rgba(74, 222, 128, 0.16); color: #86efac; }
.stv2-shoe-chip--warning .stv2-shoe-status { background: rgba(251, 191, 36, 0.2); color: #fde68a; }
.stv2-shoe-chip--danger  .stv2-shoe-status { background: rgba(248, 113, 113, 0.2); color: #fca5a5; }
.stv2-shoe-chip--warning .stv2-shoe-value { color: #fbbf24; }
.stv2-shoe-chip--danger  .stv2-shoe-value { color: #f87171; }

.stv2-qty-pill {
    display: inline-flex;
    min-width: 2.2rem;
    justify-content: center;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    font-weight: 700;
}

.stv2-subsection-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(148, 163, 184, 0.55);
    margin: 0 0 0.5rem;
}

.stv2-summary-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.9rem;
}
.stv2-summary-card {
    flex: 0 1 auto;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 999px;
    padding: 0.32rem 0.75rem;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.stv2-summary-card:hover {
    background: rgba(255, 255, 255, 0.055);
    border-color: rgba(148, 163, 184, 0.28);
    transform: translateY(-1px);
}
.stv2-summary-card-label { font-size: 0.7rem; color: rgba(148, 163, 184, 0.7); text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
.stv2-summary-card-value { font-size: 0.95rem; font-weight: 700; color: #f8fafc; }

.stv2-summary-card--danger:hover { border-color: rgba(248, 113, 113, 0.4); }
.stv2-summary-card--danger .stv2-summary-card-value { color: #f87171; }
.stv2-summary-card--warning:hover { border-color: rgba(251, 191, 36, 0.4); }
.stv2-summary-card--warning .stv2-summary-card-value { color: #fbbf24; }
.stv2-summary-card.is-active { background: rgba(255, 255, 255, 0.07); transform: translateY(-1px); }
.stv2-summary-card--danger.is-active { border-color: rgba(248, 113, 113, 0.55); box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.25) inset; }
.stv2-summary-card--warning.is-active { border-color: rgba(251, 191, 36, 0.55); box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.25) inset; }

.stv2-summary-card-icon { font-size: 0.85rem; color: rgba(148, 163, 184, 0.55); }
.stv2-summary-card--danger .stv2-summary-card-icon { color: #f87171; }
.stv2-summary-card--warning .stv2-summary-card-icon { color: #fbbf24; }
/* Chalecos/guantes: mismo chip que los KPI pero informativos, no filtran nada al click */
.stv2-vg-chip { cursor: default; }
.stv2-vg-chip:hover { transform: none; }

.stv2-kpi-detail {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 10px;
    padding: 0.6rem 0.75rem;
    margin-bottom: 0.9rem;
}
.stv2-kpi-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
    font-weight: 650;
    color: #e5edf7;
    margin-bottom: 0.4rem;
}
.stv2-kpi-detail-close {
    background: transparent;
    border: none;
    color: rgba(148, 163, 184, 0.75);
    padding: 0.1rem 0.3rem;
    line-height: 1;
    border-radius: 6px;
}
.stv2-kpi-detail-close:hover { background: rgba(255, 255, 255, 0.08); color: #e5edf7; }
.stv2-kpi-detail-list { list-style: none; margin: 0; padding: 0; max-height: 220px; overflow-y: auto; }
.stv2-kpi-detail-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.3rem 0.1rem;
    font-size: 0.82rem;
    color: #e5edf7;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}
.stv2-kpi-detail-list li:last-child { border-bottom: none; }

/* ── Historial / Auditoría: filtros, resumen y navegación por día ───────── */
/* El panel completo ocupa el alto disponible; sólo resultados y días scrollean, el resto queda fijo. */
.stv2-tab-panel[data-stv2-panel="history"].is-active,
.stv2-tab-panel[data-stv2-panel="audit"].is-active {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.stv2-hist-shell {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}
.stv2-hist-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.6rem;
    flex: 0 0 auto;
}
.stv2-hist-search-wrap {
    position: relative;
    flex: 1 1 160px;
    display: flex;
    align-items: center;
}
.stv2-hist-search-wrap i {
    position: absolute;
    left: 0.55rem;
    font-size: 0.78rem;
    color: rgba(148, 163, 184, 0.55);
    pointer-events: none;
}
.stv2-hist-search {
    width: 100%;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: #e2e8f0;
    border-radius: 6px;
    height: 2rem;
    padding: 0 0.6rem 0 1.8rem;
    font-size: 0.78rem;
}
.stv2-hist-select, .stv2-hist-date {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: #94a3b8;
    border-radius: 6px;
    height: 2rem;
    padding: 0 0.5rem;
    font-size: 0.76rem;
    flex: 0 0 auto;
}
.stv2-hist-select { max-width: 150px; }
.stv2-hist-date { width: 132px; color-scheme: dark; }
.stv2-hist-search:focus, .stv2-hist-select:focus, .stv2-hist-date:focus { outline: none; border-color: rgba(148, 163, 184, 0.4); color: #e2e8f0; }
.stv2-hist-reset {
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: rgba(148, 163, 184, 0.7);
    border-radius: 6px;
    height: 2rem;
    width: 2rem;
    flex: 0 0 auto;
}
.stv2-hist-reset:hover { background: rgba(255, 255, 255, 0.06); color: #e5edf7; }

.stv2-hist-date-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.6rem;
    flex: 0 0 auto;
}
.stv2-hist-presets { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-right: 0.3rem; }
.stv2-hist-preset {
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.16);
    color: rgba(148, 163, 184, 0.65);
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
    font-size: 0.7rem;
}
.stv2-hist-preset:hover { background: rgba(255, 255, 255, 0.05); color: #e5edf7; }
.stv2-hist-preset.is-active { background: rgba(99, 102, 241, 0.16); border-color: rgba(129, 140, 248, 0.45); color: #c7d2fe; }
.stv2-hist-date-sep { color: rgba(148, 163, 184, 0.4); font-size: 0.75rem; }

.stv2-hist-summary { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.6rem; flex: 0 0 auto; }
.stv2-hist-summary-chip {
    font-size: 0.72rem;
    color: rgba(148, 163, 184, 0.75);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
}
.stv2-hist-summary-chip strong { color: #e5edf7; }
.stv2-hist-summary-chip--success { border-color: rgba(74, 222, 128, 0.28); }
.stv2-hist-summary-chip--success strong { color: #4ade80; }
.stv2-hist-summary-chip--warning { border-color: rgba(251, 191, 36, 0.28); }
.stv2-hist-summary-chip--warning strong { color: #fbbf24; }
.stv2-hist-summary-chip--danger { border-color: rgba(248, 113, 113, 0.28); }
.stv2-hist-summary-chip--danger strong { color: #f87171; }

/* Layout de dos columnas: resultados a la izquierda, días a la derecha (igual que stock v1).
   Sólo estas dos columnas scrollean, cada una por su cuenta — el resto (filtros, resumen) queda fijo arriba. */
.stv2-hist-layout {
    display: flex;
    align-items: stretch;
    gap: 0.8rem;
    flex: 1 1 auto;
    min-height: 0;
}
.stv2-hist-main {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.stv2-hist-results {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-right: 0.2rem;
}
.stv2-hist-sidebar { flex: 0 0 190px; min-height: 0; display: flex; }
.stv2-hist-sidebar-card {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    flex: 1 1 auto;
    min-height: 0;
    padding: 0.7rem;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(255, 255, 255, 0.02);
}
.stv2-hist-sidebar-title { flex: 0 0 auto;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(148, 163, 184, 0.55);
}
.stv2-hist-daynav {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-right: 0.1rem;
}
.stv2-hist-day-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(148, 163, 184, 0.14);
    color: #cbd5e1;
    border-radius: 7px;
    padding: 0.45rem 0.6rem;
    font-size: 0.74rem;
    text-align: left;
}
.stv2-hist-day-link small { color: rgba(148, 163, 184, 0.7); font-weight: 700; }
.stv2-hist-day-link:hover { background: rgba(255, 255, 255, 0.06); }
.stv2-hist-day-link.is-active { background: rgba(99, 102, 241, 0.16); border-color: rgba(129, 140, 248, 0.45); color: #c7d2fe; }
.stv2-hist-day-link.is-active small { color: #c7d2fe; }
.stv2-hist-day-nav-empty { font-size: 0.74rem; color: rgba(148, 163, 184, 0.5); }
.stv2-hist-day-header { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: rgba(148, 163, 184, 0.6); margin-bottom: 0.5rem; }

/* Pantallas angostas: se abandona el scroll independiente de dos columnas — todo el panel
   scrollea de corrido, como cualquier otro tab, y los días pasan a una fila horizontal. */
@media (max-width: 700px) {
    .stv2-tab-panel[data-stv2-panel="history"].is-active,
    .stv2-tab-panel[data-stv2-panel="audit"].is-active {
        display: block;
        overflow-y: auto;
    }
    .stv2-hist-shell { display: block; }
    .stv2-hist-layout { display: block; }
    .stv2-hist-main { display: block; }
    .stv2-hist-results { overflow: visible; }
    .stv2-hist-sidebar { display: block; width: 100%; margin-top: 0.6rem; }
    .stv2-hist-daynav { flex-direction: row; flex-wrap: wrap; overflow: visible; max-height: none; }
    .stv2-hist-day-link { width: auto; }
}

/* ── Auditoría: fila con "antes/después" colapsable + revertir ──────────── */
.stv2-audit-entry {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 9px;
    overflow: hidden;
}
.stv2-audit-entry-row { background: transparent; border: none; border-radius: 0; flex-wrap: wrap; }
.stv2-audit-entry-actions { display: flex; align-items: center; gap: 0.35rem; flex: 0 0 auto; margin-left: auto; padding-top: 0.1rem; }
.stv2-audit-toggle {
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: rgba(148, 163, 184, 0.75);
    border-radius: 6px;
    padding: 0.22rem 0.55rem;
    font-size: 0.72rem;
    white-space: nowrap;
}
.stv2-audit-toggle:hover, .stv2-audit-toggle.is-open { background: rgba(255, 255, 255, 0.06); color: #e5edf7; }
.stv2-audit-chips { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.4rem; }
.stv2-audit-chip {
    font-size: 0.7rem;
    color: rgba(203, 213, 225, 0.85);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 999px;
    padding: 0.12rem 0.5rem;
}
.stv2-audit-chip strong { color: #e5edf7; }
.stv2-audit-collapse { padding: 0 0.65rem 0.65rem; }
.stv2-audit-snapshot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; padding-top: 0.5rem; border-top: 1px dashed rgba(148, 163, 184, 0.15); }
.stv2-audit-snapshot-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 8px;
    padding: 0.5rem 0.6rem;
}
.stv2-audit-snapshot-title { font-size: 0.64rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(148, 163, 184, 0.55); margin-bottom: 0.35rem; }
.stv2-audit-snapshot-line { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.76rem; color: #d7e0ec; padding: 0.12rem 0; }
.stv2-audit-snapshot-line strong { color: #f1f5f9; }
.stv2-audit-snapshot-empty { font-size: 0.74rem; color: rgba(148, 163, 184, 0.55); }

/* History / audit timeline */
.stv2-timeline { display: flex; flex-direction: column; gap: 0.5rem; }
.stv2-timeline-entry {
    display: flex;
    gap: 0.6rem;
    padding: 0.55rem 0.65rem;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 9px;
    align-items: flex-start;
}
.stv2-timeline-dot {
    width: 8px; height: 8px; border-radius: 50%; margin-top: 0.35rem; flex: 0 0 auto;
}
.stv2-timeline-dot--success { background: #4ade80; }
.stv2-timeline-dot--warning { background: #fbbf24; }
.stv2-timeline-dot--danger { background: #f87171; }
.stv2-timeline-dot--secondary { background: rgba(148, 163, 184, 0.6); }
.stv2-timeline-body { flex: 1 1 auto; min-width: 0; }
.stv2-timeline-title { font-size: 0.82rem; font-weight: 650; color: #e5edf7; }
.stv2-timeline-meta { font-size: 0.72rem; color: rgba(148, 163, 184, 0.65); margin-top: 0.1rem; }

/* Comments */
.stv2-comment { display: flex; gap: 0.55rem; padding: 0.5rem 0; }
.stv2-comment-avatar {
    width: 30px; height: 30px; border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 0.78rem; font-weight: 700; flex: 0 0 auto;
}
.stv2-comment-body { flex: 1 1 auto; min-width: 0; }
.stv2-comment-head { display: flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; }
.stv2-comment-author { font-weight: 650; color: #e5edf7; }
.stv2-comment-time { color: rgba(148, 163, 184, 0.55); font-size: 0.7rem; }
.stv2-comment-content { font-size: 0.83rem; color: #d7e0ec; margin-top: 0.15rem; word-wrap: break-word; }

/* Compare mode */
.stv2-compare-table-wrap { overflow-x: auto; }
.stv2-compare-table { border-collapse: collapse; width: 100%; font-size: 0.78rem; }
.stv2-compare-table th, .stv2-compare-table td {
    padding: 0.35rem 0.55rem;
    border: 1px solid rgba(148, 163, 184, 0.1);
    white-space: nowrap;
}
.stv2-compare-table th { background: rgba(255, 255, 255, 0.03); color: rgba(148, 163, 184, 0.7); }

/* Feedback toast-ish inline messages inside modals */
.stv2-feedback { font-size: 0.78rem; padding: 0.4rem 0.6rem; border-radius: 8px; margin-top: 0.4rem; }
.stv2-feedback--danger { background: rgba(248, 113, 113, 0.12); color: #fca5a5; border: 1px solid rgba(248, 113, 113, 0.25); }
.stv2-feedback--success { background: rgba(74, 222, 128, 0.12); color: #86efac; border: 1px solid rgba(74, 222, 128, 0.25); }

/* Movement form dynamic item rows (usa .fv2-create-input/.fv2-create-label del modal) */
.stv2-item-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.stv2-item-row .fv2-create-label { flex: 1 1 auto; margin-bottom: 0; }
.stv2-item-row .fv2-create-input {
    width: 90px;
    flex: 0 0 auto;
    padding: 0.4rem 0.55rem;
    font-size: 0.85rem;
    text-align: right;
}
/* Chalecos/guantes destacados arriba de los talles de calzado, también dentro de los modales */
.stv2-item-row--featured {
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 8px;
    padding: 0.5rem 0.65rem;
}
.stv2-item-rows-heading {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(148, 163, 184, 0.5);
    margin: 0.9rem 0 0.5rem;
}

/* ── Color coding de modales de movimiento (agregar/quitar/sobrescribir/entrega/devolución) ── */
.stv2-modal-header--success { background: linear-gradient(135deg, #14532d, #15803d); }
.stv2-modal-header--success .fv2-create-icon { color: #86efac; }
.stv2-modal-header--success .fv2-create-sub { color: rgba(187, 247, 208, 0.85); }

.stv2-modal-header--danger { background: linear-gradient(135deg, #7f1d1d, #b91c1c); }
.stv2-modal-header--danger .fv2-create-icon { color: #fca5a5; }
.stv2-modal-header--danger .fv2-create-sub { color: rgba(254, 202, 202, 0.85); }

.stv2-modal-header--warning { background: linear-gradient(135deg, #b45309, #f59e0b); }
.stv2-modal-header--warning .fv2-create-icon,
.stv2-modal-header--warning .modal-title { color: #451a03; }
.stv2-modal-header--warning .fv2-create-sub { color: rgba(69, 26, 3, 0.75); }

.stv2-modal-header--primary { background: linear-gradient(135deg, #1e3a8a, #1d4ed8); }
.stv2-modal-header--primary .fv2-create-icon { color: #bfdbfe; }
.stv2-modal-header--primary .fv2-create-sub { color: rgba(191, 219, 254, 0.8); }

.stv2-modal-alert {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    padding: 0.65rem 0.8rem;
    border-radius: 8px;
    font-size: 0.8rem;
    line-height: 1.4;
    margin-bottom: 1rem;
}
.stv2-modal-alert i { margin-top: 0.15rem; flex-shrink: 0; }
.stv2-modal-alert--success { background: rgba(74, 222, 128, 0.1); border: 1px solid rgba(74, 222, 128, 0.25); color: #bbf7d0; }
.stv2-modal-alert--danger  { background: rgba(248, 113, 113, 0.1); border: 1px solid rgba(248, 113, 113, 0.25); color: #fecaca; }
.stv2-modal-alert--warning { background: rgba(251, 191, 36, 0.1); border: 1px solid rgba(251, 191, 36, 0.3); color: #fde68a; }
.stv2-modal-alert--primary { background: rgba(96, 165, 250, 0.1); border: 1px solid rgba(96, 165, 250, 0.3); color: #bfdbfe; }

/* Stock disponible en el origen (entrega/devolución) */
.stv2-avail-panel { margin-bottom: 1rem; }
.stv2-avail-label { font-size: 0.74rem; color: rgba(148, 163, 184, 0.7); margin-bottom: 0.4rem; }
.stv2-avail-label strong { color: #e2e8f0; }
.stv2-avail-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.stv2-avail-chip { font-size: 0.72rem; padding: 0.15rem 0.55rem; }

/* ── Skeletons de carga ───────────────────────────────────────────────── */
@keyframes stv2SkelPulse { 0%, 100% { opacity: .4; } 50% { opacity: 1; } }
.stv2-skel-line {
    height: 14px;
    border-radius: 6px;
    background: rgba(148, 163, 184, 0.15);
    animation: stv2SkelPulse 1.3s ease-in-out infinite;
}
.stv2-skel-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 10px;
    padding: 0.65rem 0.75rem;
    margin-bottom: 0.35rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.stv2-skel-entry {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    padding: 0.55rem 0.65rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(148, 163, 184, 0.08);
    border-radius: 9px;
    margin-bottom: 0.4rem;
}
.stv2-skel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.3);
    animation: stv2SkelPulse 1.3s ease-in-out infinite;
    flex-shrink: 0;
    margin-top: 0.3rem;
}

@media (max-width: 900px) {
    .stv2-layout { flex-direction: column; }
    .stv2-sidebar { width: 100%; flex-basis: auto; max-height: 40vh; border-right: none; border-bottom: 1px solid rgba(148, 163, 184, 0.12); }
}
