.pan-stack { display: grid; gap: 15px; }
.pan-form { max-width: 860px; }
.pan-span { grid-column: 1 / -1; }
.pan-table { overflow-x: auto; }
.pan-nowrap { white-space: nowrap; }
.pan-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.pan-top { margin-top: 14px; }
.pan-muted { color: var(--muted); }
.pan-inline { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }

.pan-nav-badge {
    margin-left: auto;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #d97706;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
#submenus a { display: flex; align-items: center; gap: 8px; }

.pan-rows { margin: 14px 0 0; border: 1px solid var(--line); border-radius: 9px; min-width: 0; padding: 12px; }
.pan-rows legend { padding-inline: 6px; font-weight: 700; }
.pan-sale-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px 110px; gap: 10px; margin-bottom: 10px; }
.pan-sale-row:last-child { margin-bottom: 0; }
.pan-sale-row select { width: 100%; text-overflow: ellipsis; }
.pan-ing-row { display: grid; grid-template-columns: minmax(0, 1fr) 130px; gap: 10px; margin-bottom: 8px; }
.pan-ing-row:last-child { margin-bottom: 0; }

.pan-state {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 650;
    white-space: nowrap;
    background: #e0f2fe;
    color: #0369a1;
}
.pan-state.pendiente { background: #fef3c7; color: #92400e; }
.pan-state.produccion, .pan-state.horneada { background: #ffedd5; color: #9a3412; }
.pan-state.lista, .pan-state.cerrada { background: #dcfce7; color: #166534; }
.pan-state.entregada { background: #dbeafe; color: #1d4ed8; }
.pan-state.cancelada, .pan-state.bajo { background: #fee2e2; color: #991b1b; }
.pan-state.materia_prima { background: #ede9fe; color: #5b21b6; }
.pan-state.producto { background: #e0f2fe; color: #0369a1; }

.pan-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 6px;
    background: #f1f5f9;
    color: #334155;
    font-size: 12px;
    font-weight: 600;
}

.pan-recipe-card { border: 1px solid var(--line); border-radius: 10px; padding: 14px; background: #fff; display: grid; gap: 10px; }
.pan-recipe-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.pan-ing-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; font-size: 13px; }
.pan-ing-list li { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; border-bottom: 1px dashed #e2e8f0; }
.pan-ing-list li:last-child { border-bottom: 0; }

.pan-balance { display: flex; flex-wrap: wrap; gap: 12px 24px; border-top: 1px solid var(--line); padding: 12px 0 0; margin-bottom: 0; }
.pan-balance dt { color: var(--muted); font-size: 13px; }
.pan-balance dd { margin: 3px 0 0; font-weight: 600; }
.pan-total { text-align: right; font-size: 18px; font-weight: 700; }

.pan-form textarea {
    display: block; width: 100%; margin-top: 4px; padding: 8px 10px; resize: vertical;
    font: inherit; color: var(--ink); background: white; border: 1px solid #cbd5e1; border-radius: 7px;
}

.pan-mini-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pan-mini-form input, .pan-mini-form select { width: auto; padding: 5px 8px; margin: 0; font-size: 13px; }

.pan-print main { max-width: 820px; margin: auto; padding: 20px; }
.pan-print-nav { margin-bottom: 16px; }

@media (max-width: 720px) {
    .pan-sale-row, .pan-ing-row { grid-template-columns: minmax(0, 1fr); }
}
@media print {
    body.pan-print { background: white; color: #000; }
    .pan-print .panel { border: 0; box-shadow: none; padding: 0; }
    .pan-print-nav { display: none; }
}
