.driver-training-app {
  --dt-primary: #7AB929;
  --dt-primary-light: rgba(122, 185, 41, 0.14);
  --dt-bg: #F7F8FA;
  --dt-card: #FFFFFF;
  --dt-title: #1D2129;
  --dt-text: #4E5969;
  --dt-text-secondary: #86909C;
  --dt-border: #E5E6EB;
  --dt-danger: #F53F3F;
  --dt-warning: #FF7D00;
  --dt-safe-top: env(safe-area-inset-top, 0px);
  --dt-safe-bottom: env(safe-area-inset-bottom, 0px);
  max-width: 430px;
  min-width: 375px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--dt-bg);
  color: var(--dt-title);
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  position: relative;
  overflow-x: hidden;
}

.driver-training-app * {
  box-sizing: border-box;
}

.driver-training-app--embedded {
  max-width: none;
  min-width: 0;
  min-height: 0;
  height: 100%;
  margin: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.driver-training-app--embedded .dt-page {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: 100%;
  padding-bottom: 0;
}

.driver-training-app--embedded .dt-summary-card {
  margin: 0 16px 8px;
  flex-shrink: 0;
}

.driver-training-app--embedded .dt-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.driver-training-app--embedded .dt-footer {
  position: static;
  left: auto;
  transform: none;
  max-width: none;
  min-width: 0;
  width: 100%;
  flex-shrink: 0;
  z-index: 1;
}

.dt-module-root {
  position: relative;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.dt-footer-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dt-footer-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.dt-footer-row .dt-btn-primary,
.dt-footer-row .dt-btn-secondary {
  flex: 1;
}

.dt-btn-prev {
  flex: 0 0 96px;
  width: 96px;
  height: 48px;
  border: 1px solid var(--dt-border);
  border-radius: 12px;
  background: var(--dt-card);
  color: var(--dt-title);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}

.dt-btn-prev:active {
  background: var(--dt-bg);
}

.dt-footer-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dt-footer-main .dt-btn-primary,
.dt-footer-main .dt-btn-secondary {
  width: 100%;
}

.dt-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-bottom: calc(80px + var(--dt-safe-bottom));
}

.dt-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--dt-card);
  padding-top: var(--dt-safe-top);
  border-bottom: 1px solid var(--dt-border);
}

.dt-header-bar {
  display: flex;
  align-items: center;
  height: 48px;
  padding: 0 12px;
  gap: 8px;
}

.dt-header-back {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 8px;
  color: var(--dt-title);
  flex-shrink: 0;
}

.dt-header-back:active {
  background: var(--dt-bg);
}

.dt-header-title {
  flex: 1;
  text-align: center;
  font-size: 17px;
  font-weight: 600;
  margin: 0;
  padding-right: 36px;
}

.dt-content {
  flex: 1;
  padding: 12px 16px 16px;
}

.dt-card {
  background: var(--dt-card);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.dt-card-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--dt-title);
}

.dt-step-header {
  margin-bottom: 12px;
}

.dt-step-indicator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.dt-step-text {
  font-size: 14px;
  color: var(--dt-text);
  font-weight: 500;
}

.dt-step-count {
  font-size: 13px;
  color: var(--dt-text-secondary);
}

.dt-step-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 8px;
}

.dt-step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dt-border);
  transition: all 0.2s;
}

.dt-step-dot.active {
  background: var(--dt-primary);
  transform: scale(1.2);
}

.dt-step-dot.done {
  background: var(--dt-primary);
  opacity: 0.5;
}

.dt-progress-bar {
  height: 4px;
  background: var(--dt-border);
  border-radius: 2px;
  overflow: hidden;
}

.dt-progress-fill {
  height: 100%;
  background: var(--dt-primary);
  border-radius: 2px;
  transition: width 0.3s;
}

.dt-step-name {
  text-align: center;
  font-size: 13px;
  color: var(--dt-text-secondary);
  margin-top: 6px;
}

.dt-summary-card {
  background: var(--dt-card);
  border-radius: 12px;
  margin: 0 16px 12px;
  border: 1px solid var(--dt-border);
  overflow: hidden;
}

