:root {
  --bg: #0f1115;
  --surface: #171a21;
  --surface-2: #1e222b;
  --border: #2a2f3a;
  --text: #eef1f6;
  --muted: #98a2b3;
  --accent: #3b82f6;
  --accent-dark: #1d4ed8;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-size: 15px;
}

a {
  color: var(--accent);
}

code {
  font-family: Consolas, "Courier New", monospace;
  background: var(--surface-2);
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
  font-size: 0.9em;
}

h1,
h2,
h3 {
  margin: 0 0 0.4rem;
  line-height: 1.2;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 0.5rem 0.9rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
}

.btn--primary:hover {
  background: var(--accent-dark);
  text-decoration: none;
}

.btn--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.btn--danger {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.btn--sm {
  padding: 0.3rem 0.6rem;
  font-size: 0.83rem;
}

.btn--block {
  width: 100%;
}

input,
select,
textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 0.5rem 0.6rem;
  font: inherit;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.admin-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.admin-header__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.7rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.admin-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  font-weight: 700;
}

.admin-brand:hover {
  text-decoration: none;
}

.admin-brand__mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(140deg, #f97316, #c2410c);
  color: #1b0f04;
  font-weight: 800;
  font-size: 0.85rem;
}

.admin-brand small {
  color: var(--muted);
  font-weight: 500;
}

.admin-nav {
  display: flex;
  gap: 0.25rem;
  flex: 1;
  flex-wrap: wrap;
}

.admin-nav a {
  color: var(--muted);
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  font-size: 0.92rem;
}

.admin-nav a:hover {
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
}

.admin-nav a.is-active {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
}

.admin-header__right {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-size: 0.9rem;
}

.admin-header__right form {
  margin: 0;
}

.admin-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

.admin-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  text-align: center;
  font-size: 0.85rem;
  padding: 1.2rem;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}

.page-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.page-head__actions {
  display: flex;
  gap: 0.6rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.6rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  display: grid;
  gap: 0.3rem;
}

.card span {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.card strong {
  font-size: 1.7rem;
}

.card--status.status-pendiente strong {
  color: var(--warning);
}

.card--status.status-listo strong,
.card--status.status-entregado strong {
  color: var(--success);
}

.card--status.status-cancelado strong {
  color: var(--danger);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem 1.3rem;
  margin-bottom: 1.4rem;
}

.panel--narrow {
  max-width: 720px;
}

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.panel__head h2 {
  font-size: 1.08rem;
}

.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.table th,
.table td {
  text-align: left;
  padding: 0.55rem 0.6rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.table thead th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.table tfoot td {
  font-weight: 600;
}

.table .total td {
  color: var(--accent);
}

.table__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.table__actions form {
  margin: 0;
}

.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 0.16rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--surface-2);
  color: var(--muted);
  white-space: nowrap;
}

.status-pendiente {
  background: rgba(245, 158, 11, 0.16);
  color: #fcd34d;
}

.status-confirmado {
  background: rgba(59, 130, 246, 0.16);
  color: #93c5fd;
}

.status-en_preparacion {
  background: rgba(168, 85, 247, 0.16);
  color: #d8b4fe;
}

.status-listo {
  background: rgba(34, 197, 94, 0.16);
  color: #86efac;
}

.status-entregado {
  background: rgba(34, 197, 94, 0.22);
  color: #4ade80;
}

.status-cancelado {
  background: rgba(239, 68, 68, 0.16);
  color: #fca5a5;
}

