/* 报销助手 - 自定义样式 */

/* ===== 文件上传拖放区域 ===== */
.upload-zone {
  border: 2px dashed #CBD5E1;
  border-radius: 12px;
  background: #F8FAFC;
  transition: all 0.2s ease;
  cursor: pointer;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: #2563EB;
  background: #EFF6FF;
}

.upload-zone.drag-over {
  transform: scale(1.01);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

/* ===== 文件预览卡片 ===== */
.file-preview-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #E2E8F0;
  transition: box-shadow 0.15s ease;
}

.file-preview-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.file-preview-card .remove-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease;
  border: none;
  line-height: 1;
}

.file-preview-card:hover .remove-btn {
  opacity: 1;
}

/* ===== Toast 动画（补充） ===== */
#toast-container > div {
  max-width: 320px;
  word-break: break-word;
}

/* ===== 步骤卡片高亮线 ===== */
.step-card {
  border-left: 4px solid #2563EB;
}

/* ===== 成功动画 ===== */
@keyframes checkmark {
  0% { stroke-dashoffset: 100; opacity: 0; }
  60% { opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 1; }
}

.checkmark-path {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: checkmark 0.6s ease-out 0.2s forwards;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in-up {
  animation: fadeInUp 0.4s ease-out both;
}

/* ===== 加载 Spinner ===== */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

/* ===== 表格行悬停 ===== */
.table-row-hover:hover {
  background: #EFF6FF;
  cursor: pointer;
}

/* ===== Tab 按钮激活样式 ===== */
.tab-btn {
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
}

.tab-btn.active {
  border-bottom-color: #2563EB;
  color: #2563EB;
  font-weight: 600;
}

/* ===== 徽章 ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
}

.badge-pending  { background: #FEF3C7; color: #92400E; }
.badge-processing { background: #DBEAFE; color: #1E40AF; }
.badge-completed  { background: #D1FAE5; color: #065F46; }
.badge-failed     { background: #FEE2E2; color: #991B1B; }
.badge-active     { background: #D1FAE5; color: #065F46; }
.badge-inactive   { background: #F1F5F9; color: #475569; }

/* ===== 滚动条美化（Chrome/Edge） ===== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #F1F5F9;
}
::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

/* ===== 输入框聚焦效果 ===== */
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #2563EB !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* ===== 数字步骤圆圈 ===== */
.step-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #2563EB;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ===== 密钥遮码 ===== */
.masked-key {
  font-family: monospace;
  letter-spacing: 2px;
}
