/* ═══════════════════════════════════════════════════════════════
   Ventas — Resumen General (Dashboard) · rediseño 2026-05
   Zona Rápida (mes en curso) + Zona Análisis (período del filtro).
   Usa los tokens globales --pv-* (css/modules/desarrollo/main.css).
   ═══════════════════════════════════════════════════════════════ */

#section-ventas {
    --vd-indigo: #6366f1;
    --vd-indigo-text: #a5b4fc;
    --vd-indigo-soft: rgba(99, 102, 241, 0.12);
    --vd-indigo-strong: rgba(99, 102, 241, 0.25);
    --vd-indigo-border: rgba(99, 102, 241, 0.32);
    --vd-up: #4ade80;
    --vd-down: #f87171;
}

/* ─────────────────────────────────────────────────────────────
   Utility classes 'v-*' — mejora #7 / VNT-HAL-010 (migración
   parcial). Reemplazan los style="..." inline más repetidos en
   ventas.html. Usan tokens --pv-* del design system de Desarrollo.
   ───────────────────────────────────────────────────────────── */

/* Texto */
.v-text-muted     { color: var(--pv-text-muted, #94a3b8); }
.v-text-secondary { color: var(--pv-text-secondary, #64748b); }
.v-text-primary   { color: var(--pv-text-primary, #cbd5e1); }
.v-text-xs        { font-size: var(--pv-text-xs, 0.68rem); }
.v-text-sm        { font-size: var(--pv-text-sm, 0.78rem); }
.v-text-base      { font-size: var(--pv-text-base, 0.85rem); }

/* Etiqueta clásica (font-size:0.7rem; color:#94a3b8; font-weight:600) */
.v-label {
    font-size: 0.7rem;
    color: var(--pv-text-muted, #94a3b8);
    font-weight: 600;
}
/* Sub-celda con offset top (font-size:0.65rem; color:#64748b; margin-top:4px) */
.v-cell-sub {
    font-size: 0.65rem;
    color: var(--pv-text-secondary, #64748b);
    margin-top: 4px;
}

/* Celdas de tabla con separador inferior consistente */
.v-tcell-r   { padding: 5px 5px; text-align: right;
               border-bottom: 1px solid rgba(51, 65, 85, 0.6); }
.v-tcell-l   { padding: 8px 8px; text-align: left;
               border-bottom: 1px solid rgba(51, 65, 85, 0.6); }
.v-tcell-num { padding: 8px 6px; text-align: right;
               border-bottom: 1px solid rgba(51, 65, 85, 0.6); }

/* Layout — flex centrado con gap fijo (los combos más repetidos) */
.v-row6     { display: flex; align-items: center; gap: 6px; }
.v-row6-mb8 { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.v-row8     { display: flex; align-items: center; gap: 8px; }
.v-row10    { display: flex; align-items: center; gap: 10px; }

/* Heading de sección dentro de cards (icono + texto, color primario) */
.v-section-title {
    color: var(--pv-text-primary, #e2e8f0);
    font-size: 0.95rem;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Header fijo en tablas con scroll vertical */
.v-sticky-th { position: sticky; top: 0; z-index: 2; }
.v-relative  { position: relative; }
.v-pad16     { padding: 16px; }

/* ── Etiquetas de zona ────────────────────────────────────────── */

.dash-zone-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--pv-text-muted, #9fb0c4);
    margin: 2px 0 10px;
}

.dash-analysis-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin: 26px 0 12px;
    padding-top: 18px;
    border-top: 1px solid var(--pv-card-border, rgba(56, 73, 107, 0.25));
}
.dash-analysis-head .dash-zone-label { margin: 0; }

/* ── Hero "¿Cómo vamos?" ──────────────────────────────────────── */

.dash-hero {
    display: grid;
    grid-template-columns: 1.7fr 1px 1fr;
    gap: 22px;
    padding: 20px 24px;
    margin-bottom: 14px;
    background: var(--pv-card-surface, rgba(18, 24, 40, 0.75));
    border: 1px solid var(--vd-indigo-border);
    border-radius: var(--pv-card-radius, 16px);
    box-shadow: var(--pv-elevation, 0 4px 24px rgba(0, 0, 0, 0.25));
    backdrop-filter: var(--pv-glass-blur, blur(12px));
    -webkit-backdrop-filter: var(--pv-glass-blur, blur(12px));
}

.dash-hero-divider { background: var(--pv-card-border, rgba(56, 73, 107, 0.25)); }

.dash-hero-main, .dash-hero-side { display: flex; flex-direction: column; gap: 7px; }

.dash-hero-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--pv-text-muted, #9fb0c4);
}

.dash-hero-value {
    font-size: 2.3rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--pv-text-primary, #e2e8f0);
    font-variant-numeric: tabular-nums;
}
.dash-hero-value--side { font-size: 1.7rem; font-weight: 700; }

.dash-hero-sub {
    font-size: 0.8rem;
    color: var(--pv-text-secondary, #8091a7);
    min-height: 1rem;
}

/* Barra de progreso vs meta */
.dash-progress {
    height: 9px;
    border-radius: 999px;
    background: rgba(56, 73, 107, 0.35);
    overflow: hidden;
    margin: 3px 0 2px;
}
.dash-progress-fill {
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--vd-indigo), #818cf8);
    transition: width var(--pv-duration-slow, 0.35s) var(--pv-ease-out, ease);
}
.dash-progress-fill.is-over {
    background: linear-gradient(90deg, var(--vd-up), #86efac);
}

/* ── Tarjetas de KPI ──────────────────────────────────────────── */

#section-ventas .stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 4px;
}

#section-ventas .stat-card {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 15px 17px;
    background: var(--pv-card-surface, rgba(18, 24, 40, 0.75));
    border: 1px solid var(--pv-card-border, rgba(56, 73, 107, 0.25));
    border-radius: var(--pv-card-radius, 16px);
    box-shadow: var(--pv-elevation, 0 4px 24px rgba(0, 0, 0, 0.25));
    backdrop-filter: var(--pv-glass-blur, blur(12px));
    -webkit-backdrop-filter: var(--pv-glass-blur, blur(12px));
    position: relative;
    overflow: hidden;
    transition: transform var(--pv-duration-fast, 0.15s) ease,
                border-color var(--pv-duration-fast, 0.15s) ease;
}

#sub-ventas-dashboard .stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--vd-indigo), #818cf8);
    opacity: 0.7;
}

#section-ventas .stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--vd-indigo-border);
}

#section-ventas .stat-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--pv-text-muted, #9fb0c4);
}

#section-ventas .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--pv-text-primary, #e2e8f0);
    font-variant-numeric: tabular-nums;
}

.stat-cmp {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 3px;
}
.stat-cmp-line {
    font-size: 0.73rem;
    font-weight: 600;
    color: var(--pv-text-secondary, #8091a7);
}
.stat-cmp-line.is-up { color: var(--vd-up); }
.stat-cmp-line.is-down { color: var(--vd-down); }
.stat-cmp-line.is-neutral { color: var(--pv-text-secondary, #8091a7); font-weight: 500; }

/* ── Skeleton de carga ────────────────────────────────────────── */

.dash-skeleton {
    display: inline-block;
    width: 80px;
    height: 1.2rem;
    border-radius: 6px;
    background: linear-gradient(90deg,
        rgba(56, 73, 107, 0.15) 25%,
        rgba(56, 73, 107, 0.40) 50%,
        rgba(56, 73, 107, 0.15) 75%);
    background-size: 200% 100%;
    animation: dashShimmer 1.4s ease-in-out infinite;
}
@keyframes dashShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Selector de período ──────────────────────────────────────── */

.dash-period {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}
.dash-period-label {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--pv-text-secondary, #8091a7);
    margin-right: 2px;
}

.dash-preset-chip {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--vd-indigo-text, #a5b4fc);
    background: var(--vd-indigo-soft, rgba(99, 102, 241, 0.12));
    border: 1px solid var(--vd-indigo-border, rgba(99, 102, 241, 0.3));
    transition: background var(--pv-duration-fast, 0.15s) ease,
                transform var(--pv-duration-fast, 0.15s) ease;
}
.dash-preset-chip:hover {
    background: var(--vd-indigo-strong, rgba(99, 102, 241, 0.25));
    transform: translateY(-1px);
}
.dash-preset-chip.active {
    background: var(--vd-indigo, #6366f1);
    border-color: var(--vd-indigo, #6366f1);
    color: #fff;
}

.dash-custom {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 4px;
}
.dash-custom[hidden] { display: none; }

.dash-date-input {
    padding: 5px 8px;
    background: var(--pv-bg-base, #0f172a);
    color: var(--pv-text-primary, #e2e8f0);
    border: 1px solid var(--pv-card-border, rgba(51, 65, 85, 0.45));
    border-radius: var(--pv-input-radius, 10px);
    font-size: 0.74rem;
    outline: none;
    color-scheme: dark;
}
.dash-arrow { color: var(--pv-text-secondary, #64748b); font-size: 0.74rem; }

.dash-mini-btn {
    padding: 5px 11px;
    border-radius: var(--pv-input-radius, 10px);
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    background: var(--vd-indigo-soft);
    color: var(--vd-indigo-text);
    border: 1px solid var(--vd-indigo-border);
}
.dash-mini-btn:hover { background: var(--vd-indigo-strong); }

.dash-preset-chip:focus-visible,
.dash-date-input:focus-visible,
.dash-mini-btn:focus-visible,
.dash-toggle-btn:focus-visible,
.dash-link-btn:focus-visible {
    outline: 2px solid var(--vd-indigo-text, #a5b4fc);
    outline-offset: 2px;
}

/* ── Cabecera de tarjeta + toggle segmentado ──────────────────── */

.dash-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.dash-card-title {
    color: var(--pv-text-primary, #e2e8f0);
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
}

.dash-toggle {
    display: inline-flex;
    padding: 3px;
    gap: 2px;
    background: var(--pv-bg-base, rgba(15, 23, 42, 0.6));
    border: 1px solid var(--pv-card-border, rgba(56, 73, 107, 0.25));
    border-radius: 999px;
}
.dash-toggle-btn {
    padding: 5px 13px;
    border: none;
    background: transparent;
    border-radius: 999px;
    font-size: 0.73rem;
    font-weight: 600;
    color: var(--pv-text-secondary, #8091a7);
    cursor: pointer;
    transition: background var(--pv-duration-fast, 0.15s) ease,
                color var(--pv-duration-fast, 0.15s) ease;
}
.dash-toggle-btn:hover { color: var(--pv-text-primary, #e2e8f0); }
.dash-toggle-btn.active {
    background: var(--vd-indigo, #6366f1);
    color: #fff;
}

/* ── Gráfica de tendencia ─────────────────────────────────────── */

.dash-chart-canvas-wrap {
    position: relative;
    height: 300px;
}

/* ── Tabla por plataforma / productos ─────────────────────────── */

.dash-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
}
.dash-table thead th {
    text-align: left;
    padding: 8px 10px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--pv-text-muted, #9fb0c4);
    border-bottom: 1px solid var(--pv-card-border, rgba(56, 73, 107, 0.3));
    white-space: nowrap;
}
.dash-table thead th.num,
.dash-table tbody td.num { text-align: right; font-variant-numeric: tabular-nums; }
.dash-table tbody td {
    padding: 9px 10px;
    color: var(--pv-text-primary, #e2e8f0);
    border-bottom: 1px solid rgba(56, 73, 107, 0.16);
}
.dash-table tbody tr:hover td { background: rgba(99, 102, 241, 0.06); }
.dash-table tbody tr:last-child td { border-bottom: none; }

.dash-table .row-total td {
    font-weight: 700;
    border-top: 1px solid var(--pv-card-border, rgba(56, 73, 107, 0.4));
    border-bottom: none;
    color: var(--pv-text-primary, #e2e8f0);
}

.dash-th-sort { cursor: pointer; user-select: none; }
.dash-th-sort:hover { color: var(--pv-text-primary, #e2e8f0); }
.dash-sort-ind { opacity: 0.3; font-size: 0.8em; }
.dash-sort-on { color: var(--vd-indigo-text, #a5b4fc); font-size: 0.8em; }

/* Punto de color de plataforma */
.dash-dot {
    display: inline-block;
    width: 9px; height: 9px;
    border-radius: 50%;
    margin-right: 7px;
    vertical-align: middle;
}

/* Mini-barra de participación */
.dash-bar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}
.dash-bar-track {
    flex: 1;
    height: 7px;
    min-width: 46px;
    border-radius: 999px;
    background: rgba(56, 73, 107, 0.35);
    overflow: hidden;
}
.dash-bar-fill {
    display: block;       /* span por defecto es inline e ignora width/height */
    height: 100%;
    border-radius: 999px;
    background: var(--vd-indigo, #6366f1);
    transition: width 0.4s ease;
}
.dash-bar-pct {
    font-variant-numeric: tabular-nums;
    color: var(--pv-text-secondary, #8091a7);
    min-width: 36px;
    text-align: right;
}

/* Delta en celdas */
.dash-delta-up { color: var(--vd-up); font-weight: 600; }
.dash-delta-down { color: var(--vd-down); font-weight: 600; }
.dash-delta-flat { color: var(--pv-text-secondary, #8091a7); }

/* Pie de tarjeta de productos */
.dash-card-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}
.dash-link-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--vd-indigo-text, #a5b4fc);
    padding: 4px 2px;
}
.dash-link-btn:hover { text-decoration: underline; }

/* Estado vacío */
.dash-empty {
    padding: 26px 16px;
    text-align: center;
    color: var(--pv-text-secondary, #8091a7);
    font-size: 0.82rem;
}

/* ── Panel de alertas ─────────────────────────────────────────── */

.dash-alerts-panel { margin-top: 16px; }
.dash-alerts-count { font-size: 0.75rem; color: var(--pv-text-secondary, #8091a7); }
.dash-alerts-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
}

/* ── Responsivo ───────────────────────────────────────────────── */

@media (max-width: 1100px) {
    #section-ventas .stats-row { grid-template-columns: repeat(2, 1fr); }
    .dash-hero { grid-template-columns: 1fr; gap: 16px; }
    .dash-hero-divider { display: none; }
}
@media (max-width: 560px) {
    #section-ventas .stats-row { grid-template-columns: 1fr; }
    .dash-analysis-head { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
    #section-ventas .stat-card,
    .dash-preset-chip,
    .dash-progress-fill,
    .dash-toggle-btn { transition: none; }
    #section-ventas .stat-card:hover,
    .dash-preset-chip:hover { transform: none; }
    .dash-skeleton { animation: none; }
}

/* Drill-down: dato clickeable que lleva a su detalle */
.sv-drill { cursor: pointer; transition: color .15s ease; }
.sv-drill:hover { color: #818cf8; }

/* ──────────────────────────────────────────────────────────────
   Ventas / Pricing: compact view aligned with Historico OC
   ────────────────────────────────────────────────────────────── */

#sub-ventas-pricing {
    --pricing-line: rgba(51, 65, 85, 0.28);
    --pricing-soft: rgba(30, 41, 59, 0.35);
    --pricing-surface: rgba(15, 23, 42, 0.42);
}

#sub-ventas-pricing > div:first-of-type {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    margin-bottom: 8px !important;
    padding: 7px 12px !important;
    background: rgba(30, 41, 59, 0.65) !important;
    border: 1px solid rgba(51, 65, 85, 0.3) !important;
    border-radius: 0.5rem !important;
}

#sub-ventas-pricing > div:first-of-type h2 {
    margin: 0 !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    color: #e2e8f0 !important;
}

#pricing-product-count {
    padding: 2px 10px !important;
    border-radius: 10px !important;
    font-size: 0.78rem !important;
    font-weight: 500 !important;
    color: #64748b !important;
    background: rgba(51, 65, 85, 0.3) !important;
    border: none !important;
}

#sub-ventas-pricing > div:first-of-type .v-row8 {
    gap: 8px !important;
    flex: 1;
    justify-content: flex-end;
    min-width: 0;
}

#pricing-search {
    width: min(360px, 32vw) !important;
    min-width: 240px !important;
    padding: 8px 14px 8px 36px !important;
    background-color: #0f172a !important;
    border: 1px solid rgba(51, 65, 85, 0.5) !important;
    border-radius: 0.5rem !important;
    color: #f1f5f9 !important;
    font-size: 0.82rem !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 10px center;
    background-size: 16px;
}

#pricing-risk-filter,
#pricing-channel-filter {
    padding: 5px 10px !important;
    background: #0f172a !important;
    color: #e2e8f0 !important;
    border: 1px solid rgba(51, 65, 85, 0.45) !important;
    border-radius: 0.4rem !important;
    font-size: 0.78rem !important;
}

#sub-ventas-pricing > div:first-of-type button {
    padding: 5px 12px !important;
    background: rgba(129, 140, 248, 0.1) !important;
    color: #a5b4fc !important;
    border: 1px solid rgba(129, 140, 248, 0.25) !important;
    border-radius: 0.4rem !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
}

#pricing-import-menu {
    background: rgba(15, 23, 42, 0.98) !important;
    border: 1px solid rgba(99, 102, 241, 0.3) !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45) !important;
}

#pricing-tab-precios,
#pricing-tab-ofertas {
    padding: 7px 16px !important;
    font-size: 0.78rem !important;
    color: #94a3b8 !important;
}

#pricing-tab-precios[style*="fbbf24"],
#pricing-tab-ofertas[style*="fbbf24"] {
    color: #a5b4fc !important;
    border-bottom-color: #818cf8 !important;
}

#pricing-offers-count {
    background: rgba(51, 65, 85, 0.45) !important;
    color: #94a3b8 !important;
}

#pricing-kpi-cards {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 8px !important;
    margin-bottom: 10px !important;
}

#pricing-kpi-cards .stat-card {
    padding: 9px 12px !important;
    border-radius: 0.55rem !important;
    text-align: left !important;
    border: 1px solid rgba(51, 65, 85, 0.32) !important;
    background: rgba(15, 23, 42, 0.46) !important;
    box-shadow: none !important;
}

#pricing-kpi-cards .stat-card::before {
    display: none !important;
}

#pricing-kpi-cards .stat-label {
    font-size: 0.6rem !important;
    color: #94a3b8 !important;
}

#pricing-kpi-cards .stat-value {
    margin-top: 3px;
    font-size: 1.05rem !important;
    line-height: 1.1 !important;
    color: #e2e8f0 !important;
}

#sub-ventas-pricing .cv-table-container {
    max-height: calc(100vh - 270px);
    border: 1px solid rgba(51, 65, 85, 0.25);
    border-radius: 0.6rem;
    background: rgba(15, 23, 42, 0.4);
}

#pricing-table {
    min-width: 1180px !important;
    font-size: 0.73rem !important;
}

#pricing-table .ho-th {
    padding: 7px 8px !important;
    background: #1e293b !important;
    color: #94a3b8 !important;
    font-size: 0.62rem !important;
    border-bottom: 2px solid rgba(51, 65, 85, 0.4) !important;
}

#pricing-table .ho-th-center {
    text-align: center !important;
}

#pricing-table .ho-th-right {
    text-align: right !important;
}

#pricing-table tbody tr.pricing-row-main td {
    padding: 5px 8px !important;
    font-size: 0.73rem !important;
    color: #cbd5e1;
    border-bottom: 1px solid rgba(51, 65, 85, 0.15) !important;
}

#pricing-table tbody tr.pricing-row-main:nth-child(even) td {
    background: rgba(30, 41, 59, 0.25);
}

#pricing-table tbody tr.pricing-row-main:hover td {
    background: rgba(99, 102, 241, 0.07) !important;
}

.pricing-platform-chip {
    display: inline-block;
    padding: 1px 5px;
    margin-right: 2px;
    border-radius: 4px;
    font-size: 0.58rem;
    font-weight: 700;
    color: var(--plat-color);
    background: rgba(51, 65, 85, 0.22);
    border: 1px solid rgba(100, 116, 139, 0.28);
}

.pricing-risk-badge {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--risk-color);
    background: rgba(51, 65, 85, 0.18);
    border: 1px solid rgba(100, 116, 139, 0.24);
    white-space: nowrap;
}

.pricing-muted {
    color: #64748b;
    font-size: 0.66rem;
}

.pricing-motor-pill {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 0.64rem;
    font-weight: 700;
    color: #a5b4fc;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.24);
}

.pricing-cost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 74px;
    padding: 2px 6px;
    border-radius: 5px;
    border: 1px solid rgba(96, 165, 250, 0.22);
    background: rgba(15, 23, 42, 0.45);
    color: #93c5fd;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    font-weight: 700;
    cursor: pointer;
}

