    * { box-sizing: border-box; margin: 0; padding: 0; }
    body {
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
      background: #f3f4f6;
      color: #1f2937;
      max-width: 780px;
      margin: 0 auto;
      padding: 24px 16px;
    }
    h1 { font-size: 22px; margin-bottom: 16px; color: #111827; }
    h2 { font-size: 16px; margin-bottom: 10px; color: #374151; }
    h3 { font-size: 14px; margin-bottom: 8px; color: #4b5563; }

    .card {
      background: #fff;
      border: 1px solid #e5e7eb;
      border-radius: 10px;
      padding: 18px;
      margin-bottom: 16px;
      box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    }

    .row {
      display: flex;
      gap: 10px;
      align-items: center;
      margin-bottom: 10px;
      flex-wrap: wrap;
    }

    label {
      font-size: 13px;
      font-weight: 600;
      color: #4b5563;
      min-width: 70px;
    }

    select, input[type="text"] {
      padding: 7px 10px;
      font-size: 14px;
      border: 1px solid #d1d5db;
      border-radius: 6px;
      background: #fff;
      color: #1f2937;
      outline: none;
    }
    select:focus, input:focus { border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37,99,235,0.15); }

    button {
      padding: 8px 16px;
      font-size: 14px;
      font-weight: 500;
      border: none;
      border-radius: 6px;
      cursor: pointer;
      transition: background 0.15s;
    }
    button:disabled { opacity: 0.5; cursor: not-allowed; }
    .btn-primary { background: #2563eb; color: #fff; }
    .btn-primary:hover:not(:disabled) { background: #1d4ed8; }
    .btn-danger { background: #ef4444; color: #fff; }
    .btn-danger:hover:not(:disabled) { background: #dc2626; }
    .btn-success { background: #16a34a; color: #fff; }
    .btn-success:hover:not(:disabled) { background: #15803d; }
    .btn-secondary { background: #6b7280; color: #fff; }
    .btn-secondary:hover:not(:disabled) { background: #4b5563; }
    .btn-sm { padding: 5px 10px; font-size: 12px; }

    .toggle-switch {
      position: relative;
      display: inline-block;
      width: 44px;
      height: 24px;
    }
    .toggle-switch input { opacity: 0; width: 0; height: 0; }
    .toggle-slider {
      position: absolute;
      cursor: pointer;
      top: 0; left: 0; right: 0; bottom: 0;
      background: #d1d5db;
      border-radius: 24px;
      transition: 0.2s;
    }
    .toggle-slider:before {
      content: "";
      position: absolute;
      height: 18px; width: 18px;
      left: 3px; bottom: 3px;
      background: white;
      border-radius: 50%;
      transition: 0.2s;
    }
    input:checked + .toggle-slider { background: #16a34a; }
    input:checked + .toggle-slider:before { transform: translateX(20px); }

    .status-badge {
      display: inline-block;
      padding: 3px 10px;
      border-radius: 12px;
      font-size: 12px;
      font-weight: 600;
    }
    .status-waiting { background: #fef3c7; color: #92400e; }
    .status-pending { background: #dbeafe; color: #1e40af; }
    .status-completed { background: #d1fae5; color: #065f46; }
    .status-failed { background: #fee2e2; color: #991b1b; }
    .status-cancelled { background: #e5e7eb; color: #4b5563; }
    .status-expired { background: #fee2e2; color: #991b1b; }
    .status-sms_received { background: #dbeafe; color: #1e40af; }

    .phone-display {
      font-size: 24px;
      font-weight: bold;
      color: #1f2937;
      letter-spacing: 2px;
      margin: 8px 0;
    }

    .code-display {
      font-size: 32px;
      font-weight: bold;
      color: #16a34a;
      letter-spacing: 4px;
      margin: 12px 0;
    }

    .sms-content {
      background: #f9fafb;
      border: 1px solid #e5e7eb;
      border-radius: 6px;
      padding: 12px;
      margin-top: 8px;
      font-size: 14px;
      white-space: pre-wrap;
      color: #374151;
    }

    .log-box {
      background: #111827;
      color: #e5e7eb;
      border-radius: 8px;
      padding: 14px;
      font-size: 12px;
      font-family: "SF Mono", "Fira Code", monospace;
      max-height: 320px;
      overflow-y: auto;
      line-height: 1.6;
    }
    .log-entry { margin-bottom: 2px; }
    .log-info { color: #93c5fd; }
    .log-ok { color: #34d399; }
    .log-fail { color: #f87171; }
    .log-warn { color: #fbbf24; }

    .hidden { display: none !important; }

    .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
    @media (max-width: 600px) { .grid-2 { grid-template-columns: 1fr; } }

    .copy-btn {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 4px 10px;
      font-size: 12px;
      background: #e5e7eb;
      color: #374151;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      margin-left: 8px;
    }
    .copy-btn:hover { background: #d1d5db; }

    .mock-panel button { margin-right: 6px; margin-bottom: 6px; }
    .mock-panel .row { margin-bottom: 6px; }

    .separator { border-top: 1px solid #e5e7eb; margin: 14px 0; }

    /* 一次性密钥登录 */
    .login-card { max-width: 440px; margin: 32px auto; }
    .login-hint { font-size: 13px; color: #6b7280; line-height: 1.7; margin-bottom: 14px; }
    .key-input {
      width: 100%;
      padding: 10px 12px;
      font-size: 15px;
      letter-spacing: 1px;
      font-family: "SF Mono", "Fira Code", monospace;
    }
    .login-error {
      margin-top: 10px;
      font-size: 13px;
      color: #b91c1c;
      background: #fee2e2;
      border-radius: 6px;
      padding: 8px 10px;
    }
    .notice {
      margin-top: 10px;
      padding: 10px 12px;
      border-radius: 6px;
      font-size: 13px;
      line-height: 1.6;
    }
    .notice-warn { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
    .notice-error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
    /* 验证环境横幅：仅在 sandbox=true 时由 app.js 创建 */
    .sandbox-banner {
      position: sticky;
      top: 0;
      z-index: 20;
      margin-bottom: 12px;
      padding: 10px 14px;
      border-radius: 0 0 8px 8px;
      background: #fee2e2;
      color: #991b1b;
      border: 1px solid #fca5a5;
      border-top: none;
      font-size: 13px;
      font-weight: 600;
      line-height: 1.5;
    }
    .notice-ok { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
    .mono-text { font-family: "SF Mono", "Fira Code", monospace; font-size: 13px; word-break: break-all; }
    /* 多次使用记录 */
    .notice-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
    .page-title { cursor: pointer; transition: color 0.15s; }
    .page-title:hover { color: #2563eb; }
    .home-hint {
      font-size: 13px;
      font-weight: 500;
      color: #2563eb;
      margin-left: 8px;
      border-bottom: 1px dashed currentColor;
    }
    .page-title:hover .home-hint { color: #1d4ed8; }

/* 由内联 style 属性迁移而来 */
/* 下单参数与登录状态：精简成一行工具条 */
.order-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.order-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.inline-label { font-size: 13px; color: #374151; }
.field-label { font-size: 13px; color: #374151; }
.order-hint { margin-top: 8px; font-size: 12px; color: #6b7280; }
/* 复制降级用的隐藏文本域（避免内联 style，兼容 CSP） */
.clipboard-helper { position: fixed; top: -1000px; left: -1000px; opacity: 0; }

/* 二次确认对话框 */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(17, 24, 39, 0.45);
}
.modal-box {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
}
.modal-title { margin-bottom: 8px; font-size: 16px; color: #111827; }
.modal-text { margin-bottom: 16px; font-size: 14px; line-height: 1.7; color: #374151; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }
body.modal-open { overflow: hidden; }

/* 使用记录：一行一条，表头固定，窄屏横向滚动 */
.record-table-wrap {
  margin-top: 10px;
  max-height: 320px;
  overflow: auto;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}
.record-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 13px;
}
.record-table th,
.record-table td {
  padding: 9px 12px;
  text-align: left;
  border-bottom: 1px solid #f1f5f9;
  white-space: nowrap;
}
.record-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f9fafb;
  color: #374151;
  font-weight: 600;
}
.record-table tbody tr:last-child td { border-bottom: none; }
.record-table tbody tr:hover { background: #f9fafb; }
.record-cell-copy { cursor: pointer; border-bottom: 1px dashed #9ca3af; }
.mt-12 { margin-top: 12px; }
.mt-10 { margin-top: 10px; }
.hint-text { font-size: 13px; color: #6b7280; }
.api-base-input { flex: 1; min-width: 220px; }
.session-info { font-size: 13px; color: #16a34a; }
.service-hint { font-size: 12px; color: #b45309; margin: -4px 0 8px 80px; }
.order-provider { font-size: 14px; }
