:root{
  --bg:#f2f4f8; --card:#fff; --text:#1f2430; --muted:#8a90a0;
  --blue:#3b6ef5; --red:#e03131; --green:#16a34a; --orange:#f08c00;
  --line:#eceff5; --shadow:0 2px 12px rgba(30,40,80,.06);
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
body{margin:0;background:var(--bg);color:var(--text);
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei UI","Microsoft YaHei",sans-serif;
  font-size:15px;line-height:1.6;padding-bottom:64px}
a{color:var(--blue);text-decoration:none}
.wrap{max-width:520px;margin:0 auto;padding:14px}
.card{background:var(--card);border-radius:14px;box-shadow:var(--shadow);padding:16px;margin-bottom:12px}
.muted{color:var(--muted);font-size:13px}
.small{font-size:12px}
h1{font-size:19px;margin:0;font-weight:700}
h2{font-size:16px;margin:0 0 10px;font-weight:700}
.row{display:flex;align-items:center;justify-content:space-between;gap:10px}
.btn{display:inline-block;border:0;border-radius:10px;padding:11px 16px;font-size:14px;
  font-weight:600;cursor:pointer;text-align:center;background:var(--blue);color:#fff}
.btn:active{opacity:.85}
.btn.block{display:block;width:100%}
.btn.ghost{background:#eef2fb;color:var(--blue)}
.btn.gray{background:#f1f3f7;color:#555}
.btn.sm{padding:7px 12px;font-size:12px;border-radius:8px}
.btn.danger{background:#ffecec;color:var(--red)}
input,select,textarea{width:100%;border:1px solid var(--line);border-radius:10px;
  padding:11px 12px;font-size:15px;background:#fff;color:var(--text);font-family:inherit}
input:focus,select:focus,textarea:focus{outline:none;border-color:var(--blue)}
label{display:block;font-size:13px;color:#666;margin:12px 0 6px}
.flash{background:#fff7e6;border:1px solid #ffe0a3;color:#a15c00;
  padding:10px 12px;border-radius:10px;margin-bottom:12px;font-size:13px}
.statusbar{position:fixed;left:0;right:0;bottom:0;background:#fff;
  border-top:1px solid var(--line);z-index:20}
.statusbar .wrap{padding:8px 14px;display:flex;gap:8px}
.statusbar .btn{flex:1;padding:10px 6px;font-size:13px}
.badge{display:inline-block;padding:2px 8px;border-radius:20px;font-size:11px;font-weight:600}
.badge.on{background:#e6f7ee;color:var(--green)}
.badge.off{background:#f1f3f7;color:#888}
.badge.admin{background:#eaf0ff;color:var(--blue)}
.divider{height:1px;background:var(--line);margin:12px 0}
table{width:100%;border-collapse:collapse;font-size:13px}
th,td{text-align:left;padding:8px 6px;border-bottom:1px solid var(--line);vertical-align:top}
th{color:var(--muted);font-weight:500}

/* 首页 */
.hero{background:linear-gradient(135deg,#3b6ef5,#5b8def);color:#fff;border-radius:16px;
  padding:20px 18px;margin-bottom:12px;box-shadow:0 6px 18px rgba(59,110,245,.28)}
.hero .tag{display:inline-block;background:rgba(255,255,255,.18);border-radius:20px;
  padding:2px 10px;font-size:11px;margin-bottom:8px}
.hero h1{font-size:18px;line-height:1.4}
.state{text-align:center;padding:22px 8px 16px}
.state .big{font-size:30px;font-weight:800;letter-spacing:1px}
.state .ok{color:var(--green)}
.state .full{color:var(--red)}
.state .wait{color:var(--orange)}
.num{font-size:22px;font-weight:700}
.progress{height:10px;background:#eef1f6;border-radius:10px;overflow:hidden;margin:10px 0 6px}
.progress i{display:block;height:100%;background:linear-gradient(90deg,#5b8def,#3b6ef5);width:0;transition:width .4s}
.kv{display:flex;justify-content:space-between;padding:9px 0;border-bottom:1px solid var(--line);font-size:14px}
.kv:last-child{border-bottom:0}
.kv .k{color:var(--muted)}
.kv .v{text-align:right;max-width:65%}
.dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:#c8cdd8;margin-right:5px}
.dot.live{background:var(--green);box-shadow:0 0 0 3px rgba(22,163,74,.15)}

/* 我的通知 */
.guide{background:#f7f9fe;border-radius:10px;padding:12px;font-size:12px;color:#555;line-height:1.8}
.ch{background:#fff;border-radius:12px;box-shadow:var(--shadow);padding:14px;margin-bottom:10px}
.ch .t{display:flex;align-items:center;justify-content:space-between}
.ch .name{font-weight:600;font-size:14px}
.ch .url{font-size:11px;color:var(--muted);word-break:break-all;margin:6px 0 10px}
.ch .acts{display:flex;gap:6px;flex-wrap:wrap}
form .btn{margin-top:16px}

/* 后台 */
.sec{margin-bottom:16px}
.sec h2{display:flex;align-items:center;justify-content:space-between}
.num-card{display:flex;gap:10px;flex-wrap:wrap}
.num-card div{flex:1;min-width:90px;background:#f7f9fe;border-radius:10px;padding:12px;text-align:center}
.num-card b{display:block;font-size:20px;color:var(--blue)}
.log{max-height:240px;overflow:auto;background:#f7f9fe;border-radius:10px;padding:10px}
.log div{padding:3px 0;border-bottom:1px solid #eceff5}
.err{color:var(--red)}
.inline{display:flex;gap:8px;align-items:center}
.inline input{flex:1}
pre{white-space:pre-wrap;word-break:break-all;font-size:11px;margin:0;color:#555}

/* 轮询暂停提示（紧凑单行） */
.poll-banner{
  display:flex;align-items:center;gap:8px;
  background:#fff4e0;border:1px solid #ffcf8a;
  border-radius:8px;padding:8px 12px;margin:0 0 12px;
}
.poll-banner .pb-icon{
  font-size:16px;line-height:1;flex:0 0 auto;
  color:#c2410c;animation:pbBlink 1.6s ease-in-out infinite;
}
.poll-banner .pb-text{flex:1;min-width:0;color:#7c4a12;font-size:13px;line-height:1.4}
.poll-banner .pb-text b{color:#c2410c;font-weight:600}
@keyframes pbBlink{
  0%,100%{opacity:1}50%{opacity:.35}
}

/* iOS 滑动开关 */
.ios-switch{display:inline-block;position:relative}
.ios-switch input{display:none}
.ios-track{
  display:block;width:50px;height:30px;border-radius:15px;
  background:#d1d1d6;position:relative;transition:background .25s;
  cursor:pointer;
}
.ios-knob{
  position:absolute;top:2px;left:2px;width:26px;height:26px;
  border-radius:50%;background:#fff;
  box-shadow:0 2px 4px rgba(0,0,0,.25);
  transition:transform .25s cubic-bezier(.34,1.36,.64,1);
}
.ios-switch input:checked + .ios-track{background:#34c759}
.ios-switch input:checked + .ios-track .ios-knob{transform:translateX(20px)}
