:root { --pla-primario: #1f4e79; --pla-acento: #f0a500; }
body { background: #f4f6f9; }
.pla-nav { background: var(--pla-primario); }
.pla-nav .nav-link.active { color: #fff; border-bottom: 2px solid var(--pla-acento); }
.card { border: 0; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.table thead th { background: #e9eef4; font-size: .8rem; text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; }
.table td { vertical-align: middle; }
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1f4e79 0%, #2e75b6 100%); }
.login-card { width: 100%; max-width: 380px; }
.kpi { font-size: 1.6rem; font-weight: 600; }
.badge-rol-ADMIN { background: #6f42c1; } .badge-rol-PLANILLERO { background: #0d6efd; }
.badge-rol-TAREADOR { background: #198754; } .badge-rol-CONSULTA { background: #6c757d; }

/* ---------- Planilla (tabla tipo hoja de cálculo) ---------- */
.pla-tabla-wrap { max-height: 70vh; overflow: auto; }
.pla-tabla { font-size: .78rem; border-collapse: separate; border-spacing: 0; }
.pla-tabla th, .pla-tabla td { white-space: nowrap; text-align: right; padding: .3rem .5rem; border-bottom: 1px solid #edf0f3; background: #fff; }
.pla-tabla thead th { position: sticky; top: 0; z-index: 3; background: #f1f4f8; font-size: .7rem; text-transform: uppercase; letter-spacing: .02em; color: #3d4b5c; border-bottom: 1px solid #d5dbe3; text-align: center; }
.pla-tabla thead tr.pla-grupos th { top: 0; font-size: .68rem; letter-spacing: .08em; color: #fff; border-bottom: 0; }
.pla-tabla thead tr:nth-child(2) th { top: 26px; }
.pla-tabla thead tr.pla-grupos th.pla-fix { background: #1f4e79; }
.pla-tabla .g-ing { background: #2e75b6 !important; } .pla-tabla .g-desc { background: #c0504d !important; }
.pla-tabla .g-neto { background: #2e7d32 !important; } .pla-tabla .g-apor { background: #7f6000 !important; }
.pla-tabla .pla-fix { position: sticky; z-index: 2; }
.pla-tabla thead .pla-fix { z-index: 4; }
.pla-tabla .pla-fix-0 { left: 0; min-width: 34px; }
.pla-tabla .pla-fix-1 { left: 34px; min-width: 250px; max-width: 290px; white-space: normal; box-shadow: 2px 0 0 #e2e6ec; }
.pla-tabla tbody tr.pla-fila:hover td { background: #f6f9fd; }
.pla-tabla .pla-nombre { font-weight: 600; color: #1f2d3d; text-decoration: none; font-size: .8rem; }
.pla-tabla .pla-nombre:hover { color: #0d6efd; text-decoration: underline; }
.pla-tabla .pla-sub { font-size: .7rem; color: #7a8796; }
.pla-tabla .pla-chip { background: #eef2f7; border-radius: 3px; padding: 0 .3rem; color: #3d4b5c; }
.pla-tabla .col-total { font-weight: 600; background: #f8fafc; }
.pla-tabla .col-neto { font-weight: 700; color: #1b5e20; background: #f1f8f2 !important; }
.pla-tabla tr.pla-grupo td { background: #fafbfc; border-top: 2px solid var(--cat, #555); padding-top: .45rem; }
.pla-tabla .pla-cat-dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; background: var(--cat, #555); margin-right: .4rem; }
.pla-tabla tr.pla-subtotal td { background: #f5f7fa; font-weight: 600; font-size: .74rem; color: #3d4b5c; border-bottom: 1px solid #d5dbe3; }
.pla-tabla tfoot td { position: sticky; bottom: 0; z-index: 3; background: #1f2d3d !important; color: #fff !important; font-weight: 700; }
.pla-tabla tfoot td.pla-fix { z-index: 4; }
@media print { .pla-tabla-wrap { max-height: none; overflow: visible; } .pla-toolbar { display: none !important; } }
/* revisión y lectura de la planilla ancha */
.pla-tabla tbody tr.pla-fila { cursor: pointer; }
.pla-tabla tbody tr.pla-fila:nth-child(even of .pla-fila) td { background: #fbfcfe; }
.pla-tabla tbody tr.pla-fila:hover td { background: #eef5ff !important; }
.pla-tabla tbody td.pla-col { background: #f3f7fc !important; }
.pla-tabla tbody tr.pla-fila:hover td.pla-col { background: #dce9fb !important; }
/* revisado auxiliar = fila sombreada (resaltador) */
.pla-tabla tbody tr.pla-fila.rev-ok td, .pla-tabla tbody tr.pla-fila.rev-ok:hover td { background: #fff1b8 !important; --bs-table-bg-state: #fff1b8; }
.pla-tabla tbody tr.pla-fila.rev-ok td.pla-col, .pla-tabla tbody tr.pla-fila.rev-ok:hover td.pla-col { background: #ffe68a !important; }
.pla-tabla tbody tr.pla-fila.rev-ok td.pla-fix-0 { box-shadow: inset 5px 0 0 #e0a800 !important; color: #8a6d00 !important; font-weight: 700; }
.pla-tabla.pla-compacta { font-size: .72rem; } .pla-tabla.pla-compacta .pla-sub { display: none; }
.pla-tabla.pla-compacta th, .pla-tabla.pla-compacta td { padding: .15rem .35rem; } .pla-tabla.pla-compacta .pla-nombre { font-size: .74rem; }
#plaFiltroRev .btn.active { color: #fff; } #plaFiltroRev .btn-outline-secondary.active { background: #6c757d; } #plaFiltroRev .btn-outline-warning.active { background: #e0a800; border-color: #e0a800; }
