/* ══════════════════════════════════════════════════════════════════════════
   PANELES DE LOS MÓDULOS NUEVOS (estado del servidor, caducidades,
   conciliación, lotes, almacenaje a terceros) — prefijo .pn-
   ══════════════════════════════════════════════════════════════════════════ */
.pn-pagina { max-width: 1240px; margin: 0 auto; padding: 22px 20px 90px; font-family: 'Segoe UI', system-ui, sans-serif; color: #0f172a; }
.pn-cabecera { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
.pn-volver { display: inline-flex; align-items: center; gap: 6px; font-size: .84rem; color: #64748b; text-decoration: none; margin-bottom: 6px; }
.pn-volver:hover { color: #0091d8; }
.pn-cabecera h1 { margin: 0 0 6px; font-size: 1.5rem; display: flex; align-items: center; gap: 10px; }
.pn-cabecera h1 i { color: #0091d8; }
.pn-intro { margin: 0; max-width: 720px; font-size: .88rem; color: #64748b; line-height: 1.5; }
.pn-acciones { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.pn-cifras { display: flex; gap: 10px; flex-wrap: wrap; }
.pn-cifra { min-width: 120px; padding: 12px 16px; border-radius: 12px; text-align: center; background: #fff; border: 1px solid #e2e8f0; border-top: 4px solid var(--c, #0091d8); }
.pn-cifra strong { display: block; font-size: 1.6rem; line-height: 1.1; color: var(--c, #0091d8); }
.pn-cifra span { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: #94a3b8; }
.pn-cifra--rojo { --c: #dc2626; } .pn-cifra--ambar { --c: #d97706; } .pn-cifra--azul { --c: #2563eb; } .pn-cifra--verde { --c: #059669; } .pn-cifra--gris { --c: #64748b; }

.pn-bloque { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 18px 20px; margin-bottom: 18px; }
.pn-bloque__cab { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.pn-bloque__cab h2 { margin: 0; font-size: 1.05rem; display: flex; align-items: center; gap: 8px; }
.pn-bloque__cab h2 i { color: #0091d8; }
.pn-nota { margin: 0 0 12px; font-size: .84rem; color: #64748b; line-height: 1.5; }
.pn-rejilla { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px 18px; }
.pn-dato { font-size: .9rem; }
.pn-dato span { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: #94a3b8; margin-bottom: 2px; }
.pn-dato b { font-weight: 600; }
.pn-barra { height: 8px; border-radius: 4px; background: #e2e8f0; overflow: hidden; margin-top: 6px; }
.pn-barra i { display: block; height: 100%; background: #059669; }
.pn-barra i.pn-barra--ambar { background: #d97706; } .pn-barra i.pn-barra--rojo { background: #dc2626; }

.pn-tabla-env { overflow-x: auto; }
.pn-tabla { width: 100%; border-collapse: collapse; font-size: .86rem; }
.pn-tabla th { text-align: left; padding: 8px 10px; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: #94a3b8; border-bottom: 1px solid #e2e8f0; white-space: nowrap; }
.pn-tabla td { padding: 8px 10px; border-bottom: 1px solid #f1f5f9; vertical-align: top; }
.pn-tabla tr:last-child td { border-bottom: 0; }
.pn-tabla .n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pn-tabla tr.pn-fila--vencida td { background: #fef2f2; }
.pn-tabla tr.pn-fila--urgente td { background: #fffbeb; }
.pn-tabla small { color: #94a3b8; }
.pn-mudo { color: #94a3b8; }
.pn-vacio { padding: 28px; text-align: center; color: #64748b; font-size: .9rem; }
.pn-cargando { padding: 16px; color: #94a3b8; text-align: center; }

.pn-estado { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.pn-estado--vencida { background: #fee2e2; color: #991b1b; }
.pn-estado--urgente { background: #fef3c7; color: #92400e; }
.pn-estado--proxima { background: #dbeafe; color: #1e40af; }
.pn-estado--ok { background: #d1fae5; color: #065f46; }
.pn-estado--gris { background: #f1f5f9; color: #64748b; }

.pn-btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 8px; cursor: pointer; background: #f1f5f9; border: 1px solid #cbd5e1; color: #334155; font-family: inherit; font-size: .85rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.pn-btn:hover { background: #e2e8f0; }
.pn-btn--azul { background: #0091d8; border-color: #0091d8; color: #fff; }
.pn-btn--azul:hover { background: #007bb8; }
.pn-btn--rojo { color: #b91c1c; }
.pn-btn--rojo:hover { background: #fee2e2; border-color: #fecaca; }
.pn-btn--mini { padding: 5px 9px; font-size: .76rem; }
.pn-btn:disabled { opacity: .5; cursor: default; }
.pn-select, .pn-input, .pn-form input, .pn-form select, .pn-form textarea {
    padding: 8px 11px; border: 1px solid #cbd5e1; border-radius: 8px; font-family: inherit; font-size: .88rem; background: #fff; color: #0f172a;
}
.pn-form input:focus, .pn-form select:focus, .pn-form textarea:focus, .pn-select:focus, .pn-input:focus { outline: none; border-color: #0091d8; box-shadow: 0 0 0 3px rgba(0,145,216,.14); }
.pn-form { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; }
.pn-campo { display: flex; flex-direction: column; gap: 4px; flex: 1 1 160px; }
.pn-campo--ancho { flex: 2 1 260px; }
.pn-campo--corto { flex: 0 1 140px; }
.pn-campo label { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: #64748b; font-weight: 600; }
.pn-filtros { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pn-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; border: 1px solid #e2e8f0; background: #fff; font-size: .8rem; cursor: pointer; font-family: inherit; color: #334155; }
.pn-chip--activo { background: #0091d8; border-color: #0091d8; color: #fff; }
.pn-toast { position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%); z-index: 6000; background: #0f172a; color: #fff; padding: 10px 18px; border-radius: 10px; font-size: .88rem; box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.pn-toast--error { background: #b91c1c; } .pn-toast--ok { background: #047857; }
.pn-lista-clientes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.pn-cliente { display: block; padding: 12px 14px; border-radius: 12px; background: #fff; border: 1px solid #e2e8f0; cursor: pointer; text-align: left; font-family: inherit; }
.pn-cliente:hover, .pn-cliente--activo { border-color: #0091d8; box-shadow: 0 0 0 3px rgba(0,145,216,.12); }
.pn-cliente strong { display: block; font-size: .95rem; margin-bottom: 4px; }
.pn-cliente small { color: #64748b; font-size: .78rem; }
.pn-diff-mas { color: #059669; font-weight: 700; } .pn-diff-menos { color: #dc2626; font-weight: 700; }
@media (max-width: 640px) { .pn-cabecera { flex-direction: column; } }
