:root {
  color-scheme: light;
  --ink: #102426;
  --muted: #637676;
  --line: #d5e5e3;
  --paper: #ffffff;
  --wash: #f2f7f6;
  --green: #25bdb4;
  --green-dark: #0e6e69;
  --mint: #d9f5f2;
  --aqua-soft: #ccefed;
  --night: #071c1d;
  --danger: #a9433b;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }
.main-nav { display: flex; gap: 8px; margin: 18px 0; padding: 6px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.main-nav a { padding: 11px 22px; border-radius: 9px; color: var(--muted); font-size: 14px; font-weight: 700; text-decoration: none; }
.main-nav a[aria-current="page"] { background: var(--mint); color: var(--green-dark); }
.main-nav a:hover { background: var(--wash); }
.ledger-hero { min-height: 200px; align-items: center; }
.ledger-store-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.ledger-store-card { min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--wash); }
.ledger-card-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.ledger-card-heading h3, .ledger-file h3 { margin: 0; font-size: 17px; }
.ledger-tag { padding: 6px 10px; border-radius: 20px; background: var(--mint); color: var(--green-dark); font-size: 12px; }
.ledger-counts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.ledger-counts strong { display: block; font-size: 28px; letter-spacing: -.04em; }
.ledger-counts span { color: var(--muted); font-size: 12px; }
.ledger-error { color: var(--danger); font-size: 13px; overflow-wrap: anywhere; line-height: 1.6; }
.ledger-filters { display: flex; gap: 12px; }
.ledger-filters label { display: grid; gap: 6px; font-size: 12px; color: var(--muted); }
.ledger-filters select { min-width: 130px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--ink); }
.ledger-file { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.ledger-file:last-child { border-bottom: 0; }
.ledger-open { flex-shrink: 0; color: var(--green-dark); font-size: 14px; font-weight: 700; text-decoration: none; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; }
.ledger-open:hover { background: var(--mint); }
.ledger-empty { padding: 30px 0; text-align: center; color: var(--muted); }
@media (max-width: 700px) { .ledger-store-grid { grid-template-columns: 1fr; } .ledger-hero { flex-direction: column; align-items: flex-start; } .ledger-filters { flex-wrap: wrap; } .main-nav a { flex: 1; text-align: center; } }
body {
  margin: 0;
  background:
    radial-gradient(circle at 8% 0%, rgba(79, 220, 211, .13), transparent 28rem),
    linear-gradient(180deg, #edf6f5 0, var(--wash) 24rem, #f6f8f7 100%);
  color: var(--ink);
}
button, input, textarea, select { font: inherit; }
.shell { width: min(1240px, calc(100% - 36px)); margin: 24px auto 72px; }
.hero {
  position: relative;
  display: flex;
  min-height: 250px;
  justify-content: space-between;
  gap: 32px;
  align-items: flex-start;
  overflow: visible;
  margin-bottom: 18px;
  padding: 31px 32px;
  border: 1px solid rgba(120, 235, 227, .16);
  border-radius: 28px;
  background:
    radial-gradient(circle at 78% -20%, rgba(83, 229, 220, .25), transparent 22rem),
    linear-gradient(135deg, #071c1d 0%, #0b2929 68%, #0f3a38 100%);
  box-shadow: 0 22px 55px rgba(3, 31, 31, .18);
}
.hero::after {
  position: absolute;
  right: 34px;
  bottom: 25px;
  width: 170px;
  height: 4px;
  border-radius: 99px;
  background: linear-gradient(90deg, transparent, #66e8e1);
  content: "";
  opacity: .7;
}
.brand-lockup { display: grid; min-width: 0; gap: 13px; }
.brand-logo {
  position: relative;
  width: 355px;
  max-width: 62vw;
  height: 70px;
  overflow: hidden;
}
.brand-logo img {
  position: absolute;
  top: -110px;
  left: -80px;
  width: 520px;
  max-width: none;
  height: auto;
}
.hero-copy { max-width: 720px; }
.header-actions { position: relative; display: flex; gap: 10px; align-items: center; }
.eyebrow { margin: 0 0 10px; color: var(--green-dark); font-size: 13px; font-weight: 780; letter-spacing: .16em; text-transform: uppercase; }
.hero .eyebrow { color: #71e9e3; }
h1 { margin: 0; color: white; font-size: clamp(34px, 5vw, 57px); line-height: 1.06; letter-spacing: -.045em; }
.lede { max-width: 690px; margin: 15px 0 0; color: #bad0ce; line-height: 1.75; }
.status { white-space: nowrap; padding: 10px 14px; border: 1px solid rgba(159, 236, 231, .2); border-radius: 999px; background: rgba(255, 255, 255, .08); color: #d4e7e5; font-size: 13px; backdrop-filter: blur(10px); }
.status span { display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: #50dfb0; box-shadow: 0 0 0 4px rgba(80, 223, 176, .16); }
.status.offline span { background: #c65c52; box-shadow: 0 0 0 4px #f7dfdc; }
.status b { font-weight: 650; }
.icon-button { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid rgba(159, 236, 231, .22); border-radius: 50%; background: rgba(255, 255, 255, .09); color: #73e9e3; font-size: 20px; box-shadow: 0 6px 18px rgba(0, 0, 0, .12); }
.icon-button:hover { border-color: rgba(120, 235, 227, .55); background: rgba(255, 255, 255, .15); }

.settings-menu { position: absolute; z-index: 20; top: 52px; right: 0; width: min(620px, calc(100vw - 32px)); max-height: min(760px, calc(100vh - 88px)); overflow-y: auto; padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: white; box-shadow: 0 24px 70px rgba(3, 31, 31, .28); }
.menu-heading { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.menu-heading > div { display: flex; gap: 11px; align-items: center; }
.menu-heading h2 { margin: 0; font-size: 19px; }
.close-button { width: 34px; height: 34px; background: #f0f4f2; color: var(--muted); font-size: 22px; line-height: 1; }
.menu-note { margin: 14px 0 17px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.settings-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 18px; padding: 4px; border-radius: 12px; background: #e3f0ef; }
.settings-tab { padding: 10px 12px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 700; }
.settings-tab.active { background: white; color: var(--green-dark); box-shadow: 0 3px 12px rgba(20, 49, 36, .08); }
.overview { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.metric { position: relative; min-width: 0; overflow: hidden; padding: 20px; border: 1px solid var(--line); border-radius: 17px; background: rgba(255, 255, 255, .94); box-shadow: 0 9px 28px rgba(10, 59, 57, .055); }
.metric::before { position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--green); content: ""; opacity: .75; }
.metric-button { text-align: left; }
.metric-button:hover { border-color: #b9d5c6; background: #f8fcfa; transform: translateY(-1px); }
.metric-button.amber:hover { border-color: #e6d09f; background: #fffaf0; }
.metric span, .metric small { display: block; color: var(--muted); font-size: 12px; }
.metric strong { display: block; overflow: hidden; margin: 9px 0 7px; font-size: 22px; text-overflow: ellipsis; white-space: nowrap; }
.metric small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.today-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.today-stat { min-width: 0; padding: 17px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fbfdfc; }
.today-stat span, .today-stat small { display: block; color: var(--muted); font-size: 12px; }
.today-stat strong { display: block; margin: 8px 0 6px; font-size: 25px; line-height: 1; }
.today-stat.health { background: #eafaf8; border-color: #bee9e4; }
.today-stat.health strong { color: var(--green-dark); }
.today-stat.health.alert { background: #fff4f2; border-color: #efcfca; }
.today-stat.health.alert strong, .today-stat.danger strong { color: var(--danger); }
.today-stat.captcha { background: #fffaf0; border-color: #eadfc9; }
.today-stat.captcha strong { color: #8a5a12; }
.stats-note { margin: 14px 0 0; color: var(--muted); font-size: 12px; }
.panel { position: relative; margin-top: 18px; padding: 29px 30px 31px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255, 255, 255, .96); box-shadow: 0 13px 40px rgba(10, 59, 57, .06); }
.panel::before { position: absolute; top: 0; right: 30px; left: 30px; height: 4px; border-radius: 0 0 8px 8px; background: linear-gradient(90deg, var(--green), #7be4de 72%, transparent); content: ""; opacity: .85; }
.section-heading { display: flex; justify-content: space-between; gap: 24px; align-items: center; margin-bottom: 22px; }
.section-heading > div { display: flex; align-items: center; gap: 12px; }
.section-heading h2 { margin: 0; font-size: 20px; }
.section-heading p { margin: 0; color: var(--muted); font-size: 14px; }
.section-actions { display: flex; gap: 10px; align-items: center; }
.step { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--mint); color: var(--green-dark); font-weight: 800; font-size: 12px; }
.step.amber { background: #fff1d5; color: #9a6414; }
.step.slate { background: #e9eef2; color: #52616c; }
.settings-form { display: grid; gap: 14px; }
.integration-form { gap: 16px; }
.settings-group { display: grid; gap: 11px; padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: #f6fbfa; }
.settings-group > strong { font-size: 13px; }
.settings-group > small { color: var(--muted); font-size: 11px; line-height: 1.55; }
.schedule-settings { background: #f3faf9; }
.switch-row { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.switch-row strong, .switch-row small { display: block; }
.switch-row small { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.switch { position: relative; display: block; flex: 0 0 auto; width: 52px; height: 30px; cursor: pointer; }
.switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.switch-slider { position: absolute; inset: 0; border-radius: 999px; background: #bccbc7; transition: .2s ease; }
.switch-slider::after { position: absolute; top: 4px; left: 4px; width: 22px; height: 22px; border-radius: 50%; background: white; box-shadow: 0 2px 7px rgba(4, 37, 37, .2); content: ""; transition: .2s ease; }
.switch input:checked + .switch-slider { background: var(--green); }
.switch input:checked + .switch-slider::after { transform: translateX(22px); }
.switch input:focus-visible + .switch-slider { box-shadow: 0 0 0 4px rgba(37, 189, 180, .16); }
.check-row { display: flex; gap: 9px; align-items: center; cursor: pointer; }
.check-row input { width: 18px; height: 18px; padding: 0; accent-color: var(--green-dark); }
.check-row span { color: var(--ink); font-size: 12px; font-weight: 700; }
input:disabled { color: #97a39d; cursor: not-allowed; background: #edf2f0; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.search-form { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: end; }
label { display: grid; gap: 8px; }
label > span { color: var(--muted); font-size: 13px; font-weight: 650; }
input, textarea, select { width: 100%; border: 1px solid var(--line); border-radius: 12px; background: #f8fbfa; color: var(--ink); outline: none; transition: .2s ease; }
input { height: 48px; padding: 0 15px; }
select { height: 48px; padding: 0 42px 0 15px; cursor: pointer; }
textarea { min-height: 96px; padding: 13px 15px; resize: vertical; }
.phones-input { min-height: 74px; }
.export-phones-input { min-height: 120px; }
input:focus, textarea:focus, select:focus { border-color: var(--green); box-shadow: 0 0 0 4px rgba(37, 189, 180, .12); background: white; }
button { border: 0; border-radius: 12px; cursor: pointer; transition: transform .15s ease, background .15s ease; }
button:active { transform: translateY(1px); }
.primary { min-height: 48px; padding: 0 22px; background: var(--night); color: #72e8e2; font-weight: 740; box-shadow: 0 8px 20px rgba(7, 28, 29, .12); }
.primary:hover { background: #0b3b3a; color: #8df1ec; }
.primary:disabled { opacity: .55; cursor: wait; }
.compact-primary { min-height: 38px; padding: 0 16px; font-size: 13px; }
.secondary { padding: 9px 13px; border: 1px solid var(--line); background: #f7faf8; color: var(--ink); font-size: 13px; font-weight: 700; }
.secondary:hover { border-color: #83cec8; background: white; color: var(--green-dark); }
.message { min-height: 20px; margin: 12px 0 0; color: var(--muted); font-size: 14px; }
.message.error { color: var(--danger); }
.message.success { color: var(--green); }
.run-now-message:empty { display: none; }
.export-columns { margin: 13px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.export-result { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-top: 18px; padding: 17px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fbfcfb; }
.export-result strong { color: var(--ink); }
.export-result p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.export-actions { display: flex; flex: 0 0 auto; gap: 9px; align-items: center; }
.download-button { display: inline-grid; flex: 0 0 auto; place-items: center; text-decoration: none; }
.lookup-results { display: grid; gap: 10px; margin-top: 14px; }
.lookup-member { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: white; }
.lookup-member.error { border-color: #e8cbc7; }
.lookup-member.membership-expired { border-color: #dc7a70; box-shadow: 0 0 0 2px rgba(169, 67, 59, .08); }
.lookup-member.membership-expired > summary { background: #fff7f6; }
.lookup-member > summary { display: grid; grid-template-columns: minmax(150px, .85fr) 155px minmax(205px, 1fr) minmax(180px, .9fr) 45px; gap: 14px; align-items: center; padding: 15px 17px; cursor: pointer; list-style: none; }
.lookup-member > summary::-webkit-details-marker { display: none; }
.lookup-member > summary::after { content: "展开"; color: var(--muted); font-size: 12px; text-align: right; }
.lookup-member[open] > summary::after { content: "收起"; }
.lookup-identity strong, .lookup-identity span { display: block; }
.lookup-identity strong { font-size: 15px; }
.lookup-identity span { margin-top: 4px; color: var(--muted); font-size: 12px; }
.renewal-status { width: fit-content; padding: 6px 9px; border-radius: 8px; background: #f0f3f1; color: #4f5d56; font-size: 12px; font-weight: 750; }
.renewal-status.yes { background: #e9f5ee; color: var(--green-dark); }
.membership-validity { display: grid; gap: 3px; padding: 8px 10px; border: 1px solid #d9e7e4; border-radius: 10px; background: #f7fbfa; color: var(--muted); font-size: 11px; }
.membership-validity b { color: var(--green-dark); font-size: 14px; }
.membership-validity small { color: var(--muted); font-size: 10px; line-height: 1.35; }
.membership-validity.expired { border-color: #e5aaa4; background: #fff0ee; color: var(--danger); }
.membership-validity.expired b, .membership-validity.expired small { color: var(--danger); }
.membership-validity.unknown { background: #f3f5f4; }
.membership-validity.unknown b { color: var(--muted); }
.lookup-arrival-preview { color: var(--muted); font-size: 12px; }
.lookup-arrival-preview b { display: block; margin-top: 3px; color: var(--ink); font-size: 13px; font-weight: 650; }
.lookup-detail { display: grid; grid-template-columns: 1.45fr 1fr; gap: 22px; padding: 17px; border-top: 1px solid var(--line); background: #fafbfa; }
.lookup-detail h4 { margin: 0 0 10px; font-size: 13px; }
.lookup-records, .lookup-arrivals { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.lookup-records li, .lookup-arrivals li { padding: 9px 10px; border: 1px solid #e3e8e5; border-radius: 9px; background: white; font-size: 12px; line-height: 1.55; }
.lookup-records time { display: block; margin-bottom: 3px; color: var(--muted); font-variant-numeric: tabular-nums; }
.lookup-empty { margin: 0; padding: 12px; border: 1px dashed var(--line); border-radius: 9px; color: var(--muted); font-size: 12px; }
.lookup-error-text { grid-column: 2 / 4; color: var(--danger); font-size: 13px; }
.progress-panel { margin-top: 18px; padding: 17px 18px; border: 1px solid var(--line); border-radius: 14px; background: #f2faf9; }
.progress-track { height: 7px; overflow: hidden; border-radius: 99px; background: #d9ecea; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #58ded7, var(--green-dark)); transition: width .35s ease; }
.progress-header { display: flex; justify-content: space-between; margin-top: 12px; font-size: 14px; }
.progress-header span { color: var(--muted); font-variant-numeric: tabular-nums; }
.progress-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 15px 0 0; padding: 0; list-style: none; }
.progress-steps li { display: flex; align-items: center; gap: 8px; color: #9aa59f; font-size: 13px; transition: color .2s ease; }
.progress-steps li span { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; background: #e8efeb; color: #87928c; font-size: 11px; font-weight: 800; }
.progress-steps li.active { color: var(--green); font-weight: 700; }
.progress-steps li.active span, .progress-steps li.done span { background: var(--green); color: white; }
.progress-steps li.done { color: var(--ink); }
.hidden { display: none; }
.member-card { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--line); }
.batch-member-list { display: grid; gap: 14px; }
.batch-member { padding: 19px; border: 1px solid var(--line); border-radius: 15px; background: #f7fbfa; }
.batch-member-heading { display: flex; gap: 12px; align-items: center; }
.batch-member-heading > span { display: grid; flex: 0 0 auto; width: 30px; height: 30px; place-items: center; border-radius: 9px; background: var(--mint); color: var(--green-dark); font-size: 12px; font-weight: 800; }
.batch-member-heading h3, .batch-member-heading p { margin: 0; }
.batch-member-heading h3 { font-size: 17px; }
.batch-member-heading p { margin-top: 3px; color: var(--muted); font-size: 12px; }
.batch-member-data { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 15px 0; }
.batch-member-data p { margin: 0; padding: 11px 12px; border-radius: 10px; background: white; color: var(--ink); font-size: 12px; line-height: 1.6; }
.batch-member-data p span { display: block; margin-bottom: 3px; color: var(--muted); font-size: 11px; }
.batch-member input { height: 44px; }
.existing-watch-notice { margin: 0 0 14px; padding: 13px 14px; border: 1px solid #e7cf9d; border-radius: 11px; background: #fff9eb; color: #71501b; }
.existing-watch-notice strong, .existing-watch-notice p, .existing-watch-notice small { display: block; }
.existing-watch-notice p { margin: 5px 0 0; font-size: 12px; }
.existing-watch-notice small { margin-top: 7px; color: #8a6a35; font-size: 11px; line-height: 1.5; }
.batch-watch-form { display: flex; justify-content: space-between; gap: 18px; align-items: center; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.batch-watch-form p { margin: 0; color: var(--muted); font-size: 12px; }
.batch-failures { margin-top: 14px; padding: 15px; border: 1px solid #efcfca; border-radius: 13px; background: #fff6f4; color: var(--danger); font-size: 12px; }
.batch-failures p { margin: 7px 0 0; }
.datum { padding: 16px; background: #fbfdfc; }
.datum span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 12px; }
.datum strong { font-size: 15px; word-break: break-all; }
.cards { grid-column: 1 / -1; }
.cards ul { margin: 8px 0 0; padding-left: 19px; line-height: 1.8; }
.arrivals { grid-column: 1 / -1; }
.arrival-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.arrival-time { padding: 8px 10px; border-radius: 9px; background: var(--mint); color: var(--green-dark); font-size: 13px; font-weight: 680; font-variant-numeric: tabular-nums; }
.no-arrival { margin-top: 8px; color: var(--muted); font-size: 14px; }
.watch-form { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: end; margin-top: 18px; }
.watch-list { display: grid; gap: 12px; }
.empty { padding: 32px; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); text-align: center; }
.watch-item { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; padding: 17px 18px; border: 1px solid var(--line); border-radius: 14px; }
.pending-item { border-color: #eadfc9; background: #fffdf8; }
.item-title { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.watch-name { margin: 0 0 5px; font-size: 17px; }
.item-title .watch-name { margin: 0; }
.tag { padding: 4px 8px; border-radius: 999px; font-size: 11px; font-weight: 750; }
.tag.manual { background: var(--mint); color: var(--green-dark); }
.tag.pending { background: #fff0cf; color: #87580f; }
.watch-meta, .watch-reason { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.watch-reason { color: var(--ink); }
.remove { padding: 9px 12px; background: #f8ecea; color: var(--danger); font-size: 13px; font-weight: 700; }
.history-list { display: grid; gap: 9px; }
.history-item { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #fcfdfc; }
.history-item.error { border-color: #edcfcb; }
.history-item.skipped { border-color: #e7ddc7; }
.history-item summary { display: grid; grid-template-columns: 58px 130px minmax(0, 1fr) 58px 34px; gap: 12px; align-items: center; padding: 14px 16px; cursor: pointer; list-style: none; }
.history-item summary::-webkit-details-marker { display: none; }
.history-item summary::after { content: "展开"; grid-column: 5; color: var(--muted); font-size: 12px; }
.history-item[open] summary::after { content: "收起"; }
.history-state { width: fit-content; padding: 4px 8px; border-radius: 999px; background: var(--mint); color: var(--green-dark); font-size: 11px; font-weight: 800; }
.history-item.error .history-state { background: #f8dfdc; color: var(--danger); }
.history-item.skipped .history-state { background: #fff0cf; color: #87580f; }
.history-item time, .history-duration { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.history-item summary strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.history-duration { text-align: right; }
.history-details { padding: 13px 16px 15px; border-top: 1px solid var(--line); background: white; }
.history-details p { margin: 5px 0; color: #53625b; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; line-height: 1.55; word-break: break-word; }
.load-more { display: block; width: 100%; margin-top: 12px; padding: 12px; border: 1px dashed var(--line); background: transparent; color: var(--green); font-weight: 700; }
body.drawer-open { overflow: hidden; }
.drawer-overlay { position: fixed; z-index: 50; inset: 0; display: flex; justify-content: flex-end; background: rgba(2, 25, 26, .46); backdrop-filter: blur(4px); }
.drawer-overlay.hidden { display: none; }
.history-drawer { width: min(900px, 92vw); height: 100%; overflow-y: auto; padding: 30px; background: #f2f8f7; box-shadow: -20px 0 60px rgba(2, 25, 26, .24); }
.drawer-heading { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.drawer-heading h2 { margin: 0; font-size: 30px; }
.drawer-tools { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin: 24px 0 14px; }
.drawer-tools span { color: var(--muted); font-size: 13px; }
.history-drawer .history-list { padding-bottom: 8px; }
.drawer-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 24px 0 18px; padding: 5px; border-radius: 14px; background: #deefed; }
.drawer-tab { padding: 12px 15px; background: transparent; color: var(--muted); font-weight: 700; }
.drawer-tab.active { background: white; color: var(--green-dark); box-shadow: 0 4px 14px rgba(20, 49, 36, .09); }
.drawer-tab strong { display: inline-grid; min-width: 22px; height: 22px; margin-left: 5px; place-items: center; border-radius: 999px; background: var(--mint); color: var(--green-dark); font-size: 11px; }
.tracking-tab-panel { padding-bottom: 20px; }
.daily-history { display: grid; gap: 10px; }
.daily-group { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: white; }
.daily-group > summary { display: grid; grid-template-columns: minmax(190px, .75fr) 1.25fr; gap: 28px; align-items: center; padding: 18px 20px; cursor: pointer; list-style: none; }
.daily-group > summary::-webkit-details-marker { display: none; }
.daily-date { font-size: 17px; white-space: nowrap; }
.daily-numbers { display: flex; justify-content: center; gap: 30px; color: var(--muted); font-size: 14px; }
.daily-numbers span { display: flex; gap: 7px; align-items: baseline; white-space: nowrap; }
.daily-numbers b { color: var(--ink); font-size: 19px; font-variant-numeric: tabular-nums; }
.daily-detail { padding: 14px 17px 17px; border-top: 1px solid var(--line); background: #f1f8f7; }
.daily-stat-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.daily-stat-row span { padding: 6px 9px; border-radius: 8px; background: white; color: var(--muted); font-size: 11px; }
.daily-runs { display: grid; gap: 8px; }
.empty.compact { padding: 18px; }

@media (max-width: 720px) {
  .shell { margin-top: 26px; }
  .hero, .section-heading { align-items: flex-start; flex-direction: column; }
  .hero { min-height: 0; padding: 25px 22px 28px; border-radius: 22px; }
  .hero::after { right: 22px; bottom: 18px; width: 100px; }
  .brand-logo { width: 285px; max-width: 78vw; height: 58px; }
  .brand-logo img { top: -90px; left: -65px; width: 425px; }
  .header-actions { width: 100%; flex-wrap: wrap; justify-content: space-between; }
  .settings-menu { position: fixed; top: 16px; right: 16px; left: 16px; width: auto; max-height: calc(100vh - 32px); overflow: auto; }
  .overview { grid-template-columns: 1fr 1fr; }
  .today-stats { grid-template-columns: 1fr 1fr; }
  .settings-form, .search-form, .watch-form { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .batch-member-data { grid-template-columns: 1fr; }
  .batch-watch-form { align-items: stretch; flex-direction: column; }
  .export-result { align-items: stretch; flex-direction: column; }
  .export-actions { align-items: stretch; flex-direction: column; }
  .lookup-member > summary { grid-template-columns: 1fr auto; }
  .lookup-member > summary::after { grid-column: 2; grid-row: 1; }
  .renewal-status, .membership-validity, .lookup-arrival-preview, .lookup-error-text { grid-column: 1 / -1; }
  .lookup-detail { grid-template-columns: 1fr; }
  .member-card { grid-template-columns: 1fr 1fr; }
  .progress-steps { grid-template-columns: 1fr; }
  .panel { padding: 23px 20px; border-radius: 17px; }
  .panel::before { right: 20px; left: 20px; }
  .history-item summary { grid-template-columns: 52px 1fr 48px; }
  .history-duration { display: none; }
  .history-item summary time { grid-column: 2; }
  .history-item summary strong { grid-column: 1 / -1; grid-row: 2; white-space: normal; }
  .history-item summary::after { grid-column: 3; grid-row: 1; }
  .history-drawer { width: 100%; padding: 22px 16px; }
  .daily-group > summary { grid-template-columns: 1fr; gap: 12px; }
  .daily-numbers { grid-column: 1 / -1; justify-content: flex-start; flex-wrap: wrap; }
}

@media (max-width: 480px) {
  .overview { grid-template-columns: 1fr; }
  .today-stats { grid-template-columns: 1fr; }
  .member-card { grid-template-columns: 1fr; }
  .watch-item { grid-template-columns: 1fr; }
}

.member-store { color: #397d73; font-size: 0.85rem; overflow-wrap: anywhere; }
/* Console password entry */
.login-body { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-panel { width: min(100%, 440px); padding: 32px; }
.login-logo { width: 72px; height: 72px; object-fit: contain; margin-bottom: 18px; }
.login-panel h1 { margin: 8px 0 12px; font-size: 28px; }
.login-panel form { display: grid; gap: 14px; margin-top: 24px; }
.login-panel input { width: 100%; }
.main-nav .nav-logout { margin-left: auto; border: 0; background: transparent; color: inherit; padding: 10px 14px; cursor: pointer; font: inherit; }