.dt-summary-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border: none;
  background: var(--dt-primary-light);
  cursor: pointer;
  font-size: 13px;
  color: var(--dt-title);
  font-weight: 500;
}

.dt-summary-body {
  padding: 12px 14px;
  display: grid;
  gap: 8px;
}

.dt-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  gap: 12px;
}

.dt-summary-label {
  color: var(--dt-text-secondary);
  flex-shrink: 0;
}

.dt-summary-value {
  color: var(--dt-title);
  text-align: right;
}

.dt-footer {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  min-width: 375px;
  background: var(--dt-card);
  border-top: 1px solid var(--dt-border);
  padding: 12px 16px calc(12px + var(--dt-safe-bottom));
  z-index: 90;
}

.dt-footer-hint {
  font-size: 12px;
  color: var(--dt-text-secondary);
  text-align: center;
  margin-bottom: 8px;
}

.dt-btn-primary {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 12px;
  background: var(--dt-primary);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.dt-btn-primary:disabled {
  background: #C9CDD4;
  cursor: not-allowed;
}

.dt-btn-primary:not(:disabled):active {
  opacity: 0.85;
}

.dt-btn-secondary {
  width: 100%;
  height: 44px;
  border: 1px solid var(--dt-border);
  border-radius: 12px;
  background: var(--dt-card);
  color: var(--dt-title);
  font-size: 15px;
  cursor: pointer;
}

.dt-btn-outline {
  flex: 1;
  height: 40px;
  border: 1px solid var(--dt-primary);
  border-radius: 10px;
  background: var(--dt-card);
  color: var(--dt-primary);
  font-size: 14px;
  cursor: pointer;
}

.dt-input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--dt-border);
  border-radius: 12px;
  padding: 0 14px;
  font-size: 16px;
  outline: none;
  background: var(--dt-card);
  transition: border-color 0.2s;
}

.dt-input:focus {
  border-color: var(--dt-primary);
}

.dt-input.error {
  border-color: var(--dt-danger);
}

.dt-select {
  appearance: auto;
  cursor: pointer;
  color: var(--dt-title);
}

.dt-select:invalid,
.dt-select option[value=''] {
  color: var(--dt-text-secondary);
}

.dt-field-error {
  font-size: 12px;
  color: var(--dt-danger);
  margin-top: 4px;
}

.dt-field-hint {
  font-size: 12px;
  color: var(--dt-text-secondary);
  margin-top: 6px;
  line-height: 1.5;
}

.dt-label {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  display: block;
  color: var(--dt-title);
}

