:root {
    --idee-primary: #32b5f4;
    --idee-bg: #eaf6fc;
    --idee-bg-soft: #f4f8fc;
    --idee-card: #ffffff;
    --idee-card-soft: #f8fcff;
    --idee-border: #b8c7d9;
    --idee-text: #16263d;
    --idee-muted: #52657a;
    --idee-shadow: 0 14px 36px rgba(30, 73, 108, .11);
}

* { box-sizing: border-box; }

body {
    min-height: 100vh;
    margin: 0;
    padding: 28px 20px 48px;
    color: var(--idee-muted);
    font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-weight: 400;
    background:
        radial-gradient(circle at 8% 5%, rgba(50,181,244,.15), transparent 28rem),
        linear-gradient(135deg, var(--idee-bg) 0%, var(--idee-bg-soft) 56%, #edf5fb 100%);
}

.contenedor {
    width: min(1380px, 100%);
    margin: 0 auto;
    padding: 0;
    background: transparent;
}

.contenedor > h2 {
    position: relative;
    display: flex;
    min-height: 142px;
    align-items: center;
    margin: 0 0 24px;
    padding: 28px 34px 49px 126px;
    overflow: hidden;
    color: var(--idee-text);
    font-size: clamp(1.75rem, 3vw, 2.35rem);
    font-weight: 650;
    line-height: 1.12;
    letter-spacing: -.025em;
    text-align: left;
    background: linear-gradient(145deg, var(--idee-card), var(--idee-card-soft));
    border: 1px solid rgba(184,199,217,.72);
    border-radius: 22px;
    box-shadow: var(--idee-shadow);
}

.contenedor > h2::before {
    content: "≡";
    position: absolute;
    top: 50%;
    left: 34px;
    display: grid;
    width: 70px;
    height: 70px;
    place-items: center;
    color: #087fb9;
    font-size: 36px;
    font-weight: 500;
    background: linear-gradient(145deg, #dff4ff, #c9ecff);
    border: 1px solid #abe0fa;
    border-radius: 18px;
    box-shadow: 0 9px 20px rgba(50,181,244,.18);
    transform: translateY(-50%);
}

.contenedor > h2::after {
    content: "Consulta consolidada de clientes, productos, pagos y resultados.";
    position: absolute;
    bottom: 27px;
    left: 126px;
    color: var(--idee-muted);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: 0;
}

#tabla {
    width: 100%;
    margin: 0;
    overflow: hidden;
    color: var(--idee-text);
    font-size: 13.5px;
    border-collapse: separate;
    border-spacing: 0;
    background: linear-gradient(145deg, var(--idee-card), var(--idee-card-soft));
    border: 1px solid #d3dfe9;
    border-radius: 17px;
    box-shadow: var(--idee-shadow);
}

#tabla thead th {
    padding: 13px 11px;
    color: #fff;
    font-weight: 600;
    white-space: nowrap;
    text-align: center;
    background: #29465e;
    border: 0;
    border-right: 1px solid #3b5b73;
}

#tabla tbody td {
    padding: 12px 11px;
    color: var(--idee-text);
    text-align: center;
    vertical-align: middle;
    background: #fff;
    border: 0;
    border-bottom: 1px solid #dce5ed;
    transition: background-color .2s ease;
}

#tabla tbody tr:nth-child(even) td { background: #f5faff; }
#tabla tbody tr:hover td { background: #eaf7fd; }
#tabla tbody tr:last-child td { border-bottom: 0; }

#tabla tbody td:first-child {
    font-weight: 600;
    text-align: left;
}

#tabla tbody td:nth-child(n+6) {
    font-variant-numeric: tabular-nums;
    font-weight: 550;
}

.mora { color: #bd3545; font-weight: 600; }
.pagado { color: #20795b; font-weight: 600; }

#buscador {
    width: 100%;
    min-height: 47px;
    margin-bottom: 15px;
    padding: 10px 13px;
    color: var(--idee-text);
    font-family: inherit;
    font-size: 14px;
    background: #fbfdff;
    border: 1px solid var(--idee-border);
    border-radius: 10px;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}

#buscador:hover { border-color: #8db4d0; }
#buscador:focus { background: #fff; border-color: var(--idee-primary); box-shadow: 0 0 0 4px rgba(50,181,244,.14); }

@media (max-width: 1050px) {
    .contenedor { overflow-x: auto; }
    .contenedor > h2 { min-width: 850px; }
    #tabla { min-width: 1050px; }
}

@media (max-width: 700px) {
    body { padding: 14px 11px 30px; }
    .contenedor > h2 { min-height: 132px; padding: 23px 17px 48px 82px; border-radius: 17px; }
    .contenedor > h2::before { left: 17px; width: 50px; height: 50px; font-size: 27px; border-radius: 14px; }
    .contenedor > h2::after { right: 15px; bottom: 21px; left: 82px; font-size: .84rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: .01ms !important; }
}
