:root {
  --ink: #1d3435;
  --muted: #728384;
  --teal: #116b64;
  --teal-soft: #e8f3ef;
  --line: #e3e9e5;
  --bg: #f4f6f3;
  --amber: #a26518;
  --red: #b34f40;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font:
    14px/1.55 -apple-system,
    BlinkMacSystemFont,
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-color: var(--teal);
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 9px 15px;
  border-radius: 7px;
  white-space: nowrap;
  transition: background 0.15s;
}
button:hover {
  background: #f0f5f2;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
button.primary {
  color: #fff;
  background: var(--teal);
  border-color: var(--teal);
}
button.primary:hover {
  background: #07544f;
}
button.danger {
  color: var(--red);
  border-color: #edcfc8;
}
button.small {
  padding: 5px 10px;
  font-size: 12px;
}
button.text-button {
  background: none;
  border: none;
  padding: 4px 6px;
  color: var(--teal);
}
a {
  color: var(--teal);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 220px;
  background: #fdfefb;
  border-right: 1px solid var(--line);
  padding: 30px 20px;
  z-index: 10;
}
.side-section {
  font-size: 10px;
  letter-spacing: 1.6px;
  color: #93a09a;
  margin: 42px 14px 13px;
}
.sidebar nav {
  display: grid;
  gap: 7px;
}
.sidebar nav a {
  color: #617273;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  border-radius: 8px;
}
.sidebar nav a span {
  font-size: 20px;
  line-height: 1;
}
.sidebar nav a.active {
  background: var(--teal-soft);
  color: var(--teal);
  font-weight: 600;
}
.sidebar nav a:hover {
  text-decoration: none;
  background: #f0f5f0;
}
.wide {
  width: 100%;
}
.sidebar .primary {
  margin-top: 30px;
}
.side-footer {
  position: absolute;
  bottom: 28px;
  left: 28px;
  font-size: 11px;
  color: #71827c;
  line-height: 2;
}
.side-footer small {
  font-size: 10px;
  color: #9aa59f;
}
.status-dot,
.local-badge i {
  display: inline-block;
  background: #459379;
  width: 6px;
  height: 6px;
  border-radius: 100%;
  margin-right: 6px;
}
.main-shell {
  margin-left: 220px;
}
.topbar {
  height: 72px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: #fcfdfa;
  font-size: 13px;
  color: #798984;
}
.top-right {
  display: flex;
  align-items: center;
  gap: 20px;
}
.local-badge {
  font-size: 11px;
  background: #edf5ee;
  border: 1px solid #dce9dd;
  color: #568366;
  padding: 4px 9px;
  border-radius: 20px;
}
.actor-button {
  border: none;
  background: none;
  font-size: 12px;
  padding-right: 0;
}
main {
  padding: 32px;
  max-width: 1900px;
  margin: auto;
}
.page-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 26px;
}
h1 {
  font-size: 26px;
  letter-spacing: -0.6px;
  margin: 0 0 7px;
  font-weight: 600;
}
h2 {
  font-size: 17px;
  margin: 0;
  font-weight: 600;
}
h3 {
  font-size: 14px;
  margin: 0 0 14px;
}
.subtitle,
.muted {
  color: var(--muted);
}
.subtitle {
  font-size: 12px;
}
.actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 24px 0;
}
.stat {
  padding: 19px 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.stat-label {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.stat-value {
  font-size: 26px;
  line-height: 1.4;
  letter-spacing: -0.8px;
  margin-top: 9px;
  font-variant-numeric: tabular-nums;
}
.stat-value small {
  font-size: 12px;
  margin-left: 5px;
  letter-spacing: 0;
  color: var(--muted);
}
.stat-foot {
  font-size: 10px;
  color: #99a39e;
  margin-top: 5px;
}
.stat.accent {
  background: #edf5ef;
  border-color: #d7e7dd;
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: 20px 0;
  overflow: hidden;
}
.panel-head {
  padding: 18px 21px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  gap: 12px;
}
.panel-body {
  padding: 22px;
}
.filters {
  padding: 17px 20px;
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
}
.filter {
  display: grid;
  gap: 5px;
}
.filter label {
  font-size: 10px;
  color: #86938c;
}
.search-box {
  min-width: 240px;
  flex: 1;
}
.filter input,
.filter select {
  width: 100%;
  min-width: 120px;
}
.filter select {
  max-width: 170px;
}
input,
select,
textarea {
  border: 1px solid #dce4de;
  border-radius: 6px;
  background: #fff;
  padding: 9px 11px;
  color: var(--ink);
  max-width: 100%;
}
textarea {
  min-height: 84px;
  resize: vertical;
  line-height: 1.6;
}
input::placeholder,
textarea::placeholder {
  color: #a3ada7;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  outline: 2px solid #116b6412;
}
.table-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
}
th {
  font-size: 11px;
  background: #f9faf7;
  color: #829088;
  font-weight: 500;
  padding: 12px 14px;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 14px;
  font-size: 12px;
  border-bottom: 1px solid #edf0eb;
  vertical-align: top;
}
tbody tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: #fbfdf9;
}
.orders-table {
  min-width: 1150px;
}
.orders-table td {
  padding-top: 17px;
  padding-bottom: 17px;
}
.order-title {
  font-size: 13px;
  max-width: 240px;
  min-width: 160px;
  color: #243e3b;
  font-weight: 550;
  display: block;
  line-height: 1.5;
}
.order-code {
  font-size: 10px;
  color: #92a095;
  display: block;
  margin-top: 5px;
  letter-spacing: 0.3px;
}
.customer {
  display: block;
  max-width: 220px;
  font-size: 11px;
  color: #52655c;
  overflow-wrap: anywhere;
  margin-top: 3px;
}
.number {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.positive {
  color: var(--teal);
}
.warning-text {
  color: var(--amber);
}
.negative {
  color: var(--red);
}
.pill {
  display: inline-block;
  white-space: nowrap;
  border-radius: 4px;
  padding: 3px 7px;
  font-size: 10px;
  background: #f0f3ee;
  color: #748177;
}
.pill.teal {
  background: #eaf3ec;
  color: #42735d;
}
.pill.amber {
  background: #fff3dd;
  color: #a3732a;
}
.pill.red {
  background: #faeeeb;
  color: #ac6252;
}
.category-pill {
  background: #eef1e8;
  color: #748264;
}
.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  color: #87958b;
  font-size: 11px;
}
.pager .actions {
  gap: 10px;
}
.empty {
  padding: 45px 25px;
  text-align: center;
  color: #96a298;
}
.loading {
  padding: 50px;
  text-align: center;
  color: var(--muted);
}
.banner {
  padding: 14px 18px;
  border: 1px solid #eeddb8;
  background: #fff9ec;
  color: #916b31;
  border-radius: 8px;
  margin: 16px 0;
  font-size: 12px;
}
.banner.info {
  background: #edf5f0;
  border-color: #d5e8dc;
  color: #477565;
}
.back-link {
  font-size: 12px;
  display: inline-block;
  margin-bottom: 18px;
}
.detail-meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  color: #89968e;
  font-size: 12px;
  margin-top: 11px;
}
.tabs {
  display: flex;
  gap: 4px;
  overflow: auto;
  border-bottom: 1px solid var(--line);
  margin-top: 26px;
}
.tabs button {
  border: 0;
  border-radius: 0;
  padding: 15px 16px;
  background: transparent;
  color: #7b8b80;
  position: relative;
}
.tabs button.active {
  color: var(--teal);
  font-weight: 600;
}
.tabs button.active:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 16px;
  right: 16px;
  height: 3px;
  border-radius: 2px;
  background: var(--teal);
}
.tabs .count {
  font-size: 10px;
  margin-left: 5px;
  color: #9ca69d;
}
.detail-stats {
  grid-template-columns: repeat(4, 1fr);
}
.detail-stats .stat {
  padding: 16px 18px;
}
.detail-stats .stat-value {
  font-size: 23px;
}
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.info-item label {
  display: block;
  font-size: 11px;
  color: #93a094;
  margin-bottom: 6px;
}
.info-item div {
  font-size: 13px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.section-note {
  font-size: 11px;
  color: #93a094;
  margin-top: 12px;
}
.raw {
  background: #f6f8f3;
  padding: 14px;
  border-radius: 6px;
  font-size: 11px;
  max-height: 420px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.table-actions {
  display: flex;
  gap: 7px;
  white-space: nowrap;
}
.record-name {
  max-width: 260px;
  min-width: 130px;
  white-space: pre-wrap;
}
.record-note {
  max-width: 300px;
  min-width: 140px;
  color: #89968b;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 11px;
}
.voided {
  opacity: 0.5;
}
.group-heading {
  margin-top: 22px;
}
.days {
  display: grid;
  gap: 14px;
}
.day-card {
  display: grid;
  grid-template-columns: 90px 1fr;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.day-label {
  background: #eff4eb;
  padding: 18px;
  text-align: center;
  color: var(--teal);
}
.day-label strong {
  font-size: 23px;
  display: block;
}
.day-content {
  padding: 20px;
}
.day-route {
  font-size: 15px;
  font-weight: 550;
  margin-bottom: 12px;
}
.day-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  color: #7b8a7e;
  font-size: 12px;
}
.day-sights {
  white-space: pre-wrap;
  margin: 10px 0 18px;
}
.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}
.file-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.file-preview {
  height: 120px;
  background: #f5f7f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  color: #a1af9d;
}
.file-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.file-info {
  padding: 13px;
  font-size: 11px;
  overflow-wrap: anywhere;
}
.file-info a {
  display: block;
  margin-bottom: 5px;
}
.file-info small {
  color: #9aa597;
}
.timeline {
  padding: 0;
  list-style: none;
}
.timeline li {
  padding: 0 0 22px 22px;
  position: relative;
  border-left: 1px solid #dce8dc;
  margin-left: 4px;
}
.timeline li:before {
  content: "";
  width: 7px;
  height: 7px;
  background: #95b49c;
  border: 3px solid #fff;
  border-radius: 100%;
  position: absolute;
  left: -7px;
  top: 4px;
}
.timeline-title {
  font-size: 13px;
}
.timeline-meta {
  color: #97a18f;
  font-size: 10px;
  margin: 4px 0;
}
.timeline-content {
  font-size: 12px;
  color: #667964;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
details {
  margin: 12px 0;
}
summary {
  cursor: pointer;
  color: var(--teal);
  font-size: 12px;
}
dialog {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 13px;
  width: min(780px, calc(100vw - 32px));
  max-height: 90vh;
  box-shadow: 0 24px 90px #153a2b28;
  color: var(--ink);
}
dialog::backdrop {
  background: #18342670;
  backdrop-filter: blur(2px);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 26px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: white;
  z-index: 2;
}
.modal-head h2 {
  font-size: 19px;
}
.close-modal {
  padding: 0;
  border: 0;
  font-size: 24px;
  line-height: 1;
  background: none;
  color: #9aa69a;
}
.modal-body {
  padding: 24px 26px;
  max-height: 67vh;
  overflow: auto;
}
.modal-foot {
  padding: 17px 26px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--line);
  background: #fcfdfa;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.field {
  display: grid;
  gap: 6px;
  align-content: start;
  min-width: 0;
}
.field label {
  color: #6f836f;
  font-size: 12px;
}
.field.full {
  grid-column: 1/-1;
}
.field input,
.field select,
.field textarea {
  width: 100%;
}
.required {
  color: #c28566;
  margin-left: 3px;
}
.form-error {
  background: #fff0e9;
  color: #a65e42;
  border: 1px solid #f1dbcc;
  padding: 11px 14px;
  border-radius: 6px;
  display: none;
  margin-bottom: 18px;
}
.form-error.visible {
  display: block;
}
.dialog-toast {
  display: none;
  padding: 9px 16px;
  color: #17493f;
  background: #edf7f2;
  border-bottom: 1px solid #c6dfd4;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.dialog-toast.visible { display: block; }
.form-hint {
  color: #91a18f;
  font-size: 11px;
  margin: 13px 0;
  line-height: 1.7;
}
.advanced-json {
  font:
    11px/1.6 ui-monospace,
    monospace;
  width: 100%;
  min-height: 210px;
  margin-top: 12px;
}
.check-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #85957e;
}
.check-line input {
  width: auto;
}
.source-label {
  font-size: 10px;
  color: #97a18f;
}
.report-table td:first-child {
  font-weight: 500;
}
#toast {
  position: fixed;
  bottom: 28px;
  left: calc(50% + 70px);
  transform: translate(-50%, 20px);
  padding: 12px 24px;
  background: #24473b;
  color: white;
  box-shadow: 0 4px 20px #19352926;
  border-radius: 9px;
  opacity: 0;
  transition: 0.2s;
  pointer-events: none;
  z-index: 100;
  font-size: 13px;
}
#toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.big-check {
  font-size: 30px;
  color: var(--teal);
  margin-bottom: 12px;
}
.settings-list {
  display: grid;
  gap: 12px;
}
.settings-item {
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}
.settings-item label {
  font-size: 12px;
  color: #9ba591;
  display: block;
}
.settings-item code {
  font-size: 11px;
  overflow-wrap: anywhere;
}
.workflow-detail {
  width: 100%;
  height: 55vh;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.full-width {
  grid-column: 1/-1;
}
.print-only {
  display: none;
}
@media (max-width: 1050px) {
  .sidebar {
    width: 185px;
    padding: 25px 15px;
  }
  .main-shell {
    margin-left: 185px;
  }
  main {
    padding: 24px;
  }
  .topbar {
    padding: 0 24px;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 15px;
  }
  .stat-value {
    font-size: 22px;
  }
  .two-col {
    grid-template-columns: 1fr;
  }
  .info-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .side-footer {
    left: 22px;
  }
  .page-title {
    flex-wrap: wrap;
  }
}
@media (max-width: 700px) {
  .sidebar {
    position: static;
    width: auto;
    padding: 15px;
    border-bottom: 1px solid var(--line);
  }
  .side-section,
  .side-footer,
  .sidebar > .primary {
    display: none;
  }
  .sidebar nav {
    display: flex;
    margin-top: 12px;
    gap: 4px;
  }
  .sidebar nav a {
    padding: 7px 10px;
    font-size: 12px;
  }
  .sidebar nav a span {
    font-size: 14px;
  }
  .main-shell {
    margin-left: 0;
  }
  .topbar {
    height: 50px;
    padding: 0 18px;
  }
  main {
    padding: 20px 16px;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat-value {
    font-size: 21px;
  }
  .page-title {
    margin-bottom: 16px;
  }
  h1 {
    font-size: 23px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .field {
    grid-column: 1/-1;
  }
  .modal-body {
    padding: 20px;
  }
  .day-card {
    grid-template-columns: 65px 1fr;
  }
  .day-label {
    padding: 15px 8px;
  }
  .day-content {
    padding: 15px;
  }
  .day-details {
    grid-template-columns: 1fr;
  }
  .info-grid {
    gap: 16px;
  }
  .local-badge {
    display: none;
  }
  #toast {
    left: 50%;
    max-width: 90vw;
    width: max-content;
  }
  .filters {
    gap: 10px;
  }
  .filter {
    flex: 1;
    min-width: 130px;
  }
  .search-box {
    min-width: 100%;
  }
  .filter input,
  .filter select {
    max-width: none;
  }
  .tabs button {
    padding: 12px;
  }
  .detail-meta {
    gap: 12px;
  }
}
@media print {
  .sidebar,
  .topbar,
  .tabs,
  .actions,
  .back-link,
  .no-print {
    display: none !important;
  }
  .main-shell {
    margin: 0;
  }
  main {
    padding: 0;
  }
  .panel,
  .stat {
    break-inside: avoid;
    border-color: #bbb;
  }
  .print-only {
    display: block;
  }
  .stats {
    gap: 8px;
  }
  body {
    background: white;
  }
  .number {
    color: black;
  }
}

/* Team accounts, permissions and financial workflow */
.is-logged-out .sidebar,.is-logged-out .topbar{display:none}.is-logged-out .main-shell{margin-left:0}.is-logged-out main{min-height:100vh;display:grid;place-items:center;padding:30px 18px}.login-card{width:min(450px,100%);padding:34px;background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:0 12px 50px #1a4b3210}.login-brand{width:46px;height:46px;background:var(--teal);color:#fff;display:grid;place-items:center;border-radius:11px;font-size:27px;margin-bottom:20px}.login-card h1{font-size:22px}.login-card form{display:grid;gap:18px;margin:24px 0 16px}.login-card>.wide{margin-top:12px}.role-checks{display:flex;gap:14px;flex-wrap:wrap;margin:8px 0 16px}.permission-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.permission-item{display:flex;gap:8px;align-items:start;font-size:12px}.permission-item input{width:auto;margin-top:4px}.financial-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px}.financial-grid .stat{padding:13px 16px}.financial-grid .stat-value{font-size:21px}.financial-grid .stat-foot{min-height:15px}.account-secret{background:#edf5ee;padding:18px;border:1px solid #cfe2d3;border-radius:8px}.account-secret code{user-select:all;font-size:15px;overflow-wrap:anywhere}.approval-card{padding:18px;border:1px solid var(--line);border-radius:9px;margin:12px 0}.approval-card .actions{margin-top:12px}.column-options{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.member-row{display:grid;grid-template-columns:130px 1fr;gap:12px;align-items:center;margin:12px 0}.sidebar nav{gap:3px}.sidebar nav a{padding:10px 14px}.history-warning{background:#fff8e9;border:1px solid #ecdab1;padding:12px 15px;border-radius:7px;font-size:12px;color:#8a6d32}.small-description{font-size:11px;color:#879780;margin-top:5px}
@media(max-width:700px){.permission-grid,.column-options{grid-template-columns:1fr 1fr}.financial-grid{grid-template-columns:repeat(2,1fr)}.member-row{grid-template-columns:1fr}.sidebar nav{flex-wrap:wrap}.login-card{padding:26px}}
[hidden] { display: none !important; }

/* Keep the order toolbar and headings together; totals refer to the visible page. */
.orders-panel { overflow:visible; }
.orders-frozen-header { position:sticky;top:0;z-index:12;background:#fff;border-radius:10px 10px 0 0;box-shadow:0 3px 8px #25453610; }
.orders-frozen-header .panel-head { border-radius:10px 10px 0 0; }
.orders-head-scroll { overflow-x:auto;overflow-y:hidden;scrollbar-width:thin; }
.orders-head-scroll table { margin:0; }
.orders-head-scroll th { height:42px; }
.orders-body-scroll { border-radius:0 0 10px 10px;scrollbar-width:thin; }
.orders-body-scroll tbody tr,.today-divider { scroll-margin-top:calc(var(--order-frozen-height,240px) + 10px); }
.screen-reader-header { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);clip-path:inset(50%);white-space:nowrap;border:0; }
.page-financial-footer { position:fixed;bottom:0;left:252px;width:calc(100vw - 284px);display:flex;align-items:stretch;gap:17px;z-index:13;background:#fff;border:1px solid #d7e5dc;border-top:3px solid #588c78;border-radius:9px 9px 0 0;box-shadow:0 -6px 24px #24403412;padding:11px 16px; }
.page-total-title { flex:0 0 88px;display:flex;flex-direction:column;justify-content:center;font-size:12px;gap:5px;border-right:1px solid var(--line); }
.page-total-title small { color:var(--muted);font-size:10px; }
.page-total-values { display:flex;flex:1;min-width:0;gap:18px;overflow:auto;scrollbar-width:thin; }
.page-total-item { min-width:96px;flex:1;display:grid;gap:6px;align-content:center; }
.page-total-item>span { font-size:10px;color:var(--muted);white-space:nowrap; }
.page-total-item strong { font-size:14px;font-variant-numeric:tabular-nums;font-weight:650;white-space:nowrap; }
body.has-order-footer main { padding-bottom:calc(var(--order-footer-height,78px) + 30px); }
body.has-order-footer .selected-order-menu { max-height:calc(100vh - var(--order-footer-height,78px) - 108px); }
@media(max-width:700px) { .page-financial-footer{padding:9px;gap:10px}.page-total-title{flex-basis:72px} }
@media print { .page-financial-footer{position:static;width:auto!important;left:auto!important;margin-top:20px;box-shadow:none}.orders-frozen-header{position:static;box-shadow:none}.orders-head-scroll{overflow:visible}.screen-reader-header{display:none} }

/* Order timeline, selection actions and native arrangement entry. */
.metric-blue,.metric-blue .stat-value { color:#2563b5!important; }
.metric-green,.metric-green .stat-value { color:#14804a!important; }
.metric-red,.metric-red .stat-value { color:#d12b35!important; }
.metric-orange,.metric-orange .stat-value { color:#c96b0a!important; }
.metric-pink,.metric-pink .stat-value { color:#d53c87!important; }
.today-divider td { background:#fff6c5!important;border-top:3px solid #e9b927!important;border-bottom:2px solid #e9b927!important;padding:12px 18px!important; }
.today-divider span { color:#765800;font-weight:750;position:sticky;left:18px; }
.today-divider small { color:#8b7323;margin-left:18px; }
.orders-workspace { display:grid;grid-template-columns:minmax(0,1fr);gap:16px;align-items:start; }
.orders-workspace.has-selection { grid-template-columns:minmax(0,1fr) 278px; }
.orders-list-column { min-width:0; }
.selected-order-menu { display:none;position:sticky;top:88px;background:white;border:1px solid var(--line);border-radius:12px;max-height:calc(100vh - 108px);overflow:auto;box-shadow:0 8px 30px #2341340a; }
.has-selection .selected-order-menu { display:block; }
#selected-order-menu { overscroll-behavior-y: contain; }
.selection-heading { padding:17px;display:flex;gap:10px;border-bottom:1px solid var(--line);align-items:start; }
.selection-heading h2 { font-size:16px;line-height:1.5;margin:8px 0; }
.selection-heading p { color:var(--muted);font-size:12px;margin:0; }
.selected-order-menu nav { display:grid;gap:4px;padding:12px; }
.selected-order-menu>.form-hint { padding:0 17px; }
.order-menu-link { display:flex;justify-content:space-between;align-items:center;text-align:left;width:100%;padding:10px 12px;color:var(--ink);background:white;border:0;border-radius:6px;font-size:13px;text-decoration:none; }
.order-menu-link:hover { background:#eef5f1; }
.menu-section-title { font-size:11px;color:#7c8b85;padding:14px 12px 4px; }
.order-select-button { display:block;background:none;border:0;padding:0;color:var(--teal);text-align:left;line-height:1.6;border-radius:0;white-space:normal;overflow-wrap:anywhere; }
.orders-table td:nth-child(2) { min-width:110px;white-space:nowrap; }
.orders-table td:nth-child(3) { min-width:85px; }
.orders-table td:nth-child(4) { min-width:95px; }
.orders-table tr[data-order-row] { cursor:pointer; }
.orders-table tr.selected-order td { background:#e6f2ed;box-shadow:inset 0 1px #c1ddd0,inset 0 -1px #c1ddd0; }
.row-arrangement-link { display:inline-block;font-size:12px;margin-top:5px; }
.order-financial-details { border:1px solid var(--line);border-radius:9px;background:white;margin:16px 0; }
.order-financial-details>summary { padding:13px 17px;font-size:13px;cursor:pointer;color:#557064; }
.order-financial-details .financial-grid { padding:16px; }
.order-financial-details>.section-note { padding:0 16px; }
.order-detail-tabs { position:sticky;top:70px;background:var(--bg);z-index:4;margin-top:12px; }
.arrangement-workbench { overflow:visible; }
.arrangement-workbench>.panel-head p { margin:4px 0 0; }
.arrangement-summary { display:flex;flex-wrap:wrap;gap:14px 26px;padding:15px 20px;background:#f5f8f6;border-top:1px solid var(--line);font-size:13px; }
.arrangement-categories { display:flex;flex-wrap:wrap;gap:7px;padding:15px 18px;border-bottom:1px solid var(--line); }
.arrangement-categories button { padding:7px 12px;font-size:12px; }
.arrangement-categories .active { background:var(--teal);color:white;border-color:var(--teal); }
.arrangement-group { margin:10px 0 24px; }
.arrangement-group h3 { margin:0;font-size:15px; }
.arrangement-table { min-width:1240px; }
.arrangement-table td:nth-child(2) { min-width:160px; }
.arrangement-table td:nth-child(3) { min-width:190px;max-width:310px; }
.arrangement-line-text { white-space:pre-wrap;line-height:1.75;font-size:12px;overflow-wrap:anywhere; }
.arrangement-table .table-actions { min-width:130px; }
.arrangement-table .text-button .number { font-size:13px; }
.table-wrap table:has(.table-actions) td:last-child { position:sticky;right:0;z-index:2;background:white;box-shadow:-5px 0 10px #22392c09;min-width:145px; }
.table-wrap table:has(.table-actions) th:last-child { position:sticky;right:0;z-index:3;background:#f1f6f3; }
.table-wrap table:has(.table-actions) .table-actions { flex-wrap:wrap;min-width:150px;max-width:180px;white-space:normal; }
.arrangement-total-note { padding:0 20px;line-height:1.8; }
.arrangement-chooser { display:grid;grid-template-columns:1fr 1fr;gap:14px; }
dialog.arrangement-dialog { width:min(1060px,96vw); }
.arrangement-dialog h3 { font-size:14px;margin:23px 0 14px; }
.arrangement-dialog h3:first-child { margin-top:0; }
.arrangement-dialog .check-line { margin:14px 0; }
.cost-lines-table { min-width:730px; }
.cost-lines-table td { padding:7px; }
.cost-lines-table input { min-width:60px;padding:8px; }
.cost-lines-table td:first-child { min-width:160px; }
.cost-lines-table td:nth-child(2) { width:100px; }
.cost-lines-table td:nth-last-child(2) { min-width:130px; }
.cost-lines-table button { padding:2px 7px; }
.money-entry { margin-top:18px; }
@media(max-width:1250px) { .orders-workspace.has-selection{grid-template-columns:minmax(0,1fr)}.has-selection .selected-order-menu{position:fixed;right:20px;top:80px;width:285px;z-index:15;box-shadow:0 10px 60px #182b3040}.today-divider small{display:block;margin:4px 0 0}.order-financial-details>summary{line-height:1.8} }
@media(max-width:700px) { .has-selection .selected-order-menu{right:10px;width:min(330px,calc(100vw - 20px))}.arrangement-categories{flex-wrap:nowrap;overflow:auto}.arrangement-categories button{white-space:nowrap}.arrangement-summary{gap:10px}.order-detail-tabs{top:55px}.arrangement-group .panel-head{align-items:center} }

/* Price rows are the same income records used by the finance workflow. */
.order-editor-dialog { width:min(1160px,96vw); }
.order-editor-dialog #field-owner:disabled {
  background: #edf0f2;
  color: #52646a;
  cursor: not-allowed;
  opacity: 1;
}
.price-editor { margin-top:24px;border:1px solid var(--line);border-radius:9px;overflow:hidden; }
.price-editor>.form-hint,.price-editor>.field { margin:12px 18px; }
.price-editor .panel-head h3 { margin:0;font-size:15px; }
.price-lines-table { min-width:960px;table-layout:fixed;width:100%; }
.price-lines-table th:first-child { width:40px; }
.price-lines-table th:nth-child(2) { width:180px; }
.price-lines-table th:nth-child(3) { width:160px; }
.price-lines-table th:nth-child(4) { width:115px; }
.price-lines-table th:nth-child(5) { width:130px; }
.price-lines-table th:nth-child(6) { width:185px; }
.price-lines-table th:last-child { width:145px; }
.price-lines-table input,.price-lines-table select { padding:7px;min-width:0;width:100%;margin:3px 0; }
.price-lines-table input[readonly] { background:#f3f6f4;color:#65746b; }
.price-lines-table .actions { flex-wrap:wrap; }
.price-currency-row { display:flex;align-items:center;gap:6px;font-size:10px; }
.price-currency-row select { flex:0 0 68px; }
.price-currency-row label { min-width:0; }
.price-total { display:flex;align-items:center;justify-content:flex-end;gap:14px;padding:14px 18px;background:#f4f8f5;font-size:13px; }
.price-total strong { color:#2563b5;font-size:20px;font-variant-numeric:tabular-nums; }
.arrangement-note-preview { margin-top:7px;max-width:380px;white-space:normal; }
.arrangement-note-preview summary { cursor:pointer;color:#557064;font-size:12px;line-height:1.6; }
.arrangement-note-preview>div { white-space:pre-wrap;overflow-wrap:anywhere;padding:9px;background:#f4f8f5;border-radius:6px; }
input[type=number] { appearance:textfield;-moz-appearance:textfield; }
input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button { appearance:none;-webkit-appearance:none;margin:0; }

.report-title { margin-bottom: 16px; }
.reports-workspace { min-width: 0; }
.report-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 14px; }
.report-tabs button[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: white; font-weight: 650; }
.report-controls form { padding: 14px 16px; display: grid; gap: 12px; }
.report-dates,.report-filter-fields { display: flex; flex-wrap: wrap; align-items: end; gap: 9px 12px; }
.report-controls .field { flex: 1 1 120px; min-width: 112px; max-width: 250px; margin: 0; }
.report-filter-fields .field { flex: 1 1 138px; }
.report-controls .field > span,.report-chart-controls .field > span { font-size: 12px; font-weight: 500; color: var(--muted); }
.report-date-label { display: block; padding: 8px 10px; background: #f4f7f5; color: #36544b; border-radius: 5px; }
.report-presets,.report-filter-actions,.report-pagination { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.report-filter-actions { border-top: 1px solid var(--line); padding-top: 12px; }
.report-filter-actions .error { color: #aa342e; }
.report-message,.report-pagination,.report-note { color: #506961; font-size: 12px; }
.report-cards {
  container-type: inline-size;
  margin: 14px 0 0;
}
.report-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11.5rem), 1fr));
  gap: 10px;
}
.report-card-group {
  display: contents;
}
@container (48rem <= width < 85rem) {
  .report-card-group {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: inherit;
    gap: inherit;
  }
}
.report-cards .stat {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  padding: 12px 14px;
  min-width: 0;
}
.report-cards .stat-label {
  display: block;
  line-height: 1.4;
}
.report-cards .stat-value {
  margin: 0;
  font-size: 1.125rem;
  font-size: clamp(1.125rem, 11cqi, 1.5625rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.report-cards .stat-value,
.report-cards .stat-value .number {
  white-space: normal;
  overflow-wrap: anywhere;
}
.report-note { margin: 0; padding: 10px 16px; line-height: 1.65; }
.report-basis { padding: 8px 2px; }
.report-panel + .report-panel,.report-comparison + .report-panel { margin-top: 14px; }
.report-panel + #report-details { margin-top: 14px; }
.report-panel .panel-head { padding: 12px 16px; }
.report-panel .panel-head h2 { font-size: 15px; }
.report-empty { margin: 0; padding: 18px; color: #506961; }
.report-data-scroll { overflow: auto; max-height: 390px; }
.report-table { width: 100%; }
.report-table thead { position: sticky; top: 0; z-index: 1; }
.report-table th,.report-table td { padding: 9px 11px; }
.report-table th,.report-table td:not(:first-child) { white-space: nowrap; }
.report-table small { display: block; margin-top: 4px; color: var(--muted); }
.report-table .text-button { text-align: left; }
@media screen {
  .report-table { border-collapse: separate; border-spacing: 0; }
  .report-table thead { z-index: 3; }
  .report-table tr > :first-child {
    position: sticky;
    inset-inline-start: 0;
    box-shadow: 1px 0 var(--line), 3px 0 6px #19354713;
  }
  .report-table th:first-child { z-index: 1; }
  .report-table td:first-child {
    z-index: 2;
    max-inline-size: min(240px, 42vw);
    overflow-wrap: anywhere;
    background: #fff;
  }
  .report-table td:first-child .text-button { text-align: left; white-space: normal; overflow-wrap: anywhere; }
  .report-table tbody tr:hover > :first-child { background: #fbfdf9; }
}
.report-sort { border: 0; padding: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; display: inline-flex; gap: 4px; }
.report-sort span { opacity: .65; }
.report-sort:hover,.report-table th[aria-sort] .report-sort { color: var(--teal); }
.report-table th[aria-sort] span { font-size: 0; }
.report-table th[aria-sort="ascending"] span::after { content: "↑"; font-size: 12px; }
.report-table th[aria-sort="descending"] span::after { content: "↓"; font-size: 12px; }
.report-chart-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 10px 14px; padding: 12px 16px; }
.report-chart-controls .field { flex: 1 1 120px; width: auto; max-width: 228px; margin: 0; }
.report-chart-controls .error { color: #aa342e; }
.report-chart { display: grid; grid-template-columns: max-content minmax(0,1fr); grid-template-rows: 36px 396px 37px; padding: 0 26px 12px 16px; }
.report-chart-unit { grid-column: 1; align-self: start; padding-right: 12px; color: #48635a; font-weight: 650; font-size: 12px; }
.report-chart-axis { grid-column: 1; grid-row: 2; position: relative; min-width: 44px; padding: 0 10px; font-size: 12px; font-variant-numeric: tabular-nums; color: #506961; }
.report-chart-axis span { position: relative; display: block; height: 0; bottom: auto; top: calc(100% - var(--tick)); text-align: right; transform: translateY(-.7em); }
.report-chart-plot,.report-chart-dates { display: grid; grid-template-columns: repeat(var(--point-count),minmax(0,1fr)); min-width: 0; }
.report-chart-plot { position: relative; grid-column: 2; grid-row: 2; border-left: 1px solid #adbfb8; cursor: crosshair; }
.report-chart-gridline { position: absolute; inset-inline: 0; bottom: var(--tick); border-top: 1px solid #e0e8e4; pointer-events: none; }
.report-chart-gridline.zero { border-color: #aebfb8; }
.report-chart-point { position: relative; min-width: 0; }
.report-chart-point i { position: absolute; left: 50%; translate: -50% 0; width: min(66px,80%); bottom: var(--zero); height: var(--bar-size); background: #268176; border-radius: 2px 2px 0 0; }
.report-chart-point.negative i { top: calc(100% - var(--zero)); bottom: auto; border-radius: 0 0 2px 2px; background: #a75744; }
.report-chart-point.no-bar i { display: none; }
.report-chart-point.point-active i { box-shadow: 0 0 0 1px #19594e; background: #126a60; }
.report-chart-point.negative.point-active i { box-shadow: 0 0 0 1px #7a352a; background: #8c4234; }
.report-chart-value { position: absolute; z-index: 1; left: 50%; translate: -50% 0; bottom: calc(var(--endpoint) + 5px); white-space: nowrap; color: #244c44; font-size: 11px; font-weight: 650; font-variant-numeric: tabular-nums; }
.report-chart-point.negative .report-chart-value { bottom: auto; top: calc(100% - var(--endpoint) + 4px); color: #8c4234; }
.report-chart.dense .report-chart-value { display: none; }
.report-chart-dates { grid-column: 2; grid-row: 3; align-items: end; color: #506961; font-size: 11px; text-align: center; }
.report-chart-dates span { min-width: 0; white-space: nowrap; position: relative; }
.report-chart-dates span.omitted { visibility: hidden; }
.report-chart-tooltip { position: absolute; z-index: 2; pointer-events: none; background: #1e3937; color: #fff; padding: 7px 10px; max-width: 100%; border-radius: 5px; font-size: 12px; line-height: 1.45; box-shadow: 0 2px 9px #1e393744; }
.report-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.report-cell-bar {
  background: linear-gradient(to right,var(--metric-fill,#dcefe8) 0 var(--fill),transparent var(--fill))
    center / calc(100% - 6px) 74% no-repeat;
}
.report-cell-bar[data-report-metric="active"] { --metric-fill: #c4e6e0; }
.report-cell-bar[data-report-metric="cancelled"] { --metric-fill: #ead5eb; }
.report-cell-bar:is([data-report-metric="pax"],[data-report-metric="orders"]) { --metric-fill: #f3e4b9; }
.report-cell-bar[data-report-metric="receivable"] { --metric-fill: #cbdffa; }
.report-cell-bar[data-report-metric="received"] { --metric-fill: #ceebcd; }
.report-cell-bar[data-report-metric="unreceived"] { --metric-fill: #f8d6e2; }
.report-cell-bar[data-report-metric="costs"] { --metric-fill: #dbe1ea; }
.report-cell-bar[data-report-metric="profit"] { --metric-fill: #f6ddbf; }
.report-cell-bar[data-report-metric="paid"] { --metric-fill: #cbe9f0; }
.report-cell-bar[data-report-metric="unpaid"] { --metric-fill: #f7d2c7; }
.report-cell-bar:is([data-report-metric="margin"],[data-report-metric="transactions"]) { --metric-fill: #e0d5f6; }
.report-comparison { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 14px; margin: 14px 0; }
.report-comparison .report-panel { margin: 0; }
.report-pie-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  max-width: 740px;
  margin: 0 auto;
  padding: 4px 14px 16px;
}
.report-pie { position: relative; width: 100%; max-width: 350px; aspect-ratio: 1; justify-self: center; }
.report-pie-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.report-pie-wedge {
  stroke: #fff;
  stroke-width: 1.1;
  transform-box: view-box;
  transform-origin: 50% 50%;
  transition: transform 160ms ease;
}
.report-pie-wedge.is-active {
  transform: translate(var(--pie-x), var(--pie-y)) scale(1.055);
  filter: drop-shadow(0 2px 3px #19354728);
}
.report-pie-target { fill: transparent; cursor: pointer; }
.report-pie-target:focus { outline: none; stroke: #fff; stroke-width: 1.5; }
.report-pie-guide { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.report-pie-guide path { fill: none; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.report-pie-label {
  position: absolute;
  transform: translateY(-50%);
  display: grid;
  justify-items: center;
  text-align: center;
  pointer-events: none;
  color: var(--slice-ink);
  line-height: 1.2;
  font-size: 12px;
}
.report-pie-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-pie-label strong { font-variant-numeric: tabular-nums; }
.report-pie-label small { font-size: .92em; }
.report-pie-label.is-active { transform: translate(var(--pie-x), calc(-50% + var(--pie-y))); }
.report-pie-legend {
  min-width: 0;
  display: grid;
  gap: 3px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-variant-numeric: tabular-nums;
}
.report-pie-legend-item {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  grid-template-areas: "swatch name share" ". value value";
  align-items: center;
  gap: 2px 7px;
  padding: 4px 7px;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.25;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
}
.report-pie-legend-item i { grid-area: swatch; width: 9px; height: 9px; border-radius: 2px; background: var(--slice); }
.report-pie-legend-name { grid-area: name; }
.report-pie-share { grid-area: share; }
.report-pie-legend-value { grid-area: value; color: var(--muted); }
.report-pie-legend-value b { color: var(--ink); }
.report-pie-legend-item.is-active {
  background: color-mix(in srgb, var(--slice) 9%, white);
  border-color: var(--slice);
}
@media (max-width: 480px) {
  .report-pie-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: 9px; padding-inline: 7px; }
  .report-pie-label,.report-pie-legend-item { font-size: 11px; }
  .report-pie-legend-item { column-gap: 5px; padding-inline: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .report-pie-wedge { transition: none; }
}
@media(max-width: 1150px) {
  .report-comparison { grid-template-columns: minmax(0,1fr); }
}
@media(max-width: 590px) {
  .report-chart { padding-inline: 8px 17px; }
}
.report-ranking { margin: 0; padding: 14px 16px; display: grid; gap: 7px; list-style: none; }
.report-ranking li { display: grid; grid-template-columns: minmax(88px, 1fr) minmax(36px, 3fr) minmax(36px, auto); align-items: center; gap: 10px; }
.report-ranking li > div { height: 9px; background: #edf2ee; border-radius: 9px; overflow: hidden; }
.report-ranking i { display: block; height: 100%; background: #328176; border-radius: inherit; }
.report-ranking b { text-align: right; font-variant-numeric: tabular-nums; }
.report-pagination { justify-content: flex-end; padding: 10px 14px; border-top: 1px solid var(--line); }
@media (max-width: 680px) {
  .report-card-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); }
  .report-cards .stat { padding: 10px; }
  .report-controls form { padding: 12px; }
  .report-controls .field { max-width: none; }
}

.order-itinerary-sheet table { min-width: 1554px; table-layout: fixed; }
.order-itinerary-sheet th { background: #edf4f1; text-align: center; }
.order-itinerary-sheet td {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  vertical-align: top;
  text-align: center;
  line-height: 1.55;
}
.order-itinerary-sheet td:nth-child(n+6) { text-align: left; }
.order-itinerary-sheet .itinerary-no { width: 72px; }
.order-itinerary-sheet .itinerary-date { width: 112px; }
.order-itinerary-sheet .itinerary-route { width: 220px; }
.order-itinerary-sheet .itinerary-car { width: 140px; }
.order-itinerary-sheet .itinerary-hotel { width: 170px; }
.order-itinerary-sheet .itinerary-itinerary { width: 620px; }
.order-itinerary-sheet .itinerary-note { width: 220px; }
.order-menu-link .contact-missing,
.order-detail-tabs .contact-missing {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: 6px;
  border-radius: 50%;
  background: #fff0d0;
  color: #884800;
  font-size: 11px;
  font-weight: 800;
}

.contact-missing-note {
  display: block;
  margin-top: 3px;
  color: #884800;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
}

.cloud-site-footer { padding: 12px; text-align: center; font-size: 12px; }
.cloud-site-footer a { color: #485b60; }
