:root { font-family: Segoe UI, Arial, sans-serif; color: #17212e; background: white; line-height: 1.5; }
* { box-sizing: border-box; }
body { margin: 0; }
a { color: #145a83; text-underline-offset: 3px; }
a:hover { color: #093750; }
.app-header { background: #db121c; color: white; padding: 1.1rem 2rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.app-header a { color: white; }
.brand-context { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; min-width: 0; }
.brand { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; min-width: 0; max-width: 100%; font-size: 1.25rem; font-weight: 700; text-decoration: none; }
.brand-logo { display: block; width: 220px; max-width: 100%; height: auto; background: white; padding: .35rem; border-radius: 4px; }
.brand-title { color: white; }
.page-context-header { padding-block: .6rem; }
.page-context-header .brand-logo { width: 190px; padding: .25rem; }
.page-context-header .brand { font-size: 1.1rem; }
.header-page-title { color: white; font-size: 1.45rem; line-height: 1.2; margin: 0; padding-left: 1rem; border-left: 1px solid rgb(255 255 255 / .65); white-space: nowrap; }
nav { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: center; }
nav form { margin: 0; }
.menu-toggle { display: none; margin: 0; align-items: center; gap: .5rem; }
.content { width: 100%; margin: 0 auto; padding: 2rem; background: white; }
h1 { font-size: 2rem; margin: 0 0 .5rem; }
h2 { font-size: 1.25rem; margin: 0 0 1rem; }
.panel { background: white; border: 1px solid #d8dee5; border-radius: 8px; padding: 1.5rem; margin: 1rem 0; }
.progress-shipping-summary { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; }
.progress-shipping-summary h2 { margin: 0; }
.progress-shipping-toggle { margin: 0; }
.shipping-status { font-weight: 600; }
.progress-shipping-pane { margin-top: 1rem; }
.login-card { max-width: 460px; margin: 2rem auto; }
label { display: block; font-weight: 600; margin: .65rem 0 .35rem; }
input, select, textarea { font: inherit; padding: .6rem .75rem; border: 1px solid #768392; border-radius: 4px; background: white; max-width: 100%; }
input:not([type=checkbox]):not([type=hidden]), select, textarea { width: 100%; }
textarea { min-height: 5rem; resize: vertical; }
input[type=checkbox] { width: 1.15rem; height: 1.15rem; }
button, .button { font: inherit; display: inline-block; background: #185b80; color: white; border: 1px solid #185b80; border-radius: 4px; padding: .6rem 1rem; cursor: pointer; text-decoration: none; margin-top: .5rem; }
button:hover, .button:hover { background: #104360; color: white; }
button:disabled { cursor: default; opacity: .55; }
button.secondary { background: white; color: #185b80; }
button.danger { background: #a01b26; border-color: #a01b26; }
button.danger:hover { background: #79121b; }
button.link-button { background: transparent; border: none; color: white; text-decoration: underline; padding: 0; margin: 0; }
:focus-visible { outline: 3px solid #c48200; outline-offset: 3px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 1rem; margin: 1rem 0; }
.toolbar label { flex: 1 1 200px; }
.toolbar button { flex: 0 0 auto; }
.carrier-row .carrier-name { flex: 0 1 auto; width: calc(20ch + 1.5rem + 2px); }
.carrier-row .carrier-url { flex: 1 1 300px; min-width: 0; }
.grid-pagination, .orders-footer, .bulk-pagination { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin: 1rem 0; }
.grid-pagination label { display: flex; align-items: center; gap: .5rem; margin: 0; }
.grid-pagination select { width: auto; }
.bulk-pagination .grid-pagination { flex: 1 1 auto; margin: 0; }
.pagination-buttons { display: flex; align-items: center; gap: 1rem; }
.timezone-preference { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; max-width: 100%; }
.timezone-preference label { display: flex; align-items: center; gap: .75rem; margin: 0; min-width: 0; max-width: 100%; }
.timezone-preference select { width: 480px; max-width: 100%; min-width: 0; }
.timezone-preference button, .pagination-buttons button { margin: 0; }
.table-scroll { overflow-x: auto; }
.bulk-fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.bulk-save-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem; margin: 1rem 0; }
.bulk-save-toolbar button { margin: 0; }
.bulk-shared { padding: 1rem; }
.bulk-shared .toolbar { margin-bottom: 0; }
.bulk-scroll { max-height: 65vh; border: 1px solid #d8dee5; }
.bulk-table { min-width: 1700px; }
.bulk-table th { position: sticky; top: 0; z-index: 2; white-space: nowrap; box-shadow: 0 1px #d8dee5; }
.bulk-table td { background: white; padding: .6rem; }
.bulk-table td.bulk-identifier, .bulk-table th.bulk-identifier { position: sticky; left: 0; z-index: 1; min-width: 150px; background: white; border-right: 1px solid #d8dee5; }
.bulk-table th.bulk-identifier { z-index: 3; }
.bulk-table select { min-width: 125px; padding: .4rem; }
.bulk-table .shipping-method-choice { min-width: 260px; }
.bulk-table input:not([type=checkbox]) { min-width: 170px; padding: .4rem; }
.bulk-table textarea { min-width: 220px; }
.bulk-table .bulk-dirty td { background: #fff8e5; }
.bulk-unsaved { display: block; color: #745200; font-size: .8rem; }
.bulk-row-actions { display: flex; gap: .35rem; }
.bulk-row-actions button { margin: 0; padding: .4rem .6rem; }
.bulk-result { min-width: 240px; max-width: 320px; }
.bulk-result p { margin: .4rem 0 0; font-size: .85rem; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: .85rem; border-bottom: 1px solid #d8dee5; vertical-align: top; }
th { background: white; font-size: .9rem; }
.orders-table { min-width: max-content; }
.orders-table th, .orders-table td { white-space: nowrap; }
.status-values { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem; }
td a { overflow-wrap: anywhere; }
td button { white-space: nowrap; }
.badge { display: inline-block; border: 1px solid #bdd1df; background: #edf5fa; padding: .1rem .5rem; border-radius: 20px; white-space: nowrap; }
.orders-table .badge { color: black; font-weight: 700; }
.status-placed { background: #dbeafe; border-color: #93c5fd; }
.status-accepted { background: #fff3cd; border-color: #e3c45a; }
.status-rejected { background: #fee2e2; border-color: #fca5a5; }
.status-shipped { background: #4caf50; border-color: #4caf50; }
.status-delivered { background: #bbf7d0; border-color: #86efac; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.detail-grid .panel { margin: 0; }
.order-progress-row { display: grid; grid-template-columns: minmax(140px, 1fr) minmax(140px, 1fr) minmax(160px, 1.3fr) minmax(120px, .8fr) auto; align-items: end; gap: 1rem; }
.order-progress-row label, .order-progress-row dl { margin: 0; min-width: 0; }
.order-progress-row dt { margin-top: 0; }
.order-progress-row dd { min-height: 2.8rem; display: flex; align-items: center; }
.order-progress-actions { display: flex; gap: .5rem; }
.order-progress-actions button { margin-top: 0; white-space: nowrap; }
@media (max-width: 1000px) { .order-progress-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .order-progress-actions { grid-column: 1 / -1; } }
@media (max-width: 500px) { .order-progress-row { grid-template-columns: 1fr; } }
dt { font-weight: 600; margin-top: .65rem; }
dd { margin: 0; overflow-wrap: anywhere; }
.preserve-lines { white-space: pre-wrap; overflow-wrap: anywhere; }
.alert, .alert-danger, .validation-message, .text-danger { color: #a01b26; }
.alert, .alert-danger { background: #fff0f1; border: 1px solid #da9fa4; padding: 1rem; border-radius: 4px; }
.success, .alert-success { background: #edf8f0; color: #215b34; padding: 1rem; border: 1px solid #9fc9ac; }
.muted { color: #536273; font-size: .9rem; }
.checkbox { display: flex; gap: .5rem; align-items: center; margin: 1rem 0; }
.modal-backdrop { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 1rem; background: rgb(23 33 46 / .6); }
.modal-panel { width: min(100%, 480px); max-height: calc(100vh - 2rem); overflow-y: auto; color: #17212e; background: white; border-radius: 8px; padding: 1.5rem; box-shadow: 0 12px 32px rgb(0 0 0 / .35); }
.modal-panel input { color: #17212e; }
.modal-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1rem; }
.modal-actions button { margin-top: 0; }
#blazor-error-ui { display: none; }
@media (max-width: 700px) {
    .content { padding: 1rem; }
    .app-header { padding: 1rem; align-items: center; }
    .page-context-header { padding-block: .6rem; }
    .brand-context { flex: 1 1 0; gap: .6rem; }
    .brand { gap: .6rem; font-size: 1rem; }
    .brand-logo, .page-context-header .brand-logo { width: 150px; padding: .25rem; }
    .header-page-title { flex-basis: 100%; border-left: 0; padding-left: 0; font-size: 1.25rem; }
    .menu-toggle { display: inline-flex; }
    .app-header nav { display: none; flex: 1 0 100%; flex-direction: column; align-items: stretch; gap: 0; padding: .5rem 0 0; }
    .app-header nav.menu-open { display: flex; }
    .app-header nav a, .app-header nav form { padding: .6rem 0; }
    .app-header nav form { width: 100%; }
    .detail-grid { grid-template-columns: 1fr; }
    .panel { padding: 1rem; }
    .toolbar { align-items: stretch; }
    .login-card { margin: 1rem auto; }
}
.status-in-progress { background: #fff3cd; border-color: #e3c45a; }
.status-cancelled { background: #fee2e2; border-color: #fca5a5; }
.status-partially-fulfilled { background: #cfe8ff; border-color: #75aee8; }
.status-fulfilled { background: #bbf7d0; border-color: #86efac; }
.lines-table td, .lines-table th { vertical-align: top; }
.lines-table td:last-child, .lines-table td:nth-last-child(2) { white-space: nowrap; }
.shipment-row { border-top: 1px solid #ddd; padding-top: 1rem; }
.confirmation { border: 2px solid #b42318; margin-block: 1rem; }
.order-context { overflow-wrap: anywhere; }
.order-feedback { position: sticky; top: .5rem; z-index: 4; }
.order-feedback:empty { display: none; }
.order-feedback p { box-shadow: 0 2px 8px rgb(23 33 46 / .12); }

.exception-dashboard { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin: 1rem 0; }
.exception-dashboard .panel { margin: 0; min-width: 0; }
.exception-dashboard dt { margin: 0; }
.exception-dashboard dd { font-size: 2rem; font-weight: 700; color: #a01b26; }
.shipment-exceptions .report-controls label { flex: 0 1 280px; }
.exception-table { min-width: 850px; }
.exception-table caption { text-align: left; font-weight: 600; padding-bottom: .5rem; }
@media (max-width: 1000px) { .exception-dashboard { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 500px) { .exception-dashboard { grid-template-columns: 1fr; } }
@media print {
    body:has(.shipment-exceptions) .app-header, .shipment-exceptions .report-controls { display: none; }
    body:has(.shipment-exceptions) .content { padding: 0; }
    .shipment-exceptions { font-size: 10pt; }
    .shipment-exceptions .table-scroll { overflow: visible; }
    .exception-table { min-width: 0; }
    .exception-table th, .exception-table td { padding: .4rem; }
    .exception-table tr, .exception-dashboard { break-inside: avoid; }
    .exception-dashboard { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .exception-dashboard .panel { padding: .5rem; }
    .exception-dashboard dd { font-size: 1.5rem; }
}