.pricing-cost-btn:hover {
    color: #dbeafe;
    border-color: rgba(96, 165, 250, 0.45);
    background: rgba(30, 41, 59, 0.72);
}

.pricing-empty-cell {
    padding: 40px;
    text-align: center;
    color: #64748b;
}

.pricing-detail-row > td {
    background: rgba(15, 23, 42, 0.66) !important;
    border-bottom: 1px solid rgba(99, 102, 241, 0.18) !important;
}

.pricing-detail-inner {
    padding: 8px 12px !important;
}

.pricing-detail-title {
    margin-bottom: 7px !important;
    font-size: 0.7rem !important;
    line-height: 1.2 !important;
    color: #cbd5e1 !important;
}

.pricing-detail-title span {
    font-size: 0.66rem !important;
}

.pricing-detail-metrics {
    gap: 5px !important;
    margin-bottom: 8px !important;
}

.pricing-detail-metric {
    min-width: 92px !important;
    padding: 4px 7px !important;
    border-radius: 5px !important;
    background: rgba(15, 23, 42, 0.48) !important;
    border-color: rgba(51, 65, 85, 0.28) !important;
}

.pricing-detail-metric-label {
    font-size: 0.52rem !important;
    letter-spacing: 0.02em !important;
}

.pricing-detail-metric-value {
    margin-top: 1px !important;
    font-size: 0.66rem !important;
    font-weight: 700 !important;
}

