html, body { background: #f5f6f8; font-size: 15px; }

.entry { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100vh; }
.entry .logo { font-size: 28px; font-weight: 700; background: linear-gradient(135deg, #1989fa, #39c5bb); -webkit-background-clip: text; color: transparent; }
.entry .sub { color: #888; margin-top: 8px; font-size: 13px; }
.entry .loading { color: #999; margin-top: 40px; font-size: 13px; }

.dev-picker { display: none; flex-direction: column; gap: 12px; margin-top: 30px; width: 260px; }
.dev-picker.show { display: flex; }
.dev-tip { text-align: center; color: #999; font-size: 12px; }
.entry-btn {
  padding: 12px 0; border-radius: 8px; border: none; font-size: 15px;
  font-weight: 500; cursor: pointer; font-family: inherit;
}
.entry-customer { background: #1989fa; color: #fff; }
.entry-engineer { background: #07c160; color: #fff; }
.entry-admin    { background: #722ed1; color: #fff; }

.navbar {
  background: #fff; padding: 14px 16px; display: flex; align-items: center;
  justify-content: center; font-weight: 600; font-size: 16px;
  position: relative; border-bottom: 1px solid #eee;
}
.navbar .nav-right { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: #1989fa; font-size: 14px; font-weight: 500; }
.navbar .nav-left  { position: absolute; left: 16px;  top: 50%; transform: translateY(-50%); color: #1989fa; font-size: 14px; }

.company-bar { padding: 12px 16px; background: linear-gradient(135deg, #1989fa, #39c5bb); color: #fff; margin-bottom: 8px; }
.company-bar .cname { font-size: 16px; font-weight: 600; }
.company-bar .csub  { font-size: 12px; opacity: 0.9; margin-top: 4px; }

.form { padding: 12px 16px; }

.field {
  background: transparent;
  border-radius: 0;
  padding: 0;
  margin-bottom: 14px;
}
.field label {
  display: block;
  font-size: 13px;
  color: #666;
  margin-bottom: 6px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  font-size: 15px;
  font-family: inherit;
  color: #333;
  line-height: 1.5;
  background: #fff;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.field textarea { resize: vertical; }

.field select {
  padding-right: 32px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%23999' d='M6 8L0 0h12z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: #1989fa;
  box-shadow: 0 0 0 3px rgba(25, 137, 250, 0.12);
}

.field input:disabled,
.field input[readonly],
.field select:disabled,
.field textarea:disabled {
  background: #f5f6f8;
  color: #999;
  border-color: #e5e7eb;
}

.field input[type="file"] {
  padding: 8px 10px;
  font-size: 13px;
  color: #666;
  border-style: dashed;
  border-color: #dcdfe6;
}

.field input[type="radio"],
.field input[type="checkbox"] {
  width: auto;
  padding: 0;
  margin: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  flex-shrink: 0;
  -webkit-appearance: radio;
  appearance: auto;
}
.field input[type="checkbox"] {
  -webkit-appearance: checkbox;
}

.radio-row { display: flex; gap: 20px; padding: 4px 0; flex-wrap: wrap; }
.radio-row label {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 14px; white-space: nowrap;
}
.radio-row input[type="radio"],
.radio-row input[type="checkbox"] {
  width: auto; padding: 0; margin: 0; flex-shrink: 0;
}

.thumb-list { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.thumb-list img { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; cursor: pointer; }

.btn-primary, .btn-secondary, .btn-success {
  width: 100%; padding: 12px 0; border-radius: 8px; font-size: 16px;
}

.tabs { display: flex; background: #fff; border-bottom: 1px solid #eee; }
.tabs .tab {
  flex: 1; text-align: center; padding: 12px 0;
  font-size: 14px; color: #666; cursor: pointer; position: relative;
}
.tabs .tab.active { color: #1989fa; font-weight: 600; }
.tabs .tab.active::after {
  content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 24px; height: 2px; background: #1989fa; border-radius: 2px;
}

.order-card {
  display: block; background: #fff; margin: 10px 12px; padding: 12px;
  border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.order-card .row1 { display: flex; justify-content: space-between; align-items: center; }
.order-card .order-no { font-size: 13px; color: #666; }
.order-card .row2 { margin-top: 8px; display: flex; gap: 12px; }
.order-card .fault { font-weight: 600; color: #222; }
.order-card .loc { color: #666; font-size: 13px; }
.order-card .row3 { margin-top: 8px; display: flex; justify-content: space-between; color: #999; font-size: 12px; }

.tag { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; background: #eee; color: #666; }
.tag-pending  { background: #fff7e6; color: #fa8c16; }
.tag-accepted, .tag-repairing { background: #e6f7ff; color: #1890ff; }
.tag-verifying { background: #fff1f0; color: #f5222d; }
.tag-closed    { background: #f6ffed; color: #52c41a; }

.detail { padding-bottom: 80px; }
.card { background: #fff; margin: 12px; padding: 12px; border-radius: 8px; }
.card .head {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 12px; border-bottom: 1px solid #f0f0f0; margin-bottom: 12px;
}
.card .no { font-weight: 600; font-size: 15px; }
.card .card-title { font-weight: 600; margin-bottom: 10px; }
.info-row { display: flex; padding: 6px 0; font-size: 14px; }
.info-row .lbl { width: 90px; color: #999; flex-shrink: 0; }

.actions {
  position: fixed; left: 0; right: 0; bottom: 0;
  display: flex; gap: 10px; padding: 10px 16px;
  background: #fff; border-top: 1px solid #eee;
}
.actions button { flex: 1; }

.empty { text-align: center; color: #999; padding: 60px 20px; font-size: 14px; }
.tips  { text-align: center; color: #666; padding: 12px 0; font-size: 13px; }

.toast { top: 50%; left: 50%; transform: translate(-50%, -50%); }

.modal-body {
  background: #fff;
  border-radius: 10px;
  padding: 20px;

  width: 100%;
  max-width: 360px;

  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);

  overflow-y: auto;
  -webkit-overflow-scrolling: touch;

  margin: auto;
  box-sizing: border-box;
}
.modal-body.modal-lg {
  width: 100%;
  max-width: 420px;

  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);

  overflow-y: auto;
  -webkit-overflow-scrolling: touch;

  margin: auto;
  box-sizing: border-box;
}

.modal-body input:not([type="radio"]):not([type="checkbox"]):not([type="file"]):not([type="submit"]):not([type="button"]),
.modal-body select,
.modal-body textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;

  font-size: 14px;
  font-family: inherit;
  color: #333;
  line-height: 1.5;

  background: #fff;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  outline: none;

  -webkit-appearance: none;
  appearance: none;

  transition: border-color .15s ease, box-shadow .15s ease;
}

.modal-body select {
  padding-right: 32px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%23999' d='M6 8L0 0h12z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.modal-body input:focus,
.modal-body select:focus,
.modal-body textarea:focus {
  border-color: #1989fa;
  box-shadow: 0 0 0 3px rgba(25, 137, 250, 0.12);
}

.modal-body input[type="file"] {
  padding: 8px 10px;
  font-size: 13px;
  color: #666;
  border-style: dashed;
  border-color: #dcdfe6;
}

.modal-body input:disabled,
.modal-body input[readonly],
.modal-body select:disabled,
.modal-body textarea:disabled {
  background: #f5f6f8;
  color: #999;
  border-color: #e5e7eb;
}

.modal textarea {
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.modal textarea:focus {
  border-color: #1989fa;
  box-shadow: 0 0 0 3px rgba(25, 137, 250, 0.12);
}

.modal-body input[type="radio"],
.modal-body input[type="checkbox"] {
  width: auto;
  padding: 0;
  margin: 0;
  flex-shrink: 0;
  -webkit-appearance: radio;
  appearance: auto;
}
.modal-body input[type="checkbox"] {
  -webkit-appearance: checkbox;
}

.rate-row { display: flex; justify-content: center; gap: 6px; margin-bottom: 12px; }
.star { font-size: 28px; color: #ddd; cursor: pointer; }
.star.active { color: #ffb400; }

.form-item {
  border: 1px solid #ebeef5; border-radius: 8px; padding: 12px;
  margin-bottom: 12px; background: #fafbfc;
}
.form-item-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px; font-weight: 600; font-size: 13px; color: #1989fa;
}
.form-item-no { color: #1989fa; }
.form-item-del { color: #f5222d !important; font-size: 12px; font-weight: 400; }

.form-item .field {
  background: transparent;
  padding: 0;
  margin-bottom: 10px;
  border-radius: 0;
  border-bottom: none;
}
.form-item .field:last-child { margin-bottom: 0; }

.ri-tip {
  background: #fff7e6; border: 1px solid #ffd591; color: #d46b08;
  font-size: 13px; padding: 8px 12px; border-radius: 6px;
  margin-bottom: 12px; text-align: center;
}
.ri-card {
  border: 1px solid #ebeef5; border-radius: 8px; padding: 12px;
  margin-bottom: 14px; background: #fafbfc;
}
.ri-card-extra { border-color: #d3adf7; background: #f9f0ff; }
.ri-card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid #ebeef5;
}
.ri-card-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ri-card-no { font-weight: 600; font-size: 13px; color: #1989fa; flex-shrink: 0; }
.ri-card-extra .ri-card-no { color: #722ed1; }
.ri-card-sub {
  font-size: 12px; color: #666;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ri-card-del { color: #f5222d !important; font-size: 12px; font-weight: 400; flex-shrink: 0; }

.ri-card .field {
  background: transparent;
  padding: 0;
  margin-bottom: 10px;
  border-radius: 0;
  border-bottom: none;
}
.ri-card .field:last-child { margin-bottom: 0; }
.ri-card .field label { font-size: 12px; color: #888; }

.ri-status-row { display: flex; gap: 14px; flex-wrap: wrap; padding: 2px 0; }
.ri-status-row label {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 13px; color: #333; cursor: pointer; white-space: nowrap;
}
.ri-status-row input[type="radio"] {
  width: auto; padding: 0; margin: 0; flex-shrink: 0;
}

.btn-add-item-wrap { margin: 10px 0; }

.insp-orders {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.insp-order {
  display: block;
  padding: 10px 12px;
  background: #fafbfc;
  border: 1px solid #ebeef5;
  border-radius: 8px;
  transition: background .15s;
}
.insp-order:active { background: #eef5ff; }

.insp-order-top {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.insp-order-no {
  flex: 1;
  min-width: 0;
  color: #1989fa;
  font-weight: 500;
  font-family: Menlo, Consolas, monospace;
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.insp-badge {
  flex-shrink: 0;
  display: inline-block;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.6;
  background: #f0f0f0;
  color: #666;
}
.insp-badge-urgent    { background: #fff1f0; color: #f5222d; }
.insp-badge-pending   { background: #fff7e6; color: #fa8c16; }
.insp-badge-accepted,
.insp-badge-repairing { background: #e6f7ff; color: #1890ff; }
.insp-badge-verifying { background: #fff1f0; color: #f5222d; }
.insp-badge-closed    { background: #f6ffed; color: #52c41a; }

.insp-order-sub {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #666;
  overflow: hidden;
}
.insp-order-sub .item {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.insp-order-sub .item:first-child {
  max-width: 40%;
  color: #333;
}
.insp-order-sub .sep {
  flex-shrink: 0;
  color: #ddd;
}

.insp-orders-more {
  display: block;
  margin-top: 8px;
  padding: 8px 0;
  text-align: center;
  font-size: 12.5px;
  color: #1989fa;
  background: #f5f8ff;
  border-radius: 8px;
}
.insp-orders-more:active { background: #e8f0ff; }

.company-suggest {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  z-index: 50;
  max-height: 300px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #ebeef5;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,.10);
  margin-top: 4px;
}
.company-suggest .cs-item {
  padding: 12px 14px;
  border-bottom: 1px solid #f5f6f8;
  cursor: pointer;
  transition: background .15s;
}
.company-suggest .cs-item:last-child { border-bottom: none; }
.company-suggest .cs-item:hover,
.company-suggest .cs-item.active { background: #f0f7ff; }
.company-suggest .cs-name {
  font-weight: 500;
  font-size: 14px;
  color: #222;
  margin-bottom: 4px;
  word-break: break-all;
}
.company-suggest .cs-name mark {
  background: #fff7cc;
  color: #d48806;
  padding: 0 2px;
  border-radius: 2px;
}
.company-suggest .cs-meta {
  font-size: 12px;
  color: #999;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.company-suggest .cs-meta .cs-badge {
  background: #e6f7ff; color: #1890ff;
  padding: 1px 6px; border-radius: 8px; font-size: 11px;
}
.company-suggest .cs-new {
  padding: 12px 14px;
  text-align: center;
  color: #1989fa;
  font-size: 13px;
  cursor: pointer;
  background: #fafbfc;
}
.company-suggest .cs-new:hover { background: #f0f7ff; }
.company-suggest .cs-empty {
  padding: 20px 14px;
  text-align: center;
  color: #999;
  font-size: 13px;
}

.cand-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 50vh;
  overflow-y: auto;
}
.cand-item {
  display: flex;
  gap: 10px;
  padding: 12px;
  border: 1px solid #ebeef5;
  border-radius: 8px;
  cursor: pointer;
  background: #fafbfc;
  transition: background .15s;
}
.cand-item:hover { background: #f0f7ff; }
.cand-item input[type="radio"] {
  margin-top: 3px;
  flex-shrink: 0;
}
.cand-info { flex: 1; min-width: 0; }
.cand-name {
  font-weight: 500;
  font-size: 14px;
  color: #222;
  word-break: break-all;
}
.cand-meta {
  font-size: 12px;
  color: #999;
  margin-top: 4px;
}