:root {
  --bg: #f6f7f4;
  --panel: #ffffff;
  --panel-soft: #f9faf7;
  --ink: #17201d;
  --muted: #66736e;
  --line: #dfe5df;
  --teal: #0a7770;
  --teal-weak: #e4f3ef;
  --blue: #2f6fba;
  --blue-weak: #e8f0fc;
  --amber: #bd7a11;
  --amber-weak: #fff0d8;
  --red: #c8493e;
  --red-weak: #fde8e4;
  --violet: #6857b8;
  --violet-weak: #eeeafd;
  --green: #3f8b50;
  --green-weak: #e7f3e5;
  --shadow: 0 12px 30px rgba(24, 36, 32, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 1180px;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 20px 16px;
  background: #17201d;
  color: #f6f7f4;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 8px;
  background: #f2c14e;
  color: #17201d;
  font-weight: 900;
  letter-spacing: 0;
}

.brand strong {
  display: block;
  font-size: 16px;
}

.brand span {
  display: block;
  margin-top: 2px;
  color: rgba(246, 247, 244, 0.68);
  font-size: 12px;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(246, 247, 244, 0.74);
  text-align: left;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.nav-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #f2c14e;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(246, 247, 244, 0.76);
}

.sidebar-footer strong {
  color: #f2c14e;
  font-size: 24px;
}

.workspace {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 82px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 247, 244, 0.92);
  backdrop-filter: blur(10px);
}

.topbar h1 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0;
}

.topbar p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-box {
  display: flex;
  align-items: center;
  width: 320px;
  height: 38px;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
}

.icon-button {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.has-dot::after {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  content: "";
}

.user-chip {
  display: grid;
  min-width: 116px;
  min-height: 38px;
  align-content: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
}

.user-chip span {
  color: var(--muted);
}

.user-chip .connection-status {
  color: var(--amber);
  font-size: 11px;
}

.user-chip .connection-status.connected {
  color: var(--green);
}

.content {
  display: grid;
  gap: 18px;
  padding: 22px 28px 32px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.table-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 10px;
}

.table-toolbar strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}

