:root { --ink:#20201e; --muted:#74716b; --paper:#f4f2ed; --white:#fff; --line:#dedbd4; --coral:#d97757; --green:#537566; }
* { box-sizing:border-box; }
html { scroll-behavior:smooth; }
body { margin:0; color:var(--ink); background:var(--paper); font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI","Microsoft YaHei",sans-serif; }
button,input { font:inherit; }
.sidebar { position:fixed; inset:0 auto 0 0; width:230px; padding:30px 24px; display:flex; flex-direction:column; background:#20201e; color:#f7f3eb; }
.admin-brand { display:flex; align-items:center; gap:10px; color:inherit; text-decoration:none; font-size:12px; font-weight:750; letter-spacing:1.5px; }
.admin-brand span { width:16px; height:16px; border-radius:50% 50% 8% 50%; background:var(--coral); transform:rotate(45deg); }
.sidebar nav { margin-top:72px; display:grid; gap:8px; }
.sidebar nav a { padding:11px 13px; border-radius:4px; color:#a8a49c; text-decoration:none; font-size:13px; }
.sidebar nav a:hover,.sidebar nav a.active { color:#fff; background:rgba(255,255,255,.08); }
.logout-form { margin-top:auto; }
.logout-form button { border:0; padding:0; color:#aaa69e; background:none; cursor:pointer; font-size:12px; }
.dashboard { margin-left:230px; padding:44px clamp(28px,5vw,76px) 80px; }
.dashboard-header,.section-head { display:flex; justify-content:space-between; align-items:flex-end; gap:24px; }
.dashboard-header { margin-bottom:34px; }
.overline { margin:0 0 8px; color:var(--muted); font-size:9px; letter-spacing:2px; }
h1,h2 { margin:0; font-family:Georgia,"Songti SC",serif; font-weight:400; letter-spacing:0; }
h1 { font-size:38px; } h2 { font-size:27px; }
.view-site { color:var(--ink); text-decoration:none; font-size:12px; }
.metric-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); border:1px solid var(--line); background:var(--white); }
.metric-grid article { min-height:144px; padding:24px; display:flex; flex-direction:column; border-right:1px solid var(--line); }
.metric-grid article:last-child { border:0; }
.metric-grid span,.metric-grid small { color:var(--muted); font-size:11px; }
.metric-grid strong { margin:auto 0 7px; font:400 30px/1 Georgia,serif; letter-spacing:0; }
.section-block { margin-top:54px; scroll-margin-top:30px; }
.section-head { margin-bottom:20px; }
.section-note { margin:0; color:var(--muted); font-size:11px; }
.search { width:min(100%,300px); display:flex; border-bottom:1px solid var(--ink); }
.search input { width:100%; min-width:0; height:38px; border:0; outline:0; background:transparent; }
.search button { border:0; background:none; cursor:pointer; font-size:11px; }
.table-wrap { overflow:auto; border:1px solid var(--line); background:var(--white); }
table { width:100%; border-collapse:collapse; min-width:850px; }
th,td { padding:15px 18px; border-bottom:1px solid #ece9e3; text-align:left; white-space:nowrap; font-size:12px; }
th { color:var(--muted); background:#faf9f6; font-size:10px; font-weight:600; }
tbody tr:last-child td { border-bottom:0; }
.email-cell { font-weight:600; }.money { color:#a64e35; font-weight:700; }.muted { color:var(--muted); }.empty { padding:40px;text-align:center;color:var(--muted); }
.pagination { display:flex; gap:5px; margin-top:15px; }
.pagination a { min-width:29px; height:29px; padding:0 7px; display:grid; place-items:center; border:1px solid var(--line); color:var(--muted); text-decoration:none; font-size:11px; }
.pagination a.active { color:#fff; background:var(--ink); border-color:var(--ink); }
.prize-editor { border:1px solid var(--line); background:var(--white); }
.prize-row { display:grid; grid-template-columns:1.25fr 1fr .7fr 80px 80px 110px; gap:16px; align-items:end; padding:18px; border-bottom:1px solid #e8e5df; }
.prize-row:last-child { border-bottom:0; }.new-row { background:#faf9f6; }
.prize-row label { display:grid; gap:7px; color:var(--muted); font-size:9px; letter-spacing:.5px; }
.prize-row input:not([type=checkbox]):not([type=color]) { width:100%; height:36px; padding:0 9px; border:1px solid var(--line); border-radius:3px; color:var(--ink); background:#fff; font-size:12px; outline:0; }
.prize-row input:focus { border-color:#8c8982; }
.color-input { width:100%; height:36px; padding:3px; border:1px solid var(--line); background:#fff; cursor:pointer; }
.toggle-label { height:36px; display:flex!important; grid-auto-flow:column; align-items:center; justify-content:start; gap:8px!important; font-size:10px!important; }
.toggle-label input { position:absolute; opacity:0; }
.toggle-label span { width:30px;height:17px;border-radius:10px;background:#c8c5be;position:relative;transition:.2s; }
.toggle-label span:after { content:"";position:absolute;width:13px;height:13px;left:2px;top:2px;border-radius:50%;background:#fff;transition:.2s; }
.toggle-label input:checked+span { background:var(--green); }.toggle-label input:checked+span:after { transform:translateX(13px); }
.chance { height:36px; display:flex; align-items:center; justify-content:space-between; gap:10px; }
.chance span { color:var(--muted); font-size:11px; }
.chance button { height:32px; padding:0 13px; border:0; border-radius:3px; color:#fff; background:var(--ink); cursor:pointer; font-size:11px; }
.alert { margin:0 0 20px; padding:12px 15px; border-left:3px solid; background:#fff; font-size:12px; }.alert.error { border-color:#b54e3c;color:#8a382a; }.alert.success { border-color:var(--green);color:#375849; }

.login-page { min-height:100vh; display:grid; place-items:center; background:#20201e; }
.login-shell { width:min(92vw,430px); color:#f7f3eb; }
.login-shell>.admin-brand { margin-bottom:40px; }
.login-box { padding:38px; color:var(--ink); background:var(--paper); }
.login-box h1 { font-size:36px; }.subtle { margin:10px 0 30px; color:var(--muted); font-size:12px; }
.login-box form { display:grid; gap:18px; }.login-box label { display:grid; gap:7px; color:var(--muted); font-size:11px; }
.login-box input { width:100%; height:42px; padding:0 10px; border:1px solid var(--line); background:#fff; outline:0; }
.login-box input:focus { border-color:var(--ink); }.login-box button { height:44px; border:0; border-radius:3px; color:#fff; background:var(--coral); cursor:pointer; }

@media(max-width:1100px){.metric-grid{grid-template-columns:repeat(2,1fr)}.metric-grid article:nth-child(2){border-right:0}.metric-grid article:nth-child(-n+2){border-bottom:1px solid var(--line)}.prize-row{grid-template-columns:repeat(3,1fr)} }
@media(max-width:760px){.sidebar{position:static;width:auto;height:64px;padding:0 20px;flex-direction:row;align-items:center}.sidebar nav{margin:0 0 0 auto;display:flex}.sidebar nav a{display:none}.logout-form{margin:0 0 0 18px}.dashboard{margin:0;padding:30px 18px 60px}.metric-grid{grid-template-columns:1fr 1fr}.metric-grid article{padding:18px}.dashboard-header,.section-head{align-items:flex-start}.search{width:180px}.prize-row{grid-template-columns:1fr 1fr}.section-note{display:none}}
@media(max-width:500px){.metric-grid{grid-template-columns:1fr}.metric-grid article{border-right:0!important;border-bottom:1px solid var(--line)!important;min-height:115px}.metric-grid article:last-child{border-bottom:0!important}.section-head{display:grid}.search{width:100%}.prize-row{grid-template-columns:1fr}.chance{justify-content:flex-end}.login-box{padding:28px}}