.dt-status-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.dt-status-tag.pending { background: #E8F3FF; color: #165DFF; }
.dt-status-tag.locked { background: #FFF7E8; color: #FF7D00; }
.dt-status-tag.processing { background: #E8F7FF; color: #0FC6C2; }
.dt-status-tag.completed { background: var(--dt-primary-light); color: var(--dt-primary); }
.dt-status-tag.expired, .dt-status-tag.revoked { background: #F2F3F5; color: #86909C; }

.dt-toast {
  position: fixed;
  top: calc(60px + var(--dt-safe-top));
  left: 50%;
  transform: translateX(-50%);
  background: rgba(29, 33, 41, 0.88);
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 1000;
  animation: dt-toast-in 0.3s ease;
  max-width: 320px;
  text-align: center;
}

@keyframes dt-toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.dt-document-viewer {
  height: 360px;
  overflow-y: auto;
  border: 1px solid var(--dt-border);
  border-radius: 12px;
  padding: 16px;
  background: #FAFBFC;
  font-size: 14px;
  line-height: 1.8;
  color: var(--dt-text);
  white-space: pre-wrap;
}

.dt-read-progress {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
  margin: 12px 0;
}

.dt-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 12px 0;
  font-size: 14px;
  color: var(--dt-text);
}

.dt-checkbox-row input {
  margin-top: 3px;
  accent-color: var(--dt-primary);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.dt-cert-card {
  border: 1px solid var(--dt-border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color 0.2s;
}

.dt-cert-card:hover {
  border-color: var(--dt-primary);
}

.dt-cert-card.done {
  border-color: var(--dt-primary);
  background: var(--dt-primary-light);
}

.dt-cert-card.error {
  border-color: var(--dt-danger);
  background: #FFF0F0;
}

.dt-cert-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dt-cert-card-title {
  font-size: 15px;
  font-weight: 500;
}

.dt-cert-badge {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  background: #FFECE8;
  color: var(--dt-danger);
}

.dt-cert-badge.optional {
  background: #F2F3F5;
  color: var(--dt-text-secondary);
}

.dt-cert-status {
  font-size: 12px;
  color: var(--dt-text-secondary);
  margin-top: 6px;
}

.dt-cert-preview {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.dt-cert-thumb {
  width: 64px;
  height: 44px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--dt-border);
}

.dt-error-card {
  background: #FFF0F0;
  border: 1px solid #FFCCC7;
  border-radius: 12px;
  padding: 14px;
  margin: 12px 0;
}

.dt-error-card p {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--dt-danger);
}

.dt-error-actions {
  display: flex;
  gap: 10px;
}

.dt-success-banner {
  background: var(--dt-primary-light);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--dt-primary);
  font-weight: 500;
  margin-bottom: 12px;
}

.dt-video-player {
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  position: relative;
}

.dt-video-screen {
  width: 100%;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  background: linear-gradient(135deg, #1a3a1a 0%, #0d1f0d 100%);
  position: relative;
}

.dt-video-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.dt-video-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #1D2129;
}

.dt-video-progress {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
  overflow: hidden;
}

.dt-video-progress-fill {
  height: 100%;
  background: var(--dt-primary);
  pointer-events: none;
}

.dt-video-play-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: var(--dt-primary);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dt-camera-container {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 3/4;
  max-height: 420px;
}

.dt-camera-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.dt-camera-guide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.dt-camera-oval {
  width: 200px;
  height: 260px;
  border: 2px dashed rgba(255,255,255,0.7);
  border-radius: 50%;
}

.dt-camera-tips {
  list-style: none;
  padding: 0;
  margin: 12px 0;
}

.dt-camera-tips li {
  font-size: 13px;
  color: var(--dt-text-secondary);
  padding: 4px 0;
  padding-left: 16px;
  position: relative;
}

.dt-camera-tips li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--dt-primary);
}

.dt-portrait-preview {
  width: 120px;
  height: 150px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid var(--dt-primary);
}

.dt-signature-pad {
  border: 1px solid var(--dt-border);
  border-radius: 12px;
  background: #FAFBFC;
  touch-action: none;
}

.dt-signature-canvas {
  width: 100%;
  height: 180px;
  display: block;
  cursor: crosshair;
}

.dt-signature-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.dt-pickup-success {
  text-align: center;
  padding: 20px 0 12px;
}

.dt-pickup-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--dt-primary-light);
  color: var(--dt-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 28px;
}

.dt-pickup-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 4px;
}

.dt-pickup-subtitle {
  font-size: 13px;
  color: var(--dt-text-secondary);
  margin: 0;
}

.dt-qr-card {
  text-align: center;
  position: relative;
}

.dt-qr-code {
  width: 180px;
  height: 180px;
  margin: 12px auto;
  border: 1px solid var(--dt-border);
  border-radius: 8px;
  padding: 8px;
  background: #fff;
}

.dt-qr-code.disabled {
  opacity: 0.35;
  filter: grayscale(1);
}

.dt-qr-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.6);
  color: #fff;
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
}

.dt-numeric-code {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 8px;
  color: var(--dt-primary);
  margin: 8px 0;
}

.dt-info-list {
  display: grid;
  gap: 10px;
  text-align: left;
}

