:root {
  font-family:
    -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    sans-serif;
  color: #1c2740;
  background: #f4f6fb;
  font-size: 16px;
  --blue: #3549d7;
  --muted: #738098;
  --line: #e5e9f2;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button {
  cursor: pointer;
  border: 0;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
a {
  color: var(--blue);
  text-decoration: none;
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 28px;
  line-height: 1.4;
  letter-spacing: -0.6px;
}
h2 {
  font-size: 19px;
}
h3 {
  font-size: 16px;
}
p {
  line-height: 1.75;
}
.small {
  font-size: 13px;
  line-height: 1.65;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--muted);
}
.eyebrow span {
  margin: 0 8px;
}
.primary {
  background: var(--blue);
  color: white;
  border-radius: 8px;
  padding: 12px 18px;
}
.secondary {
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 16px;
}
.text-button {
  background: none;
  color: var(--muted);
  padding: 12px 0;
  text-align: left;
  font-size: 14px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: var(--blue);
  color: white;
  border-radius: 12px;
  font-size: 26px;
  font-weight: 800;
}
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  max-width: 1100px;
  margin: auto;
  align-items: center;
  gap: 120px;
  padding: 60px;
}
.login-intro h1 {
  font-size: 44px;
  margin: 24px 0;
  line-height: 1.55;
}
.login-intro > .eyebrow {
  margin-top: 30px;
  color: var(--blue);
}
.login-intro > p:not(.eyebrow) {
  color: #67758d;
}
.login-line {
  height: 3px;
  width: 70px;
  background: #40d3d5;
  margin: 40px 0 16px;
}
.login-card {
  background: white;
  padding: 40px;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 18px 70px #1e36810a;
}
.login-card h2 {
  margin: 12px 0 28px;
  font-size: 24px;
}
label {
  display: block;
  font-size: 14px;
  font-weight: 500;
}
input,
select,
textarea {
  border: 1px solid #dce2ed;
  border-radius: 7px;
  background: white;
  padding: 10px 12px;
  color: #283750;
  min-width: 0;
}
.login-card input {
  display: block;
  width: 100%;
  margin: 9px 0 22px;
  height: 46px;
}
.login-card button {
  width: 100%;
}
.error {
  color: #b83736;
  font-size: 14px;
  margin: 14px 0;
}
.sidebar {
  width: 230px;
  background: #fff;
  border-right: 1px solid var(--line);
  position: fixed;
  inset: 0 auto 0 0;
  padding: 30px 22px;
  display: flex;
  flex-direction: column;
  z-index: 5;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 22px;
  font-weight: 750;
  color: #202b42;
}
.brand-sub {
  display: block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 2px;
  margin-top: 2px;
  color: var(--muted);
}
.store-label {
  font-size: 13px;
  color: #738098;
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
  margin-bottom: 20px;
}
nav {
  display: grid;
  gap: 7px;
}
nav button {
  background: transparent;
  text-align: left;
  padding: 13px 14px;
  color: #65738b;
  border-radius: 9px;
  display: flex;
  gap: 14px;
  font-size: 17px;
  align-items: center;
}
nav button span {
  font-size: 14px;
  font-weight: 550;
}
nav button:hover {
  background: #f5f7fc;
}
nav button.active {
  background: #edf0ff;
  color: var(--blue);
}
.nav-divider {
  height: 1px;
  background: var(--line);
  margin: 18px 0;
}
.sidebar-bottom {
  margin-top: auto;
  display: grid;
  padding-top: 30px;
  color: var(--muted);
}
main {
  margin-left: 230px;
  padding: 34px 40px 20px;
  max-width: 1800px;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}
