:root {
  color-scheme: light;
  --page: #ffffff;
  --sidebar: #ffffff;
  --surface: #ffffff;
  --row: #f6fbf7;
  --row-hover: #edf7f1;
  --ink: #0f2d27;
  --muted: rgba(24, 92, 74, 0.66);
  --faint: rgba(24, 92, 74, 0.12);
  --line: rgba(24, 92, 74, 0.18);
  --gold: #185c4a;
  --green: #185c4a;
  --green-dark: #0f2d27;
  --red: #9f4a44;
  --amber: #9b6b25;
  --teal: #185c4a;
  --shadow: 0 18px 50px rgba(24, 92, 74, 0.12);
}

* {
  box-sizing: border-box;
}

@property --hold-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

body {
  margin: 0;
  min-width: 1040px;
  background: #fff;
  color: var(--ink);
  font: 15px/1.45 "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
  zoom: 0.9;
}

body[data-page="status"] {
  min-width: 0;
  background: #fff;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  zoom: 1;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body[data-page="status"] button,
body[data-page="status"] input,
body[data-page="status"] select,
body[data-page="status"] textarea {
  font: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  margin-left: 0;
  min-height: 100vh;
  padding: 18px 34px 32px 34px;
}

body[data-page="status"] .app-shell {
  min-height: 100dvh;
  padding: 0;
  background: #fff;
}

body[data-page="status"] [hidden] {
  display: none !important;
}

body:not([data-page]) {
  background:
    radial-gradient(circle at top left, rgba(24, 92, 74, 0.08), transparent 34%),
    linear-gradient(180deg, #f7fbf8 0%, #ffffff 30%, #f3f8f4 100%);
}

body:not([data-page]) {
  background: #fff;
  color: #121816;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  zoom: 0.92;
}

body:not([data-page]) .app-shell {
  padding: 18px 26px 30px;
}

body:not([data-page]) .topbar {
  min-height: 64px;
  padding: 8px 10px;
  border-color: rgba(15, 45, 39, 0.1);
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

body:not([data-page]) .tabs {
  border-color: rgba(15, 45, 39, 0.1);
  background: #f6faf6;
  box-shadow: none;
}

body:not([data-page]) .tab {
  min-height: 34px;
  color: rgba(15, 45, 39, 0.52);
  font-weight: 500;
}

body:not([data-page]) .tab.active {
  background: #121816;
  color: #fff;
  box-shadow: none;
}

body:not([data-page]) .toolbar-actions {
  border: 0;
  background: transparent;
  box-shadow: none;
}

body:not([data-page]) .toolbar-actions .text-button,
body:not([data-page]) .toolbar-actions .dark-button {
  min-height: 32px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
}

body:not([data-page]) .toolbar-actions .text-button {
  background: #f4f8f2;
  color: rgba(15, 45, 39, 0.76);
}

body:not([data-page]) .toolbar-actions .text-button:hover {
  background: #e9f1e4;
}

body:not([data-page]) .toolbar-actions .dark-button {
  background: #121816;
  border-color: #121816;
  box-shadow: none;
}

#back-admin-button {
  display: none;
}

body:not([data-page]) .finance-only-action {
  display: none;
}

body.finance-mode:not([data-page]) {
  background: #f7e6a8;
}

body.finance-mode:not([data-page]) .app-shell {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.46), transparent 32%),
    linear-gradient(180deg, #faedbd 0%, #f4dfa0 100%);
}

body.finance-mode:not([data-page]) .topbar,
body.finance-mode:not([data-page]) .filters label,
body.finance-mode:not([data-page]) .filter-total-card,
body.finance-mode:not([data-page]) .list-panel {
  border-color: rgba(58, 43, 10, 0.16);
  background: rgba(255, 251, 226, 0.92);
}

body.finance-mode:not([data-page]) #add-order-button,
body.finance-mode:not([data-page]) #view-registrations-button,
body.finance-mode:not([data-page]) #open-data-button,
body.finance-mode:not([data-page]) #save-data-button,
body.finance-mode:not([data-page]) #import-button,
body.finance-mode:not([data-page]) #sync-rolzo-button,
body.finance-mode:not([data-page]) #finance-button,
body.finance-mode:not([data-page]) #export-button,
body.finance-mode:not([data-page]) .rolzo-sync-status,
body.finance-mode:not([data-page]) .summary-strip,
body.finance-mode:not([data-page]) .detail-panel {
  display: none !important;
}

body.finance-mode:not([data-page]) .finance-only-action {
  display: inline-flex;
}

body.finance-mode:not([data-page]) label:has(#driver-filter) {
  display: none !important;
}

body.finance-mode:not([data-page]) #finance-button.active {
  background: #121816;
  color: #fff;
}

body.finance-mode:not([data-page]) #back-admin-button {
  display: inline-flex;
}

body.finance-mode:not([data-page]) .workspace {
  grid-template-columns: minmax(960px, 1fr);
}

body.finance-mode:not([data-page]) .table-heading h1 {
  color: #121816;
  font-size: 26px;
}

.save-toast {
  position: fixed;
  top: 14px;
  left: 50%;
  z-index: 10000;
  min-width: 220px;
  max-width: min(520px, calc(100vw - 36px));
  transform: translateX(-50%);
  padding: 10px 16px;
  border-radius: 999px;
  background: #121816;
  color: #fff;
  box-shadow: 0 16px 42px rgba(15, 45, 39, 0.18);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.25;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.save-toast:not([hidden]) {
  opacity: 1;
  transform: translate(-50%, 0);
}

.save-toast[data-state="success"] {
  background: #185c4a;
}

.save-toast[data-state="error"] {
  background: #9f4a44;
}

.save-toast[data-state="working"] {
  background: #121816;
}

body.order-log-mode:not([data-page]) .tabs,
body.order-log-mode:not([data-page]) #add-order-button,
body.order-log-mode:not([data-page]) #view-registrations-button,
body.order-log-mode:not([data-page]) #open-data-button,
body.order-log-mode:not([data-page]) #save-data-button,
body.order-log-mode:not([data-page]) #import-button,
body.order-log-mode:not([data-page]) #sync-rolzo-button,
body.order-log-mode:not([data-page]) #finance-button,
body.order-log-mode:not([data-page]) #order-log-button,
body.order-log-mode:not([data-page]) #export-button,
body.order-log-mode:not([data-page]) .rolzo-sync-status,
body.order-log-mode:not([data-page]) .summary-strip,
body.order-log-mode:not([data-page]) .detail-panel,
body.order-log-mode:not([data-page]) .finance-panel,
body.order-log-mode:not([data-page]) .finance-only-action,
body.order-log-mode:not([data-page]) #client-unpaid-total-card,
body.order-log-mode:not([data-page]) #partner-unpaid-total-card {
  display: none !important;
}

body.order-log-mode:not([data-page]) #back-admin-button {
  display: inline-flex;
}