.table-toolbar span {
  color: var(--muted);
  font-size: 12px;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.select,
.text-input {
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  resize: vertical;
  min-height: 110px;
}

.module-switch {
  display: inline-flex;
  gap: 0;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.module-switch-button {
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.module-switch-button.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

.primary-button,
.ghost-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.primary-button {
  background: var(--teal);
  color: #fff;
}

.ghost-button {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

.danger-button {
  background: var(--red-weak);
  color: var(--red);
}

.primary-button:disabled,
.ghost-button:disabled,
.danger-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.kpi-card,
.panel,
.mini-card,
.table-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.kpi-card {
  display: grid;
  gap: 12px;
  min-height: 132px;
  padding: 16px;
}

.kpi-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}

.kpi-value {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0;
}

.kpi-trend {
  color: var(--green);
  font-size: 13px;
}

.kpi-trend.warn {
  color: var(--amber);
}

.panel {
  min-width: 0;
  padding: 16px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.panel-title {
  margin: 0;
  font-size: 16px;
}

.panel-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 18px;
}

.ops-flow-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.driver-kpi-grid {
  display: grid;
}

.map-panel {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(10, 119, 112, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(47, 111, 186, 0.08) 1px, transparent 1px),
    #f8fbf7;
  background-size: 40px 40px;
}

.route-line {
  position: absolute;
  left: 72px;
  right: 92px;
  top: 172px;
  height: 4px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--teal), var(--blue), var(--amber));
}

.route-stop,
.vehicle-dot {
  position: absolute;
  display: grid;
  place-items: center;
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(10, 119, 112, 0.12);
}

.route-stop {
  width: 18px;
  height: 18px;
  background: #fff;
  border: 4px solid var(--teal);
}

.vehicle-dot {
  width: 36px;
  height: 36px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
}

.vehicle-dot.ext {
  background: var(--violet);
}

.map-card {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 250px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
}

.map-card strong {
  display: block;
  margin-bottom: 6px;
}

.map-card span {
  color: var(--muted);
  font-size: 12px;
}

.stack {
  display: grid;
  gap: 12px;
}

.mini-card {
  padding: 12px;
}

.mini-card h4 {
  margin: 0 0 8px;
  font-size: 14px;
}

.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.cell-sub {
  display: inline-block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.chip {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.chip.green {
  background: var(--green-weak);
  color: var(--green);
}

.chip.teal {
  background: var(--teal-weak);
  color: var(--teal);
}

.chip.blue {
  background: var(--blue-weak);
  color: var(--blue);
}

.chip.amber {
  background: var(--amber-weak);
  color: var(--amber);
}

.chip.red {
  background: var(--red-weak);
  color: var(--red);
}

.chip.violet {
  background: var(--violet-weak);
  color: var(--violet);
}

.table-panel {
  overflow: hidden;
}

.selectable-table {
  overflow-x: auto;
}

.selectable-table table {
  min-width: 980px;
}

.selectable-table tr[data-select-order],
.selectable-table tr[data-select-complaint] {
  cursor: pointer;
}

.selectable-table tbody tr:hover {
  background: #f7faf8;
}

.selected-row {
  background: var(--blue-weak);
  box-shadow: inset 3px 0 0 var(--blue);
}

.empty-state {
  display: grid;
  min-height: 120px;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 13px;
}

.empty-state strong,
.empty-state span {
  display: block;
}

.empty-state.error-state {
  gap: 6px;
  min-height: 180px;
  color: var(--red);
}

.ops-flow-grid .table-panel {
  overflow-x: auto;
}

.ops-flow-grid table {
  min-width: 1120px;
}

.split-kpi {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.overview-card {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.overview-card span {
  color: var(--muted);
  font-size: 12px;
}

.overview-card strong {
  font-size: 18px;
}

.module-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.module-pill {
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.module-pill.green {
  background: var(--green-weak);
  color: var(--green);
}

.module-pill.amber {
  background: var(--amber-weak);
  color: var(--amber);
}

.module-pill.blue {
  background: var(--blue-weak);
  color: var(--blue);
}

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.workflow-step {
  display: grid;
  gap: 6px;
  min-height: 82px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.workflow-step span {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: var(--blue-weak);
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.workflow-step strong {
  font-size: 13px;
  line-height: 1.4;
}

.order-detail-head,
.complaint-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.order-detail-head h3,
.complaint-detail-head h3 {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.35;
}

.order-detail-head span,
.complaint-detail-head span {
  color: var(--muted);
  font-size: 12px;
}

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

.complaint-detail-grid {
  margin-top: 0;
}

.detail-item {
  display: grid;
  gap: 5px;
  min-height: 70px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.detail-item span {
  color: var(--muted);
  font-size: 12px;
}

.detail-item strong {
  font-size: 13px;
  line-height: 1.45;
}

.order-progress {
  margin: 12px 0;
}

.progress-steps {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.progress-step {
  display: grid;
  gap: 5px;
  justify-items: center;
  min-height: 62px;
  padding: 10px 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  text-align: center;
}

.progress-step span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: #edf0ec;
  font-size: 12px;
  font-weight: 800;
}

.progress-step.done {
  border-color: rgba(10, 119, 112, 0.22);
  background: var(--teal-weak);
  color: var(--teal);
}

.progress-step.done span {
  background: var(--teal);
  color: #fff;
}

.money-breakdown {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.money-block {
  display: grid;
  gap: 5px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}

.money-block span,
.money-block small {
  color: var(--muted);
  font-size: 12px;
}

.money-block strong {
  font-size: 18px;
}

.money-block.green strong {
  color: var(--green);
}

.money-block.blue strong {
  color: var(--blue);
}

.money-block.amber strong {
  color: var(--amber);
}

.money-block.red strong {
  color: var(--red);
}

.money-block.violet strong {
  color: var(--violet);
}

.order-actions,
.order-submit-bar {
  margin-top: 12px;
}

.order-submit-bar,
.complaint-handle-box {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.order-submit-bar {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.order-submit-bar span,
.complaint-handle-box span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.order-complaint-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.order-complaint-summary strong {
  display: block;
  margin-bottom: 5px;
  font-size: 16px;
}

.order-complaint-summary span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.order-complaint-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 280px;
}

.complaint-sub-switch {
  margin-top: -2px;
}

.related-complaint-list {
  display: grid;
  gap: 10px;
}

.related-complaint-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  cursor: pointer;
}

.related-complaint-card:hover {
  border-color: rgba(47, 111, 186, 0.28);
  background: #fff;
}

.related-complaint-card > div:first-child > strong,
.related-complaint-card > div:first-child > span,
.related-complaint-card > div:first-child > small {
  display: block;
}

.related-complaint-card > div:first-child > span {
  margin-top: 5px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
}

.related-complaint-card > div:first-child > small {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}

.related-complaint-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  min-width: 120px;
}

.action-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.small {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.reminder-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.reminder-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.reminder-card span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.reminder-card small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 13px;
  vertical-align: middle;
}

th {
  background: var(--panel-soft);
  color: var(--muted);
  font-weight: 600;
}

tr:last-child td {
  border-bottom: 0;
}

.split-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.4fr 0.8fr;
  gap: 14px;
}

.order-pool {
  display: grid;
  gap: 10px;
}

.order-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.schedule-board {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.driver-schedule-board {
  margin-top: 12px;
}

.board-grid {
  display: grid;
  min-width: 760px;
  grid-template-columns: 120px repeat(5, 1fr);
}

.driver-schedule-grid {
  min-width: 860px;
  grid-template-columns: 160px repeat(7, 1fr) 92px;
}

.board-cell,
.board-head {
  min-height: 74px;
  padding: 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.board-head {
  min-height: 44px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.board-cell.vehicle-name {
  font-weight: 700;
  background: #fbfcfa;
}

.board-cell.driver-name {
  font-weight: 700;
  background: #fbfcfa;
}

.board-action-cell {
  display: grid;
  place-items: center;
}

.task-block {
  display: grid;
  gap: 3px;
  min-height: 54px;
  padding: 8px;
  border-radius: 8px;
  background: var(--blue-weak);
  color: var(--blue);
  font-size: 12px;
}

.task-block.ext {
  background: var(--violet-weak);
  color: var(--violet);
}

.task-block.warn {
  background: var(--amber-weak);
  color: var(--amber);
}

.task-block.idle {
  background: var(--green-weak);
  color: var(--green);
}

.shift-tag {
  display: grid;
  place-items: center;
  min-height: 48px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 12px;
}

.shift-tag.blue {
  background: var(--blue-weak);
  color: var(--blue);
}

.shift-tag.violet {
  background: var(--violet-weak);
  color: var(--violet);
}

.shift-tag.idle {
  background: #eef1ef;
  color: var(--muted);
}

.shift-tag.warn {
  background: var(--amber-weak);
  color: var(--amber);
}

.legend-row {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: flex-end;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
}

.legend-row span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.legend-dot.blue {
  background: var(--blue);
}

.legend-dot.violet {
  background: var(--violet);
}

.legend-dot.slate {
  background: #aab4af;
}

.inline-toolbar {
  margin-bottom: 10px;
}

.range-sep {
  color: var(--muted);
}

.footer-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.driver-row,
.alert-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.driver-row:last-child,
.alert-row:last-child {
  border-bottom: 0;
}

.driver-row strong,
.alert-row strong {
  display: block;
  margin-bottom: 3px;
  font-size: 13px;
}

.driver-row span,
.alert-row span {
  color: var(--muted);
  font-size: 12px;
}

.driver-doc-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.driver-profile-card {
  display: grid;
  gap: 12px;
}

.driver-profile-head {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.driver-avatar-preview {
  display: grid;
  width: 72px;
  height: 72px;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.driver-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.driver-avatar-preview span {
  color: var(--blue);
  font-size: 28px;
  font-weight: 800;
}

.driver-profile-head h3 {
  margin: 0 0 5px;
  font-size: 18px;
}

.driver-profile-head span {
  color: var(--muted);
  font-size: 12px;
}

.driver-doc-alert {
  display: grid;
  gap: 5px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.driver-doc-alert.ok {
  background: var(--green-weak);
  color: var(--green);
}

.driver-doc-alert.warn {
  background: var(--amber-weak);
  color: var(--amber);
}

.driver-doc-alert span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.driver-doc-workspace {
  display: grid;
  gap: 14px;
}

.driver-doc-category-bar {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.driver-doc-category {
  display: grid;
  gap: 5px;
  min-height: 76px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.driver-doc-category.active {
  border-color: rgba(47, 111, 186, 0.38);
  background: var(--blue-weak);
  color: var(--blue);
}

.driver-doc-category span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.driver-doc-main {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 14px;
}

.driver-doc-upload-panel {
  display: grid;
  gap: 12px;
}

.driver-doc-upload-panel span,
.driver-doc-upload-panel small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.driver-upload-box {
  display: grid;
  gap: 7px;
  min-height: 150px;
  align-content: center;
  padding: 16px;
  border: 1px dashed var(--blue);
  border-radius: 8px;
  background: var(--blue-weak);
  color: var(--blue);
  cursor: pointer;
}

.driver-upload-box input {
  max-width: 100%;
}

.driver-upload-box span {
  color: var(--muted);
}

.driver-doc-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.driver-doc-card {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 12px;
  min-height: 150px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.driver-doc-thumb {
  display: grid;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--blue);
  font-weight: 800;
}

.driver-doc-thumb img {
  width: 100%;
  height: 100%;
  min-height: 126px;
  object-fit: cover;
}

.driver-doc-body {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.driver-doc-body span,
.driver-doc-body small,
.driver-doc-body p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.driver-expiry-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--panel-soft);
}

.driver-expiry-line strong,
.driver-expiry-line span {
  font-size: 12px;
}

.driver-expiry-line.green {
  background: var(--green-weak);
  color: var(--green);
}

.driver-expiry-line.amber {
  background: var(--amber-weak);
  color: var(--amber);
}

.driver-expiry-line.red {
  background: var(--red-weak);
  color: var(--red);
}

.driver-expiry-line span {
  color: currentColor;
  opacity: 0.76;
}

.link-button {
  text-decoration: none;
}

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

.order-form-grid,
.complaint-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: var(--muted);
  font-size: 12px;
}

.progress {
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: #edf0ec;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.progress-mini {
  display: grid;
  min-width: 120px;
  gap: 6px;
}

.progress-mini span {
  color: var(--muted);
  font-size: 12px;
}

.bar-list {
  display: grid;
  gap: 12px;
}

.bar-row {
  display: grid;
  grid-template-columns: 92px 1fr 48px;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.bar-track {
  height: 10px;
  overflow: hidden;
  border-radius: 99px;
  background: #edf0ec;
}

.bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--blue));
}

.permission-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.permission-notice strong {
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
}

.permission-notice span {
  color: var(--muted);
  font-size: 13px;
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric-tile {
  display: grid;
  gap: 8px;
  min-height: 118px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.metric-tile span,
.metric-tile small {
  color: var(--muted);
}

.metric-tile strong {
  font-size: 26px;
  letter-spacing: 0;
}

.metric-tile.green {
  border-left: 4px solid var(--green);
}

.metric-tile.blue {
  border-left: 4px solid var(--blue);
}

.metric-tile.red {
  border-left: 4px solid var(--red);
}

.metric-tile.violet {
  border-left: 4px solid var(--violet);
}

.metric-tile.amber {
  border-left: 4px solid var(--amber);
}

.fuel-price-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.fuel-price-grid .metric-tile {
  min-height: 102px;
  box-shadow: none;
}

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

.fuel-manual-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.fuel-manual-card h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

.compact-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.full-field {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.full-field span {
  color: var(--muted);
  font-size: 13px;
}

.fuel-margin-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.fuel-margin-preview span {
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
}

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

.settlement-path-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.settlement-path-card.cash {
  border-left: 4px solid var(--green);
}

.settlement-path-card.credit {
  border-left: 4px solid var(--blue);
}

.settlement-path-card h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

.donut-wrap {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 18px;
  align-items: center;
}

.donut {
  position: relative;
  display: grid;
  width: 150px;
  height: 150px;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #fff 0 54%, transparent 55%),
    conic-gradient(var(--teal) calc(var(--value) * 1%), #e6ebe5 0);
}

.donut strong {
  font-size: 28px;
  line-height: 1;
}

.donut span {
  position: absolute;
  bottom: 34px;
  color: var(--muted);
  font-size: 12px;
}

.handover-detail {
  display: grid;
  gap: 14px;
}

.handover-base-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.handover-base-item,
.handover-asset-box,
.handover-archive-note {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.handover-base-item {
  display: grid;
  gap: 5px;
  min-height: 68px;
}

.handover-base-item span,
.handover-asset-box span,
.handover-archive-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.handover-base-item strong,
.handover-asset-box strong {
  font-size: 14px;
}

.handover-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.handover-check-group {
  display: grid;
  gap: 8px;
}

.handover-check-group h3 {
  margin: 0;
  font-size: 14px;
}

.handover-check-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-height: 60px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.handover-check-row strong,
.handover-check-row span {
  display: block;
}

.handover-check-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.handover-asset-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.compact-rules div {
  min-height: 72px;
}

.formula-list {
  display: grid;
  gap: 12px;
}

.formula-list div {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.formula-list strong {
  font-size: 13px;
}

.formula-list span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.timeline {
  display: grid;
  gap: 10px;
}

.timeline-item {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.timeline-item strong {
  font-size: 12px;
}

.timeline-item span,
.timeline-item small {
  color: var(--muted);
  font-size: 12px;
}

.money-positive {
  color: var(--green);
}

.money-negative {
  color: var(--red);
  font-weight: 800;
}

.hidden {
  display: none !important;
}

.login-screen {
  min-height: 100vh;
  padding: 32px;
  background:
    linear-gradient(180deg, rgba(10, 119, 112, 0.08), transparent 42%),
    var(--bg);
}

.login-card {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.login-brand strong {
  display: block;
  font-size: 18px;
}

.login-brand span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.login-hero {
  display: grid;
  gap: 20px;
  grid-template-columns: 1.05fr 1.3fr;
  padding: 20px 0;
}

.hero-copy {
  padding: 12px 8px 0 0;
}

.hero-copy h1 {
  margin: 0 0 10px;
  font-size: 32px;
  line-height: 1.15;
}

.hero-copy p {
  margin: 0;
  color: var(--muted);
  max-width: 520px;
  line-height: 1.7;
}

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

.role-card {
  display: grid;
  gap: 6px;
  min-height: 112px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
}

.role-card strong {
  font-size: 15px;
}

.role-card span,
.role-card small {
  color: var(--muted);
}

.role-card small {
  line-height: 1.5;
}

.role-card.active {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(10, 119, 112, 0.12);
}

.login-policy {
  display: grid;
  gap: 8px;
  min-height: 112px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.login-policy strong {
  font-size: 16px;
}

.login-policy span,
.login-policy small {
  color: var(--muted);
  line-height: 1.6;
}

.login-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.login-error {
  margin: 10px 0 0;
  color: var(--red);
  font-size: 13px;
  line-height: 1.5;
}

.production-login-fields {
  display: flex;
  gap: 8px;
  flex: 1;
}

.production-login-fields input {
  width: 150px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--ink);
  font: inherit;
}

.account-toolbar,
.account-editor-header,
.account-editor-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.account-toolbar {
  margin-bottom: 14px;
}

.account-toolbar > div,
.account-editor-header {
  display: grid;
  gap: 4px;
}

.account-toolbar .cell-sub {
  display: block;
}

.account-editor {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.account-editor-header {
  grid-template-columns: 1fr auto;
}

.account-form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.account-editor input,
.account-editor select {
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.form-hint {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 680px) {
  .login-actions,
  .production-login-fields {
    align-items: stretch;
    flex-direction: column;
  }

  .production-login-fields input {
    width: auto;
  }

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

.role-summary {
  display: grid;
  gap: 10px;
  padding: 0 4px;
}

.role-summary-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.role-summary-card strong {
  display: block;
  margin-bottom: 3px;
  font-size: 14px;
}

.role-summary-card span {
  color: rgba(246, 247, 244, 0.72);
  font-size: 12px;
}

.role-scope {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.role-scope .chip {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.role-scope .chip.blue {
  background: rgba(47, 111, 186, 0.18);
  color: #d9e9ff;
}

.role-scope .chip.green {
  background: rgba(63, 139, 80, 0.2);
  color: #d5f2da;
}

.role-scope .chip.amber {
  background: rgba(189, 122, 17, 0.18);
  color: #ffdca7;
}

.role-scope .chip.red {
  background: rgba(200, 73, 62, 0.18);
  color: #ffd0cb;
}

.role-scope .chip.violet {
  background: rgba(104, 87, 184, 0.18);
  color: #ded8ff;
}

.sidebar .nav {
  flex: 1;
  overflow: auto;
}

.order-search {
  width: 360px;
}

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

.fuel-card {
  display: grid;
  gap: 8px;
  min-height: 120px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.fuel-card strong {
  display: block;
  font-size: 14px;
}

.fuel-card span {
  color: var(--muted);
  font-size: 12px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  transform: translateY(24px);
  min-width: 240px;
  max-width: 360px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #17201d;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
  box-shadow: var(--shadow);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 1280px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid,
  .split-grid,
  .insight-grid {
    grid-template-columns: 1fr;
  }

  .donut-wrap {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1180px) {
  body {
    min-width: 1180px;
  }
}
