.cor-stack { display: grid; gap: 15px; }
.cor-form { max-width: 760px; }
.cor-span { grid-column: 1 / -1; }
.cor-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.cor-hint { margin: 5px 0 0; color: var(--muted); font-size: .875rem; }
.cor-table { overflow-x: auto; }
.cor-nowrap { white-space: nowrap; }

.cor-status {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 650;
    background: #dbeafe;
    color: #1d4ed8;
    white-space: nowrap;
}
.cor-status.ok { background: #dbeafe; color: #1e40af; }
.cor-status.info { background: #e0f2fe; color: #0369a1; }
.cor-status.pending { background: #fef3c7; color: #92400e; }
.cor-status.danger { background: #fee2e2; color: #b91c1c; }

.cor-chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: #eff6ff;
    color: #1d4ed8;
    white-space: nowrap;
}
.cor-chip.warn { background: #fef3c7; color: #92400e; }
.cor-chip.danger { background: #fee2e2; color: #b91c1c; }

.cor-nav-badge {
    margin-left: auto;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #2563eb;
    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; }

.cor-line {
    display: grid;
    gap: 5px 12px;
    align-items: end;
    grid-template-columns: minmax(150px, 2fr) minmax(80px, .8fr) minmax(95px, 1fr) minmax(95px, 1fr) auto;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}
.cor-line-hint { grid-column: 1 / -1; }
.cor-line output { display: block; width: 100%; padding: 9px 0; min-height: 38px; text-align: right; white-space: nowrap; }
.cor-line .cor-remove { min-height: 37px; }
.cor-entrega input { max-width: 160px; margin: 0; }

.cor-summary-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}
.cor-summary-bar .cart-total { margin: 0; border: 0; padding: 0; }
.cor-weight-pill {
    padding: 6px 12px;
    border-radius: 10px;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: .875rem;
}

.cor-inline-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cor-inline-form { display: inline; margin: 0; }

.cor-bar {
    width: 100%;
    min-width: 90px;
    height: 7px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
    margin: 4px 0;
}
.cor-bar.lg { height: 11px; }
.cor-bar span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: #2563eb;
    transition: width .2s ease;
}
.cor-bar span.warn { background: #d97706; }
.cor-bar span.danger { background: #dc2626; }

.cor-load-meter {
    margin: 14px 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid var(--line);
}
.cor-load-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    font-size: .88rem;
}

.cor-route-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.cor-route-card {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 16px;
    background: #fff;
    display: grid;
    gap: 10px;
}
.cor-route-card h3 { margin: 0; font-size: 1rem; }
.cor-stops { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .88rem; }
.cor-stops li {
    padding: 8px 10px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.cor-stops li a { margin-left: auto; font-weight: 600; color: #2563eb; }

.cor-remito main { max-width: 820px; margin: auto; padding: 20px; }
.cor-remito .panel { padding: 24px; }
.cor-remito .cor-print-actions { margin: 0 0 16px; }
.cor-remito h1 { margin-bottom: 5px; }
.cor-remito dt { font-weight: 700; }
.cor-remito dd { margin: 0; overflow-wrap: anywhere; }
.cor-remito td { white-space: normal; overflow-wrap: anywhere; }
.cor-remito footer { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; margin-top: 32px; }
.cor-print-stop { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.cor-print-stop h3 { margin: 0 0 4px; font-size: 1rem; }

@media (max-width: 940px) {
    .cor-line { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cor-line output { text-align: left; padding: 2px 0; min-height: 24px; }
    .cor-line .cor-remove { justify-self: start; }
    .cor-line-hint { grid-column: auto; align-self: center; }
}
@media (max-width: 480px) {
    .cor-line { grid-template-columns: minmax(0, 1fr) minmax(0, .68fr); }
    .panel-title, .page-head { flex-wrap: wrap; }
}
@media print {
    body.cor-remito { background: white; color: #000; }
    .cor-remito main { max-width: none; margin: 0; padding: 0; }
    .cor-remito .panel { border: 0; box-shadow: none; padding: 0; }
    .cor-remito .cor-print-actions { display: none; }
}