body.order-log-mode:not([data-page]) label:has(#type-filter),
body.order-log-mode:not([data-page]) label:has(#client-payment-filter),
body.order-log-mode:not([data-page]) label:has(#partner-payment-filter),
body.order-log-mode:not([data-page]) label:has(#driver-filter) {
  display: none !important;
}

body.order-log-mode:not([data-page]) .workspace {
  grid-template-columns: minmax(960px, 1fr);
}

body.order-log-mode:not([data-page]) .table-heading h1 {
  color: #121816;
  font-size: 26px;
}

.order-log-table-header,
.order-log-row {
  display: grid;
  grid-template-columns: minmax(132px, 0.75fr) minmax(104px, 0.58fr) minmax(112px, 0.65fr) minmax(112px, 0.65fr) minmax(132px, 0.72fr) minmax(112px, 0.62fr) minmax(360px, 2fr);
  gap: 8px;
  align-items: center;
  width: calc(100% - 24px);
  margin-right: 12px;
  margin-left: 12px;
}

.order-log-table-header {
  min-height: 34px;
  color: rgba(24, 92, 74, 0.54);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.order-log-row {
  min-height: 48px;
  margin-bottom: 6px;
  padding: 0 10px;
  border-radius: 14px;
  background: #f5faf4;
  color: #121816;
  box-shadow: inset 0 0 0 1px rgba(15, 45, 39, 0.06);
  cursor: pointer;
  transition: background 160ms ease, box-shadow 160ms ease;
}

.order-log-row:hover,
.order-log-row.expanded {
  background: #edf7f1;
  box-shadow: inset 0 0 0 1px rgba(24, 92, 74, 0.16);
}

.order-log-row > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.order-log-action {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #121816;
  color: #fff;
  font-size: 12px;
  font-weight: 650;
}

.order-log-expanded {
  display: block;
  width: calc(100% - 24px);
  margin: -2px 12px 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(15, 45, 39, 0.1);
}

.order-log-detail-group + .order-log-detail-group {
  margin-top: 12px;
}

.order-log-detail-group strong {
  display: block;
  margin-bottom: 8px;
  color: #121816;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.order-log-detail-bookings,
.order-log-change-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.order-log-detail-bookings span,
.order-log-change-list span {
  display: inline-flex;
  max-width: 100%;
  padding: 5px 9px;
  border-radius: 999px;
  background: #f5faf4;
  color: #121816;
  font-size: 13px;
  font-weight: 550;
}

.order-log-detail-bookings em {
  margin-left: 4px;
  color: var(--red);
  font-style: normal;
}

.order-log-expanded-empty {
  color: rgba(15, 45, 39, 0.62);
  font-size: 13px;
}

.finance-panel {
  margin-top: 12px;
}

.finance-rates {
  display: grid;
  grid-template-columns: repeat(9, minmax(92px, 1fr));
  gap: 8px;
}

.finance-rates label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 58px;
  padding: 8px 10px;
  border: 1px solid rgba(58, 43, 10, 0.16);
  border-radius: 14px;
  background: rgba(255, 251, 226, 0.88);
  color: rgba(58, 43, 10, 0.62);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.finance-rates input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #121816;
  font-size: 14px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.finance-rate-button {
  min-height: 58px;
  border: 1px solid rgba(58, 43, 10, 0.16);
  border-radius: 14px;
  background: rgba(255, 251, 226, 0.92);
  color: #121816;
  font-size: 12px;
  font-weight: 750;
}

.finance-rate-button.dark {
  background: #121816;
  color: #fff;
}

.finance-rate-button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.finance-rate-status {
  display: flex;
  align-items: center;
  min-height: 58px;
  padding: 8px 10px;
  color: rgba(58, 43, 10, 0.64);
  font-size: 12px;
  font-weight: 650;
}

.finance-rate-status[data-state="success"] {
  color: #0f2d27;
}

.finance-rate-status[data-state="error"] {
  color: var(--red);
}

.finance-totals {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.finance-total-card {
  min-height: 76px;
  padding: 14px 16px;
  border: 1px solid rgba(58, 43, 10, 0.16);
  border-radius: 18px;
  background: rgba(255, 251, 226, 0.92);
}

.finance-total-card span {
  display: block;
  color: rgba(58, 43, 10, 0.58);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.finance-total-card strong {
  display: block;
  margin-top: 6px;
  color: #121816;
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.finance-total-card.profit {
  background: #121816;
}

.finance-total-card.profit span,
.finance-total-card.profit strong {
  color: #fff;
}

.finance-total-card.profit-rate {
  background: rgba(255, 251, 226, 0.96);
}

.finance-table-header,
.finance-row {
  display: grid;
  grid-template-columns: minmax(84px, 0.65fr) minmax(78px, 0.5fr) minmax(88px, 0.58fr) minmax(112px, 0.78fr) minmax(82px, 0.58fr) minmax(104px, 0.72fr) minmax(104px, 0.72fr) minmax(96px, 0.66fr) minmax(104px, 0.72fr) minmax(104px, 0.72fr) minmax(82px, 0.54fr) minmax(72px, 0.48fr) minmax(78px, 0.5fr);
  gap: 8px;
  align-items: center;
  width: calc(100% - 24px);
  margin-right: 12px;
  margin-left: 12px;
}

.finance-table-header {
  min-height: 34px;
  color: rgba(58, 43, 10, 0.52);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.finance-row {
  min-height: 50px;
  margin-bottom: 6px;
  padding: 0 10px;
  border-radius: 14px;
  background: #f5faf4;
  color: #121816;
  box-shadow: inset 0 0 0 1px rgba(15, 45, 39, 0.06);
}

.finance-row.payment-client-paid {
  background: #d8ecd9;
}

.finance-row.payment-both-paid {
  background: #edf4f8;
}

.finance-row.payment-partner-paid {
  background: #fbefed;
}

.finance-row > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.finance-money {
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.finance-money.profit {
  color: #0f2d27;
}

.finance-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  max-width: 100%;
  min-height: 24px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
}

.finance-status.completed {
  padding: 0 10px;
  background: #121816;
  color: #fff;
}

.finance-status.planned {
  color: #0f2d27;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 72px;
  padding: 10px 12px;
  border: 1px solid rgba(24, 92, 74, 0.12);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 40px rgba(24, 92, 74, 0.08);
}

.tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid rgba(24, 92, 74, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 24px rgba(24, 92, 74, 0.06);
}

.tab {
  border: 0;
  background: transparent;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tab.active {
  background: var(--green-dark);
  border-bottom: 0;
  color: #fff;
  box-shadow: 0 10px 20px rgba(15, 45, 39, 0.18);
}

.tab.muted {
  color: rgba(24, 92, 74, 0.5);
}

.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 6px 8px 6px 12px;
  border: 1px solid rgba(24, 92, 74, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 28px rgba(24, 92, 74, 0.08);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.text-button,
.primary-button,
.dark-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid var(--line);
  padding: 0 16px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 400;
  text-decoration: none;
}

.primary-button {
  border-color: var(--green-dark);
  background: var(--green-dark);
  color: #fff;
}

.dark-button {
  border-color: var(--green-dark);
  background: var(--green-dark);
  color: #fff;
}

.danger-button {
  margin-top: 10px;
  border-color: var(--red);
  background: var(--surface);
  color: var(--red);
}

.text-button:hover {
  border-color: rgba(24, 92, 74, 0.38);
  background: #e9f7ed;
}

.toolbar-actions .text-button,
.toolbar-actions .dark-button {
  min-height: 34px;
  border-radius: 999px;
  padding: 0 14px;
}

.toolbar-actions .text-button {
  border-color: transparent;
  background: rgba(24, 92, 74, 0.08);
  font-weight: 600;
}

.toolbar-actions .text-button:hover {
  border-color: transparent;
  background: rgba(24, 92, 74, 0.14);
}

.toolbar-actions .dark-button {
  box-shadow: 0 10px 18px rgba(15, 45, 39, 0.18);
}

.rolzo-sync-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  max-width: 280px;
  border-radius: 999px;
  color: rgba(24, 92, 74, 0.74);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
}

.rolzo-sync-status[data-state="working"] {
  color: #6f5b16;
}

.rolzo-sync-status[data-state="success"] {
  color: var(--green-dark);
}

.rolzo-sync-status[data-state="error"] {
  color: var(--red);
}

.filters {
  display: grid;
  grid-template-columns: minmax(280px, 2.2fr) repeat(4, minmax(128px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.filters label,
.filter-total-card {
  position: relative;
  display: flex;
  align-items: center;
  height: 48px;
  border: 1px solid rgba(24, 92, 74, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  color: rgba(24, 92, 74, 0.62);
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(24, 92, 74, 0.05);
}

.filters label > span,
.filter-total-card > span {
  padding-left: 13px;
  color: rgba(24, 92, 74, 0.62);
  font-size: 14px;
  white-space: nowrap;
}

.filter-total-card {
  justify-content: space-between;
  gap: 10px;
  padding-right: 14px;
}

.filter-total-card[hidden] {
  display: none;
}

.filter-total-card strong {
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.filters input,
.filters select {
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  padding: 0 14px;
}

.search-field {
  gap: 6px;
}

.search-field input::placeholder {
  color: rgba(24, 92, 74, 0.38);
}

body:not([data-page]) .filters {
  gap: 8px;
  margin-top: 12px;
}

body:not([data-page]) .filters label,
body:not([data-page]) .filter-total-card {
  height: 44px;
  border-color: rgba(15, 45, 39, 0.1);
  border-radius: 0;
  background: #f8fbf7;
  box-shadow: none;
}

body:not([data-page]) .filters label > span,
body:not([data-page]) .filter-total-card > span {
  color: rgba(15, 45, 39, 0.5);
  font-size: 12px;
  font-weight: 500;
}

body:not([data-page]) .filters input,
body:not([data-page]) .filters select {
  font-size: 14px;
}

body:not([data-page]) .filter-total-card strong {
  font-size: 16px;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(132px, 1fr)) minmax(190px, 1.2fr) minmax(78px, 0.5fr) minmax(92px, 0.6fr);
  gap: 10px;
  margin-top: 14px;
}

.summary-strip div {
  min-height: 68px;
  border: 1px solid rgba(24, 92, 74, 0.12);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(248, 252, 249, 0.98), rgba(255, 255, 255, 0.98));
  padding: 12px 14px;
  box-shadow: 0 12px 24px rgba(24, 92, 74, 0.06);
}

.summary-strip span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.25;
  text-transform: uppercase;
}

.summary-strip strong {
  display: block;
  margin-top: 7px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.summary-strip strong.urgent-summary {
  color: var(--red);
  font-weight: 600;
}

.summary-strip strong.urgent-summary span {
  color: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.28;
}

.summary-strip .time-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 0;
  border: 0;
  padding: 0;
  background: transparent;
}

body:not([data-page]) .summary-strip {
  gap: 8px;
  margin-top: 10px;
}

body:not([data-page]) .summary-strip div {
  min-height: 60px;
  border-color: rgba(15, 45, 39, 0.1);
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

body:not([data-page]) .summary-strip span {
  color: rgba(15, 45, 39, 0.42);
  font-size: 10px;
  font-weight: 500;
}

body:not([data-page]) .summary-strip strong {
  margin-top: 5px;
  color: #121816;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: -0.04em;
}

body:not([data-page]) .summary-strip strong.urgent-summary {
  color: var(--red);
  font-size: 22px;
  font-weight: 650;
  line-height: 1.14;
}

body:not([data-page]) .summary-strip strong.urgent-summary span {
  color: inherit;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.22;
  text-transform: none;
}

body:not([data-page]) .summary-strip strong.urgent-summary span + span {
  margin-top: 2px;
}

body:not([data-page]) .summary-strip .time-row {
  background: transparent;
}

body:not([data-page]) .mini-clock {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
  background: #fff;
}

.mini-clock {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 1px solid rgba(24, 92, 74, 0.26);
  border-radius: 50%;
  background: #f9fff9;
}

.mini-clock::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2.5px;
  height: 2.5px;
  border-radius: 50%;
  background: var(--ink);
  transform: translate(-50%, -50%);
}

.mini-clock b {
  position: absolute;
  color: rgba(24, 92, 74, 0.66);
  font-size: 6px;
  font-weight: 400;
  line-height: 1;
  transform: translate(-50%, -50%);
}

.mini-clock .mark-xii {
  left: 50%;
  top: 4px;
}

.mini-clock .mark-iii {
  left: calc(100% - 4px);
  top: 50%;
}

.mini-clock .mark-vi {
  left: 50%;
  top: calc(100% - 4px);
}

.mini-clock .mark-ix {
  left: 4px;
  top: 50%;
}

.mini-clock i {
  position: absolute;
  left: 50%;
  bottom: 50%;
  display: block;
  width: 1px;
  transform-origin: 50% 100%;
  background: var(--ink);
}

.mini-clock .hour-hand {
  height: 8.5px;
  transform: translateX(-50%) rotate(var(--hour-angle, 0deg));
}

.mini-clock .minute-hand {
  height: 12.5px;
  transform: translateX(-50%) rotate(var(--minute-angle, 0deg));
}

#data-file-status {
  grid-column: 2 / 4;
  min-height: 18px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 400;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(760px, 1fr) minmax(480px, 560px);
  gap: 16px;
  align-items: start;
  margin-top: 16px;
}

.list-panel,
.detail-panel {
  border: 1px solid rgba(24, 92, 74, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 50px rgba(24, 92, 74, 0.08);
  overflow: hidden;
}

.table-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 18px 20px 14px;
}

.table-heading h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.table-heading span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.date-group {
  border-top: 1px solid var(--line);
}

.date-heading {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 16px 20px 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bucket-label.important {
  color: var(--ink);
  font-weight: 800;
}

.finance-month-button {
  width: fit-content;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  letter-spacing: inherit;
  padding: 0;
  text-align: left;
  text-transform: inherit;
}

.finance-month-button:hover,
.finance-month-button:focus-visible {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.order-row,
.table-header {
  display: grid;
  grid-template-columns: 28px 96px 96px 54px 62px 100px 74px 74px 94px 76px 108px 58px 76px 86px 72px max-content 82px;
  column-gap: 5px;
  row-gap: 0;
  align-items: center;
  margin: 0 16px 6px;
  padding: 0 14px;
}

.table-header {
  min-height: 34px;
  color: rgba(24, 92, 74, 0.54);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bulk-payment-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 16px 10px;
  padding: 9px 12px;
  border-radius: 14px;
  background: rgba(237, 247, 241, 0.92);
  box-shadow: inset 0 0 0 1px rgba(24, 92, 74, 0.08);
}

.bulk-payment-bar[hidden] {
  display: none;
}

.bulk-payment-bar strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.bulk-payment-bar label {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.bulk-payment-bar select {
  min-height: 28px;
  border: 1px solid rgba(24, 92, 74, 0.14);
  border-radius: 10px;
  padding: 0 28px 0 10px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  font: inherit;
}

.bulk-payment-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.bulk-payment-status[data-state="error"] {
  color: var(--red);
}

.bulk-payment-status[data-state="success"] {
  color: var(--green-dark);
}

.bulk-select-heading {
  text-align: center;
}

.bulk-select-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.bulk-select-cell input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--green-dark);
}

.order-row.bulk-selected {
  box-shadow: inset 0 0 0 1px rgba(177, 147, 85, 0.28);
}

.order-row {
  min-height: 54px;
  border: 0;
  border-radius: 16px;
  width: calc(100% - 32px);
  background: rgba(246, 251, 247, 0.96);
  text-align: left;
  user-select: none;
  box-shadow: inset 0 0 0 1px rgba(24, 92, 74, 0.06);
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.order-row:hover {
  background: rgba(237, 247, 241, 0.98);
  box-shadow: 0 10px 22px rgba(24, 92, 74, 0.08);
  transform: translateY(-1px);
}

.order-row.payment-client-paid {
  background: rgba(209, 232, 213, 0.98);
}

.order-row.payment-client-paid:hover {
  background: rgba(195, 222, 201, 0.98);
}

.order-row.payment-both-paid {
  background: #edf4f8;
}

.order-row.payment-both-paid:hover {
  background: #e2eef4;
}

.order-row.payment-partner-paid {
  background: rgba(248, 232, 229, 0.98);
}

.order-row.payment-partner-paid:hover {
  background: rgba(243, 222, 218, 0.98);
}

.order-row.selected {
  background: var(--row-hover);
  outline: 1px solid rgba(24, 92, 74, 0.28);
  box-shadow: 0 12px 26px rgba(24, 92, 74, 0.1);
}

.order-row.payment-client-paid.selected {
  background: rgba(190, 220, 198, 0.98);
}

.order-row.payment-both-paid.selected {
  background: #dcebf3;
}

.order-row.payment-partner-paid.selected {
  background: rgba(242, 219, 214, 0.98);
}

.booking-number {
  color: var(--gold);
  font-weight: 500;
  cursor: pointer;
  user-select: text;
}

.booking-number:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cell-main {
  display: block;
  color: var(--ink);
  font-size: 15.5px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: text;
  user-select: text;
}

.cell-sub {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: text;
  user-select: text;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 70px;
  min-height: 25px;
  padding: 0 8px;
  background: var(--green);
  color: #fff;
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
}

.badge.red {
  background: var(--red);
}

.badge.amber {
  background: var(--amber);
}

.countdown {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
  font-size: 15.5px;
  font-weight: 500;
  white-space: nowrap;
  cursor: text;
  user-select: text;
}

.countdown.urgent {
  color: var(--red);
  font-weight: 600;
}

.assigned-cell {
  min-width: 0;
}

.driver-status-cell {
  display: block;
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.price-cell {
  font-variant-numeric: tabular-nums;
}

.assigned-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.assigned-status.yes {
  background: var(--green-dark);
  color: #fff;
}

.assigned-status.no {
  color: var(--red);
}

.pickup-cell {
  min-height: 20px;
  font-size: 15.5px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: text;
  user-select: text;
}

body:not([data-page]) .workspace {
  grid-template-columns: minmax(800px, 1fr) minmax(440px, 520px);
  gap: 12px;
  margin-top: 12px;
}

body:not([data-page]) .list-panel,
body:not([data-page]) .detail-panel {
  border-color: rgba(15, 45, 39, 0.1);
  border-radius: 18px;
  background: #fff;
  box-shadow: none;
}

body:not([data-page]) .table-heading {
  padding: 16px 18px 12px;
}

body:not([data-page]) .table-heading h1 {
  color: #121816;
  font-size: 24px;
  font-weight: 300;
  letter-spacing: -0.055em;
}

body:not([data-page]) .table-heading span {
  color: rgba(15, 45, 39, 0.38);
  font-weight: 500;
}

body:not([data-page]) .date-group {
  border-top-color: rgba(15, 45, 39, 0.08);
}

body:not([data-page]) .date-heading {
  padding: 14px 18px 8px;
  color: rgba(15, 45, 39, 0.48);
  font-size: 11px;
  font-weight: 500;
}

body:not([data-page]) .order-row,
body:not([data-page]) .table-header {
  margin-right: 12px;
  margin-left: 12px;
}

body:not([data-page]) .table-header {
  min-height: 30px;
  color: rgba(15, 45, 39, 0.42);
  font-weight: 500;
}

body:not([data-page]) .order-row {
  min-height: 50px;
  width: calc(100% - 24px);
  margin-bottom: 5px;
  border-radius: 14px;
  background: #f5faf4;
  box-shadow: inset 0 0 0 1px rgba(15, 45, 39, 0.06);
  transition: background 120ms ease, box-shadow 120ms ease;
}

body:not([data-page]) .order-row:hover {
  background: #eef6ed;
  box-shadow: inset 0 0 0 1px rgba(15, 45, 39, 0.12);
  transform: none;
}

body:not([data-page]) .order-row.selected {
  background: #e8f1e6;
  outline: 0;
  box-shadow: inset 0 0 0 1px rgba(15, 45, 39, 0.16);
}

body:not([data-page]) .booking-number {
  color: #121816;
  font-weight: 500;
}

body:not([data-page]) .cell-main,
body:not([data-page]) .pickup-cell,
body:not([data-page]) .countdown {
  font-size: 15px;
  font-weight: 400;
}

body:not([data-page]) .cell-sub {
  color: rgba(15, 45, 39, 0.5);
  font-size: 12.5px;
  font-weight: 300;
}

body:not([data-page]) .badge,
body:not([data-page]) .assigned-status {
  border-radius: 8px;
  font-weight: 500;
}

body:not([data-page]) .assigned-status.yes {
  background: #121816;
}

body:not([data-page]) .order-row.payment-client-paid {
  background: #d8ecd9;
}

body:not([data-page]) .order-row.payment-client-paid:hover {
  background: #c9e2cb;
}

body:not([data-page]) .order-row.payment-both-paid {
  background: #edf4f8;
}

body:not([data-page]) .order-row.payment-both-paid:hover {
  background: #e2eef4;
}

body:not([data-page]) .order-row.payment-partner-paid {
  background: #fbefed;
}

body:not([data-page]) .order-row.payment-partner-paid:hover {
  background: #f7e5e1;
}

.open-link {
  color: var(--teal);
  text-decoration: none;
}

.open-link:hover {
  text-decoration: underline;
}

.linked-cell {
  color: var(--teal);
  text-decoration: none;
}

.linked-cell:hover {
  text-decoration: underline;
}

.detail-page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 28px 28px;
}

.detail-page .detail-panel {
  position: static;
  max-height: none;
}

.driver-page {
  width: min(520px, 100%);
  margin: 0 auto;
  padding: 0;
  background: #fff;
}

.driver-card {
  border: 0;
  background: #fff;
  padding: 42px 34px 34px;
  box-shadow: none;
}

.driver-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.driver-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  color: rgba(15, 45, 39, 0.36);
  font-size: 15px;
}

.driver-current-status {
  display: grid;
  gap: 3px;
  justify-items: end;
  text-align: right;
}

.driver-top strong {
  color: rgba(15, 45, 39, 0.42);
  font-weight: 400;
}

.driver-current-status small {
  color: rgba(24, 92, 74, 0.62);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.driver-countdown {
  display: inline-block;
  margin: 0;
  color: rgba(24, 92, 74, 0.72);
  font-style: normal;
  font-size: clamp(15px, 3.8vw, 18px);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.16;
  text-transform: none;
  text-align: left;
  white-space: nowrap;
}

.driver-countdown.urgent {
  color: var(--red);
  font-weight: 300;
}

.driver-card h1,
.driver-trip-date {
  margin: 0;
  color: #121816;
  font-size: clamp(30px, 7.6vw, 40px);
  font-weight: 300;
  letter-spacing: -0.055em;
  line-height: 1.12;
}

.driver-trip-date {
  margin-top: 26px;
  max-width: none;
  font-size: clamp(17px, 4.35vw, 24px);
  line-height: 1.08;
  white-space: nowrap;
}

.driver-trip-date span {
  display: inline;
}

.driver-trip-date span + span::before {
  content: ", ";
}

.driver-vehicle-subtitle {
  margin-top: 12px;
  color: rgba(24, 92, 74, 0.72);
  font-size: clamp(15px, 3.8vw, 18px);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.driver-passenger-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.driver-card p {
  margin: 0;
  color: rgba(24, 92, 74, 0.68);
}

.driver-subtitle {
  color: rgba(15, 45, 39, 0.56);
  font-size: clamp(15px, 3.8vw, 18px);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.16;
}

.driver-flight-subtitle {
  margin-top: 3px;
}

.driver-date-subtitle {
  margin-top: 82px;
}

.driver-passenger-block {
  margin-top: 28px;
}

.driver-passenger-block span {
  display: block;
  color: rgba(15, 45, 39, 0.56);
  font-size: clamp(15px, 3.8vw, 18px);
  font-weight: 300;
  letter-spacing: -0.02em;
}

.driver-passenger-block strong {
  display: block;
  margin-top: 2px;
  color: #121816;
  font-size: clamp(15px, 3.8vw, 18px);
  font-weight: 300;
  letter-spacing: -0.02em;
}

.driver-flight-label {
  display: block;
  margin-top: 22px;
  color: rgba(15, 45, 39, 0.56);
  font-size: clamp(15px, 3.8vw, 18px);
  font-weight: 300;
  letter-spacing: -0.02em;
}

.driver-passenger-block .driver-flight-value {
  margin-top: 2px;
  display: inline-block;
  white-space: nowrap;
}

.driver-inline-link {
  color: #121816;
  text-decoration: none;
}

.driver-inline-link:hover,
.driver-inline-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

.driver-route-link {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  color: #121816;
  font-size: clamp(15px, 3.8vw, 18px);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.36;
}

.driver-route-line {
  --route-line-height: calc(100% - 30px);
  --route-line-top: 14px;
  position: relative;
  display: grid;
  gap: 28px;
  margin-top: 36px;
  padding-left: 36px;
}

.driver-route-line::before {
  content: "";
  position: absolute;
  left: 10px;
  top: var(--route-line-top);
  width: 2px;
  height: var(--route-line-height);
  background: #d5d9d8;
}

.driver-route-line div {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 28px;
}

.driver-route-line div::before {
  content: "";
  position: absolute;
  z-index: 1;
  left: -34px;
  top: 50%;
  width: 12px;
  height: 12px;
  border: 3px solid #cfd5d3;
  border-radius: 50%;
  background: #fff;
  transform: translateY(-50%);
}

.driver-route-line div:last-child::before {
  left: -34px;
  width: 12px;
  height: 12px;
  border: 3px solid #111;
  background: #fff;
  clip-path: none;
}

.driver-route-line strong {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  color: #121816;
  font-size: clamp(15px, 3.8vw, 18px);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.36;
}

.driver-status-panel {
  margin-top: 58px;
  padding: 0;
  border: 0;
  background: transparent;
}

.driver-status-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 26px;
  color: rgba(15, 45, 39, 0.48);
  font-size: 15px;
}

.driver-status-header strong {
  color: var(--green-dark);
  font-size: 14px;
  font-weight: 600;
  text-align: right;
}

.driver-primary-info {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.driver-primary-info div {
  border: 1px solid rgba(24, 92, 74, 0.14);
  background: rgba(232, 247, 236, 0.68);
  padding: 12px;
}

.driver-primary-info span,
.driver-details-heading span {
  display: block;
  color: rgba(24, 92, 74, 0.62);
  font-size: 12px;
}

.driver-primary-info strong {
  display: block;
  margin-top: 6px;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
  font-weight: 500;
}

.driver-secondary-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.driver-details-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-top: 26px;
}

.driver-details-heading h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
}

.driver-sections {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.driver-section {
  border: 1px solid rgba(24, 92, 74, 0.14);
  padding: 14px;
  background: rgba(249, 255, 249, 0.78);
}

.driver-section h2 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
}

.driver-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  min-height: 38px;
  align-items: center;
  padding: 8px 10px;
  background: rgba(232, 247, 236, 0.56);
  margin-bottom: 6px;
}

.driver-row span {
  color: rgba(24, 92, 74, 0.62);
}

.driver-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 500;
}

.driver-actions {
  --status-dot-size: clamp(36px, 10.6vw, 48px);
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 0 auto;
  padding: 0;
}

.driver-actions::before,
.driver-actions::after {
  display: none;
}

.driver-status-button {
  --status-ring-color: #d3d8d7;
  --status-ring-track: transparent;
  --status-ring-progress: transparent;
  --hold-angle: 0deg;
  display: grid;
  position: relative;
  z-index: 1;
  justify-items: center;
  align-content: start;
  gap: 8px;
  min-height: 92px;
  border: 0;
  border-radius: 24px;
  padding: 10px 4px 8px;
  background: transparent;
  color: #121816;
  cursor: pointer;
  font: inherit;
  text-align: center;
  touch-action: manipulation;
  transition: transform 180ms ease;
}

.driver-status-button::before {
  content: "";
  position: absolute;
  top: calc(10px + (var(--status-dot-size) / 2) - 0.5px);
  left: calc(-50% + (var(--status-dot-size) / 2));
  z-index: -1;
  display: none;
  width: calc(100% - var(--status-dot-size));
  height: 1px;
  border-radius: 999px;
  background: rgba(15, 45, 39, 0.13);
  pointer-events: none;
}

.driver-status-button[data-step-index="1"]::before,
.driver-status-button[data-step-index="2"]::before,
.driver-status-button[data-step-index="3"]::before {
  display: block;
}

.driver-actions[data-step="1"] .driver-status-button[data-step-index="1"]::before,
.driver-actions[data-step="2"] .driver-status-button[data-step-index="1"]::before,
.driver-actions[data-step="2"] .driver-status-button[data-step-index="2"]::before,
.driver-actions[data-step="3"] .driver-status-button[data-step-index="1"]::before,
.driver-actions[data-step="3"] .driver-status-button[data-step-index="2"]::before,
.driver-actions[data-step="3"] .driver-status-button[data-step-index="3"]::before,
.driver-actions[data-step="4"] .driver-status-button[data-step-index="1"]::before,
.driver-actions[data-step="4"] .driver-status-button[data-step-index="2"]::before,
.driver-actions[data-step="4"] .driver-status-button[data-step-index="3"]::before {
  background: rgba(15, 45, 39, 0.34);
}

.driver-status-button:disabled {
  cursor: default;
}

.driver-status-button:disabled:not(.completed) {
  opacity: 0.52;
}

.driver-status-button span {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: var(--status-dot-size);
  height: var(--status-dot-size);
  border: 0;
  border-radius: 50%;
  background: conic-gradient(var(--status-ring-progress) var(--hold-angle), var(--status-ring-track) 0deg), var(--status-ring-color);
  color: transparent;
  font-size: 0;
  transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.driver-status-button span::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: #fff;
  opacity: 0;
}

.driver-status-button span::after {
  content: "";
  position: absolute;
  width: 13px;
  height: 8px;
  border-left: 2.5px solid transparent;
  border-bottom: 2.5px solid transparent;
  transform: translateY(-1px) rotate(-45deg);
  opacity: 0;
}

.driver-status-button strong {
  max-width: 88px;
  color: rgba(15, 45, 39, 0.82);
  font-size: clamp(12px, 3vw, 15px);
  font-weight: 300;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.driver-status-button small {
  color: rgba(15, 45, 39, 0.5);
  font-size: 13px;
  line-height: 1.35;
}

.driver-status-button.completed {
  --status-ring-color: #fff;
  color: #121816;
}

.driver-status-button.completed span {
  background: var(--green-dark);
  color: transparent;
}

.driver-status-button.completed span::after {
  border-color: #fff;
  opacity: 1;
}

.driver-status-button.completed strong,
.driver-status-button.completed small {
  color: #121816;
}

.driver-status-button.active:not(.completed) {
  background: transparent;
}

.driver-status-button.next {
  --status-ring-color: #b9ff5a;
}

.driver-status-button.next span {
  box-shadow: 0 0 18px rgba(185, 255, 90, 0.88);
  animation: nextStatusPulse 1.55s ease-in-out infinite;
}

.driver-status-button.next strong {
  color: var(--green-dark);
  font-weight: 500;
}

.driver-status-button.next.holding {
  --status-ring-track: rgba(15, 45, 39, 0.18);
  --status-ring-progress: var(--green-dark);
  --hold-angle: 0deg;
  animation: none;
}

.driver-status-button.next.holding span {
  transform: scale(0.96);
  animation: holdStatusRing 0.3s linear forwards;
}

.driver-status-button.next.holding span::before {
  opacity: 1;
}

.driver-status-button.next.confirming {
  --status-ring-color: #fff;
  box-shadow: none;
  animation: none;
}

.driver-status-button.next.confirming strong {
  color: var(--green-dark);
}

.driver-status-button.next.confirming span {
  background: var(--green-dark);
  box-shadow: none;
}

.driver-status-button.next.confirming span::after {
  border-color: #fff;
  opacity: 1;
}

.driver-status-button.next.rejected {
  --status-ring-color: #ffe9e9;
}

.driver-status-button.next.rejected span {
  background: #ffe9e9;
  box-shadow: 0 0 0 1px rgba(191, 47, 47, 0.34);
  animation: rejectStatusShake 220ms ease-in-out 2;
}

.driver-status-button.next.rejected span::before,
.driver-status-button.next.rejected span::after {
  opacity: 0;
}

.driver-status-button.next.rejected strong {
  color: #bf2f2f;
}

@keyframes nextStatusPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(185, 255, 90, 0.58), 0 0 18px rgba(185, 255, 90, 0.28);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(185, 255, 90, 0.08), 0 0 34px rgba(185, 255, 90, 0.62);
  }
}

@keyframes rejectStatusShake {
  0%, 100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(3px);
  }
}

@keyframes holdStatusRing {
  from { --hold-angle: 0deg; }
  to { --hold-angle: 360deg; }
}

.driver-message {
  min-height: 20px;
  margin-top: 18px;
  color: rgba(15, 45, 39, 0.56);
  text-align: center;
}

.driver-message.error {
  color: #bf2f2f;
}

.driver-name-board-button {
  display: inline-grid;
  place-items: center;
  width: auto;
  min-height: 30px;
  margin-top: 8px;
  border: 1px solid rgba(24, 92, 74, 0.14);
  border-radius: 0;
  background: rgba(232, 247, 236, 0.56);
  color: var(--green-dark);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  padding: 0 14px;
  text-align: center;
}

.address {
  min-width: 0;
}

@media (max-width: 760px) {
  body {
    min-width: 0;
  }

  body[data-page="status"] .app-shell {
    padding: 0;
  }

  .driver-page {
    padding-bottom: 24px;
  }

  .driver-card {
    min-height: 100dvh;
    border: 0;
    padding: 18px 14px 22px;
    box-shadow: none;
  }

  .driver-top {
    align-items: flex-start;
    font-size: 12px;
  }

  .driver-current-status strong {
    font-size: 13px;
  }

  .driver-card h1 {
    margin-top: 18px;
  }

  .driver-trip-date {
    margin-top: 18px;
  }

  .driver-primary-info {
    grid-template-columns: 1fr;
  }

  .driver-status-panel {
    margin-top: 58px;
  }

  .driver-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
  }

  .driver-status-button {
    min-height: 112px;
    padding-inline: 2px;
  }

  .driver-status-button strong {
    max-width: 72px;
    font-size: 12px;
  }

  .driver-secondary-actions {
    position: sticky;
    bottom: 0;
    z-index: 4;
    justify-content: stretch;
    margin: 18px -14px 0;
    padding: 10px 14px;
    background: rgba(249, 255, 249, 0.92);
    backdrop-filter: blur(12px);
  }

  .driver-secondary-actions .dark-button {
    width: 100%;
  }

  .driver-details-heading {
    align-items: start;
    flex-direction: column;
  }
}

.detail-panel {
  position: sticky;
  top: 18px;
  max-height: calc(100vh - 36px);
  overflow: auto;
  box-shadow: 0 18px 50px rgba(24, 92, 74, 0.08);
}

.detail-empty {
  padding: 24px;
  color: var(--muted);
  font-weight: 400;
}

body[data-page="portal"] {
  min-width: 980px;
  background:
    radial-gradient(circle at top left, rgba(24, 92, 74, 0.08), transparent 32%),
    linear-gradient(180deg, #f7fbf8 0%, #ffffff 28%, #f3f8f4 100%);
}

.portal-shell {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 18px 34px 34px;
}

.portal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
}

.portal-topbar .text-button {
  flex: 0 0 auto;
  min-height: 34px;
  border-color: transparent;
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(24, 92, 74, 0.08);
  color: var(--green-dark);
  font-weight: 600;
}

.portal-topbar .text-button:hover {
  border-color: transparent;
  background: rgba(24, 92, 74, 0.14);
}

.portal-mobile-account-title {
  display: none;
}

.portal-topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 6px 8px 6px 14px;
  border: 1px solid rgba(24, 92, 74, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 28px rgba(24, 92, 74, 0.08);
}

.portal-account-chip {
  min-width: 0;
  padding: 0;
  text-align: left;
}

.portal-account-chip strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.15;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-account-chip small {
  display: block;
  margin-top: 2px;
  color: rgba(24, 92, 74, 0.62);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.1;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  border: 1px solid rgba(24, 92, 74, 0.1);
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(244, 250, 245, 0.94), rgba(255, 255, 255, 0.98));
  padding: 22px 24px;
  box-shadow: 0 16px 40px rgba(24, 92, 74, 0.08);
  position: relative;
  overflow: hidden;
}

.portal-hero::after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -110px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(24, 92, 74, 0.14), transparent 70%);
  pointer-events: none;
}

.portal-eyebrow {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.portal-hero h1 {
  margin: 0;
  color: var(--ink);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.portal-hero p,
.portal-note {
  margin: 0;
  color: var(--muted);
  max-width: 700px;
  font-size: 15px;
  line-height: 1.55;
}

.portal-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin-top: 14px;
}

body[data-portal-role="partner"] .portal-toolbar {
  grid-template-columns: minmax(280px, 1fr) minmax(150px, 190px) minmax(150px, 190px);
}

.portal-toolbar label {
  position: relative;
  display: flex;
  align-items: center;
  height: 50px;
  border: 1px solid rgba(24, 92, 74, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--muted);
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(24, 92, 74, 0.06);
}

.portal-toolbar label > span {
  padding-left: 14px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.portal-toolbar input,
.portal-toolbar select {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  padding: 0 14px;
  font-size: 14px;
}

.portal-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid rgba(24, 92, 74, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 28px rgba(24, 92, 74, 0.08);
}

.portal-tab {
  cursor: pointer;
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.portal-tab.active {
  background: var(--green-dark);
  color: #fff;
  box-shadow: 0 10px 20px rgba(15, 45, 39, 0.18);
}

.portal-tab.muted {
  background: transparent;
  color: rgba(24, 92, 74, 0.52);
}

.portal-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 14px;
}

body[data-portal-role="partner"] .portal-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.portal-summary div {
  min-height: 80px;
  border: 1px solid rgba(24, 92, 74, 0.12);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(248, 252, 249, 0.96), rgba(255, 255, 255, 0.96));
  padding: 16px 18px;
  box-shadow: 0 14px 30px rgba(24, 92, 74, 0.06);
  position: relative;
  overflow: hidden;
}

.portal-summary div::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, rgba(24, 92, 74, 0.8), rgba(24, 92, 74, 0.15));
}

.portal-summary span,
.portal-list-heading {
  display: block;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.portal-summary strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.portal-summary strong.urgent-summary {
  color: var(--red);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.12;
}

body[data-portal-role="partner"] #portal-next {
  color: #121816;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: -0.04em;
}

body[data-portal-role="partner"] #portal-next.urgent-summary {
  color: var(--red);
  font-size: 22px;
  font-weight: 650;
  line-height: 1.14;
}

body[data-portal-role="partner"] #portal-next.urgent-summary span {
  display: block;
  color: inherit;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.22;
}

