/* manage.css —— 账户管理台附加样式（叠加在 style.css 之上） */

/* ===== 列表头部：标题 + 工具栏 ===== */
.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.result-head h2 { margin: 0; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar .btn { padding: 9px 18px; }

/* ===== 菜单 / 文件按钮 ===== */
.file-btn { display: inline-flex; align-items: center; cursor: pointer; }
.file-btn:hover { background: #e9eef6; }

.dropdown { position: relative; }
.dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 230px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.18);
  padding: 6px;
  z-index: 60;
  animation: pop 0.14s ease-out;
}
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.dropdown-menu button {
  display: flex;
  align-items: center;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 13.5px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.dropdown-menu button:hover { background: #eff6ff; color: var(--accent-2); }

/* ===== 危险按钮 ===== */
.btn.danger { color: #b91c1c; }
.btn.danger:hover { background: #fef2f2; border-color: #fecaca; }
.mini.danger { color: #b91c1c; }
.mini.danger:hover { background: var(--warn); color: #fff; border-color: var(--warn); }

/* ===== 提示条 / 空状态 ===== */
.notice {
  margin-top: 14px;
  padding: 11px 14px;
  border-radius: 10px;
  background: #f0fdf4;
  border: 1.5px solid #bbf7d0;
  color: #15803d;
  font-size: 13.5px;
}
.empty {
  padding: 40px 16px;
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
  border: 1.5px dashed var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfcfe, #f6f9fd);
}

/* ===== 表格操作列 ===== */
.c-ops { white-space: nowrap; }
.c-ops .mini { margin-left: 6px; }
.c-ops .mini:first-child { margin-left: 0; }

/* ===== 弹窗 ===== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 200;
}
.modal-box {
  width: 100%;
  max-width: 430px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 28px 70px rgba(2, 6, 23, 0.4);
  padding: 24px;
  animation: rise 0.16s ease-out;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}
.modal-box.wide { max-width: 660px; }
@keyframes rise { from { opacity: 0; transform: translateY(10px) scale(0.99); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.modal-head h3 { margin: 0; font-size: 18px; }
.modal-box h3 { margin: 0 0 16px; font-size: 18px; }
.modal-x {
  border: none;
  background: #f1f5f9;
  width: 32px; height: 32px;
  border-radius: 9px;
  font-size: 20px; line-height: 1;
  color: #64748b;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.modal-x:hover { background: #e2e8f0; color: #334155; }

/* ===== 输入框 ===== */
.text-input {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: 9px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  background: #f8fafc;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.text-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
  background: #fff;
}

/* ===== 页签 ===== */
.tabs {
  display: flex;
  gap: 6px;
  background: #f1f5f9;
  padding: 5px;
  border-radius: 12px;
  margin-bottom: 18px;
}
.tab {
  flex: 1;
  border: none;
  background: transparent;
  padding: 9px 12px;
  border-radius: 9px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: background 0.14s, color 0.14s, box-shadow 0.14s;
}
.tab:hover:not(.active) { color: #334155; }
.tab.active {
  background: #fff;
  color: var(--accent-2);
  box-shadow: 0 2px 8px rgba(2, 6, 23, 0.12);
}

/* ===== 自定义导入表单 ===== */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}
.form-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
}
.form-item.full { grid-column: 1 / -1; }
.form-item select.text-input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #94a3b8 50%), linear-gradient(135deg, #94a3b8 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr; }
  .modal-box { padding: 20px; }
}

/* 弹窗底部按钮 */
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.tab-pane .actions { margin-top: 16px; }

/* 编辑弹窗字段间距 */
.modal-box > .field-label { margin-top: 4px; }
.modal-box > .text-input { margin-bottom: 14px; }

/* 自定义导入：说明文字 + 高级选项折叠 */
.form-hint {
  margin: 12px 2px 0;
  font-size: 12.5px;
  color: #94a3b8;
  line-height: 1.6;
}
.advanced {
  margin-top: 14px;
  border: 1.5px solid var(--line);
  border-radius: 11px;
  background: #f8fafc;
  overflow: hidden;
}
.advanced > summary {
  cursor: pointer;
  padding: 11px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  list-style: none;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.advanced > summary::-webkit-details-marker { display: none; }
.advanced > summary::before {
  content: "▸";
  font-size: 12px;
  color: #94a3b8;
  transition: transform 0.15s;
}
.advanced[open] > summary::before { transform: rotate(90deg); }
.advanced > summary:hover { color: var(--accent-2); }
.advanced > .form-grid {
  padding: 4px 14px 16px;
  border-top: 1px solid var(--line);
  background: #fff;
  padding-top: 16px;
}
