/* ==========================================================================
   V4.34 :: v434-caja-premium - Dashboard superior /caja - estilos
   V4.34.1 :: v4341-sucursales-compact - acordeon para sucursales sin movs
   ========================================================================== */

.cj-dash-loading {
    text-align: center;
    color: #6b7280;
    font-style: italic;
    padding: 1.5rem;
}

.cj-dashboard-v434 {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}

/* === SALDO TOTAL grande === */
.cj-saldo-total {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5582 60%, #3a6b9e 100%);
    color: #ffffff;
    padding: 1.4rem 1.75rem;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(30, 58, 95, 0.25);
    position: relative;
    overflow: hidden;
}

.cj-saldo-total::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -10%;
    width: 40%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(255,255,255,0.08) 0%, transparent 70%);
    pointer-events: none;
}

.cj-st-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    position: relative;
}

.cj-st-lbl {
    font-size: 0.8rem;
    opacity: 0.9;
    font-weight: 600;
    letter-spacing: 0.6px;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
}

.cj-st-val {
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.cj-st-meta {
    text-align: right;
    opacity: 0.85;
}

.cj-st-meta-l {
    font-size: 0.7rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cj-st-meta-v {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 0.15rem;
}

/* === Sucursales grid === */
.cj-sucursales-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.65rem;
}

.cj-sucursal-card {
    background: white;
    padding: 0.9rem 1.15rem;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    border-left: 4px solid #3a6b9e;
}

.cj-sucursal-card.neg {
    border-left-color: #dc2626;
    background: #fef2f2;
}

.cj-sucursal-card.pos {
    border-left-color: #059669;
}

.cs-nombre {
    font-size: 0.82rem;
    color: #6b7280;
    font-weight: 600;
    margin-bottom: 0.45rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.cs-saldo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e3a5f;
    line-height: 1;
}

.cj-sucursal-card.neg .cs-saldo {
    color: #dc2626;
}

.cs-movs {
    font-size: 0.7rem;
    color: #9ca3af;
    margin-top: 0.35rem;
}

/* === V4.34.1 Acordeon de sucursales vacias === */
.cj-sucursales-vacias {
    margin-top: 0.25rem;
}

.cj-sucursales-vacias details {
    background: rgba(255, 255, 255, 0.4);
    border: 1px dashed #d1d5db;
    border-radius: 10px;
    padding: 0.5rem 0.85rem;
    transition: background 0.15s;
}

.cj-sucursales-vacias details[open] {
    background: rgba(255, 255, 255, 0.7);
    padding-bottom: 0.85rem;
}

.cj-sucursales-vacias summary {
    cursor: pointer;
    font-size: 0.82rem;
    color: #6b7280;
    font-weight: 600;
    padding: 0.35rem 0;
    user-select: none;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cj-sucursales-vacias summary::-webkit-details-marker { display: none; }

.cj-sucursales-vacias summary::before {
    content: "▶";
    font-size: 0.7rem;
    color: #9ca3af;
    transition: transform 0.2s;
    display: inline-block;
}

.cj-sucursales-vacias details[open] summary::before {
    transform: rotate(90deg);
}

.cj-sucursales-vacias .cj-sucursales-grid {
    margin-top: 0.5rem;
    gap: 0.45rem;
}

.cj-sucursales-vacias .cj-sucursal-card {
    background: #f9fafb;
    border-left-color: #d1d5db;
    opacity: 0.75;
    padding: 0.65rem 0.9rem;
}

.cj-sucursales-vacias .cs-nombre {
    font-size: 0.72rem;
}

.cj-sucursales-vacias .cs-saldo {
    font-size: 1.05rem;
    color: #6b7280;
}

.cj-sucursales-vacias .cs-movs {
    font-size: 0.65rem;
}

/* === Card HOY === */
.cj-hoy-card {
    background: white;
    padding: 0.95rem 1.2rem;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.ch-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
    color: #1e3a5f;
    margin-bottom: 0.7rem;
    font-size: 0.95rem;
}

.ch-cnt-pill {
    background: #dbeafe;
    color: #1e40af;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.ch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.5rem;
}

.ch-item {
    display: flex;
    flex-direction: column;
    padding: 0.55rem 0.8rem;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #f3f4f6;
}

.ch-l {
    font-size: 0.68rem;
    color: #6b7280;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.4px;
}

.ch-v {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1f2937;
    margin-top: 0.25rem;
    line-height: 1.1;
}

.ch-rec .ch-v { color: #059669; }
.ch-otr .ch-v { color: #0891b2; }
.ch-eg .ch-v  { color: #dc2626; }
.ch-dif.pos .ch-v { color: #059669; }
.ch-dif.neg .ch-v { color: #dc2626; }

/* === Lista de cierres del día === */
.cj-cierres-hoy {
    background: white;
    padding: 0.95rem 1.2rem;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.cch-head {
    font-weight: 700;
    color: #1e3a5f;
    margin-bottom: 0.55rem;
    font-size: 0.95rem;
}

.cch-list {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.cch-row {
    display: grid;
    grid-template-columns: 1.4fr 0.5fr 1.4fr 1.1fr 1fr 0.5fr;
    gap: 0.6rem;
    padding: 0.55rem 0.8rem;
    background: #f9fafb;
    border-radius: 8px;
    font-size: 0.85rem;
    align-items: center;
    border: 1px solid #f3f4f6;
}

.cch-suc {
    font-weight: 600;
    color: #1f2937;
}

.cch-turno {
    color: #6366f1;
    font-size: 0.78rem;
    font-weight: 700;
    background: #eef2ff;
    padding: 0.15rem 0.5rem;
    border-radius: 5px;
    text-align: center;
    width: fit-content;
}

.cch-cajero {
    color: #4b5563;
    font-size: 0.82rem;
}

.cch-monto {
    font-weight: 700;
    color: #059669;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.cch-dif {
    font-size: 0.75rem;
    padding: 0.18rem 0.45rem;
    border-radius: 5px;
    text-align: center;
    font-weight: 600;
}

.cch-dif.pos { background: #d1fae5; color: #047857; }
.cch-dif.neg { background: #fee2e2; color: #b91c1c; }
.cch-dif-empty {
    text-align: center;
    color: #d1d5db;
}

.cch-hora {
    color: #9ca3af;
    font-size: 0.78rem;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* === Mobile === */
@media (max-width: 768px) {
    .cj-saldo-total { padding: 1rem 1.15rem; }
    .cj-st-val { font-size: 1.85rem; }
    .cj-st-meta-v { font-size: 1.1rem; }

    .cj-sucursales-grid { grid-template-columns: 1fr; }
    .cs-saldo { font-size: 1.25rem; }

    .ch-grid { grid-template-columns: repeat(2, 1fr); }
    .ch-item { padding: 0.45rem 0.6rem; }
    .ch-v { font-size: 0.92rem; }

    .cch-row {
        grid-template-columns: 1fr 1fr;
        gap: 0.3rem;
        font-size: 0.78rem;
    }
    .cch-turno, .cch-hora, .cch-dif, .cch-dif-empty {
        justify-self: start;
        text-align: left;
    }
}

/* === V4.34 columna sucursal en tabla principal === */
.cj-suc-pill {
    display: inline-block;
    background: #eef2ff;
    color: #4f46e5;
    padding: 0.15rem 0.5rem;
    border-radius: 5px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}
