/* ===== 问题查看页面样式 ===== */

.issue-filters {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
}

.issue-filters .filter-group {
  display: flex; flex-direction: column; gap: 4px;
}

.issue-filters label {
  font-size: 12px; font-weight: 600;
  color: var(--text-2);
}

.issue-filters input,
.issue-filters select {
  padding: 8px 12px;
  font-size: 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--bg-card);
  color: var(--text);
  transition: var(--transition);
  min-width: 160px;
}

.issue-filters input:focus,
.issue-filters select:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.issue-filters .filter-actions {
  display: flex; align-items: flex-end; gap: 8px;
}

.notification-filters {
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) minmax(140px, 0.8fr) minmax(140px, 0.8fr) minmax(140px, 0.8fr) minmax(140px, 0.8fr) auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 12px;
  padding: 18px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.notification-filters .filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.notification-filters label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-2);
}

.notification-filters input,
.notification-filters select {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  font-size: 14px;
  color: var(--text);
  background: #fff;
  border: 1.5px solid #b8c2d0;
  border-radius: var(--radius-xs);
  transition: var(--transition);
}

.notification-filters select {
  cursor: pointer;
}

.notification-filters input:focus,
.notification-filters select:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.notification-filters .filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.notification-filter-count {
  font-size: 12px;
  color: var(--text-3);
  margin: 0 0 12px;
}

.issue-summary-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.issue-summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  transition: var(--transition);
}

.issue-summary-card:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.issue-summary-card .value { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; }
.issue-summary-card .label { font-size: 13px; color: var(--text-3); margin-top: 4px; }
.issue-summary-card.accent .value { color: var(--accent); }
.issue-summary-card.red .value { color: var(--red); }
.issue-summary-card.amber .value { color: var(--amber); }
.issue-summary-card.green .value { color: var(--green); }

.issue-trend-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

.issue-trend-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.issue-trend-head h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
}

.issue-trend-actions {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.issue-trend-canvas {
  display: block;
  width: 100%;
  height: 200px;
}

.issue-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow-x: auto;
  overflow-y: hidden;
}

.issue-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: fixed;
}

.issue-table th {
  background: var(--bg-subtle);
  color: var(--text-2);
  font-weight: 600;
  font-size: 12px;
  text-align: left;
  padding: 8px 8px;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}

.issue-table td {
  padding: 8px 8px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text);
  vertical-align: middle;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.45;
}

.issue-table td.long-text {
  white-space: normal;
}