.portal-layout {
  display: grid;
  grid-template-columns: minmax(900px, 1fr) minmax(420px, 500px);
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}

.portal-layout > div,
.portal-detail {
  border: 1px solid rgba(24, 92, 74, 0.12);
  border-radius: 18px;
  background: #fff;
  box-shadow: none;
  overflow: hidden;
}

.portal-list-heading {
  border: 0;
  border-bottom: 0;
  background: #fff;
  padding: 14px 18px 12px;
}

.portal-orders {
  display: grid;
  padding: 10px 0 12px;
}

.portal-date-group {
  border-top: 1px solid var(--line);
}

.portal-date-group:first-child {
  border-top: 0;
}

.portal-table-header,
.portal-order {
  display: grid;
  grid-template-columns: 88px 88px 48px 56px minmax(132px, 180px) 128px 76px 76px 96px 96px 58px minmax(72px, 1fr) 82px;
  column-gap: 3px;
  row-gap: 0;
  align-items: center;
  margin: 0 16px 6px;
  min-width: 0;
  padding: 0 10px;
}

body[data-portal-role="partner"] .portal-table-header,
body[data-portal-role="partner"] .portal-order {
  grid-template-columns: 88px 88px 48px 56px minmax(120px, 170px) 118px 72px 72px 92px 88px 58px minmax(64px, 0.75fr) minmax(132px, max-content);
}

