<style>
/* ============================= BASE ============================= */
.app .container {
    max-width: 1200px;
    margin: 20px auto;
}

/* ============================= CARDS ============================= */
.app .card,
.app .kpi-card {
    border: none;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    transition: transform .18s ease, box-shadow .18s ease;
}

.app .card:hover,
.app .kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 18px rgba(0,0,0,0.10);
}

.app .card p {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2f3640;
}

/* Colores */
.app .card-clientes { border-top: 4px solid #0d6efd; }
.app .card-productos { border-top: 4px solid #198754; }
.app #resumenVentas .card { border-top: 4px solid #20c997; }

.app .card-clientes h6 { color: #0d6efd; }
.app .card-productos h6 { color: #198754; }
.app #resumenVentas .card h6 { color: #20c997; }

/* ============================= FILTROS ============================= */
.app .filtro-card {
    border-left: 4px solid #0d6efd;
    background:#f8f9fa;
    padding: 14px 18px;
    margin-bottom: 20px;
}

.app .filtros-linea {
    display: flex;
    gap: 12px;
    align-items: end;
    justify-content: center;
    flex-wrap: wrap;
}

.app .filtro-label {
    font-size: 13px;
    font-weight: 600;
    color: #6c757d;
}

.app .filtro-input,
.app .btn-mini {
    height: 34px;
    font-size: 14px;
}

/* ============================= TABLAS ============================= */
.app .compact-table table {
    border-collapse: separate;
    border-spacing: 0 5px;
    font-size: 12px;
}

.app .compact-table tr {
    background:#f8f9fa;
    border-radius:8px;
}

.app .compact-table tr:hover {
    background:#eef3ff;
}

.app .compact-table td,
.app .compact-table th {
    font-size: 11px;
}

.app .bg-light {
    background:#f1f3f5 !important;
}

.app .bg-light th {
    font-weight:600;
    color:#495057;
}

.app .table tbody tr {
    cursor: pointer;
    transition: background .2s;
}

.app .table tbody tr:hover {
    background-color: #e9f3ff;
}

/* ============================= FORMULARIOS ============================= */
.app form {
    background: #fff;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 300px;
}

.app .form-group {
    display: flex;
    flex-direction: column;
}

.app form label {
    font-weight: 500;
    color: #555;
}

.app form select,
.app form input[type="date"] {
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 14px;
    transition: .3s;
}

.app form select:focus,
.app form input[type="date"]:focus {
    border-color: #40739e;
    box-shadow: 0 0 8px rgba(64,115,158,0.3);
    outline: none;
}

.app form input[type="submit"] {
    padding: 10px 18px;
    font-weight: 700;
    border-radius: 8px;
    background: #40739e;
    color: #fff;
    border: none;
    cursor: pointer;
}

.app form input[type="submit"]:hover {
    background: #273c75;
}

/* ============================= GRID ============================= */
.app .cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

/* ============================= KPI ============================= */
.app .kpi-card .card-body {
    padding: 1.2rem;
}

.app .kpi-icon {
    font-size: 1.5rem;
    margin-bottom: .4rem;
}

.app .kpi-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #8a94a6;
}

.app .kpi-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1e2a3a;
}

/* KPI colores */
.app .kpi-vendedor { border-top: 4px solid #0d6efd; }
.app .kpi-anterior { border-top: 4px solid #20c997; }
.app .kpi-promedio { border-top: 4px solid #6f42c1; }
.app .kpi-hoy { border-top: 4px solid #198754; }
.app .kpi-diferencia { border-top: 4px solid #fd7e14; }

.app .vendor-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e8f0fe, #c7d9fd);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================= LOADER ============================= */
#loader-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loader-content img {
    width: 120px;
}

/* ============================= RESPONSIVE ============================= */
@media (max-width: 768px) {
    .app .filtros-linea {
        flex-direction: column;
        align-items: stretch;
    }

    .app .btn-mini {
        width: 100%;
    }

    .app .buscador-container {
        flex-direction: column;
    }
}
</style>