.order-report-addon {
  margin-top: 24px;
  padding-bottom: 32px;
}

.sidebar-report-launcher {
  display: grid;
  gap: 8px;
  margin-top: 4px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-report-field {
  display: grid;
  gap: 4px;
}

.sidebar-report-field span {
  color: #b8c7dc;
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar-report-field select {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(219, 234, 254, 0.22);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a;
  font: inherit;
  font-weight: 850;
  padding: 6px 8px;
}

.sidebar-report-button {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(96, 165, 250, 0.28);
  border-radius: 11px;
  background: rgba(37, 99, 235, 0.92);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.20);
}

.sidebar-report-button:hover,
.sidebar-report-button:focus-visible {
  background: #1d4ed8;
  outline: none;
}

@media (max-width: 760px) {
  .sidebar-report-launcher {
    gap: 7px;
    margin-top: 0;
    padding: 9px;
  }

  .sidebar-report-field select,
  .sidebar-report-button {
    min-height: 36px;
  }
}

.order-report-card {
  background: #ffffff;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 22px;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.10);
  overflow: hidden;
}

.order-report-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding: 22px 24px;
  border-bottom: 1px solid rgba(37, 99, 235, 0.12);
  background: linear-gradient(135deg, #f8fbff 0%, #eef6ff 100%);
}

.order-report-kicker {
  margin: 0 0 6px;
  color: #0f766e;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.order-report-header h3 {
  margin: 0;
  color: #0f172a;
  font-size: 1.45rem;
  line-height: 1.15;
}

.order-report-header p {
  margin: 8px 0 0;
  max-width: 680px;
  color: #475569;
  font-weight: 700;
}

.order-report-actions,
.order-report-filter-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.order-report-actions {
  justify-content: flex-end;
}

.order-report-button {
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 12px;
  background: #ffffff;
  color: #0f3b63;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 10px 14px;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.order-report-button:hover,
.order-report-button:focus-visible {
  background: #eff6ff;
  border-color: rgba(37, 99, 235, 0.44);
  color: #1d4ed8;
  outline: none;
}

.order-report-button.primary {
  background: #1769d8;
  border-color: #1769d8;
  color: #ffffff;
}

.order-report-button.primary:hover,
.order-report-button.primary:focus-visible {
  background: #0f57b8;
  color: #ffffff;
}

.order-report-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(6px);
}

.order-report-modal-backdrop[hidden] {
  display: none !important;
}

.order-report-modal {
  width: min(1120px, 100%);
  max-height: min(900px, calc(100vh - 56px));
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 22px;
  background: #f8fbff;
  box-shadow: 0 28px 90px rgba(15, 23, 42, 0.34);
}

.order-report-modal-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(37, 99, 235, 0.14);
  background: #ffffff;
}

.order-report-modal-toolbar h2 {
  margin: 0;
  color: #0f172a;
  font-size: 1.35rem;
  line-height: 1.15;
}

.order-report-modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.order-report-close {
  width: 42px;
  min-height: 42px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 12px;
  background: #f8fbff;
  color: #334155;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.order-report-close:hover,
.order-report-close:focus-visible {
  background: #eff6ff;
  color: #1d4ed8;
  outline: none;
}

.order-report-print-document {
  max-height: calc(100vh - 160px);
  overflow: auto;
  padding: 24px;
}

.order-report-document {
  max-width: 980px;
  margin: 0 auto;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.10);
  overflow: hidden;
}

.order-report-document-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 26px 30px;
  background: linear-gradient(135deg, #0f3b63 0%, #1769d8 100%);
  color: #ffffff;
}

.order-report-document-header p {
  margin: 0 0 8px;
  color: #bfdbfe;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.order-report-document-header h1 {
  margin: 0;
  color: #ffffff;
  font-size: 2rem;
  line-height: 1.1;
}

.order-report-document-header span {
  display: block;
  margin-top: 8px;
  color: #dbeafe;
  font-weight: 800;
}

.order-report-document-meta {
  min-width: 180px;
  text-align: right;
}

