:root {
  /* 品牌四色（取自寶鴻品牌設計書）*/
  --blue: #3487C1;   --blue-dark: #256497;  --blue-wash: #E9F1F8;
  --green: #418B4A;  --taupe: #8E867D;      --orange: #DB864D;
  --brand: var(--blue); --brand-dark: var(--blue-dark); --brand-wash: var(--blue-wash);
  --accent: #DB864D;  --accent-dark: #B26A32;
  --ink: #14263A; --muted: #5A6B7A; --line: #E1E7EE; --line-strong: #CBD6E2;
  --card: #FFFFFF;
  --sidebar: #12314B; --sidebar-2: #0C2035;
  --ch: 20px; --r-sm: 9px;
  --sh: drop-shadow(0 1px 1px rgba(16,40,64,.05)) drop-shadow(0 10px 22px rgba(37,100,151,.14));
  --sh-hi: drop-shadow(0 4px 6px rgba(16,40,64,.07)) drop-shadow(0 20px 38px rgba(37,100,151,.24));
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "Fira Sans", "Noto Sans TC", -apple-system, "Segoe UI", system-ui, sans-serif;
  color: var(--ink); line-height: 1.6; -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(60% 50% at 12% -5%, rgba(52,135,193,.10), transparent 60%),
    radial-gradient(50% 40% at 108% 6%, rgba(52,135,193,.07), transparent 55%),
    #EDF1F6;
}
.num { font-variant-numeric: tabular-nums; }

.bg-deco {
  position: fixed; right: -3vw; bottom: -12vh; z-index: -1; pointer-events: none; user-select: none;
  font-family: "Fira Sans", sans-serif; font-weight: 800; font-size: 58vh; line-height: .8;
  letter-spacing: -.06em; color: rgba(18,49,75,.038);
}
.chamf { clip-path: polygon(0 0, calc(100% - var(--ch)) 0, 100% var(--ch), 100% 100%, 0 100%); }

/* ===== 橫式：側欄 + 主區 ===== */
.shell { display: grid; grid-template-columns: 258px 1fr; min-height: 100vh; min-height: 100dvh; }

