* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #f3f6fa;
  color: #172e43;
  font:
    14px/1.6 -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    'Microsoft YaHei',
    sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
.button {
  border: 0;
  border-radius: 8px;
  padding: 10px 17px;
  background: #126b61;
  color: #fff;
  cursor: pointer;
  display: inline-block;
  text-decoration: none;
}
button:hover {
  filter: brightness(0.94);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.secondary {
  background: #e6edf3;
  color: #243d55;
}
.danger {
  background: #b84246;
}
.small {
  font-size: 12px;
  padding: 6px 10px;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #ced9e3;
  border-radius: 7px;
  background: #fff;
  padding: 10px;
  color: #18344d;
}
textarea {
  min-height: 100px;
  resize: vertical;
}
label {
  display: block;
  margin: 10px 0 5px;
  color: #4f6376;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 28px;
  letter-spacing: -0.5px;
}
h2 {
  font-size: 20px;
}
h3 {
  font-size: 16px;
}
a {
  color: #126b61;
}
.muted {
  color: #6b7d8f;
}
.card {
  padding: 24px;
  background: white;
  border: 1px solid #e0e7ef;
  border-radius: 12px;
  margin-bottom: 20px;
  box-shadow: 0 3px 14px #14375304;
}
.row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.row input,
.row select {
  width: auto;
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 22px;
}
.grid .wide {
  grid-column: 1/-1;
}
.badge {
  display: inline-block;
  border-radius: 6px;
  padding: 3px 8px;
  background: #eef2f7;
  color: #40576b;
  font-size: 12px;
  margin: 2px;
}
.badge.ok {
  background: #ddf4e9;
  color: #177454;
}
.badge.warn {
  background: #fff0d9;
  color: #945b12;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  white-space: nowrap;
}
td,
th {
  padding: 13px 12px;
  border-bottom: 1px solid #edf1f5;
}
th {
  font-size: 12px;
  color: #718396;
  font-weight: 500;
  background: #fafbfd;
}
.table-scroll {
  overflow: auto;
}
pre {
  white-space: pre-wrap;
  word-break: break-word;
  font: inherit;
}
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  background: #fff1db;
  color: #80581b;
  margin-bottom: 16px;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: #1e354c;
  color: white;
  border-radius: 9px;
  padding: 12px 22px;
  z-index: 99;
  max-width: 90%;
  display: none;
}
.file-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #edf1f5;
  padding: 10px 0;
  flex-wrap: wrap;
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.empty {
  text-align: center;
  color: #8393a2;
  padding: 50px 20px;
}
.contract {
  line-height: 1.9;
}
.contract dt {
  color: #7a8897;
}
.contract dd {
  margin: 0 0 12px;
}
.signature {
  width: 100%;
  height: 190px;
  border: 1px dashed #8196a8;
  border-radius: 8px;
  touch-action: none;
  background: white;
}
.hint {
  font-size: 12px;
  color: #7a8897;
}
.timeline {
  border-left: 2px solid #dce6ee;
  margin-left: 5px;
  padding-left: 20px;
}
.timeline p {
  margin-bottom: 16px;
}
dialog {
  border: 0;
  border-radius: 14px;
  max-width: 900px;
  width: 92%;
  max-height: 90vh;
  overflow: auto;
  padding: 26px;
  box-shadow: 0 20px 80px #0003;
}
dialog::backdrop {
  background: #17324980;
}
dialog img {
  max-width: 100%;
  display: block;
  margin: auto;
}
@media (max-width: 640px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .card {
    padding: 17px;
  }
  h1 {
    font-size: 23px;
  }
  .row {
    gap: 8px;
  }
}