.pricing-detail-table {
    table-layout: fixed;
    font-size: 0.67rem !important;
}

.pricing-detail-table th,
.pricing-detail-table td {
    line-height: 1.16 !important;
    vertical-align: middle !important;
}

.pricing-detail-table th {
    padding: 5px 6px !important;
    font-size: 0.57rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94a3b8 !important;
    border-bottom: 1px solid rgba(51, 65, 85, 0.38);
}

.pricing-detail-table td {
    padding: 4px 6px !important;
    font-size: 0.67rem !important;
    color: #cbd5e1;
}

.pricing-detail-table tbody tr:nth-child(even) td {
    background: rgba(30, 41, 59, 0.18);
}

.pricing-detail-table tbody tr:hover td {
    background: rgba(59, 130, 246, 0.055);
}

.pricing-detail-table th:nth-child(7),
.pricing-detail-table td:nth-child(7) {
    border-left: 1px solid rgba(99, 102, 241, 0.22) !important;
}

.pricing-detail-table td:first-child > span {
    padding: 1px 6px !important;
    border-radius: 4px !important;
    font-size: 0.6rem !important;
    font-weight: 700 !important;
    background: rgba(51, 65, 85, 0.2) !important;
    color: #cbd5e1 !important;
    border-color: rgba(100, 116, 139, 0.28) !important;
}

.pricing-detail-table td span {
    line-height: 1.12 !important;
}

.pricing-detail-price,
.pricing-detail-sug-price,
.pricing-detail-floor {
    font-size: 0.65rem !important;
    font-weight: 700 !important;
    color: #cbd5e1 !important;
    font-family: 'JetBrains Mono', monospace;
}

.pricing-detail-old-price,
.pricing-detail-sug-margin,
.pricing-detail-discount-text {
    font-size: 0.54rem !important;
}

