:root {
  --accent: #009688;
  --accent-dark: #00796b;
  --blue: #003a9b;
  --line: #e6e8eb;
  --text: #1f2937;
  --muted: #64748b;
  --bg: #f5f7fa;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background: var(--bg);
  font-family: Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 14px;
}

button,
textarea {
  font: inherit;
}

.layui-container {
  width: min(1400px, calc(100% - 24px));
  margin: 0 auto;
  padding: 12px 0;
}

.layui-row {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 10px;
}

.query-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 44px;
  line-height: 44px;
  border: 1px solid #eee4e4;
  border-radius: 8px 8px 0 0;
  padding: 0 16px;
  background: linear-gradient(180deg, #fafbfc 0%, #f8f9fa 100%);
}

.query-card-header > span {
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
}

.lang-switch-group {
  display: flex;
  background-color: #f1f5f9;
  border-radius: 50px;
  padding: 3px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06);
}

.lang-btn {
  position: relative;
  height: 32px;
  padding: 0 18px;
  border: 0;
  border-radius: 50px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  line-height: 32px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.lang-btn.active {
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  box-shadow: 0 2px 6px rgba(0, 150, 136, 0.3);
}

.lang-btn:not(.active):hover {
  color: #334155;
  background-color: rgba(255, 255, 255, 0.8);
}

.lang-btn:active {
  transform: scale(0.96);
}

.layui-card,
.search-panel {
  background: #fff;
}

.search-panel {
  position: relative;
  min-height: 244px;
  padding: 10px 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.layui-textarea {
  display: block;
  width: 100%;
  min-height: 180px;
  max-height: 180px;
  padding: 8px 10px;
  resize: vertical;
  border: 1px solid #e6e6e6;
  outline: 0;
  background: #fff;
  color: #333;
  line-height: 20px;
}

.layui-textarea:focus {
  border-color: var(--accent);
}

.layui-form-item {
  margin: 10px 0 0;
}

.search-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 80%;
}

.switch-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 104px;
  white-space: nowrap;
}

.switch-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-track {
  width: 28px;
  height: 16px;
  border-radius: 999px;
  background: #d1d5db;
  position: relative;
  transition: background-color 0.2s ease;
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}

.switch-input:checked + .switch-track {
  background: var(--accent);
}

.switch-input:checked + .switch-track::after {
  transform: translateX(12px);
}

.layui-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 2px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  line-height: 30px;
  transition: background-color 0.18s ease, transform 0.18s ease;
}

.layui-btn:hover {
  background: #00877a;
}

.layui-btn:active {
  transform: translateY(1px);
}

.layui-btn-danger {
  background: #ff5722;
}

.layui-btn-danger:hover {
  background: #ef4d1b;
}

.toggle-wrap {
  display: flex;
  justify-content: flex-end;
  margin-top: -32px;
  padding-right: 6px;
}

.toggle-btn {
  min-width: 36px;
  width: 42px;
  font-size: 22px;
  font-family: Arial, sans-serif;
}

.toggle-btn.open #toggleAllIcon {
  transform: rotate(90deg);
}

#toggleAllIcon {
  display: inline-block;
  line-height: 1;
  transition: transform 0.2s ease;
}

.layui-tab-card {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-bottom: 0;
  background: #fff;
}

.layui-tab-title {
  display: flex;
  width: max-content;
  min-width: 100%;
  height: 42px;
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--line);
  font-weight: 800;
}

.layui-tab-title li {
  display: inline-flex;
  align-items: center;
  min-width: 118px;
  height: 42px;
  padding: 0 12px;
  border-right: 1px solid #f1f2f4;
  color: var(--blue);
  cursor: pointer;
  white-space: nowrap;
}

.layui-tab-title li.layui-this {
  background: #f8fbff;
  border-bottom: 2px solid var(--accent);
}

.layui-tab-title li.muted {
  color: #c2c2c2;
}

.layui-tab-title li.green {
  color: var(--accent);
}

.layui-tab-title li.blue {
  color: #01aaed;
}

.layui-tab-title li.red {
  color: #b71c1c;
}

.layui-tab-title li.success {
  color: #5fb878;
}

.layui-tab-title li.orange {
  color: #ff5722;
}

.tab-icon {
  margin-right: 4px;
}

.table-wrap {
  overflow-x: auto;
  padding: 10px 0;
  border: 1px solid var(--line);
  border-top: 0;
  background: #fff;
}

.layui-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
  background: #fff;
}

.layui-table th,
.layui-table td {
  height: 34px;
  padding: 6px 8px;
  border: 1px solid #e6e6e6;
  text-align: left;
  font-size: 15px;
  line-height: 20px;
}

.layui-table th {
  color: #333;
  background: #f2f2f2;
  font-weight: 600;
}

.layui-table td {
  font-weight: 500;
}

.expand-col {
  width: 30px;
}

.showItem {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: var(--accent);
  cursor: pointer;
  font-size: 20px;
  transition: transform 0.2s ease;
}

.showItem.open {
  transform: rotate(90deg);
}

.empty-row td,
.not-found td {
  height: 44px;
  color: #999;
  text-align: center;
}

.detail-row td {
  padding: 0;
  background: #fff;
}

.track-detail {
  padding: 16px 20px 18px 52px;
}

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 170px minmax(110px, auto) 1fr;
  gap: 12px;
  padding: 0 0 14px 20px;
  color: #263238;
  font-size: 15px;
  line-height: 20px;
}

.timeline li:last-child {
  padding-bottom: 0;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 150, 136, 0.16);
}

.timeline li::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 17px;
  bottom: 2px;
  width: 1px;
  background: #dbe3e8;
}

.timeline li:last-child::after {
  display: none;
}

.track-time {
  color: #374151;
  white-space: nowrap;
}

.track-place {
  color: #111827;
  font-weight: 600;
  white-space: nowrap;
}

.track-info {
  color: #1f2937;
}

@media (max-width: 900px) {
  .layui-row {
    grid-template-columns: 1fr;
  }

  .query-card-header {
    border-radius: 8px 8px 0 0;
  }

  .search-actions {
    width: calc(100% - 52px);
  }

  .timeline li {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}
