:root{--ink:#1f3a5f;--ink-soft:#5a6e88;--brand:#0099ff;--brand-deep:#2c6fe0;--grad:linear-gradient(120deg,#11bcef,#347ff1 55%,#7951ed);--amber:#ff9b3d;--coral:#f35178;--surface:#fff;--page:#eef4fb;--line:#e4edf7;--line-strong:#cfe0f1;--muted:#8198b2;--shadow:0 16px 38px rgba(16,74,150,.08)}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
[hidden]{display:none!important}
body{margin:0;min-width:320px;background:var(--page);color:var(--ink);font:14px/1.55 "PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif}
button,input,textarea,select{font:inherit}
button{cursor:pointer}
button:disabled{opacity:.5;cursor:default}
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid #9cccff;outline-offset:2px}

/* 顶部细条（登录页与全局品牌） */
.app-header{background:var(--grad);color:#fff}
.header-inner{max-width:1480px;margin:auto;padding:16px 30px;display:flex;align-items:center;justify-content:space-between;gap:24px}
.brand{display:flex;align-items:center;gap:14px}
.brand-mark{width:44px;height:44px;display:grid;place-items:center;flex:none;border:1px solid #ffffff66;border-radius:13px;background:#ffffff26;color:#fff;font-size:23px;font-weight:700}
.brand-eyebrow{display:block;color:#e4f1ff;font-size:10px;font-weight:700;letter-spacing:1.6px}
h1{margin:3px 0 0;font-size:21px;line-height:1.2;letter-spacing:.3px}
h1 span{font-weight:400;color:#e8f3ff}
.header-meta{display:flex;align-items:center;gap:20px;font-size:12px;color:#eef6ff}
.host-badge{display:inline-flex;align-items:center;gap:8px;padding:7px 11px;border:1px solid #ffffff55;border-radius:20px;color:#eef6ff;white-space:nowrap}
.host-badge i{width:7px;height:7px;border-radius:50%;background:#8ff0c3;box-shadow:0 0 0 3px #8ff0c333}

/* 工作台外壳：左侧栏 + 内容区 */
#workspace{display:flex;align-items:flex-start;gap:0;min-height:calc(100vh - 76px)}
.side-nav{position:sticky;top:0;align-self:stretch;flex:none;width:238px;min-height:100vh;display:flex;flex-direction:column;padding:22px 16px;background:linear-gradient(185deg,#0c3f74,#0a2d57 70%,#0a2850);color:#dce9f8}
.side-brand{display:flex;align-items:center;gap:12px;padding:4px 10px 20px;margin-bottom:14px;border-bottom:1px solid #ffffff1f}
.side-brand .brand-mark{width:40px;height:40px;border-color:#ffffff40;background:#ffffff1c;font-size:21px}
.side-brand .brand-eyebrow{color:#8fb6e3;letter-spacing:1.4px}
.side-brand strong{display:block;margin-top:3px;font-size:15px;color:#fff;font-weight:700}
.nav-links{display:flex;flex-direction:column;gap:4px;flex:1}
.nav-tab{position:relative;display:flex;align-items:center;gap:11px;width:100%;padding:12px 14px;border:0;border-radius:11px;background:transparent;color:#c3d7ef;font-size:14px;font-weight:600;text-align:left;white-space:nowrap;transition:background .15s,color .15s}
.nav-ico{display:inline-grid;place-items:center;width:26px;height:26px;flex:none;border-radius:8px;background:#ffffff14;color:#9fc4ec;font-size:14px}
.nav-tab:hover{background:#ffffff14;color:#fff}
.nav-tab.active{background:#fff;color:var(--brand-deep)}
.nav-tab.active .nav-ico{background:var(--grad);color:#fff}
.nav-tab.active:before{content:"";position:absolute;left:-16px;top:9px;bottom:9px;width:4px;border-radius:0 4px 4px 0;background:#fff}
.nav-count{display:inline-grid;place-items:center;min-width:20px;height:20px;margin-left:auto;padding:0 6px;border-radius:10px;background:var(--amber);color:#fff;font-size:11px;font-weight:700}
.nav-actions{display:flex;flex-direction:column;gap:9px;padding-top:16px;margin-top:12px;border-top:1px solid #ffffff1f}
.nav-actions .host-badge{justify-content:center;border-color:#ffffff33;color:#bcd4ef;font-size:11px}
.nav-tool{border:1px solid #ffffff33;border-radius:9px;background:#ffffff14;color:#e6f0fb;padding:10px 12px;font-size:12.5px;font-weight:600;white-space:nowrap;transition:background .15s,border-color .15s}
.nav-tool:hover{background:#ffffff26;border-color:#ffffff5c}
.logout-tool{background:transparent;color:#a9c6e8}

.work-main{flex:1;min-width:0;max-width:1180px;padding:0 34px 72px}
.section-heading{display:flex;justify-content:space-between;align-items:end;gap:20px;padding:30px 2px 18px}
.section-kicker{color:var(--brand);font-size:11px;font-weight:800;letter-spacing:1.2px}
.section-heading h2{margin:4px 0;font-size:27px;letter-spacing:.2px}
.section-heading p{margin:0;color:var(--ink-soft);font-size:13px}
.heading-side{display:flex;align-items:center;gap:14px;color:var(--muted);font-size:12px;white-space:nowrap}
.heading-line{height:1px;width:40px;background:var(--line-strong)}
#identity{color:#3f5c80;font-weight:600}
#message{min-height:18px;margin:0 2px 12px;color:var(--brand-deep);font-size:12px;font-weight:600}
.workspace-section{animation:section-enter .18s ease-out}
@keyframes section-enter{from{opacity:.6;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}

.panel{min-width:0;margin:0 0 20px;padding:24px 26px;border:1px solid var(--line);border-radius:16px;background:var(--surface);box-shadow:var(--shadow)}
.panel h2{margin:0 0 14px;font-size:17px;line-height:1.35;letter-spacing:.2px}
.panel h3{margin:23px 0 10px;padding-top:18px;border-top:1px solid var(--line);font-size:14px}
.panel p{margin:0 0 16px;color:var(--ink-soft);font-size:13px}
.columns{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start;gap:20px}
.columns>.panel{min-width:0}
.narrow{max-width:430px;margin:60px auto;padding:32px}
#login-box h2{font-size:22px}
form{display:grid;gap:12px}
form,#event-qr{scroll-margin-top:24px}
#merchant-form,#event-form,#issue-form{grid-template-columns:repeat(2,minmax(0,1fr))}
#merchant-form label:has(textarea),#event-form label:has(textarea),#issue-form label:has(textarea){grid-column:1/-1}
label{display:grid;gap:5px;color:#415a79;font-size:12px;font-weight:650}
label.check{display:flex;align-items:center;gap:8px;min-height:36px}
input,textarea,select{width:100%;min-height:40px;padding:9px 12px;border:1px solid var(--line-strong);border-radius:9px;background:#fff;color:var(--ink);font-weight:400;transition:border-color .15s,box-shadow .15s}
input::placeholder,textarea::placeholder{color:#a7b7c9}
input:focus,textarea:focus,select:focus{border-color:var(--brand);box-shadow:0 0 0 3px #0099ff1f}
label.check input{width:16px;min-height:auto;accent-color:var(--brand)}
textarea{min-height:96px;resize:vertical}
form button,.actions button,#exports button,#leaderboard-toggle,.panel>button{border:1px solid transparent;border-radius:10px;background:var(--grad);color:#fff;padding:10px 15px;font-size:12.5px;font-weight:700;box-shadow:0 8px 18px #2c6fe026;transition:filter .15s,transform .1s,box-shadow .15s}
form button:hover,.actions button:hover,#exports button:hover,#leaderboard-toggle:hover,.panel>button:hover{filter:brightness(1.04)}
form button:active,.actions button:active,.panel>button:active{transform:translateY(1px)}
button.secondary,.actions button.secondary,#exports button{background:#eaf4ff;border-color:#d4e7fb;color:#1f6fd0;box-shadow:none}
button.danger,.actions button.danger{background:#fff0f1;border-color:#fbd9dd;color:#d64558;box-shadow:none}
.row{display:flex;justify-content:space-between;align-items:center;gap:15px;min-width:0;padding:15px 0;border-bottom:1px solid #eef3f9}
.row:last-child{border-bottom:0}
.row>div:first-child{min-width:0}
.row strong{display:block;overflow-wrap:anywhere;font-size:13px;font-weight:650}
.row small{display:block;margin-top:4px;color:#7589a0;font-size:11px;overflow-wrap:anywhere}
.actions{display:flex;justify-content:flex-end;gap:6px;flex-wrap:wrap;flex:none;max-width:57%}
.actions button{padding:7px 11px;font-size:11px;border-radius:8px}
.empty{padding:22px 16px;color:#90a4ba;font-size:12.5px;text-align:center;border:1px dashed var(--line-strong);border-radius:12px;background:#f7fafe}
pre{max-height:340px;overflow:auto;margin:16px 0 0;padding:14px;border:1px solid var(--line);border-radius:10px;background:#f6faff;white-space:pre-wrap;word-break:break-word;font-family:inherit;font-size:12px;line-height:1.6}
#exports{display:flex;flex-wrap:wrap;gap:8px}
#audit-list{max-height:360px;overflow:auto}
#event-qr{margin-top:16px}
#event-qr svg{max-width:100%;height:auto;border:8px solid #fff;background:#fff}
#event-qr p{margin:8px 0}
.tag-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.tag-grid label{display:flex;align-items:center;gap:6px;font-weight:400}
.tag-grid input{width:auto;min-height:auto}
fieldset{min-width:0;border:1px solid var(--line);border-radius:10px}
#house-form{margin:16px 0;padding:18px;border:1px solid #d7e8fb;border-radius:12px;background:#f4faff}
#points-form,#volunteer-form,#redeem-form{margin-top:20px;padding-top:20px;border-top:1px solid var(--line)}

/* 总览 */
.overview-hero{position:relative;display:flex;justify-content:space-between;min-height:250px;margin-bottom:20px;overflow:hidden;border-radius:18px;background:var(--grad);color:#fff}
.hero-copy{position:relative;z-index:2;padding:34px 40px}
.hero-label{display:inline-block;color:#e4f1ff;font-size:11px;font-weight:800;letter-spacing:1px}
.hero-copy h3{margin:10px 0;font-size:28px;line-height:1.25;letter-spacing:.4px;color:#fff}
.hero-copy p{margin:0;color:#e2effd;font-size:13px}
.hero-action{display:inline-flex;align-items:center;gap:18px;margin-top:22px;padding:11px 18px;border:0;border-radius:10px;background:#fff;color:var(--brand-deep);font-size:12.5px;font-weight:700;box-shadow:0 10px 22px #0a357540}
.hero-action span{font-size:16px;font-weight:400}
.hero-art{position:absolute;right:0;top:0;width:44%;height:100%;overflow:hidden}
.art-circle{position:absolute;border:1px solid #ffffff40;border-radius:50%}
.art-circle-one{width:300px;height:300px;right:23%;top:-65px}
.art-circle-two{width:390px;height:390px;right:-25%;top:-125px}
.art-tile{position:absolute;display:block;width:142px;height:152px;border-radius:20px;transform:rotate(8deg)}
.art-tile-back{right:19%;top:41px;background:#ffffff2e;box-shadow:0 20px 30px #0a357533}
.art-tile-front{right:24%;top:34px;background:#ffffffe8;transform:rotate(-7deg);box-shadow:0 22px 35px #0a357540}
.tile-sun{position:absolute;right:18px;top:17px;width:28px;height:28px;border-radius:50%;background:#ffbe3e}
.tile-roof{position:absolute;left:23px;top:48px;width:96px;height:12px;transform:rotate(-32deg);border-radius:6px;background:#347ff1}
.tile-roof:after{content:"";position:absolute;left:38px;top:27px;width:91px;height:12px;transform:rotate(65deg);border-radius:6px;background:#347ff1}
.tile-window{position:absolute;left:42px;top:80px;width:27px;height:27px;border:6px solid #7fb3f2;background:#eaf3ff}
.tile-door{position:absolute;right:36px;bottom:0;width:29px;height:55px;border-radius:8px 8px 0 0;background:#11bcef}
.art-caption{position:absolute;right:22px;bottom:18px;color:#eef6ff;font-size:10px;font-weight:700;letter-spacing:2px}
.summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:20px}
.summary-card{display:flex;flex-direction:column;align-items:flex-start;min-width:0;padding:20px 22px;border:1px solid var(--line);border-radius:14px;background:#fff;color:var(--ink);text-align:left;box-shadow:var(--shadow);transition:transform .14s,border-color .14s,box-shadow .14s}
.summary-card:hover{border-color:#b6d6f7;transform:translateY(-3px);box-shadow:0 20px 40px rgba(16,74,150,.12)}
.summary-top{display:flex;justify-content:space-between;align-items:center;width:100%;margin-bottom:13px}
.summary-icon{display:grid;place-items:center;width:36px;height:36px;border-radius:10px;font-size:19px;font-weight:700}
.icon-amber{background:#fff2e2;color:#e3861f}.icon-teal{background:#e3f6ff;color:#0e8fd6}.icon-blue{background:#e9f0ff;color:#2c6fe0}.icon-coral{background:#ffecef;color:#e0556c}
.summary-arrow{color:#aac2dc;font-size:17px}
.summary-card strong{font-size:30px;line-height:1.2;font-weight:750}
.summary-label{margin-top:5px;font-size:13px;font-weight:700}
.summary-card small{margin-top:3px;color:#90a2b7;font-size:11px}
.overview-bottom{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(270px,.8fr);gap:20px}
.overview-bottom .panel{min-height:258px}
.panel-heading{display:flex;justify-content:space-between;align-items:end;gap:12px;margin-bottom:10px}
.panel-heading h2{margin:3px 0 0}
.panel-eyebrow{color:var(--brand);font-size:10px;font-weight:800;letter-spacing:1.4px}
.panel-hint{color:#9bb0c6;font-size:11px}
.queue-item{display:flex;align-items:center;gap:14px;padding:14px 0;border-bottom:1px solid #eef3f9}
.queue-item:last-child{border:0}
.queue-dot{width:8px;height:8px;flex:none;border-radius:50%;background:var(--amber)}
.queue-copy{flex:1;min-width:0}
.queue-copy strong{display:block;font-size:13px}
.queue-copy small{color:#8599ad;font-size:11px}
.queue-item button{border:0;background:transparent;color:var(--brand-deep);font-size:12px;font-weight:700}
.guide-step{display:flex;gap:14px;align-items:flex-start;padding:12px 0;border-bottom:1px solid #eef3f9}
.guide-step:last-child{border:0}
.guide-step>span{display:grid;place-items:center;width:24px;height:24px;flex:none;border-radius:8px;background:#eaf3ff;color:var(--brand-deep);font-size:11px;font-weight:800}
.guide-step strong{display:block;font-size:12px}.guide-step small{color:#8599ad;font-size:11px}
.event-dashboard,.event-records{margin-top:20px;padding-top:18px;border-top:1px solid var(--line)}
.event-dashboard h3,.event-records h3{margin:0 0 14px;padding:0;border:0}
.stats-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.stats-metric{display:flex;flex-direction:column;gap:3px;padding:14px;border:1px solid #dde9f7;border-radius:10px;background:#f4f9ff}
.stats-metric span{color:#6c84a0;font-size:11px}
.stats-metric strong{color:var(--brand-deep);font-size:21px}
.stats-block{margin-top:18px;padding-top:9px;border-top:1px solid var(--line)}
.stats-block h4{margin:4px 0 12px;font-size:13px}
.stats-legend{margin:-5px 0 12px;color:#7589a0;font-size:11px}
.stats-row{margin:12px 0}.stats-row-label{display:flex;justify-content:space-between;align-items:baseline;gap:10px;font-size:12px}.stats-row-label strong{color:#4a648a;font-size:11px;text-align:right}
.bar-track{display:block;width:100%;height:12px;margin-top:6px;overflow:hidden;border:0;border-radius:7px;background:#e4eefa;appearance:none}
.bar-track::-webkit-progress-bar{border-radius:7px;background:#e4eefa}
.bar-track::-webkit-progress-value{border-radius:7px;background:#2c87ec}
.bar-track::-moz-progress-bar{border-radius:7px;background:#2c87ec}
.bar-track.attended{height:8px;margin-top:3px}
.bar-track.attended::-webkit-progress-value{background:var(--amber)}
.bar-track.attended::-moz-progress-bar{background:var(--amber)}

@media(max-width:1100px){.overview-bottom{grid-template-columns:1fr 300px}#merchant-form,#event-form,#issue-form{grid-template-columns:1fr}#merchant-form label:has(textarea),#event-form label:has(textarea),#issue-form label:has(textarea){grid-column:auto}.columns .row{display:block}.columns .actions{justify-content:flex-start;max-width:none;margin-top:9px}}
@media(max-width:900px){#workspace{display:block;min-height:0}.side-nav{position:static;flex-direction:row;flex-wrap:wrap;width:auto;min-height:0;align-items:center;padding:14px 18px;gap:8px}.side-brand{border:0;margin:0;padding:0 10px 0 0}.nav-links{flex-direction:row;flex-wrap:wrap;flex:1 1 100%;order:3;gap:6px}.nav-tab{width:auto}.nav-tab.active:before{display:none}.nav-count{margin-left:6px}.nav-actions{flex-direction:row;border:0;padding:0;margin:0}.work-main{max-width:none;padding:0 20px 60px}.columns{grid-template-columns:1fr}.summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.overview-bottom{grid-template-columns:1fr}}
@media(max-width:560px){.header-inner{padding:14px 18px}.host-badge{display:none}.section-heading h2{font-size:23px}.panel{padding:18px}.overview-hero{min-height:220px}.hero-copy{width:72%;padding:24px}.hero-copy h3{font-size:21px}.hero-copy p{max-width:200px;font-size:11px}.hero-art{width:48%;opacity:.75}.art-caption{display:none}.summary-grid{gap:10px}.summary-card{padding:15px}.summary-card strong{font-size:25px}.row{display:block}.actions{justify-content:flex-start;max-width:none;margin-top:9px}.heading-side{display:none}}
@media print{body{background:#fff}.app-header,.side-nav,.section-heading,#message{display:none!important}#workspace{display:block}.work-main{max-width:none;padding:0}.workspace-section:not(#events){display:none!important}#events{display:block!important}#events>.panel:first-child{display:none!important}#events>.panel:last-child>*:not(#event-qr){display:none!important}#event-qr{display:block!important}}