.dt-info-item {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

.dt-info-item .label {
  color: var(--dt-text-secondary);
}

.dt-warning-tip {
  background: #FFF7E8;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  color: #FF7D00;
  margin-top: 12px;
  line-height: 1.5;
}

.dt-debug-panel {
  position: absolute;
  right: 8px;
  bottom: 88px;
  z-index: 200;
  max-width: 200px;
}

.dt-debug-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: #1D2129;
  color: #fff;
  font-size: 11px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.dt-debug-body {
  background: #1D2129;
  color: #fff;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 8px;
  font-size: 11px;
  max-height: 360px;
  overflow-y: auto;
}

.dt-debug-section {
  margin-bottom: 10px;
}

.dt-debug-section label {
  display: block;
  margin-bottom: 4px;
  color: #C9CDD4;
}

.dt-debug-section select,
.dt-debug-section button {
  width: 100%;
  padding: 4px 6px;
  border-radius: 6px;
  border: none;
  font-size: 11px;
  margin-bottom: 4px;
}

.dt-debug-reset {
  background: var(--dt-danger);
  color: #fff;
  cursor: pointer;
  padding: 6px;
  border: none;
  border-radius: 6px;
  width: 100%;
}

.dt-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.dt-modal {
  background: var(--dt-card);
  border-radius: 16px;
  width: 100%;
  max-width: 340px;
  padding: 20px;
}

.dt-modal-title {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 10px;
  text-align: center;
}

.dt-modal-content {
  font-size: 14px;
  color: var(--dt-text);
  line-height: 1.6;
  margin-bottom: 20px;
  text-align: center;
}

.dt-modal-actions {
  display: flex;
  gap: 10px;
}

/* Upload source bottom sheet */
.dt-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 320;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.dt-sheet {
  width: 100%;
  max-width: 430px;
  background: var(--dt-card);
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + var(--dt-safe-bottom));
  animation: dt-sheet-up 0.25s ease;
}

@keyframes dt-sheet-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.dt-sheet-title {
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 4px;
}

.dt-sheet-desc {
  font-size: 13px;
  color: var(--dt-text-secondary);
  text-align: center;
  margin: 0 0 16px;
}

.dt-sheet-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--dt-border);
  border-radius: 12px;
  background: var(--dt-card);
  cursor: pointer;
  margin-bottom: 10px;
  text-align: left;
}

.dt-sheet-option:active {
  background: var(--dt-bg);
}

.dt-sheet-option-icon {
  font-size: 24px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--dt-primary-light);
  border-radius: 10px;
  flex-shrink: 0;
}

.dt-sheet-option-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dt-sheet-option-text strong {
  font-size: 15px;
  color: var(--dt-title);
  font-weight: 600;
}

.dt-sheet-option-text small {
  font-size: 12px;
  color: var(--dt-text-secondary);
}

.dt-sheet-cancel {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 12px;
  background: var(--dt-bg);
  color: var(--dt-text);
  font-size: 16px;
  cursor: pointer;
  margin-top: 4px;
}

.dt-form-group {
  margin-bottom: 16px;
}

.dt-code-row {
  display: flex;
  gap: 10px;
}

.dt-code-row .dt-input {
  flex: 1;
}

.dt-code-btn {
  flex-shrink: 0;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--dt-primary);
  border-radius: 12px;
  background: var(--dt-card);
  color: var(--dt-primary);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

.dt-code-btn:disabled {
  border-color: var(--dt-border);
  color: var(--dt-text-secondary);
  cursor: not-allowed;
}

.dt-ocr-form .dt-form-group {
  margin-bottom: 12px;
}

.dt-manual-tip {
  background: #E8F3FF;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  color: #165DFF;
  margin-bottom: 12px;
  line-height: 1.5;
}

/* Mini Program Business Page */
.mp-app {
  max-width: 430px;
  min-width: 375px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--dt-bg);
  padding-bottom: calc(60px + var(--dt-safe-bottom));
}

.mp-header {
  background: var(--dt-card);
  text-align: center;
  padding: calc(12px + var(--dt-safe-top)) 16px 12px;
  font-size: 17px;
  font-weight: 600;
  border-bottom: 1px solid var(--dt-border);
}

.mp-section {
  margin: 12px 16px;
}

.mp-section-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--dt-title);
}

.mp-grid {
  background: var(--dt-card);
  border-radius: 16px;
  padding: 16px 8px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.mp-grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 4px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 12px;
  transition: background 0.2s;
}

.mp-grid-item:active {
  background: var(--dt-bg);
}