.portal-table-header {
  min-height: 30px;
  color: rgba(15, 45, 39, 0.42);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portal-order.order-row {
  width: calc(100% - 32px);
  min-height: 50px;
  border-radius: 14px;
  background: #f5faf4;
  box-shadow: inset 0 0 0 1px rgba(15, 45, 39, 0.06);
  transition: background 120ms ease, box-shadow 120ms ease;
}

.portal-order.order-row:hover {
  transform: none;
  background: #eef6ed;
  box-shadow: inset 0 0 0 1px rgba(15, 45, 39, 0.12);
}

.portal-order.selected {
  background: #e8f1e6;
  outline: 0;
  box-shadow: inset 0 0 0 1px rgba(15, 45, 39, 0.16);
}

.portal-order.portal-payment-paid {
  background: #edf4f8;
}

.portal-order.portal-payment-paid:hover {
  background: #e2eef4;
}

.portal-order.portal-payment-paid.selected {
  background: #dcebf3;
}

.portal-order span,
.portal-order .cell-main,
.portal-order .cell-sub {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-portal-role="partner"] .portal-table-header .portal-price-cell,
body[data-portal-role="partner"] .portal-order .portal-price-cell {
  justify-self: end;
  text-align: right;
}

body[data-portal-role="partner"] .portal-order .portal-price-cell {
  min-width: max-content;
  overflow: visible;
  text-overflow: clip;
}

.portal-mobile-summary {
  display: none;
}

.portal-detail {
  position: sticky;
  top: 18px;
  max-height: calc(100vh - 36px);
  overflow: auto;
  box-shadow: 0 18px 50px rgba(24, 92, 74, 0.08);
}

.portal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 18px 20px;
  border-top: 1px solid rgba(24, 92, 74, 0.08);
  background: linear-gradient(180deg, rgba(249, 252, 249, 0.6), #fff);
}

.portal-actions.top-actions {
  padding: 0;
  border: 0;
  background: transparent;
  align-items: center;
  justify-content: flex-end;
}

.portal-actions.top-actions .text-button,
.portal-actions.top-actions .action-link {
  flex: 0 0 118px;
  min-width: 118px;
  min-height: 34px;
  padding: 0 10px;
  white-space: nowrap;
}

.portal-account-dialog {
  width: min(880px, calc(100vw - 40px));
  border-radius: 24px;
  overflow: hidden;
}

.portal-account-dialog .dialog-title {
  align-items: flex-start;
  background: linear-gradient(135deg, rgba(244, 250, 245, 0.98), #fff);
}

.portal-account-dialog .dialog-title p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.portal-account-form-body {
  display: grid;
  gap: 0;
  max-height: min(68vh, 720px);
  overflow: auto;
}

.portal-account-form-section {
  display: grid;
  gap: 18px;
  padding: 28px 32px;
  border-bottom: 1px solid rgba(24, 92, 74, 0.1);
}

.portal-account-form-section:last-child {
  border-bottom: 0;
}

.portal-account-form-section h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
}

.portal-account-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 30px;
}

