/* 主頁（2026-09-15 重設計）—— 版面次序＝變動頻率：
     日日變（今日事項）→ hero；每日／每週變（可以講）→ 第二；每月變（業績／招募／晉升）→ 一張進度卡；
     每週變（客戶簿磚）→ 第四；工具入口最尾。10 格工具目錄同五格數據狀態剷走（側欄／頂欄已有）。
   全部用 shell.css 現成元件（.hero／.seg／.card／.progress／.pill），呢度只係主頁專屬嘅排版。 */

/* ── hero：今日事項 ── */
.home-hero{margin-bottom:var(--sp-4);display:flex;flex-direction:column;gap:var(--sp-3h)}
.home-hero .hh{display:flex;align-items:flex-end;gap:var(--sp-4);flex-wrap:wrap}
.home-hero .hh>div:first-child{flex:1 1 auto;min-width:0}
.home-hero .hh .seg{flex:none}   /* 09-15 用戶指出：.seg 唔准撐闊（之前 >div 一律 flex:1，三個掣縮埋左邊一條長框） */
.home-hero .hlabel.mono{letter-spacing:.06em}
.home-hero h1{font-size:var(--fs-hero);margin-top:4px;color:#fff}
/* 深底上嘅 .seg：底同邊改半透明白，選中照舊金色（DESIGN 鐵律 1） */
.home-hero .seg{background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.18)}
.home-hero .seg button{color:rgba(255,255,255,.8)}
.home-hero .seg button.on{color:var(--accent-ink);background:var(--accent)}
.home-hero .seg button small{font-family:var(--mono);font-weight:400;margin-left:4px;opacity:.8}
.home-hero .rows{display:flex;flex-direction:column}
.home-hero .rows a{display:flex;align-items:baseline;gap:var(--sp-3);padding:var(--sp-2h) 0;border-bottom:1px solid rgba(255,255,255,.09);color:inherit}
.home-hero .rows a:last-child{border-bottom:0}
.home-hero .rows a:hover{text-decoration:none;background:rgba(255,255,255,.04)}
.home-hero .rows .k{flex:none;width:124px;font-size:var(--fs-xs);color:rgba(255,255,255,.62);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.home-hero .rows .k.neg{color:#FF9B9B}   /* 同 shell.css .hero .neg（深底冇 on-dark token，跟先例） */
.home-hero .rows .n{flex:none;max-width:38%;font-weight:700;font-size:var(--fs-md);color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.home-hero .rows .d{flex:1 1 auto;min-width:0;font-size:var(--fs-sm);color:rgba(255,255,255,.72);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.home-hero .rows .go{flex:none;font-size:var(--fs-xs);color:var(--brand-green);font-weight:500}
.home-hero .rows .empty{padding:var(--sp-3) 0;font-size:var(--fs-sm);color:rgba(255,255,255,.62)}
.home-hero .hf{display:flex;align-items:baseline;gap:var(--sp-4);font-size:var(--fs-xs);color:rgba(255,255,255,.62)}
.home-hero .hf a{color:var(--brand-green);font-weight:500}
.home-hero .hf a:last-child{margin-left:auto}
.home-hero .skel{background:rgba(255,255,255,.10);animation:none}
/* 管理員：hero 分兩欄，右邊「今日要處理」 */
.home-hero .hcols{display:grid;grid-template-columns:3fr 2fr;gap:var(--sp-5)}
.home-hero .hcols>div{min-width:0}
.home-hero .hcols .ttl{font-size:var(--fs-xs);color:rgba(255,255,255,.62);font-weight:500;padding-bottom:4px}
.home-hero .hcols .adm{border-left:1px solid rgba(255,255,255,.14);padding-left:var(--sp-5)}
.home-hero .rows a .n.grow{flex:1 1 auto;max-width:none}
@media (max-width:900px){
  .home-hero .hcols{grid-template-columns:1fr}
  .home-hero .hcols .adm{border-left:0;padding-left:0;border-top:1px solid rgba(255,255,255,.14);padding-top:var(--sp-3)}
}
@media (max-width:640px){
  .home-hero .rows a{flex-wrap:wrap;gap:2px var(--sp-2h)}
  .home-hero .rows .k{width:auto;flex:1 1 auto;order:0}
  .home-hero .rows .go{order:1}
  .home-hero .rows .n{order:2;flex:1 0 100%;max-width:100%}
  .home-hero .rows .d{order:3;flex:1 0 100%}
}

/* ── 兩欄卡 ── */
.home-grid{display:grid;grid-template-columns:1fr;gap:var(--sp-4);margin-bottom:var(--sp-4)}
@media (min-width:1100px){.home-grid{grid-template-columns:3fr 2fr}.home-grid.one{grid-template-columns:1fr}}   /* 萬通／trinity 冇進度卡 → 單欄 */
.hcard{background:var(--card);border:1px solid var(--line);border-radius:var(--r-md);box-shadow:var(--shadow);padding:18px 22px;display:flex;flex-direction:column;gap:var(--sp-3);margin-bottom:var(--sp-4)}
.home-grid .hcard{margin-bottom:0}
.hcard h2{font-size:var(--fs-lg);display:flex;align-items:baseline;gap:var(--sp-3);flex-wrap:wrap}
.hcard h2 small{font-weight:400;font-size:var(--fs-xs);color:var(--muted)}
.hcard h2 a{margin-left:auto;font-size:var(--fs-sm);font-weight:500;white-space:nowrap}
.hcard .note{margin:0;font-size:var(--fs-2xs);color:var(--muted);line-height:1.6}
.hcard .empty{margin:0;font-size:var(--fs-sm);color:var(--muted)}

/* 進度：三行（Active 目標／招募計劃／晉升），三個口徑，唔准互相代替 */
.prog{display:flex;flex-direction:column}
.prog .prow{display:grid;grid-template-columns:150px minmax(0,1fr) 170px;gap:var(--sp-4);align-items:center;padding:var(--sp-2) 0;border-bottom:1px solid var(--line2)}
.prog .prow:last-child{border-bottom:0}
.prog .pl{font-size:var(--fs-sm);font-weight:700}
.prog .pl small{display:block;font-weight:400;font-size:var(--fs-2xs);color:var(--muted)}
.prog .pm{font-size:var(--fs-2xs);color:var(--muted);margin-top:4px}
.prog .pv{font-family:var(--mono);font-variant-numeric:tabular-nums;font-size:var(--fs-sm);color:var(--ink2);text-align:right}
.prog .pv b{display:block;font-size:var(--fs-xl);font-weight:500;color:var(--ink)}
.prog .pv b small{font-size:var(--fs-xs);color:var(--muted);font-family:var(--sans);margin-left:2px}
@media (max-width:640px){
  .prog .prow{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"l v" "m m"}
  .prog .pl{grid-area:l}.prog .pv{grid-area:v}.prog .pb{grid-area:m}
}
/* 全隊（管理員）四格；下面「我的進度」小標題再接三行 */
.hcard .sub{font-size:var(--fs-sm);font-weight:700;margin-top:var(--sp-2);padding-top:var(--sp-3);border-top:1px solid var(--line2)}
.tk{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:var(--sp-3)}
.tk .kpi .v small{font-size:var(--fs-sm);color:var(--muted);font-family:var(--sans);margin-left:4px}

/* 今日可以講：一行一期 */
.feed{display:flex;flex-direction:column}
.feed a{display:flex;align-items:baseline;gap:var(--sp-3);padding:9px 0;border-bottom:1px solid var(--line2);color:inherit}
.feed a:last-child{border-bottom:0}
.feed a:hover{text-decoration:none;background:var(--card2)}
.feed .dt{flex:none;width:44px;font-family:var(--mono);font-size:var(--fs-xs);color:var(--muted)}
.feed .tp{flex:none;width:76px;font-size:var(--fs-xs);color:var(--ink2);font-weight:500}
.feed .tt{flex:1 1 auto;min-width:0;font-size:var(--fs-sm);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.feed .tt .pill{margin-right:6px;vertical-align:1px}
@media (max-width:640px){.feed .tp{width:auto}.feed .dt{width:40px}}

/* 客戶簿磚：抄客戶中心 .cc-tile 嘅結構（撳＝去客戶中心已篩好） */
.hb{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:var(--sp-2h)}
.hb a{display:flex;flex-direction:column;align-items:flex-start;padding:var(--sp-2h) var(--sp-3);border:1px solid var(--line);border-radius:var(--r-md);background:var(--card);color:var(--ink);min-width:0}
.hb a:hover{text-decoration:none;background:var(--bg2);border-color:var(--brand-green-deep)}
.hb a.zero{opacity:.5}
.hb .t{font-size:var(--fs-2xs);color:var(--muted);display:flex;align-items:center;gap:var(--sp-1h)}
.hb .t i{width:7px;height:7px;border-radius:50%;display:inline-block;background:var(--line2)}
.hb .n{font-size:var(--fs-2xl);font-weight:700;line-height:1.1;margin:2px 0;font-variant-numeric:tabular-nums}
.hb .w{font-size:var(--fs-2xs);color:var(--ink2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.hb a.bad .n{color:var(--bad)}.hb a.bad .t i{background:var(--bad)}
.hb a.warn .n{color:var(--warn)}.hb a.warn .t i{background:var(--warn)}
.hb a.info .t i{background:var(--info)}

/* 由客戶嘅問題入手：四張入口 */
.qs{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:var(--sp-3)}
.qs a{display:flex;flex-direction:column;gap:6px;border:1px solid var(--line);border-radius:var(--r-md);padding:14px 16px;background:var(--card);color:var(--ink)}
.qs a:hover{text-decoration:none;border-color:var(--brand-green-deep)}
.qs b{font-size:var(--fs-md);line-height:1.4}
.qs span{font-size:var(--fs-xs);color:var(--muted)}
.qs .meta{font-family:var(--mono);font-size:var(--fs-2xs);color:var(--link);margin-top:auto}

.home-rule{font-size:var(--fs-xs);color:var(--muted);line-height:1.7;margin:0}
.home-rule .mono{margin-left:var(--sp-2)}

/* ═══ iOS 版式（09-16 二期，team.js homeStyle 'ios'；其他隊呢兩個元素 hidden）═══
   masthead 跟 TeamPerformanceHomeView.swift:206-241：「歡迎回來」細字 → serif 姓名＋角色 pill（金字金邊 radius 5）→ 右邊星期＋日期（serif）＋46px 墨綠頭像金邊 */
.home-mast{display:flex;align-items:flex-end;justify-content:space-between;gap:var(--sp-4);margin:var(--sp-1) 0 var(--sp-4)}
.home-mast .hm-k{font-size:var(--fs-sm);color:var(--ink2)}
.home-mast .hm-n{display:flex;align-items:center;gap:var(--sp-2h);margin-top:2px}
.home-mast .hm-n span:first-child{font-family:var(--serif);font-size:var(--fs-3xl);font-weight:600;line-height:1.15;color:var(--brand-deep)}
.home-mast .hm-role{font-size:var(--fs-3xs);font-weight:700;letter-spacing:.08em;color:var(--brand-gold-deep);border:1px solid var(--brand-gold);border-radius:5px;padding:2px 7px;background:rgba(217,192,138,.12)}
.home-mast .hm-r{display:flex;align-items:center;gap:var(--sp-3);flex:none}
.home-mast .hm-d{display:flex;flex-direction:column;align-items:flex-end;line-height:1.2}
.home-mast .hm-wd{font-size:var(--fs-xs);color:var(--ink2)}
.home-mast .hm-d b{font-family:var(--serif);font-size:var(--fs-lg);font-weight:600;color:var(--brand-deep)}
.home-mast .hm-av{width:46px;height:46px;border-radius:50%;background:linear-gradient(160deg,#24463B,#0F2019);border:1.5px solid var(--brand-gold);color:#D9C08A;font-family:var(--serif);font-weight:700;font-size:var(--fs-lg);display:flex;align-items:center;justify-content:center;overflow:hidden}
.home-mast .hm-av img{width:100%;height:100%;object-fit:cover;display:block}
/* 每日快報卡（DailyBriefingHeroCard）：象牙卡、金 kicker、serif 標題 */
.home-brief{display:flex;flex-direction:column;gap:var(--sp-2);color:var(--ink);transition:transform .18s ease,box-shadow .18s ease}
.home-brief:hover{text-decoration:none;transform:translateY(-2px);box-shadow:0 10px 24px rgba(24,48,40,.10)}
.home-brief .hb-k{font-size:var(--fs-2xs);font-weight:700;letter-spacing:.16em;text-transform:uppercase;color:var(--brand-gold-deep)}
.home-brief h2{font-family:var(--serif);font-size:var(--fs-xl);font-weight:600;line-height:1.35;display:block}
.home-brief .hb-m{display:flex;align-items:baseline;gap:var(--sp-3);font-size:var(--fs-xs);color:var(--muted)}
.home-brief .hb-cta{margin-left:auto;font-weight:700;color:var(--brand-deep)}
/* 09-17 走馬燈版（.hb2，home.js renderBriefCard 只喺 ios 版式加）：深綠頂帶 → 一幅大圖走馬燈；跟 iPad DailyBriefingHeroCard */
.home-brief.hb2{padding:0;gap:0;overflow:hidden;border-color:var(--brand-deep)}
.home-brief.hb2 .hb-top{background:linear-gradient(160deg,var(--brand-green),var(--brand-deep) 55%,var(--brand-deeper));color:var(--brand-hero-ink);padding:14px 18px 14px;display:flex;align-items:flex-start;justify-content:space-between;gap:var(--sp-3);border-bottom:2px solid var(--brand-gold)}
.home-brief.hb2 .hb-l{min-width:0;display:flex;flex-direction:column;gap:5px}
.home-brief.hb2 .hb-k{display:flex;align-items:center;gap:8px;color:rgba(245,241,232,.82);text-transform:none;letter-spacing:.06em}
.home-brief.hb2 .hb-today{font-size:var(--fs-3xs);font-weight:800;letter-spacing:.12em;color:var(--brand-deeper);background:var(--brand-gold);border-radius:999px;padding:2px 9px}
.home-brief.hb2 h2{color:#fff;font-size:var(--fs-xl);margin:0;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.home-brief.hb2 .hb-m{color:rgba(245,241,232,.78);gap:var(--sp-2);align-items:center}
.home-brief.hb2 .hb-live{display:inline-flex;align-items:center;gap:5px;font-size:var(--fs-3xs);font-weight:700;color:#fff;background:rgba(255,255,255,.14);border-radius:999px;padding:2px 9px}
.home-brief.hb2 .hb-live::before{content:"";width:6px;height:6px;border-radius:50%;background:var(--brand-green)}
.home-brief.hb2 .hb-r{flex:none}
.home-brief.hb2 .hb-mood{display:inline-flex;align-items:center;gap:6px;font-size:var(--fs-xs);font-weight:700;color:#fff;background:rgba(255,255,255,.12);border-radius:999px;padding:3px 10px;white-space:nowrap}
.home-brief.hb2 .hb-mood::before{content:"";width:7px;height:7px;border-radius:50%;background:var(--brand-gold)}
.home-brief.hb2 .hb-mood.good::before{background:var(--brand-green)}
.home-brief.hb2 .hb-mood.bad::before{background:var(--warn)}
/* 走馬燈高度跟 iPad DailyBriefingHeroCard 比例（圖約 2.8:1、卡高約 160pt）—— 09-17 用戶：「幅圖似乎太大太高」，由 16:7 收到 3:1、封頂 190px */
.home-brief.hb2 .hb-carousel{position:relative;aspect-ratio:3/1;height:clamp(150px,22vw,190px);background:var(--brand-deeper);overflow:hidden}
.home-brief.hb2 .hb-slide{position:absolute;inset:0;margin:0;opacity:0;transition:opacity .5s ease;background:linear-gradient(160deg,var(--brand-green),var(--brand-deeper))}
.home-brief.hb2 .hb-slide.on{opacity:1}
.home-brief.hb2 .hb-slide img{width:100%;height:100%;object-fit:cover;display:block}
.home-brief.hb2 .hb-slide.noimg img{display:none}
.home-brief.hb2 figcaption{position:absolute;left:0;right:0;bottom:0;padding:38px 18px 30px;background:linear-gradient(180deg,rgba(15,32,25,0) 0%,rgba(15,32,25,.72) 45%,rgba(15,32,25,.92) 100%);color:#fff;display:flex;flex-direction:column;align-items:flex-start;gap:6px}
.home-brief.hb2 .hb-cat{font-size:var(--fs-3xs);font-weight:700;letter-spacing:.06em;color:#fff;background:rgba(255,255,255,.22);border:1px solid rgba(255,255,255,.35);border-radius:999px;padding:2px 9px}
.home-brief.hb2 .hb-nt{font-family:var(--serif);font-size:var(--fs-md);font-weight:600;line-height:1.35;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;text-shadow:0 1px 2px rgba(0,0,0,.4)}
.home-brief.hb2 .hb-dots{position:absolute;left:0;right:0;bottom:9px;display:flex;justify-content:center;gap:7px;z-index:2}
.home-brief.hb2 .hb-dot{width:8px;height:8px;border-radius:50%;border:0;padding:0;background:rgba(255,255,255,.42);cursor:pointer;transition:background .2s}
.home-brief.hb2 .hb-dot.on{background:#fff}
.home-brief.hb2 .hb-dot:focus-visible{outline:2px solid var(--brand-gold);outline-offset:2px}
@media (prefers-reduced-motion:reduce){.home-brief.hb2 .hb-slide{transition:none}}
@media (max-width:640px){.home-brief.hb2 .hb-carousel{aspect-ratio:16/9;height:auto;max-height:220px}.home-brief.hb2 .hb-top{flex-direction:column}}
body.home-ios .home-hero h1{font-size:var(--fs-xl)}
@media (max-width:640px){.home-mast{flex-direction:column;align-items:flex-start}.home-mast .hm-r{width:100%;justify-content:space-between;flex-direction:row-reverse}.home-mast .hm-d{align-items:flex-start}}
