.orders-page { min-height: 100vh; background: #f4f5f6; }
.orders-page:not(.is-authenticated) > .order-topbar,
.orders-page:not(.is-authenticated) > .orders-layout { display: none; }
.order-topbar { min-height: 68px; display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 10px clamp(16px,3vw,40px); background: #16191e; color: white; }
.order-brand { display: flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; font-size: 17px; font-weight: 750; letter-spacing: -.03em; }
.order-brand i { width: 1px; height: 22px; background: #626a74; margin: 0 5px; }
.order-brand small { color: #dce3ea; font-size: 13px; font-weight: 500; }
.brand-symbol { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: #ffb21c; color: #17191d; }
.order-top-actions { display: flex; align-items: center; justify-content: end; gap: 12px; }
.order-top-actions .shop-picker { font-size: 11px; }
.order-top-actions .shop-picker select { max-width: 170px; font-size: 14px; }
.button-quiet { min-height: 40px; padding: 7px 12px; border: 1px solid #77818c; background: transparent; color: white; }
.user-label { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: #e2e7ec; }
.logout-button { min-height: 40px; }
.orders-layout { display: grid; grid-template-columns: 222px minmax(0,1fr); min-height: calc(100vh - 68px); }
.order-sidebar { display: flex; flex-direction: column; justify-content: space-between; padding: 20px 12px; background: #fff; border-right: 1px solid #dfe3e7; }
.order-sidebar nav { display: grid; gap: 4px; }
.nav-item { min-height: 46px; display: flex; align-items: center; gap: 12px; padding: 8px 12px; border: 0; border-radius: 6px; background: transparent; color: #454e59; text-align: left; font-weight: 650; cursor: pointer; }
.nav-item > span:first-child { width: 19px; color: #596472; font-size: 19px; text-align: center; }
.nav-item:hover, .nav-item.selected { background: #eaf1fc; color: #124eae; }
.nav-item:focus-visible, .button:focus-visible, .icon-button:focus-visible, .order-card:focus-visible, .line-action:focus-visible, .stepper-button:focus-visible, .line-image-trigger:focus-visible, .line-issue:focus-visible, .back-link:focus-visible, .logout-button:focus-visible { outline: 3px solid #175ed6; outline-offset: 2px; }
.nav-count { min-width: 23px; height: 23px; display: inline-grid; place-items: center; margin-left: auto; border-radius: 99px; background: #ffb21c; color: #272116; font-size: 12px; font-weight: 800; }
.sidebar-note { display: flex; align-items: center; gap: 8px; padding: 12px 9px 5px; color: #52606d; font-size: 12px; }
.connected-dot { width: 8px; height: 8px; border-radius: 50%; background: #28744c; }
.order-content { width: min(1380px,100%); margin: 0 auto; padding: clamp(18px,3vw,38px); }
.view-heading { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 22px; }
.view-heading h1 { margin: 0 0 5px; font-size: clamp(27px,3vw,35px); letter-spacing: -.045em; }
.view-heading p { margin: 0; color: #52606d; }
.heading-actions { display: flex; align-items: center; gap: 9px; }
.button-primary { background: #ffb21c; color: #272116; }
.button-primary:hover { background: #f3a500; }
.button-outline { border-color: #aab2bb; background: #fff; color: #20262d; }
.button-outline:hover { background: #f4f6f8; }
.stats-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin-bottom: 22px; }
.stat-card { min-height: 112px; display: flex; flex-direction: column; justify-content: space-between; padding: 17px 19px; border: 1px solid #dfe3e7; border-radius: 8px; background: #fff; }
.stat-card span { color: #56616e; font-size: 13px; font-weight: 600; }
.stat-card strong { font-size: 31px; line-height: 1; letter-spacing: -.05em; }
.section-card { border: 1px solid #dfe3e7; border-radius: 8px; background: #fff; }
.section-header { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 16px 18px; border-bottom: 1px solid #e4e7eb; }
.section-header h2 { margin: 0; font-size: 17px; }
.order-list { display: grid; }
.order-card { display: grid; grid-template-columns: minmax(130px,.65fr) minmax(180px,1.25fr) minmax(130px,.8fr) minmax(90px,.5fr) auto; align-items: center; gap: 16px; padding: 16px 18px; border-bottom: 1px solid #eaedf0; background: #fff; color: inherit; text-align: left; cursor: pointer; }
.order-card:last-child { border-bottom: 0; }
.order-card:hover { background: #f7f9fb; }
.order-card strong { display: block; margin-bottom: 3px; font-size: 14px; }
.order-card small { color: #5b6471; font-size: 12px; }
.order-card-customer { min-width: 0; }
.order-card-customer strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-pill { width: fit-content; display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 99px; background: #eef0f2; color: #303840; font-size: 12px; font-weight: 700; }
.status-pill.received, .status-pill.review { background: #fff3d6; color: #684900; }
.status-pill.preparing { background: #e6efff; color: #124eae; }
.status-pill.prepared, .status-pill.finalized { background: #e5f2e9; color: #1e5f3e; }
.status-pill.paused { background: #f2ebff; color: #6035a4; }
.order-detail { display: grid; grid-template-columns: minmax(0,1fr) 290px; gap: 18px; }
.detail-main { min-width: 0; }
.detail-customer { padding: 17px 19px; margin-bottom: 16px; }
.detail-customer h2 { margin: 0 0 9px; font-size: 18px; }
.customer-lines { display: flex; flex-wrap: wrap; gap: 8px 22px; color: #515b67; font-size: 13px; }
.line-list { display: grid; }
.order-line { display: grid; grid-template-columns: 64px minmax(160px,1fr) minmax(145px,180px); gap: 12px; align-items: start; padding: 15px 14px; border-bottom: 1px solid #e9ecef; }
.order-line:last-child { border-bottom: 0; }
.line-image-trigger { position: relative; width: 64px; height: 64px; display: grid; place-items: center; padding: 2px; border: 1px solid #d9dee4; border-radius: 6px; background: white; cursor: zoom-in; }
.line-image { display: block; width: 100%; height: 100%; border-radius: 4px; object-fit: contain; background: white; }
.line-image-trigger > span { position: absolute; inset-inline: 0; bottom: 0; padding: 2px; background: #16191ecc; color: white; font-size: 9px; text-align: center; opacity: 0; }
.line-image-trigger:hover > span, .line-image-trigger:focus-visible > span { opacity: 1; }
.line-image-trigger.image-unavailable { cursor: default; color: #596472; font-size: 10px; }
.line-image-empty { width: 64px; height: 64px; display: grid; place-items: center; border: 1px dashed #aab2bb; border-radius: 6px; color: #596472; font-size: 10px; text-align: center; }
.line-name { min-width: 0; }
.line-name > strong { display: block; line-height: 1.35; overflow-wrap: anywhere; }
.line-name small { display: block; margin-top: 4px; color: #56616e; font-size: 12px; }
.line-quantity { display: block; margin-top: 7px; color: #45505b; font-size: 12px; line-height: 1.45; }
.line-quantity strong { color: #20262d; }
.line-controls { min-width: 0; display: grid; justify-items: stretch; gap: 8px; }
.availability-controls { display: flex; justify-content: center; gap: 8px; }
.quantity-stepper { display: grid; grid-template-columns: 38px 58px 38px; justify-content: center; gap: 5px; }
.quantity-input { width: 58px; min-width: 0; min-height: 42px; padding: 7px 3px; border: 1px solid #aab2bb; border-radius: 5px; text-align: center; font: inherit; }
.stepper-button { width: 38px; min-width: 38px; min-height: 42px; border: 1px solid #aab2bb; border-radius: 5px; background: white; color: #20262d; font-size: 20px; font-weight: 700; cursor: pointer; }
.stepper-button:hover { background: #eef2f6; }
.shortage-reason { display: grid; gap: 4px; color: #4e5965; font-size: 12px; font-weight: 650; }
.shortage-reason[hidden] { display: none; }
.shortage-reason textarea { width: 100%; min-width: 0; padding: 8px; border: 1px solid #aab2bb; border-radius: 5px; font: inherit; font-weight: 400; resize: vertical; }
.line-save-state { min-height: 16px; color: #45505b; font-size: 11px; text-align: center; }
.line-action { width: 42px; min-width: 42px; height: 42px; min-height: 42px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 1px solid #aab2bb; border-radius: 5px; background: white; font-size: 20px; line-height: 1; font-weight: 800; cursor: pointer; }
.line-action.yes { color: #1e5f3e; }
.line-action.no { color: #9a302a; }
.line-action:hover { background: #eef2f6; }
.line-issue { grid-column: 2 / -1; justify-self: start; margin-top: -2px; padding: 4px 0; border: 0; background: none; color: #124eae; text-decoration: underline; cursor: pointer; }
.order-facts { display: grid; gap: 0; margin: 0; }
.order-facts > div { display: grid; grid-template-columns: minmax(0,.85fr) minmax(0,1.15fr); gap: 8px; padding: 8px 0; border-bottom: 1px solid #e9ecef; }
.order-facts > div:last-child { border-bottom: 0; }
.order-facts dt { color: #4e5965; font-size: 12px; }
.order-facts dd { margin: 0; font-size: 12px; font-weight: 650; overflow-wrap: anywhere; }
.detail-side { align-self: start; display: grid; gap: 14px; }
.detail-side .section-card { padding: 16px; }
.detail-side h2 { margin: 0 0 12px; font-size: 16px; }
.detail-side .button { width: 100%; margin-top: 8px; }
.side-info { color: #4e5965; font-size: 13px; }
.side-info strong { color: #1a2027; }
.detail-warning { padding: 12px 14px; border: 1px solid #d6a634; border-radius: 6px; background: #fff3d6; color: #58410c; }
.employee-list { display: grid; }
.employee-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 15px; padding: 14px 18px; border-bottom: 1px solid #e7eaed; }
.employee-row:last-child { border-bottom: 0; }
.employee-row small { display: block; color: #596472; }
.employee-row select { min-height: 40px; padding: 6px 10px; border: 1px solid #aab2bb; border-radius: 5px; background: white; }
.product-results { max-height: 230px; overflow: auto; display: grid; gap: 5px; }
.product-result { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; padding: 10px; border: 1px solid #dfe3e7; border-radius: 5px; background: #fff; text-align: left; cursor: pointer; }
.product-result.selected { border-color: #175ed6; background: #eaf1fc; }
.product-result small { display: block; color: #5b6471; }
.order-dialog { width: min(510px,calc(100vw - 26px)); max-height: min(84vh,760px); padding: 22px; border: 1px solid #dfe3e7; border-radius: 9px; background: #fff; color: #16191e; }
.order-dialog::backdrop { background: #15191fcc; }
.image-preview-dialog { position: relative; width: min(1100px,calc(100vw - 28px)); height: min(88vh,900px); max-width: none; max-height: none; padding: 52px 24px 24px; border: 1px solid #53606d; border-radius: 9px; background: #11161c; color: white; }
.image-preview-dialog::backdrop { background: #101419e8; }
.image-preview-dialog img { width: 100%; height: 100%; object-fit: contain; }
.image-preview-dialog p { position: absolute; inset: 50% 12px auto; text-align: center; }
.image-preview-close { position: absolute; z-index: 1; top: 10px; right: 10px; border-color: #77818c; background: #252c34; color: white; }
.dialog-heading { display: flex; align-items: start; justify-content: space-between; gap: 14px; margin-bottom: 13px; }
.dialog-heading h2 { margin: 0; font-size: 23px; }
.icon-button { width: 42px; height: 42px; border: 1px solid #aab2bb; border-radius: 6px; background: white; font-size: 23px; cursor: pointer; }
.dialog-product { color: #48535f; }
.dialog-actions { display: flex; justify-content: end; gap: 9px; margin-top: 17px; }
.empty-state, .loading-state, .error-state { padding: 35px 20px; color: #53606c; text-align: center; }
.empty-state strong { display: block; margin-bottom: 5px; color: #20262d; }
.order-skeleton { height: 68px; background: linear-gradient(90deg,#f0f2f4,#fafafa,#f0f2f4); background-size: 200% 100%; animation: skeleton 1.4s linear infinite; }
@keyframes skeleton { to { background-position: -200% 0; } }
@media (max-width: 920px) { .orders-layout { grid-template-columns: 184px minmax(0,1fr); } .order-detail { grid-template-columns: minmax(0,1fr); } .detail-side { grid-template-columns: repeat(2,minmax(0,1fr)); } .order-card { grid-template-columns: minmax(115px,.7fr) minmax(140px,1fr) minmax(110px,.8fr) auto; } .order-card > .order-date { display: none; } }
@media (max-width: 680px) { .order-topbar { align-items: flex-start; flex-direction: column; gap: 9px; padding: 10px 14px; } .order-top-actions { width: 100%; justify-content: space-between; flex-wrap: wrap; gap: 7px; } .order-top-actions .shop-picker select { max-width: 135px; } .user-label { max-width: 115px; } .orders-layout { display: flex; flex-direction: column; min-height: calc(100vh - 104px); } .order-sidebar { position: sticky; top: 0; z-index: 5; padding: 5px 7px; border-right: 0; border-bottom: 1px solid #dfe3e7; } .order-sidebar nav { grid-template-columns: repeat(5,minmax(0,1fr)); gap: 2px; } .nav-item { min-height: 54px; display: grid; justify-items: center; align-content: center; gap: 1px; padding: 4px 2px; font-size: 10px; } .nav-item > span:first-child { font-size: 17px; } .nav-count { position: absolute; margin: -25px 0 0 31px; min-width: 19px; height: 19px; font-size: 10px; } .sidebar-note { display: none; } .order-content { padding: 18px 12px 28px; } .view-heading { align-items: start; flex-direction: column; } .heading-actions { width: 100%; } .stats-grid { gap: 8px; } .stat-card { min-height: 94px; padding: 12px; } .stat-card span { font-size: 11px; } .stat-card strong { font-size: 25px; } .order-card { grid-template-columns: minmax(0,1fr) auto; gap: 6px 12px; padding: 13px; } .order-card > div:nth-child(2) { grid-column: 1; } .order-card > .status-pill { grid-column: 2; grid-row: 1 / span 2; } .order-card > div.order-date { display: block; grid-column: 1; } .order-card > .order-card-arrow { display: none; } .section-header { padding: 13px; } .order-line { grid-template-columns: 48px minmax(0,1fr); gap: 8px; padding: 12px 9px; } .line-image-trigger, .line-image-empty { width: 48px; height: 48px; } .line-controls { grid-column: 2; width: 100%; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 7px 8px; } .availability-controls { justify-content: flex-start; } .quantity-stepper { grid-template-columns: 38px 58px 38px; justify-content: end; } .line-action { width: 40px; min-width: 40px; height: 40px; min-height: 40px; } .shortage-reason, .line-save-state { grid-column: 1 / -1; } .line-issue { grid-column: 2; margin-top: 0; } .detail-side { grid-template-columns: minmax(0,1fr); } .employee-row { grid-template-columns: minmax(0,1fr) auto; gap: 8px; } .employee-row .button { grid-column: 2; } .image-preview-dialog { width: calc(100vw - 16px); height: 82vh; padding: 50px 8px 8px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; } }
.order-detail { display: flex; flex-direction: column; }
.detail-side { grid-template-columns: repeat(3,minmax(0,1fr)); width: 100%; }
.detail-main { width: 100%; }
.order-line { grid-template-columns: 64px minmax(160px,1fr) minmax(145px,180px) 34px; }
.line-more { position: relative; grid-column: 4; grid-row: 1; justify-self: end; }
.line-more > summary { width: 34px; height: 36px; display: grid; place-items: center; border: 1px solid #d5dbe1; border-radius: 6px; color: #27313b; font-size: 22px; font-weight: 700; line-height: 1; cursor: pointer; list-style: none; }
.line-more > summary::-webkit-details-marker { display: none; }
.line-more-menu { position: absolute; z-index: 8; inset: 38px 0 auto auto; width: 190px; display: grid; padding: 5px; border: 1px solid #d5dbe1; border-radius: 7px; background: white; box-shadow: 0 8px 24px #15202b24; }
.line-more-menu button { min-height: 38px; padding: 7px 9px; border: 0; border-radius: 4px; background: white; color: #20262d; text-align: left; cursor: pointer; }
.line-more-menu button:hover { background: #eff3f7; }
.line-more-menu button:disabled { color: #7e8790; cursor: not-allowed; }
.line-pagination { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 15px; color: #53606c; font-size: 13px; }
.barcode-scan-button { width: 100%; margin: 8px 0 12px; }
.barcode-dialog video { width: 100%; max-height: 54vh; border-radius: 7px; background: #15191e; object-fit: cover; }
.barcode-dialog p { color: #53606c; font-size: 14px; }
.orders-page button:disabled { cursor: wait; opacity: .65; }
@media (max-width: 920px) { .detail-side { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 680px) { .detail-side { grid-template-columns: minmax(0,1fr); } .order-line { grid-template-columns: 48px minmax(0,1fr) 34px; } .line-more { grid-column: 3; grid-row: 1; } .line-controls { grid-column: 2 / 4; } .line-pagination { align-items: stretch; flex-direction: column; } }