.performance-card {
  background: white;
  border-radius: 10px;
  padding: 16px 14px;
  margin-bottom: 12px;
  box-shadow: 0 2px 6px #23304603;
}
.performance-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}
.performance-heading h2 {
  font-size: 16px;
  margin: 0;
  color: #202c40;
}
.performance-heading small {
  font-size: 10px;
  background: #f3f4f7;
  border-radius: 3px;
  padding: 2px 5px;
  color: #8290a7;
}
.performance-heading > span {
  font-size: 12px;
  color: #909db6;
}
.performance-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  text-align: center;
}
.performance-metrics > div + div {
  border-left: 1px solid #e0e5ee;
}
.performance-metrics b {
  display: block;
  font-size: 23px;
  line-height: 1.2;
  color: #202b3d;
}
.performance-metrics span {
  font-size: 12px;
  color: #909db6;
}
.performance-chart {
  display: block;
  width: 100%;
  height: auto;
  max-height: 300px;
}
.performance-chart text {
  fill: #8998b3;
  font-size: 10px;
}
.category-row {
  margin: 16px 0 4px;
}
.category-row > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}
.category-row b {
  font-weight: 500;
  white-space: nowrap;
}
.category-row span > i {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 7px;
}
.category-track {
  background: #f1f3f8;
  height: 5px;
  border-radius: 8px;
  margin-top: 8px;
  overflow: hidden;
}
.category-track i {
  display: block;
  height: 100%;
  border-radius: 8px;
}
.performance-note,
.performance-empty {
  font-size: 11px;
  color: #939eae;
  line-height: 1.8;
}
.performance-note {
  padding: 0 4px;
}
.performance-empty {
  text-align: center;
  padding: 6px;
}

.accident-report {
  max-width: 760px;
  margin: auto;
  background: white;
  padding: 0 12px 80px;
}
.report-top {
  display: flex;
  align-items: center;
  gap: 25px;
}
.report-top h1 {
  font-size: 18px;
}
.report-top button,
.report-query button {
  background: #39393d;
  color: white;
  border-radius: 20px;
  white-space: nowrap;
}
.accident-report section {
  margin: 28px 0 38px;
}
.accident-report h2 {
  font-size: 18px;
  color: #101216;
  margin: 0 0 9px;
}
.report-query {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 9px 0;
}
.report-query input {
  flex: 1;
  min-width: 0;
}
.report-query button {
  padding: 7px 17px;
}
.accident-report input,
.accident-report textarea {
  border-radius: 3px;
  border-color: #d8d9df;
  background: white;
}
.accident-report label {
  font-weight: 400;
  margin-top: 12px;
}
.accident-report textarea {
  min-height: 100px;
}
.report-count {
  text-align: right;
  font-size: 12px;
  color: #929aaa;
}
.report-photos {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.report-photos img {
  width: 76px;
  height: 76px;
  object-fit: cover;
  border-radius: 4px;
}
.report-submit {
  width: 100%;
  background: #505054;
  border-radius: 0;
  padding: 15px;
  font-size: 18px;
}
.report-summary {
  background: #f7f8fa;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 13px;
}
.report-summary p {
  overflow-wrap: anywhere;
}
#report-results button {
  display: block;
  font-size: 12px;
  margin: 8px 0;
  background: #f0f2f6;
  color: #263445;
  width: 100%;
  text-align: left;
}

.accident-report .photo-picker {
  position: relative;
  display: grid;
  place-items: center;
  width: 80px;
  height: 80px;
  background: #f3f4f6;
  color: #bfc3ca;
  font-size: 32px;
  cursor: pointer;
  margin-top: 8px;
}
.photo-picker input[type='file'] {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.photo-picker:focus-within {
  outline: 2px solid #4776ff;
}

.order-edit-tabs{display:flex;position:sticky;top:0;z-index:3;background:#fff;border-bottom:1px solid #eee;margin-bottom:20px}.order-edit-tabs button{flex:1;background:white;color:#687386;border-radius:0;padding:12px 3px;border-bottom:3px solid transparent}.order-edit-tabs button.chosen{color:#252b35;border-bottom-color:#8d8d93}.order-field-group[hidden]{display:none}.order-field-group{display:grid;gap:8px}.order-field-group input,.order-field-group select,.order-field-group textarea{margin-bottom:6px}.order-form-meta{background:#f7f8fa;padding:10px 14px;color:#6c7787;font-size:12px}.documents-page{background:#fff;padding:14px}.documents-page h1{font-size:20px}.document-row{border-bottom:1px solid #e4e6eb}.document-row summary{list-style:none;padding:18px 5px;display:flex;justify-content:space-between;gap:8px;cursor:pointer;font-size:14px}.document-row summary span:last-child{color:#8290a0;white-space:nowrap}.document-row button{margin:8px 4px;background:#f1f3f6;color:#22394f;font-size:12px}.document-upload{font-size:13px;margin:14px 4px;color:#456b9c}
