.orders-page { max-width: 1100px; }
.orders-heading { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 22px 32px; margin-bottom: 32px; }
.orders-heading .flow-heading { flex: 1 1 340px; min-width: 0; margin: 0; gap: 0; }
.orders-heading .flow-heading h1 { overflow-wrap: anywhere; }
.orders-heading > .mud-button { flex: 0 1 auto; max-width: 100%; margin-top: 28px; white-space: normal; }
.orders-list { display: grid; gap: 12px; }
.order-card { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 20px; padding: 23px 24px; border: 1px solid var(--s2c-border); border-radius: 12px; background: #ffffff; }
.order-file-icon { display: grid; place-items: center; align-self: start; width: 48px; height: 52px; border-radius: 9px; background: var(--s2c-tint); color: var(--s2c-action); }
.order-file-icon .mud-icon-root { width: 25px; height: 25px; }
.order-card-copy { min-width: 0; }
.order-card-copy h2 { font-size: 17px; line-height: 1.45; letter-spacing: -.3px; overflow-wrap: anywhere; }
.order-card-copy > p { margin-top: 5px; color: var(--s2c-muted); font-size: 11px; line-height: 1.8; overflow-wrap: anywhere; }
.order-status { display: inline-flex; align-items: center; max-width: 100%; margin-top: 12px; padding: 4px 9px; border: 1px solid var(--s2c-border); border-radius: 5px; background: var(--s2c-paper); color: var(--s2c-graphite); font-size: 11px; font-weight: 500; line-height: 1.6; overflow-wrap: anywhere; }
.order-status.status-processing { border-color: #d3e3fb; background: var(--s2c-tint); color: #1859a8; }
.order-status.status-review { border-color: #ead7ad; background: #fff8e8; color: #77561b; }
.order-status.status-ready { border-color: #bfe5e5; background: #ecf9f8; color: #086b70; }
.order-status.status-paid { border-color: #b8dfd9; background: #e4f5ef; color: #12694f; }
.order-status.status-failed { border-color: #edc9c6; background: #fff1ef; color: #9b352c; }
.order-open { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 4px; color: var(--s2c-action); font-size: 12px; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.order-open:hover { color: var(--s2c-navy); }
.order-open .mud-icon-root { flex: none; width: 18px; height: 18px; }
.orders-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; min-height: 280px; padding: 40px 28px; border: 1px solid var(--s2c-border); border-radius: 12px; background: #ffffff; text-align: center; }
.orders-empty h2 { max-width: 100%; font-size: 25px; line-height: 1.3; letter-spacing: -.7px; overflow-wrap: anywhere; }
.orders-empty p { max-width: 470px; color: var(--s2c-muted); font-size: 13px; line-height: 1.85; }
.orders-empty .mud-button { max-width: 100%; white-space: normal; }
.upload-batch { margin-top: 28px; padding-top: 25px; border-top: 1px solid var(--s2c-border); }
.upload-batch h2 { font-size: 20px; line-height: 1.35; letter-spacing: -.5px; }
.upload-batch-list { list-style: none; margin: 18px 0 0; padding: 0; }
.upload-batch-list > li + li { border-top: 1px solid var(--s2c-border); }
.upload-batch-item { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; min-width: 0; padding: 16px 0; }
.upload-batch-item > div { flex: 1; min-width: 0; }
.upload-batch-item strong { display: block; color: var(--s2c-navy); font-size: 12px; font-weight: 600; line-height: 1.7; overflow-wrap: anywhere; }
.upload-batch-item p { margin-top: 4px; color: var(--s2c-muted); font-size: 11px; line-height: 1.75; overflow-wrap: anywhere; }
.upload-batch-item .error { color: #9b352c; }
.upload-batch-item > a { display: inline-flex; flex: none; align-items: center; gap: 7px; min-height: 44px; padding: 8px 0; color: var(--s2c-action); font-size: 11px; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.upload-batch-item > a:hover { color: var(--s2c-navy); }
.upload-batch-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 14px; padding-top: 20px; border-top: 1px solid var(--s2c-border); }
.upload-batch-actions .mud-button { max-width: 100%; white-space: normal; }
.upload-batch-actions a { display: inline-flex; align-items: center; min-height: 44px; color: var(--s2c-action); font-weight: 600; font-size: 13px; text-decoration: underline; text-underline-offset: 4px; }
.orders-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; margin: 0 0 16px; color: var(--s2c-muted); font-size: 13px; }
.order-navigation { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; margin-bottom: 27px; }
.order-navigation a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin: 0; color: var(--s2c-action); font-size: 12px; text-decoration: underline; text-underline-offset: 4px; }
.order-navigation a:hover { color: var(--s2c-navy); }
.order-navigation .mud-icon-root { flex: none; width: 18px; height: 18px; }
.upload-existing { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 44px; margin-top: 16px; color: var(--s2c-action); font-size: 12px; }
a.upload-existing, .upload-existing a { color: var(--s2c-action); text-decoration: underline; text-underline-offset: 4px; }
a.upload-existing:hover, .upload-existing a:hover { color: var(--s2c-navy); }
.upload-existing .mud-icon-root { flex: none; width: 18px; height: 18px; }

@media (max-width: 760px) {
    .orders-heading { gap: 20px; margin-bottom: 25px; }
    .orders-heading .flow-heading { flex-basis: 100%; }
    .orders-heading > .mud-button { margin-top: 0; }
    .order-card { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; padding: 19px 18px; }
    .order-file-icon { width: 40px; height: 45px; }
    .order-file-icon .mud-icon-root { width: 23px; height: 23px; }
    .order-card-copy h2 { font-size: 15px; }
    .order-open { font-size: 11px; }
    .orders-empty { min-height: 250px; padding: 32px 22px; }
    .orders-empty h2 { font-size: 23px; }
    .orders-empty p { font-size: 12px; }
    .order-navigation { margin-bottom: 22px; }
}

@media (max-width: 520px) {
    .order-card { grid-template-columns: 36px minmax(0, 1fr); gap: 8px 12px; padding: 18px 15px 12px; }
    .order-file-icon { width: 36px; height: 41px; }
    .order-file-icon .mud-icon-root { width: 21px; height: 21px; }
    .order-open { grid-column: 2; justify-self: start; justify-content: flex-start; padding-left: 0; }
    .order-status { margin-top: 10px; font-size: 10px; }
    .upload-batch-item { flex-direction: column; align-items: stretch; gap: 2px; padding: 14px 0; }
    .upload-batch-item > a { align-self: flex-start; }
    .upload-batch-actions { align-items: stretch; }
    .upload-batch-actions .mud-button { flex: 1 1 100%; }
    .order-navigation { gap: 2px 18px; }
    .order-navigation a { font-size: 11px; }
}