.pricing-detail-sug-margin {
    opacity: 0.88;
}

.pricing-detail-discount {
    font-size: 0.5rem !important;
    background: rgba(239, 68, 68, 0.12) !important;
    color: #fca5a5 !important;
}

.pricing-detail-score {
    padding: 1px 6px !important;
    border-radius: 5px !important;
    font-size: 0.58rem !important;
    background: rgba(51, 65, 85, 0.2) !important;
    border-color: rgba(100, 116, 139, 0.26) !important;
}

.pricing-detail-status,
.pricing-detail-comp {
    padding: 1px 5px !important;
    border-radius: 4px !important;
    font-size: 0.55rem !important;
}

.pricing-detail-row .pricing-cost-btn {
    min-width: 64px;
    padding: 1px 5px;
    font-size: 0.61rem;
    border-radius: 4px;
}

.pricing-cost-popover {
    position: fixed;
    width: 320px;
    z-index: 10000;
    padding: 10px;
    background: #111827;
    border: 1px solid rgba(96, 165, 250, 0.28);
    border-radius: 8px;
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.45);
    color: #cbd5e1;
}

.pricing-cost-pop-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(51, 65, 85, 0.55);
}

.pricing-cost-pop-head strong {
    display: block;
    margin-top: 2px;
    color: #e2e8f0;
    font-size: 1rem;
    font-family: 'JetBrains Mono', monospace;
}

.pricing-cost-pop-platform {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--plat-color);
}

.pricing-cost-pop-close {
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 5px;
    background: rgba(51, 65, 85, 0.45);
    color: #94a3b8;
    cursor: pointer;
}

.pricing-cost-pop-product {
    padding: 8px 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-bottom: 1px solid rgba(51, 65, 85, 0.32);
}

.pricing-cost-pop-product span {
    color: #818cf8;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    font-weight: 700;
}

.pricing-cost-pop-product small {
    color: #64748b;
    font-size: 0.68rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pricing-cost-pop-body {
    padding: 6px 0;
}

.pricing-cost-pop-row,
.pricing-cost-pop-total,
.pricing-cost-pop-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.pricing-cost-pop-row {
    padding: 4px 0;
    color: #94a3b8;
    font-size: 0.72rem;
}

.pricing-cost-pop-row strong,
.pricing-cost-pop-total strong {
    color: #e2e8f0;
    font-family: 'JetBrains Mono', monospace;
}

.pricing-cost-pop-total {
    padding-top: 8px;
    margin-top: 2px;
    border-top: 1px solid rgba(51, 65, 85, 0.55);
    color: #e2e8f0;
    font-size: 0.76rem;
    font-weight: 700;
}

.pricing-cost-pop-meta {
    flex-wrap: wrap;
    margin-top: 8px;
    color: #64748b;
    font-size: 0.64rem;
}

.pricing-cost-pop-empty {
    padding: 12px 0;
    color: #64748b;
    font-size: 0.72rem;
}

@media (max-width: 1180px) {
    #sub-ventas-pricing > div:first-of-type {
        align-items: flex-start !important;
    }

    #sub-ventas-pricing > div:first-of-type .v-row8 {
        justify-content: flex-start;
        width: 100%;
        flex-wrap: wrap;
    }

    #pricing-search {
        width: 100% !important;
        max-width: none;
    }

    #pricing-kpi-cards {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

/* Ventas > Base de datos */
#sub-ventas-database {
    padding-top: 2px;
}

.vdb-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    margin-bottom: 10px;
    border: 1px solid rgba(51, 65, 85, 0.46);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.72);
}

.vdb-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 220px;
}

.vdb-title {
    margin: 0;
    color: #e2e8f0;
    font-size: 1.02rem;
    font-weight: 800;
}

.vdb-count {
    padding: 2px 9px;
    border-radius: 999px;
    background: rgba(51, 65, 85, 0.45);
    color: #94a3b8;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.vdb-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.vdb-control {
    height: 34px;
    padding: 0 10px;
    border: 1px solid rgba(51, 65, 85, 0.55);
    border-radius: 7px;
    background: rgba(2, 6, 23, 0.36);
    color: #cbd5e1;
    font-size: 0.76rem;
    outline: none;
}

.vdb-control:focus {
    border-color: rgba(129, 140, 248, 0.55);
}

.vdb-date {
    width: 132px;
}

.vdb-search {
    width: 260px;
}

.vdb-btn {
    height: 34px;
    padding: 0 12px;
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 7px;
    background: rgba(99, 102, 241, 0.10);
    color: #a5b4fc;
    font-size: 0.74rem;
    font-weight: 800;
    cursor: pointer;
}

.vdb-btn:disabled {
    cursor: wait;
    opacity: 0.65;
}

.vdb-btn-primary {
    background: rgba(59, 130, 246, 0.14);
    border-color: rgba(59, 130, 246, 0.32);
    color: #93c5fd;
}

.vdb-source-note {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 10px 0;
    color: #64748b;
    font-size: 0.68rem;
}

.vdb-source-pill {
    padding: 3px 7px;
    border: 1px solid rgba(34, 197, 94, 0.18);
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.07);
    color: #94a3b8;
}

.vdb-source-pending {
    border-color: rgba(148, 163, 184, 0.16);
    background: rgba(51, 65, 85, 0.22);
}

.vdb-muted {
    color: #94a3b8;
    font-weight: 700;
}

.vdb-kpis {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.vdb-kpi {
    padding: 9px 12px;
    border: 1px solid rgba(51, 65, 85, 0.45);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.52);
}

.vdb-kpi span {
    display: block;
    margin-bottom: 3px;
    color: #94a3b8;
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.vdb-kpi strong {
    color: #e2e8f0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
}

.vdb-alert {
    margin-bottom: 10px;
    padding: 8px 10px;
    border-radius: 7px;
    font-size: 0.75rem;
    color: #cbd5e1;
    border: 1px solid rgba(51, 65, 85, 0.55);
    background: rgba(15, 23, 42, 0.75);
}

.vdb-alert-error {
    color: #fecaca;
    border-color: rgba(248, 113, 113, 0.36);
    background: rgba(127, 29, 29, 0.22);
}

.vdb-alert-warn {
    color: #fde68a;
    border-color: rgba(245, 158, 11, 0.28);
    background: rgba(120, 53, 15, 0.20);
}

.vdb-alert-ok {
    color: #bbf7d0;
    border-color: rgba(34, 197, 94, 0.28);
    background: rgba(20, 83, 45, 0.18);
}

.vdb-table-wrap {
    border-radius: 8px;
}

.vdb-table {
    width: 100%;
    min-width: 1320px;
    border-collapse: collapse;
    font-size: 0.72rem;
}

.vdb-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 8px 10px;
    background: #1f2937;
    color: #93a4ba;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-align: left;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(51, 65, 85, 0.65);
}

.vdb-table tbody td {
    padding: 7px 10px;
    color: #cbd5e1;
    border-bottom: 1px solid rgba(30, 41, 59, 0.45);
    vertical-align: middle;
}

.vdb-main-row:nth-child(4n+1) td {
    background: rgba(15, 23, 42, 0.42);
}

.vdb-main-row:hover td {
    background: rgba(59, 130, 246, 0.055);
}

.vdb-main-row {
    cursor: pointer;
}

.vdb-order-parent td {
    background: rgba(15, 23, 42, 0.58);
}

.vdb-order-parent .vdb-product strong {
    color: #c7d2fe;
}

.vdb-num,
.vdb-mono {
    font-family: 'JetBrains Mono', monospace;
}

.vdb-num {
    text-align: right;
    white-space: nowrap;
}

.vdb-negative {
    color: #f87171 !important;
}

.vdb-mono small,
.vdb-product span {
    display: block;
    margin-top: 2px;
    color: #64748b;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.66rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vdb-product {
    max-width: 360px;
}

.vdb-product strong {
    color: #e2e8f0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
}

.vdb-platform,
.vdb-status,
.vdb-detail-btn {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 800;
    white-space: nowrap;
}

