/* ===== CONTENEDOR GENERAL ===== */
.vista-pdv{
    padding-bottom: 30px;
}

/* ===== HERO PRINCIPAL ===== */
.vista-pdv .pdv-hero{
    background: linear-gradient(135deg, #f5f2ff, #ffffff);
    border: 1px solid #e7ddff;
    border-radius: 22px;
    padding: 28px 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,.05);
    margin-bottom: 24px;
}

.vista-pdv .pdv-hero-top{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:20px;
    flex-wrap:wrap;
}

.vista-pdv .pdv-hero-title{
    margin:0;
    font-size:30px;
    font-weight:800;
    color:#2f2f2f;
    line-height:1.15;
    display:flex;
    align-items:center;
    gap:10px;
}

.vista-pdv .pdv-hero-title i{
    color:#6f42c1;
    font-size:24px;
}

.vista-pdv .pdv-hero-subtitle{
    margin-top:8px;
    color:#6b7280;
    font-size:14px;
}

/* ===== TITULOS DE SECCION ===== */
.vista-pdv .titulo-seccion{
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 700;
    color: #2f2f2f;
    margin-bottom: 18px;
    position: relative;
    padding-bottom: 6px;
}

.vista-pdv .titulo-seccion::before{
    content: "";
    width: 6px;
    height: 20px;
    border-radius: 4px;
    background: linear-gradient(135deg,#6f42c1,#512da8);
    display: inline-block;
    flex-shrink: 0;
}

.vista-pdv .titulo-seccion::after{
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 42px;
    height: 2px;
    background: #e5d9ff;
    border-radius: 2px;
}

.vista-pdv .titulo-seccion i{
    color:#6f42c1;
    font-size:15px;
}

/* ===== MINI KPI ===== */
.vista-pdv .mini-kpi-row {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 6px;
}

.vista-pdv .mini-kpi-box {
    flex: 1;
    padding: 4px 2px;
    font-size: 10px;
    font-weight: 500;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.2s ease;
}

.vista-pdv .mini-kpi-box div {
    line-height: 1.1;
}

.vista-pdv .mini-kpi-box:hover {
    transform: translateY(-1px);
}

.vista-pdv .kpi-info{
    background: linear-gradient(135deg,#4facfe,#00c6ff);
    color: white;
}

.vista-pdv .kpi-success{
    background: linear-gradient(135deg,#43e97b,#38f9d7);
    color: #0b3d2e;
}

.vista-pdv .kpi-warning{
    background: linear-gradient(135deg,#fddb92,#d1fdff);
    color: #5c4b00;
}

.vista-pdv .kpi-danger{
    background: linear-gradient(135deg,#ff9a9e,#fecfef);
    color: #5a1a1a;
}

/* ===== FILTROS Y RESUMEN ===== */
.vista-pdv .filtros-box{
    background:#f8f9fa;
    padding:15px;
    border-radius:10px;
    border:1px solid #eee;
    margin-bottom:20px;
}

.vista-pdv .resumen-filtros{
    background:#eef3ff;
    padding:10px 15px;
    border-radius:8px;
    margin-bottom:15px;
    font-size:14px;
}

.vista-pdv .resumen-filtros strong{
    color:#0d6efd;
}

.vista-pdv .badge-filtro{
    background:#0d6efd;
    color:white;
    padding:5px 10px;
    border-radius:6px;
    margin-right:5px;
    font-size:12px;
}

/* ===== PROGRESS ===== */
.vista-pdv .progress{
    background: #e9ecef;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.08);
    margin-top: 10px;
    height: 20px;
}

.vista-pdv .progress-bar{
    font-weight: 600;
    font-size: 13px;
    letter-spacing: .4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    transition: width .8s ease;
    animation: progressAnimation 1s ease;
}

.vista-pdv .progress-bar.bg-danger{
    background: linear-gradient(90deg,#ff4d4d,#dc3545);
}

.vista-pdv .progress-bar.bg-warning{
    background: linear-gradient(90deg,#ffd966,#ffc107);
    color: #000;
}

.vista-pdv .progress-bar.bg-success{
    background: linear-gradient(90deg,#28c76f,#198754);
}

@keyframes progressAnimation{
    from{ width:0; }
}

/* ===== CARDS ===== */
.vista-pdv .card{
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
    transition: all .2s ease;
}

.vista-pdv .card:hover{
    transform: translateY(-1px);
}

.vista-pdv .card-body{
    padding: 22px;
}

/* ===== TABLAS ===== */
.table-responsive{
    overflow-x: auto;
}

#tablaObjetivos{
    min-width: 1200px;
}

#tablaObjetivos th{
    white-space: nowrap;
    font-size:12px;
    text-transform: uppercase;
}

#tablaObjetivos td{
    white-space: nowrap;
    text-align: center;
}

.vista-pdv .table{
    margin-bottom: 0;
}

.vista-pdv .table thead th{
    background:#f1f3f5;
    text-align:center;
    font-size:13px;
    font-weight:600;
    border-bottom: 2px solid #e9ecef;
}

.vista-pdv .table td{
    vertical-align:middle;
    font-size:13px;
}

.vista-pdv .table tbody tr:hover{
    background:#fafafa;
}

.vista-pdv .table-sm td{
    padding: 6px 8px;
}

/* ===== FORMULARIOS ===== */
.vista-pdv label{
    font-size: 13px;
    font-weight: 700;
    color: #6b7280;
    margin-bottom: 6px;
    display: inline-block;
}

.vista-pdv .form-control{
    border-radius: 8px;
    border: 1px solid #dfe3e8;
    min-height: 42px;
    transition: all .2s ease;
}

.vista-pdv .form-control:focus{
    border-color: #6f42c1;
    box-shadow: 0 0 0 .15rem rgba(111,66,193,.15);
}

/* ===== BOTONES ===== */
.vista-pdv .btn{
    border-radius: 8px;
    font-weight: 600;
    transition: all .2s ease;
}

.vista-pdv .btn:hover{
    transform: translateY(-1px);
}

.vista-pdv .btn-outline-primary{
    font-weight: 500;
}

.vista-pdv .btn-outline-primary:hover{
    transform: scale(1.03);
}

.vista-pdv .btn-ver-clientes{
    font-size:11px;
    padding:4px 10px;
    border-radius:14px;
    line-height:1.2;
}

/* ===== BADGES ===== */
.vista-pdv .badge{
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 6px;
}

/* ===== TITULOS H5 ===== */
.vista-pdv h5{
    font-weight: 700;
    color: #2f2f2f;
}

/* ===== ESTADOS ===== */
.vista-pdv .estado-ok{
    color: #28a745;
    font-size: 16px;
}

.vista-pdv .estado-no{
    color: #dc3545;
    font-size: 16px;
}

/* ===== PANEL CLIENTES ===== */
.vista-pdv .clientes-panel{
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #eee;
    margin-top: 10px;
}

.vista-pdv .filtros-clientes{
    margin-bottom: 15px;
}

.vista-pdv #panel-clientes-global {
    animation: fadePanel .25s ease;
}

.vista-pdv #panel-clientes-global .clientes-panel {
    background: #fff;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
    border-radius: 12px;
}

@keyframes fadePanel {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== LOADER ===== */
.loader-global{
    position: fixed !important;
    inset: 0 !important;
    width: 100vw;
    height: 100vh;
    background: rgba(255,255,255,0.72);
    backdrop-filter: blur(2px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeInLoader .2s ease;
}

.loader-box{
    min-width: 240px;
    max-width: calc(100vw - 40px);
    padding: 22px 28px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    text-align: center;
    border: 1px solid #ece7fb;
}

.loader-spinner{
    width: 44px;
    height: 44px;
    margin: 0 auto 14px;
    border: 4px solid #e8defc;
    border-top: 4px solid #6f42c1;
    border-radius: 50%;
    animation: girarLoader 0.8s linear infinite;
}

.loader-text{
    font-size: 14px;
    font-weight: 700;
    color: #512da8;
    letter-spacing: .2px;
}

@keyframes girarLoader{
    100%{ transform: rotate(360deg); }
}

@keyframes fadeInLoader{
    from{ opacity:0; }
    to{ opacity:1; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px){
    .vista-pdv .pdv-hero{
        padding:22px 20px;
    }

    .vista-pdv .pdv-hero-title{
        font-size:24px;
    }
}