.platform-company-hint {
  margin-top: 3px;
  color: var(--text-3);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.waybill-status-table,
.waybill-active-table,
.waybill-unclosed-table {
  min-width: 0;
  font-size: 12px;
}

.waybill-status-table th,
.waybill-status-table td,
.waybill-active-table th,
.waybill-active-table td,
.waybill-unclosed-table th,
.waybill-unclosed-table td {
  padding: 6px 5px;
  line-height: 1.38;
}

.waybill-status-table th,
.waybill-active-table th,
.waybill-unclosed-table th,
.notification-table th,
.issue-list-table th {
  white-space: normal;
  text-align: center;
}

.waybill-status-table col:nth-child(1),
.waybill-active-table col:nth-child(1),
.waybill-unclosed-table col:nth-child(1) { width: 4%; }
.waybill-status-table col:nth-child(2),
.waybill-active-table col:nth-child(2),
.waybill-unclosed-table col:nth-child(2) { width: 8%; }
.waybill-status-table col:nth-child(3) { width: 11%; }
.waybill-status-table col:nth-child(4) { width: 8%; }
.waybill-status-table col:nth-child(5) { width: 8%; }
.waybill-status-table col:nth-child(6) { width: 10%; }
.waybill-status-table col:nth-child(7) { width: 13%; }
.waybill-status-table col:nth-child(8) { width: 29%; }
.waybill-status-table col:nth-child(9) { width: 9%; }
.waybill-active-table col:nth-child(3) { width: 13%; }
.waybill-active-table col:nth-child(4) { width: 6%; }
.waybill-active-table col:nth-child(5) { width: 8%; }
.waybill-active-table col:nth-child(6) { width: 11%; }
.waybill-active-table col:nth-child(7) { width: 8%; }
.waybill-active-table col:nth-child(8) { width: 33%; }
.waybill-active-table col:nth-child(9) { width: 9%; }
.waybill-unclosed-table col:nth-child(3) { width: 13%; }
.waybill-unclosed-table col:nth-child(4) { width: 6%; }
.waybill-unclosed-table col:nth-child(5) { width: 8%; }
.waybill-unclosed-table col:nth-child(6) { width: 10%; }
.waybill-unclosed-table col:nth-child(7) { width: 13%; }
.waybill-unclosed-table col:nth-child(8),
.waybill-unclosed-table col:nth-child(9) { width: 19%; }

.issue-list-table col:nth-child(1) { width: 5%; }
.issue-list-table col:nth-child(2) { width: 10%; }
.issue-list-table col:nth-child(3) { width: 14%; }
.issue-list-table col:nth-child(4) { width: 7%; }
.issue-list-table col:nth-child(5) { width: 11%; }
.issue-list-table col:nth-child(6),
.issue-list-table col:nth-child(7) { width: 11%; }
.issue-list-table col:nth-child(8) { width: 22%; }
.issue-list-table col:nth-child(9) { width: 9%; }

.notification-table {
  min-width: 0;
}
.notification-table th,
.notification-table td {
  padding-left: 10px;
  padding-right: 10px;
}
.notification-table col:nth-child(1) { width: 5%; }
.notification-table col:nth-child(2) { width: 11%; }
.notification-table col:nth-child(3) { width: 12%; }
.notification-table col:nth-child(4) { width: 14%; }
.notification-table col:nth-child(5) { width: 34%; }
.notification-table col:nth-child(6) { width: 8%; }
.notification-table col:nth-child(7) { width: 8%; }
.notification-table col:nth-child(8) { width: 8%; }

.waybill-status-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.waybill-filter-bar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
}

.waybill-filter-bar .filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.waybill-filter-bar label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
}

.waybill-filter-bar input {
  min-width: 240px;
  padding: 8px 12px;
  font-size: 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--bg-card);
  color: var(--text);
}

.waybill-filter-bar input:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.waybill-filter-bar .filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.waybill-filter-result {
  align-self: center;
  color: var(--text-2);
  font-size: 13px;
}

.waybill-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 12px 0;
  color: var(--text-2);
  font-size: 13px;
}

.waybill-page-size,
.waybill-page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.waybill-page-size select {
  height: 34px;
  padding: 0 28px 0 10px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  background: var(--bg-card);
  color: var(--text);
}

.waybill-page-actions .btn {
  min-width: 38px;
  height: 34px;
  padding: 0 10px;
}

.waybill-page-actions .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.waybill-page-gap {
  color: var(--text-3);
  padding: 0 2px;
}

.contact-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.contact-filter-bar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: nowrap;
  margin-bottom: 16px;
  padding: 14px 16px;
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.contact-filter-bar .filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 0;
  min-width: 0;
}

.contact-filter-bar .contact-keyword {
  flex: 1 1 320px;
}

.contact-filter-bar label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
}

.contact-filter-bar input {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 8px 12px;
  font-size: 14px;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-xs);
  background: #ffffff;
  color: var(--text);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06);
}

.contact-filter-bar .contact-keyword input {
  min-width: 300px;
}

.contact-filter-bar input:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.contact-filter-bar .filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.contact-company-table {
  min-width: 0;
}

.contact-company-row {
  cursor: pointer;
}

.contact-company-row.has-wrong td {
  background: #fff7f7;
}

.contact-company-row.has-missing td {
  background: #fffbeb;
}

.contact-company-row.all-correct td {
  background: #f6fef9;
}

.contact-count {
  display: inline-flex;
  min-width: 28px;
  justify-content: center;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 700;
}

.contact-count.wrong,
.contact-status-badge.wrong {
  background: var(--red-light);
  color: var(--red);
}

.contact-count.missing,
.contact-status-badge.missing {
  background: #fef3c7;
  color: #b45309;
}

.contact-count.correct,
.contact-status-badge.correct {
  background: #dcfce7;
  color: #047857;
}