.mp-grid-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--dt-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dt-primary);
  font-size: 22px;
  position: relative;
}

.mp-grid-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--dt-primary);
  color: #fff;
  font-size: 10px;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.mp-grid-label {
  font-size: 12px;
  color: var(--dt-text);
  text-align: center;
}

.mp-tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  min-width: 375px;
  background: var(--dt-card);
  border-top: 1px solid var(--dt-border);
  display: flex;
  padding-bottom: var(--dt-safe-bottom);
}

.mp-tabbar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--dt-text-secondary);
  font-size: 10px;
  gap: 2px;
}

.mp-tabbar-item.active {
  color: var(--dt-primary);
}

.mp-tabbar-icon {
  font-size: 20px;
}

.mp-tabbar-item.active::after {
  content: '';
  width: 20px;
  height: 2px;
  background: var(--dt-primary);
  border-radius: 1px;
  margin-top: 2px;
}

/* --- UI optimization: progress, signature, pickup --- */

.dt-step-header--complete .dt-progress-fill {
  background: linear-gradient(90deg, var(--dt-primary), #95d63a);
}

.dt-phase-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 4px;
}

.dt-phase-connector {
  flex: 1;
  height: 2px;
  background: var(--dt-border);
  margin-top: 14px;
  min-width: 8px;
  transition: background 0.3s;
}

.dt-phase-connector.done {
  background: var(--dt-primary);
}

.dt-phase-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.dt-phase-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  background: var(--dt-border);
  color: var(--dt-text-secondary);
  transition: all 0.25s;
}

.dt-phase-item--active .dt-phase-icon {
  background: var(--dt-primary);
  color: #fff;
  box-shadow: 0 0 0 4px var(--dt-primary-light);
}

.dt-phase-item--done .dt-phase-icon {
  background: var(--dt-primary);
  color: #fff;
}

.dt-phase-label {
  font-size: 11px;
  color: var(--dt-text-secondary);
  text-align: center;
  line-height: 1.3;
}

.dt-phase-item--active .dt-phase-label {
  color: var(--dt-primary);
  font-weight: 600;
}

.dt-phase-item--done .dt-phase-label {
  color: var(--dt-text);
}

.dt-step-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.dt-step-detail-hint {
  font-size: 12px;
  color: var(--dt-primary);
  background: var(--dt-primary-light);
  padding: 2px 8px;
  border-radius: 999px;
}

.dt-read-progress span {
  text-align: center;
  font-size: 13px;
  color: var(--dt-text-secondary);
}

.dt-read-progress-bar {
  height: 4px;
  background: var(--dt-border);
  border-radius: 2px;
  overflow: hidden;
}

.dt-read-progress-fill {
  height: 100%;
  background: var(--dt-primary);
  border-radius: 2px;
  transition: width 0.2s;
}

.dt-btn-primary--ready:not(:disabled) {
  animation: dt-btn-ready 0.35s ease;
}

@keyframes dt-btn-ready {
  from { transform: scale(0.98); }
  to { transform: scale(1); }
}

.dt-submit-checklist {
  list-style: none;
  margin: 0 0 8px;
  padding: 10px 12px;
  background: #FAFBFC;
  border-radius: 10px;
  border: 1px solid var(--dt-border);
}

.dt-submit-checklist li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--dt-text-secondary);
  padding: 3px 0;
}

.dt-submit-checklist li.done {
  color: var(--dt-primary);
}

.dt-submit-checklist-icon {
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

.dt-step6-section {
  margin-bottom: 16px;
}

.dt-step6-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--dt-title);
  margin: 0 0 8px;
}

.dt-step6-declaration {
  max-height: 120px;
  overflow-y: auto;
  padding: 12px;
  background: #FAFBFC;
  border: 1px solid var(--dt-border);
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--dt-text);
}

.dt-step6-info {
  padding: 12px;
  background: #F7F8FA;
  border-radius: 12px;
}

.dt-info-item--highlight span:last-child {
  font-weight: 600;
  color: var(--dt-title);
}

.dt-signature-wrap {
  margin-top: 4px;
}

