/*
 * 機場捷運訪員值勤即時查核（客戶端唯讀）。
 *
 * 配色為桃園大眾捷運識別色系：深紫 #7030A0（機場捷運為紫線，亦用於訪員）、
 * 深藍 #0070C0（督導）、淺紫 #E6E0EC。與 CAPI 問卷、附件五畫面稿同一套。
 */

:root {
  --brand: #7030A0;
  --brand-soft: #E6E0EC;
  --sup: #0070C0;
  --sup-soft: #E6F1FB;
  --head: #16181c;
  --ink: #16232E;
  --muted: #5C6B78;
  --line: #D5DEE4;
  --bg: #F2F5F7;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Noto Sans TC', 'Microsoft JhengHei', sans-serif;
  background: var(--bg);
  min-height: 100vh;
  color: var(--ink);
}
.page { max-width: 1440px; margin: 0 auto; padding: 0 28px 48px; }

.topbar {
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
  background: var(--head); color: #fff;
  padding: 16px 28px; margin: 0 0 22px;
  border-bottom: 4px solid var(--brand);
}
.topbar-title { font-weight: 700; font-size: 21px; }
.topbar-sep { opacity: .5; }
.topbar-sub { font-weight: 500; font-size: 15px; opacity: .92; }

.subtext { color: var(--muted); font-size: 14px; line-height: 1.5; }
.toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 14px; flex-wrap: wrap;
}
.toolbar .subtext { font-size: 15px; }
.iconbtn {
  width: 38px; height: 38px; border-radius: 10px; font-size: 17px;
  background: #fff; color: var(--head); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}

.legend {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 13px; color: var(--muted); margin-bottom: 16px;
}
.legend-dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
.legend-dot.i { background: var(--brand); }
.legend-dot.s { background: var(--sup); }

.linerow-label {
  display: inline-flex; align-items: center; color: #fff;
  font-size: 16px; font-weight: 700; padding: 8px 18px;
  border-radius: 8px 8px 0 0; background: var(--brand);
}
.linerow-track {
  border: 2px solid var(--brand); border-radius: 0 12px 12px 12px;
  background: #fff; padding: 34px 18px 18px;
  display: grid; grid-template-columns: repeat(8, minmax(0, 1fr));
  column-gap: 6px; row-gap: 42px;
}
.stationchip { text-align: center; position: relative; padding-top: 16px; }
.stationchip-dot {
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--brand); margin: 0 auto 9px;
}
/* 非抽樣站點淡化：那些站不會有人值勤，畫得一樣明顯只會讓人找錯 */
.stationchip.off .stationchip-dot { background: var(--line); }
.stationchip.off .stationchip-code,
.stationchip.off .stationchip-name { opacity: .45; }
.stationchip-code {
  font-size: 12px; font-weight: 700; color: var(--brand);
  line-height: 1; margin-bottom: 3px;
}
.stationchip-name { font-size: 14px; font-weight: 600; line-height: 1.3; min-height: 38px; }
.stationchip-people {
  position: absolute; top: -16px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 4px;
}
.dutypin {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--brand); color: #fff; font-size: 15px; font-weight: 800;
  border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.3);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.dutypin.s { background: var(--sup); }

.disclaimer { color: #8B98A3; font-size: 12px; margin-top: 14px; line-height: 1.6; }
.errorbanner {
  background: #FDECEE; color: #B3121F; border: 2px solid #B3121F;
  padding: 12px 16px; border-radius: 10px; font-size: 14px; margin-bottom: 16px;
}
.pagefooter {
  border-top: 1px solid var(--line); margin-top: 28px; padding-top: 14px;
  font-size: 12.5px; color: #8B98A3; text-align: center;
}

.modalbackdrop {
  position: fixed; inset: 0; background: rgba(11,31,51,.5);
  display: flex; align-items: center; justify-content: center; padding: 24px; z-index: 50;
}
.modalcard {
  background: #fff; border-radius: 16px; padding: 26px;
  max-width: 460px; width: 100%; position: relative;
}
.modaltitle { font-weight: 700; font-size: 19px; margin-bottom: 4px; }
.modalmeta { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.modalrow { font-size: 14px; margin-bottom: 6px; }
.modalclose {
  position: absolute; top: 14px; right: 14px; width: 34px; height: 34px;
  border-radius: 9px; border: 1px solid var(--line); background: #fff;
  cursor: pointer; font-size: 15px;
}

@media (max-width: 900px) {
  .page { padding: 0 14px 32px; }
  .topbar { padding: 14px 16px; }
  .topbar-title { font-size: 17px; }
  .linerow-track { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 34px; }
  .stationchip-name { font-size: 12.5px; }
}