.portal-account-form-grid.compact {
  grid-template-columns: minmax(260px, 0.85fr) minmax(220px, 1fr);
  align-items: end;
}

.portal-logo-field {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid rgba(24, 92, 74, 0.12);
  border-radius: 16px;
  background: rgba(246, 251, 247, 0.72);
}

.portal-logo-preview {
  width: 154px;
  height: 72px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px dashed rgba(24, 92, 74, 0.22);
  border-radius: 12px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.portal-logo-preview.has-logo {
  border-style: solid;
}

.portal-logo-preview img {
  max-width: 136px;
  max-height: 54px;
  object-fit: contain;
}

.portal-logo-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.portal-logo-actions small {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 12px;
}

.portal-logo-upload {
  display: inline-flex !important;
  min-height: 38px;
  align-items: center;
  padding: 0 14px;
  border: 1px solid rgba(24, 92, 74, 0.18);
  border-radius: 999px;
  background: #fff;
  color: var(--ink) !important;
  cursor: pointer;
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: 0.04em !important;
}

.portal-logo-upload input {
  display: none;
}

.portal-account-form-grid label {
  display: grid;
  gap: 7px;
  color: #5f6f69;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.portal-account-form-grid input {
  min-height: 48px;
  border: 1px solid rgba(24, 92, 74, 0.14);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  letter-spacing: normal;
  padding: 0 14px;
  text-transform: none;
}

.portal-checkbox-row {
  display: flex !important;
  grid-template-columns: none;
  align-items: center;
  min-height: 48px;
  color: var(--ink) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
}

.portal-checkbox-row input {
  width: 16px;
  min-height: 16px;
  padding: 0;
}

.portal-login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  background: #f7f8f5;
}