.contact-status-badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.contact-problem-table .contact-status-badge {
  max-width: 8em;
  justify-content: center;
  padding: 4px 7px;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

.contact-detail-head {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 4px 0 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
}

.contact-detail-head h2 {
  margin: 0;
  font-size: 17px;
}

.contact-detail-head p {
  margin: 3px 0 0;
  color: var(--text-2);
  font-size: 13px;
}

.contact-detail-table {
  min-width: 0;
}

.contact-problem-table {
  min-width: 0;
  width: 100%;
  font-size: 12px;
}

.contact-valid-table,
.contact-submissions-table {
  min-width: 0;
  width: 100%;
  font-size: 13px;
}

.contact-valid-table {
  min-width: 1100px;
}

.contact-valid-table th:last-child,
.contact-valid-table td:last-child {
  width: 132px;
  min-width: 132px;
}

.contact-problem-table th,
.contact-problem-table td {
  padding: 6px 5px;
}

.contact-problem-table col:nth-child(1) { width: 3% !important; }
.contact-problem-table col:nth-child(2) { width: 6% !important; }
.contact-problem-table col:nth-child(3) { width: 8% !important; }
.contact-problem-table col:nth-child(4),
.contact-problem-table col:nth-child(5) { width: 13% !important; }
.contact-problem-table col:nth-child(6) { width: 17% !important; }
.contact-problem-table col:nth-child(7) { width: 7% !important; }
.contact-problem-table col:nth-child(8) { width: 18% !important; }
.contact-problem-table col:nth-child(9) { width: 8% !important; }
.contact-problem-table col:nth-child(10) { width: 7% !important; }

.contact-valid-table th,
.contact-valid-table td,
.contact-submissions-table th,
.contact-submissions-table td {
  padding: 7px 6px;
}

.contact-problem-table th {
  text-align: center;
  vertical-align: middle;
}

.contact-problem-table th:first-child,
.contact-problem-table td:first-child {
  text-align: center;
}

.contact-pair {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.contact-person-line {
  display: grid;
  grid-template-columns: 38px minmax(42px, 0.75fr) minmax(82px, 1fr);
  align-items: center;
  column-gap: 3px;
  line-height: 1.42;
  white-space: normal;
}

.contact-person-line .contact-role {
  color: var(--text-2);
  font-weight: 600;
  white-space: nowrap;
}

.contact-person-line .contact-name,
.contact-person-line .contact-phone {
  min-width: 0;
  border-radius: 6px;
  padding: 1px 2px;
}

.contact-person-line .contact-name {
  overflow-wrap: anywhere;
}

.contact-person-line .contact-phone {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.contact-person-line .is-mismatch {
  background: #fee2e2;
  color: #b91c1c;
  font-weight: 700;
}

.contact-action-buttons {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-action-buttons .btn {
  width: 100%;
  min-height: 27px;
  justify-content: center;
  padding: 4px 5px;
  font-size: 12px;
  white-space: nowrap;
}

.contact-time-basis {
  display: grid;
  gap: 6px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.contact-time-basis > div {
  padding-bottom: 5px;
  border-bottom: 1px dashed var(--border);
}

.contact-time-basis > div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.contact-time-basis span {
  color: var(--text-3);
}

.contact-manual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.contact-manual-grid input {
  width: 100%;
  min-width: 0;
  height: 28px;
  padding: 4px 5px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xs);
  font-size: 12px;
  background: #fff;
}

.contact-manual-grid .btn {
  grid-column: 1 / -1;
  min-height: 28px;
  padding: 4px 6px;
  font-size: 12px;
}

.contact-live-message,
.contact-readonly-notice,
.contact-load-error {
  margin-bottom: 12px;
  border-radius: 8px;
  padding: 11px 13px;
  font-size: 14px;
  line-height: 1.55;
}

.contact-success-message {
  border: 1px solid #10b981;
  background: #ecfdf5;
  color: #047857;
}

.contact-readonly-notice {
  border: 1px solid #94a3b8;
  background: #f8fafc;
  color: #334155;
}

.contact-readonly-cell {
  color: var(--text-3);
  font-size: 12px;
}

.contact-load-error {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  border: 1px solid #fca5a5;
  background: #fff1f2;
  color: #991b1b;
}

.contact-load-error span {
  flex: 1 1 240px;
}

.contact-submission-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  white-space: nowrap;
}

.contact-submission-status.pending,
.contact-submission-status.queued,
.contact-submission-status.approved {
  background: #fff7ed;
  color: #9a3412;
}

.contact-submission-status.pulled,
.contact-submission-status.received {
  background: #eff6ff;
  color: #1d4ed8;
}

.contact-submission-status.applied {
  background: #ecfdf5;
  color: #047857;
}

.contact-submission-status.failed,
.contact-submission-status.rejected {
  background: #fee2e2;
  color: #b91c1c;
}

.contact-submission-status.cancelled {
  background: #f1f5f9;
  color: #64748b;
}

.contact-submission-status.superseded {
  background: #eef2ff;
  color: #4338ca;
}

.contact-submission-actions,
.contact-pagination {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.contact-submission-actions .btn {
  min-width: 64px;
  justify-content: center;
}

.contact-pagination {
  justify-content: flex-end;
  margin-top: 12px;
}

.contact-pagination span {
  color: var(--text-2);
  font-size: 13px;
}

.contact-manual-open {
  width: 100%;
  justify-content: center;
}

.contact-maintenance-action {
  display: grid;
  gap: 6px;
  min-width: 104px;
}

.contact-maintenance-action .btn {
  width: 100%;
  min-height: 36px;
  justify-content: center;
  white-space: nowrap;
}

.contact-maintenance-hint {
  max-width: 180px;
  color: var(--text-3);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.contact-submissions-table {
  min-width: 1120px;
}

.contact-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.62);
}

.contact-dialog {
  width: min(720px, 100%);
  max-height: min(86vh, 820px);
  overflow-y: auto;
  border-radius: 8px;
  background: #ffffff;
  padding: 20px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
  color: var(--text);
}

.contact-dialog:focus {
  outline: 3px solid var(--accent-glow);
  outline-offset: 2px;
}

.contact-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.contact-dialog-head h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.35;
}

.contact-dialog-close {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text-2);
  cursor: pointer;
}

.contact-dialog-help,
.contact-dialog-warning {
  margin: 0 0 14px;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.65;
}

.contact-dialog-warning {
  border: 1px solid #fdba74;
  border-radius: 8px;
  background: #fff7ed;
  color: #9a3412;
  padding: 12px;
}

.contact-dialog-error {
  margin-bottom: 12px;
  border-radius: 8px;
  background: #fee2e2;
  color: #b91c1c;
  padding: 10px 12px;
  font-size: 14px;
}

.contact-dialog-error:empty {
  display: none;
}

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

.contact-form-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.contact-form-field-wide {
  grid-column: 1 / -1;
}

.contact-form-field label {
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
}

.contact-form-field input,
.contact-form-field select,
.contact-form-field textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
}

