:root {
  --paper: #f2f4f0;
  --white: #fcfdf9;
  --ink: #14161c;
  --muted: #626a70;
  --line: #cfd5ce;
  --blue: #3657f3;
  color-scheme: light;
  color: var(--ink);
  background: var(--paper);
  font-family: "Avenir Next", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: inherit; text-underline-offset: 4px; }
button, input { font: inherit; }
button { cursor: pointer; }
input { min-width: 0; width: 100%; border: 1px solid var(--line); border-radius: 10px; background: var(--white); color: var(--ink); padding: 12px; min-height: 46px; }
input::placeholder { color: var(--muted); opacity: 1; }
button:disabled, input:disabled { cursor: default; opacity: .55; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
label { display: block; font-size: 14px; font-weight: 600; }
h1, h2, p { margin-top: 0; }
h1 { font-weight: 650; letter-spacing: -.055em; line-height: 1.15; }
h2 { font-size: 21px; letter-spacing: -.025em; font-weight: 650; }
.site-header, .page-shell, .site-footer { width: min(1440px, calc(100% - 64px)); margin-inline: auto; }
.site-header { min-height: 90px; display: flex; align-items: center; gap: 28px; border-bottom: 1px solid var(--line); }
.brand { font-size: 27px; font-weight: 850; letter-spacing: -.07em; text-decoration: none; }
.brand span { color: var(--blue); }
.header-label { color: var(--muted); font-size: 14px; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 24px; font-size: 14px; }
.header-actions > a { min-height: 44px; display: inline-flex; align-items: center; }
.button { min-height: 44px; border: 1px solid var(--line); border-radius: 999px; padding: 10px 18px; font-size: 14px; font-weight: 600; line-height: 1.5; }
.button-primary { color: white; background: var(--blue); border-color: var(--blue); }
.button-primary:hover:not(:disabled) { background: var(--ink); border-color: var(--ink); }
.button-quiet { background: transparent; color: var(--ink); }
.button-quiet:hover:not(:disabled) { background: var(--white); border-color: var(--ink); }
.login-layout { min-height: min(740px, calc(100svh - 186px)); display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: clamp(40px, 9vw, 140px); padding-block: 80px; }
.section-label { color: var(--muted); font-size: 14px; margin-bottom: 24px; }
.login-intro h1 { font-size: clamp(36px, 4.7vw, 68px); margin-bottom: 30px; }
.login-intro > p:not(.section-label) { max-width: 510px; font-size: 16px; line-height: 1.85; }
.quiet-note { color: var(--muted); font-size: 13px; line-height: 1.75; }
.login-intro .quiet-note { margin-top: 28px; font-size: 14px; }
.login-form { max-width: 470px; width: 100%; padding: 36px; border: 1px solid var(--line); border-radius: 24px; background: var(--white); }
.login-form h2 { margin-bottom: 30px; }
.login-form label { margin-bottom: 9px; }
.login-form input { margin-bottom: 22px; }
.login-actions { display: flex; gap: 10px; margin-top: 4px; }
.login-actions .button-primary { flex: 1; }
.login-form .quiet-note { margin-bottom: 0; }
.status { min-height: 22px; font-size: 14px; line-height: 1.6; color: var(--muted); overflow-wrap: anywhere; }
.login-form .status { margin-block: 18px; }
.status.is-error { color: var(--ink); border-left: 3px solid var(--blue); padding-left: 12px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding-block: 62px 38px; }
.page-heading h1 { font-size: clamp(36px, 4vw, 56px); margin: 0; }
.page-heading .section-label { margin-bottom: 18px; }
.page-heading > p { font-size: 14px; line-height: 1.8; text-align: right; margin: 0; }
.muted { color: var(--muted); }
.summary { display: grid; grid-template-columns: 1fr 1fr 1.4fr; margin: 0; padding-block: 30px; border-block: 1px solid var(--ink); }
.summary > div { padding-inline: 28px; border-right: 1px solid var(--line); }
.summary > div:first-child { padding-left: 0; }
.summary > div:last-child { border-right: 0; }
.summary dt { font-size: 14px; color: var(--muted); margin-bottom: 16px; }
.summary dd { margin: 0; font-size: clamp(30px, 3.4vw, 48px); font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.25; overflow-wrap: anywhere; }
.summary .last-visit dd { font-size: clamp(18px, 2vw, 28px); line-height: 1.5; }
.scope-label { margin-block: 16px 40px; font-size: 13px; color: var(--muted); line-height: 1.7; overflow-wrap: anywhere; }
.filter-form { background: var(--white); padding: 26px; border: 1px solid var(--line); border-radius: 18px; }
.filter-form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.filter-form legend { padding: 0; font-size: 18px; font-weight: 650; margin-bottom: 22px; }
.filter-grid { display: grid; grid-template-columns: 1.35fr 1fr 1fr 1.1fr 1.1fr; gap: 14px; }
.field label { margin-bottom: 9px; font-size: 13px; }
.filter-grid input { font-size: 14px; }
.filter-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 20px; }
.filter-actions span { color: var(--muted); font-size: 13px; margin-left: 6px; line-height: 1.7; }
.date-help { color: var(--muted); font-size: 12px; line-height: 1.8; margin: 20px 0 0; max-width: 900px; }
.records { margin-top: 46px; }
.records-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.records-heading h2 { margin: 0; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
table { width: 100%; min-width: 1150px; border-collapse: collapse; font-size: 13px; line-height: 1.65; }
th, td { text-align: left; vertical-align: top; padding: 15px 18px; border-bottom: 1px solid var(--line); }
th { background: var(--paper); color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
td { max-width: 270px; overflow-wrap: anywhere; }
td:first-child { min-width: 190px; white-space: nowrap; font-variant-numeric: tabular-nums; }
td:nth-child(2) { min-width: 155px; font-variant-numeric: tabular-nums; }
td:nth-child(3), td:nth-child(4) { min-width: 95px; }
td:nth-child(5), td:nth-child(6), td:nth-child(7) { min-width: 170px; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--paper); }
.empty-cell { text-align: center; padding: 52px 24px; color: var(--muted); white-space: normal !important; }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 20px; }
.pagination p { margin: 0; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.pagination > div { display: flex; gap: 10px; }
.records > .quiet-note { margin-top: 14px; }
.counting-note { border-top: 1px solid var(--line); margin-top: 52px; padding-top: 28px; max-width: 900px; }
.counting-note h2 { font-size: 16px; margin-bottom: 16px; }
.counting-note p { color: var(--muted); font-size: 13px; line-height: 1.8; }
.site-footer { border-top: 1px solid var(--line); min-height: 96px; display: flex; align-items: center; justify-content: space-between; gap: 24px; color: var(--muted); font-size: 12px; margin-top: 56px; }
.skip-link { position: fixed; z-index: 20; top: -100px; left: 20px; padding: 12px 16px; background: var(--ink); color: white; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.no-script { margin: 24px; padding: 20px; border: 1px solid var(--ink); }
@media (max-width: 1050px) {
  .login-layout { gap: 40px; }
  .filter-grid { grid-template-columns: 1fr 1fr; }
  .ip-field { grid-column: 1 / -1; }
  .summary { grid-template-columns: 1fr 1fr 1.3fr; }
  .summary > div { padding-inline: 18px; }
}
@media (max-width: 700px) {
  .site-header, .page-shell, .site-footer { width: calc(100% - 32px); }
  .site-header { min-height: 76px; gap: 14px; flex-wrap: wrap; padding-block: 14px; }
  .header-label { font-size: 12px; }
  .header-actions { gap: 12px; font-size: 12px; }
  .header-actions .button { padding-inline: 12px; font-size: 12px; }
  .login-layout { grid-template-columns: 1fr; padding-block: 42px 10px; gap: 26px; }
  .login-intro h1 { font-size: 42px; }
  .login-intro .quiet-note { margin-top: 16px; }
  .login-form { padding: 26px; max-width: none; }
  .page-heading { padding-block: 38px 28px; align-items: flex-start; }
  .page-heading > p { font-size: 12px; }
  .summary { grid-template-columns: 1fr 1fr; gap: 26px 0; }
  .summary > div:nth-child(2) { border-right: 0; }
  .summary > div:last-child { grid-column: 1 / -1; padding: 22px 0 0; border-top: 1px solid var(--line); }
  .summary dt { font-size: 12px; }
  .summary dd { font-size: 36px; }
  .summary .last-visit dd { font-size: 23px; }
  .filter-form { padding: 20px 16px; }
  .filter-actions span { width: 100%; margin-left: 0; }
  .records-heading { align-items: flex-start; }
  .records-heading .button { padding-inline: 12px; font-size: 12px; }
  .pagination { align-items: flex-start; flex-direction: column; gap: 14px; }
  .pagination > div { align-self: flex-end; }
  .site-footer { min-height: 100px; align-items: flex-start; justify-content: center; flex-direction: column; gap: 12px; }
}
@media (max-width: 380px) {
  .header-label { display: none; }
  .login-intro h1 { font-size: 36px; }
  .login-form { padding: 22px; }
  .filter-grid { grid-template-columns: 1fr; }
  .ip-field { grid-column: auto; }
  .page-heading { flex-direction: column; gap: 18px; }
  .page-heading > p { text-align: left; }
}
