/* ============================================================
   app.css · 邮箱工作台界面
   ============================================================ */
*{box-sizing:border-box}
[hidden]{display:none!important}
html,body{height:100%}
body{
  margin:0;background:#fff;color:#202124;
  font:400 14px/1.55 "Google Sans","Segoe UI","PingFang SC","Microsoft YaHei",system-ui,-apple-system,sans-serif;
  -webkit-font-smoothing:antialiased;overflow:hidden;
}
button{font-family:inherit}
input,select,textarea{font-family:inherit;color:inherit}
svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}
::selection{background:#d3e3fd}
::-webkit-scrollbar{width:10px;height:10px}
::-webkit-scrollbar-thumb{background:#dadce0;border-radius:8px;border:2px solid transparent;background-clip:content-box}
::-webkit-scrollbar-thumb:hover{background:#bdc1c6;background-clip:content-box}
:-webkit-scrollbar-track{background:transparent}

:root{
  --blue:#1a73e8;--blue-h:#1557b0;--red:#d93025;--green:#1e8e3e;--orange:#e37400;
  --txt:#202124;--txt2:#3c4043;--muted:#5f6368;--bd:#e8eaed;--hov:#f1f3f4;
  --sel:#d3e3fd;--sb:#f6f8fc;--wh:#fff;
  --sh1:0 1px 3px rgba(60,64,67,.15),0 1px 2px rgba(60,64,67,.06);
  --sh2:0 2px 8px rgba(60,64,67,.2),0 1px 3px rgba(60,64,67,.1);
  --sh3:0 8px 32px rgba(60,64,67,.24),0 2px 8px rgba(60,64,67,.12);
  --radius:10px;
}

/* ============ 登录 ============ */
.auth-view{
  position:fixed;inset:0;display:flex;align-items:center;justify-content:center;
  padding:24px;overflow:auto;z-index:10;
  background:linear-gradient(160deg,#eef4fd 0%,#f7f9fc 42%,#eef2f8 100%);
}
.auth-orbs{position:absolute;inset:0;overflow:hidden;pointer-events:none}
.auth-orbs span{position:absolute;border-radius:50%;filter:blur(60px);opacity:.55}
.auth-orbs span:nth-child(1){width:420px;height:420px;background:#c7dcff;top:-120px;left:-80px}
.auth-orbs span:nth-child(2){width:360px;height:360px;background:#ffe6c7;bottom:-140px;right:-60px;opacity:.5}
.auth-orbs span:nth-child(3){width:260px;height:260px;background:#d9f2e4;top:40%;right:18%;opacity:.35}
.auth-card{
  position:relative;width:100%;max-width:432px;background:rgba(255,255,255,.92);
  backdrop-filter:saturate(160%) blur(14px);border:1px solid rgba(255,255,255,.9);
  border-radius:20px;padding:28px 30px 20px;box-shadow:0 18px 60px rgba(32,33,36,.13),0 2px 8px rgba(32,33,36,.06);
}
.auth-brand{display:flex;align-items:center;gap:10px}
.auth-logo{
  position:relative;width:38px;height:38px;border-radius:50%;flex:none;
  background:linear-gradient(135deg,#4285f4,#1a73e8);color:#fff;display:grid;place-items:center;
  box-shadow:0 4px 12px rgba(26,115,232,.32);
}
.auth-logo svg{width:20px;height:20px}
.auth-logo b{
  position:absolute;right:-7px;bottom:-3px;font-size:7px;font-weight:800;letter-spacing:.4px;
  color:#fff;background:linear-gradient(145deg,#fbbf24,#ea580c);border-radius:3px;padding:2px 3px;
  box-shadow:0 1px 3px rgba(234,88,12,.35);
}
.auth-brand-name{display:flex;align-items:baseline;gap:2px;font-size:17px;font-weight:800;letter-spacing:-.3px}
.auth-brand-name span{color:#43464b}
.auth-brand-name em{font-style:normal;background:linear-gradient(135deg,#f59e0b,#ea580c);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}
.auth-brand-name i{font-style:normal;font-size:13px;font-weight:700;color:#3b5bdb}
.auth-tagline{margin:9px 0 0;font-size:11.5px;color:var(--muted);letter-spacing:.2px}
.auth-hero{margin:18px 0 20px;padding:16px 16px 14px;border-radius:14px;background:linear-gradient(150deg,#f2f7ff,#f8fafd);border:1px solid #e6eefb}
.auth-hero h1{margin:0 0 6px;font-size:15px;font-weight:700;color:#1f2937;letter-spacing:-.2px}
.auth-hero p{margin:0 0 12px;font-size:12px;line-height:1.7;color:#5b6472}
.auth-feats{display:grid;gap:8px}
.af{display:flex;gap:9px;align-items:flex-start;background:#fff;border:1px solid #eaeff8;border-radius:10px;padding:8px 10px}
.af svg{width:15px;height:15px;color:var(--blue);margin-top:2px}
.af b{display:block;font-size:12px;font-weight:700;color:#25303f;line-height:1.5}
.af span{display:block;font-size:11px;color:#7a8494;line-height:1.5}
.auth-pill{display:flex;align-items:center;gap:6px;margin-top:12px;font-size:11px;font-weight:700;color:#1e6d3c}
.auth-pill .dot{width:6px;height:6px;border-radius:50%;background:#34a853;box-shadow:0 0 0 3px rgba(52,168,83,.16)}
.auth-pill span{margin-left:auto;font-weight:500;color:#8a93a0;letter-spacing:.2px}
.auth-pane{display:block}
.auth-pane[hidden]{display:none}
.field{display:block;margin-bottom:12px}
.field>span{display:block;font-size:11.5px;font-weight:600;color:#5b6472;margin-bottom:5px;letter-spacing:.2px}
.inp{display:flex;align-items:center;gap:8px;height:44px;border:1px solid #dfe3ea;border-radius:10px;padding:0 12px;background:#fbfcfe;transition:.15s}
.inp:focus-within{border-color:var(--blue);background:#fff;box-shadow:0 0 0 3px rgba(26,115,232,.1)}
.inp>svg{width:17px;height:17px;color:#9aa4b2}
.inp input{flex:1;min-width:0;border:0;background:none;outline:none;font-size:13.5px}
.inp input::placeholder{color:#a8b0bd}
.inp .eye{border:0;background:none;padding:4px;cursor:pointer;color:#9aa4b2;display:grid;place-items:center}
.inp .eye svg{width:17px;height:17px}
.inp.has-btn{padding-right:6px}
.code-btn{border:0;background:#e8f0fe;color:#1a56c4;font-size:12px;font-weight:700;border-radius:8px;padding:8px 10px;cursor:pointer;white-space:nowrap}
.code-btn:disabled{opacity:.55;cursor:default}
.form-err{margin:2px 0 8px;font-size:12px;color:var(--red);min-height:0}
.form-err:not(:empty){min-height:16px}
.btn-primary{
  width:100%;height:44px;border:0;border-radius:10px;color:#fff;font-size:14px;font-weight:700;cursor:pointer;
  background:linear-gradient(135deg,#2b7de9,#1a73e8);box-shadow:0 4px 14px rgba(26,115,232,.28);transition:.15s;
}
.btn-primary:hover{filter:brightness(1.05);box-shadow:0 6px 18px rgba(26,115,232,.34)}
.btn-primary:active{transform:translateY(1px)}
.btn-primary.sm{width:auto;height:34px;padding:0 14px;font-size:13px;border-radius:8px;display:inline-flex;align-items:center;gap:6px}
.btn-primary svg{width:15px;height:15px}
.auth-links{display:flex;align-items:center;justify-content:center;gap:8px;margin-top:14px;font-size:12.5px;color:var(--muted)}
.auth-links a{color:var(--blue);text-decoration:none;font-weight:600}
.auth-links a:hover{text-decoration:underline}
.auth-links i{width:1px;height:11px;background:#dfe3ea}
.pane-title{margin:0 0 3px;font-size:15px;font-weight:800}
.pane-sub{margin:0 0 14px;font-size:12px;color:var(--muted)}
.auth-foot{margin-top:16px;padding-top:12px;border-top:1px solid #edf0f5;text-align:center;font-size:11px;color:#9aa4b2}

/* ============ 顶栏 ============ */
#app{display:flex;flex-direction:column;height:100vh;height:100dvh;background:var(--wh)}
#topbar{
  height:56px;flex-shrink:0;display:flex;align-items:center;gap:12px;padding:0 14px;
  background:var(--wh);border-bottom:1px solid var(--bd);position:relative;z-index:60;
}
.logo{display:flex;align-items:center;gap:9px;white-space:nowrap}
.logo-icon{
  position:relative;width:34px;height:34px;border-radius:50%;color:#fff;display:grid;place-items:center;
  background:linear-gradient(135deg,#4285f4,#1a73e8);box-shadow:0 3px 10px rgba(26,115,232,.3);flex:none;
}
.logo-icon svg{width:18px;height:18px}
.pro-badge{
  position:absolute;right:-6px;top:-4px;font-size:6px;font-weight:800;letter-spacing:.4px;color:#fff;
  padding:2px 3px;border-radius:3px;background:linear-gradient(145deg,#fbbf24,#ea580c);
  box-shadow:0 1px 3px rgba(234,88,12,.35);
}
.logo-text-col{display:flex;flex-direction:column;gap:2px;min-width:0}
.logo-text{display:flex;align-items:baseline;gap:2px;font-size:15px;font-weight:800;letter-spacing:-.25px;line-height:1.15}
.logo-name{color:#43464b}
.logo-pro{font-style:normal;background:linear-gradient(135deg,#f59e0b,#ea580c 55%,#c2410c);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}
.logo-suffix{font-size:12px;font-weight:700;background:linear-gradient(120deg,#64748b,#3b5bdb);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}
.logo-tagline{font-size:9.5px;color:var(--muted);letter-spacing:.25px;opacity:.9}
.search-box{
  flex:1;max-width:640px;height:40px;display:flex;align-items:center;gap:8px;
  background:#eaf1fb;border:1px solid transparent;border-radius:22px;padding:0 14px;position:relative;transition:.15s;
}
.search-box:focus-within{background:var(--wh);border-color:var(--bd);box-shadow:var(--sh2)}
.search-box>svg{color:var(--muted);width:19px;height:19px}
.search-box input{flex:1;min-width:0;border:0;background:none;outline:none;font-size:13.5px;color:var(--txt)}
.search-box input::placeholder{color:#80868b}
.search-clear{border:0;background:none;padding:2px;cursor:pointer;color:var(--muted);display:grid;place-items:center}
.search-clear svg{width:17px;height:17px}
.search-dropdown{
  position:absolute;top:46px;left:0;right:0;background:var(--wh);border-radius:12px;box-shadow:var(--sh3);
  border:1px solid var(--bd);padding:6px;display:none;max-height:380px;overflow:auto;z-index:70;
}
.search-dropdown.open{display:block}
.sd-group{font-size:10.5px;font-weight:700;color:var(--muted);padding:8px 10px 4px;letter-spacing:.4px}
.sd-item{display:flex;align-items:center;gap:9px;padding:8px 10px;border-radius:8px;cursor:pointer;font-size:13px}
.sd-item:hover{background:var(--hov)}
.sd-item svg{width:16px;height:16px;color:var(--muted)}
.sd-item b{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sd-item span{color:var(--muted);font-size:11.5px;margin-left:auto;flex:none}
.topbar-right{margin-left:auto;display:flex;align-items:center;gap:2px}
.icon-btn{
  width:36px;height:36px;border:0;border-radius:50%;background:none;color:var(--muted);
  display:grid;place-items:center;cursor:pointer;position:relative;transition:background .12s;flex:none;
}
.icon-btn:hover{background:var(--hov)}
.icon-btn.sm{width:32px;height:32px}
.icon-btn.sm svg{width:18px;height:18px}
.notif-badge{
  position:absolute;top:3px;right:2px;min-width:16px;height:16px;padding:0 4px;border-radius:9px;
  background:var(--red);color:#fff;font-size:10px;font-weight:700;display:grid;place-items:center;
  border:2px solid var(--wh);box-sizing:content-box;
}
.top-avatar-wrap{position:relative;margin-left:4px;cursor:pointer;padding:2px}
.avatar{
  width:32px;height:32px;border-radius:50%;color:#fff;font-size:13px;font-weight:600;
  background:linear-gradient(135deg,#1a73e8,#4285f4);display:grid;place-items:center;
}
.avatar.lg{width:52px;height:52px;font-size:20px;border-radius:16px}
.vip-dot{
  position:absolute;right:-2px;bottom:-1px;width:15px;height:15px;border-radius:50%;display:grid;place-items:center;
  background:linear-gradient(135deg,#f59e0b,#d97706);color:#fff;border:2px solid var(--wh);
}
.vip-dot svg{width:8px;height:8px}

/* 通知面板 / 头像菜单 */
.notif-panel,.avatar-menu{
  position:absolute;top:52px;right:12px;width:340px;background:var(--wh);border:1px solid var(--bd);
  border-radius:14px;box-shadow:var(--sh3);z-index:80;overflow:hidden;
}
.notif-panel[hidden],.avatar-menu[hidden]{display:none}
.notif-head{display:flex;align-items:center;gap:8px;padding:12px 14px;border-bottom:1px solid var(--bd);font-size:13px}
.notif-head svg{width:17px;height:17px;color:var(--blue)}
.notif-head span{color:var(--muted);font-size:11.5px;font-weight:500}
.notif-head a{margin-left:auto;font-size:11.5px;color:var(--blue);cursor:pointer}
.notif-list{max-height:360px;overflow:auto}
.notif-item{display:flex;gap:10px;padding:11px 14px;border-bottom:1px solid #f4f5f7;cursor:default}
.notif-item:hover{background:var(--hov)}
.notif-item.unread{background:#f7fbff}
.notif-item i{width:7px;height:7px;border-radius:50%;background:var(--blue);margin-top:6px;flex:none}
.notif-item div{min-width:0}
.notif-item b{display:block;font-size:12.5px;font-weight:600;margin-bottom:2px}
.notif-item span{display:block;font-size:11.5px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.notif-item em{font-style:normal;font-size:10.5px;color:#9aa0a6;margin-top:3px;display:block}
.notif-empty{padding:26px 14px;text-align:center;color:var(--muted);font-size:12.5px}
.notif-foot{padding:8px;text-align:center;border-top:1px solid var(--bd)}
.notif-foot a{font-size:11.5px;color:var(--blue);cursor:pointer}
.avatar-menu{padding:6px}
.am-head{display:flex;gap:10px;align-items:center;padding:10px 10px 12px}
.am-avatar{width:38px;height:38px;border-radius:50%;background:linear-gradient(135deg,#1a73e8,#4285f4);color:#fff;display:grid;place-items:center;font-weight:600}
.am-head b{display:block;font-size:13px}
.am-head span{display:block;font-size:11.5px;color:var(--muted)}
.am-plan{display:flex;align-items:center;gap:6px;margin:0 6px 6px;padding:8px 10px;border-radius:8px;background:#fff8ec;color:#a35b00;font-size:11.5px;font-weight:600}
.am-plan svg{width:14px;height:14px}
.avatar-menu button{
  width:100%;display:flex;align-items:center;gap:10px;border:0;background:none;padding:9px 10px;
  border-radius:8px;font-size:13px;color:var(--txt2);cursor:pointer;text-align:left;
}
.avatar-menu button:hover{background:var(--hov)}
.avatar-menu button svg{width:17px;height:17px;color:var(--muted)}
.avatar-menu button.danger{color:var(--red)}
.avatar-menu button.danger svg{color:var(--red)}
.am-sep{height:1px;background:var(--bd);margin:6px 4px}

/* ============ 工具栏 ============ */
#main-toolbar{
  height:48px;flex-shrink:0;display:flex;align-items:center;gap:4px;padding:0 12px;
  border-bottom:1px solid var(--bd);background:var(--wh);
}
.tb-btn{
  height:32px;display:inline-flex;align-items:center;gap:6px;padding:0 10px;border:1px solid transparent;
  border-radius:8px;background:none;color:var(--txt2);font-size:13px;font-weight:500;cursor:pointer;white-space:nowrap;
}
.tb-btn svg{width:17px;height:17px;color:var(--muted)}
.tb-btn:hover{background:var(--hov)}
.tb-btn.primary{background:#e8f0fe;color:#1a56c4;font-weight:600}
.tb-btn.primary svg{color:#1a56c4}
.tb-btn.primary:hover{background:#d9e7fd}
.tb-btn.danger{color:var(--red)}
.tb-btn.danger svg{color:var(--red)}
.tb-btn.danger:hover{background:#fce8e6}
.tb-btn .caret{width:15px;height:15px;margin-left:-3px}
.tb-sep{width:1px;height:20px;background:var(--bd);margin:0 6px}
.dd-wrap{position:relative}
.sort-dropdown{
  position:absolute;top:36px;left:0;min-width:180px;background:var(--wh);border:1px solid var(--bd);
  border-radius:10px;box-shadow:var(--sh3);padding:5px;display:none;z-index:70;
}
.sort-dropdown.open{display:block}
.sort-dropdown button{display:block;width:100%;text-align:left;border:0;background:none;padding:8px 10px;border-radius:7px;font-size:12.5px;cursor:pointer;color:var(--txt2)}
.sort-dropdown button:hover{background:var(--hov)}
.tb-right{margin-left:auto;display:flex;align-items:center;gap:8px}
.quota-chip,.health-chip{
  height:28px;display:inline-flex;align-items:center;gap:5px;padding:0 10px;border-radius:14px;
  background:var(--sb);border:1px solid var(--bd);font-size:11.5px;color:var(--muted);white-space:nowrap;
}
.quota-chip svg{width:13px;height:13px;color:#e37400}
.quota-chip b{color:#a35b00}
.health-chip .dot{width:6px;height:6px;border-radius:50%;background:#34a853;box-shadow:0 0 0 3px rgba(52,168,83,.14)}

/* ============ 主体三栏 ============ */
#workspace{flex:1;display:flex;min-height:0;background:var(--wh)}
#sidebar{
  width:246px;flex-shrink:0;background:var(--sb);display:flex;flex-direction:column;
  border-right:1px solid var(--bd);min-height:0;
}
.receive-btn{
  position:relative;margin:12px 12px 10px;height:46px;border:0;border-radius:24px;cursor:pointer;
  background:linear-gradient(135deg,#2b7de9,#1a73e8);color:#fff;font-size:13.5px;font-weight:700;
  box-shadow:0 4px 14px rgba(26,115,232,.28);overflow:hidden;display:grid;place-items:center;
  transition:box-shadow .2s,transform .1s;flex:none;
}
.receive-btn:hover{box-shadow:0 6px 20px rgba(26,115,232,.36)}
.receive-btn:active{transform:translateY(1px)}
.rb-fill{position:absolute;left:0;top:0;bottom:0;width:0;background:rgba(255,255,255,.22);transition:width .3s ease}
.rb-layer{
  grid-area:1/1;display:flex;align-items:center;gap:7px;opacity:0;transform:translateY(8px);
  transition:opacity .2s,transform .2s;pointer-events:none;position:relative;z-index:2;
}
.rb-layer.on{opacity:1;transform:none}
.rb-layer svg{width:17px;height:17px}
.rb-layer b{background:rgba(255,255,255,.24);border-radius:9px;padding:1px 6px;font-size:11px}
.spin{animation:spin 1s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.sb-folders{padding:0 8px 6px;display:grid;gap:1px}
.sf-item{
  display:flex;align-items:center;gap:10px;height:36px;padding:0 12px;border:0;border-radius:18px;
  background:none;color:var(--txt2);font-size:13px;cursor:pointer;text-align:left;width:100%;
}
.sf-item:hover{background:var(--hov)}
.sf-item.active{background:var(--sel);color:#0b3d91;font-weight:700}
.sf-item svg{width:17px;height:17px;color:var(--muted);flex:none}
.sf-item.active svg{color:#0b3d91}
.sf-item span{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sf-item b{font-size:11px;font-weight:600;color:var(--muted)}
.sf-item.active b{color:#0b3d91}
.sb-mgmt{display:flex;align-items:center;gap:4px;padding:10px 12px 6px 16px;margin-top:4px}
.sb-title{display:flex;align-items:center;gap:6px;font-size:11px;font-weight:800;color:var(--muted);letter-spacing:.5px;text-transform:uppercase;flex:1}
.sb-title svg{width:13px;height:13px}
.smgmt-btn{width:26px;height:26px;border:0;border-radius:50%;background:none;color:var(--muted);display:grid;place-items:center;cursor:pointer}
.smgmt-btn:hover{background:var(--hov)}
.smgmt-btn svg{width:15px;height:15px}
.sb-tree{flex:1;overflow-y:auto;padding:0 8px 8px;min-height:0}
.grp-row{
  display:flex;align-items:center;gap:6px;height:32px;padding:0 8px;border-radius:8px;cursor:pointer;
  font-size:12.5px;font-weight:700;color:#4a5260;user-select:none;
}
.grp-row:hover{background:var(--hov)}
.grp-row .chev{width:14px;height:14px;transition:transform .18s;color:#8a93a0}
.grp-row.collapsed .chev{transform:rotate(-90deg)}
.grp-row svg.gi{width:14px;height:14px;color:#8a93a0}
.grp-row .gname{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.grp-row .gcount{font-size:10.5px;font-weight:600;color:#9aa0a6;background:rgba(0,0,0,.045);border-radius:8px;padding:1px 6px}
.grp-acc{padding-left:6px}
.acc-row{
  display:flex;align-items:center;gap:8px;height:34px;padding:0 8px;border-radius:8px;cursor:pointer;
  font-size:12.5px;color:var(--txt2);position:relative;
}
.acc-row:hover{background:var(--hov)}
.acc-row.active{background:var(--sel)}
.acc-row .dot{width:7px;height:7px;border-radius:50%;background:#34a853;flex:none}
.acc-row.err .dot{background:var(--red)}
.acc-row.pending .dot{background:#f9ab00}
.acc-row .ae{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.acc-row .an{font-size:10.5px;font-weight:700;color:var(--blue);background:#e8f0fe;border-radius:7px;padding:0 5px;flex:none}
.acc-row .au{font-size:10.5px;font-weight:700;color:#fff;background:#1a73e8;border-radius:8px;padding:1px 5px;flex:none}
.empty-tree{padding:18px 12px;text-align:center;font-size:12px;color:#9aa0a6;line-height:1.7}
.sb-foot{padding:6px 8px 10px;border-top:1px solid var(--bd)}
.tag-pro{font-style:normal;font-size:9px;font-weight:800;color:#a35b00;background:#fff1d6;border-radius:4px;padding:1px 4px}

/* 列表栏 */
#list-panel{width:372px;flex-shrink:0;display:flex;flex-direction:column;border-right:1px solid var(--bd);min-height:0}
.lp-head{display:flex;align-items:center;gap:8px;padding:10px 8px 8px 16px;border-bottom:1px solid var(--bd)}
.lp-title{min-width:0;flex:1}
.lp-title b{display:block;font-size:13.5px;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lp-title span{display:block;font-size:11px;color:var(--muted);margin-top:1px}
.lp-actions{display:flex;gap:1px}
.lp-filter{display:flex;align-items:center;gap:6px;padding:8px 10px;border-bottom:1px solid var(--bd)}
.lp-search{flex:1;display:flex;align-items:center;gap:6px;height:32px;background:var(--sb);border-radius:8px;padding:0 9px;border:1px solid transparent}
.lp-search:focus-within{background:var(--wh);border-color:var(--blue)}
.lp-search svg{width:15px;height:15px;color:var(--muted)}
.lp-search input{flex:1;min-width:0;border:0;background:none;outline:none;font-size:12.5px}
.chip{
  height:28px;display:inline-flex;align-items:center;gap:4px;padding:0 9px;border-radius:14px;
  border:1px solid var(--bd);background:var(--wh);color:var(--muted);font-size:11.5px;cursor:pointer;white-space:nowrap;
}
.chip svg{width:13px;height:13px}
.chip:hover{background:var(--hov)}
.chip.on{background:#e8f0fe;border-color:#c6dafc;color:#1a56c4;font-weight:700}
.lp-list{flex:1;overflow-y:auto;min-height:0}
.mail-row{
  display:flex;gap:10px;padding:11px 12px 11px 14px;border-bottom:1px solid #f4f5f7;cursor:pointer;
  position:relative;transition:background .1s;
}
.mail-row:hover{background:var(--hov);box-shadow:inset 2px 0 0 #c6dafc}
.mail-row.active{background:var(--sel)}
.mail-row.unread{background:#f8fbff}
.mail-row.unread:hover{background:#eef5ff}
.mail-row.active{background:#d3e3fd}
.mr-av{
  width:34px;height:34px;border-radius:50%;flex:none;display:grid;place-items:center;
  font-size:12.5px;font-weight:700;color:#fff;letter-spacing:-.3px;margin-top:1px;
}
.mr-main{flex:1;min-width:0}
.mr-top{display:flex;align-items:baseline;gap:6px}
.mr-from{flex:1;font-size:12.8px;color:var(--txt2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mail-row.unread .mr-from{font-weight:800;color:var(--txt)}
.mr-time{font-size:10.5px;color:#9aa0a6;flex:none}
.mail-row.unread .mr-time{color:var(--blue);font-weight:700}
.mr-subject{font-size:12.8px;color:var(--txt2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:1px}
.mail-row.unread .mr-subject{font-weight:700;color:var(--txt)}
.mr-snippet{font-size:11.5px;color:#8a9099;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:2px}
.mr-tags{display:flex;align-items:center;gap:4px;margin-top:4px;flex-wrap:wrap}
.code-tag{
  display:inline-flex;align-items:center;gap:3px;font:700 10.5px/1 "SF Mono",Menlo,monospace;
  color:#0b6b3a;background:#e6f4ea;border:1px solid #ccead5;border-radius:5px;padding:3px 5px;letter-spacing:.5px;
}
.code-tag svg{width:10px;height:10px}
.mini-tag{font-size:10px;color:#5f6368;background:rgba(0,0,0,.045);border-radius:4px;padding:2px 5px}
.mr-side{display:flex;flex-direction:column;align-items:flex-end;gap:4px;flex:none}
.mr-star{border:0;background:none;padding:2px;color:#dadce0;cursor:pointer;display:grid;place-items:center}
.mr-star svg{width:15px;height:15px}
.mr-star.on{color:#f9ab00}
.mr-star.on svg{fill:#f9ab00}
.mr-attach{color:#9aa0a6;display:grid;place-items:center}
.mr-attach svg{width:13px;height:13px}
.lp-empty{padding:48px 20px;text-align:center;color:#9aa0a6;font-size:12.5px;line-height:1.9}
.lp-empty svg{width:42px;height:42px;color:#dadce0;margin-bottom:8px;stroke-width:1.4}
.lp-pager{display:flex;align-items:center;justify-content:center;gap:10px;padding:8px;border-top:1px solid var(--bd);font-size:11.5px;color:var(--muted)}
.lp-pager button{border:1px solid var(--bd);background:var(--wh);border-radius:7px;padding:4px 10px;font-size:11.5px;cursor:pointer;color:var(--txt2)}
.lp-pager button:disabled{opacity:.4;cursor:default}

/* 阅读区 */
#reader{flex:1;min-width:0;display:flex;flex-direction:column;background:var(--wh);overflow:hidden}
.reader-empty{
  flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;
  text-align:center;padding:40px;color:var(--muted);
}
.re-illu{width:120px;height:120px;color:#8ab4f8;margin-bottom:10px}
.re-illu svg{width:100%;height:100%}
.reader-empty h3{margin:6px 0 6px;font-size:15px;font-weight:700;color:var(--txt2)}
.reader-empty p{margin:0;font-size:12.5px;color:#8a9099;max-width:340px;line-height:1.8}
.re-hints{display:flex;gap:14px;margin-top:22px;flex-wrap:wrap;justify-content:center}
.re-hints span{display:inline-flex;align-items:center;gap:5px;font-size:11.5px;color:#8a9099;background:var(--sb);border:1px solid var(--bd);border-radius:14px;padding:4px 10px}
.re-hints svg{width:13px;height:13px;color:#9aa4b2}
.reader-body{flex:1;min-height:0;display:flex;flex-direction:column}
.rd-head{padding:12px 20px 0;flex-shrink:0}
.rd-top{display:flex;align-items:center;gap:4px;margin-bottom:10px}
.rd-top .icon-btn{width:32px;height:32px}
.rd-top .icon-btn svg{width:18px;height:18px}
.rd-top .spacer{flex:1}
.rd-subject{font-size:18px;font-weight:700;color:var(--txt);line-height:1.4;margin:0 0 12px;word-break:break-word}
.rd-subject .rd-code{font:700 15px/1 "SF Mono",Menlo,monospace;color:#0b6b3a;background:#e6f4ea;border-radius:7px;padding:4px 8px;margin-left:8px;vertical-align:middle;letter-spacing:1px}
.rd-sender{display:flex;align-items:flex-start;gap:10px;padding-bottom:12px;border-bottom:1px solid var(--bd)}
.rd-avatar{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;color:#fff;font-weight:700;font-size:13px;flex:none}
.rd-who{flex:1;min-width:0}
.rd-who b{font-size:13px;font-weight:700}
.rd-who b small{font-weight:400;color:var(--muted);font-size:11.5px;margin-left:6px}
.rd-who .rd-to{display:block;font-size:11.5px;color:var(--muted);margin-top:1px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rd-date{font-size:11.5px;color:var(--muted);flex:none;margin-left:auto;padding-top:2px}
.code-banner{
  display:flex;align-items:center;gap:12px;margin:12px 20px 0;padding:10px 14px;border-radius:12px;
  background:linear-gradient(120deg,#e9f7ee,#f3fbf6);border:1px solid #ccead5;
}
.code-banner .cb-ic{width:30px;height:30px;border-radius:9px;background:#1e8e3e;color:#fff;display:grid;place-items:center;flex:none}
.code-banner .cb-ic svg{width:16px;height:16px}
.code-banner .cb-txt{flex:1;min-width:0}
.code-banner .cb-txt b{display:block;font-size:11px;color:#137a3a;font-weight:700;Letter-spacing:.3px}
.code-banner .cb-code{font:800 20px/1.2 "SF Mono",Menlo,monospace;letter-spacing:3px;color:#0b5f33}
.code-banner button{border:1px solid #b7e0c5;background:#fff;color:#137a3a;font-size:11.5px;font-weight:700;border-radius:8px;padding:6px 10px;cursor:pointer;display:inline-flex;align-items:center;gap:4px}
.code-banner button:hover{background:#f0fbf4}
.code-banner button svg{width:13px;height:13px}
.rd-content{flex:1;overflow-y:auto;padding:18px 20px 30px;min-height:0}
.rd-content .mail-html{font-size:13.5px;line-height:1.75;color:#2b2f33;word-break:break-word}
.rd-content .mail-html img{max-width:100%;height:auto}
.rd-content .mail-html a{color:var(--blue)}
.rd-content .mail-html table{max-width:100%;border-collapse:collapse}
.rd-content .mail-html pre{white-space:pre-wrap;font-size:12.5px}
.img-blocked{display:inline-flex;align-items:center;gap:6px;font-size:11.5px;color:#8a9099;background:var(--sb);border:1px dashed var(--bd);border-radius:8px;padding:10px 14px;cursor:pointer}
.rd-attach{display:flex;flex-wrap:wrap;gap:8px;padding:2px 20px 6px}
.att-chip{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--bd);border-radius:8px;padding:6px 10px;font-size:11.5px;color:var(--txt2);background:var(--wh);text-decoration:none;max-width:240px}
.att-chip:hover{background:var(--hov)}
.att-chip svg{width:15px;height:15px;color:var(--muted)}
.att-chip span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.att-chip em{font-style:normal;color:#9aa0a6;font-size:10.5px;flex:none}
.rd-actions{display:flex;gap:8px;padding:10px 20px 14px;border-top:1px solid var(--bd);flex-shrink:0}
.rd-actions button{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--bd);background:var(--wh);border-radius:8px;padding:7px 12px;font-size:12.5px;color:var(--txt2);cursor:pointer}
.rd-actions button:hover{background:var(--hov)}
.rd-actions button svg{width:15px;height:15px}
.rd-actions button.danger{color:var(--red);border-color:#f6d5d2}
.rd-actions button.danger:hover{background:#fce8e6}

/* 状态栏 */
#statusbar{
  height:26px;flex-shrink:0;display:flex;align-items:center;gap:8px;padding:0 14px;
  border-top:1px solid var(--bd);background:var(--sb);font-size:10.5px;color:#8a9099;letter-spacing:.2px;
}
.sb-right{margin-left:auto;display:flex;align-items:center;gap:8px}
.sb-right .sep{width:1px;height:11px;background:#dfe3ea}

/* ============ 弹窗 ============ */
.overlay{
  position:fixed;inset:0;background:rgba(32,33,36,.45);backdrop-filter:blur(2px);
  display:flex;align-items:center;justify-content:center;padding:20px;z-index:200;
  animation:fadein .15s ease;
}
.overlay[hidden]{display:none}
@keyframes fadein{from{opacity:0}to{opacity:1}}
.modal{
  width:100%;max-width:520px;background:var(--wh);border-radius:16px;box-shadow:var(--sh3);
  display:flex;flex-direction:column;max-height:calc(100vh - 40px);overflow:hidden;
  animation:pop .18s cubic-bezier(.2,.9,.3,1);
}
@keyframes pop{from{transform:translateY(10px) scale(.98);opacity:0}to{transform:none;opacity:1}}
.modal.md{max-width:560px}
.modal.lg{max-width:760px}
.modal.compose{max-width:680px}
.modal-head{display:flex;align-items:center;gap:8px;padding:14px 18px;border-bottom:1px solid var(--bd);flex-shrink:0}
.modal-head h3{margin:0;font-size:14.5px;font-weight:700;display:flex;align-items:center;gap:7px}
.modal-head h3 svg{width:17px;height:17px;color:var(--blue)}
.modal-x{margin-left:auto;border:0;background:none;width:30px;height:30px;border-radius:50%;display:grid;place-items:center;cursor:pointer;color:var(--muted)}
.modal-x:hover{background:var(--hov)}
.modal-x svg{width:17px;height:17px}
.modal-body{padding:16px 18px;overflow-y:auto}
.modal-foot{display:flex;align-items:center;gap:8px;padding:12px 18px;border-top:1px solid var(--bd);flex-shrink:0}
.modal-foot .btn-primary,.modal-foot .btn-ghost:first-child{margin-left:auto}
.btn-ghost{height:34px;padding:0 14px;border:1px solid var(--bd);background:var(--wh);border-radius:8px;font-size:13px;color:var(--txt2);cursor:pointer}
.btn-ghost:hover{background:var(--hov)}
.btn-ghost.sm{height:30px;font-size:12px;padding:0 10px}
.hint{font-size:11.5px;color:var(--muted);line-height:1.7}
.hint code{background:var(--sb);border:1px solid var(--bd);border-radius:4px;padding:1px 4px;font-size:11px}
.textarea{width:100%;border:1px solid #dfe3ea;border-radius:10px;padding:10px 12px;font-size:12.5px;line-height:1.7;resize:vertical;outline:none;background:#fbfcfe;font-family:"SF Mono",Menlo,Consolas,monospace}
.textarea:focus{border-color:var(--blue);background:#fff;box-shadow:0 0 0 3px rgba(26,115,232,.1)}
.row-2{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:10px;align-items:end}
.mini-field{display:block}
.mini-field span{display:block;font-size:11px;color:var(--muted);margin-bottom:4px;font-weight:600}
.mini-field select,.mini-field input,.input{
  width:100%;height:36px;border:1px solid #dfe3ea;border-radius:8px;background:#fbfcfe;padding:0 10px;font-size:12.5px;outline:none;
}
.mini-field select:focus,.input:focus{border-color:var(--blue);background:#fff;box-shadow:0 0 0 3px rgba(26,115,232,.1)}
.badge-ok{font-size:11px;font-weight:700;color:#137a3a;background:#e6f4ea;border-radius:6px;padding:3px 8px}
.role-badge{display:inline-block;font-style:normal;font-size:9.5px;font-weight:800;letter-spacing:.3px;color:#7a3b00;background:linear-gradient(135deg,#ffe6c7,#ffd39b);border-radius:4px;padding:1px 5px;margin-left:6px;vertical-align:1px}
.role-tag{font-size:10px;font-weight:700;color:#7a3b00;background:#fff1d6;border-radius:5px;padding:1px 6px;margin-left:6px}
html[data-theme="dark"] .role-badge{color:#ffd08a;background:linear-gradient(135deg,#4a3413,#5d3f12)}
html[data-theme="dark"] .role-tag{color:#ffd08a;background:#4a3413}

/* 写信 */
.compose-fields{border-bottom:1px solid var(--bd)}
.cf-row{display:flex;align-items:center;gap:10px;padding:8px 18px;border-bottom:1px solid #f4f5f7}
.cf-row:last-child{border-bottom:0}
.cf-row>span{width:48px;font-size:12px;color:var(--muted);flex:none}
.cf-row input,.cf-row select{flex:1;border:0;background:none;outline:none;font-size:13px;height:26px}
.cp-toolbar{display:flex;align-items:center;gap:2px;padding:6px 14px;border-bottom:1px solid var(--bd);background:var(--sb)}
.cp-toolbar button{border:0;background:none;border-radius:6px;padding:5px 8px;font-size:12.5px;color:var(--txt2);cursor:pointer}
.cp-toolbar button:hover{background:var(--hov)}
.cp-toolbar .vsep{width:1px;height:16px;background:var(--bd);margin:0 4px}
.cp-count{margin-left:auto;font-size:11px;color:#9aa0a6}
.cp-editor{flex:1;min-height:220px;max-height:44vh;overflow-y:auto;padding:16px 18px;font-size:13.5px;line-height:1.8;outline:none}
.cp-editor:empty:before{content:attr(data-ph);color:#a8b0bd}
.cp-quota{margin-right:auto;font-size:11.5px;color:var(--muted)}

/* 设置 */
.settings-wrap{display:flex;flex:1;min-height:0}
.set-nav{width:150px;flex-shrink:0;border-right:1px solid var(--bd);padding:10px 8px;display:flex;flex-direction:column;gap:2px}
.set-nav button{border:0;background:none;text-align:left;padding:8px 12px;border-radius:8px;font-size:12.5px;color:var(--txt2);cursor:pointer}
.set-nav button:hover{background:var(--hov)}
.set-nav button.active{background:var(--sel);color:#0b3d91;font-weight:700}
.set-body{flex:1;padding:16px 20px;overflow-y:auto;min-height:280px}
.set-pane[hidden],.api-pane[hidden]{display:none}
.set-item{display:flex;align-items:center;gap:14px;padding:12px 0;border-bottom:1px solid #f4f5f7}
.set-item:last-child{border-bottom:0}
.set-item.col{display:block}
.set-item>div{flex:1;min-width:0}
.set-item b{display:block;font-size:13px;font-weight:600;margin-bottom:2px}
.set-item span{display:block;font-size:11.5px;color:var(--muted)}
.set-item select{height:32px;border:1px solid var(--bd);border-radius:8px;padding:0 8px;font-size:12.5px;background:var(--wh)}
.set-item.col .row-2{margin:8px 0 10px}
.switch{position:relative;display:inline-block;width:38px;height:22px;flex:none}
.switch input{opacity:0;width:0;height:0}
.switch i{position:absolute;inset:0;background:#dadce0;border-radius:22px;transition:.2s;cursor:pointer}
.switch i:before{content:"";position:absolute;width:16px;height:16px;left:3px;top:3px;background:#fff;border-radius:50%;transition:.2s;box-shadow:0 1px 3px rgba(0,0,0,.2)}
.switch input:checked+i{background:var(--blue)}
.switch input:checked+i:before{transform:translateX(16px)}
.admin-tools{display:flex;gap:8px;margin-bottom:10px;align-items:center}
.admin-table{width:100%;border-collapse:collapse;font-size:12px}
.admin-table th{text-align:left;font-size:11px;color:var(--muted);font-weight:700;padding:6px 8px;border-bottom:1px solid var(--bd)}
.admin-table td{padding:7px 8px;border-bottom:1px solid #f4f5f7;font-size:12px}
.admin-codes{font:11.5px/1.9 "SF Mono",Menlo,monospace;color:#137a3a;background:#f3fbf6;border:1px solid #ccead5;border-radius:8px;padding:8px 10px;margin-bottom:12px;display:none;word-break:break-all}
.admin-codes.show{display:block}

/* 个人中心 / 点数 */
.profile-head{display:flex;gap:14px;align-items:center;margin-bottom:16px}
.pf-info b{display:block;font-size:15px}
.pf-info span{display:block;font-size:12px;color:var(--muted)}
.pf-chip{display:flex;align-items:center;gap:8px;margin-top:6px}
.plan-pill{font-size:10.5px;font-weight:800;color:#a35b00;background:#fff1d6;border-radius:6px;padding:2px 7px}
#pf-created{font-size:10.5px;color:#9aa0a6}
.stat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.stat{background:var(--sb);border:1px solid var(--bd);border-radius:10px;padding:10px;text-align:center}
.stat b{display:block;font-size:18px;font-weight:800;color:var(--txt);letter-spacing:-.5px}
.stat span{display:block;font-size:10.5px;color:var(--muted);margin-top:2px}
.points-hero{display:flex;align-items:center;gap:12px;padding:14px 16px;border-radius:12px;background:linear-gradient(120deg,#fff8ec,#fffdf7);border:1px solid #f6e3bf;margin-bottom:14px}
.points-hero svg{width:26px;height:26px;color:#e37400}
.points-hero b{display:block;font-size:24px;font-weight:800;line-height:1.1;color:#8a4b00}
.points-hero span{display:block;font-size:11px;color:#a97b3c}
.points-hero em{margin-left:auto;font-style:normal;font-size:11px;font-weight:800;color:#a35b00;background:#fff;border:1px solid #f0d9ae;border-radius:8px;padding:4px 10px}
.plan-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:14px}
.plan-card{position:relative;border:1px solid var(--bd);border-radius:12px;padding:12px 10px;text-align:center;cursor:pointer;transition:.15s;background:var(--wh)}
.plan-card:hover{border-color:#bcd4f8;box-shadow:0 4px 14px rgba(26,115,232,.1)}
.plan-card.hot{border-color:#f6c76b;background:linear-gradient(180deg,#fffbf2,#fff)}
.plan-card i{position:absolute;top:-8px;left:50%;transform:translateX(-50%);font-style:normal;font-size:9.5px;font-weight:800;color:#fff;background:linear-gradient(135deg,#f59e0b,#ea580c);border-radius:6px;padding:2px 7px}
.plan-card b{display:block;font-size:12.5px;font-weight:700}
.plan-card em{display:block;font-style:normal;font-size:17px;font-weight:800;color:#1a73e8;margin:4px 0 8px}
.plan-card em i{font-style:normal;font-size:10px;font-weight:600;color:var(--muted)}
.plan-card ul{margin:0;padding:0;list-style:none;text-align:left;display:grid;gap:3px}
.plan-card li{font-size:10.5px;color:var(--muted);padding-left:12px;position:relative}
.plan-card li:before{content:"";position:absolute;left:0;top:6px;width:4px;height:4px;border-radius:50%;background:#bcd4f8}
.redeem{display:flex;gap:8px}
.redeem .input{flex:1}

/* API 面板 */
.api-pane{padding:2px}
.list-block{margin-top:12px;display:grid;gap:6px}
.list-row{display:flex;align-items:center;gap:10px;border:1px solid var(--bd);border-radius:9px;padding:8px 10px;font-size:12px}
.list-row .lr-main{flex:1;min-width:0}
.list-row b{display:block;font-size:12px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.list-row span{display:block;font-size:10.5px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.list-row .icon-btn{width:28px;height:28px}
.list-row .icon-btn svg{width:14px;height:14px}
.list-empty{font-size:12px;color:#9aa0a6;padding:14px 4px}
.code-block{background:#0f172a;color:#c9d7ee;border-radius:10px;padding:12px 14px;font:11.5px/1.75 "SF Mono",Menlo,monospace;overflow:auto;white-space:pre-wrap;margin:0 0 10px}
.pickup-out{margin-top:12px;border:1px solid #ccead5;background:#f3fbf6;border-radius:10px;padding:10px 12px}
.pickup-out code{display:block;font:11.5px/1.7 "SF Mono",Menlo,monospace;color:#0b5f33;word-break:break-all;margin:4px 0 8px}
.pickup-out .po-actions{display:flex;gap:6px;flex-wrap:wrap}

/* 批量刷新 */
.batch-head{display:flex;align-items:center;gap:10px;font-size:12.5px;margin-bottom:8px}
.batch-head b{margin-left:auto;font-size:12px;color:var(--blue)}
.bar{height:6px;border-radius:4px;background:var(--hov);overflow:hidden;margin-bottom:10px}
.bar i{display:block;height:100%;width:0;border-radius:4px;background:linear-gradient(90deg,#4285f4,#1a73e8);transition:width .3s}
.batch-log{height:190px;overflow-y:auto;border:1px solid var(--bd);border-radius:10px;background:#fbfcfe;padding:8px 10px;font:11.5px/1.9 "SF Mono",Menlo,monospace;color:var(--txt2)}
.batch-log div{display:flex;gap:8px}
.batch-log .ok{color:#137a3a}
.batch-log .bad{color:var(--red)}
.batch-log .warn{color:#a35b00}
.batch-log .em{color:var(--muted);flex:none;max-width:190px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* 规则 */
.rule-form{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin-bottom:12px}
.rule-form select{height:32px;border:1px solid var(--bd);border-radius:8px;padding:0 6px;font-size:12px;background:var(--wh)}
.rule-form .input{width:150px;height:32px}

/* Toast */
#toast-container{position:fixed;left:50%;bottom:34px;transform:translateX(-50%);z-index:9999;display:flex;flex-direction:column;gap:8px;align-items:center;pointer-events:none}
.toast{
  display:flex;align-items:center;gap:8px;background:#323639;color:#fff;border-radius:10px;padding:9px 16px;
  font-size:12.5px;box-shadow:0 6px 22px rgba(0,0,0,.28);animation:tin .2s ease;max-width:80vw;
}
.toast.ok{background:#1e6d3c}
.toast.err{background:#b3261e}
.toast svg{width:15px;height:15px}
@keyframes tin{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}

/* ============ 暗色 ============ */
html[data-theme="dark"]{
  --txt:#e8eaed;--txt2:#c4c7c5;--muted:#9aa0a6;--bd:#3c4043;--hov:#2d2f31;
  --sel:#1f3b5c;--sb:#1b1c1e;--wh:#202124;--blue:#8ab4f8;--blue-h:#aecbfa;
  --sh1:0 1px 3px rgba(0,0,0,.4);--sh2:0 2px 8px rgba(0,0,0,.5);--sh3:0 8px 32px rgba(0,0,0,.6);
}
html[data-theme="dark"] body{background:#202124}
html[data-theme="dark"] .search-box{background:#2b2d30}
html[data-theme="dark"] .search-box:focus-within{background:#303134}
html[data-theme="dark"] .logo-name{color:#e8eaed}
html[data-theme="dark"] .sf-item.active,html[data-theme="dark"] .acc-row.active{background:#1f3b5c;color:#c2e7ff}
html[data-theme="dark"] .sf-item.active svg{color:#c2e7ff}
html[data-theme="dark"] .mail-row.unread{background:#232629}
html[data-theme="dark"] .mail-row.active{background:#1f3b5c}
html[data-theme="dark"] .mr-from,html[data-theme="dark"] .mr-subject{color:#c4c7c5}
html[data-theme="dark"] .mail-row.unread .mr-from,html[data-theme="dark"] .mail-row.unread .mr-subject{color:#e8eaed}
html[data-theme="dark"] .code-tag{color:#81c995;background:#1e3226;border-color:#2c5138}
html[data-theme="dark"] .code-banner{background:linear-gradient(120deg,#1b2e22,#1e3328);border-color:#2c5138}
html[data-theme="dark"] .code-banner .cb-txt b{color:#8fd9a4}
html[data-theme="dark"] .code-banner .cb-code{color:#9ee0b4}
html[data-theme="dark"] .code-banner button{background:#243028;border-color:#2c5138;color:#8fd9a4}
html[data-theme="dark"] .rd-content .mail-html{color:#d7dadc;background:#26282b;border-radius:12px;padding:16px 18px}
html[data-theme="dark"] .stat,html[data-theme="dark"] .re-hints span,html[data-theme="dark"] .quota-chip,html[data-theme="dark"] .health-chip{background:#26282b}
html[data-theme="dark"] .points-hero{background:linear-gradient(120deg,#2a2318,#26241f);border-color:#4a3a1d}
html[data-theme="dark"] .points-hero b{color:#fdd663}
html[data-theme="dark"] .plan-card{background:#26282b}
html[data-theme="dark"] .plan-card.hot{background:linear-gradient(180deg,#2c2719,#26282b)}
html[data-theme="dark"] .plan-pill,html[data-theme="dark"] .tag-pro{background:#3d2f14;color:#fdd663}
html[data-theme="dark"] .am-plan{background:#3d2f14;color:#fdd663}
html[data-theme="dark"] .auth-view{background:linear-gradient(160deg,#15171a,#1b1d21 45%,#141619)}
html[data-theme="dark"] .auth-card{background:rgba(32,33,36,.94);border-color:rgba(255,255,255,.08)}
html[data-theme="dark"] .auth-hero{background:linear-gradient(150deg,#23262b,#1f2126);border-color:#33363a}
html[data-theme="dark"] .auth-hero h1{color:#e8eaed}
html[data-theme="dark"] .auth-hero p{color:#a5acb6}
html[data-theme="dark"] .af{background:#26282b;border-color:#33363a}
html[data-theme="dark"] .af b{color:#e8eaed}
html[data-theme="dark"] .inp,.html[data-theme="dark"] .textarea{background:#26282b;border-color:#3c4043}
html[data-theme="dark"] .auth-brand-name span{color:#e8eaed}
html[data-theme="dark"] .inp input{color:#e8eaed}
html[data-theme="dark"] .btn-ghost{background:#26282b;border-color:#3c4043;color:#c4c7c5}
html[data-theme="dark"] .tb-btn.primary{background:#1f3b5c;color:#c2e7ff}
html[data-theme="dark"] .tb-btn.primary svg{color:#c2e7ff}
html[data-theme="dark"] .notif-item.unread{background:#232a33}
html[data-theme="dark"] .batch-log{background:#1b1c1e}
html[data-theme="dark"] .modal,html[data-theme="dark"] .notif-panel,html[data-theme="dark"] .avatar-menu,html[data-theme="dark"] .search-dropdown,html[data-theme="dark"] .sort-dropdown{background:#292a2d;border-color:#3c4043}
html[data-theme="dark"] .lp-search{background:#26282b}
html[data-theme="dark"] .eyebrow{color:#9aa0a6}

/* 紧凑模式 */
body.compact .mail-row{padding-top:7px;padding-bottom:7px}
body.compact .mr-snippet{display:none}
body.compact .mr-tags{margin-top:2px}

/* ============ 响应式 ============ */
.only-mobile{display:none}
@media (max-width:1180px){
  #list-panel{width:330px}
  .logo-tagline{display:none}
}
@media (max-width:980px){
  #sidebar{position:absolute;left:0;top:104px;bottom:0;z-index:70;box-shadow:var(--sh3);transform:translateX(-102%);transition:transform .22s}
  #sidebar.open{transform:none}
  .only-mobile{display:grid}
  .logo-text-col{display:none}
  #list-panel{width:300px}
  .tb-btn span{display:none}
}
@media (max-width:760px){
  #list-panel{width:100%;border-right:0}
  #reader{position:absolute;inset:0;z-index:50;background:var(--wh)}
  #reader[hidden]{display:none}
  #workspace{position:relative}
  .tb-btn{font-size:0;padding:0 7px}
  .tb-btn svg{width:18px;height:18px}
  .logo{display:none}
  .stat-grid{grid-template-columns:1fr 1fr}
  .plan-grid{grid-template-columns:1fr}
  .auth-card{padding:22px 20px 16px}
  .row-2{grid-template-columns:1fr}
}