.portal-auth-stack {
  width: min(920px, 100%);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.portal-auth-stack-single {
  width: min(440px, 100%);
  grid-template-columns: 1fr;
}

.portal-login-card {
  width: min(440px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 32px;
  box-shadow: 0 24px 80px rgba(24, 51, 36, 0.12);
}

.portal-signup-card {
  padding-top: 34px;
}

.portal-brand-header {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
}

.portal-brand-logo {
  width: 190px;
  max-width: 72%;
  height: auto;
  display: block;
}

.portal-login-card h1 {
  margin: 8px 0;
  color: var(--ink);
  font-size: 30px;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.portal-login-card p {
  color: var(--muted);
  line-height: 1.5;
}

.portal-auth-intro {
  margin: 10px 0 0;
  font-size: 15px;
}

.portal-login-card form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.portal-login-card label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

.portal-name-grid {
  display: grid;
  gap: 12px;
}

.portal-login-card input,
.portal-login-card select,
.portal-login-card textarea {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.portal-login-card input:focus,
.portal-login-card select:focus,
.portal-login-card textarea:focus {
  outline: none;
  border-color: rgba(24, 92, 74, 0.42);
  box-shadow: 0 0 0 3px rgba(24, 92, 74, 0.09);
}

.portal-login-card textarea {
  resize: vertical;
}

.portal-login-actions {
  display: grid;
  gap: 8px;
}

.portal-login-actions .primary-button {
  width: 100%;
}

.portal-auth-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.portal-reset-panel {
  display: grid;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid rgba(24, 92, 74, 0.08);
}

.portal-reset-panel[hidden] {
  display: none;
}

.portal-reset-copy {
  margin: 0;
}

.portal-reset-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.portal-reset-actions .primary-button {
  width: 100%;
}

.portal-auth-link {
  min-height: auto;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--green);
}

.portal-auth-link:hover {
  border: 0;
  background: transparent;
  text-decoration: underline;
}

.portal-auth-footnote {
  margin: 18px 0 0;
  text-align: center;
  font-size: 14px;
}

.portal-auth-footnote a {
  color: var(--green);
  font-weight: 700;
  text-decoration: none;
}

.portal-auth-footnote a:hover {
  text-decoration: underline;
}

.portal-login-message {
  min-height: 22px;
  margin: 16px 0 0;
}

.registration-list-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  padding: 18px;
  box-shadow: var(--shadow);
}

.registration-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.registration-tabs {
  margin: 2px 0 14px;
  padding: 0 4px;
}

.registration-list-summary {
  display: grid;
  gap: 4px;
}

.registration-mode-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.registration-requests {
  display: grid;
  gap: 6px;
}

.registration-table-header,
.registration-request-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.1fr) minmax(170px, 1.2fr) minmax(108px, 0.75fr) minmax(132px, 0.85fr) minmax(150px, 1fr) minmax(130px, 0.9fr) 94px;
  column-gap: 10px;
  align-items: center;
}

.registration-table-header {
  padding: 0 16px 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.registration-request {
  border: 1px solid transparent;
  border-radius: 16px;
  background: #f7fbf4;
  overflow: hidden;
}

.registration-request.expanded {
  border-color: rgba(24, 92, 74, 0.16);
  background: #fff;
}

.registration-request-row {
  width: 100%;
  min-height: 54px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  padding: 8px 16px;
  text-align: left;
  cursor: pointer;
}

.registration-request-row:hover {
  background: rgba(24, 92, 74, 0.06);
}

.registration-request-row > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.registration-person {
  display: grid;
  gap: 1px;
}

.registration-person strong,
.registration-person small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.registration-person small,
.registration-request-detail dt {
  color: var(--muted);
}

.registration-status {
  justify-self: start;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--ink);
  text-transform: capitalize;
  font-size: 12px;
  font-weight: 700;
}

.registration-status-pending {
  border-color: #ead699;
  background: #fff7df;
  color: #916200;
}

.registration-status-approved {
  border-color: #c8decb;
  background: #eef8f0;
  color: var(--green-dark);
}

.registration-status-rejected {
  border-color: #efc6c6;
  background: #fff1f1;
  color: #8d2f2f;
}

.registration-request-detail {
  border-top: 1px solid rgba(24, 92, 74, 0.12);
  padding: 14px 16px 16px;
}

.registration-request-detail dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.registration-request-detail dl div {
  display: grid;
  gap: 3px;
}

.registration-request-detail .wide {
  grid-column: 1 / -1;
}

.registration-request-detail dt,
.registration-request-detail dd {
  margin: 0;
}

.registration-request a {
  color: var(--green-dark);
}

.registration-review-form {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.registration-review-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.registration-review-grid label {
  display: grid;
  gap: 6px;
}

.registration-review-grid span,
.registration-review-hint {
  color: var(--muted);
}

.registration-review-grid select,
.registration-review-grid textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  padding: 10px 12px;
}

.registration-review-grid textarea {
  resize: vertical;
  min-height: 86px;
}

.registration-review-grid .wide {
  grid-column: 1 / -1;
}

.registration-review-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.registration-suggestion {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
}

.registration-review-hint {
  margin: 0;
  font-size: 13px;
}

.portal-empty {
  border: 1px solid var(--line);
  padding: 22px;
  color: var(--muted);
}

@media (max-width: 900px) {
  body[data-page="portal"] {
    min-width: 0;
  }

  .portal-shell {
    padding: 18px;
  }

  .portal-topbar {
    display: block;
  }

  .portal-topbar-actions {
    justify-content: flex-start;
    margin-top: 14px;
  }

  .portal-account-chip {
    min-width: 0;
    text-align: left;
  }

  .portal-hero,
  .portal-toolbar,
  .portal-summary,
  .portal-layout {
    grid-template-columns: 1fr;
  }

  .portal-hero {
    display: grid;
  }

  .portal-table-header {
    display: none;
  }

  .portal-order.order-row,
  .portal-order {
    width: 100%;
    grid-template-columns: 1fr;
    margin: 0 0 7px;
    padding: 12px;
    text-align: left;
  }

  .portal-order > span:not(.portal-mobile-summary) {
    display: none;
  }

  .portal-mobile-summary {
    display: grid;
    gap: 5px;
    min-width: 0;
    white-space: normal;
  }

  .portal-mobile-summary span,
  .portal-mobile-summary strong {
    min-width: 0;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }

  .portal-mobile-summary strong {
    color: var(--ink);
    font-size: 17px;
    font-weight: 500;
  }

  .portal-mobile-kicker {
    color: var(--muted);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  body[data-portal-role="partner"] .portal-order.order-row,
  body[data-portal-role="partner"] .portal-order {
    padding: 14px;
  }

  body[data-portal-role="partner"] .partner-mobile-summary {
    gap: 9px;
  }

  body[data-portal-role="partner"] .portal-mobile-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 13px;
    letter-spacing: 0.01em;
  }

  body[data-portal-role="partner"] .portal-mobile-topline .booking-number {
    color: var(--green-dark);
    font-weight: 700;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
  }

  body[data-portal-role="partner"] .portal-mobile-route {
    display: grid;
    gap: 5px;
    color: var(--ink);
    font-size: 15px;
    line-height: 1.32;
    font-weight: 600;
  }

  body[data-portal-role="partner"] .portal-mobile-arrow,
  body[data-portal-role="partner"] .portal-mobile-meta {
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
  }

  body[data-portal-role="partner"] .portal-mobile-fee {
    justify-self: start;
    display: inline-flex;
    max-width: 100%;
    border-radius: 999px;
    background: rgba(24, 92, 74, 0.08);
    color: var(--green-dark);
    padding: 5px 10px;
    font-size: 13px;
    font-weight: 700;
  }

  .portal-detail {
    position: static;
    max-height: none;
  }

  .portal-topbar .text-button {
    margin-top: 14px;
  }

  .portal-account-dialog {
    width: calc(100vw - 24px);
  }

  .portal-account-form-section {
    padding: 20px;
  }

  .portal-account-form-grid,
  .portal-account-form-grid.compact {
    grid-template-columns: 1fr;
  }

  .portal-auth-stack {
    grid-template-columns: 1fr;
  }

  .registration-tabs {
    gap: 14px;
    overflow-x: auto;
  }

  .registration-table-header {
    display: none;
  }

  .registration-request-row {
    grid-template-columns: 1fr;
    gap: 5px;
    min-height: 0;
    padding: 12px;
  }

  .registration-request-row > span {
    white-space: normal;
  }

  .registration-request-row > span:not(.registration-person):not(.registration-status) {
    color: var(--muted);
    font-size: 13px;
  }

  .registration-request-detail {
    padding: 12px;
  }

  .registration-request-detail dl {
    grid-template-columns: 1fr;
  }

  .registration-review-grid {
    grid-template-columns: 1fr;
  }

  .registration-review-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .portal-name-grid {
    grid-template-columns: 1fr;
  }

  body[data-portal-role="partner"] .portal-shell {
    padding: 14px 12px 22px;
  }

  body[data-portal-role="partner"] .portal-topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 0;
  }

  body[data-portal-role="partner"] .portal-topbar-actions,
  body[data-portal-role="partner"] .portal-toolbar,
  body[data-portal-role="partner"] .portal-list-heading {
    display: none;
  }

  body[data-portal-role="partner"] .portal-summary {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    margin-top: 8px;
  }

  body[data-portal-role="partner"] .portal-summary div {
    min-height: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 0 2px;
  }

  body[data-portal-role="partner"] .portal-summary div::before,
  body[data-portal-role="partner"] .portal-summary div:first-child,
  body[data-portal-role="partner"] .portal-summary div:last-child {
    display: none;
  }

  body[data-portal-role="partner"] .portal-summary span,
  body[data-portal-role="partner"] .portal-summary strong {
    display: inline;
    margin: 0;
    color: var(--green-dark);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.35;
    text-transform: none;
  }

  body[data-portal-role="partner"] .portal-summary #portal-next {
    display: block;
    margin-top: 5px;
    color: #121816;
    font-size: 18px;
    font-weight: 400;
    letter-spacing: -0.04em;
    line-height: 1.2;
  }

  body[data-portal-role="partner"] .portal-summary #portal-next.urgent-summary {
    color: var(--red);
    font-size: 22px;
    font-weight: 650;
    line-height: 1.14;
  }

  body[data-portal-role="partner"] .portal-summary #portal-next.urgent-summary span {
    display: block;
    color: inherit;
    font-size: 17px;
    font-weight: 650;
    letter-spacing: -0.03em;
    line-height: 1.22;
  }

  body[data-portal-role="partner"] .portal-summary span::after {
    content: ": ";
  }

  body[data-portal-role="partner"] .portal-tabs {
    justify-self: start;
    width: auto;
    box-shadow: none;
  }

  body[data-portal-role="partner"] .portal-tab {
    flex: 0 0 auto;
    justify-content: center;
    min-height: 34px;
    font-size: 14px;
  }

  body[data-portal-role="partner"] .portal-mobile-account-title {
    display: block;
    justify-self: end;
    color: var(--ink);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1.2;
    text-align: right;
    text-transform: uppercase;
    white-space: nowrap;
  }

  body[data-portal-role="partner"] .portal-hero {
    display: none;
    margin: 0;
    padding: 4px 2px 8px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }

  body[data-portal-role="partner"] .portal-hero::after {
    display: none;
  }

  body[data-portal-role="partner"] .portal-hero h1 {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1.2;
    text-transform: uppercase;
  }

  body[data-portal-role="partner"] .portal-layout {
    margin-top: 6px;
    gap: 10px;
  }

  body[data-portal-role="partner"] .portal-layout > div {
    border-radius: 20px;
    overflow: hidden;
  }

  body[data-portal-role="partner"] .portal-orders {
    padding: 0;
  }

  body[data-portal-role="partner"] .portal-date-group {
    border-top: 0;
  }

  body[data-portal-role="partner"] .date-heading {
    padding: 13px 14px 9px;
    font-size: 14px;
    letter-spacing: 0.08em;
  }

  body[data-portal-role="partner"] .portal-order.order-row,
  body[data-portal-role="partner"] .portal-order {
    display: block;
    grid-template-columns: none;
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 15px 14px 16px;
    border-radius: 0;
    border-top: 1px solid rgba(24, 92, 74, 0.1);
    box-shadow: none;
  }

  body[data-portal-role="partner"] .portal-order > span:not(.portal-mobile-summary) {
    display: none;
  }

  body[data-portal-role="partner"] .partner-mobile-summary {
    display: grid;
    width: 100%;
    min-width: 0;
    gap: 10px;
  }

  body[data-portal-role="partner"] .portal-mobile-topline {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    column-gap: 12px;
    row-gap: 4px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.35;
    min-width: 0;
    width: 100%;
  }

  body[data-portal-role="partner"] .portal-mobile-topline .booking-number {
    justify-self: end;
    color: var(--green-dark);
    font-size: 14px;
    font-weight: 700;
    text-align: right;
  }

  body[data-portal-role="partner"] .portal-mobile-route {
    display: grid;
    gap: 7px;
    color: var(--ink);
    font-size: 14px;
    line-height: 1.42;
    font-weight: 600;
    min-width: 0;
    width: 100%;
  }

  body[data-portal-role="partner"] .portal-mobile-arrow,
  body[data-portal-role="partner"] .portal-mobile-meta {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.35;
    font-weight: 500;
  }

  body[data-portal-role="partner"] .portal-mobile-fee {
    justify-self: start;
    display: inline-flex;
    max-width: 100%;
    border-radius: 999px;
    background: rgba(24, 92, 74, 0.08);
    color: var(--green-dark);
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 700;
  }
}

