* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f3f5f7;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  color: #1f2937;
}

.container {
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 18px;
}

.card {
  background: #fff;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 8px 28px rgba(0,0,0,.06);
  margin-bottom: 18px;
}

h1 {
  margin: 0 0 8px;
  font-size: 28px;
}

h2 {
  font-size: 18px;
  margin: 0;
}

.muted {
  color: #6b7280;
}

.tabs {
  display: flex;
  gap: 10px;
  margin: 24px 0 16px;
}

/* =========================
   通用按钮
   ========================= */

button {
  border: 1px solid #d1d5db;
  background: #fff;
  color: #1f2937;
  border-radius: 8px;
  padding: 11px 18px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color .15s ease,
              color .15s ease,
              border-color .15s ease;
}

button:hover {
  background: #f3f4f6;
}

button:disabled {
  opacity: .6;
  cursor: not-allowed;
}

/* =========================
   导入文件 / 粘贴号码
   ========================= */

.tab.active {
  background: #111827;
  border-color: #111827;
  color: #fff;
}

.tab.active:hover {
  background: #1f2937;
  border-color: #1f2937;
  color: #fff;
}

/* =========================
   开始过滤按钮
   ========================= */

.primary,
#filterBtn {
  width: 100%;
  margin-top: 16px;
  border: none;
  background: #111827;
  color: #ffffff;
  font-size: 16px;
  padding: 14px;
}

/* 鼠标放上去时保持深色背景和白色文字 */
.primary:hover,
#filterBtn:hover {
  background: #1f2937;
  color: #ffffff;
}

/* 未选择文件等情况下的禁用状态 */
.primary:disabled,
#filterBtn:disabled {
  background: #e5e7eb;
  color: #9ca3af;
  border: 1px solid #d1d5db;
  cursor: not-allowed;
  opacity: 1;
}

/* 禁用状态下鼠标经过，文字不会消失 */
.primary:disabled:hover,
#filterBtn:disabled:hover {
  background: #e5e7eb;
  color: #9ca3af;
}

/* =========================
   文件选择区域
   ========================= */

.dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  background: #fafafa;
}

.dropzone:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.dropzone input {
  display: none;
}

.dropzone span {
  color: #64748b;
}

/* =========================
   文本输入框
   ========================= */

textarea {
  width: 100%;
  min-height: 230px;
  resize: vertical;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 14px;
  font: 14px Consolas, monospace;
}

/* =========================
   状态提示
   ========================= */

.status {
  margin-top: 14px;
  min-height: 22px;
  color: #374151;
}

.status.error {
  color: #b91c1c;
}

/* =========================
   统计区域
   ========================= */

.stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.stats > div {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px;
}

.stats span {
  display: block;
  color: #6b7280;
  font-size: 13px;
}

.stats strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
}

/* =========================
   过滤结果
   ========================= */

.result {
  margin-top: 24px;
}

.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

#resultText {
  min-height: 320px;
  background: #f9fafb;
}

/* =========================
   管理员历史数据库
   ========================= */

.admin-card summary {
  cursor: pointer;
  font-weight: 700;
}

.admin-body {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  margin-top: 16px;
  align-items: center;
}

.admin-body input {
  padding: 11px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
}

#adminStatus {
  grid-column: 1 / -1;
  color: #555;
}

/* =========================
   隐藏
   ========================= */

.hidden {
  display: none !important;
}

/* =========================
   手机 / 小屏幕
   ========================= */

@media (max-width: 800px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-body {
    grid-template-columns: 1fr;
  }
}