/* 配色取自主視覺：寶藍為主，青藍→桃紅→橘黃為光感重點色；白底深字確保好閱讀 */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=JetBrains+Mono:wght@500&display=swap');

:root {
  --navy: #1f3a93;
  --navy-dark: #12235f;
  --ink: #0b1640;
  --cyan: #2bb3e6;
  --pink: #d63a7f;
  --amber: #f2a33a;
  --violet: #6d5dfc;
  --bg: #f3f5fb;
  --card: #ffffff;
  --text: #1a2238;
  --muted: #6b7489;
  --line: #e4e8f2;
  --soft: #eef2fb;
  --glow: linear-gradient(90deg, #2bb3e6 0%, #6d5dfc 40%, #d63a7f 70%, #f2a33a 100%);
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(31, 58, 147, .06);
  --num: "Space Grotesk", -apple-system, "PingFang TC", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: -apple-system, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  background-color: var(--bg);
  background-image: radial-gradient(#dde3f0 1px, transparent 1px);
  background-size: 22px 22px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
}
h1, h2, h3 { margin: 0; line-height: 1.3; }
button, select, input { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.num { font-family: var(--num); font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); letter-spacing: .04em; }
.ic { width: 18px; height: 18px; stroke-width: 1.8; vertical-align: -4px; flex-shrink: 0; }

/* 科技感小標籤 */
.tag { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
.glow-line { height: 3px; background: var(--glow); border-radius: 99px; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: #fff;
  padding: 8px 14px; border-radius: 10px; cursor: pointer; white-space: nowrap;
  transition: border-color .15s, color .15s, box-shadow .15s;
}
.btn:hover { border-color: var(--navy); color: var(--navy); }
.btn.primary { background: var(--navy); color: #fff; border-color: var(--navy); box-shadow: 0 4px 14px rgba(31, 58, 147, .25); }
.btn.primary:hover { background: var(--navy-dark); color: #fff; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h3 { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.icon-box { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--soft); color: var(--navy); }
.icon-box.cyan { background: #e3f5fc; color: #1188b8; }
.icon-box.pink { background: #fbe6ef; color: var(--pink); }
.icon-box.amber { background: #fdf1df; color: #c77a10; }
.icon-box.violet { background: #ecebff; color: var(--violet); }

select, input[type=date], input[type=number] {
  border: 1px solid #d3d9e6; border-radius: 10px; padding: 7px 10px; background: #fff;
}
select:focus, input:focus { outline: 2px solid var(--cyan); outline-offset: 1px; }

/* 表格 */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
th { background: #f6f8fd; color: var(--muted); font-weight: 600; font-size: 13px; position: sticky; top: 0; z-index: 1; }
tbody tr:last-child td { border-bottom: 0; }
td { font-variant-numeric: tabular-nums; }
td.left, th.left { text-align: left; }
.sticky-col { position: sticky; left: 0; background: #fff; z-index: 2; text-align: left; font-weight: 600; }
th.sticky-col { background: #f6f8fd; z-index: 3; }

.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 12px 22px; border-radius: 999px;
  box-shadow: 0 10px 30px rgba(11, 22, 64, .3); opacity: 0; transition: opacity .25s; pointer-events: none; z-index: 99;
  display: flex; gap: 8px; align-items: center;
}
.toast.show { opacity: 1; }

/* hidden 屬性一律隱藏（避免被 display 設定蓋過） */
[hidden] { display: none !important; }

/* 語言切換：繁｜简｜EN */
.lang-switch { display: inline-flex; background: var(--soft); border: 1px solid var(--line); border-radius: 9px; padding: 2px; gap: 2px; }
.lang-switch button { border: 0; background: none; padding: 3px 9px; border-radius: 7px; font-size: 12px; cursor: pointer; color: var(--muted); font-weight: 600; }
.lang-switch button.on { background: #fff; color: var(--navy); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.hero .lang-switch { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.22); }
.hero .lang-switch button { color: #c9d4ff; }
.hero .lang-switch button.on { background: #fff; color: var(--navy); }

/* 簡體用簡體字型 */
html[lang=zh-Hans] body { font-family: -apple-system, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif; }