.contact-form-field textarea {
  min-height: 88px;
  resize: vertical;
}

.contact-form-field input:focus,
.contact-form-field select:focus,
.contact-form-field textarea:focus {
  border-color: var(--accent);
  outline: 3px solid var(--accent-glow);
}

.contact-confirm-summary {
  display: grid;
  gap: 0;
  margin: 0 0 18px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  overflow: hidden;
}

.contact-confirm-summary > div {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-light);
}

.contact-confirm-summary > div:last-child {
  border-bottom: 0;
}

.contact-confirm-summary dt {
  color: var(--text-3);
  font-weight: 600;
}

.contact-confirm-summary dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.contact-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.contact-dialog-actions .btn {
  min-height: 44px;
  justify-content: center;
}

.contact-clear-confirm-button {
  border-color: #b42318;
  background: #b42318;
  color: #ffffff;
}

.contact-clear-confirm-button:hover:not(:disabled),
.contact-clear-confirm-button:focus-visible {
  border-color: #912018;
  background: #912018;
}

.vehicle-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 16px;
}

.vehicle-status-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--bg-card);
  padding: 20px;
  transition: var(--transition);
}

.vehicle-status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.vehicle-status-head strong {
  min-width: 0;
  font-size: 16px;
  overflow-wrap: anywhere;
}

