/* ============ 文档管理网站 - 共享样式（浅色主题） ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #3b6ef6;
  --primary-dark: #2c56cf;
  --primary-light: #e8eefe;
  --bg: #f4f6fb;
  --surface: #ffffff;
  --border: #e4e8f2;
  --text: #1d2433;
  --text-2: #5a6478;
  --text-3: #8b94a7;
  --danger: #e5484d;
  --danger-bg: #fdebec;
  --success: #2fa66a;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(24, 39, 75, .06), 0 8px 24px rgba(24, 39, 75, .06);
  --shadow-hover: 0 4px 12px rgba(24, 39, 75, .10), 0 16px 40px rgba(24, 39, 75, .10);
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
}

button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: 10px; padding: 9px 16px;
  font-size: 14px; font-weight: 500; line-height: 1.4;
  transition: all .15s ease; text-decoration: none;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost {
  background: transparent; color: var(--text-2);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: var(--danger-bg); color: var(--danger); }
.btn-danger:hover { background: #fbd4d6; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- 顶部导航 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1180px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand-logo {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, #3b6ef6, #7a5cf0);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px;
}
.brand-name { font-size: 17px; font-weight: 700; letter-spacing: .5px; }
.brand-sub { font-size: 11px; color: var(--text-3); }
.topbar-actions { margin-left: auto; display: flex; gap: 10px; }

/* ---------- 页面容器 ---------- */
.container { max-width: 1180px; margin: 0 auto; padding: 28px 24px 60px; }

/* ---------- 通用小组件 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--text-2);
  background: #eef1f8; border-radius: 999px; padding: 3px 10px;
}
.tag {
  display: inline-block; font-size: 12px;
  color: var(--primary); background: var(--primary-light);
  border-radius: 6px; padding: 2px 8px;
}

.empty-state {
  text-align: center; padding: 70px 20px; color: var(--text-3);
}
.empty-state .icon { font-size: 52px; margin-bottom: 14px; }
.empty-state h3 { color: var(--text-2); font-size: 16px; margin-bottom: 6px; }
.empty-state p { font-size: 14px; margin-bottom: 20px; }

/* ---------- 模态框 ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(20, 28, 48, .45);
  display: none; align-items: center; justify-content: center;
  backdrop-filter: blur(2px);
}
.modal-mask.show { display: flex; }
.modal {
  background: var(--surface); border-radius: 16px;
  width: min(400px, calc(100vw - 40px));
  padding: 26px; box-shadow: var(--shadow-hover);
  animation: pop .18s ease;
}
@keyframes pop { from { transform: scale(.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal h3 { font-size: 17px; margin-bottom: 8px; }
.modal p { font-size: 13.5px; color: var(--text-2); margin-bottom: 16px; }
.modal input {
  width: 100%; padding: 10px 12px; font-size: 14px;
  border: 1px solid var(--border); border-radius: 10px;
  outline: none; transition: border .15s;
}
.modal input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59, 110, 246, .14); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }

.form-error {
  display: none; margin-top: 10px;
  background: var(--danger-bg); color: var(--danger);
  font-size: 13px; border-radius: 8px; padding: 8px 12px;
}
.form-error.show { display: block; }

/* ---------- 提示条 ---------- */
.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%) translateY(20px);
  background: #1d2433; color: #fff; font-size: 14px;
  padding: 10px 20px; border-radius: 999px;
  opacity: 0; pointer-events: none; transition: all .25s ease; z-index: 200;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 响应式 ---------- */
@media (max-width: 720px) {
  .container { padding: 20px 16px 50px; }
  .topbar-inner { padding: 12px 16px; }
  .brand-sub { display: none; }
}
