:root {
  /* Omni Intelligent Services 品牌色（取自公司 logo／簡報底版） */
  --omni-blue: #00AAE1;
  --omni-blue-deep: #004682;
  --omni-navy: #2E3C55;
  --omni-grey: #ACADAD;
  --omni-red: #E00012;

  --navy: #2E3C55;
  --navy-2: #44546A;
  --blue: #00AAE1;
  --blue-light: #5BC5EE;
  --orange: #ED7D31;
  --gold: #FFC000;
  --green: #70AD47;
  --grey: #ACADAD;
  --bg: #eef2f6;
  --panel: #ffffff;
  --ink: #2E3C55;
  --ink-soft: #667082;
  --line: #e6e8ec;
  --radius: 18px;
  --font: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  font-family: var(--font);
  color: var(--ink);
  overflow: hidden;
}

#app {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Top bar ── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 28px;
  background: #fff;
  color: var(--navy);
  flex-shrink: 0;
  z-index: 20;
  border-bottom: 3px solid var(--omni-blue);
}
.topbar .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 16px;
  color: var(--navy);
}
.topbar .brand img { height: 30px; }
.topbar .brand .brand-text { opacity: 0.75; font-weight: 600; }

.mode-toggle {
  display: flex;
  background: #eef2f6;
  border-radius: 999px;
  padding: 4px;
  gap: 2px;
}
.mode-toggle button {
  border: none;
  background: transparent;
  color: var(--ink-soft);
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: all .15s;
}
.mode-toggle button.active {
  background: var(--omni-blue);
  color: #fff;
}

.slide-counter {
  font-size: 15px;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

/* ── Stage ── */
.stage {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 64px 88px;
  opacity: 0;
  transform: translateX(24px);
  pointer-events: none;
  transition: opacity .35s ease, transform .35s ease;
  background: var(--panel);
}
.slide.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}
.slide.leaving {
  transform: translateX(-24px);
}

.slide-eyebrow {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 10px;
}
.slide h1 {
  font-size: 46px;
  margin: 0 0 10px;
  color: var(--navy);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.slide .subtitle {
  font-size: 21px;
  color: var(--ink-soft);
  margin-bottom: 32px;
}
.slide-body {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  font-size: 19px;
}

/* ── Cover ── */
.slide-cover {
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    radial-gradient(ellipse 900px 700px at 82% 30%, rgba(0,170,225,0.16), transparent 60%),
    radial-gradient(ellipse 700px 600px at 88% 15%, rgba(224,0,18,0.10), transparent 60%),
    #ffffff;
  color: var(--navy);
}
.slide-cover img.logo { height: 68px; margin-bottom: 48px; }
.slide-cover .eyebrow2 { color: var(--omni-blue); font-weight: 700; letter-spacing: 0.15em; font-size: 17px; margin-bottom: 20px; text-transform: uppercase; }
.slide-cover h1 { font-size: 72px; color: var(--navy); margin-bottom: 16px; }
.slide-cover .cover-sub { font-size: 24px; color: var(--ink-soft); margin-bottom: 64px; }
.slide-cover .cover-sub2 { font-size: 17px; color: var(--ink-soft); margin-top: -46px; margin-bottom: 60px; opacity: 0.8; }
.slide-cover .cover-name { font-size: 20px; color: var(--navy); font-weight: 700; }

/* ── Section divider ── */
.slide-section {
  align-items: flex-start;
  justify-content: center;
  background: #ffffff;
  color: var(--navy);
}
.slide-section .sec-num { font-size: 180px; font-weight: 800; color: #eef2f6; line-height: 1; position: absolute; top: 50px; right: 88px; }
.slide-section .sec-label { font-size: 18px; color: var(--omni-blue); font-weight: 700; letter-spacing: 0.15em; margin-bottom: 20px; text-transform: uppercase; }
.slide-section h1 { color: var(--navy); font-size: 64px; border-left: 8px solid var(--omni-blue); padding-left: 26px; }

/* ── Agenda (full-width row layout) ── */
.agenda-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  height: 100%;
  align-items: stretch;
}
.agenda-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 22px;
  background: #fafbfc;
  display: flex;
  flex-direction: column;
  border-top: 6px solid var(--omni-blue);
}
.agenda-card .agenda-num { font-size: 40px; font-weight: 800; color: var(--omni-blue); margin-bottom: 20px; }
.agenda-card .agenda-text { font-size: 23px; font-weight: 700; color: var(--navy); line-height: 1.35; margin-bottom: 14px; }
.agenda-card .agenda-sub { font-size: 16px; color: var(--ink-soft); line-height: 1.5; }