.sidebar {
  position: sticky; top: 0; height: 100vh; height: 100dvh; overflow: hidden;
  background: linear-gradient(180deg, var(--sidebar), var(--sidebar-2));
  color: #DCE7F1; display: flex; flex-direction: column;
  padding: 22px 16px calc(20px + env(safe-area-inset-bottom));
}
.sidebar::after {
  content: "BH"; position: absolute; right: -10px; bottom: -30px; font-weight: 800; font-size: 150px;
  letter-spacing: -.06em; color: rgba(255,255,255,.03); pointer-events: none;
}
.sb-brand { display: flex; align-items: center; gap: 12px; padding: 4px 6px 12px; text-decoration: none; }
.sb-brand .mark { width: 46px; height: 46px; border-radius: 11px; background: #fff; display: grid; place-items: center; flex-shrink: 0; overflow: hidden; }
.sb-brand .mark img { width: 38px; height: auto; display: block; }
.sb-brand .t { font-weight: 900; font-size: 16px; color: #fff; letter-spacing: .5px; }
.sb-brand .s { font-size: 11px; color: #8FB0CC; margin-top: 1px; letter-spacing: .5px; }
.brandbar { display: flex; gap: 3px; margin: 0 6px 20px; }
.brandbar i { height: 4px; flex: 1; border-radius: 2px; }
.brandbar i:nth-child(1){ background: var(--blue); }
.brandbar i:nth-child(2){ background: var(--green); }
.brandbar i:nth-child(3){ background: var(--taupe); }
.brandbar i:nth-child(4){ background: var(--orange); }

.sb-nav { display: flex; flex-direction: column; gap: 3px; position: relative; z-index: 1; }
.sb-nav a {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: var(--r-sm);
  color: #B9CDDF; text-decoration: none; font-size: 14px; font-weight: 500; cursor: pointer;
  transition: background .2s, color .2s;
}
.sb-nav a svg { width: 19px; height: 19px; flex-shrink: 0; }
.sb-nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.sb-nav a.active { background: var(--brand); color: #fff; }

.sb-spacer { flex: 1; }
.sb-clock {
  position: relative; z-index: 1;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--r-sm); padding: 12px 14px; margin-bottom: 12px;
}
.sb-clock .time { font-size: 26px; font-weight: 700; color: #fff; letter-spacing: 1px; line-height: 1; }
.sb-clock .date { font-size: 12px; color: #9FBAD2; margin-top: 5px; }
.sb-user { display: flex; align-items: center; gap: 10px; padding: 4px 6px; position: relative; z-index: 1; }
.sb-user .av { width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color:#fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.sb-user .nm { font-size: 13px; color: #DCE7F1; font-weight: 600; }
.sb-user .rl { font-size: 11px; color: #7F9FBB; }

/* 手機底部導覽列 */
.bottom-nav { display: none; }

/* Main */
.main { padding: 30px 34px calc(34px + env(safe-area-inset-bottom)); max-width: 1300px; }

/* Hero（首頁）*/
.hero { position: relative; overflow: hidden; min-height: 296px; display: flex; align-items: center; margin-bottom: 34px; background: #12314B; filter: var(--sh); }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 72% 38%; }
.hero-scrim { position: absolute; inset: 0;
  background: linear-gradient(101deg, rgba(9,26,43,.95) 0%, rgba(16,44,70,.88) 34%, rgba(18,49,75,.5) 56%, rgba(52,135,193,.06) 82%, transparent 100%); }
.hero-content { position: relative; z-index: 1; padding: 42px 48px; max-width: 660px; }
.eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; margin-bottom: 12px; }
.hero .eyebrow { color: #9EC7E8; }
.hero h1 { font-size: clamp(26px, 3.6vw, 40px); font-weight: 900; letter-spacing: .3px; color: #fff; line-height: 1.18; }
.hero h1 .hl { color: #8AC3EC; }
.hero .lead { color: rgba(255,255,255,.82); font-size: 15px; margin-top: 10px; max-width: 40ch; }
.hero-bar, .pbar { display: flex; gap: 4px; margin: 20px 0; width: 132px; }
.hero-bar i, .pbar i { height: 5px; flex: 1; }
.hero-bar i:nth-child(1), .pbar i:nth-child(1){ background: var(--blue); }
.hero-bar i:nth-child(2), .pbar i:nth-child(2){ background: var(--green); }
.hero-bar i:nth-child(3), .pbar i:nth-child(3){ background: var(--taupe); }
.hero-bar i:nth-child(4), .pbar i:nth-child(4){ background: var(--orange); }
.kpi { display: flex; gap: 12px; }
.chip { display: flex; flex-direction: column; align-items: flex-start; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); border-radius: var(--r-sm); padding: 11px 16px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.chip .n { font-size: 22px; font-weight: 700; color: #fff; line-height: 1; }
.chip .l { font-size: 11px; color: rgba(255,255,255,.72); margin-top: 4px; letter-spacing: .5px; }
.hero .htag { position: absolute; top: 16px; right: 22px; z-index: 1; color: rgba(255,255,255,.82); font-weight: 800; font-size: 12px; letter-spacing: 3px; }
.hero .hcaption { position: absolute; right: 22px; bottom: 15px; z-index: 1; color: rgba(255,255,255,.85); font-size: 12.5px; font-weight: 600; letter-spacing: .3px; display: flex; align-items: center; gap: 7px; text-shadow: 0 1px 6px rgba(0,0,0,.4); }
.hero .hcaption .d { width: 7px; height: 7px; background: var(--orange); border-radius: 50%; }

/* 子頁頁首（比 hero 精簡）*/
.page-head { position: relative; overflow: hidden; background: linear-gradient(115deg, var(--sidebar), var(--sidebar-2)); padding: 30px 36px; margin-bottom: 30px; filter: var(--sh); }
.page-head::after { content: "BH"; position: absolute; right: 6px; bottom: -34px; font-weight: 800; font-size: 130px; letter-spacing: -.06em; color: rgba(255,255,255,.04); pointer-events: none; }
.page-head .eyebrow { color: #9EC7E8; }
.page-head h1 { font-size: clamp(22px, 3vw, 30px); font-weight: 900; color: #fff; letter-spacing: .3px; }
.page-head .lead { color: rgba(255,255,255,.78); font-size: 14px; margin-top: 6px; max-width: 52ch; }
.page-head .pbar { margin: 16px 0 0; width: 120px; }

.sec-eyebrow { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: 2.5px; text-transform: uppercase; margin: 0 0 14px; display: flex; align-items: center; gap: 12px; }
.sec-eyebrow::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.sec-eyebrow .more { text-transform: none; letter-spacing: .3px; font-size: 12.5px; color: var(--brand); text-decoration: none; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.sec-eyebrow .more svg { width: 14px; height: 14px; }
section + section { margin-top: 30px; }

/* System cards */
.sys { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.syscard {
  position: relative; display: flex; align-items: flex-start; gap: 18px;
  background: var(--card); padding: 24px 24px 24px 26px; text-decoration: none; color: inherit;
  filter: var(--sh); cursor: pointer;
  transition: transform .22s cubic-bezier(.2,.7,.3,1), filter .22s;
}
.syscard::before { content:""; position:absolute; left:0; top:0; bottom:0; width:5px; background: var(--brand); }
.syscard:hover { transform: translateY(-4px); filter: var(--sh-hi); }
.syscard .ic { width: 56px; height: 56px; flex-shrink: 0; display: grid; place-items: center; background: var(--brand-wash); color: var(--brand-dark); clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%); }
.syscard .ic svg { width: 29px; height: 29px; }
.syscard .body { flex: 1; min-width: 0; }
.syscard h3 { font-size: 18px; font-weight: 700; color: var(--ink); }
.syscard .desc { display: block; font-size: 13px; color: var(--muted); margin-top: 6px; }
.syscard .go { margin-top: 16px; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--brand); }
.syscard .go svg { width: 15px; height: 15px; transition: transform .2s; }
.syscard:hover .go svg { transform: translateX(3px); }
.tag { position: absolute; top: 15px; right: 26px; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; letter-spacing: .5px; display: inline-flex; align-items: center; gap: 5px; }
.tag.live { background: rgba(65,139,74,.12); color: var(--green); }
.tag .d { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* Panels */
.row2 { display: grid; grid-template-columns: 1.15fr 1fr; gap: 20px; align-items: start; }
.panel { position: relative; background: var(--card); filter: var(--sh); }
.panel-h { display: flex; align-items: center; gap: 9px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.panel-h svg { width: 18px; height: 18px; color: var(--brand); }
.panel-h h4 { font-size: 14.5px; font-weight: 700; color: var(--ink); }
.panel-h .more { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 500; }
.panel-b { padding: 8px 20px 16px; }

.ann { display: flex; gap: 13px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.ann:last-child { border-bottom: 0; }
.ann .badge { flex-shrink: 0; font-size: 10.5px; font-weight: 700; padding: 3px 8px; border-radius: 5px; height: fit-content; margin-top: 2px; letter-spacing: .5px; }
.ann .badge.b1 { background: var(--brand-wash); color: var(--brand-dark); }
.ann .badge.b2 { background: rgba(219,134,77,.16); color: var(--accent-dark); }
.ann .t { font-size: 14px; font-weight: 500; color: var(--ink); display: flex; align-items: center; gap: 6px; }
.ann .t .pin { color: var(--accent-dark); display: inline-flex; }
.ann .t .pin svg { width: 13px; height: 13px; }
.ann .body-txt { font-size: 12.5px; color: var(--muted); margin-top: 3px; line-height: 1.55; }
.ann .d { font-size: 12px; color: var(--muted); margin-top: 3px; }
.ann-empty { padding: 26px 0; text-align: center; color: var(--muted); font-size: 13.5px; }

.grouplabel { font-size: 11.5px; font-weight: 700; color: var(--muted); letter-spacing: 1.5px; margin: 12px 0 6px; }
.grouplabel:first-child { margin-top: 4px; }
.link { display: flex; align-items: center; gap: 12px; padding: 10px 10px; margin: 0 -10px; border-radius: var(--r-sm); text-decoration: none; color: var(--ink); font-size: 13.5px; font-weight: 500; transition: background .15s; cursor: pointer; }
.link:hover { background: #F1F5F9; }
.link .li { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; background: var(--brand-wash); color: var(--brand-dark); flex-shrink: 0; }
.link .li svg { width: 18px; height: 18px; }
.link .txt { flex: 1; min-width: 0; }
.link .sub { font-size: 11.5px; color: var(--muted); font-weight: 400; }
.link .act { color: var(--muted); opacity: .55; display: flex; }
.link .act svg { width: 16px; height: 16px; }
.link.dl .li { background: rgba(219,134,77,.14); color: var(--accent-dark); }
.link.dl:hover .act { color: var(--accent-dark); opacity: 1; }

footer { color: var(--muted); font-size: 12.5px; margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--line); }
footer .sep { margin: 0 8px; opacity: .5; }

/* 手機 */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: sticky; top: 0; z-index: 15; height: auto; flex-direction: row; align-items: center; padding: 12px 16px; gap: 12px; }
  .sidebar::after, .sb-nav, .sb-spacer, .sb-clock, .brandbar { display: none; }
  .sb-brand { padding: 0; flex: 1; }
  .sb-user { margin-left: auto; }
  .main { padding: 20px 16px calc(84px + env(safe-area-inset-bottom)); }
  .hero { min-height: 244px; }
  .hero-content { padding: 26px 22px; }
  .hero .hcaption { display: none; }
  .page-head { padding: 24px 22px; }
  .sys { grid-template-columns: 1fr; }
  .row2 { grid-template-columns: 1fr; }

  /* 底部導覽列 */
  .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: linear-gradient(180deg, #163A5A, #0C2035);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    box-shadow: 0 -6px 20px rgba(12,32,53,.25);
  }
  .bottom-nav a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 8px 4px; border-radius: 10px; text-decoration: none; color: #9FBAD2;
    font-size: 11px; font-weight: 600;
  }
  .bottom-nav a svg { width: 21px; height: 21px; }
  .bottom-nav a.active { color: #fff; background: rgba(52,135,193,.28); }
}
@media (max-width: 560px) {
  :root { --ch: 16px; }
  .kpi .chip { flex: 1; }
  .syscard { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
a:focus-visible, .link:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