.order-report-document-meta strong,
.order-report-document-meta span {
  display: block;
}

.order-report-document-meta strong {
  color: #bfdbfe;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.order-report-document-summary .order-report-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 22px 30px;
}

.order-report-document-section {
  padding: 0 30px 30px;
}

.order-report-document-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 30px;
  border-top: 1px solid rgba(37, 99, 235, 0.12);
  background: #f8fbff;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
}

.order-report-controls {
  padding: 18px 24px;
  border-bottom: 1px solid rgba(37, 99, 235, 0.10);
}

.order-report-filter-grid {
  align-items: end;
}

.order-report-field {
  display: grid;
  gap: 6px;
  min-width: 180px;
  flex: 1 1 180px;
}

.order-report-field span {
  color: #334155;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.order-report-field select,
.order-report-field input {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 12px;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
  font-weight: 800;
  padding: 9px 12px;
}

.order-report-field select:focus,
.order-report-field input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  outline: none;
}

.order-report-status {
  min-height: 20px;
  margin-top: 10px;
  color: #0f766e;
  font-size: 0.85rem;
  font-weight: 800;
}

.order-report-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 12px;
  padding: 18px 24px;
}

.order-report-stat {
  min-height: 96px;
  padding: 14px;
  border: 1px solid rgba(37, 99, 235, 0.13);
  border-radius: 16px;
  background: #f8fbff;
}

.order-report-stat span {
  display: block;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.order-report-stat strong {
  display: block;
  margin-top: 8px;
  color: #082f49;
  font-size: 1.35rem;
  line-height: 1.1;
}

.order-report-stat.warn strong {
  color: #b91c1c;
}

.order-report-body {
  padding: 0 24px 24px;
}

.order-report-title-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  margin: 6px 0 14px;
  padding-top: 12px;
}

.order-report-title-row h4 {
  margin: 0;
  color: #0f172a;
  font-size: 1.1rem;
}

.order-report-title-row p {
  margin: 4px 0 0;
  color: #64748b;
  font-weight: 700;
}

.order-report-generated {
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.order-report-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.order-report-panel {
  border: 1px solid rgba(37, 99, 235, 0.13);
  border-radius: 16px;
  overflow: hidden;
  background: #ffffff;
}

.order-report-panel h5 {
  margin: 0;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(37, 99, 235, 0.10);
  background: #f8fbff;
  color: #0f3b63;
  font-size: 0.92rem;
}

.order-report-table-wrap {
  overflow: auto;
  border: 1px solid rgba(37, 99, 235, 0.13);
  border-radius: 16px;
}

.order-report-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
  background: #ffffff;
}

.order-report-table th,
.order-report-table td {
  padding: 11px 12px;
  border-bottom: 1px solid rgba(37, 99, 235, 0.10);
  text-align: left;
  vertical-align: top;
}

.order-report-table th {
  background: #f8fbff;
  color: #0f3b63;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.order-report-table td {
  color: #0f172a;
  font-size: 0.88rem;
  font-weight: 700;
}

.order-report-table .muted {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 0.78rem;
}

.order-report-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-size: 0.76rem;
  font-weight: 900;
}

.order-report-pill.completed {
  background: #dcfce7;
  color: #166534;
}

.order-report-pill.overdue {
  background: #fee2e2;
  color: #991b1b;
}

.order-report-empty {
  padding: 28px;
  border: 1px dashed rgba(37, 99, 235, 0.24);
  border-radius: 16px;
  background: #f8fbff;
  color: #475569;
  text-align: center;
  font-weight: 800;
}

.order-report-appointment-list {
  display: grid;
  gap: 18px;
}

.order-report-appointment-card {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(320px, 1.2fr);
  gap: 16px;
  padding: 16px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}

.order-report-appointment-detail {
  display: grid;
  align-content: start;
  gap: 10px;
}

.order-report-appointment-time {
  display: inline-flex;
  width: fit-content;
  min-height: 32px;
  align-items: center;
  padding: 5px 11px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 0.95rem;
  font-weight: 950;
}