/* ── Tables ── */
table.deck-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 20px;
}
table.deck-table th {
  text-align: left;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  border-bottom: 2px solid var(--navy);
  padding: 12px 14px;
  font-weight: 700;
}
table.deck-table td {
  padding: 14px 14px;
  border-bottom: 1px solid var(--line);
}
table.deck-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.deck-table tr.highlight td { background: #f0f5fc; font-weight: 700; }
table.deck-table td.pos { color: #1a7f37; font-weight: 700; }
table.deck-table td.neg { color: #cf222e; font-weight: 700; }

/* two-column pipeline table wrapper (for long per-person lists) */
.table-columns-2 { columns: 2; column-gap: 40px; }
.table-columns-2 table.deck-table { break-inside: avoid; margin-bottom: 0; font-size: 18px; }

/* ── Stat cards ── */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 28px; }
.stat-card {
  background: #f8f9fb;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
}
.stat-card .stat-label { font-size: 15px; color: var(--ink-soft); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 12px; }
.stat-card .stat-value { font-size: 42px; font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; }
.stat-card .stat-sub { font-size: 16px; color: var(--ink-soft); margin-top: 8px; }
.stat-card.warn { background: #fff7ed; border-color: #fde0b4; }
.stat-card.warn .stat-value { color: var(--orange); }
.stat-card.good { background: #f0f9f0; border-color: #c9e6c2; }
.stat-card.good .stat-value { color: var(--green); }

.progress-bar-track { background: #e9ecf1; border-radius: 999px; height: 14px; overflow: hidden; margin-top: 12px; }
.progress-bar-fill { height: 100%; border-radius: 999px; background: var(--blue); }
.progress-bar-fill.warn { background: var(--orange); }
.progress-bar-fill.good { background: var(--green); }

/* ── Person cards row (team achievement) ── */
.person-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.person-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; background: #fafbfc; }
.person-card h3 { margin: 0 0 18px; font-size: 24px; color: var(--navy); }
.person-metric { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.person-metric .label { font-size: 16px; color: var(--ink-soft); }
.person-metric .value { font-size: 20px; font-weight: 700; }
.metric-block { margin-bottom: 20px; }
.metric-block:last-child { margin-bottom: 0; }

/* ── Pipeline list ── */
.pipeline-person { margin-bottom: 22px; }
.pipeline-person h3 { font-size: 16px; color: var(--navy); margin: 0 0 10px; display: flex; justify-content: space-between; align-items: baseline; }
.pipeline-person h3 .total { font-size: 14px; color: var(--ink-soft); font-weight: 600; }

.person-page-header { display: flex; align-items: baseline; gap: 24px; margin-bottom: 8px; }
.person-page-header .ppl-total { font-size: 26px; font-weight: 800; color: var(--omni-blue); }
.person-page-header .ppl-count { font-size: 18px; color: var(--ink-soft); }

/* ── Placeholder ── */
.placeholder-box {
  border: 2px dashed #c7cdd6;
  border-radius: var(--radius);
  padding: 70px 48px;
  text-align: center;
  color: var(--ink-soft);
  background: #fafbfc;
}
.placeholder-box .ph-icon { font-size: 52px; margin-bottom: 20px; }
.placeholder-box .ph-title { font-size: 24px; font-weight: 700; color: var(--navy-2); margin-bottom: 12px; }
.placeholder-box .ph-desc { font-size: 19px; max-width: 620px; margin: 0 auto; line-height: 1.7; }

/* ── Insight cards (Management Insights) ── */
.insight-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px 40px;
  background: #fafbfc;
  border-left: 8px solid var(--omni-blue);
  margin-bottom: 22px;
}
.insight-card .insight-tag { font-size: 15px; font-weight: 700; color: var(--omni-blue); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 10px; }
.insight-card .insight-headline { font-size: 26px; font-weight: 800; color: var(--navy); margin-bottom: 14px; line-height: 1.35; }
.insight-card .insight-evidence { display: flex; gap: 40px; margin: 18px 0; flex-wrap: wrap; }
.insight-card .insight-evidence .ev-num { font-size: 40px; font-weight: 800; color: var(--navy); }
.insight-card .insight-evidence .ev-lbl { font-size: 15px; color: var(--ink-soft); margin-top: 4px; }
.insight-card .insight-conclusion { font-size: 21px; color: var(--navy); font-weight: 700; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 6px; }
.insight-card .insight-note { font-size: 14px; color: var(--omni-red); margin-top: 10px; font-weight: 600; }

/* ── Why / reasons list ── */
.why-list { display: flex; flex-direction: column; gap: 24px; }
.why-item { display: flex; gap: 24px; align-items: flex-start; }
.why-item .why-num { font-size: 32px; font-weight: 800; color: var(--omni-blue); width: 56px; flex-shrink: 0; }
.why-item .why-text { font-size: 23px; color: var(--navy); font-weight: 600; line-height: 1.5; padding-top: 2px; }

/* ── Priority list (H2 Plan) ── */
.priority-list { display: flex; flex-direction: column; gap: 20px; }
.priority-item {
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 26px 30px;
  border-radius: var(--radius);
  background: #fafbfc;
  border: 1px solid var(--line);
}
.priority-item .priority-rank { font-size: 34px; font-weight: 800; color: var(--omni-blue); width: 50px; }
.priority-item .priority-title { font-size: 26px; font-weight: 800; color: var(--navy); }
.priority-item .priority-sub { font-size: 17px; color: var(--ink-soft); margin-top: 6px; }

/* ── Needs table (What We Need to Scale) ── */
table.needs-table { width: 100%; border-collapse: collapse; }
table.needs-table th {
  text-align: left; font-size: 15px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--ink-soft); border-bottom: 2px solid var(--navy); padding: 14px 16px; font-weight: 700;
}
table.needs-table td { padding: 22px 16px; border-bottom: 1px solid var(--line); font-size: 20px; vertical-align: top; }
table.needs-table td.need-name { font-weight: 800; color: var(--navy); width: 26%; }
table.needs-table td.need-why { color: var(--ink-soft); }

/* ── Closing ── */
.slide-closing {
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    radial-gradient(ellipse 900px 700px at 18% 75%, rgba(0,170,225,0.14), transparent 60%),
    #ffffff;
  color: var(--navy);
}
.slide-closing h1 { color: var(--navy); font-size: 56px; }
.slide-closing .slide-body ul li { color: var(--ink-soft) !important; }

/* ── Nav arrows ── */
.nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(0,0,0,0.35);
  color: #fff;
  border: none;
  font-size: 22px;
  cursor: pointer;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.nav-arrow:hover { background: rgba(0,0,0,0.55); }
.nav-arrow.prev { left: 22px; }
.nav-arrow.next { right: 22px; }
.nav-arrow:disabled { opacity: 0.2; cursor: default; }

.progress-strip {
  height: 4px;
  background: #e6e8ec;
  flex-shrink: 0;
}
.progress-strip-fill {
  height: 100%;
  background: var(--omni-blue);
  transition: width .3s ease;
}

/* ── Mode visibility ── */
body.mode-minimal .detail-only { display: none !important; }
body.mode-detail .minimal-only { display: none !important; }

.minimal-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 1;
}
.minimal-hero .big-num { font-size: 130px; font-weight: 800; color: var(--navy); line-height: 1; font-variant-numeric: tabular-nums; }
.minimal-hero .big-label { font-size: 23px; color: var(--ink-soft); margin-top: 18px; font-weight: 600; }
.minimal-hero .icon-row { display: flex; gap: 56px; margin-top: 52px; }
.minimal-hero .icon-item { text-align: center; }
.minimal-hero .icon-item .icon { font-size: 40px; }
.minimal-hero .icon-item .num { font-size: 30px; font-weight: 800; color: var(--navy); margin-top: 10px; }
.minimal-hero .icon-item .lbl { font-size: 15px; color: var(--ink-soft); margin-top: 4px; }

@media (max-width: 900px) {
  .slide { padding: 32px 24px; }
  .slide h1 { font-size: 30px; }
  .stat-grid, .person-grid, .agenda-grid { grid-template-columns: 1fr; }
  .table-columns-2 { columns: 1; }
}
