/* SIGEAR WEB - estilos */
:root {
  --sg-primario: #1f4e79;
  --sg-primario-osc: #163a5c;
  --sg-acento: #2e86c1;
  --sg-fondo: #f3f5f8;
  --sg-borde: #dfe3ea;
  --sg-sidebar: 230px;
}
body { background: var(--sg-fondo); font-size: .92rem; }
.topbar {
  position: sticky; top: 0; z-index: 1030; height: 56px;
  display: flex; align-items: center; padding: 0 16px;
  background: linear-gradient(90deg, var(--sg-primario-osc), var(--sg-primario));
  color: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.topbar .brand { color: #fff; font-weight: 700; text-decoration: none; font-size: 1.15rem; letter-spacing: .5px; }
.topbar .brand small { font-weight: 400; opacity: .7; font-size: .7rem; }
.topsearch { width: 210px; background: rgba(255,255,255,.15); border: 0; color: #fff; }
.topsearch::placeholder { color: rgba(255,255,255,.7); }
.topsearch:focus { background: #fff; color: #000; }
.layout { display: flex; min-height: calc(100vh - 56px); }
.sidebar { width: var(--sg-sidebar); flex-shrink: 0; background: #fff; border-right: 1px solid var(--sg-borde); padding: 10px 8px 30px; }
@media (min-width: 992px) { .sidebar { position: sticky; top: 56px; height: calc(100vh - 56px); overflow-y: auto; } }
.sidebar .nav-link { color: #344; border-radius: 6px; padding: 7px 10px; display: flex; gap: 10px; align-items: center; }
.sidebar .nav-link i { font-size: 1.05rem; width: 20px; text-align: center; color: var(--sg-acento); }
.sidebar .nav-link:hover { background: #eef3f9; }
.sidebar .nav-link.active { background: var(--sg-primario); color: #fff; }
.sidebar .nav-link.active i { color: #fff; }
.sidebar .nav-title { font-size: .7rem; text-transform: uppercase; color: #8a94a6; margin: 14px 10px 4px; letter-spacing: .6px; font-weight: 600; }
.content { flex: 1; min-width: 0; padding: 20px 24px 40px; }
@media (max-width: 575px) { .content { padding: 14px 12px 30px; } }

.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { font-size: 1.35rem; margin: 0; font-weight: 600; color: var(--sg-primario-osc); }
.page-head .acciones { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.card { border: 1px solid var(--sg-borde); border-radius: 10px; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.card-header { background: #fff; font-weight: 600; border-bottom: 1px solid var(--sg-borde); }

.kpi { padding: 14px 16px; display: flex; flex-direction: row; gap: 12px; align-items: center; }
.kpi .ico { width: 46px; height: 46px; border-radius: 10px; display: grid; place-items: center; font-size: 1.4rem; color: #fff; flex-shrink: 0; }
.kpi .val { font-size: 1.45rem; font-weight: 700; line-height: 1.1; }
.kpi .lbl { font-size: .78rem; color: #6c757d; }
.bg-c1 { background: #1f4e79; } .bg-c2 { background: #2e86c1; } .bg-c3 { background: #239b56; }
.bg-c4 { background: #b9770e; } .bg-c5 { background: #c0392b; } .bg-c6 { background: #7d3c98; }

.table-sm td, .table-sm th { vertical-align: middle; }
.table thead th { background: #eef2f7; font-weight: 600; font-size: .8rem; text-transform: uppercase; color: #3d4b5c; white-space: nowrap; }
.table-hover tbody tr:hover { background: #f5f9ff; }
.filtros { background: #fff; border: 1px solid var(--sg-borde); border-radius: 10px; padding: 12px; margin-bottom: 14px; }
.filtros .form-label { font-size: .75rem; margin-bottom: 2px; color: #5a6575; }
.dato-lbl { font-size: .72rem; color: #6c757d; text-transform: uppercase; }
.dato-val { font-weight: 600; }
.chart-box { position: relative; height: 300px; }
.chart-box.alto { height: 420px; }
.pdf-frame { width: 100%; height: 75vh; border: 1px solid var(--sg-borde); border-radius: 6px; background: #525659; }

/* Escáner */
.paginas-scan { display: flex; flex-wrap: wrap; gap: 10px; }
.pag-scan { width: 130px; border: 1px solid var(--sg-borde); border-radius: 6px; background: #fff; padding: 4px; text-align: center; position: relative; }
.pag-scan img { width: 100%; height: 165px; object-fit: contain; background: #f6f6f6; }
.pag-scan .btns { display: flex; justify-content: center; gap: 2px; margin-top: 3px; }
.pag-scan .nro { position: absolute; top: 4px; left: 4px; background: var(--sg-primario); color: #fff; border-radius: 4px; font-size: .7rem; padding: 0 5px; }
#camara { width: 100%; max-height: 360px; background: #000; border-radius: 6px; }

.ingreso-input { font-size: 1.3rem; font-weight: 600; letter-spacing: 1px; }
.flash-ok { animation: flashok 1s; }
@keyframes flashok { from { background: #d4f5dd; } to { background: transparent; } }

/* ===== Impresión ===== */
.hoja { background: #fff; padding: 24px; border-radius: 8px; border: 1px solid var(--sg-borde); }
.rep-cab { display: flex; align-items: center; border-bottom: 2px solid #333; padding-bottom: 8px; margin-bottom: 10px; gap: 12px; }
.rep-cab img { max-height: 60px; }
.rep-cab .tit { flex: 1; text-align: center; }
.rep-cab .tit h2 { font-size: 1.15rem; margin: 0; font-weight: 700; }
.rep-cab .tit div { font-size: .8rem; }
.rep-cab .meta { font-size: .72rem; text-align: right; white-space: nowrap; }
.rep-tabla { width: 100%; border-collapse: collapse; font-size: .78rem; }
.rep-tabla th, .rep-tabla td { border: 1px solid #999; padding: 3px 5px; }
.rep-tabla th { background: #e5e9ef; }
.rep-tabla tfoot td { font-weight: 700; background: #f2f2f2; }
.firmas { display: flex; justify-content: space-around; margin-top: 70px; text-align: center; font-size: .8rem; }
.firmas div { border-top: 1px solid #000; width: 220px; padding-top: 4px; }
.salto { page-break-after: always; break-after: page; }
@media print {
  @page { size: auto; margin: 12mm 10mm; }
  body { background: #fff; font-size: 10pt; }
  .layout { display: block; }
  .content { padding: 0; }
  .hoja { border: 0; padding: 0; }
  .card { border: 0; box-shadow: none; }
  .no-print, .btn, .pagination, .alert { display: none !important; }
  .chart-box { height: 260px; page-break-inside: avoid; }
  a { color: #000; text-decoration: none; }
  .table thead th { background: #e5e9ef !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .card-print-break { page-break-inside: avoid; }
}
