* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "Segoe UI", "Microsoft YaHei", sans-serif; background: #f5f6f8; color: #222; }
header { display: flex; justify-content: space-between; align-items: center; background: #1d3557; color: #fff; padding: 10px 20px; }
header .brand { font-size: 18px; font-weight: 700; }
header .sub { font-size: 12px; font-weight: 400; opacity: .75; margin-left: 8px; }
nav { display: flex; align-items: center; gap: 14px; font-size: 14px; }
nav a { color: #cfe0f5; text-decoration: none; padding: 4px 10px; border-radius: 4px; }
nav a:hover { background: #27466e; }
nav a.active { background: #e63946; color: #fff; }
nav .who { opacity: .8; }
nav .spacer { flex: 1; }
main { max-width: 1200px; margin: 20px auto; padding: 0 16px; }
.grid { display: grid; grid-template-columns: 280px 1fr; gap: 20px; }
aside, section { background: #fff; border-radius: 8px; padding: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
h3 { margin-bottom: 12px; font-size: 16px; }
.muted { color: #888; font-size: 12px; font-weight: 400; }
input, select { padding: 6px 8px; border: 1px solid #ccc; border-radius: 4px; font-size: 13px; }
button { padding: 6px 12px; background: #1d3557; color: #fff; border: 0; border-radius: 4px; cursor: pointer; font-size: 13px; }
button:hover { background: #27466e; }
button.mini { padding: 2px 8px; font-size: 12px; background: #457b9d; }
button.mini.danger { background: #e63946; }
button.mini.gray { background: #888; }
table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 13px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid #eee; }
th { color: #666; font-weight: 600; }
td a { color: #1d3557; }
.cat-actions { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.form-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.form-row input { flex: 1; min-width: 130px; }
.filter-row { margin-bottom: 8px; }
.tree { list-style: none; font-size: 13px; }
.tree li { padding: 4px 6px; cursor: pointer; border-radius: 4px; display: flex; justify-content: space-between; }
.tree li:hover { background: #eef3f8; }
.tree li.sel { background: #d9e6f2; font-weight: 600; }
.tree li .sub { padding-left: 22px; }
.tree li .mini { visibility: hidden; }
.tree li:hover .mini { visibility: visible; }
.err { background: #ffe3e3; color: #b00020; padding: 8px 12px; border-radius: 4px; margin: 10px 0; font-size: 13px; }
.login-body { display: flex; align-items: center; justify-content: center; height: 100vh; }
.login-box { background: #fff; padding: 32px; border-radius: 10px; width: 340px; box-shadow: 0 4px 16px rgba(0,0,0,.12); text-align: center; }
.login-box h1 { margin-bottom: 6px; font-size: 22px; }
.login-box form { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.login-box input { padding: 9px 10px; }
.login-box button { padding: 9px; font-size: 15px; }
.watch-badge { font-size: 11px; color: #e63946; }
