:root {
  --azul-oscuro: #10233d;
  --azul: #1a3a63;
  --acento: #2f7dd6;
  --acento-suave: #eaf2fc;
  --verde: #1c9c63;
  --naranja: #e08a1e;
  --rojo: #d64545;
  --gris-fondo: #f4f6f9;
}

body {
  background: var(--gris-fondo);
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  color: #1f2937;
}

.app-navbar {
  background: linear-gradient(90deg, var(--azul-oscuro), var(--azul));
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.app-navbar .nav-link { color: rgba(255,255,255,.8); font-weight: 500; }
.app-navbar .nav-link.active, .app-navbar .nav-link:hover { color: #fff; }
.app-navbar .navbar-brand { color: #fff; }

.card { border: none; border-radius: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.card-header { background: #fff; border-bottom: 1px solid #eee; font-weight: 600; border-radius: 12px 12px 0 0 !important; }

.btn-primary { background: var(--acento); border-color: var(--acento); }
.btn-primary:hover { background: #2568b3; border-color: #2568b3; }

.kpi-card { border-radius: 14px; padding: 18px 20px; color: #fff; position: relative; overflow: hidden; }
.kpi-card i { font-size: 2.2rem; opacity: .35; position: absolute; right: 16px; top: 14px; }
.kpi-card .valor { font-size: 1.7rem; font-weight: 700; }
.kpi-card .etiqueta { font-size: .85rem; opacity: .9; }
.kpi-azul { background: linear-gradient(135deg, #2f7dd6, #184a86); }
.kpi-verde { background: linear-gradient(135deg, #29b673, #12744a); }
.kpi-naranja { background: linear-gradient(135deg, #f0a53a, #b9700e); }
.kpi-rojo { background: linear-gradient(135deg, #e2645f, #a52d29); }

.table thead th { background: var(--acento-suave); font-weight: 600; border-bottom: none; font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; }
.table td, .table th { vertical-align: middle; }

.login-wrapper {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at top left, var(--azul), var(--azul-oscuro));
}
.login-card { width: 100%; max-width: 380px; border-radius: 16px; }
.login-logo { font-size: 2.5rem; color: var(--acento); }

/* --------- Punto de venta --------- */
.pos-scanner-box {
  background: #fff; border-radius: 14px; padding: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.pos-scanner-box input {
  font-size: 1.3rem; padding: 14px 16px; border-radius: 10px; border: 2px solid var(--acento);
}
.pos-scanner-box input:focus { box-shadow: 0 0 0 4px rgba(47,125,214,.15); }

.carrito-tabla tbody tr td { font-size: .95rem; }
.carrito-total { font-size: 2rem; font-weight: 700; color: var(--azul-oscuro); }

.producto-sugerido { cursor: pointer; padding: 8px 10px; border-radius: 8px; }
.producto-sugerido:hover { background: var(--acento-suave); }

.badge-vencimiento-critico { background: var(--rojo); }
.badge-vencimiento-alerta { background: var(--naranja); }
.badge-vencimiento-ok { background: var(--verde); }

/* --------- Etiquetas / impresión --------- */
.hoja-etiquetas { display: flex; flex-wrap: wrap; gap: 3mm; }
.etiqueta {
  border: 1px dashed #bbb; padding: 2mm; text-align: center;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  box-sizing: border-box;
}
.etiqueta .nombre-prod { font-size: 9px; font-weight: 700; line-height: 1.1; max-height: 20px; overflow: hidden; }
.etiqueta .precio-prod { font-size: 13px; font-weight: 800; margin-top: 1mm; }
.etiqueta svg { max-width: 100%; }

@media print {
  .no-imprimir { display: none !important; }
  body { background: #fff; }
  .imprimir-full { margin: 0; padding: 0; }
}

/* --------- Ticket 80mm/58mm --------- */
.ticket {
  font-family: "Courier New", monospace;
  width: 100%;
  color: #000;
}
.ticket hr { border-top: 1px dashed #000; }
.ticket table { width: 100%; font-size: 12px; }
.ticket .centrado { text-align: center; }
.ticket .totales td { font-weight: 700; }

@media print {
  @page { margin: 0; }
}
