:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --line: #e6e9f0;
  --text: #1f2733;
  --muted: #7a869a;
  --primary: #2f6bff;
  --primary-d: #1e56e0;
  --danger: #e5484d;
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}
.hidden { display: none !important; }

/* ---------- 登录 ---------- */
.auth-wrap {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2f6bff 0%, #6a4bff 100%);
  padding: 24px;
}
.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--card);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 20px 60px rgba(20, 30, 60, 0.25);
}
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.brand h1 { font-size: 20px; margin: 0; }
.brand-logo {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.brand-logo.sm { width: 30px; height: 30px; font-size: 16px; border-radius: 8px; }
#auth-form label { display: block; margin-bottom: 14px; color: var(--muted); font-size: 13px; }
#auth-form input {
  width: 100%; margin-top: 6px; padding: 11px 12px;
  border: 1px solid var(--line); border-radius: 10px; font-size: 14px; color: var(--text);
}
#auth-form input:focus { outline: none; border-color: var(--primary); }
.msg { color: var(--danger); min-height: 18px; font-size: 13px; margin: 10px 0 0; }

/* ---------- 按钮 ---------- */
.btn {
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  padding: 9px 14px; border-radius: 10px; cursor: pointer; font-size: 14px;
}
.btn:hover { border-color: #c9d2e3; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-d); }
.btn.ghost { background: transparent; }
.btn.block { display: block; width: 100%; margin-bottom: 10px; }
.btn.sm { padding: 5px 9px; font-size: 13px; }
.btn.link { border: none; background: none; color: var(--primary); padding: 4px 6px; }
.btn.link.danger { color: var(--danger); }

/* ---------- 布局 ---------- */
.app-wrap { display: flex; flex-direction: column; height: 100vh; }
.topbar {
  height: 60px; background: var(--card); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; padding: 0 20px;
}
.topbar-left { display: flex; align-items: center; gap: 10px; }
.topbar-right { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.layout { flex: 1; display: flex; overflow: hidden; }
.sidebar {
  width: 220px; padding: 18px; border-right: 1px solid var(--line); background: var(--card);
}
.search {
  width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; margin-top: 6px;
}
.drop-hint {
  margin-top: 18px; padding: 24px 12px; border: 2px dashed var(--line); border-radius: 12px;
  color: var(--muted); text-align: center; font-size: 13px;
}
.content { flex: 1; overflow: auto; padding: 20px 24px; }

/* ---------- 面包屑 ---------- */
.crumbs { display: flex; align-items: center; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.crumbs a { color: var(--primary); cursor: pointer; text-decoration: none; }
.crumbs span.sep { color: var(--muted); }
.crumbs .cur { color: var(--text); font-weight: 600; }

/* ---------- 文件列表 ---------- */
.file-view { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.row {
  display: grid; grid-template-columns: 1fr 100px 160px 150px; align-items: center;
  padding: 11px 16px; border-bottom: 1px solid var(--line);
}
.row.head { background: #fafbfe; color: var(--muted); font-size: 13px; font-weight: 600; }
.row:last-child { border-bottom: none; }
.row:not(.head):hover { background: #f7f9ff; }
.c-name { display: flex; align-items: center; gap: 10px; overflow: hidden; }
.c-name .ico { font-size: 18px; }
.c-name .txt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.c-size, .c-time { color: var(--muted); font-size: 13px; }
.c-act { display: flex; gap: 2px; justify-content: flex-end; }
.empty { text-align: center; color: var(--muted); padding: 60px 0; }

/* ---------- 拖拽遮罩 ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(47, 107, 255, 0.12);
  border: 3px dashed var(--primary); display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: var(--primary-d); font-weight: 600; z-index: 50;
}

/* ---------- 弹窗 ---------- */
.modal {
  position: fixed; inset: 0; background: rgba(15, 22, 40, 0.55);
  display: flex; align-items: center; justify-content: center; z-index: 60; padding: 24px;
}
.modal-box { background: var(--card); border-radius: 14px; width: 100%; max-width: 760px; max-height: 90vh; display: flex; flex-direction: column; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); font-weight: 600; }
.modal-body { padding: 18px; overflow: auto; }
.modal-body img, .modal-body video { max-width: 100%; border-radius: 8px; display: block; margin: 0 auto; }
.modal-body iframe { width: 100%; height: 70vh; border: none; border-radius: 8px; }
.modal-body pre { white-space: pre-wrap; word-break: break-all; font-size: 13px; background: #f6f8fc; padding: 14px; border-radius: 8px; }

/* ---------- 成员管理 ---------- */
.member-form { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.member-form input, .member-form select { padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; }
.member-form input { flex: 1; min-width: 120px; }
.member-list { list-style: none; padding: 0; margin: 0; }
.member-list li { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); }
.member-list .role { color: var(--muted); font-size: 12px; margin-left: 8px; }

@media (max-width: 720px) {
  .sidebar { display: none; }
  .row { grid-template-columns: 1fr 90px; }
  .c-time, .c-act { display: none; }
}
