#vdApp .vde-panel {
    margin-bottom: 1rem;
}

#vdApp .vde-panel-head {
    margin-bottom: 0.75rem;
    gap: 12px;
    flex-wrap: wrap;
}

#vdApp .vde-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

#vdApp .vde-preset-btn {
    border: 1px solid var(--border, #e2e8f0);
    background: var(--bg-body, #f8fafc);
    color: var(--text-secondary, #64748b);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

#vdApp .vde-preset-btn:hover {
    border-color: rgba(230, 57, 70, 0.35);
    color: var(--text-primary, #0f172a);
}

#vdApp .vde-preset-btn.is-active {
    background: rgba(230, 57, 70, 0.1);
    border-color: rgba(230, 57, 70, 0.35);
    color: var(--primary, #e63946);
}

#vdApp .vde-filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr) auto;
    gap: 12px;
    align-items: end;
}

#vdApp .vde-filters label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--text-secondary, #64748b);
    font-size: 0.82rem;
}

#vdApp .vde-filters input {
    background: var(--bg-input, #fff);
    color: var(--text-primary, #0f172a);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 8px;
    padding: 10px 12px;
    min-height: 40px;
    font-size: 0.88rem;
    font-family: inherit;
}

#vdApp .vde-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    min-width: 132px;
    min-height: 40px;
    height: 40px;
    padding: 0 18px;
    white-space: nowrap;
    background: linear-gradient(135deg, var(--primary, #e63946), #c1121f);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-weight: 700;
    font-size: 0.88rem;
    font-family: inherit;
    cursor: pointer;
}

#vdApp .vde-btn-primary:hover {
    filter: brightness(1.05);
}

#vdApp .vde-info-note {
    margin: 14px 0 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.14);
    color: var(--text-secondary, #64748b);
    font-size: 0.82rem;
    line-height: 1.45;
}

#vdApp .vde-info-note i {
    color: #2563eb;
    margin-right: 6px;
}

#vdApp .vde-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem;
    margin-bottom: 1rem;
}

#vdApp .vde-summary-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 1rem;
    padding: 1rem 1.1rem;
    background: var(--bg-card, #fff);
    box-shadow: 0 12px 28px -24px rgba(15, 23, 42, 0.45);
}

#vdApp .vde-summary-card--danger {
    border-top: 3px solid var(--primary, #e63946);
}

#vdApp .vde-summary-card--points {
    border-top: 3px solid #64748b;
}

#vdApp .vde-summary-card--leve {
    border-top: 3px solid #2563eb;
}

#vdApp .vde-summary-card--warn {
    border-top: 3px solid #eab308;
}

#vdApp .vde-summary-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-body, #f8fafc);
    border: 1px solid var(--border, #e2e8f0);
    color: var(--text-secondary, #64748b);
    flex-shrink: 0;
}

#vdApp .vde-summary-card--danger .vde-summary-icon {
    color: var(--primary, #e63946);
    background: rgba(230, 57, 70, 0.08);
    border-color: rgba(230, 57, 70, 0.18);
}

#vdApp .vde-summary-card--leve .vde-summary-icon {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.18);
}

#vdApp .vde-summary-card--warn .vde-summary-icon {
    color: #a16207;
    background: rgba(234, 179, 8, 0.12);
    border-color: rgba(234, 179, 8, 0.22);
}

#vdApp .vde-summary-label {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary, #64748b);
}

#vdApp .vde-summary-value {
    margin-top: 0.2rem;
    font-size: clamp(1.35rem, 1.8vw, 1.75rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary, #0f172a);
    line-height: 1.1;
}

#vdApp .vde-summary-hint {
    margin-top: 0.25rem;
    font-size: 0.76rem;
    color: var(--text-secondary, #64748b);
}

#vdApp .vde-charts {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

#vdApp .vde-chart-card,
#vdApp .vde-insights-card {
    min-height: 100%;
}

#vdApp .vde-severity-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 10px;
}

#vdApp .vde-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
}

#vdApp .vde-pill--leve {
    background: rgba(37, 99, 235, 0.12);
    color: #2563eb;
}

#vdApp .vde-pill--medio {
    background: rgba(234, 179, 8, 0.16);
    color: #a16207;
}

#vdApp .vde-pill--grave {
    background: rgba(220, 38, 38, 0.12);
    color: #dc2626;
}

#vdApp .vde-chart-body {
    min-height: 200px;
    position: relative;
}

#vdApp .vde-chart-wrap {
    position: relative;
    height: 200px;
}

#vdApp .vde-chart-wrap canvas {
    width: 100% !important;
    height: 100% !important;
}

#vdApp .vde-chart-center {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary, #0f172a);
    transform: translateY(-12px);
}

#vdApp .vde-top-tipos {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 200px;
}

#vdApp .vde-top-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

#vdApp .vde-top-label {
    font-size: 0.84rem;
    color: var(--text-primary, #0f172a);
    line-height: 1.35;
}

#vdApp .vde-top-bar-wrap {
    grid-column: 1 / -1;
    height: 6px;
    border-radius: 999px;
    background: var(--bg-body, #f1f5f9);
    overflow: hidden;
}

#vdApp .vde-top-bar {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary, #e63946), #f97316);
}

#vdApp .vde-top-count {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--text-secondary, #64748b);
    white-space: nowrap;
}

#vdApp .vde-top-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    text-align: center;
    color: var(--text-secondary, #64748b);
    font-size: 0.88rem;
    padding: 12px;
}

#vdApp .vde-table-meta {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary, #64748b);
    white-space: nowrap;
}

#vdApp .vde-table-wrap {
    max-height: 520px;
    overflow: auto;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 10px;
}

#vdApp .vde-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--bg-card, #fff);
    box-shadow: 0 1px 0 var(--border, #e2e8f0);
}

#vdApp .vde-table tbody tr:hover td {
    background: rgba(148, 163, 184, 0.06);
}

#vdApp .vde-tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
}

#vdApp .vde-tag-leve {
    background: rgba(59, 130, 246, 0.14);
    color: #2563eb;
}

#vdApp .vde-tag-grave {
    background: rgba(239, 68, 68, 0.16);
    color: #dc2626;
}

#vdApp .vde-tag-medio {
    background: rgba(234, 179, 8, 0.18);
    color: #a16207;
}

#vdApp #vdErrosTable td:nth-child(3),
#vdApp #vdErrosTable th:nth-child(3),
#vdApp #vdErrosTable td:nth-child(4),
#vdApp #vdErrosTable th:nth-child(4) {
    white-space: normal;
    min-width: 180px;
}

#vdApp #vdErrosTable td:nth-child(6),
#vdApp #vdErrosTable th:nth-child(6) {
    text-align: right;
    font-weight: 700;
}

@media (max-width: 1200px) {
    #vdApp .vde-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1100px) {
    #vdApp .vde-charts {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    #vdApp .vde-filters {
        grid-template-columns: 1fr 1fr;
    }

    #vdApp .vde-filters button {
        grid-column: 1 / -1;
    }

    #vdApp .vde-summary-grid {
        grid-template-columns: 1fr;
    }
}
