:root {
  --bg: #f5f6f8; --card: #fff; --text: #1f2328; --muted: #6a737d; --line: #e1e4e8;
  --accent: #1f6feb; --line-green: #06c755; --danger: #cf222e; --warn: #9a6700;
  font-family: "Microsoft JhengHei UI", "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.55; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: Consolas, monospace; font-size: 13px; background: #eef0f3; padding: 1px 5px; border-radius: 4px; }
.muted { color: var(--muted); font-size: 13px; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px;
  background: #24292f; color: #fff; }
.top .brand { color: #fff; font-weight: 700; font-size: 17px; }
.top .who { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.top .who .name { opacity: .85; }
.top .lnk { color: #fff; }
.inline { display: inline; margin: 0; }
button.lnk { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; }
.top button.lnk { color: #fff; }
button.lnk.danger { color: var(--danger); }

main { max-width: 1000px; margin: 0 auto; padding: 20px; }
h1 { font-size: 22px; margin: 6px 0 16px; }
footer { max-width: 1000px; margin: 0 auto; padding: 16px 20px 40px; color: var(--muted); font-size: 12px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px 20px; margin-bottom: 14px; }
.card.narrow { max-width: 520px; margin: 40px auto; text-align: center; }
.card.narrow h1 { margin-top: 0; }

.line-btn { display: inline-block; background: var(--line-green); color: #fff; font-weight: 700; padding: 11px 28px;
  border-radius: 8px; font-size: 16px; }
.line-btn:hover { text-decoration: none; filter: brightness(.95); }

.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.project { display: flex; flex-direction: column; gap: 4px; background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: 18px 20px; color: var(--text); }
.project:hover { border-color: var(--accent); text-decoration: none; }
.project .pname { font-size: 18px; font-weight: 700; color: var(--accent); }

.crumbs { margin: 4px 0 14px; font-size: 15px; }
.crumbs .sep { color: var(--muted); margin: 0 2px; }

table.files { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
table.files th, table.files td { padding: 9px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.files th { background: #f0f2f5; font-weight: 600; font-size: 13px; color: var(--muted); }
table.files tr:last-child td { border-bottom: 0; }
table.files .num { text-align: right; white-space: nowrap; }
table.files .date { white-space: nowrap; color: var(--muted); font-size: 13px; }
table.files .fname { word-break: break-all; }
table.files a.dir { font-weight: 600; }
.scroll { overflow-x: auto; }
table.log td { font-size: 13px; }

.admin-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tabs { display: flex; gap: 6px; }
.tabs a, .tabs span { padding: 5px 12px; border-radius: 6px; font-size: 14px; }
.tabs .on { background: #24292f; color: #fff; }
.user { position: relative; }
.user .uhead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.user .badge { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 10px; color: #fff; background: var(--muted); }
.user.s-pending { border-left: 4px solid var(--warn); }
.user.s-pending .badge { background: var(--warn); }
.user.s-approved { border-left: 4px solid var(--line-green); }
.user.s-approved .badge { background: #1a7f37; }
.user.s-disabled { border-left: 4px solid var(--muted); opacity: .8; }
.user .tag { font-size: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 1px 8px; color: var(--muted); }
.user .ubody { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.user fieldset.projs { border: 1px solid var(--line); border-radius: 6px; padding: 4px 10px 6px; margin: 0; }
.user fieldset.projs legend { font-size: 12px; color: var(--muted); padding: 0 4px; }
.user .chk { margin-right: 12px; white-space: nowrap; }
.user .note input { width: 220px; }
.user .umeta { margin-top: 10px; }
.user form.del { position: absolute; right: 16px; top: 14px; }
select, input[type=text] { font: inherit; padding: 5px 8px; border: 1px solid #c9ced6; border-radius: 6px; }
button.primary { font: inherit; background: var(--accent); color: #fff; border: 0; border-radius: 6px; padding: 6px 18px; cursor: pointer; }

@media (max-width: 640px) {
  main { padding: 14px; }
  .top { padding: 10px 14px; }
  .top .who .name { display: none; }
  table.files .date { display: none; }
  table.files th, table.files td { padding: 8px 10px; }
  .user .note input { width: 100%; }
}
