.taxi-workspace {
  min-width: 0;
  margin: 24px 0 0;
  padding: 20px 0;
  border-top: 1px solid var(--line, #e6ebf2);
  color: var(--text, #202733);
}

.taxi-workspace *, .taxi-dialog *, .taxi-segment *, .taxi-detail * { box-sizing: border-box; letter-spacing: 0; }
.taxi-workspace [hidden], .taxi-dialog [hidden], .taxi-workspace[hidden], .taxi-segment[hidden],
.taxi-form-active > [hidden], .taxi-company-hidden, .taxi-estimate[hidden] { display: none !important; }
.taxi-workspace h3, .taxi-dialog h3, .taxi-detail h3 { margin: 0; font-size: 17px; line-height: 1.45; }
.taxi-section-head, .taxi-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.taxi-section-head { margin-bottom: 16px; }
.taxi-section-head h3 { flex: 1 1 140px; }
.taxi-card-head > strong, .taxi-card-head > h3 { min-width: 0; overflow-wrap: anywhere; }

.taxi-segment {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 4px;
  min-width: 0;
  margin: 0 0 12px;
  padding: 4px;
  border: 1px solid var(--line, #e6ebf2);
  border-radius: 6px;
  background: var(--surface, #fff);
}
.taxi-segment legend { padding: 0 5px; color: var(--muted, #697586); font-size: 13px; }
.taxi-segment label { position: relative; display: flex; flex: 1 1 100px; margin: 0; min-width: 0; cursor: pointer; }
.taxi-segment input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.taxi-segment span { display: grid; place-items: center; width: 100%; min-height: 40px; padding: 7px 10px; border-radius: 4px; text-align: center; overflow-wrap: anywhere; line-height: 1.35; }
.taxi-segment input:checked + span { background: var(--primary-soft, #e9f2ff); color: var(--primary, #0f4c97); font-weight: 700; }
.taxi-segment input:focus-visible + span { outline: 2px solid var(--primary, #0f4c97); outline-offset: -2px; }
.taxi-review-switch { width: min(100%, 430px); }
.taxi-form-active > label, .taxi-estimate { min-width: 0; }
.taxi-form-active input, .taxi-form-active select, .taxi-form-active textarea { width: 100%; min-width: 0; max-width: 100%; }

.taxi-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.taxi-filters label, .taxi-review-form > label, .taxi-company-fields > label { display: grid; min-width: 0; gap: 6px; color: var(--muted, #697586); font-size: 13px; }
.taxi-filters input, .taxi-filters select, .taxi-review-form input, .taxi-review-form select, .taxi-review-form textarea { min-width: 0; width: 100%; max-width: 100%; border-radius: 6px; }
.taxi-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.taxi-filters > .taxi-actions { grid-column: 1 / -1; }
.taxi-workspace button, .taxi-dialog button, .taxi-card button, .taxi-detail + .taxi-actions button { min-height: 38px; max-width: 100%; border-radius: 6px; white-space: normal; overflow-wrap: anywhere; line-height: 1.4; }
.taxi-list { display: grid; gap: 10px; min-width: 0; }
.taxi-card { min-width: 0; padding: 14px; border: 1px solid var(--line, #e6ebf2); border-radius: 6px; background: var(--surface, #fff); overflow-wrap: anywhere; }
.taxi-card p { margin: 9px 0; line-height: 1.5; }
.taxi-selected { border-color: var(--primary, #0f4c97); box-shadow: inset 3px 0 var(--primary, #0f4c97); }
.taxi-meta, #taxiPendingCount { color: var(--muted, #697586); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.taxi-policy { margin: 8px 0; color: var(--muted, #697586); font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }
.taxi-status { display: inline-block; max-width: 100%; padding: 4px 8px; border-radius: 4px; background: #f0f3f7; color: #465568; font-size: 12px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.taxi-status-pending { background: #fff5dc; color: #805900; }
.taxi-status-taxi_approved { background: #e9f6ed; color: #216d44; }
.taxi-status-company_assigned { background: var(--primary-soft, #e9f2ff); color: var(--primary, #0f4c97); }
.taxi-status-rejected { background: #fff0ee; color: #a32d24; }
.taxi-status-cancelled { background: #eff2f5; color: #667085; }
.taxi-arrangement { display: grid; gap: 8px; margin: 12px 0; }
.taxi-arrangement > div { display: grid; grid-template-columns: minmax(60px, 1fr) minmax(0, 2fr); gap: 8px; }
.taxi-arrangement dt, .taxi-detail-grid dt, .taxi-report-summary dt { color: var(--muted, #697586); font-size: 13px; line-height: 1.5; }
.taxi-arrangement dd, .taxi-detail-grid dd, .taxi-report-summary dd { margin: 0; min-width: 0; overflow-wrap: anywhere; line-height: 1.5; }
.taxi-review-columns { display: grid; grid-template-columns: minmax(230px, 0.85fr) minmax(0, 1.5fr); gap: 22px; align-items: start; }
.taxi-review-columns > * { min-width: 0; }
.taxi-review-detail { padding-left: 20px; border-left: 1px solid var(--line, #e6ebf2); min-width: 0; }
.taxi-detail { min-width: 0; }
.taxi-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; margin: 18px 0; }
.taxi-detail-grid > div { min-width: 0; }
.taxi-detail-grid dd { margin-top: 4px; white-space: pre-wrap; }
.taxi-review-form { display: grid; gap: 16px; padding-top: 18px; border-top: 1px solid var(--line, #e6ebf2); }
.taxi-company-fields .taxi-checkbox { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; line-height: 1.5; }
.taxi-company-fields .taxi-checkbox input { flex: 0 0 17px; width: 17px; height: 17px; margin: 0; accent-color: var(--primary, #0f4c97); }
.taxi-review-actions .taxi-decision-selected { outline: 2px solid var(--primary, #0f4c97); outline-offset: 2px; }
.taxi-company-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.taxi-company-fields > label:first-child { grid-column: 1 / -1; }
.taxi-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; }
.taxi-pagination span { min-width: 0; color: var(--muted, #697586); font-size: 12px; overflow-wrap: anywhere; }
.taxi-error { margin: 10px 0; color: var(--danger, #b42318); line-height: 1.6; overflow-wrap: anywhere; white-space: pre-wrap; }
.taxi-empty { padding: 20px 0; margin: 0; color: var(--muted, #697586); font-size: 14px; }
.taxi-report-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding: 16px 0; margin: 0 0 16px; border-block: 1px solid var(--line, #e6ebf2); }
.taxi-report-summary dd { margin-top: 5px; font-size: 20px; font-weight: 700; }
.taxi-table-wrap { max-width: 100%; min-width: 0; overflow-x: auto; overscroll-behavior-x: contain; }
.taxi-table { width: 100%; min-width: 1120px; border-collapse: collapse; background: var(--surface, #fff); font-size: 13px; }
.taxi-table th, .taxi-table td { padding: 11px 12px; border-bottom: 1px solid var(--line, #e6ebf2); text-align: left; vertical-align: top; max-width: 220px; white-space: normal; overflow-wrap: anywhere; }
.taxi-table th { color: var(--muted, #697586); background: #f3f7fc; font-weight: 600; }
.taxi-dialog { width: min(680px, calc(100% - 24px)); max-width: calc(100% - 24px); max-height: calc(100dvh - 32px); padding: 20px; border: 1px solid var(--line, #e6ebf2); border-radius: 8px; background: var(--surface, #fff); color: var(--text, #202733); overflow: auto; }
.taxi-dialog::backdrop { background: rgb(32 39 51 / 30%); }
.taxi-dialog .taxi-actions { margin-top: 16px; }
.taxi-dialog #publicQueryResult { margin: 0; padding: 0; border: 0; background: transparent; box-shadow: none; }

@media (max-width: 900px) {
  .taxi-review-columns { grid-template-columns: minmax(0, 1fr); }
  .taxi-review-detail { padding: 18px 0 0; border-left: 0; border-top: 1px solid var(--line, #e6ebf2); }
  .taxi-review-detail:empty { display: none; }
  .taxi-report-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .taxi-filters, .taxi-company-fields, .taxi-detail-grid { grid-template-columns: minmax(0, 1fr); }
  .taxi-workspace { padding-block: 16px; }
  .taxi-card { padding: 12px; }
  .taxi-section-head { gap: 8px; }
  .taxi-status { font-size: 12px; }
  .taxi-report-summary { gap: 12px; }
  .taxi-report-summary dd { font-size: 17px; }
  .taxi-pagination span { order: 3; flex-basis: 100%; }
  .taxi-dialog { padding: 14px; }
  .taxi-actions > button { flex: 1 1 110px; }
}