header h1 {
  margin-top: 10px;
}
.header-right {
  display: flex;
  gap: 10px;
  align-items: center;
}
.status-badge {
  font-size: 12px;
  border: 1px solid #dce5ed;
  padding: 8px 11px;
  border-radius: 20px;
  background: white;
  color: #62758b;
}
.status-badge.warn {
  color: #936519;
  background: #fff7e5;
  border-color: #ecd8a8;
}
.icon-button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 24px;
  color: #748097;
}
.toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}
.segmented {
  background: #e9edf6;
  padding: 4px;
  border-radius: 8px;
  display: flex;
}
.segmented button {
  background: none;
  color: #6a7890;
  padding: 7px 17px;
  font-size: 14px;
  border-radius: 6px;
}
.segmented button.active {
  background: white;
  color: var(--blue);
  box-shadow: 0 2px 5px #1b2a4010;
}
.date-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 14px;
}
.date-controls input {
  max-width: 157px;
  font-size: 14px;
  padding: 8px 10px;
}
.toolbar > .small {
  margin-left: auto;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 22px;
}
.metric {
  padding: 23px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.metric:first-child {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}
.metric-label {
  font-size: 14px;
  color: #6d7a91;
}
.metric:first-child .metric-label,
.metric:first-child .metric-note {
  color: #cbd4ff;
}
.metric-value {
  font-size: 32px;
  font-weight: 700;
  margin: 14px 0 8px;
  letter-spacing: -0.8px;
  font-variant-numeric: tabular-nums;
}
.metric-note {
  font-size: 12px;
  color: var(--muted);
}
.columns {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr);
  gap: 22px;
  margin-bottom: 22px;
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  min-width: 0;
}
.panel-head {
  padding: 23px 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 20px;
}
.panel-head p {
  margin-top: 7px;
}
.panel-body {
  padding: 20px 24px;
}
.legend {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.legend:before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: var(--blue);
  margin-right: 7px;
}
.chart {
  height: 258px;
  display: flex;
  align-items: end;
  gap: 10px;
  padding: 25px 0 23px;
  position: relative;
  border-bottom: 1px solid var(--line);
  background: repeating-linear-gradient(
    to top,
    transparent,
    transparent calc(25% - 1px),
    #edf0f7 calc(25% - 1px),
    #edf0f7 25%
  );
}
.chart-column {
  flex: 1;
  min-width: 4px;
  height: 100%;
  display: flex;
  align-items: end;
  position: relative;
}
.bar {
  width: 100%;
  min-height: 2px;
  max-width: 28px;
  background: #4458df;
  border-radius: 5px 5px 0 0;
  margin: auto;
  position: relative;
}
.bar:hover {
  background: #1aacc2;
}
.chart-label {
  position: absolute;
  bottom: -23px;
  text-align: center;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: #8290a6;
}
.chart-column .tip {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #25314a;
  color: #fff;
  border-radius: 5px;
  padding: 7px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 2;
}
.bar:hover .tip {
  display: block;
}
.rank-row {
  margin: 18px 0;
}
.rank-info {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  gap: 10px;
  margin-bottom: 8px;
}
.track {
  height: 6px;
  background: #f0f2f8;
  border-radius: 4px;
}
.track-fill {
  height: 6px;
  background: #7183ed;
  border-radius: 4px;
}
.question-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.question {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.question .number {
  color: #8b97af;
  font-size: 13px;
  margin-bottom: 14px;
}
.question p {
  font-size: 14px;
  color: #738098;
  margin: 9px 0 15px;
}
.question button {
  font-size: 14px;
  background: none;
  color: var(--blue);
  padding: 0;
}
.notice {
  padding: 14px 18px;
  font-size: 14px;
  background: #f0f4ff;
  border: 1px solid #dfe7ff;
  border-radius: 8px;
  color: #596b91;
  margin-bottom: 22px;
}
.notice.warn {
  background: #fff8e9;
  color: #886322;
  border-color: #eddcb7;
}
.section-tools {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.section-tools input {
  flex: 1;
  min-width: 200px;
}
.tab-row {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.tab-row button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: #6b7790;
  padding: 10px 18px;
  font-size: 14px;
}
.tab-row button.active {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}
.table-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
  text-align: left;
  white-space: nowrap;
}
th {
  font-size: 12px;
  color: #8390a5;
  font-weight: 550;
  background: #f9fafd;
  padding: 14px 20px;
}
td {
  padding: 16px 20px;
  border-top: 1px solid #edf0f5;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
}
td button {
  background: none;
  color: var(--blue);
  font-size: 14px;
  padding: 0;
}
tbody tr:hover {
  background: #fbfcff;
}
.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  color: var(--muted);
  font-size: 14px;
}
.pager button {
  background: #f2f5fb;
  border-radius: 6px;
  padding: 8px 15px;
  color: #596b90;
}
.empty {
  padding: 55px 25px;
  text-align: center;
  color: var(--muted);
  line-height: 1.9;
}
.empty strong {
  display: block;
  color: #42516b;
  margin-bottom: 8px;
}
footer {
  font-size: 12px;
  color: #8d98aa;
  padding: 25px 0 5px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
dialog {
  border: 1px solid var(--line);
  border-radius: 15px;
  max-width: 1000px;
  width: calc(100% - 40px);
  padding: 35px;
  color: #26354f;
  max-height: 90vh;
}
dialog::backdrop {
  background: #17274877;
  backdrop-filter: blur(3px);
}
.close-button {
  position: absolute;
  right: 18px;
  top: 12px;
  font-size: 30px;
  color: #78869c;
  background: none;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 20px 0;
}
.detail-field {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  word-break: break-word;
}
.detail-field span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 5px;
}
.clinical-block {
  white-space: pre-wrap;
  line-height: 1.8;
  padding: 18px;
  background: #f7f9fd;
  border-radius: 8px;
  margin: 12px 0 22px;
}
.note-form {
  display: grid;
  gap: 14px;
}
.note-form input,
.note-form textarea,
.note-form select {
  display: block;
  width: 100%;
  margin-top: 8px;
}
.note-form textarea {
  min-height: 110px;
  resize: vertical;
}
.note-card {
  padding: 24px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 15px;
}
.note-card p {
  color: #718198;
  font-size: 14px;
  margin: 12px 0;
}
.note-card .status-badge {
  float: right;
}
.quality-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}
.quality-grid .metric {
  padding: 20px;
}
.quality-grid .metric:first-child {
  background: #fff;
  color: inherit;
  border-color: var(--line);
}
.quality-grid .metric:first-child .metric-label {
  color: #6d7a91;
}
pre {
  font-size: 13px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #f6f8fd;
  padding: 15px;
  border-radius: 8px;
}
#message {
  padding: 15px;
  border: 1px solid #eddcb7;
  border-radius: 8px;
  background: #fff8e9;
  color: #886322;
  margin-bottom: 20px;
}
@media (min-width: 1500px) {
  main {
    padding: 40px 55px;
  }
  .chart {
    height: 290px;
  }
}
@media (max-width: 1150px) {
  .sidebar {
    width: 195px;
    padding: 25px 15px;
  }
  main {
    margin-left: 195px;
    padding: 25px;
  }
  .columns {
    grid-template-columns: 1.4fr 1fr;
  }
  .metrics {
    gap: 12px;
  }
  .metric {
    padding: 18px;
  }
  .metric-value {
    font-size: 27px;
  }
  .toolbar > .small {
    display: none;
  }
  .header-right .status-badge {
    max-width: 200px;
    line-height: 1.5;
  }
  .question-grid {
    gap: 12px;
  }
}
@media (max-width: 800px) {
  .sidebar {
    position: static;
    width: auto;
    padding: 14px 20px;
    border-bottom: 1px solid var(--line);
    border-right: none;
  }
  .brand {
    font-size: 19px;
  }
  .brand-mark {
    width: 35px;
    height: 35px;
    font-size: 22px;
  }
  .brand-sub,
  .store-label,
  .sidebar-bottom,
  .nav-divider {
    display: none;
  }
  nav {
    display: flex;
    overflow: auto;
    margin-top: 15px;
    gap: 5px;
  }
  nav button {
    white-space: nowrap;
    padding: 10px;
    font-size: 14px;
    gap: 6px;
  }
  main {
    margin: 0;
    padding: 24px 18px;
  }
  .columns {
    grid-template-columns: 1fr;
  }
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .metric-value {
    font-size: 28px;
  }
  .question-grid {
    grid-template-columns: 1fr;
  }
  .header-right .status-badge {
    display: none;
  }
  header h1 {
    font-size: 24px;
  }
  .toolbar {
    gap: 12px;
  }
  .date-controls {
    width: 100%;
    gap: 8px;
  }
  .date-controls input {
    flex: 1;
  }
  .login-page {
    grid-template-columns: 1fr;
    gap: 35px;
    padding: 35px 24px;
    max-width: 500px;
  }
  .login-intro h1 {
    font-size: 32px;
    margin: 12px 0;
  }
  .login-intro .brand-mark,
  .login-intro > p:not(.eyebrow),
  .login-line {
    display: none;
  }
  .login-intro > .eyebrow {
    margin-top: 0;
  }
  .login-card {
    padding: 25px;
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .quality-grid {
    grid-template-columns: 1fr;
  }
  .chart {
    gap: 5px;
  }
  .chart-label {
    font-size: 10px;
  }
  dialog {
    padding: 25px 18px;
  }
}
.store-label select {
  width: 100%;
  border: 1px solid #dce1ec;
  border-radius: 8px;
  padding: 9px;
  color: #243453;
  background: #fff;
  font: inherit;
}
.monthly-tools {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.monthly-tools label {
  display: grid;
  gap: 7px;
  font-size: 12px;
  color: #606e88;
}
.monthly-tools input,
.monthly-tools select {
  background: white;
  border: 1px solid #dce1ec;
  border-radius: 8px;
  padding: 10px;
  font: inherit;
  font-size: 14px;
  height: 42px;
}
.store-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 22px;
}
.store-card {
  padding: 23px 24px;
  background: #fff;
  border: 1px solid #e4e8f1;
  border-radius: 14px;
  box-shadow: 0 4px 14px #23346004;
}
.store-card > strong {
  display: block;
  font-size: 29px;
  letter-spacing: -0.5px;
  margin: 19px 0;
}
.store-card-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #65718a;
  font-size: 12px;
}
.monthly-table {
  min-width: 660px;
  table-layout: fixed;
}
.monthly-table thead th {
  background: #293a63;
  color: #fff;
  padding: 18px;
}
.monthly-table thead th:first-child {
  width: 35%;
}
.monthly-table tbody th {
  font-weight: 450;
  white-space: normal;
}
.monthly-table td {
  font-variant-numeric: tabular-nums;
  white-space: normal;
}
.monthly-table td strong {
  font-size: 17px;
  font-weight: 550;
}
.monthly-table .comparison {
  display: block;
  font-size: 11px;
  color: #8991a3;
  margin-top: 4px;
}
.monthly-table .mismatch {
  background: #fff3d6;
}
.monthly-table .mismatch .comparison {
  color: #916222;
}
.month-group th {
  background: #eef2fb !important;
  padding: 10px 16px !important;
  color: #3549a7 !important;
  font-weight: 600 !important;
}
.doctor-comparison {
  padding: 22px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.doctor-row {
  display: grid;
  gap: 7px;
  padding: 14px 0;
  border-top: 1px solid #e7ebf3;
  font-size: 13px;
}
.formula-list {
  padding: 4px 24px 20px;
}
.formula-list details {
  padding: 16px 0;
  border-bottom: 1px solid #e7ebf3;
}
.formula-list summary {
  cursor: pointer;
  font-weight: 550;
}
.formula-list summary span {
  display: block;
  font-weight: 400;
  font-size: 12px;
  color: #768098;
  margin: 7px 0 0 17px;
  line-height: 1.6;
}
.formula-list details p {
  font-size: 13px;
  line-height: 1.8;
  margin-left: 17px;
}
.source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.source-links a {
  font-size: 11px;
}
.chart {
  overflow-x: auto;
}
@media (max-width: 850px) {
  .store-cards {
    grid-template-columns: 1fr;
  }
  .store-card > strong {
    font-size: 26px;
  }
  .doctor-comparison {
    grid-template-columns: 1fr;
  }
  .monthly-tools {
    gap: 10px;
  }
  .monthly-tools label {
    flex: 1;
  }
  .monthly-tools select {
    max-width: 100%;
    width: 100%;
  }
}
@media (max-width: 800px) {
  .sidebar {
    position: relative;
  }
  .store-label {
    display: block;
    position: absolute;
    right: 20px;
    top: 12px;
    width: 125px;
    padding: 0;
    border: 0;
    margin: 0;
  }
  .store-label select {
    font-size: 13px;
    padding: 8px;
  }
  .sidebar-bottom {
    display: block;
    position: absolute;
    right: 160px;
    top: 4px;
    padding: 0;
  }
  .sidebar-bottom > span {
    display: none;
  }
  .sidebar-bottom button {
    font-size: 12px;
  }
  .monthly-tools label {
    min-width: 180px;
  }
}
@media (max-width: 500px) {
  .monthly-tools {
    display: grid;
    grid-template-columns: 1fr;
  }
  .monthly-tools label {
    width: 100%;
  }
  .monthly-tools input {
    width: 100%;
    min-height: 42px;
  }
  .monthly-tools button,
  .monthly-tools a {
    width: 100%;
    text-align: center;
  }
  .date-controls {
    flex-wrap: wrap;
  }
  .date-controls input {
    max-width: calc(50% - 20px);
  }
  .sidebar-bottom {
    right: 154px;
  }
  .sidebar-bottom button {
    font-size: 11px;
  }
}