.vehicle-status-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
}

.vehicle-status-details {
  flex: 1 1 auto;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.vehicle-status-actions {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

.vehicle-status-actions .contact-maintenance-action,
.vehicle-status-actions .btn {
  width: 100%;
}

.contact-row-wrong td {
  background: #fff7f7;
}

.contact-row-missing td {
  background: #fffbeb;
}

.contact-row-correct td {
  background: #f6fef9;
}

.issue-table tr:last-child td { border-bottom: none; }
.issue-table tr:hover td { background: var(--accent-light); }

/* Weather rows retain their warning-level color even while being hovered. */
.weather-alert-row.weather-alert-row-red td { background: #fef2f2; }
.weather-alert-row.weather-alert-row-orange td { background: #fff7ed; }
.weather-alert-row.weather-alert-row-yellow td { background: #fffbeb; }
.weather-alert-row.weather-alert-row-blue td { background: #eff6ff; }
.weather-alert-row.weather-alert-row-red td:first-child { box-shadow: inset 4px 0 #dc2626; }
.weather-alert-row.weather-alert-row-orange td:first-child { box-shadow: inset 4px 0 #ea580c; }
.weather-alert-row.weather-alert-row-yellow td:first-child { box-shadow: inset 4px 0 #ca8a04; }
.weather-alert-row.weather-alert-row-blue td:first-child { box-shadow: inset 4px 0 #2563eb; }
.weather-alert-row.weather-alert-row-red:hover td { background: #fee2e2; }
.weather-alert-row.weather-alert-row-orange:hover td { background: #ffedd5; }
.weather-alert-row.weather-alert-row-yellow:hover td { background: #fef3c7; }
.weather-alert-row.weather-alert-row-blue:hover td { background: #dbeafe; }

.severity-tag {
  display: inline-block;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
}

.severity-tag.red { background: var(--red-light); color: var(--red); }
.severity-tag.yellow { background: var(--amber-light); color: var(--amber); }
.severity-tag.normal { background: var(--bg-subtle); color: var(--text-2); }

.status-tag {
  display: inline-block;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
}

.status-tag.open { background: var(--red-light); color: var(--red); }
.status-tag.closed { background: var(--green-light); color: var(--green); }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-3);
}

.empty-state .icon { font-size: 48px; margin-bottom: 16px; }
.empty-state p { font-size: 15px; }
.empty-state.compact {
  padding: 32px 20px;
}

.snapshot-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  padding: 12px 16px;
  margin-bottom: 20px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--bg-card);
  font-size: 13px;
  color: var(--text-2);
}

.snapshot-banner strong {
  font-size: 13px;
  color: var(--text);
}

.snapshot-banner.fresh {
  background: var(--green-light);
  border-color: rgba(16, 185, 129, 0.18);
}

.snapshot-banner.stale {
  background: var(--amber-light);
  border-color: rgba(245, 158, 11, 0.18);
}

.snapshot-banner.demo {
  background: var(--accent-light);
  border-color: rgba(67, 97, 238, 0.18);
}

.snapshot-banner.pending {
  background: var(--bg-subtle);
}

.timeline-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 4px 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}

.timeline-item:last-child {
  border-bottom: none;
}

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

.timeline-item span {
  justify-self: end;
  font-size: 12px;
  color: var(--text-3);
}

.timeline-item p {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-2);
}

@media (max-width: 768px) {
  .issue-summary-cards { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .issue-summary-card { padding: 14px 12px; }
  .issue-summary-card .value { font-size: 22px; }
  .issue-summary-card .label { font-size: 12px; }
  .issue-filters { flex-direction: column; padding: 16px; gap: 10px; }
  .issue-filters input,
  .issue-filters select { min-width: 100%; padding: 12px 14px; font-size: 16px; }
  .issue-filters .filter-actions { flex-wrap: wrap; }
  .issue-filters .filter-actions .btn { flex: 1; min-width: 0; justify-content: center; }
  .notification-filters { grid-template-columns: 1fr; padding: 16px; gap: 10px; }
  .notification-filters input,
  .notification-filters select { font-size: 16px; min-height: 46px; }
  .notification-filters .filter-actions { flex-wrap: wrap; }
  .notification-filters .filter-actions .btn { flex: 1; min-width: 0; justify-content: center; }
  .contact-filter-bar { flex-wrap: wrap; padding: 16px; gap: 10px; }
  .contact-filter-bar .filter-group { flex: 1 1 100%; }
  .contact-filter-bar input { min-height: 46px; font-size: 16px; }
  .contact-filter-bar .filter-actions { width: 100%; flex-wrap: wrap; }
  .contact-filter-bar .filter-actions .btn { flex: 1; min-width: 0; justify-content: center; }
  .contact-tabs .btn,
  .contact-action-buttons .btn,
  .contact-manual-open,
  .contact-maintenance-action .btn,
  .vehicle-status-actions .btn,
  .contact-submission-actions .btn,
  .contact-pagination .btn { min-height: 44px; }
  .contact-submission-actions,
  .contact-pagination { width: 100%; }
  .contact-submission-actions .btn,
  .contact-pagination .btn { flex: 1 1 0; }
  .contact-submissions-table { min-width: 0; }
  .snapshot-banner { align-items: flex-start; font-size: 12px; padding: 10px 14px; }
  .timeline-item {
    grid-template-columns: 1fr;
  }
  .timeline-item span {
    justify-self: start;
  }

  /* 表格改为卡片式布局 - 优化 */
  .issue-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .issue-table,
  .issue-table tbody,
  .issue-table tr,
  .issue-table td {
    display: block;
    width: 100%;
    min-width: 0;
  }
  .issue-table tr {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    margin-bottom: 10px;
    padding: 14px 16px;
    box-shadow: var(--shadow-sm);
  }
  .issue-table tr:active {
    background: var(--accent-light);
  }
  .issue-table td {
    border: none;
    padding: 6px 0;
    display: grid;
    grid-template-columns: minmax(64px, max-content) minmax(0, 1fr);
    gap: 6px 12px;
    align-items: start;
    font-size: 14px;
  }
  .issue-table td[data-label="操作"] {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-light);
  }
  .issue-table td[data-label="操作"] .btn {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }
  .issue-table td[data-label="更新方式"],
  .issue-table td[data-label="手动填写"] {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-light);
  }
  .issue-table td[data-label="更新方式"] .btn,
  .issue-table td[data-label="手动填写"] .btn {
    min-height: 44px;
  }
  .issue-table td::before {
    content: attr(data-label);
    font-weight: 600;
    font-size: 13px;
    color: var(--text-3);
    margin-right: 0;
    white-space: nowrap;
    min-width: 0;
  }
  .issue-table td > * {
    min-width: 0;
    max-width: 100%;
  }

  .contact-dialog-overlay {
    align-items: flex-end;
    padding: 10px;
  }

  .contact-dialog {
    width: 100%;
    max-height: calc(100dvh - 20px);
    padding: 16px;
  }

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

  .contact-form-field-wide {
    grid-column: auto;
  }

  .contact-form-field input,
  .contact-form-field textarea {
    font-size: 16px;
  }

  .contact-confirm-summary > div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .contact-dialog-actions .btn {
    flex: 1 1 0;
    min-width: 0;
  }

  .vehicle-status-card {
    padding: 16px;
  }

  .contact-maintenance-hint {
    max-width: none;
  }

  /* 侧边栏折叠为汉堡菜单 */
  .portal-wrap {
    flex-direction: column;
  }
  .portal-sidebar {
    position: fixed;
    top: 0;
    left: -85vw;
    width: 85vw;
    max-width: 320px;
    height: 100vh;
    height: 100dvh;
    z-index: 1001;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .portal-sidebar.open {
    left: 0;
  }
  .portal-main {
    padding: 64px 16px 20px;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-y: visible;
    -webkit-overflow-scrolling: auto;
  }
  .mobile-header {
    display: flex !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-light);
    align-items: center;
    padding: 0 16px;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
  }
  .mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1000;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
  }
  .mobile-overlay.show {
    display: block;
  }

  /* 弹窗全屏 */
  .modal-overlay {
    padding: 0 !important;
  }
  .modal-overlay .modal-box {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    border-radius: 0 !important;
    margin: 0 !important;
  }

  /* 详情页优化 */
  .detail-grid { grid-template-columns: 1fr !important; gap: 8px !important; }
  .detail-item { padding: 10px 14px !important; }
  .detail-item .k { font-size: 12px !important; }
  .detail-item .v { font-size: 15px !important; }
}

.weather-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.weather-level-group {
  margin-bottom: 18px;
  border-left: 4px solid var(--border);
  padding-left: 12px;
}

.weather-level-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 16px;
}

.weather-level-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 2px 9px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.weather-level-group.weather-level-red { border-color: #b91c1c; }
.weather-level-group.weather-level-orange { border-color: #c2410c; }
.weather-level-group.weather-level-yellow { border-color: #a16207; }
.weather-level-group.weather-level-blue { border-color: #1d4ed8; }

.weather-level-group.weather-level-red { background: #fff1f2; }
.weather-level-group.weather-level-orange { background: #fff7ed; }
.weather-level-group.weather-level-yellow { background: #fefce8; }
.weather-level-group.weather-level-blue { background: #eff6ff; }

.weather-level-group .issue-table-wrap {
  border-radius: 8px;
  overflow: hidden;
}

.weather-alert-row.weather-alert-row-red td { background: #fff1f2; }
.weather-alert-row.weather-alert-row-orange td { background: #fff7ed; }
.weather-alert-row.weather-alert-row-yellow td { background: #fefce8; }
.weather-alert-row.weather-alert-row-blue td { background: #eff6ff; }
.weather-alert-row.weather-alert-row-red:hover td { background: #ffe4e6; }
.weather-alert-row.weather-alert-row-orange:hover td { background: #ffedd5; }
.weather-alert-row.weather-alert-row-yellow:hover td { background: #fef3c7; }
.weather-alert-row.weather-alert-row-blue:hover td { background: #dbeafe; }

.weather-level-badge.weather-level-red {
  color: #7f1d1d;
  background: #fee2e2;
  border-color: #dc2626;
}

.weather-level-badge.weather-level-orange {
  color: #9a3412;
  background: #ffedd5;
  border-color: #ea580c;
}

.weather-level-badge.weather-level-yellow {
  color: #713f12;
  background: #fef9c3;
  border-color: #ca8a04;
}

.weather-level-badge.weather-level-blue {
  color: #1e3a8a;
  background: #dbeafe;
  border-color: #2563eb;
}

.weather-history-panel { min-width: 0; }

.weather-history-query {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 6px;
}

.weather-history-query-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.weather-history-query label {
  color: var(--text-2);
  font-size: 12px;
  font-weight: 700;
}

.weather-history-query input {
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  background: var(--bg-card);
}

.weather-history-query input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.weather-history-query-result,
.weather-history-pager {
  color: var(--text-3);
  font-size: 12px;
}

.weather-impact-count {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 8px;
  border: 1px solid var(--accent);
  border-radius: 4px;
  color: var(--accent);
  background: var(--bg-card);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}

.weather-impact-count:hover {
  color: #fff;
  background: var(--accent);
}

.weather-impact-panel {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.weather-impact-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.weather-impact-panel-head h3,
.weather-impact-panel-head p {
  margin: 0;
}

.weather-impact-panel-head p,
.weather-impact-summary,
.weather-impact-waybills {
  color: var(--text-2);
  font-size: 12px;
}

.weather-impact-summary {
  margin-bottom: 10px;
  font-weight: 700;
}

.weather-impact-unpublished {
  padding: 12px;
  border: 1px solid #f59e0b;
  border-radius: 6px;
  color: #92400e;
  background: #fffbeb;
  font-size: 13px;
}

.weather-impact-waybills {
  margin-top: 10px;
}

.weather-history-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

@media (max-width: 640px) {
  .weather-history-query { align-items: stretch; }
  .weather-history-query-field { width: 100%; }
  .weather-history-query input,
  .weather-history-query button { width: 100%; }
  .weather-history-pager { justify-content: flex-start; }
}

@media (min-width: 769px) {
  .mobile-header { display: none !important; }
  .mobile-overlay { display: none !important; }
}
