/* PCM Shared Styles */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-base: #0c0f14;
  --bg-raised: #141820;
  --bg-surface: #1a1f2b;
  --bg-hover: #222837;
  --border: #2a3040;
  --border-light: #343b4f;
  --text: #e2e4e9;
  --text-sub: #8891a4;
  --text-muted: #5c6478;
  --accent: #f97316;
  --accent-dim: rgba(249,115,22,.12);
  --accent-border: rgba(249,115,22,.25);
  --blue: #3b82f6;
  --blue-dim: rgba(59,130,246,.12);
  --green: #22c55e;
  --green-dim: rgba(34,197,94,.12);
  --yellow: #eab308;
  --yellow-dim: rgba(234,179,8,.12);
  --red: #ef4444;
  --red-dim: rgba(239,68,68,.12);
  --purple: #a855f7;
  --purple-dim: rgba(168,85,247,.12);
  --teal: #14b8a6;
  --teal-dim: rgba(20,184,166,.12);
  --radius: 8px;
  --radius-lg: 12px;
  --transition: 200ms ease;
}

body {
  font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-base);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* === NAV === */
header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(12,15,20,.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1120px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; height: 56px; gap: 28px;
}
.brand { font-size: 18px; font-weight: 900; color: var(--accent); letter-spacing: .5px; flex-shrink: 0; text-decoration: none; }
.brand span { color: var(--text-sub); font-weight: 500; font-size: 14px; margin-left: 8px; letter-spacing: 0; }
nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
nav::-webkit-scrollbar { display: none; }
nav a {
  padding: 6px 12px; font-size: 14px; font-weight: 500; color: var(--text-sub);
  text-decoration: none; border-radius: 6px; white-space: nowrap;
  transition: color var(--transition), background var(--transition); cursor: pointer;
}
nav a:hover { color: var(--text); background: var(--bg-hover); }
nav a.active { color: var(--accent); background: var(--accent-dim); }

/* === LAYOUT === */
.wrap { max-width: 1120px; margin: 0 auto; padding: 40px 24px 80px; }
h1 { font-size: 28px; font-weight: 900; letter-spacing: -.5px; }
h2 { font-size: 18px; font-weight: 700; margin: 40px 0 14px; color: var(--text); }
h3 { font-size: 15px; font-weight: 700; }
.sub { color: var(--text-sub); font-size: 15px; margin-bottom: 28px; }

/* === ICONS === */
.icon { width: 20px; height: 20px; display: inline-block; vertical-align: middle; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* === HERO === */
.hero { background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 48px; margin-bottom: 36px; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; top: -1px; left: -1px; right: -1px; height: 3px; background: linear-gradient(90deg, var(--accent), var(--accent) 30%, transparent); }
.hero h1 { font-size: 32px; margin-bottom: 10px; }
.hero p { color: var(--text-sub); font-size: 16px; max-width: 580px; }
.stats { display: flex; gap: 40px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); }
.stat-num { font-size: 32px; font-weight: 900; color: var(--accent); }
.stat-label { font-size: 14px; color: var(--text-sub); margin-top: 2px; }

