:root {
  --brand: #165e5b;          /* verde azulado de la boleta INS */
  --brand-oscuro: #0e4442;
  --acento: #8a5a2e;         /* café de la boleta */
  --card: #fff;
  --fondo: #f3f5f4;
  --text-mute: #6b7775;
}
body { background: var(--fondo); }
.marca { color: var(--brand); font-weight: 700; }

.barra { background: var(--brand); padding: .55rem 0; color: #fff; }
.marca-app { color: #fff; font-weight: 700; text-decoration: none; font-size: 1.1rem; white-space: nowrap; }
.marca-app small { font-weight: 400; opacity: .7; font-size: .75rem; margin-left: .3rem; }
.enlace-menu { color: rgba(255,255,255,.85); text-decoration: none; padding: .35rem .7rem; border-radius: 8px; font-size: .9rem; }
.enlace-menu:hover, .enlace-menu.activo { background: rgba(255,255,255,.15); color: #fff; }
.estado-red { width: 11px; height: 11px; border-radius: 50%; background: #5ee08a; box-shadow: 0 0 0 3px rgba(94,224,138,.25); }
.estado-red.caida { background: #ff5a5a; box-shadow: 0 0 0 3px rgba(255,90,90,.35); animation: parpadeo 1s infinite; }
@keyframes parpadeo { 50% { opacity: .3; } }

.tarjeta { background: var(--card); border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.07); }
.tarjeta-dato { background: var(--card); border-radius: 12px; padding: .8rem 1rem; box-shadow: 0 1px 3px rgba(0,0,0,.07); border-left: 4px solid var(--brand); }
.tarjeta-dato span { display: block; font-size: .75rem; text-transform: uppercase; color: var(--text-mute); letter-spacing: .03em; }
.tarjeta-dato b { font-size: 1.35rem; color: #1d2b2a; }

.chip-respaldo { background: #e6f4ef; color: #11523a; border-radius: 10px; padding: .45rem .8rem; font-size: .85rem; margin-bottom: 1rem; }
.chip-respaldo.mal { background: #fdecea; color: #8a1f17; }
.estado-grande { font-weight: 700; padding: .3rem .8rem; border-radius: 8px; }
.estado-grande.ok { background: #e6f4ef; color: #11523a; }
.estado-grande.mal { background: #fdecea; color: #8a1f17; }

.buscador { width: 300px; max-width: 100%; }
.table thead th { font-size: .75rem; text-transform: uppercase; color: var(--text-mute); font-weight: 600; background: #fafbfb; }
.fila-anulada td { text-decoration: line-through; color: #999; }
.fila-anulada td:last-child, .fila-anulada .badge { text-decoration: none; }

.btn-marca { background: var(--brand); color: #fff; border: none; }
.btn-marca:hover, .btn-marca:focus { background: var(--brand-oscuro); color: #fff; }
.btn-nuevo { background: var(--brand); color: #fff; border: none; border-radius: 8px; padding: 6px 14px; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.btn-nuevo:hover { background: var(--brand-oscuro); }
kbd { font-size: .65rem; background: rgba(0,0,0,.25); padding: 1px 4px; }
.btn-outline-plan { border: 2px solid #cfd8d7; border-radius: 10px; padding: .35rem .9rem; line-height: 1.2; text-align: center; min-width: 110px; }
.btn-outline-plan small { color: var(--text-mute); font-size: .7rem; }
.btn-check:checked + .btn-outline-plan { border-color: var(--brand); background: #e3f0ef; color: var(--brand-oscuro); }
.btn-check:checked + .btn-outline-secondary { background: var(--brand); border-color: var(--brand); }

.campo-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; color: var(--acento); font-weight: 700; margin-bottom: 2px; }
.mayus { text-transform: uppercase; }

/* Modal (patrón panel-modal-crud) */
.modal-fondo { display: none; position: fixed; inset: 0; background: rgba(20,40,38,.5); z-index: 1000; align-items: center; justify-content: center; padding: 1rem; }
.modal-fondo.activo { display: flex; }
.modal-caja { background: var(--card); border-radius: 14px; padding: 1.25rem 1.5rem; width: 100%; max-width: 560px; max-height: 94vh; overflow-y: auto; }
.modal-caja.modal-ancho { max-width: 980px; }
.modal-titulo { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.modal-cerrar { background: none; border: none; color: var(--text-mute); font-size: 20px; cursor: pointer; }
.item-historial { border-left: 3px solid var(--brand); padding: .3rem .7rem; margin-bottom: .6rem; background: #fafbfb; }
.pre-detalle { white-space: pre-wrap; background: #f6f8f8; padding: .8rem; border-radius: 8px; }

.toast-app { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(100px); background: #1f6f4a; color: #fff; padding: .7rem 1.2rem; border-radius: 10px; z-index: 2000; transition: transform .25s; max-width: 92vw; font-weight: 600; }
.toast-app.visible { transform: translateX(-50%) translateY(0); }
.toast-app.aviso { background: #b26a00; }
.toast-app.error { background: #b3261e; }

.fondo-login { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--brand), var(--brand-oscuro)); padding: 1rem; }
.caja-login { background: #fff; border-radius: 16px; padding: 2rem; width: 100%; max-width: 380px; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.icono-login { font-size: 3rem; color: var(--brand); }

.solo-imprimir { display: none; }
@media print {
  .barra, .no-imprimir { display: none !important; }
  .solo-imprimir { display: flex; }
  body { background: #fff; }
}