.detail-top {
  position: relative;
  padding: 22px 24px 20px;
  border-bottom: 1px solid var(--line);
}

.detail-top.compact {
  padding: 18px 20px 16px;
}

.detail-top h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 400;
}

.detail-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.detail-top p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 400;
}

.complete-button,
.result-actions {
  margin-top: 0;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-section {
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 14px;
}

.detail-grid .detail-section {
  border: 1px solid var(--line);
  padding: 16px;
  margin-bottom: 14px;
}

.detail-column {
  display: grid;
  align-content: start;
}

.detail-footer-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding: 0 14px 14px;
}

.mobile-detail-actions {
  display: none;
}

.detail-section h3 {
  margin: 0 0 12px;
  font-size: 15px;
  text-transform: uppercase;
  font-weight: 400;
}

.info-row {
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr);
  gap: 12px;
  min-height: 42px;
  align-items: center;
  padding: 8px 12px;
  background: var(--row);
  margin-bottom: 6px;
  font-size: 15px;
  user-select: none;
}

.info-row span:first-child {
  color: var(--muted);
}

.info-row span:last-child {
  text-align: right;
  font-weight: 400;
  min-width: 0;
  overflow-wrap: anywhere;
  cursor: text;
  user-select: text;
}

body:not([data-page]) .detail-top {
  padding: 22px 20px 18px;
  border-bottom-color: rgba(15, 45, 39, 0.08);
  background: #fff;
}

body:not([data-page]) .detail-top h2 {
  color: #121816;
  font-size: 30px;
  font-weight: 300;
  letter-spacing: -0.055em;
}

body:not([data-page]) .detail-top p {
  color: rgba(15, 45, 39, 0.5);
  font-weight: 300;
}

body:not([data-page]) .detail-grid {
  gap: 10px;
  padding: 10px;
}

body:not([data-page]) .detail-grid .detail-section,
body:not([data-page]) .compact-section {
  margin-bottom: 10px;
  border-color: rgba(15, 45, 39, 0.1);
  background: #fff;
}

body:not([data-page]) .detail-section h3,
body:not([data-page]) .compact-section h3 {
  color: rgba(15, 45, 39, 0.48);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

body:not([data-page]) .info-row,
body:not([data-page]) .compact-row {
  min-height: 38px;
  background: #f7fbf6;
  font-size: 14px;
}

body:not([data-page]) .info-row span:first-child,
body:not([data-page]) .compact-row span:first-child {
  color: rgba(15, 45, 39, 0.48);
}

body:not([data-page]) .detail-footer-actions {
  padding: 2px 10px 12px;
}

body:not([data-page]) .detail-footer-actions .text-button,
body:not([data-page]) .detail-footer-actions .dark-button,
body:not([data-page]) .detail-footer-actions .primary-button,
body:not([data-page]) .detail-footer-actions .danger-button {
  min-height: 34px;
  border-radius: 0;
  font-size: 13px;
}

.compact-detail-list {
  display: grid;
  gap: 10px;
  padding: 14px 18px 18px;
}

.compact-section {
  border: 1px solid var(--line);
  padding: 12px;
}

.compact-section h3 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 400;
  text-transform: uppercase;
}

.compact-row {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-height: 38px;
  padding: 8px 10px;
  background: var(--row);
  font-size: 15px;
  user-select: none;
}

.compact-row span {
  color: var(--muted);
  font-size: 15px;
}

.compact-row strong {
  color: var(--ink);
  font-weight: 400;
  min-width: 0;
  overflow-wrap: anywhere;
  cursor: text;
  user-select: text;
}

.compact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.compact-footer-actions {
  display: grid;
  gap: 8px;
  justify-items: stretch;
}

.quick-detail-form {
  gap: 12px;
}

.quick-edit-section {
  display: grid;
  gap: 8px;
}

.quick-edit-section h3 {
  margin-bottom: 2px;
  font-size: 13px;
  letter-spacing: 0.06em;
}

.quick-edit-row {
  grid-template-columns: 126px minmax(0, 1fr);
  min-height: 44px;
  padding: 6px 10px;
  align-items: center;
  user-select: auto;
}

.quick-edit-row > input,
.quick-edit-row > select,
.quick-edit-row > textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  padding: 8px 10px;
  outline: 0;
}

.quick-edit-row > textarea {
  min-height: 88px;
  resize: vertical;
}

.quick-datetime-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 66px 66px;
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.quick-datetime-control > input,
.quick-datetime-control > select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  padding: 8px 10px;
  outline: 0;
}

.quick-edit-row > input:focus,
.quick-edit-row > select:focus,
.quick-edit-row > textarea:focus,
.quick-datetime-control > input:focus,
.quick-datetime-control > select:focus {
  border-color: var(--green-dark);
  box-shadow: 0 0 0 2px rgba(24, 92, 74, 0.08);
}

.quick-edit-row > input.quick-field-conflict {
  border-color: var(--red);
  box-shadow: 0 0 0 2px rgba(173, 50, 50, 0.12);
  animation: quick-field-shake 0.38s ease;
}

@keyframes quick-field-shake {
  0%, 100% {
    transform: translateX(0);
  }

  22% {
    transform: translateX(-5px);
  }

  45% {
    transform: translateX(5px);
  }

  68% {
    transform: translateX(-3px);
  }
}

.quick-detail-form .compact-footer-actions {
  gap: 6px;
  padding-top: 4px;
}

.quick-save-status {
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.quick-save-status[data-state="error"] {
  color: var(--red);
}

.quick-save-status[data-state="success"] {
  color: var(--green-dark);
}

.invoice-registry-dialog {
  width: min(940px, calc(100vw - 48px));
}

.invoice-registry-dialog .dialog-title {
  align-items: flex-start;
}

.invoice-registry-dialog .dialog-title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.invoice-registry-body {
  display: grid;
  gap: 10px;
  max-height: min(68vh, 720px);
  overflow: auto;
  padding: 16px 18px 18px;
  background: #fbfdfb;
}

.invoice-registry-card {
  border: 1px solid rgba(15, 45, 39, 0.1);
  border-radius: 16px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(15, 45, 39, 0.02);
  overflow: hidden;
}

.invoice-registry-card.has-qa {
  border-color: rgba(159, 74, 68, 0.32);
  background: #fffafa;
}

.invoice-registry-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 14px 16px;
}

.invoice-registry-title {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.invoice-registry-title strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}

