/* RentTrail · 中介后台外壳与页面：手机＝顶栏＋底部标签，≥960px＝左侧栏。收件箱、体检卡、对比、机构设置共用 */
.shell{min-height:100vh;display:flex;flex-direction:column}
.side{display:none}
.top{background:#fff;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:7}
.top .in{padding:6px 16px;display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:56px}
.top .back{margin-left:-6px}
.top .title{display:flex;flex-direction:column;min-width:0;text-align:left}
.top .title b{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.top .title span{font-size:12px;color:var(--muted)}
.icon-btn{width:44px;height:44px;border-radius:10px;border:1px solid var(--line);background:#fff;display:inline-flex;align-items:center;justify-content:center;text-decoration:none;color:var(--ink);font-size:13px;font-weight:700}
.avatar-btn{width:40px;height:40px;border-radius:50%;background:var(--brand-tint);color:var(--brand);font-weight:800;font-size:13px;border:0;display:flex;align-items:center;justify-content:center}
.body{flex:1;min-width:0;display:flex;flex-direction:column}
.content{width:100%;max-width:1100px;margin:0 auto;padding:16px 16px 96px;display:flex;flex-direction:column;gap:16px}
.tabbar{position:fixed;left:0;right:0;bottom:0;background:#fff;border-top:1px solid var(--line);display:grid;grid-template-columns:repeat(3,1fr);z-index:8;padding-bottom:env(safe-area-inset-bottom)}
.tabbar a,.tabbar span{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-height:56px;font-size:12px;font-weight:700;color:var(--muted);text-decoration:none}
.tabbar a[aria-current="page"]{color:var(--brand)}
.tabbar span{opacity:.55}
.tabbar i{width:20px;height:20px;border-radius:5px;border:2px solid currentColor;display:block}

.page-title{display:flex;flex-direction:column;gap:4px}
.page-title h1{font-size:26px;font-weight:800;letter-spacing:-.5px;line-height:1.15}
.actions{display:flex;flex-wrap:wrap;gap:8px}

/* 收件箱 */
.tabs{display:flex;gap:8px;overflow-x:auto;padding-bottom:2px}
.tabs button{flex:none;min-height:44px;padding:0 14px;border-radius:999px;border:1px solid var(--field);background:#fff;font-size:14px;font-weight:600}
.tabs button[aria-pressed="true"]{background:var(--ink);color:#fff;border-color:var(--ink)}
.sortbar{display:flex;justify-content:space-between;align-items:center;font-size:13px;color:var(--soft);gap:10px}
.arows{display:flex;flex-direction:column;gap:10px}
.ahead{display:none}
.arow{background:#fff;border:1px solid var(--line);border-radius:14px;padding:14px;display:grid;gap:10px 12px;grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:"sel who status" "sel nums nums" "sel flags flags" "sel note note"}
.arow[hidden]{display:none}
.arow .sel{grid-area:sel;align-self:start}
.arow .sel input{width:22px;height:22px;accent-color:var(--brand);margin:11px 0 0 0}
.arow .who{grid-area:who;display:flex;flex-direction:column;gap:2px;min-width:0}
.arow .who a,.arow .who b{font-size:16px;font-weight:700;color:var(--ink);text-decoration:none}
.arow .who a:hover{text-decoration:underline}
.arow .who span{font-size:12px;color:var(--muted)}
.arow .st{grid-area:status;align-self:start}
.arow .nums{grid-area:nums;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.arow .nums div{display:flex;flex-direction:column;font-size:11px;color:var(--muted)}
.arow .nums b{font-size:15px;color:var(--ink);font-weight:500;font-family:var(--mono)}
.arow .flags{grid-area:flags;display:flex;gap:14px;font-size:13px;font-weight:700;align-items:center}
.arow .flags span{display:inline-flex;gap:6px;align-items:center}
.arow .note{grid-area:note;font-size:13px;line-height:1.45;color:var(--soft);display:flex;gap:10px;align-items:center;justify-content:space-between;flex-wrap:wrap}
.arow .nums .mv{display:none}
.stats{display:grid;grid-template-columns:1fr;gap:10px}
.stat{background:#fff;border:1px solid var(--line);border-radius:12px;padding:12px 14px;font-size:13px;color:var(--soft);display:flex;flex-direction:column;gap:2px}
.stat b{font-size:15px;color:var(--ink)}

/* 体检卡 */
.hc-head{background:#fff;border:1px solid var(--line);border-radius:16px;padding:18px;display:flex;flex-direction:column;gap:14px}
.tiles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.tile{border-radius:12px;padding:12px 14px;display:flex;flex-direction:column;gap:2px;background:var(--neutral-bg)}
.tile .n{font-family:var(--mono);font-size:30px;line-height:1.1}.tile .l{font-size:13px;font-weight:700;display:flex;gap:6px;align-items:center}
.tile.ok{background:var(--ok-bg);color:var(--ok-text)}.tile.warn{background:var(--warn-bg);color:var(--warn-text)}.tile.red{color:var(--soft)}
.tile.red.has{background:var(--bad-bg);color:var(--bad-text)}
.kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;font-size:12px}
.kpis div{background:var(--bg);border-radius:8px;padding:10px;display:flex;flex-direction:column;gap:2px}
.kpis span{color:var(--muted)}.kpis b{font-size:15px;font-weight:500;font-family:var(--mono)}
.hc-sec{display:flex;flex-direction:column;gap:10px}
.hc-sec>h2{font-size:15px;font-weight:800}
.refrow{display:flex;gap:12px;align-items:flex-start;padding:12px 0;border-bottom:1px solid var(--line-2)}
.refrow:last-child{border-bottom:0}
.refrow .num{width:26px;height:26px;border-radius:50%;background:var(--brand-tint);color:var(--brand);font-weight:800;font-size:13px;display:flex;align-items:center;justify-content:center;flex:none}
.refrow .txt{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px;font-size:14px}
.refrow .txt span{font-size:12px;color:var(--muted)}
.flag{display:flex;gap:12px;padding:12px 0;border-bottom:1px solid var(--line-2)}
.flag:last-child{border-bottom:0}
.flag .dot{margin-top:5px}
.flag .t{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px;font-size:14px;line-height:1.4}
.flag .t span{font-size:12px;color:var(--muted)}
.flag .t q{font-size:13px;color:var(--soft);font-style:italic;quotes:none}
.flag .src{font-size:12px;font-weight:700;color:var(--soft);white-space:nowrap}
.hc-bar{position:fixed;left:0;right:0;bottom:56px;background:#fff;border-top:1px solid var(--line);z-index:7}
.hc-bar .in{max-width:1100px;margin:0 auto;padding:10px 16px;display:grid;grid-template-columns:1fr 1fr;gap:8px}
.hc-bar .in .wide{grid-column:1/-1}
.table-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:12px;background:#fff}
table.t{border-collapse:collapse;width:100%;font-size:14px}
table.t th,table.t td{padding:10px 12px;text-align:left;border-bottom:1px solid var(--line-2);vertical-align:top}
table.t thead th{background:var(--bg);font-size:12px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.4px;position:sticky;top:0}
table.t tbody tr:last-child td{border-bottom:0}
table.t td.hl{background:var(--warn-bg);color:var(--warn-text);font-weight:600}
table.t td small{display:block;font-size:12px;color:var(--muted);font-weight:500}

/* 对比 */
.podium{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.cand{background:#fff;border:1px solid var(--line);border-radius:14px;padding:14px;display:flex;flex-direction:column;gap:2px}
.cand.top1{border:2px solid var(--brand)}
.cand .score{font-family:var(--mono);font-size:38px;line-height:1.1}
.cand small{font-size:12px;color:var(--muted)}
.langbox{display:flex;flex-direction:column;gap:10px}
.langbox [lang="zh"]{display:none}
.langbox.zh [lang="zh"]{display:block}.langbox.zh [lang="en"]{display:none}
.weights{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;background:#fff;border:1px solid var(--line);border-radius:14px;padding:14px}
.weights label{font-size:13px;font-weight:700;display:flex;flex-direction:column;gap:6px}
.weights input{height:44px}

/* 机构设置 */
.set-grid{display:grid;grid-template-columns:1fr;gap:16px}
.drop-zone{border:1.5px dashed var(--dash);border-radius:14px;background:#fff;padding:24px 16px;display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center}
.drop-zone.over{background:var(--brand-tint);border-color:var(--brand)}
.drop-zone .prev{max-height:64px;max-width:240px;display:none}
.preview{background:#fff;border:1px solid var(--line);border-radius:14px;padding:16px;display:flex;flex-direction:column;gap:12px}
.pv-head{display:flex;align-items:center;gap:10px;border:1px solid var(--line-2);border-radius:10px;padding:10px 12px}
.pv-head img{max-height:32px;max-width:120px;display:none}
.pv-mail{border:1px solid var(--line-2);border-radius:10px;padding:14px;display:flex;flex-direction:column;gap:10px;font-size:13px;line-height:1.5}
.pv-btn{align-self:flex-start;background:var(--accent);color:#fff;border-radius:8px;padding:10px 16px;font-weight:700;font-size:14px}

@media (min-width:960px){
  .shell{flex-direction:row}
  .side{display:flex;flex-direction:column;gap:6px;width:248px;flex:none;background:#fff;border-right:1px solid var(--line);padding:18px 14px;position:sticky;top:0;height:100vh;overflow:auto}
  .side .brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--ink);padding:4px 8px 16px;font-weight:800;font-size:19px;letter-spacing:-.3px}
  .side .grp{font-size:11px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.6px;padding:14px 10px 4px}
  .side a,.side .soon{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:44px;padding:0 10px;border-radius:10px;font-size:14px;font-weight:600;color:var(--ink);text-decoration:none}
  .side a:hover{background:var(--bg)}
  .side a[aria-current="page"]{background:var(--brand-tint);color:var(--brand)}
  .side .soon{color:var(--muted);opacity:.7}.side .soon small{font-size:11px;font-weight:700}
  .side .count{font-size:12px;font-weight:700;background:var(--brand);color:#fff;border-radius:999px;padding:2px 8px}
  .side .me{margin-top:auto;border-top:1px solid var(--line-2);padding:14px 8px 4px;display:flex;flex-direction:column;font-size:13px;color:var(--muted)}
  .side .me b{color:var(--ink);font-size:14px}
  .top,.tabbar{display:none}
  .content{padding:28px 40px 56px;gap:20px}
  .page-title h1{font-size:30px}
  .hc-bar{position:static;border:0;background:transparent}
  .hc-bar .in{display:none}
  .stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .podium{grid-template-columns:repeat(3,minmax(0,1fr))}
  .set-grid{grid-template-columns:minmax(0,1fr) 360px;align-items:start}
  .weights{grid-template-columns:repeat(5,minmax(0,1fr))}
  /* 收件箱：同一份标记在电脑上变成表格 */
  .ahead,.arow{display:grid;grid-template-columns:28px minmax(0,1.5fr) 64px 64px 84px 84px 120px minmax(0,1fr);gap:0 10px;align-items:center}
  .ahead{padding:0 14px;font-size:11px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.5px}
  .arows{gap:6px}
  .arow{padding:12px 14px;grid-template-areas:none;border-radius:12px}
  .arow>*{grid-area:auto !important}
  .arow .flags .w{display:none}
  .arow .nums{display:contents}
  .arow .nums div{font-size:0}
  .arow .nums .mv{display:flex}
  .arow .nums b{font-size:14px}
  .arow .flags{order:8}.arow .st{order:9;align-self:center}.arow .note{order:10}
  .arow .note{grid-column:2/-1 !important;margin-top:8px;padding-top:8px;border-top:1px solid var(--line-2)}
  .arow .sel input{margin:0}
}
