/* ── QB Movimientos Shortcode · estilos frontend ────────────────────────── */

.qb-mov-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    width: 100%;
    box-sizing: border-box;
}
.qb-mov-wrap * { box-sizing: border-box; }

/* Filtros */
.qb-mov-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 16px;
}
.qb-mov-input,
.qb-mov-select {
    height: 38px;
    padding: 0 12px;
    border: 1px solid #dde4ed;
    border-radius: 6px;
    font-size: 13px;
    color: #333;
    background: #fff;
}
.qb-mov-input { min-width: 220px; }
.qb-mov-select { min-width: 140px; }
.qb-mov-btn {
    height: 38px;
    padding: 0 18px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    background: #2E6DA4;
    color: #fff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}
.qb-mov-btn-sec {
    background: #f0f0f0;
    color: #555;
}
.qb-mov-btn:hover     { background: #1A3A5C; color: #fff; }
.qb-mov-btn-sec:hover { background: #e0e0e0; color: #333; }

/* Resumen */
.qb-mov-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
}
.qb-mov-badge-filter {
    background: #E8A317;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
}

/* Tabla */
.qb-mov-table-wrap {
    width: 100%;
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #dde4ed;
}
.qb-mov-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.qb-mov-table thead th {
    background: #1A3A5C;
    color: #fff;
    padding: 10px 14px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.qb-mov-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background .1s;
}
.qb-mov-table tbody tr:hover    { background: #f5f9ff; }
.qb-mov-row-danger              { background: #fff5f5 !important; }
.qb-mov-row-danger:hover        { background: #ffeeee !important; }
.qb-mov-table td {
    padding: 9px 14px;
    vertical-align: middle;
    color: #333;
}
.qb-mov-table tfoot td {
    padding: 10px 14px;
    font-size: 13px;
    border-top: 2px solid #dde4ed;
    background: #f8f9ff;
}
.qb-mov-total-label { text-align: right; font-weight: 600; color: #1A3A5C; }
.qb-mov-fecha   { white-space: nowrap; color: #555; }
.qb-mov-num     { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.qb-mov-bold    { font-weight: 600; }
.qb-mov-muted   { color: #888; }
.qb-mov-cliente { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qb-mov-concepto{ max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Badges */
.qb-mov-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.qb-mov-badge-venta     { background: #e8f5e9; color: #217346; }
.qb-mov-badge-gasto     { background: #fff3e0; color: #e65100; }
.qb-mov-badge-abono     { background: #e3f2fd; color: #1565c0; }
.qb-mov-badge-pagado    { background: #e8f5e9; color: #217346; }
.qb-mov-badge-vencido   { background: #fce8e8; color: #c00000; }
.qb-mov-badge-pendiente { background: #fff8e1; color: #f57f17; }

/* Paginación */
.qb-mov-pagination {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 16px;
    justify-content: center;
}
.qb-mov-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 6px;
    font-size: 13px;
    text-decoration: none;
    color: #2E6DA4;
    border: 1px solid #dde4ed;
    background: #fff;
    transition: all .15s;
}
.qb-mov-page:hover      { background: #f0f6ff; border-color: #2E6DA4; }
.qb-mov-page-active     { background: #2E6DA4; color: #fff; border-color: #2E6DA4; font-weight: 600; }

/* Login */
.qb-mov-login { color: #666; font-size: 14px; }
.qb-mov-empty { color: #888; text-align: center; padding: 30px 0; }

/* Responsive */
@media (max-width: 768px) {
    .qb-mov-filters { flex-direction: column; align-items: stretch; }
    .qb-mov-input,
    .qb-mov-select  { width: 100%; }
    .qb-mov-btn     { width: 100%; justify-content: center; }
    .qb-mov-table thead th:nth-child(5),
    .qb-mov-table thead th:nth-child(6),
    .qb-mov-table tbody td:nth-child(5),
    .qb-mov-table tbody td:nth-child(6) { display: none; }
}

/* ── Ficha individual del movimiento ─────────────────────────────────────── */

.qb-ficha-wrap {
    max-width: 860px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.qb-ficha-wrap * { box-sizing: border-box; }

.qb-ficha-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid #1A3A5C;
    flex-wrap: wrap;
}
.qb-ficha-header-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.qb-ficha-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}
.qb-ficha-titulo {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: #1A3A5C;
    line-height: 1.3;
}
.qb-ficha-tipo   { font-size: 12px; }
.qb-ficha-estado { font-size: 13px; padding: 4px 14px; }

.qb-ficha-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid #dde4ed;
    background: #fff;
    color: #555;
    font-size: 13px;
    text-decoration: none;
    transition: all .15s;
}
.qb-ficha-edit-btn:hover { background: #f5f9ff; border-color: #2E6DA4; color: #2E6DA4; }

/* Grid */
.qb-ficha-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}
.qb-ficha-card {
    background: #fff;
    border: 1px solid #dde4ed;
    border-radius: 8px;
    padding: 16px 20px;
}
.qb-ficha-card-full      { grid-column: 1 / -1; }
.qb-ficha-card-highlight {
    background: #1A3A5C;
    border-color: #1A3A5C;
}
.qb-ficha-card-highlight .qb-ficha-label { color: #BDD7EE; }
.qb-ficha-card-highlight .qb-ficha-value { color: #fff; }

.qb-ficha-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #888;
    margin: 0 0 6px;
}
.qb-ficha-value {
    margin: 0;
    font-size: 15px;
    color: #333;
    font-weight: 500;
}
.qb-ficha-value-lg  { font-size: 18px; }
.qb-ficha-value-xl  { font-size: 24px; font-weight: 700; }
.qb-ficha-blue      { color: #2E6DA4; }
.qb-ficha-muted     { color: #888; }
.qb-ficha-notas     { font-size: 14px; color: #555; line-height: 1.6; font-weight: 400; }

.qb-ficha-link {
    color: #2E6DA4;
    text-decoration: none;
    border-bottom: 1px dashed #2E6DA4;
}
.qb-ficha-link:hover { color: #1A3A5C; }

.qb-ficha-footer { margin-top: 8px; }
.qb-ficha-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid #dde4ed;
    background: #f8f9ff;
    color: #555;
    font-size: 13px;
    text-decoration: none;
    transition: all .15s;
}
.qb-ficha-back-btn:hover { background: #f0f6ff; color: #2E6DA4; }

@media (max-width: 640px) {
    .qb-ficha-grid { grid-template-columns: 1fr 1fr; }
    .qb-ficha-value-xl { font-size: 20px; }
    .qb-ficha-titulo   { font-size: 18px; }
}
