/* ===================================================
   QR Tools — 工具操作页统一样式
   对标首页设计：靛蓝 #4F46E5 / 白底灰边卡片 / 简洁商务
   =================================================== */

/* ---- 页面包裹器 ---- */
.tool-wrapper {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px 40px;
}

/* ---- 页面头部 ---- */
.tool-hero {
  padding: 40px 0 32px;
  text-align: center;
}
.tool-hero .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  background: #EEF2FF;
  color: #4F46E5;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}
.tool-hero h1 {
  font-size: 28px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 8px;
  letter-spacing: -0.4px;
}
.tool-hero h1 em {
  font-style: normal;
  color: #4F46E5;
}
.tool-hero .hero-sub {
  font-size: 14px;
  color: #64748b;
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ---- 卡片容器 ---- */
.tool-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  margin-bottom: 18px;
  overflow: hidden;
}
.tool-card-header {
  padding: 14px 20px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fafbfc;
}
.tool-card-header .card-title {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.tool-card-header .card-badge {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
}
.tool-card-body {
  padding: 20px;
}

/* ---- 表单控件 ---- */
.tool-label {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
  display: block;
}
.tool-input,
.tool-textarea,
.tool-select {
  display: block;
  width: 100%;
  padding: 9px 13px;
  font-size: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #1e293b;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
  font-family: inherit;
  box-sizing: border-box;
}
.tool-input:focus,
.tool-textarea:focus,
.tool-select:focus {
  border-color: #4F46E5;
  box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}
.tool-input::placeholder,
.tool-textarea::placeholder {
  color: #94a3b8;
}
.tool-textarea {
  min-height: 80px;
  resize: vertical;
}
.tool-hint {
  font-size: 11.5px;
  color: #94a3b8;
  margin-top: 4px;
}

/* ---- 文件上传区 ---- */
.tool-upload-zone {
  border: 2px dashed #e2e8f0;
  border-radius: 10px;
  padding: 28px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  color: #64748b;
  background: #fafbfc;
}
.tool-upload-zone:hover {
  border-color: #4F46E5;
  background: #EEF2FF;
  color: #4F46E5;
}
.tool-upload-zone .upload-icon {
  font-size: 32px;
  margin-bottom: 10px;
}
.tool-upload-zone .upload-text {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}
.tool-upload-zone .upload-hint {
  font-size: 12px;
  color: #94a3b8;
}

/* ---- 预览区 ---- */
.tool-preview-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.tool-preview-box .preview-img {
  max-width: 200px;
  max-height: 200px;
  border-radius: 6px;
}
.tool-preview-box .preview-placeholder {
  color: #cbd5e1;
  font-size: 40px;
}
.tool-preview-box .preview-label {
  font-size: 12px;
  color: #94a3b8;
}

/* ---- 按钮 ---- */
.tool-btn,
a.tool-btn,
button.tool-btn,
label.tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid transparent;
  text-decoration: none;
  line-height: 1.4;
  font-family: inherit;
  white-space: nowrap;
  outline: none;
  box-shadow: none;
}
.tool-btn-primary,
a.tool-btn-primary {
  background: #4F46E5;
  color: #fff !important;
  border-color: #4F46E5;
}
.tool-btn-primary:hover {
  background: #4338CA;
  border-color: #4338CA;
  box-shadow: 0 2px 8px rgba(79,70,229,0.3);
  color: #fff !important;
}
.tool-btn-primary:disabled {
  background: #EEF2FF;
  color: #818CF8 !important;
  border: 1px solid #C7D2FE;
  cursor: not-allowed;
  box-shadow: none;
  opacity: 1;
}
.tool-btn-outline,
a.tool-btn-outline {
  background: #fff;
  color: #4F46E5 !important;
  border: 1.5px solid #4F46E5;
}
.tool-btn-outline:hover {
  background: #EEF2FF;
  color: #4F46E5 !important;
}
.tool-btn-outline:disabled {
  background: #F8FAFC;
  color: #CBD5E1 !important;
  border-color: #E2E8F0;
  cursor: not-allowed;
  opacity: 1;
}
.tool-btn-ghost,
a.tool-btn-ghost,
label.tool-btn-ghost {
  background: #fff;
  color: #64748b !important;
  border: 1px solid #e2e8f0;
}
.tool-btn-ghost:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #334155 !important;
}
.tool-btn-ghost input[type="file"] {
  display: none;
}
.tool-btn-locked,
a.tool-btn-locked,
span.tool-btn-locked {
  cursor: not-allowed !important;
  opacity: 0.55;
  background: #f1f5f9;
  color: #94a3b8 !important;
  border-color: #e2e8f0;
  pointer-events: none;
  user-select: none;
}
.tool-btn-sm {
  padding: 6px 14px;
  font-size: 12px;
  border-radius: 6px;
}
.tool-btn-lg {
  padding: 13px 30px;
  font-size: 15px;
}
.tool-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
@media (max-width: 576px) {
  .tool-cta-row {
    flex-direction: column;
    align-items: stretch;
  }
  .tool-cta-row .tool-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ---- 结果消息 ---- */
.tool-msg {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-top: 12px;
  display: none;
}
.tool-msg-success {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.tool-msg-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
.tool-msg-info {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

/* ---- 栅格 ---- */
.tool-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}
.tool-col-8 { flex: 0 0 calc(66.666% - 9px); min-width: 0; }
.tool-col-6 { flex: 0 0 calc(50% - 9px); min-width: 0; }
.tool-col-4 { flex: 0 0 calc(33.333% - 12px); min-width: 0; }
.tool-col-12 { flex: 0 0 100%; }

/* ---- 引导进度条 ---- */
.tool-steps {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.tool-step {
  flex: 1;
  min-width: 140px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 18px 16px;
  text-align: center;
  position: relative;
}
.tool-step .step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #EEF2FF;
  color: #4F46E5;
  font-size: 14px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}
.tool-step strong {
  display: block;
  font-size: 13px;
  color: #1e293b;
  margin-bottom: 3px;
}
.tool-step small {
  font-size: 11.5px;
  color: #94a3b8;
}

/* ---- FAQ ---- */
.tool-faq {
  margin-top: 8px;
}
.tool-faq .faq-header {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  padding: 14px 20px;
  border: 1px solid #e2e8f0;
  border-radius: 10px 10px 0 0;
  background: #fafbfc;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tool-faq .faq-body {
  padding: 16px 20px;
  border: 1px solid #e2e8f0;
  border-top: none;
  border-radius: 0 0 10px 10px;
  background: #fff;
  font-size: 13px;
  color: #475569;
  line-height: 1.75;
}
.tool-faq .faq-body p { margin: 0 0 10px; }
.tool-faq .faq-body p:last-child { margin: 0; }

/* ---- 提示卡 ---- */
.tool-tip {
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 13px;
  border: 1px solid #e2e8f0;
  background: #fafbfc;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 16px;
}
.tool-tip strong { color: #1e293b; }

/* ---- CTA 横幅 ---- */
.tool-cta-bar {
  background: linear-gradient(135deg, #4F46E5 0%, #6366F1 100%);
  border-radius: 12px;
  padding: 28px 24px;
  text-align: center;
  color: #fff;
  margin-bottom: 24px;
}
.tool-cta-bar h3 {
  font-size: 16px;
  font-weight: 800;
  margin: 0 0 6px;
  color: #fff;
}
.tool-cta-bar p {
  font-size: 13px;
  opacity: 0.85;
  margin: 0 0 14px;
}
.tool-cta-bar .cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 9px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s;
  margin: 0 5px;
}
.tool-cta-bar .cta-btn-white {
  background: #fff;
  color: #4F46E5;
}
.tool-cta-bar .cta-btn-white:hover {
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  transform: translateY(-1px);
}
.tool-cta-bar .cta-btn-outline {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.35);
}
.tool-cta-bar .cta-btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.6);
}

