#all-orders-view .all-orders-heading {
  width: 100%;
  margin-bottom: 22px;
}
.all-orders-filters {
  display: flex;
  align-items: end;
  width: 100%;
  padding: 14px;
  border: 1px solid #d5e2da;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 5px 18px #18392b14;
}
.all-orders-filter-row { display: flex; flex: 1; flex-wrap: wrap; align-items: end; gap: 8px; }
.all-orders-date-range { display: grid; gap: 6px; }
.range-label { color: #40534a; font-size: var(--text-control); font-weight: 600; }
.all-orders-date-inputs { display: flex; align-items: center; gap: 8px; }
.all-orders-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.date-preset {
  min-width: 64px;
  height: 42px;
  padding: 0 14px;
  border: 1px solid #d5e1da;
  border-radius: 5px;
  background: #fff;
  color: #43584d;
  font: var(--text-control) "Noto Sans SC", sans-serif;
  cursor: pointer;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .15s;
}
.date-preset:hover { border-color: #8bb8a4; background: #f2f8f4; }
.date-preset[aria-pressed="true"] { border-color: #197e69; background: #e5f3ec; color: #126a56; box-shadow: inset 0 0 0 1px #197e69, 0 2px 6px #147d6826; }
.date-preset:focus-visible, .all-orders-filters input:focus-visible, .all-orders-filters select:focus-visible { outline: 2px solid #1b8b70; outline-offset: 2px; }
.all-orders-filters label { display: grid; gap: 6px; min-width: 0; color: #40534a; font-size: var(--text-control); font-weight: 600; }
.all-orders-filters select,
.all-orders-filters input {
  height: 42px;
  width: 126px;
  max-width: 100%;
  border: 1px solid #cbdad1;
  border-radius: 5px;
  background: #fff;
  color: #30463a;
  padding: 0 10px;
  font: inherit;
  font-size: var(--text-control);
  box-shadow: inset 0 1px 2px #173a2b0a;
}
.all-orders-date-inputs input { width: 170px; }
.all-orders-filters select { width: 200px; }
.all-orders-filters .button { height: 42px; padding-inline: 22px; font-size: var(--text-control); font-weight: 600; border-radius: 5px; box-shadow: 0 4px 10px #147d6835; }
.date-separator { color: #62776d; font-size: var(--text-control); font-weight: 500; }
.all-orders-date-inputs input::-webkit-calendar-picker-indicator { display: none; }
.all-orders-date-inputs input {
  padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23596b62' stroke-width='1.7'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v5M16 3v5M7 14h3M14 14h3M7 17h3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
}
.orders-calendar {
  position: fixed;
  inset: auto;
  margin: 0;
  width: min(380px, calc(100vw - 24px));
  max-width: none;
  max-height: calc(100dvh - 24px);
  overflow: auto;
  padding: 16px;
  border: 1px solid #c8dcd1;
  border-radius: 12px;
  background: #fff;
  color: #2c4538;
  box-shadow: 0 14px 44px #173a2b30;
  font: var(--text-control) "DM Sans", "Noto Sans SC", sans-serif;
}
.orders-calendar::backdrop { background: #173a2b0a; }
.orders-calendar button, .orders-calendar select { font: inherit; cursor: pointer; }
.calendar-caption { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.calendar-caption strong { font-size: var(--text-emphasis); }
.orders-calendar button { border: 1px solid transparent; border-radius: 6px; background: #fff; color: #304e3e; }
.calendar-caption button { width: 36px; height: 36px; font-size: var(--text-title); }
.calendar-navigation { display: grid; grid-template-columns: 42px minmax(0, 1.2fr) minmax(0, 1fr) 42px; gap: 6px; margin-bottom: 12px; }
.calendar-navigation button { height: 42px; background: #edf5f0; font-size: var(--text-title); }
.calendar-navigation select { width: 100%; min-width: 0; height: 42px; border: 1px solid #d5e3db; border-radius: 6px; padding: 0 4px; color: #304e3e; background: #fff; }
.calendar-weekdays, .calendar-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.calendar-weekdays { margin-bottom: 6px; text-align: center; color: #809187; font-size: var(--text-control); line-height: 28px; }
.orders-calendar .calendar-day { height: 44px; min-width: 0; padding: 0; font-size: var(--text-emphasis); }
.orders-calendar .other-month { color: #a0ada5; }
.orders-calendar button:hover { background: #edf5f0; }
.orders-calendar .calendar-day[aria-current="date"] { border-color: #73a38c; font-weight: 700; }
.orders-calendar .calendar-day[aria-pressed="true"] { background: #197e69; border-color: #197e69; color: #fff; box-shadow: 0 2px 5px #197e6930; }
.orders-calendar :focus-visible { outline: 2px solid #197e69; outline-offset: 1px; }
.calendar-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 12px; margin-top: 10px; border-top: 1px solid #e5ede8; }
.calendar-footer span { font-size: var(--text-body); color: #809187; }
.calendar-footer button { min-height: 36px; padding: 0 15px; color: #197e69; font-weight: 600; }
.all-orders-status { color: #62776d; font-size: var(--text-body); }
.all-orders-status.is-error { color: #a04730; }
.all-orders-toolbar { height: auto; min-height: 44px; flex-wrap: wrap; gap: 12px; }
.all-orders-staff-search { display: flex; align-items: center; gap: 8px; margin-left: auto; max-width: 100%; }
.all-orders-staff-search .search-field { width: 280px; min-width: 0; height: 44px; }
.all-orders-staff-search input { width: 100%; min-width: 0; }
.all-orders-staff-search .button { height: 44px; flex-shrink: 0; }
.all-orders-status:not([hidden]) { margin-bottom: 12px; }
.all-orders-view .all-order-card {
  grid-template-columns: 32px minmax(0, 1.45fr) minmax(0, .7fr) minmax(0, 1fr) minmax(0, .8fr);
  cursor: default;
}
.all-order-card .past-icon { color: #39795e; font-size: var(--text-emphasis); text-align: center; }
.all-order-card .past-main { min-width: 0; display: grid; gap: 5px; }
.all-order-card .past-main strong { overflow-wrap: anywhere; color: #41554a; font-size: var(--text-body); }
.all-order-card .past-main span { overflow-wrap: anywhere; color: #62776d; font-size: var(--text-body); }
.all-order-card .past-total b { overflow-wrap: anywhere; }
.all-order-record:has(details) .all-order-card { border-radius: 6px 6px 0 0; }
.all-order-details {
  padding: 7px 14px;
  border: 1px solid #e1e9e6;
  border-top: 0;
  border-radius: 0 0 6px 6px;
  background: #fff;
  color: #316b54;
  font-size: var(--text-body);
}
.all-order-details summary { cursor: pointer; }
.all-order-details > div { display: grid; gap: 5px; margin-top: 8px; overflow-wrap: anywhere; }
.all-orders-pages { display: flex; justify-content: end; align-items: center; gap: 10px; margin-top: 12px; color: #596b62; font-size: var(--text-body); }
.all-orders-pages button:disabled { opacity: .55; cursor: default; }
#all-orders-view:not(.hidden) ~ .app-footer > span:last-child { display: none; }
@media (max-width: 760px) {
  .all-orders-staff-search { width: 100%; }
  .all-orders-staff-search .search-field { flex: 1; width: auto; }
  .all-orders-filters { padding: 14px; }
  .all-orders-filter-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; }
  .all-orders-date-range, .all-orders-presets { grid-column: 1 / -1; }
  .all-orders-date-inputs input { width: 100%; min-width: 0; }
  .all-orders-date-inputs { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
  .all-orders-filter-row .group-filter { min-width: 0; }
  .all-orders-filter-row select { width: 100%; }
  .date-preset { flex: 1; min-width: 62px; padding-inline: 9px; }
  .all-orders-filter-row .button { align-self: end; }
  .all-orders-view .all-order-card { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .all-order-card .past-icon { display: none; }
  .all-order-card .past-main { grid-column: 1 / -1; }
  .all-order-card .past-customer, .all-order-card .past-period { display: grid; }
  .all-order-card .past-period b { white-space: normal; }
  .all-order-card .past-total { justify-self: end; }
}