/* === CARDS === */
.grid { display: grid; gap: 12px; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g1 { grid-template-columns: 1fr; }
.card { background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; transition: border-color var(--transition), background var(--transition); cursor: pointer; }
.card:hover { border-color: var(--border-light); background: var(--bg-surface); }
.card-static { cursor: default; }
.card-static:hover { border-color: var(--border); background: var(--bg-raised); }
.card-icon { width: 40px; height: 40px; border-radius: 8px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.card-icon svg { width: 22px; height: 22px; }
.ci-orange { background: var(--accent-dim); color: var(--accent); }
.ci-blue { background: var(--blue-dim); color: var(--blue); }
.ci-green { background: var(--green-dim); color: var(--green); }
.ci-yellow { background: var(--yellow-dim); color: var(--yellow); }
.ci-red { background: var(--red-dim); color: var(--red); }
.ci-purple { background: var(--purple-dim); color: var(--purple); }
.ci-teal { background: var(--teal-dim); color: var(--teal); }
.card h3 { margin-bottom: 6px; }
.card p { font-size: 14px; color: var(--text-sub); line-height: 1.6; }
.card-wide { display: flex; align-items: center; gap: 16px; }
.card-wide .card-icon { margin-bottom: 0; flex-shrink: 0; }

/* === MODULE HEADER === */
.mod-header { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.mod-icon { width: 52px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.mod-icon svg { width: 26px; height: 26px; }
.mod-header .sub { margin-bottom: 0; }

/* === FEATURE LIST === */
.flist { list-style: none; }
.flist li { padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 14px; display: flex; align-items: flex-start; gap: 10px; }
.flist li:last-child { border-bottom: none; }
.fcheck { width: 18px; height: 18px; border-radius: 50%; background: var(--green-dim); color: var(--green); display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px; }
.fcheck svg { width: 11px; height: 11px; }

/* === HIGHLIGHT BOX === */
.hbox { border-radius: var(--radius); padding: 18px 20px; margin: 14px 0; border: 1px solid; }
.hbox-orange { background: var(--accent-dim); border-color: var(--accent-border); }
.hbox-green { background: var(--green-dim); border-color: rgba(34,197,94,.2); }
.hbox-blue { background: var(--blue-dim); border-color: rgba(59,130,246,.2); }
.hbox-purple { background: var(--purple-dim); border-color: rgba(168,85,247,.2); }
.hbox h4 { font-size: 14px; margin-bottom: 6px; }
.hbox p, .hbox li { font-size: 14px; color: var(--text); line-height: 1.7; }
.hbox ul { padding-left: 18px; }

/* === SCENARIO === */
.scenario { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin: 14px 0; }
.scenario-title { font-size: 14px; font-weight: 700; color: var(--accent); margin-bottom: 14px; }
.step { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px; font-size: 14px; }
.step:last-child { margin-bottom: 0; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-muted); margin-top: 7px; flex-shrink: 0; }
.dot-auto { background: var(--green); }

/* === PROGRESS === */
.pbar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.pbar-label { width: 80px; font-size: 14px; color: var(--text-sub); flex-shrink: 0; }
.pbar-track { flex: 1; height: 6px; background: var(--bg-hover); border-radius: 3px; overflow: hidden; }
.pbar-fill { height: 100%; border-radius: 3px; background: var(--blue); }
.pbar-fill-green { background: var(--green); }
.pbar-pct { width: 36px; font-size: 14px; font-weight: 600; text-align: right; }

/* === CORRECTION FLOW === */
.cflow { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 14px 0; }
.cstep { padding: 6px 12px; border-radius: 6px; font-size: 14px; font-weight: 600; }
.cflow-arrow { color: var(--text-muted); font-size: 14px; }

/* === SMART LIST === */
.slist-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.slist-item:last-child { border-bottom: none; }
.slist-icon { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.slist-icon svg { width: 18px; height: 18px; }
.slist-title { font-size: 14px; font-weight: 600; }
.slist-desc { font-size: 14px; color: var(--text-sub); }

/* === TABLE === */
.tbl { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 14px; }
.tbl th { background: var(--bg-surface); padding: 10px 14px; text-align: left; font-weight: 600; font-size: 14px; color: var(--text-sub); text-transform: uppercase; letter-spacing: .5px; border-bottom: 1px solid var(--border); }
.tbl td { padding: 10px 14px; border-bottom: 1px solid var(--border); }
.tbl tr:hover td { background: var(--bg-hover); }
.tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 600; }
.tag-ok { background: var(--green-dim); color: var(--green); }
.tag-part { background: var(--yellow-dim); color: var(--yellow); }

/* === DOC CATS === */
.dcats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0; }
.dcat { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; text-align: center; transition: border-color var(--transition); }
.dcat:hover { border-color: var(--border-light); }
.dcat-icon { margin-bottom: 8px; color: var(--text-sub); }
.dcat-icon svg { width: 24px; height: 24px; }
.dcat-name { font-size: 14px; font-weight: 600; }
.dcat-ex { font-size: 14px; color: var(--text-muted); margin-top: 2px; }

/* === TIMELINE === */
.tl-item { display: flex; gap: 16px; margin-bottom: 20px; }
.tl-time { width: 80px; flex-shrink: 0; text-align: right; padding-top: 4px; }
.tl-time-label { font-size: 14px; font-weight: 700; color: var(--accent); line-height: 1.4; }
.tl-rail { width: 2px; background: var(--border); position: relative; flex-shrink: 0; }
.tl-rail::before { content: ''; position: absolute; top: 6px; left: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.tl-body { flex: 1; display: flex; flex-direction: column; gap: 8px; padding-bottom: 4px; }
.tl-card { background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.tl-card-done { border-color: rgba(34,197,94,.3); }
.tl-role { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; margin-bottom: 3px; }
.tl-role-mgr { color: var(--purple); }
.tl-role-fl { color: var(--accent); }
.tl-role-insp { color: var(--teal); }
.tl-action { font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.tl-desc { font-size: 14px; color: var(--text-sub); line-height: 1.6; }

/* === FLOW DIAGRAM === */
.fdiag { display: flex; flex-direction: column; align-items: center; gap: 0; margin: 20px 0; }
.fnode { padding: 10px 20px; border-radius: 6px; font-size: 14px; font-weight: 600; text-align: center; }
.fnode-primary { background: var(--accent); color: #fff; }
.fnode-warn { background: var(--yellow-dim); color: var(--yellow); border: 1px solid rgba(234,179,8,.25); }
.fnode-ok { background: var(--green-dim); color: var(--green); border: 1px solid rgba(34,197,94,.25); }
.fnode-default { background: var(--bg-surface); border: 1px solid var(--border); }
.farrow { color: var(--text-muted); padding: 3px 0; font-size: 14px; }

/* === PHONE MOCKUP === */
.phone-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.phones { display: flex; gap: 20px; overflow-x: auto; padding-bottom: 16px; scrollbar-width: thin; }
.phone-wrap { text-align: center; flex-shrink: 0; }
.phone-label { font-size: 12px; font-weight: 700; color: var(--accent); margin-bottom: 4px; }
.phone-sublabel { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }
.phone { background: var(--bg-base); border: 2px solid var(--border-light); border-radius: 24px; padding: 12px; width: 300px; }
.phone-notch { width: 80px; height: 4px; background: var(--border); border-radius: 2px; margin: 0 auto 8px; }
.phone-screen { background: var(--bg-raised); border-radius: 14px; padding: 16px; text-align: left; min-height: 480px; }
.phone-screen h4 { font-size: 16px; font-weight: 700; margin-bottom: 14px; color: var(--text); }
.phone-date { font-size: 12px; color: var(--text-muted); float: right; margin-top: 2px; }
.phone-tabs { display: flex; border-top: 1px solid var(--border); margin: 12px -16px -16px; border-radius: 0 0 14px 14px; overflow: hidden; background: var(--bg-surface); }
.phone-tab { flex: 1; text-align: center; padding: 8px 4px; font-size: 12px; color: var(--text-muted); }
.phone-tab.active { color: var(--accent); }
.phone-tab-icon { font-size: 16px; display: block; margin-bottom: 2px; }
.flow-arrow-h { display: flex; align-items: center; color: var(--text-muted); font-size: 20px; padding: 0 4px; flex-shrink: 0; align-self: center; }

/* Phone screen components */
.ps-section { margin-bottom: 14px; }
.ps-title { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
.ps-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: 6px; padding: 10px 12px; margin-bottom: 6px; font-size: 12px; }
.ps-card-accent { border-left: 3px solid var(--accent); }
.ps-card-ok { border-left: 3px solid var(--green); }
.ps-card-warn { border-left: 3px solid var(--yellow); }
.ps-card-alert { border-left: 3px solid var(--red); }
.ps-card-blue { border-left: 3px solid var(--blue); }
.ps-site { font-weight: 600; font-size: 13px; }
.ps-detail { color: var(--text-sub); font-size: 12px; margin-top: 2px; }
.ps-todo { display: flex; align-items: center; gap: 6px; padding: 6px 0; font-size: 12px; color: var(--text-sub); border-bottom: 1px solid var(--border); }
.ps-todo:last-child { border-bottom: none; }
.ps-circle { width: 14px; height: 14px; border: 1.5px solid var(--text-muted); border-radius: 50%; flex-shrink: 0; }
.ps-circle-done { background: var(--green); border-color: var(--green); }
.ps-btn { display: inline-block; padding: 6px 14px; background: var(--accent); color: #fff; border-radius: 6px; font-size: 12px; font-weight: 600; margin-top: 4px; margin-right: 4px; cursor: pointer; }
.ps-btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text-sub); }
.ps-btn-green { background: var(--green); }
.ps-badge { display: inline-block; padding: 1px 6px; border-radius: 3px; font-size: 12px; font-weight: 600; }
.ps-badge-ok { background: var(--green-dim); color: var(--green); }
.ps-badge-warn { background: var(--yellow-dim); color: var(--yellow); }
.ps-badge-alert { background: var(--red-dim); color: var(--red); }
.ps-badge-muted { background: var(--bg-hover); color: var(--text-muted); }
.ps-sigpad { border: 1.5px dashed var(--border-light); border-radius: 8px; height: 60px; display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 12px; margin: 6px 0; }
.ps-field { margin-bottom: 8px; }
.ps-field-label { font-size: 12px; color: var(--text-muted); margin-bottom: 2px; }
.ps-field-input { background: var(--bg-surface); border: 1px solid var(--border); border-radius: 4px; padding: 6px 8px; font-size: 12px; color: var(--text); width: 100%; }
.ps-divider { border-top: 1px solid var(--border); margin: 12px 0; }

/* Screen descriptions */
.screen-desc { margin-top: 32px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.screen-desc-item { background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.screen-desc-item h4 { font-size: 13px; font-weight: 700; margin-bottom: 4px; color: var(--accent); }
.screen-desc-item p { font-size: 12px; color: var(--text-sub); line-height: 1.6; }

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .g3, .g2, .dcats, .phone-grid { grid-template-columns: 1fr; }
  .hero { padding: 28px 20px; }
  .hero h1 { font-size: 24px; }
  .stats { gap: 20px; }
  .stat-num { font-size: 24px; }
  .nav-inner { gap: 12px; }
  .brand span { display: none; }
  .tl-time { width: 60px; }
  .cflow { flex-direction: column; align-items: flex-start; }
  .card-wide { flex-direction: column; }
  .phones { flex-direction: column; align-items: center; }
  .flow-arrow-h { transform: rotate(90deg); padding: 8px 0; }
  .phone { width: 100%; max-width: 320px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