.dt-signature-pad {
  position: relative;
  border: 2px dashed var(--dt-border);
  border-radius: 12px;
  background: #FAFBFC;
  touch-action: none;
  transition: border-color 0.2s;
}

.dt-signature-pad--signed {
  border-style: solid;
  border-color: var(--dt-primary);
  background: #fff;
}

.dt-signature-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dt-text-secondary);
  font-size: 15px;
  pointer-events: none;
  z-index: 1;
}

.dt-signature-baseline {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 36px;
  height: 1px;
  background: var(--dt-border);
  pointer-events: none;
  z-index: 1;
}

.dt-signature-canvas {
  position: relative;
  z-index: 2;
}

.dt-signature-clear {
  flex: 0 0 auto;
  width: auto;
  min-width: 96px;
  height: 40px;
  padding: 0 14px;
}

.dt-signature-done-badge {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--dt-primary);
}

.dt-modal--summary {
  max-width: 360px;
}

.dt-modal-summary {
  background: #F7F8FA;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
  text-align: left;
}

.dt-modal-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  padding: 4px 0;
}

.dt-modal-summary-row .label {
  color: var(--dt-text-secondary);
  flex-shrink: 0;
}

.dt-modal-signature-preview {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--dt-border);
}

.dt-modal-signature-preview .label {
  display: block;
  font-size: 12px;
  color: var(--dt-text-secondary);
  margin-bottom: 6px;
}

.dt-modal-signature-preview img {
  width: 100%;
  max-height: 72px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--dt-border);
  border-radius: 8px;
}

.dt-modal-note {
  font-size: 13px;
  color: var(--dt-warning);
  line-height: 1.5;
  margin: 0 0 12px;
  text-align: center;
}

.dt-pickup-page {
  padding-bottom: 8px;
}

.dt-animate-fade-in {
  animation: dt-fade-in 0.45s ease;
}

.dt-animate-scale-in {
  animation: dt-scale-in 0.5s ease 0.1s both;
}

@keyframes dt-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes dt-scale-in {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.dt-qr-card-header {
  text-align: center;
  margin-bottom: 12px;
}

.dt-qr-status-hint {
  font-size: 12px;
  color: var(--dt-text-secondary);
  margin: 8px 0 0;
  line-height: 1.5;
}

.dt-qr-frame {
  position: relative;
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}

.dt-numeric-code-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 4px;
}

.dt-btn-copy-code {
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--dt-primary);
  border-radius: 8px;
  background: var(--dt-card);
  color: var(--dt-primary);
  font-size: 13px;
  cursor: pointer;
}

.dt-btn-copy-code:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.dt-numeric-code-hint {
  font-size: 12px;
  color: var(--dt-text-secondary);
  margin: 0 0 12px;
  text-align: center;
}

.driver-training-app--embedded .dt-footer {
  padding-bottom: calc(12px + var(--dt-safe-bottom));
}

/* 手写签名 - e签宝风格横屏全屏 */
.driver-training-app--signature-immersive {
  position: relative;
}