.vdb-platform {
    background: rgba(51, 65, 85, 0.35);
    border: 1px solid rgba(100, 116, 139, 0.30);
    color: #cbd5e1;
}

.vdb-plat-mercadolibre {
    color: #93c5fd;
}

.vdb-plat-shopify {
    color: #86efac;
}

.vdb-plat-amazon {
    color: #fbbf24;
}

.vdb-plat-liverpool {
    color: #d8b4fe;
}

.vdb-plat-tiktok {
    color: #fca5a5;
}

.vdb-status-real {
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.26);
    background: rgba(20, 83, 45, 0.20);
}

.vdb-status-pending {
    color: #cbd5e1;
    border: 1px solid rgba(100, 116, 139, 0.26);
    background: rgba(51, 65, 85, 0.28);
}

.vdb-detail-btn {
    border: 1px solid rgba(96, 165, 250, 0.30);
    background: rgba(30, 64, 175, 0.18);
    color: #93c5fd;
    cursor: pointer;
}

.vdb-detail-row td {
    padding: 0 8px 6px 8px !important;
    background: rgba(15, 23, 42, 0.72) !important;
    cursor: default;
}

.vdb-detail-box {
    padding: 6px;
    border: 1px solid rgba(51, 65, 85, 0.48);
    border-radius: 8px;
    background: rgba(2, 6, 23, 0.30);
}

.vdb-flow-sections {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(420px, 1.45fr) minmax(220px, 0.8fr);
    gap: 6px;
    margin-bottom: 6px;
}

.vdb-flow-section {
    min-width: 0;
    padding: 6px;
    border: 1px solid rgba(51, 65, 85, 0.38);
    border-radius: 7px;
    background: rgba(15, 23, 42, 0.22);
}

.vdb-flow-section-ingreso {
    border-top-color: rgba(74, 222, 128, 0.42);
}

.vdb-flow-section-egreso {
    border-top-color: rgba(248, 113, 113, 0.40);
}

.vdb-flow-section-resultado {
    border-top-color: rgba(147, 197, 253, 0.38);
}

.vdb-flow-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 5px;
    color: #93a4ba;
    font-size: 0.59rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.vdb-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
    gap: 4px;
    margin-bottom: 0;
}

.vdb-detail-card {
    position: relative;
    min-width: 0;
    padding: 5px 7px 5px 9px;
    border-radius: 6px;
    background: rgba(30, 41, 59, 0.25);
    border-left: 2px solid rgba(100, 116, 139, 0.35);
}

.vdb-detail-grid span,
.vdb-detail-line span,
.vdb-detail-line small {
    color: #94a3b8;
    font-size: 0.58rem;
    line-height: 1.2;
}

.vdb-detail-grid strong,
.vdb-detail-line strong {
    display: block;
    margin-top: 2px;
    color: #e2e8f0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.66rem;
    line-height: 1.2;
}

.vdb-detail-lines {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
}

.vdb-flow-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 1px 5px;
    border-radius: 999px;
    font-size: 0.5rem;
    font-style: normal;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1.35;
    text-transform: uppercase;
}

.vdb-flow-dot {
    display: inline-block;
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    border: 1px solid currentColor;
    background: currentColor;
    box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.55);
}

.vdb-flow-ingreso {
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.24);
    background: rgba(20, 83, 45, 0.16);
}

.vdb-detail-card.vdb-flow-ingreso {
    border-left-color: rgba(74, 222, 128, 0.58);
}

.vdb-flow-egreso {
    color: #fca5a5;
    border: 1px solid rgba(248, 113, 113, 0.22);
    background: rgba(127, 29, 29, 0.14);
}

.vdb-detail-card.vdb-flow-egreso {
    border-left-color: rgba(248, 113, 113, 0.58);
}

.vdb-flow-neto {
    color: #93c5fd;
    border: 1px solid rgba(96, 165, 250, 0.22);
    background: rgba(30, 64, 175, 0.14);
}

.vdb-detail-card.vdb-flow-neto {
    border-left-color: rgba(96, 165, 250, 0.58);
}

.vdb-flow-resultado {
    color: #e2e8f0;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(51, 65, 85, 0.22);
}

.vdb-detail-card.vdb-flow-resultado {
    border-left-color: rgba(203, 213, 225, 0.5);
}

.vdb-flow-referencia {
    color: #cbd5e1;
    border: 1px solid rgba(100, 116, 139, 0.22);
    background: rgba(51, 65, 85, 0.18);
}

.vdb-detail-subtitle {
    margin: 6px 0 4px;
    color: #93a4ba;
    font-size: 0.59rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.vdb-order-lines-wrap {
    overflow-x: auto;
    margin-bottom: 6px;
    border: 1px solid rgba(51, 65, 85, 0.36);
    border-radius: 6px;
}

.vdb-order-lines {
    width: 100%;
    min-width: 820px;
    border-collapse: collapse;
    font-size: 0.68rem;
}

.vdb-order-lines th {
    padding: 6px 8px;
    background: rgba(30, 41, 59, 0.64);
    color: #93a4ba;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-align: left;
    text-transform: uppercase;
}

.vdb-order-lines td {
    padding: 6px 8px !important;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.34) !important;
    border-bottom: 1px solid rgba(30, 41, 59, 0.55);
}

.vdb-order-lines td strong {
    display: block;
    max-width: 420px;
    overflow: hidden;
    color: #e2e8f0;
    font-size: 0.68rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vdb-order-lines td small {
    display: block;
    margin-top: 2px;
    color: #64748b;
    font-size: 0.6rem;
}

.vdb-sku-details {
    display: grid;
    gap: 5px;
    margin-bottom: 6px;
}

.vdb-sku-detail {
    padding: 6px 7px;
    border: 1px solid rgba(51, 65, 85, 0.36);
    border-radius: 7px;
    background: rgba(15, 23, 42, 0.34);
}

.vdb-sku-detail-head {
    display: grid;
    grid-template-columns: minmax(260px, 1.2fr) minmax(420px, 1fr);
    gap: 8px;
    align-items: start;
    margin-bottom: 5px;
}

.vdb-sku-title {
    min-width: 0;
}

.vdb-sku-title strong,
.vdb-sku-title span,
.vdb-sku-title small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vdb-sku-title strong {
    color: #dbeafe;
    font-size: 0.72rem;
    line-height: 1.2;
}

.vdb-sku-title span {
    margin-top: 1px;
    color: #cbd5e1;
    font-size: 0.66rem;
    font-weight: 700;
    line-height: 1.2;
}

.vdb-sku-title small {
    margin-top: 1px;
    color: #64748b;
    font-size: 0.56rem;
    line-height: 1.2;
}

.vdb-sku-head-metrics {
    display: grid;
    grid-template-columns: repeat(5, minmax(70px, 1fr));
    gap: 4px;
}

.vdb-sku-head-metrics span {
    min-width: 0;
    padding: 3px 5px;
    border: 1px solid rgba(51, 65, 85, 0.34);
    border-radius: 5px;
    color: #94a3b8;
    font-size: 0.54rem;
    line-height: 1.15;
    background: rgba(2, 6, 23, 0.22);
}

.vdb-sku-head-metrics strong {
    display: block;
    margin-top: 1px;
    color: #e2e8f0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.62rem;
    line-height: 1.15;
}

.vdb-sku-flow-grid {
    display: grid;
    grid-template-columns: minmax(220px, 0.9fr) minmax(420px, 1.55fr) minmax(180px, 0.65fr);
    gap: 5px;
}

.vdb-sku-flow {
    min-width: 0;
    padding: 5px;
    border: 1px solid rgba(51, 65, 85, 0.34);
    border-radius: 6px;
    background: rgba(2, 6, 23, 0.18);
}

.vdb-sku-flow h5 {
    margin: 0 0 4px;
    color: #93a4ba;
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1.1;
    text-transform: uppercase;
}

.vdb-sku-flow > div {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
    gap: 4px;
}

.vdb-sku-flow-ingreso {
    border-left-color: rgba(74, 222, 128, 0.46);
}

.vdb-sku-flow-egreso {
    border-left-color: rgba(248, 113, 113, 0.46);
}

.vdb-sku-flow-resultado {
    border-left-color: rgba(147, 197, 253, 0.42);
}

.vdb-sku-metric {
    min-width: 0;
    padding: 4px 5px;
    border-left-width: 2px;
    border-radius: 5px;
}

.vdb-sku-metric small {
    display: block;
    overflow: hidden;
    color: #94a3b8;
    font-size: 0.54rem;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vdb-sku-metric strong {
    display: block;
    margin-top: 1px;
    color: #e2e8f0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.62rem;
    line-height: 1.15;
}

.vdb-sku-concepts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    margin-top: 5px;
}

.vdb-sku-concept {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.75fr) auto;
    align-items: center;
    gap: 5px;
    min-width: 0;
    padding: 3px 6px;
    border-radius: 5px;
    background: rgba(2, 6, 23, 0.30);
    border-left: 2px solid rgba(100, 116, 139, 0.24);
}

