:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  --navy: #0c2340;
  --gold: #f2b500;
  --ink: #102b43;
  --muted: #536575;
  --line: #d7e0e5;
  --canvas: #f5f7f8;
  --width: 1160px;
  color: var(--ink);
  background: var(--canvas);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
:where(button, input, select, a):focus-visible { outline: 3px solid #926b00; outline-offset: 3px; }
h1:focus, h2:focus { outline: none; }
[hidden] { display: none !important; }
.symbols { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
.icon {
  width: 1.2em; height: 1.2em; flex: none; fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.header { background: #fff; border-block: 4px solid var(--gold); border-bottom: 1px solid var(--line); }
.header-inner, .shell { width: min(calc(100% - 80px), var(--width)); margin-inline: auto; }
.header-inner { min-height: 77px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 18px; min-width: 0; color: var(--navy); }
.brand-logo { display: block; flex: none; height: auto; width: 176px; }
.product-name { border-left: 1px solid var(--line); padding-left: 18px; font-size: 13px; font-weight: 700; line-height: 1.35; }
.brand-suffix { font-size: .8em; margin-left: .12em; }
.subtle-button { border: 1px solid #bcc8d0; background: #fff; border-radius: 7px; color: var(--navy); }
.logout { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; min-height: 40px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.subtle-button:hover { background: #f0f3f5; border-color: #8598a8; }
.connection-view { margin: 84px auto; max-width: 540px; text-align: center; color: var(--muted); line-height: 1.8; }
.connection-view h1 { font-size: clamp(22px, 4vw, 30px); color: var(--ink); }
.connection-view .primary { width: auto; padding-inline: 28px; }
.login-layout {
  display: grid; grid-template-columns: 1.08fr 1fr; margin: clamp(36px, 7vh, 80px) auto;
  border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: #fff;
  box-shadow: 0 12px 35px #0c23400b;
}
.intro {
  position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column;
  justify-content: space-between; align-items: flex-start; gap: 30px; min-height: 490px;
  padding: 42px clamp(28px, 3.5vw, 53px); background: var(--navy); color: #fff;
}
.intro-title { font-size: clamp(34px, 4.05vw, 57px); line-height: 1.28; font-weight: 780; letter-spacing: -.045em; margin: 0; }
.intro-copy > p:last-child { max-width: 29em; margin: 16px 0 0; color: #e0e8ed; font-size: 14px; line-height: 1.8; }
.mascot-stage { position: absolute; z-index: -1; right: 0; bottom: 0; width: 100%; height: 100%; overflow: hidden; pointer-events: none; }
.mascot-stage::before {
  content: ""; position: absolute; right: -17%; top: 60%; width: 86%; aspect-ratio: 1;
  background: var(--gold); border-radius: 50%; box-shadow: 0 0 0 9px var(--navy), 0 0 0 10px #d5af4159;
}
.mascot { display: block; position: absolute; right: 7%; bottom: 5%; width: 36%; height: auto; max-height: 49%; object-fit: contain; object-position: right bottom; }
.login-panel { display: grid; align-content: center; padding: 42px clamp(28px, 4.8vw, 74px); }
.form-wrap { width: 100%; max-width: 380px; margin: auto; }
.login-panel h1, #dashboard-title { margin: 0; color: var(--navy); font-weight: 760; letter-spacing: -.02em; }
.login-panel h1 { font-size: 31px; }
.form-hint { margin: 9px 0 23px; font-size: 13px; color: var(--muted); line-height: 1.75; }
#login-form { display: flex; flex-direction: column; align-items: stretch; }
#login-form label, #scope-control label { font-size: 13px; font-weight: 660; color: var(--ink); margin-bottom: 7px; }
label[for=password] { margin-top: 17px; }
#login-form input { background: #fff; color: var(--ink); height: 46px; width: 100%; min-width: 0; border: 1px solid #aab7c0; border-radius: 7px; padding: 8px 12px; font-size: 16px; }
.password-wrap { position: relative; }
#login-form .password-wrap input { padding-right: 46px; }
.eye { display: grid; place-items: center; position: absolute; right: 3px; top: 3px; width: 40px; height: 40px; border: 0; border-radius: 5px; color: #506778; background: transparent; }
.eye:hover { background: #edf1f3; }
.primary, .secondary { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; border-radius: 7px; padding: 10px 18px; font-size: 14px; line-height: 1.5; font-weight: 700; }
.primary { width: 100%; background: var(--gold); color: var(--navy); border: 1px solid var(--gold); }
.primary:hover { background: #ffc224; }
#login-submit { margin-top: 24px; }
.secondary { color: var(--navy); border: 1px solid #fff; background: #fff; }
.secondary:hover { background: #fff4c5; border-color: #fff4c5; }
#demo:focus-visible { outline-color: #ffda54; }
.error { color: #923c41; border-left: 3px solid #b3565d; background: #fff0ef; border-radius: 3px; padding: 10px 12px; line-height: 1.7; font-size: 13px; margin: 14px 0 0; }
#dashboard { padding: 42px 0 68px; }
.overview-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.company-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: #344c61; font-size: 14px; font-weight: 600; }
.company-line > .icon { color: #637488; }
#company { overflow-wrap: anywhere; }
.demo-tag { color: #634800; border: 1px solid #e9ce76; background: #fff2bd; font-size: 10px; font-weight: 650; line-height: 1.6; padding: 2px 8px; border-radius: 4px; }
#dashboard-title { font-size: clamp(33px, 4vw, 45px); line-height: 1.25; margin-top: 10px; }
.sync { margin: 0 0 3px; display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.sync .icon { color: #68798a; }
.pending-sync { display: flex; align-items: flex-start; gap: 15px; margin-top: 27px; padding: 27px; background: #fff; border: 1px solid var(--line); border-radius: 15px; }
.pending-sync > .icon { height: 40px; width: 40px; padding: 9px; color: var(--navy); background: #edf1f4; border-radius: 12px; }
.pending-sync h2 { font-size: clamp(16px, 2.8vw, 21px); margin: 0; line-height: 1.55; }
.pending-sync p { margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.metrics { display: grid; grid-template-columns: 1.08fr 1fr 1fr; margin: 27px 0 28px; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 15px; }
.metric { padding: 25px clamp(22px, 3.5vw, 48px) 24px; min-width: 0; }
.metric:last-child { border-left: 1px solid var(--line); }
.metric-label { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 650; }
.metric-label .icon { width: 31px; height: 31px; padding: 6px; color: #334e66; background: #edf1f4; border-radius: 9px; }
.metric p { display: flex; gap: 8px; align-items: baseline; margin: 10px 0 0; line-height: 1.2; }
.metric strong { font-variant-numeric: tabular-nums; font-size: clamp(34px, 4.5vw, 54px); letter-spacing: -.055em; font-weight: 630; overflow-wrap: anywhere; min-width: 0; }
.metric p > span { font-size: 14px; font-weight: 600; color: var(--muted); }
.metric p:has(.verification-note) { flex-wrap: wrap; gap: 3px 6px; }
.verification-note, .metric p > .verification-note {
  display: block; flex-basis: 100%; margin-top: 3px;
  color: var(--muted); font-size: 12px; font-weight: 500; line-height: 1.5;
}
.metric.total { color: #fff; background: var(--navy); }
.metric.total .icon { background: #213e5c; color: #ffcf44; }
.metric.total p > span { color: #d9e4ec; }
.distribution { border: 1px solid var(--line); border-radius: 15px; background: #fff; overflow: hidden; }
.section-title { margin: 25px 30px 21px; }
.section-title h2 { font-size: 22px; font-weight: 700; line-height: 1.5; margin: 0; }
.section-title p { margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.status-table { table-layout: fixed; width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.status-table th, .status-table td { padding: 12px 16px; text-align: left; }
.status-table thead { background: #f1f4f6; }
.status-table thead th { color: #465b6b; font-size: 12px; font-weight: 650; }
.status-table th:first-child { padding-left: 30px; width: 41%; }
.status-table th:last-child, .status-table td:last-child { padding-right: 30px; width: 19%; text-align: right; }
.status-table tbody tr { border-top: 1px solid #e3e8eb; }
.status-table tbody th { color: #20394d; font-size: 14px; font-weight: 570; overflow-wrap: anywhere; }
.status-table td { font-size: 15px; }
.ratio { display: flex; align-items: center; gap: 11px; }
.ratio span { font-size: 12px; min-width: 41px; color: #4d6273; text-align: right; }
.ratio meter { display: block; width: 67%; height: 7px; flex-shrink: 1; min-width: 0; background: #e5ebef; border: none; border-radius: 7px; appearance: none; }
.ratio meter::-webkit-meter-bar { border: none; background: #e5ebef; border-radius: 7px; height: 7px; }
.ratio meter::-webkit-meter-optimum-value { background: #967200; border-radius: 7px; }
.ratio meter::-moz-meter-bar { background: #967200; border-radius: 7px; }
.count-unit { font-size: 11px; color: #526578; padding-left: 3px; }
.empty { margin: 0; padding: 24px 30px 30px; color: var(--muted); font-size: 14px; }
.scope-bar { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
#scope-control { display: flex; flex-wrap: wrap; align-items: center; gap: 9px 12px; }
#scope-control label { margin: 0; }
#scope-control select { max-width: 100%; height: 38px; border: 1px solid #aab7c0; border-radius: 6px; padding: 5px 11px; background: #fff; color: var(--ink); font: inherit; font-size: 14px; }
#scope-control select:focus-visible { outline: 3px solid #8a6900; outline-offset: 3px; }
.scope-check { display: inline-flex; align-items: center; gap: 7px; padding: 6px 0; cursor: pointer; }
.scope-check input { width: 17px; height: 17px; accent-color: var(--navy); margin: 0; }
#scope-description { color: var(--muted); font-size: 13px; margin: 8px 0 0; }
.scope-bar + .pending-sync, .scope-bar ~ .metrics { margin-top: 16px; }
.agency-section { border: 1px solid var(--line); border-radius: 15px; background: #fff; overflow: hidden; margin-top: 24px; }
.agency-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.agency-table th, .agency-table td { text-align: right; padding: 13px 18px; overflow-wrap: anywhere; }
.agency-table thead { background: #f1f4f6; }
.agency-table thead th { font-size: 12px; font-weight: 650; color: #465b6b; }
.agency-table th:first-child { text-align: left; padding-left: 30px; width: 49%; }
.agency-table td:last-child, .agency-table thead th:last-child { padding-right: 30px; }
.agency-table tbody tr { border-top: 1px solid #e3e8eb; }
.agency-table td { font-size: 15px; }
.agency-name { font-weight: 600; line-height: 1.6; font-size: 14px; }
.agency-relation { color: #334f63; border-radius: 3px; background: #ebf0f4; padding: 2px 5px; font-size: 10px; margin-right: 7px; vertical-align: .12em; white-space: nowrap; }
.agency-detail { font-size: 11px; font-weight: 480; color: #526777; margin-top: 3px; }
.agency-table th[data-indent="1"] { --indent: 15px; }
.agency-table th[data-indent="2"] { --indent: 30px; }
.agency-table th[data-indent="3"] { --indent: 45px; }
.agency-table th[data-indent]:not([data-indent="0"]) { position: relative; padding-left: calc(30px + var(--indent)); }
.agency-table th[data-indent]:not([data-indent="0"])::before { content: ""; position: absolute; left: calc(16px + var(--indent)); top: 18px; height: 8px; width: 7px; border-left: 1px solid #a6b3be; border-bottom: 1px solid #a6b3be; }
.pending-dash { color: #576c7c; }
.mobile-col-label { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 620px) {
  #scope-control { gap: 6px 9px; }
  #scope-control select { width: min(100%, 240px); }
  #scope-description { font-size: 12px; line-height: 1.65; }
  .agency-section { margin-top: 20px; }
  .agency-table, .agency-table tbody { display: block; }
  .agency-table thead { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); }
  .agency-table tbody tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 12px 16px; gap: 7px 0; }
  .agency-table tbody th:first-child { grid-column: 1 / -1; width: auto; padding: 0; }
  .agency-table tbody th[data-indent]:not([data-indent="0"]) { padding-left: var(--indent); }
  .agency-table tbody th[data-indent]:not([data-indent="0"])::before { top: 5px; left: calc(var(--indent) - 13px); }
  .agency-table td, .agency-table td:last-child { padding: 0 4px; text-align: left; }
  .agency-table td { border-left: 2px solid #e1e7eb; }
  .mobile-col-label { display: block; font-size: 10px; color: var(--muted); line-height: 1.6; }
}
#cases-panel:empty { display: none; }
#cases-panel:not(:empty) + .distribution { margin-top: 24px; }
#scope-description { line-height: 1.65; }
.metric.total { box-shadow: inset 0 -4px 0 var(--gold); }
.section-title h2 { color: var(--navy); }
@media (max-width: 870px) {
  .header-inner, .shell { width: calc(100% - 48px); }
  .intro { min-height: 452px; padding: 32px 25px; }
  .intro-copy > p:last-child { font-size: 13px; }
  .desktop-break { display: none; }
  .login-panel { padding-inline: 30px; }
  .mascot { right: 4%; width: 41%; }
  .mascot-stage::before { top: 60%; }
  .metric { padding: 21px 20px; }
}
@media (min-width: 681px) and (max-width: 870px) {
  .intro { justify-content: flex-start; gap: 18px; }
}
@media (max-width: 680px) {
  .header-inner, .shell { width: calc(100% - 32px); }
  .header-inner { min-height: 64px; gap: 8px; }
  .brand { gap: 9px; }
  .brand-logo { width: clamp(100px, 29vw, 150px); }
  .product-name { padding-left: 9px; font-size: 11px; }
  .logout { padding-inline: 7px; font-size: 11px; }
  .login-layout { grid-template-columns: 1fr; margin: 24px auto 32px; border-radius: 15px; }
  .intro { min-height: 208px; padding: 23px; gap: 15px; }
  .intro-copy { width: 68%; }
  .intro-title { font-size: clamp(24px, 4.6vw, 30px); line-height: 1.35; }
  .intro-copy > p:last-child { margin-top: 7px; line-height: 1.55; font-size: 12px; }
  .mascot { width: 26%; max-height: 83%; right: 4%; bottom: 7%; }
  .mascot-stage::before { width: 56%; right: -18%; top: auto; bottom: -50%; }
  .secondary { min-height: 41px; font-size: 12px; padding: 8px 12px; }
  .login-panel { padding: 26px 22px 29px; }
  .login-panel h1 { font-size: 26px; }
  .form-hint { margin: 8px 0 18px; }
  #dashboard { padding-top: 27px; }
  .overview-heading { gap: 12px; }
  .sync { font-size: 11px; }
  .metrics { margin: 20px 0; grid-template-columns: 1fr 1fr; }
  .metric { padding: 15px 19px; }
  .metric.total { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .metric.total p { margin: 0; }
  .metric-label { font-size: 13px; gap: 6px; }
  .metric-label .icon { height: 25px; width: 25px; padding: 4px; }
  .metric p { margin-top: 5px; }
  .metric p > span { font-size: 12px; }
  .pending-sync { padding: 20px 15px; gap: 10px; }
  .section-title { margin: 19px 16px 16px; }
  .section-title h2 { font-size: 18px; }
  .section-title p { font-size: 12px; }
  .status-table th, .status-table td { padding: 11px 4px; }
  .status-table th:first-child { width: 46%; padding-left: 16px; }
  .status-table th:last-child, .status-table td:last-child { padding-right: 16px; width: 20%; }
  .status-table tbody th { font-size: 13px; }
  .ratio { gap: 4px; }
  .ratio span { min-width: 33px; font-size: 10px; }
  .empty { padding: 14px 16px 22px; }
}
@media (max-width: 400px) {
  .header-inner, .shell { width: calc(100% - 24px); }
  .header-inner { min-height: 60px; }
  .brand { flex-direction: column; align-items: flex-start; gap: 3px; }
  .brand-logo { width: 115px; }
  .product-name { padding-left: 0; font-size: 9px; border: 0; }
  .intro { min-height: 206px; padding: 19px 16px; }
  .intro-copy { width: 70%; }
  .login-panel { padding-inline: 17px; }
  .metric { padding-inline: 12px; }
}
@media (max-width: 340px) {
  .ratio meter { display: none; }
  .intro-copy { width: 72%; }
  .intro-title { font-size: 22px; }
}
