/* ============================================================
   公共样式（登录页 / 主页面共用）
   ============================================================ */
:root {
  --bg: #f4f6fb;
  --card-radius: 16px;
  --card-shadow: 0 4px 18px rgba(17, 24, 39, .06);
  --border: #eef1f6;
  --text: #1f2937;
  --muted: #8a94a6;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
}

body {
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 卡片 */
.card { border: none; border-radius: var(--card-radius); box-shadow: var(--card-shadow); }
.card-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  border-radius: var(--card-radius) var(--card-radius) 0 0 !important;
  padding: 1rem 1.4rem;
}
.card-header h5 { font-size: 16px; font-weight: 700; margin: 0; }
.card-header .badge { font-size: 12px; font-weight: 600; padding: .38em .72em; }

/* 上传拖拽区 */
.drop-zone {
  border: 2px dashed #cfd8e6; border-radius: 14px; padding: 28px; text-align: center;
  cursor: pointer; transition: all .2s; background: #fbfcfe; min-height: 120px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.drop-zone:hover, .drop-zone.dragover { border-color: var(--primary); background: #eff5ff; }
.drop-zone .drop-icon { font-size: 36px; color: #adb5bd; }
.drop-zone .drop-text { font-size: 14px; color: #6c757d; margin-top: 4px; }
.drop-zone .drop-filename { font-size: 13px; color: var(--primary); margin-top: 4px; font-weight: 600; }

/* Loading 遮罩 */
.loading-overlay {
  display: none; position: fixed; inset: 0; background: rgba(244, 246, 251, .8);
  backdrop-filter: blur(2px); z-index: 9999; align-items: center; justify-content: center;
}
.loading-overlay.show { display: flex; }

/* ============================================================
   Toast（全局统一：白底卡片 + 左侧色条 + 类型图标，仅强调色随类型变化）
   ============================================================ */
.toast.app-toast {
  --toast-accent: var(--primary);
  min-width: 280px;
  /* 长提示不超出视口，自动换行 */
  max-width: min(560px, calc(100vw - 32px));
  background: #fff;
  color: var(--text);
  border-radius: 12px;
  border-left: 4px solid var(--toast-accent) !important;
  box-shadow: 0 12px 32px rgba(17, 24, 39, .16);
  font-size: 15px;
  font-weight: 600;
  overflow: hidden;
}
.toast.app-toast[data-type="success"] { --toast-accent: #16a34a; }
.toast.app-toast[data-type="danger"]  { --toast-accent: #dc2626; }
.toast.app-toast[data-type="warning"] { --toast-accent: #d97706; }
.toast.app-toast[data-type="info"],
.toast.app-toast[data-type="primary"] { --toast-accent: var(--primary); }
.toast.app-toast .toast-body {
  display: flex; align-items: flex-start; gap: 10px;
  padding: .8rem 1rem; font-size: 15px; line-height: 1.5;
}
.toast.app-toast .toast-body i { color: var(--toast-accent); font-size: 18px; flex-shrink: 0; margin-top: 1px; }
/* 多行提示：文字换行整齐，不撑破卡片 */
.toast.app-toast .toast-body > span { line-height: 1.6; word-break: break-word; }
/* 摘要类提示的小胶囊：已匹配 / 未匹配 / 沿用上月 等（1 个可省，多个分行显示） */
.toast.app-toast .tk {
  display: inline-block; margin: 5px 6px 0 0; padding: 1px 9px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; background: #f1f5f9; color: #64748b;
}
.toast.app-toast .tk b { font-weight: 800; }
.toast.app-toast .tk.ok { background: #e6f8ec; color: #16a34a; }
.toast.app-toast .tk.no { background: #fff3db; color: #d99a20; }
.toast.app-toast .tk.prev,
.toast.app-toast .tk.tip { background: #e9f0fe; color: var(--primary); }
.toast.app-toast .btn-close { opacity: .4; }
.toast.app-toast .btn-close:hover { opacity: .8; }

/* 进入动画与其它弹层保持一致 */
.toast-container .toast { transition: opacity .2s ease, transform .2s ease; }