.vdb-sku-concept span,
.vdb-sku-concept small {
    overflow: hidden;
    color: #94a3b8;
    font-size: 0.55rem;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vdb-sku-concept strong {
    color: #e2e8f0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    line-height: 1.15;
}

.vdb-sku-concept.vdb-flow-line-ingreso {
    border-left-color: rgba(74, 222, 128, 0.50);
}

.vdb-sku-concept.vdb-flow-line-egreso {
    border-left-color: rgba(248, 113, 113, 0.50);
}

.vdb-sku-concept.vdb-flow-line-referencia {
    border-left-color: rgba(148, 163, 184, 0.34);
}

.vdb-detail-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    padding: 4px 7px;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.55);
    border-left: 2px solid rgba(100, 116, 139, 0.24);
}

.vdb-detail-line.vdb-flow-line-ingreso {
    border-left-color: rgba(74, 222, 128, 0.50);
}

.vdb-detail-line.vdb-flow-line-egreso {
    border-left-color: rgba(248, 113, 113, 0.50);
}

.vdb-detail-line.vdb-flow-line-neto {
    border-left-color: rgba(96, 165, 250, 0.50);
}

.vdb-detail-line.vdb-flow-line-referencia {
    border-left-color: rgba(148, 163, 184, 0.34);
}

.vdb-detail-concept {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.vdb-detail-empty,
.vdb-empty {
    padding: 18px;
    color: #64748b;
    font-size: 0.78rem;
    text-align: center;
}

/* Ventas > Resumen (Nuevo) */
#sub-ventas-resumen-nuevo {
    padding-top: 2px;
}

.vrn-toolbar {
    margin-bottom: 8px;
}

.vrn-loading-status,
.vrn-freshness {
    display: none;
    align-items: center;
    gap: 5px;
    color: #64748b;
    font-size: 0.66rem;
    font-weight: 700;
}

.vrn-loading .vrn-loading-status,
.vrn-freshness:not(:empty) {
    display: inline-flex;
}