/* ---- 锁住的按钮引导 ---- */
.tool-locked-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #94a3b8;
  margin-left: 10px;
}
.tool-locked-hint a {
  color: #4F46E5;
  font-weight: 600;
  text-decoration: none;
}
.tool-locked-hint a:hover { text-decoration: underline; }

/* ---- Bootstrap 品牌色覆盖（所有 QR 工具子页统一靛蓝主题） ---- */
.page-content .btn-primary {
  background: #4F46E5;
  border-color: #4F46E5;
  color: #fff;
}
.page-content .btn-primary:hover,
.page-content .btn-primary:focus {
  background: #4338CA;
  border-color: #4338CA;
  box-shadow: 0 2px 8px rgba(79,70,229,0.3);
}
.page-content .btn-outline-primary {
  color: #4F46E5;
  border-color: #4F46E5;
}
.page-content .btn-outline-primary:hover {
  background: #EEF2FF;
  border-color: #4F46E5;
  color: #4F46E5;
}
.page-content .btn-success { background: #10b981; border-color: #10b981; }
.page-content .btn-success:hover { background: #059669; border-color: #059669; }
.page-content .alert {
  border-radius: 10px;
  font-size: 13px;
  padding: 12px 16px;
}
.page-content .text-primary { color: #4F46E5 !important; }
.page-content a:not(.btn):not(.geo-btn):not(.nav-link) { color: #4F46E5; }

/* ---- 模式选择卡片 ---- */
.tool-mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.tool-mode-card {
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
}
.tool-mode-card:hover { border-color: #c7d2fe; background: #fafaff; }
.tool-mode-card.active { border-color: #4F46E5; background: #EEF2FF; }
.tool-mode-card .mode-icon { font-size: 24px; margin-bottom: 8px; }
.tool-mode-card .mode-title { font-size: 13px; font-weight: 700; color: #1e293b; margin-bottom: 3px; }
.tool-mode-card .mode-desc { font-size: 11px; color: #94a3b8; line-height: 1.4; }

/* ---- 行内标签 ---- */
.tool-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}
.tool-tag-indigo { background: #eef2ff; color: #4f46e5; border-color: #c7d2fe; }
.tool-tag-emerald { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.tool-tag-amber { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.tool-tag-rose { background: #fff1f2; color: #be123c; border-color: #fecdd3; }

/* ---- 响应式 ---- */
@media (max-width: 768px) {
  .tool-hero h1 { font-size: 22px; }
  .tool-hero { padding: 28px 0 24px; }
  .tool-col-8, .tool-col-6, .tool-col-4 { flex: 0 0 100%; }
  .tool-steps { flex-direction: column; gap: 10px; }
  .tool-card-body { padding: 14px; }
}
@media (max-width: 480px) {
  .tool-hero h1 { font-size: 19px; }
  .tool-upload-zone { padding: 20px 14px; }
}