.tabs {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.tabs a {
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  font-size: 0.86rem;
}

.tabs a:hover {
  color: var(--text);
  text-decoration: none;
}

.tabs a.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.form {
  display: grid;
  gap: 0.9rem;
}

.form label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.form--inline {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: end;
  gap: 0.8rem;
}

.form--inline .btn {
  align-self: end;
  height: fit-content;
}

.form__actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.checkbox {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.5rem;
}

.checkbox input {
  width: auto;
}

.inline-form {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
}

.inline-form select {
  width: auto;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.2rem;
}

.detail {
  display: grid;
  gap: 0.7rem;
  margin: 0 0 1.2rem;
}

.detail dt {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.detail dd {
  margin: 0.1rem 0 0;
}

.muted {
  color: var(--muted);
}

.flash {
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.flash ul {
  margin: 0;
  padding-left: 1.1rem;
}

.flash-success {
  background: rgba(34, 197, 94, 0.13);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #86efac;
}

.flash-error {
  background: rgba(239, 68, 68, 0.13);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.admin-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1.25rem;
}

.admin-login__card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
}

.admin-login__card h1 {
  font-size: 1.4rem;
}

.admin-login__sub {
  color: var(--muted);
  margin: 0 0 1.2rem;
  font-size: 0.9rem;
}

.admin-login__back {
  text-align: center;
  margin: 1.2rem 0 0;
  font-size: 0.86rem;
}

/* --- Modulo de codigos QR --- */

.qr-thumb {
  background: #fff;
  border-radius: 8px;
  padding: 2px;
  display: block;
}

.qr-cell {
  display: flex;
  gap: 6px;
  align-items: flex-start;
}

.qr-thumb--photo {
  padding: 0;
  object-fit: cover;
}

.share-actions {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.share-actions .btn {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text);
  text-decoration: none;
}

.share-actions .btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.form-field {
  display: grid;
  gap: 0.4rem;
}

.form-field__label {
  font-size: 0.88rem;
  color: var(--muted);
}

.dropzone {
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  padding: 1.1rem;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dropzone.is-over {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.08);
}

.dropzone__hint {
  margin: 0 0 0.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.dropzone__preview {
  margin-top: 0.9rem;
  display: grid;
  justify-items: center;
  gap: 0.5rem;
}

.dropzone__preview img {
  max-width: 220px;
  max-height: 220px;
  border-radius: 10px;
  border: 1px solid var(--border);
  object-fit: cover;
}

.current-image {
  display: grid;
  justify-items: start;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.current-image img {
  max-width: 200px;
  max-height: 200px;
  border-radius: 10px;
  border: 1px solid var(--border);
  object-fit: cover;
}

.form small.muted {
  font-size: 0.8rem;
}

/* --- Fotos de platillos --- */

.menu-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  border: 1px solid var(--border);
  object-fit: cover;
  display: block;
}

/* Foto del platillo en el detalle del pedido */

.order-prod {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.order-thumb {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 1px solid var(--border);
  object-fit: cover;
  display: block;
}

/* --- Inventario --- */

.inv-resumen {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.7rem;
}

.inv-cantidad {
  width: 110px;
}

.panel--alerta {
  border-color: rgba(239, 68, 68, 0.55);
}

/* --- Vista previa de tickets --- */

.ticket-preview {
  margin: 0;
  padding: 1rem;
  background: #fff;
  color: #111;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.35;
  white-space: pre;
  overflow-x: auto;
}

/* --- Captura rapida de pedidos (POS) --- */

.pos {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 1.2rem;
  align-items: start;
}

.pos__menu {
  min-width: 0;
}

.pos__buscar {
  margin-bottom: 1rem;
}

.pos__buscar input {
  font-size: 1.15rem;
  padding: 1rem 1.1rem;
  border-radius: 12px;
}

/* Pestanas de categoria mas grandes, para tocar sin apuntar */
.pos__menu .tabs {
  gap: 0.5rem;
  margin-bottom: 1.2rem;
}

.pos__menu .tabs a {
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  border-radius: 10px;
}

.pos__grupo {
  margin-bottom: 2rem;
}

.pos__titulo {
  font-size: 1.15rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.9rem;
}

/* Botones grandotes, tipo restaurante de comida rapida: se tocan sin apuntar */
.pos__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.9rem;
}

.pos-boton {
  position: relative;
  display: grid;
  gap: 0.45rem;
  align-content: space-between;
  min-height: 132px;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.06s ease, border-color 0.15s ease, background 0.15s ease;
}

.pos-boton:hover,
.pos-boton:focus {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.08);
}

.pos-boton:active {
  transform: scale(0.97);
}

/* Ya esta en el pedido: se marca en verde */
.pos-boton.is-en-pedido {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.12);
}

.pos-boton__foto {
  width: 100%;
  height: 84px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.pos-boton__nombre {
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.25;
}

.pos-boton__precio {
  color: #93c5fd;
  font-weight: 700;
  font-size: 1.15rem;
}

/* Cuantas piezas lleva el pedido, arriba a la derecha */
.pos-boton__cantidad {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  min-width: 2.1rem;
  height: 2.1rem;
  display: grid;
  place-items: center;
  padding: 0 0.45rem;
  border-radius: 999px;
  background: #22c55e;
  color: #052e16;
  font-size: 1rem;
  font-weight: 800;
}

.pos-boton__cantidad[hidden] {
  display: none;
}

.pos__lado {
  display: grid;
  gap: 1rem;
  position: sticky;
  top: 76px;
}

.pos__panel {
  margin-bottom: 0;
}

.pos__panel .btn--block {
  margin-top: 0.9rem;
  font-size: 1.1rem;
  padding: 1rem;
}

/* Campos mas comodos de tocar */
.pos__panel .form input,
.pos__panel .form select,
.pos__panel .form textarea {
  font-size: 1.02rem;
  padding: 0.7rem 0.8rem;
}

.pos__lineas {
  display: grid;
  gap: 0.5rem;
}

.pos__linea {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
}

.pos__linea-datos {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.pos__linea-datos strong {
  font-size: 1rem;
}

.pos__controles {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.pos__paso,
.pos__quitar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
}

.pos__paso:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.pos__quitar {
  color: #fca5a5;
}

.pos__quitar:hover {
  border-color: var(--danger);
}

.pos__cantidad {
  min-width: 30px;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 700;
}

.pos__totales {
  display: grid;
  gap: 0.3rem;
  border-top: 1px solid var(--border);
  margin-top: 0.8rem;
  padding-top: 0.7rem;
}

.pos__fila {
  display: flex;
  justify-content: space-between;
  font-size: 1rem;
}

.pos__fila--total {
  font-size: 1.25rem;
  color: var(--accent);
}

.pos__nota {
  font-size: 0.82rem;
  margin: 0.6rem 0 0;
}

/* Solo en pantallas chicas (tablet vertical o celular) se apila */
@media (max-width: 900px) {
  .pos {
    grid-template-columns: 1fr;
  }

  .pos__lado {
    position: static;
  }

  .pos__grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
}

/* --- Avisos de pedidos nuevos --- */

.avisos {
  position: sticky;
  top: 56px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
  padding: 0.7rem 0.9rem;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.5);
  border-radius: var(--radius);
  color: #bbf7d0;
  font-weight: 600;
}

.avisos[hidden] {
  display: none;
}

.avisos__texto {
  flex: 1;
}

.avisos__cerrar {
  background: transparent;
  border: 0;
  color: #bbf7d0;
  font: inherit;
  font-size: 1.05rem;
  cursor: pointer;
  padding: 0 0.3rem;
}

.checkbox--inline {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0;
}

.checkbox--inline input {
  width: auto;
}

/* Iframe oculto: imprime sin salir del panel */
.marco-impresion {
  position: fixed;
  left: -10000px;
  top: 0;
  width: 1px;
  height: 1px;
  border: 0;
  opacity: 0;
}

/* --- Recorte del logo --- */

.recorte-campos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.6rem;
}

.recorte-campos label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.recorte {
  position: relative;
  display: block;
  margin-top: 0.6rem;
  max-width: 520px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.recorte img {
  display: block;
  width: 100%;
  height: auto;
}

.recorte__marco {
  position: absolute;
  border: 2px solid var(--accent);
  background: rgba(59, 130, 246, 0.18);
  pointer-events: none;
}

.logo-lienzo {
  max-width: 100%;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  image-rendering: pixelated;
}

/* --- Buscador de clientes (captura de pedidos) --- */

.cliente-picker {
  position: relative;
  display: grid;
  gap: 0.3rem;
}

.cliente-picker__resultados {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 20;
  display: grid;
  gap: 0.15rem;
  max-height: 260px;
  overflow-y: auto;
  padding: 0.3rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.cliente-opcion {
  display: grid;
  gap: 0.1rem;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.cliente-opcion:hover {
  background: rgba(255, 255, 255, 0.06);
}

.cliente-opcion small {
  color: var(--muted);
}

.cliente-picker__resumen {
  margin: 0;
  font-size: 0.82rem;
}

/* --- Analiticas --- */

.filtros {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  margin-bottom: 1.2rem;
}

.filtros__presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.filtros__fechas {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.6rem;
}

.filtros__campo {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.filtros__campo input {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  padding: 0.4rem 0.55rem;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}

.kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.kpi__label {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.kpi__value {
  font-size: 1.45rem;
  line-height: 1.15;
}

.var {
  font-size: 0.8rem;
  font-weight: 600;
}

.var--up {
  color: #4ade80;
}

.var--down {
  color: #fca5a5;
}

.var--flat {
  color: var(--muted);
  font-weight: 500;
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.chart-card--wide {
  grid-column: 1 / -1;
}

.chart-box {
  position: relative;
  height: 260px;
}

.chart-box--tall {
  height: 330px;
}

.chart-empty {
  color: var(--muted);
  margin: 0;
  padding: 2rem 0;
  text-align: center;
}

.chart-toggle {
  display: flex;
  gap: 0.35rem;
}

.mini-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}

.mini-kpi {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.6rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.mini-kpi span {
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mini-kpi strong {
  font-size: 1.15rem;
}

.mini-kpi--alerta {
  border-color: rgba(239, 68, 68, 0.5);
}

.sub-head {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0.9rem 0 0.4rem;
}

.pills {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0;
  margin: 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.22rem 0.65rem;
  font-size: 0.82rem;
}

.pill span {
  font-weight: 700;
}

.pill--danger {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.pill--warning {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fcd34d;
}

.rec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.8rem;
}

.rec {
  border: 1px solid var(--border);
  border-left-width: 4px;
  border-radius: 10px;
  padding: 0.8rem 0.9rem;
  background: var(--surface-2);
}

.rec h3 {
  font-size: 0.98rem;
  margin-bottom: 0.25rem;
}

.rec p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.rec--success {
  border-left-color: var(--success);
}

.rec--info {
  border-left-color: var(--accent);
}

.rec--warning {
  border-left-color: var(--warning);
}

.rec--danger {
  border-left-color: var(--danger);
}

/* --- Notificaciones (campana e historial) --- */

.campana {
  position: relative;
}

.campana__boton {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
}

.campana__boton:hover {
  color: var(--text);
  border-color: rgba(59, 130, 246, 0.55);
}

.campana--activa .campana__boton {
  color: var(--text);
}

.campana__badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.campana__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 370px;
  max-width: 90vw;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  z-index: 60;
  overflow: hidden;
}

.campana__head,
.campana__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.65rem 0.9rem;
}

.campana__head {
  border-bottom: 1px solid var(--border);
}

.campana__foot {
  border-top: 1px solid var(--border);
}

.campana__lista {
  max-height: 380px;
  overflow-y: auto;
  padding: 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.campana__vacio {
  color: var(--muted);
  margin: 0.6rem;
  font-size: 0.88rem;
}

.campana__sonido {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.notif {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  border: 1px solid var(--border);
  border-left-width: 4px;
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  background: var(--surface-2);
  text-decoration: none;
  color: inherit;
}

.notif:hover {
  border-color: rgba(59, 130, 246, 0.5);
}

.notif--nueva {
  background: rgba(59, 130, 246, 0.09);
}

.notif--info {
  border-left-color: var(--accent);
}

.notif--success {
  border-left-color: var(--success);
}

.notif--warning {
  border-left-color: var(--warning);
}

.notif--danger {
  border-left-color: var(--danger);
}

.notif__cab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.notif__tipo {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}

.notif__hora {
  font-size: 0.74rem;
  color: var(--muted);
}

.notif__titulo {
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.25;
}

.notif__mensaje {
  color: var(--muted);
  font-size: 0.84rem;
}

.notif-lista {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.notif-lista .notif {
  padding: 0.75rem 0.9rem;
}

.notif-dia {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin: 0.9rem 0 0.1rem;
}

.notif__acciones {
  margin-top: 0.3rem;
}

.notif__acciones form {
  margin: 0;
}

.paginado {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin: 0.5rem 0 1.5rem;
}

.filtros__campo select {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  padding: 0.4rem 0.55rem;
}

.filtros__campo--check input {
  width: 18px;
  height: 18px;
}