.vrn-period-controls {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.vrn-period-field {
    display: grid;
    gap: 4px;
    min-width: 178px;
}

.vrn-period-field > span {
    color: var(--pv-text-secondary, #94a3b8);
    font-family: var(--pv-font-ui, 'Inter', system-ui, sans-serif);
    font-size: var(--pv-text-xs, 0.66rem);
    font-weight: 700;
}

.vrn-period-field .vdb-control {
    width: 100%;
    min-height: 34px;
    color: var(--pv-text-primary, #e2e8f0);
    background: var(--pv-card-surface-solid, #0f172a);
    border-color: var(--pv-card-border, rgba(71, 85, 105, 0.5));
}

.vrn-custom-range {
    display: flex;
    align-items: center;
    gap: 5px;
    min-height: 34px;
    color: var(--pv-text-secondary, #64748b);
    font-size: var(--pv-text-xs, 0.66rem);
}

.vrn-custom-range[hidden] {
    display: none !important;
}

.vrn-custom-apply {
    cursor: pointer;
    color: #e0e7ff;
    background: rgba(99, 102, 241, 0.16);
    border-color: rgba(129, 140, 248, 0.38);
    font-weight: 800;
}

.vrn-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

.vrn-metric-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 116px;
    padding: 12px 13px;
    overflow: hidden;
    background: var(--pv-card-surface, rgba(15, 23, 42, 0.58));
    border: 1px solid var(--pv-card-border, rgba(51, 65, 85, 0.45));
    border-radius: var(--pv-card-radius, 8px);
    box-shadow: var(--pv-elevation, 0 10px 28px rgba(2, 6, 23, 0.16));
}

.vrn-metric-card.is-unavailable {
    background: rgba(15, 23, 42, 0.32);
    border-style: dashed;
}

.vrn-metric-label {
    color: var(--pv-text-secondary, #94a3b8);
    font-family: var(--pv-font-ui, 'Inter', system-ui, sans-serif);
    font-size: var(--pv-text-xs, 0.64rem);
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.vrn-metric-value {
    display: block;
    margin-top: 7px;
    overflow: hidden;
    color: var(--pv-text-primary, #f8fafc);
    font-family: var(--pv-font-mono, 'JetBrains Mono', monospace);
    font-size: clamp(1rem, 1.35vw, 1.24rem);
    font-weight: 900;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vrn-metric-comparison,
.vrn-metric-note {
    display: block;
    margin-top: 5px;
    font-family: var(--pv-font-ui, 'Inter', system-ui, sans-serif);
    font-size: var(--pv-text-xs, 0.62rem);
    line-height: 1.35;
}

.vrn-metric-comparison {
    min-height: 14px;
    color: var(--pv-text-secondary, #64748b);
    font-weight: 800;
}

.vrn-metric-note {
    margin-top: auto;
    padding-top: 5px;
    color: var(--pv-text-muted, #64748b);
    font-weight: 650;
}

.vrn-metric-comparison .is-up { color: #4ade80; }
.vrn-metric-comparison .is-down { color: #f87171; }
.vrn-metric-comparison .is-neutral { color: #64748b; }

.vrn-comparison-disabled [data-vrn-comparison] {
    display: none;
}

.vrn-spinner {
    width: 10px;
    height: 10px;
    border: 2px solid rgba(129, 140, 248, 0.25);
    border-top-color: #818cf8;
    border-radius: 50%;
    animation: vrn-spin 0.8s linear infinite;
}

@keyframes vrn-spin {
    to { transform: rotate(360deg); }
}

.vrn-filter-actions {
    flex-wrap: nowrap;
    gap: 6px;
}

.vrn-platform-select {
    display: none;
}

.vrn-period-group,
.vrn-date-range {
    display: flex;
    align-items: center;
}

.vrn-period-group {
    padding: 2px;
    border: 1px solid rgba(51, 65, 85, 0.55);
    border-radius: 7px;
    background: rgba(2, 6, 23, 0.28);
}

.vrn-date-range {
    gap: 5px;
    color: #64748b;
    font-size: 0.68rem;
}

.vrn-period-btn {
    height: 28px;
    padding: 0 10px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #94a3b8;
    font-size: 0.74rem;
    font-weight: 800;
    cursor: pointer;
}

.vrn-period-btn.is-active,
.vrn-toggle button.is-active {
    background: rgba(99, 102, 241, 0.22);
    color: #e0e7ff;
}

.vrn-platform-tabs {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 4px;
    margin-bottom: 8px;
    padding: 4px;
    border: 1px solid rgba(51, 65, 85, 0.38);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.38);
}

.vrn-platform-tabs button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 0;
    height: 30px;
    padding: 0 9px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: #94a3b8;
    font-size: 0.72rem;
    font-weight: 800;
    cursor: pointer;
    transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.vrn-platform-tabs button:hover {
    background: rgba(30, 41, 59, 0.62);
    color: #e2e8f0;
}

.vrn-platform-tabs button.is-active {
    border-color: rgba(129, 140, 248, 0.48);
    background: rgba(99, 102, 241, 0.15);
    color: #f8fafc;
}

.vrn-platform-dot {
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #64748b;
}

.vrn-platform-dot.is-all { background: #a5b4fc; }
.vrn-platform-dot.is-amazon { background: #f59e0b; }
.vrn-platform-dot.is-ml { background: #60a5fa; }
.vrn-platform-dot.is-shopify { background: #4ade80; }
.vrn-platform-dot.is-liverpool { background: #e879f9; }
.vrn-platform-dot.is-tiktok { background: #f87171; }

.vrn-overview {
    display: grid;
    grid-template-columns: minmax(280px, 1.7fr) repeat(4, minmax(135px, 1fr));
    margin-bottom: 8px;
    overflow: hidden;
    border: 1px solid rgba(51, 65, 85, 0.45);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.58);
}

.vrn-overview-primary,
.vrn-overview-metric {
    min-width: 0;
    padding: 12px 14px;
}

.vrn-overview-primary {
    border-right: 1px solid rgba(51, 65, 85, 0.38);
}

.vrn-overview-metric {
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid rgba(51, 65, 85, 0.28);
}

.vrn-overview-metric:last-child {
    border-right: 0;
}

.vrn-overview-metric > span,
.vrn-context-strip article > span {
    color: #94a3b8;
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.vrn-overview-metric strong {
    margin-top: 5px;
    color: #e2e8f0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    line-height: 1.2;
    white-space: nowrap;
}

.vrn-overview-metric small {
    min-height: 15px;
    margin-top: 4px;
    color: #64748b;
    font-size: 0.64rem;
    font-weight: 700;
}

.vrn-hero-value {
    display: block;
    color: #f8fafc;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.45rem;
    font-weight: 900;
    line-height: 1.15;
    margin: 5px 0 8px;
}

.vrn-payment-progress {
    display: grid;
    grid-template-columns: minmax(100px, 1fr) auto;
    align-items: center;
    gap: 9px;
    margin-top: 8px;
}

.vrn-payment-progress .dash-progress {
    margin: 0;
}

.vrn-payment-progress > span {
    color: #64748b;
    font-size: 0.64rem;
    font-weight: 700;
    white-space: nowrap;
}

.vrn-context-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 8px;
    border: 1px solid rgba(51, 65, 85, 0.38);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.38);
}

.vrn-context-strip article {
    min-width: 0;
    padding: 8px 11px;
    border-right: 1px solid rgba(51, 65, 85, 0.26);
}

.vrn-context-strip article:last-child {
    border-right: 0;
}

.vrn-context-strip strong {
    display: block;
    margin-top: 3px;
    color: #e2e8f0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    line-height: 1.2;
}

.vrn-context-strip small,
.vrn-panel-head span {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-size: 0.63rem;
    font-weight: 700;
}

.vrn-overview small .is-up,
.vrn-context-strip small .is-up,
.dash-hero-sub .is-up {
    color: #4ade80;
}

.vrn-overview small .is-down,
.vrn-context-strip small .is-down,
.dash-hero-sub .is-down {
    color: #f87171;
}

.vrn-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    margin-bottom: 10px;
}

.vrn-grid-bottom {
    grid-template-columns: minmax(0, 1fr);
}

.vrn-panel {
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(51, 65, 85, 0.45);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.58);
}

.vrn-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 11px;
    border-bottom: 1px solid rgba(51, 65, 85, 0.38);
}

.vrn-panel-head h3 {
    margin: 0;
    color: #e2e8f0;
    font-size: 0.84rem;
    font-weight: 900;
}

.vrn-panel-head > div > span {
    margin-top: 2px;
}

.vrn-toggle {
    display: flex;
    gap: 4px;
}

.vrn-toggle button {
    height: 26px;
    padding: 0 9px;
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.35);
    color: #94a3b8;
    font-size: 0.65rem;
    font-weight: 900;
    cursor: pointer;
}

.vrn-chart-wrap {
    position: relative;
    height: 245px;
    padding: 10px 12px 12px;
}

.vrn-chart-platforms {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    overflow-x: auto;
    border-bottom: 1px solid rgba(51, 65, 85, 0.3);
    scrollbar-width: thin;
}

.vrn-chart-platforms button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    height: 26px;
    padding: 0 9px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: #64748b;
    font-size: 0.65rem;
    font-weight: 800;
    cursor: pointer;
}

.vrn-chart-platforms button:hover:not(:disabled) {
    background: rgba(30, 41, 59, 0.58);
    color: #cbd5e1;
}

.vrn-chart-platforms button.is-active {
    border-color: rgba(129, 140, 248, 0.38);
    background: rgba(99, 102, 241, 0.12);
    color: #e2e8f0;
}

.vrn-chart-platforms button:disabled {
    cursor: default;
    opacity: 0.35;
}

body.vrn-modal-open {
    overflow: hidden;
}

.vrn-day-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10050;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(2, 6, 23, 0.78);
    backdrop-filter: blur(3px);
}

.vrn-day-modal {
    display: flex;
    flex-direction: column;
    width: min(840px, calc(100vw - 32px));
    max-height: min(780px, calc(100vh - 32px));
    overflow: hidden;
    border: 1px solid rgba(71, 85, 105, 0.78);
    border-radius: 8px;
    background: #0b1222;
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.48);
}

.vrn-day-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(51, 65, 85, 0.45);
    background: #111a2e;
}

.vrn-day-modal-head span,
.vrn-day-modal-head small {
    display: block;
}

.vrn-day-modal-head > div > span {
    color: #64748b;
    font-size: 0.62rem;
    font-weight: 900;
    text-transform: uppercase;
}

.vrn-day-modal-head h3 {
    margin: 3px 0 0;
    color: #f8fafc;
    font-size: 1rem;
    font-weight: 900;
    text-transform: capitalize;
}

.vrn-day-modal-head small {
    margin-top: 4px;
    color: #94a3b8;
    font-size: 0.68rem;
    font-weight: 700;
}

.vrn-day-modal-head button {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(71, 85, 105, 0.62);
    border-radius: 5px;
    background: transparent;
    color: #94a3b8;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}

.vrn-day-modal-head button:hover,
.vrn-day-modal-head button:focus-visible {
    border-color: #818cf8;
    color: #e0e7ff;
    outline: none;
}

.vrn-day-modal-body {
    overflow-y: auto;
    padding: 14px 16px 16px;
}

.vrn-modal-platforms {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.vrn-modal-platforms button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    height: 28px;
    padding: 0 10px;
    border: 1px solid rgba(71, 85, 105, 0.5);
    border-radius: 6px;
    background: transparent;
    color: #94a3b8;
    font-size: 0.68rem;
    font-weight: 800;
    cursor: pointer;
}

.vrn-modal-platforms button > span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--vrn-platform-color, #94a3b8);
}

.vrn-modal-platforms button:hover,
.vrn-modal-platforms button.is-active {
    border-color: var(--vrn-platform-color, #818cf8);
    background: rgba(30, 41, 59, 0.7);
    color: #f8fafc;
}

.vrn-modal-platforms button:disabled {
    cursor: default;
    opacity: 0.32;
}

.vrn-modal-selection {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 8px 0 10px;
    color: #64748b;
    font-size: 0.62rem;
}

.vrn-modal-selection strong {
    overflow: hidden;
    color: #cbd5e1;
    font-size: 0.66rem;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vrn-income-statement {
    overflow: hidden;
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 6px;
}

.vrn-income-statement > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 11px;
    border-bottom: 1px solid rgba(51, 65, 85, 0.45);
    background: rgba(34, 197, 94, 0.07);
}

.vrn-income-statement > header.is-expense {
    border-top: 1px solid rgba(51, 65, 85, 0.55);
    background: rgba(248, 113, 113, 0.06);
}

.vrn-income-statement > header span {
    color: #cbd5e1;
    font-size: 0.65rem;
    font-weight: 900;
    text-transform: uppercase;
}

.vrn-income-statement > header small {
    color: #64748b;
    font-size: 0.6rem;
    font-weight: 700;
}

.vrn-statement-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 34px;
    padding: 6px 11px;
    border-bottom: 1px solid rgba(51, 65, 85, 0.24);
}

.vrn-statement-row > div {
    min-width: 0;
}

.vrn-statement-row span,
.vrn-statement-row small {
    display: block;
}

.vrn-statement-row span {
    color: #94a3b8;
    font-size: 0.68rem;
    font-weight: 700;
}

.vrn-statement-row small {
    margin-top: 1px;
    color: #475569;
    font-size: 0.58rem;
}

.vrn-statement-row > strong {
    flex: 0 0 auto;
    color: #cbd5e1;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.74rem;
    text-align: right;
}

.vrn-statement-row.is-income > strong { color: #86efac; }
.vrn-statement-row.is-paid > strong { color: #93c5fd; }
.vrn-statement-row.is-confirmed > strong { color: #93c5fd; }
.vrn-statement-row.is-expense > strong { color: #fca5a5; }
.vrn-statement-row.is-cancelled > strong { color: #94a3b8; }
.vrn-statement-row.is-pending > strong { color: #fbbf24; }

.vrn-statement-row.is-total {
    background: rgba(15, 23, 42, 0.5);
}

.vrn-statement-row.is-total span,
.vrn-statement-row.is-total > strong {
    color: #f8fafc;
    font-weight: 900;
}

.vrn-income-statement > footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 11px;
    border-top: 1px solid rgba(96, 165, 250, 0.4);
    background: rgba(59, 130, 246, 0.1);
}

.vrn-income-statement > footer span,
.vrn-income-statement > footer small {
    display: block;
}

.vrn-income-statement > footer span {
    color: #bfdbfe;
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.vrn-income-statement > footer small {
    margin-top: 2px;
    color: #64748b;
    font-size: 0.6rem;
}

.vrn-income-statement > footer > strong {
    color: #93c5fd;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
}

.vrn-income-statement > footer.is-pending {
    border-top-color: rgba(100, 116, 139, 0.45);
    background: rgba(51, 65, 85, 0.16);
}

.vrn-table-wrap {
    overflow: auto;
}

.vrn-platform-panel .vrn-table-wrap {
    padding: 0 12px 12px;
}

.vrn-platform-table {
    min-width: 980px;
}

.vrn-platform-table tbody tr[data-platform] {
    cursor: pointer;
    transition: background 120ms ease;
}

.vrn-platform-table tbody tr[data-platform]:hover,
.vrn-platform-table tbody tr[data-platform]:focus-visible {
    background: rgba(30, 41, 59, 0.58);
    outline: none;
}

.vrn-platform-table tbody tr.is-active {
    background: rgba(99, 102, 241, 0.11);
    box-shadow: inset 2px 0 0 #818cf8;
}

.vrn-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.72rem;
}

.vrn-table th {
    padding: 8px 10px;
    color: #94a3b8;
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-align: left;
    text-transform: uppercase;
    background: rgba(30, 41, 59, 0.78);
}

.vrn-table td {
    padding: 8px 10px;
    border-top: 1px solid rgba(51, 65, 85, 0.22);
    color: #cbd5e1;
    vertical-align: middle;
}

.vrn-table td strong,
.vrn-mono {
    color: #e2e8f0;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 900;
}

.vrn-table td small {
    display: block;
    margin-top: 2px;
    color: #64748b;
    font-size: 0.62rem;
}

/* Product table follows Historico OC density and UI typography. */
.vrn-grid-bottom .vrn-table {
    font-family: var(--pv-font-ui, 'Inter', system-ui, sans-serif);
    font-size: 0.73rem;
}

.vrn-grid-bottom .vrn-table th {
    padding: 7px 8px;
    font-size: 0.62rem;
    font-weight: 600;
}

.vrn-grid-bottom .vrn-table td {
    padding: 6px 8px;
    font-size: 0.73rem;
}

.vrn-grid-bottom .vrn-table td:nth-child(2) strong {
    color: #e2e8f0;
    font-family: inherit;
    font-size: 0.73rem;
    font-weight: 700;
    line-height: 1.3;
}

.vrn-grid-bottom .vrn-table td:nth-child(2) small {
    margin-top: 2px;
    color: #64748b;
    font-family: inherit;
    font-size: 0.68rem;
}

.vrn-grid-bottom .vrn-mono,
.vrn-grid-bottom .vrn-num {
    font-size: 0.7rem;
}

.vrn-num {
    text-align: right;
    font-family: 'JetBrains Mono', monospace;
    white-space: nowrap;
}

.vrn-empty-cell {
    padding: 18px;
    color: #64748b;
    font-size: 0.74rem;
    text-align: center;
}

.vrn-status-list {
    display: grid;
    gap: 6px;
    padding: 10px;
}

.vrn-status-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid rgba(51, 65, 85, 0.34);
    border-radius: 7px;
    background: rgba(15, 23, 42, 0.42);
}

.vrn-status-item strong {
    display: block;
    color: #e2e8f0;
    font-size: 0.76rem;
}

.vrn-status-item small,
.vrn-status-values span {
    color: #64748b;
    font-size: 0.66rem;
}

.vrn-status-values {
    text-align: right;
}

.vrn-status-values strong {
    color: #93c5fd;
    font-family: 'JetBrains Mono', monospace;
}

@media (max-width: 1280px) {
    .vdb-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .vdb-actions {
        justify-content: flex-start;
        width: 100%;
    }

    .vdb-search {
        width: min(100%, 320px);
    }

    .vdb-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .vdb-flow-sections {
        grid-template-columns: 1fr;
    }

    .vdb-detail-grid,
    .vdb-detail-lines {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .vdb-sku-detail-head,
    .vdb-sku-flow-grid {
        grid-template-columns: 1fr;
    }

    .vdb-sku-head-metrics,
    .vdb-sku-concepts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .vrn-filter-actions {
        flex-wrap: wrap;
    }

    .vrn-metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .vrn-platform-tabs {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .vrn-overview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .vrn-overview-primary {
        grid-column: 1 / -1;
        border-right: 0;
        border-bottom: 1px solid rgba(51, 65, 85, 0.38);
    }

    .vrn-overview-metric:nth-child(3) {
        border-right: 0;
    }

    .vrn-grid,
    .vrn-grid-bottom {
        grid-template-columns: 1fr;
    }

    .vrn-context-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .vrn-context-strip article:nth-child(2) {
        border-right: 0;
    }
}

@media (max-width: 760px) {
    .vrn-platform-tabs {
        display: none;
    }

    .vrn-platform-select {
        display: block;
    }

    .vrn-filter-actions,
    .vrn-date-range {
        width: 100%;
    }

    .vrn-period-controls,
    .vrn-period-field,
    .vrn-custom-range {
        width: 100%;
    }

    .vrn-custom-range {
        flex-wrap: wrap;
    }

    .vrn-custom-range .vdb-date {
        flex: 1 1 125px;
    }

    .vrn-metric-grid {
        grid-template-columns: 1fr;
    }

    .vrn-date-range .vdb-date {
        flex: 1 1 0;
        min-width: 0;
    }

    .vrn-overview,
    .vrn-context-strip {
        grid-template-columns: 1fr;
    }

    .vrn-overview-primary,
    .vrn-overview-metric,
    .vrn-context-strip article {
        border-right: 0;
        border-bottom: 1px solid rgba(51, 65, 85, 0.28);
    }

    .vrn-overview-metric:last-child,
    .vrn-context-strip article:last-child {
        border-bottom: 0;
    }

    .vrn-chart-wrap {
        height: 220px;
        padding-inline: 6px;
    }

    .vrn-day-modal-overlay {
        align-items: flex-end;
        padding: 8px;
    }

    .vrn-day-modal {
        width: 100%;
        max-height: calc(100vh - 16px);
    }

    .vrn-day-modal-body {
        padding-inline: 10px;
    }

    .vrn-modal-selection {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }

    .vrn-modal-selection strong {
        text-align: left;
        white-space: normal;
    }

    .vrn-income-statement > footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }
}