.driver-training-app--signature-immersive .dt-page {
  min-height: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.driver-training-app--signature-immersive .dt-content--signature-immersive {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.dt-esign-root {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* 竖屏预览：顶部说明 + 下方横屏签名页效果 */
.dt-esign-root--portrait-preview {
  background: #f5f6f8;
}

.dt-esign-preview-banner {
  flex: 0 0 auto;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 0 0 8px;
  padding: 12px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2b2f36 0%, #1a1d24 100%);
  color: #fff;
}

.dt-esign-preview-banner-icon {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(122, 185, 41, 0.2);
  color: var(--dt-primary);
  font-size: 20px;
  animation: dt-esign-rotate-hint 1.8s ease-in-out infinite;
}

.dt-esign-preview-banner-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
}

.dt-esign-preview-banner-text strong {
  font-size: 14px;
  color: #fff;
}

.dt-esign-root--portrait-preview .dt-esign-landscape {
  flex: 1;
  min-height: 0;
  border: 2px solid var(--dt-primary);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(122, 185, 41, 0.12);
}

.dt-esign-root--portrait-preview .dt-esign-canvas-area {
  margin: 6px;
  min-height: 200px;
}

.dt-esign-root--landscape .dt-esign-preview-banner {
  display: none;
}

/* 竖屏：仅旋转引导（已废弃，保留样式供参考） */
.dt-esign-portrait {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  background: linear-gradient(180deg, #2b2f36 0%, #1a1d24 100%);
  color: #fff;
  padding: 24px 20px;
}

.dt-esign-portrait-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 280px;
}

.dt-esign-portrait-phone {
  position: relative;
  width: 72px;
  height: 120px;
  margin-bottom: 28px;
}

.dt-esign-portrait-phone-body {
  width: 100%;
  height: 100%;
  border: 3px solid rgba(255, 255, 255, 0.85);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.dt-esign-portrait-phone-arrow {
  position: absolute;
  right: -36px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 28px;
  color: var(--dt-primary);
  animation: dt-esign-rotate-hint 1.8s ease-in-out infinite;
}

@keyframes dt-esign-rotate-hint {
  0%, 100% { transform: translateY(-50%) rotate(0deg); opacity: 0.6; }
  50% { transform: translateY(-50%) rotate(90deg); opacity: 1; }
}

.dt-esign-portrait-title {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.dt-esign-portrait-desc {
  margin: 0 0 28px;
  font-size: 14px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.72);
}

.dt-esign-portrait-back {
  height: 44px;
  padding: 0 28px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 22px;
  background: transparent;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
}

.dt-esign-portrait-back:active {
  background: rgba(255, 255, 255, 0.08);
}

/* 横屏：e签宝全屏签名页 */
.dt-esign-landscape {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #f5f6f8;
}

.dt-esign-topbar {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  height: 48px;
  padding: 0 4px;
  background: #fff;
  border-bottom: 1px solid var(--dt-border);
}

.dt-esign-topbar-back {
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  color: var(--dt-title);
  cursor: pointer;
}

.dt-esign-topbar-title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  color: var(--dt-title);
}

.dt-esign-topbar-slot {
  width: 44px;
}

.dt-esign-signer {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--dt-text-secondary);
  background: #fff;
}

.dt-esign-signer-dot {
  opacity: 0.5;
}

.dt-esign-canvas-area {
  flex: 1;
  min-height: 0;
  margin: 8px;
  display: flex;
  flex-direction: column;
}

.dt-signature-wrap--esign {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.dt-signature-pad--esign {
  flex: 1;
  min-height: 0;
  border: none;
  border-radius: 4px;
  background: #fff;
  box-shadow: inset 0 0 0 1px #e8eaed;
  touch-action: none;
}

.dt-signature-pad--esign.dt-signature-pad--signed {
  box-shadow: inset 0 0 0 1px var(--dt-primary);
}

.dt-signature-watermark {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(28px, 8vw, 48px);
  font-weight: 500;
  color: rgba(134, 144, 156, 0.18);
  pointer-events: none;
  z-index: 1;
  letter-spacing: 4px;
  user-select: none;
}

.dt-signature-baseline--esign {
  left: 10%;
  right: 10%;
  bottom: 28%;
  height: 1px;
  background: rgba(134, 144, 156, 0.35);
}

.dt-signature-canvas--esign {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.dt-esign-toolbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px calc(10px + var(--dt-safe-bottom));
  background: #fff;
  border-top: 1px solid var(--dt-border);
}

.dt-esign-tool-btn {
  flex: 0 0 auto;
  height: 40px;
  padding: 0 16px;
  border: none;
  border-radius: 8px;
  background: #f2f3f5;
  color: var(--dt-text);
  font-size: 15px;
  cursor: pointer;
}

.dt-esign-tool-btn:active {
  background: #e8eaed;
}

.dt-esign-tool-done {
  flex: 1;
  height: 44px;
  margin-left: auto;
  border: none;
  border-radius: 8px;
  background: #c9cdd4;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: not-allowed;
}

.dt-esign-tool-done--ready {
  background: var(--dt-primary);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(122, 185, 41, 0.35);
}

.dt-esign-tool-done--ready:active {
  filter: brightness(0.95);
}
