:root {
  color-scheme: light;
  --ink: #17323d;
  --muted: #60737a;
  --navy: #123f52;
  --teal: #087f78;
  --teal-dark: #056760;
  --pale: #eaf7f5;
  --blue-pale: #edf5fa;
  --line: #d7e4e7;
  --surface: #ffffff;
  --background: #f2f7f8;
  --danger: #a52f2f;
  --shadow: 0 18px 50px rgba(18, 63, 82, .11);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: linear-gradient(145deg, #f7fbfb 0%, var(--background) 48%, #e8f3f5 100%); color: var(--ink); }
button, input { font: inherit; }
button { cursor: pointer; }
.topbar { min-height: 76px; padding: 14px clamp(18px, 4vw, 48px); display: flex; align-items: center; justify-content: space-between; gap: 20px; background: var(--navy); color: white; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { display: grid; place-items: center; width: 52px; height: 44px; border-radius: 14px; background: #4dc1b5; color: #0f3b49; font-weight: 900; font-size: .78rem; line-height: 1; letter-spacing: 0; white-space: nowrap; text-align: center; }
.brand strong, .brand span { display: block; }
.brand strong { font-size: 1.05rem; }
.brand div > span { margin-top: 2px; color: #c5dbe1; font-size: .82rem; }
.account-bar { align-items: center; gap: 12px; font-size: .9rem; }
.account-bar:not([hidden]) { display: flex; }
.text-button { border: 1px solid rgba(255,255,255,.45); border-radius: 10px; padding: 8px 13px; background: transparent; color: white; }
main { width: min(1040px, calc(100% - 32px)); margin: clamp(30px, 6vw, 64px) auto; }
.panel { background: var(--surface); border: 1px solid rgba(18,63,82,.08); border-radius: 24px; box-shadow: var(--shadow); padding: clamp(24px, 5vw, 44px); }
.login-panel { width: min(470px, 100%); margin: 9vh auto 0; }
.eyebrow { margin: 0 0 8px; color: var(--teal); font-size: .83rem; font-weight: 800; letter-spacing: .12em; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 { margin: 0; font-size: clamp(1.65rem, 4vw, 2.35rem); line-height: 1.25; }
h2 { margin: 0; font-size: clamp(1.35rem, 3vw, 1.8rem); }
h3 { margin: 0 0 14px; font-size: 1.1rem; }
.muted { color: var(--muted); line-height: 1.75; }
label { display: block; margin: 18px 0 7px; color: var(--ink); font-size: .92rem; font-weight: 700; }
input { width: 100%; min-height: 48px; border: 1px solid #b9cdd2; border-radius: 12px; padding: 11px 13px; background: white; color: var(--ink); font-size: 1rem; }
input:focus { outline: 3px solid rgba(8,127,120,.17); border-color: var(--teal); }
.primary-button, .secondary-button { min-height: 46px; border-radius: 12px; padding: 10px 18px; font-weight: 800; }
.primary-button { border: 0; background: var(--teal); color: white; }
.primary-button:hover { background: var(--teal-dark); }
.secondary-button { border: 1px solid #a9c3c8; background: white; color: var(--navy); }
.login-panel .primary-button { width: 100%; margin-top: 24px; }
.message { min-height: 1.5em; margin: 12px 0 0; color: var(--danger); font-size: .9rem; }
.workspace { display: grid; gap: 22px; }
.search-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 16px; align-items: end; margin-top: 18px; }
.search-form label { margin-top: 0; }
.search-form .primary-button { min-width: 108px; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 22px; }
.result-list { display: grid; gap: 12px; }
.person-button { width: 100%; display: grid; grid-template-columns: 1.1fr .8fr 1fr auto; gap: 14px; align-items: center; border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; background: #fbfdfd; color: var(--ink); text-align: left; }
.person-button:hover, .person-button:focus-visible { border-color: var(--teal); background: var(--pale); }
.person-button strong { font-size: 1.04rem; }
.person-button span { color: var(--muted); font-size: .92rem; }
.person-button b { color: var(--teal); }
.identity-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 0 0 30px; }
.identity-grid > div { border-radius: 14px; padding: 15px 17px; background: var(--blue-pale); }
dt { color: var(--muted); font-size: .82rem; }
dd { margin: 5px 0 0; font-weight: 800; }
.followup-section { margin: 0 0 30px; padding: 20px; border: 1px solid #cfe4e2; border-radius: 16px; background: var(--pale); }
.followup-section h3 { margin-bottom: 10px; }
.followup-staff { margin: -2px 0 10px; color: var(--muted); font-size: .9rem; font-weight: 700; }
.followup-list { display: grid; gap: 0; }
.followup-item { display: grid; grid-template-columns: 130px 1fr; gap: 14px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid rgba(8,127,120,.14); }
.followup-item:last-child { border-bottom: 0; }
.followup-item strong { color: var(--navy); font-size: .92rem; }
.followup-item span { color: var(--ink); line-height: 1.55; }
.vaccine-section { margin-top: 24px; }
.due-section { padding-top: 24px; border-top: 1px solid var(--line); }
.vaccine-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.vaccine-item { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: #fbfdfd; }
.vaccine-item strong, .vaccine-item span { display: block; }
.vaccine-item strong { line-height: 1.55; }
.vaccine-item span { margin-top: 5px; color: var(--muted); font-size: .9rem; }
.due-section .vaccine-item { background: #fff9ed; border-color: #ead9b7; }
.due-section .vaccine-item.due-overdue { background: #ffe5e5; border-color: #e29a9a; }
.due-section .vaccine-item.due-overdue strong, .due-section .vaccine-item.due-overdue span { color: #7f1d1d; }
.due-section .vaccine-item.due-future { background: #fff4c7; border-color: #e4c96f; }
.due-section .vaccine-item.due-later { background: #e7f6ea; border-color: #9bc9a4; }
.due-section .vaccine-item.due-later strong, .due-section .vaccine-item.due-later span { color: #245b32; }
.empty-state { border: 1px dashed #b9cdd2; border-radius: 14px; padding: 18px; color: var(--muted); text-align: center; }
.footnote { margin: 30px 0 0; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: .84rem; line-height: 1.7; }
[hidden] { display: none !important; }
@media (max-width: 760px) {
  .topbar { align-items: flex-start; }
  .brand div > span, #accountName { display: none; }
  main { width: min(100% - 20px, 1040px); margin: 20px auto; }
  .panel { border-radius: 18px; padding: 22px 18px; }
  .search-form { grid-template-columns: 1fr; }
  .search-form .primary-button { width: 100%; }
  .section-heading { align-items: center; }
  .person-button { grid-template-columns: 1fr; gap: 5px; }
  .person-button b { margin-top: 5px; }
  .identity-grid, .vaccine-list { grid-template-columns: 1fr; }
  .followup-item { grid-template-columns: 1fr; gap: 2px; }
}