.order-report-appointment-card h5 {
  margin: 0;
  color: #0f172a;
  font-size: 1.08rem;
  line-height: 1.24;
}

.order-report-appointment-card p {
  margin: 0;
  color: #475569;
  font-weight: 800;
}

.order-report-appointment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: #334155;
  font-size: 0.86rem;
  font-weight: 800;
}

.order-report-appointment-note {
  padding: 10px 12px;
  border-radius: 12px;
  background: #eff6ff;
  color: #334155;
}

.order-report-map-link {
  display: inline-flex;
  width: fit-content;
  min-height: 36px;
  align-items: center;
  padding: 7px 12px;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 12px;
  background: #ffffff;
  color: #1d4ed8;
  font-weight: 900;
  text-decoration: none;
}

.order-report-map-link:hover,
.order-report-map-link:focus-visible {
  background: #eff6ff;
  outline: none;
}

.order-report-map-frame {
  min-height: 240px;
  overflow: hidden;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 16px;
  background: #e2e8f0;
}

.order-report-map-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 240px;
  border: 0;
}

@media (max-width: 1180px) {
  .order-report-summary {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .order-report-panels {
    grid-template-columns: 1fr;
  }

  .order-report-appointment-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .order-report-header {
    display: block;
  }

  .order-report-actions {
    justify-content: stretch;
    margin-top: 14px;
  }

  .order-report-button {
    flex: 1 1 auto;
  }

  .order-report-summary {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
    padding: 16px;
  }

  .order-report-controls,
  .order-report-body,
  .order-report-header {
    padding-left: 16px;
    padding-right: 16px;
  }

  .order-report-title-row {
    display: block;
  }

  .order-report-generated {
    display: block;
    margin-top: 8px;
  }

  .order-report-modal-backdrop {
    padding: 10px;
  }

  .order-report-modal-toolbar,
  .order-report-document-header,
  .order-report-document-footer {
    display: block;
  }

  .order-report-modal-actions {
    justify-content: stretch;
    margin-top: 12px;
  }

  .order-report-modal-actions .order-report-button {
    flex: 1 1 130px;
  }

  .order-report-document-meta {
    margin-top: 14px;
    text-align: left;
  }

  .order-report-document-summary .order-report-summary {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .order-report-document-section {
    padding: 0 16px 18px;
  }
}

@media print {
  body * {
    visibility: hidden !important;
  }

  .order-report-addon,
  .order-report-addon * {
    visibility: visible !important;
  }

  .order-report-addon {
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    margin: 0;
    padding: 0;
    background: #ffffff;
  }

  .order-report-card {
    border: none;
    box-shadow: none;
    border-radius: 0;
  }

  .order-report-actions,
  .order-report-controls,
  .order-report-status {
    display: none !important;
  }

  .order-report-summary {
    grid-template-columns: repeat(3, 1fr);
  }

  .order-report-panels {
    grid-template-columns: 1fr;
  }

  .order-report-table {
    min-width: 0;
    font-size: 10px;
  }

  body.order-report-print-active .order-report-addon,
  body.order-report-print-active .order-report-addon * {
    visibility: hidden !important;
  }

  body.order-report-print-active .order-report-modal-backdrop,
  body.order-report-print-active .order-report-modal-backdrop * {
    visibility: visible !important;
  }

  body.order-report-print-active .order-report-modal-backdrop {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    padding: 0;
    background: #ffffff;
    backdrop-filter: none;
  }

  body.order-report-print-active .order-report-modal {
    width: 100%;
    max-height: none;
    overflow: visible;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: #ffffff;
  }

  body.order-report-print-active .order-report-modal-toolbar {
    display: none !important;
  }

  body.order-report-print-active .order-report-print-document {
    max-height: none;
    overflow: visible;
    padding: 0;
  }

  body.order-report-print-active .order-report-document {
    max-width: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  body.order-report-print-active .order-report-document-header {
    background: #0f3b63 !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}
