:root {
  --bg: #0f1115;
  --card: #1a1d24;
  --border: #2a2e38;
  --text: #e6e8ee;
  --muted: #9aa3b2;
  --accent: #4f8cff;
  --danger: #ff5c5c;
  --ok: #3ddc84;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.5;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 20px; background: var(--card); border-bottom: 1px solid var(--border);
}
.brand { font-weight: 700; font-size: 18px; }
.right { display: flex; gap: 14px; align-items: center; }
.btnlink { padding: 4px 10px; border: 1px solid var(--border); border-radius: 6px; cursor: pointer; background: none; color: var(--text); }
.btnlink:hover { border-color: var(--accent); text-decoration: none; }
.container { max-width: 960px; margin: 24px auto; padding: 0 16px; }
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 24px;
}
.card.narrow { max-width: 440px; margin: 40px auto; }
.head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
h2 { margin: 0 0 16px; font-size: 20px; }
.head h2 { margin: 0; }
.muted { color: var(--muted); font-size: 13px; }
label { display: block; margin: 12px 0 4px; font-size: 13px; color: var(--muted); }
input[type=text], input[type=password] {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 8px; background: #12141a; color: var(--text); font-size: 15px;
}
input:focus { outline: none; border-color: var(--accent); }
button.primary {
  margin-top: 16px; width: 100%; padding: 11px; border: none; border-radius: 8px;
  background: var(--accent); color: #fff; font-size: 15px; font-weight: 600; cursor: pointer;
}
button.primary:hover { filter: brightness(1.1); }
.alert { background: rgba(255,92,92,.12); color: var(--danger); padding: 10px 12px; border-radius: 8px; margin-bottom: 12px; font-size: 14px; }
.ok { background: rgba(61,220,132,.12); color: var(--ok); padding: 10px 12px; border-radius: 8px; margin-bottom: 12px; font-size: 14px; }
.switch { margin-top: 16px; text-align: center; font-size: 14px; color: var(--muted); }

/* 配额条 */
.quota-bar { height: 6px; background: var(--border); border-radius: 3px; margin-bottom: 16px; overflow: hidden; }
.quota-fill { height: 100%; background: var(--accent); border-radius: 3px; transition: width .3s; }

/* 上传 */
.upload { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.dropzone {
  flex: 1; min-width: 220px; border: 1px dashed var(--border); border-radius: 8px;
  padding: 14px; text-align: center; color: var(--muted); cursor: pointer; transition: .15s;
}
.dropzone.dragover { border-color: var(--accent); background: rgba(79,140,255,.08); color: var(--text); }
.dropzone input[type=file] { display: none; }
.upload button { width: auto; margin-top: 0; padding: 10px 20px; }
.progwrap { width: 100%; height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.prog { height: 100%; width: 0; background: var(--ok); transition: width .2s; }

/* 工具栏 */
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.breadcrumb { color: var(--muted); font-size: 14px; }
.breadcrumb a { color: var(--accent); }

/* 文件表 */
table.files { width: 100%; border-collapse: collapse; font-size: 14px; }
table.files th, table.files td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); }
table.files th { color: var(--muted); font-weight: 500; font-size: 12px; }
table.files .ops { white-space: nowrap; }
table.files .ops a { margin-right: 12px; }
.danger { color: var(--danger) !important; }
.empty { text-align: center; color: var(--muted); padding: 30px !important; }
.h-captcha { margin-top: 14px; }

/* 登录页标签 */
.tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.tab { flex: 1; padding: 9px; border: 1px solid var(--border); border-radius: 8px; background: none; color: var(--muted); cursor: pointer; font-size: 14px; }
.tab.active { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }

/* 账号设置页 */
.sect { border-top: 1px solid var(--border); padding-top: 16px; margin-top: 16px; }
.sect h3 { margin: 0 0 8px; font-size: 15px; }
.primary-link { display: inline-block; margin-top: 8px; padding: 10px 18px; border-radius: 8px; background: var(--accent); color: #fff; font-weight: 600; }
.primary-link:hover { filter: brightness(1.1); text-decoration: none; }
button.danger {
  margin-top: 16px; width: 100%; padding: 11px; border: 1px solid var(--danger);
  border-radius: 8px; background: none; color: var(--danger); font-size: 15px; font-weight: 600; cursor: pointer;
}
button.danger:hover { background: rgba(255,92,92,.1); }

/* TOTP 二维码 */
.qr { text-align: center; margin: 12px 0; }
.qr svg { width: 200px; height: 200px; border-radius: 8px; }
code { background: #12141a; padding: 2px 6px; border-radius: 4px; font-family: ui-monospace, monospace; font-size: 13px; word-break: break-all; }