.invoice-registry-summary p,
.invoice-registry-summary small,
.invoice-registry-total small {
  display: block;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.invoice-registry-total {
  min-width: 142px;
  text-align: right;
}

.invoice-registry-total strong {
  color: var(--ink);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.invoice-registry-files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 12px;
}

.invoice-registry-files.empty {
  color: var(--muted);
  font-size: 12px;
}

.invoice-file-button {
  min-height: 28px;
  border-radius: 999px;
  font-size: 12px;
}

.invoice-registry-actions {
  display: flex;
  justify-content: flex-end;
  padding: 0 16px 12px;
}

.invoice-delete-button {
  min-height: 28px;
  border-radius: 999px;
  color: var(--red);
  font-size: 12px;
}

.invoice-delete-button:hover {
  border-color: rgba(159, 74, 68, 0.38);
  background: rgba(159, 74, 68, 0.08);
}

.invoice-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 0 8px;
  background: #edf6ef;
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.invoice-status-pill.qa {
  background: rgba(159, 74, 68, 0.12);
  color: var(--red);
}

.invoice-registry-details {
  border-top: 1px solid rgba(15, 45, 39, 0.08);
  padding: 0 16px 14px;
}

.invoice-registry-details summary {
  padding: 10px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.invoice-registry-line {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(150px, 1fr) 92px 104px;
  gap: 10px;
  align-items: center;
  min-height: 32px;
  border-top: 1px solid rgba(15, 45, 39, 0.06);
  color: var(--ink);
  font-size: 13px;
}

.invoice-registry-line-head {
  min-height: 28px;
  border-top: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.invoice-registry-line.qa {
  color: var(--red);
  font-weight: 600;
}

.invoice-registry-booking {
  font-weight: 700;
}

.notes-text {
  margin: 0;
  padding: 14px;
  background: var(--row);
  white-space: pre-wrap;
  cursor: text;
  user-select: text;
}

dialog {
  width: min(1360px, calc(100vw - 48px));
  border: 1px solid var(--line);
  padding: 0;
  box-shadow: var(--shadow);
  background: var(--surface);
}

dialog::backdrop {
  background: rgba(17, 15, 12, 0.34);
}

.dialog-title,
.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.dialog-actions {
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.dialog-status {
  margin-right: auto;
  color: var(--muted);
  font-size: 13px;
}

.dialog-status[data-state="error"] {
  color: #9d2d20;
}

.dialog-title h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 400;
}

.icon-button {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  font-size: 24px;
}

.editor-shell {
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(0, 2.55fr);
  gap: 16px;
  padding: 20px 24px 22px;
}

.editor-note {
  grid-column: 1 / -1;
}

.editor-form-panels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.editor-smart-input {
  background: #f8f3e8;
  border-color: #e4d7bf;
  min-height: 100%;
}

.editor-smart-input .editor-grid {
  min-height: 100%;
  grid-template-rows: minmax(360px, 1fr) auto;
}

.editor-smart-input textarea {
  background: #fffbf3;
  min-height: 360px;
}

.editor-smart-input textarea::placeholder {
  color: #b0a28e;
}

.editor-panel {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 14px;
  display: grid;
  align-content: start;
  gap: 12px;
}

.editor-panel h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 400;
  text-transform: uppercase;
}

.editor-grid {
  display: grid;
  gap: 10px;
}

.editor-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
}

.editor-grid input,
.editor-grid select,
.editor-grid textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  padding: 10px 11px;
  outline: 0;
}

.google-place-field {
  background-image: linear-gradient(90deg, rgba(129, 150, 92, 0.14), rgba(255, 255, 255, 0));
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

.pac-container {
  z-index: 2147483647 !important;
  border: 1px solid var(--line);
  box-shadow: 0 16px 36px rgba(24, 51, 36, 0.16);
  font-family: inherit;
  position: fixed !important;
}

.pac-item {
  padding: 8px 10px;
  font-size: 14px;
  cursor: pointer;
}

.pac-item-query {
  color: var(--ink);
  font-size: 14px;
}

.field-memory-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 6px;
}

.field-memory-add {
  border: 1px solid var(--line);
  background: #f4f8ef;
  color: var(--ink);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}

.field-memory-add:hover {
  background: #e7efd9;
}

.editor-form-panels .editor-grid input.empty-field,
.editor-form-panels .editor-grid select.empty-field,
.editor-form-panels .editor-grid textarea.empty-field {
  border-color: rgba(159, 74, 68, 0.28);
  background: #fff3f1;
}

.editor-form-panels .editor-grid input.empty-field:focus,
.editor-form-panels .editor-grid select.empty-field:focus,
.editor-form-panels .editor-grid textarea.empty-field:focus {
  border-color: rgba(159, 74, 68, 0.58);
  box-shadow: 0 0 0 2px rgba(159, 74, 68, 0.08);
}

.price-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 82px;
  gap: 6px;
}

.editor-grid textarea {
  min-height: 140px;
  resize: vertical;
}

.editor-inline-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.editor-helper {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.date-time-picker-field {
  position: relative;
}

#order-start-display {
  cursor: pointer;
}

.date-time-picker-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 20;
  width: min(320px, calc(100vw - 96px));
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 18px 40px rgba(24, 51, 36, 0.16);
  padding: 14px;
}

.date-time-picker-header,
.date-time-picker-actions,
.date-time-picker-time {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.date-time-picker-header strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

.date-time-picker-nav {
  min-width: 38px;
  min-height: 38px;
  padding: 0;
}

.date-time-picker-weekdays,
.date-time-picker-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.date-time-picker-weekdays {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  text-transform: uppercase;
}

.date-time-picker-days {
  margin-top: 8px;
}

.date-time-picker-day {
  min-height: 36px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.date-time-picker-day.muted {
  color: rgba(15, 45, 39, 0.34);
}

.date-time-picker-day.selected {
  border-color: var(--green-dark);
  background: rgba(24, 92, 74, 0.1);
  color: var(--green-dark);
  font-weight: 600;
}

.date-time-picker-time {
  margin-top: 12px;
}

.date-time-picker-time-field {
  display: grid;
  flex: 1;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.date-time-picker-time-field select {
  width: 100%;
}

.date-time-picker-actions {
  margin-top: 14px;
}

@media (max-width: 900px) {
  body {
    min-width: 0;
  }

  .app-shell {
    margin-left: 0;
    padding: 18px;
  }

  .topbar,
  .workspace {
    display: block;
  }

  .filters,
  .summary-strip,
  .detail-grid,
  .editor-shell,
  .editor-form-panels {
    grid-template-columns: 1fr;
  }

  .editor-smart-input .editor-grid {
    min-height: 0;
    grid-template-rows: none;
  }

  .editor-smart-input textarea {
    min-height: 220px;
  }

  .editor-inline-actions {
    align-items: flex-start;
  }

  .date-time-picker-panel {
    width: 100%;
    min-width: 0;
  }

  #data-file-status {
    grid-column: auto;
  }

  .toolbar-actions {
    margin-top: 14px;
  }

  body:not([data-page]) .filters,
  body:not([data-page]) .summary-strip {
    display: none;
  }

  body:not([data-page]) .topbar {
    min-height: 46px;
    padding: 6px 8px;
    border-radius: 18px;
  }

  body:not([data-page]) .toolbar-actions {
    gap: 4px;
    padding: 3px 5px;
    border-radius: 12px;
  }

  body:not([data-page]) .toolbar-actions .text-button,
  body:not([data-page]) .toolbar-actions .dark-button {
    min-height: 18px;
    padding: 0 7px;
    font-size: 10.5px;
    line-height: 1;
  }

  body:not([data-page]) .workspace {
    margin-top: 10px;
  }

  .order-row,
  .table-header {
    grid-template-columns: 1fr 1fr;
  }

  .table-header {
    display: none;
  }

  .detail-panel {
    position: static;
    max-height: none;
    margin-top: 18px;
    overflow: visible;
  }

  body:not([data-page]) .detail-page {
    padding: 14px 12px 22px;
  }

  body:not([data-page]) .detail-top {
    padding: 18px 16px 14px;
  }

  body:not([data-page]) .detail-title-row {
    align-items: flex-start;
  }

  body:not([data-page]) .detail-title-row > .action-link {
    display: none;
  }

  body:not([data-page]) .mobile-detail-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px 16px 12px;
    border-bottom: 1px solid rgba(24, 92, 74, 0.12);
    background: rgba(255, 255, 255, 0.92);
  }

  body:not([data-page]) .mobile-detail-actions > .primary-button {
    grid-column: 1 / -1;
    min-height: 50px;
    border-radius: 14px;
    font-weight: 600;
  }

  body:not([data-page]) .mobile-detail-actions > .text-button,
  body:not([data-page]) .mobile-detail-actions > .dark-button {
    width: 100%;
    min-height: 44px;
    border-radius: 14px;
    padding: 0 10px;
    text-align: center;
  }

  body:not([data-page]) .detail-grid {
    gap: 10px;
    padding: 10px;
  }

  body:not([data-page]) .detail-grid .detail-section {
    margin-bottom: 10px;
    padding: 14px;
  }

  body:not([data-page]) .detail-footer-actions {
    position: sticky;
    bottom: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 12px max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    border-top: 1px solid rgba(24, 92, 74, 0.14);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -18px 36px rgba(15, 45, 39, 0.1);
    backdrop-filter: blur(10px);
  }

  body:not([data-page]) .detail-footer-actions > button,
  body:not([data-page]) .detail-footer-actions > a,
  body:not([data-page]) .detail-footer-actions .result-actions button {
    width: 100%;
    min-height: 46px;
    justify-content: center;
    border-radius: 14px;
    padding: 0 10px;
    white-space: normal;
    text-align: center;
  }

  body:not([data-page]) .detail-footer-actions #edit-order-button {
    grid-column: 1 / -1;
    min-height: 50px;
    border-color: var(--green-dark);
    background: var(--green-dark);
    color: #fff;
    font-weight: 600;
  }

  body:not([data-page]) .detail-footer-actions .result-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  body:not([data-page]) .detail-footer-actions .result-actions .primary-button,
  body:not([data-page]) .detail-footer-actions .complete-button,
  body:not([data-page]) .detail-footer-actions .danger-button,
  body:not([data-page]) .detail-footer-actions .cell-sub {
    grid-column: 1 / -1;
  }

  body:not([data-page]) .detail-footer-actions .danger-button {
    margin-top: 0;
    border-color: rgba(159, 74, 68, 0.38);
    background: rgba(159, 74, 68, 0.06);
  }

  body:not([data-page]) .compact-footer-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px 0 0;
  }

  body:not([data-page]) .quick-detail-form .compact-footer-actions {
    gap: 8px;
    padding-top: 8px;
  }

  body:not([data-page]) .compact-footer-actions > button,
  body:not([data-page]) .compact-footer-actions .compact-actions button {
    width: 100%;
    min-height: 46px;
    justify-content: center;
    border-radius: 14px;
    padding: 0 10px;
    white-space: normal;
    text-align: center;
  }

  body:not([data-page]) .compact-footer-actions > .quick-save-status,
  body:not([data-page]) .compact-footer-actions > .primary-button[type="submit"],
  body:not([data-page]) .compact-footer-actions > #edit-order-button,
  body:not([data-page]) .compact-footer-actions > .danger-button {
    grid-column: 1 / -1;
  }

  body:not([data-page]) .compact-footer-actions > #edit-order-button {
    min-height: 50px;
    border-color: var(--green-dark);
    background: var(--green-dark);
    color: #fff;
    font-weight: 600;
  }

  body:not([data-page]) .compact-footer-actions .compact-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  body:not([data-page]) .compact-footer-actions .compact-actions .primary-button {
    grid-column: 1 / -1;
  }

  body:not([data-page]) .compact-footer-actions > .danger-button {
    margin-top: 0;
    border-color: rgba(159, 74, 68, 0.38);
    background: rgba(159, 74, 68, 0.06);
  }
}
