:root {
  --ink: #18251d;
  --muted: #6c7a70;
  --line: #e2e8e3;
  --paper: #ffffff;
  --canvas: #f4f7f2;
  --green: #146b3a;
  --green-2: #2c8b54;
  --gold: #d99b35;
  --danger: #c94747;
  --shadow: 0 14px 45px rgba(25, 58, 39, .08);
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: "Microsoft YaHei", "PingFang SC", sans-serif; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: 1.2fr .8fr; background: radial-gradient(circle at 15% 15%, #2d8d59, #103f27 65%); }
.login-brand { color: white; padding: 9vh 8vw; display: flex; flex-direction: column; justify-content: center; }
.brand-mark, .logo span { display: inline-flex; width: 58px; height: 58px; border-radius: 18px; align-items: center; justify-content: center; font-weight: 800; letter-spacing: 2px; background: #f0c46d; color: #17462d; }
.login-brand h1 { font-size: clamp(40px, 5vw, 68px); line-height: 1.12; letter-spacing: -2px; margin: 28px 0 18px; }
.login-brand p { max-width: 580px; font-size: 18px; color: rgba(255,255,255,.72); line-height: 1.8; }
.login-card { margin: 5vh 6vw; align-self: center; background: rgba(255,255,255,.97); border-radius: 28px; padding: 42px; box-shadow: var(--shadow); }
.login-card h2 { margin: 0 0 30px; font-size: 28px; }
.login-card label { display: grid; gap: 9px; margin-bottom: 18px; color: var(--muted); font-size: 14px; }
.login-card input { padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; outline: none; }
.login-card input:focus { border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(44,139,84,.12); }
.login-card button, .primary { border: 0; border-radius: 12px; padding: 14px 18px; color: #fff; background: var(--green); font-weight: 700; }
.login-card button { width: 100%; margin-top: 8px; }
.login-card small { display: block; color: #929d95; line-height: 1.6; margin-top: 18px; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 238px 1fr; }
.sidebar { background: #102d20; color: #fff; padding: 26px 18px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.logo { display: flex; gap: 12px; align-items: center; padding: 0 8px 28px; }
.logo span { width: 42px; height: 42px; border-radius: 13px; font-size: 13px; }
.logo strong { font-size: 15px; letter-spacing: .5px; }
nav { display: grid; gap: 6px; }
nav button, .logout { border: 0; color: rgba(255,255,255,.68); background: transparent; text-align: left; padding: 12px 14px; border-radius: 10px; }
nav button:hover, nav button.active { background: rgba(255,255,255,.1); color: #fff; }
.logout { margin-top: auto; border: 1px solid rgba(255,255,255,.12); text-align: center; }
.workspace { min-width: 0; }
.topbar { height: 104px; padding: 24px 34px; display: flex; justify-content: space-between; align-items: center; background: rgba(244,247,242,.88); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 10; border-bottom: 1px solid rgba(226,232,227,.8); }
.topbar p { margin: 0 0 4px; color: var(--gold); font-size: 11px; font-weight: 800; letter-spacing: 2px; }
.topbar h2 { margin: 0; font-size: 25px; }
.admin-profile { display: flex; gap: 9px; align-items: center; background: #fff; border: 1px solid var(--line); padding: 10px 14px; border-radius: 999px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #3cad6e; box-shadow: 0 0 0 4px rgba(60,173,110,.15); }
.content { padding: 28px 34px 60px; }
.grid { display: grid; gap: 18px; }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 22px; box-shadow: 0 2px 10px rgba(20,60,35,.025); }
.metric span { color: var(--muted); font-size: 13px; }
.metric strong { display: block; font-size: 29px; margin-top: 12px; letter-spacing: -.6px; }
.metric small { color: #8a978e; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }
.card-head h3 { margin: 0; font-size: 17px; }
.table-wrap { overflow: auto; }
table { border-collapse: collapse; width: 100%; min-width: 680px; }
th, td { padding: 13px 12px; border-bottom: 1px solid var(--line); text-align: left; font-size: 13px; vertical-align: middle; }
th { color: var(--muted); font-size: 12px; font-weight: 600; background: #fafbf9; position: sticky; top: 0; }
tr:last-child td { border-bottom: 0; }
.pill { display: inline-flex; padding: 4px 9px; border-radius: 999px; background: #edf6ef; color: #237246; font-size: 12px; }
.pill.warn { background: #fff3df; color: #9b6015; }
.pill.danger { background: #fcecec; color: #b63e3e; }
.pill.neutral { background: #eef0ee; color: #667169; }
.actions { display: flex; gap: 7px; flex-wrap: wrap; }
.btn { border: 1px solid var(--line); color: var(--ink); background: #fff; padding: 7px 11px; border-radius: 9px; }
.btn:hover { border-color: #abc8b5; background: #f6fbf7; }
.btn.primary { border-color: var(--green); }
.btn.danger { color: var(--danger); }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar input, .toolbar select, .form-row input, .form-row select, .form-row textarea { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 10px 12px; outline: none; }
.toolbar input { min-width: 230px; }
.chart { height: 230px; display: flex; gap: 8px; align-items: end; padding-top: 20px; }
.chart-bar { flex: 1; min-width: 18px; background: linear-gradient(180deg, #3fa268, #146b3a); border-radius: 8px 8px 3px 3px; position: relative; transition: .2s; }
.chart-bar:hover { filter: brightness(1.08); transform: translateY(-2px); }
.chart-bar span { position: absolute; bottom: -24px; width: 100%; text-align: center; color: #849087; font-size: 10px; }
.rank-row { display: grid; grid-template-columns: 38px 1fr auto; gap: 12px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); }
.rank-row:last-child { border: 0; }
.rank-no { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: #eef4ef; font-weight: 800; color: var(--green); }
.rank-row strong { display: block; }
.rank-row small { color: var(--muted); }
.empty { padding: 50px; text-align: center; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-row { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
.form-row textarea { min-height: 110px; resize: vertical; }
.modal-mask { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(8,24,14,.55); padding: 20px; }
.modal { background: #fff; border-radius: 20px; width: min(780px, 96vw); max-height: 90vh; overflow: auto; padding: 26px; box-shadow: 0 25px 80px rgba(0,0,0,.2); }
.modal h3 { margin: 0 0 22px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: #142a1d; color: #fff; padding: 12px 18px; border-radius: 11px; opacity: 0; pointer-events: none; transition: .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 1100px) { .grid.cols-4 { grid-template-columns: repeat(2,1fr); } .grid.cols-3 { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .login-shell { grid-template-columns: 1fr; } .login-brand { display: none; } .login-card { margin: 12vh 20px; } .app-shell { grid-template-columns: 1fr; } .sidebar { position: static; height: auto; } nav { grid-template-columns: repeat(2,1fr); } .content, .topbar { padding-left: 18px; padding-right: 18px; } .grid.cols-2, .grid.cols-4, .form-grid { grid-template-columns: 1fr; } }

.upload-thumbs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.upload-thumbs a { width: 54px; height: 54px; border-radius: 9px; overflow: hidden; border: 1px solid var(--line); background: #f4f7f2; display: block; }
.upload-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
