:root {
  color-scheme: light;
  font-family: "Segoe UI", "Microsoft YaHei UI", "PingFang SC", sans-serif;
  color: #202338;
  background: #f6f7fb;
  font-synthesis: none;
  --ink: #202338;
  --muted: #5e657b;
  --line: #e9ebf3;
  --purple: #5142c6;
  --purple-dark: #4132b1;
  --purple-light: #f0edff;
  --white: #fff;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 320px; font-size: 1rem; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .65; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 3px solid #775ff4;
  outline-offset: 3px;
}
h1, h2, p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }
.container { width: min(1192px, calc(100% - 88px)); margin-inline: auto; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.topbar-inner, .brand, .account, .hero-inner, .panel-heading, .page-actions {
  display: flex;
  align-items: center;
}
.topbar-inner { min-height: 70px; justify-content: space-between; gap: 16px; }
.brand { gap: 12px; width: fit-content; }
.brand-icon {
  display: grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  color: white;
  background: linear-gradient(150deg, #7b67ef, #4936bd);
  box-shadow: 0 4px 10px #5142c633, inset 0 1px #ffffff55;
  font-size: 1.4rem;
}
.brand-name {
  display: block;
  color: #25223b;
  font-size: .95rem;
  font-weight: 800;
  letter-spacing: .025em;
}
.brand-caption { display: block; color: var(--muted); font-size: .75rem; margin-top: 2px; }
.account { gap: 12px; }
.account-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: var(--purple-dark);
  background: var(--purple-light);
  font-size: .875rem;
  font-weight: 700;
}
.account-text { color: var(--muted); font-size: .875rem; }
.text-button {
  padding: 7px 0 7px 12px;
  border: 0;
  border-inline-start: 1px solid var(--line);
  color: var(--muted);
  background: transparent;
  font-size: .875rem;
}
.text-button:hover { color: var(--purple-dark); }
.hero {
  background: linear-gradient(105deg, #f3f2ff 4%, #f7f6ff 48%, #ece9ff 100%);
  border-bottom: 1px solid #e7e4f6;
  isolation: isolate;
  position: relative;
  overflow: hidden;
}
.hero::after {
  position: absolute;
  z-index: -1;
  inset: 0 0 0 55%;
  background: repeating-linear-gradient(134deg, transparent 0 41px, #d9d0ff55 42px 43px, transparent 44px 74px);
  mask-image: linear-gradient(90deg, transparent, black);
  content: "";
}
.hero-inner { min-height: 172px; padding-block: 34px; justify-content: space-between; gap: 16px; }
.hero h1, .login h1 { font-size: clamp(1.65rem, 4.1vw, 2.45rem); font-weight: 780; letter-spacing: -.04em; }
.hero p { color: var(--muted); margin-top: 9px; line-height: 1.55; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  width: fit-content;
  padding: 6px 11px;
  border: 1px solid #dcd6fa;
  border-radius: 7px;
  background: #fff9;
  color: #4d4194;
  font-size: .875rem;
  white-space: nowrap;
}
.badge-dot { width: 7px; height: 7px; border-radius: 50%; background: #7864dd; }
.tabs-surface { border-bottom: 1px solid var(--line); background: #fff; }
.project-tabs { display: flex; gap: 32px; }
.project-tab {
  display: flex;
  position: relative;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 58px;
  padding: 0 5px;
  color: var(--muted);
  white-space: nowrap;
  font-size: .95rem;
  font-weight: 650;
}
.project-tab:hover, .project-tab.is-current { color: var(--purple-dark); }
.project-tab.is-current::after {
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: #6b54e5;
  content: "";
}
.tab-mark {
  width: 11px;
  height: 11px;
  border: 2px solid currentColor;
  border-radius: 3px;
}
.tab-mark.vote { border-radius: 50%; }
.main { padding-block: 28px 46px; }
.overview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.metric, .panel {
  min-width: 0;
  background: #fff;
  border: 1px solid #e5e7f0;
  border-radius: 15px;
  box-shadow: 0 3px 8px #25234e05;
}
.metric { display: flex; align-items: center; gap: 15px; min-height: 109px; padding: 18px 20px; }
.metric-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: #5441c5;
  background: #eeebff;
  font-size: 1.2rem;
  font-weight: 700;
}
.metric-icon.blue { color: #2659a0; background: #eaf2ff; }
.metric-icon.green { color: #1a7159; background: #e5f6ee; }
.metric-label { display: block; color: var(--muted); font-size: .875rem; margin-bottom: 3px; }
.metric-value { display: block; color: var(--ink); font-size: clamp(1.45rem, 3vw, 1.85rem); line-height: 1.05; font-weight: 750; }
.metric-unit { display: inline-block; margin-inline-start: 6px; color: var(--muted); font-size: .875rem; font-weight: 450; }
.panel { overflow: hidden; }
.panel-heading { justify-content: space-between; gap: 14px; padding: 20px 22px; min-height: 86px; }
.panel-heading h2 { font-size: 1.15rem; font-weight: 750; }
.panel-heading p, .detail-note { margin-top: 5px; color: var(--muted); font-size: .875rem; line-height: 1.55; }
.page-actions { gap: 12px; }
.button {
  display: inline-flex;
  min-height: 39px;
  width: fit-content;
  align-items: center;
  justify-content: center;
  padding: 8px 15px;
  border: 1px solid #dedaf1;
  border-radius: 9px;
  color: var(--purple-dark);
  background: #fff;
  white-space: nowrap;
  font-size: .875rem;
  font-weight: 650;
}
.button:hover { border-color: #b7abea; background: #f6f3ff; }
.button.primary { border-color: var(--purple); color: #fff; background: var(--purple); }
.button.primary:hover { background: var(--purple-dark); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
.photo-table { min-width: 700px; }
.vote-table { min-width: 525px; }
thead { background: #f8f8fc; color: #50576f; }
th, td { padding: 12px 22px; border-block-start: 1px solid var(--line); font-size: .9rem; }
thead th { font-weight: 660; white-space: nowrap; }
tbody th, tfoot th { font-weight: 650; }
tbody tr:hover { background: #f9f8ff; }
td.numeric, th.numeric { text-align: right; font-variant-numeric: tabular-nums; }
td.center, th.center { text-align: center; }
tfoot { background: #f1eeff; color: #362c83; }
tfoot td { font-weight: 700; }
.detail-link {
  display: inline-flex;
  min-height: 31px;
  align-items: center;
  justify-content: center;
  padding: 4px 9px;
  border: 1px solid #dfd8f9;
  border-radius: 7px;
  color: var(--purple-dark);
  background: #f6f3ff;
  white-space: nowrap;
  font-size: .85rem;
  font-weight: 630;
}
.detail-link:hover { border-color: #bab0ea; background: #ece6ff; }
.rank {
  display: inline-flex;
  justify-content: center;
  min-width: 30px;
  padding: 3px 7px;
  border-radius: 7px;
  color: #535972;
  background: #f1f2f7;
  font-weight: 720;
}
.rank.first { color: #744800; background: #fff0ce; }
.rank.second { color: #454f76; background: #eaf0ff; }
.rank.third { color: #883d23; background: #f9e9de; }
.detail-main { max-width: 890px; margin-inline: auto; }
.detail-toolbar { margin-bottom: 16px; }
.detail-note { padding: 12px 22px; border-top: 1px solid var(--line); }

.login { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: 30px 20px; background: #f0eff8; }
.login-card {
  display: grid;
  grid-template-columns: .92fr 1fr;
  width: min(100%, 850px);
  min-height: 510px;
  overflow: hidden;
  border: 1px solid #e6e1f6;
  border-radius: 24px;
  box-shadow: 0 24px 66px #30266d19;
}
.login-cover {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 26px;
  isolation: isolate;
  position: relative;
  overflow: hidden;
  padding: 38px;
  color: #fff;
  background: linear-gradient(140deg, #33246c, #5141bf 71%, #6452dc);
}
.login-cover::before, .login-cover::after {
  position: absolute;
  z-index: -1;
  border: 1px solid #ddd0ff59;
  border-radius: 42px;
  transform: rotate(-33deg);
  content: "";
}
.login-cover::before { width: 310px; height: 250px; right: -125px; top: 69px; background: #bdaeff17; }
.login-cover::after { width: 275px; height: 240px; right: -72px; top: 103px; }
.login-cover .brand-name, .login-cover .brand-caption { color: #fff; }
.login-cover .brand-icon { background: #ffffff22; border: 1px solid #ffffff44; box-shadow: none; }
.login-cover h1 { max-width: 8em; line-height: 1.22; }
.login-cover p { margin-top: 12px; color: #eeebff; line-height: 1.65; }
.login-cover .badge { background: #ffffff18; border-color: #ffffff4d; color: #fff; }
.login-cover .badge-dot { background: #ddcfff; }
.login-form-panel { display: grid; align-items: center; background: #fff; padding: 42px; }
.login-form h2 { font-size: 1.65rem; letter-spacing: -.025em; }
.login-form label { display: block; margin: 20px 0 7px; font-size: .9rem; font-weight: 650; }
.login-form input {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid #dce0ec;
  border-radius: 9px;
  color: var(--ink);
  background: #fcfcfe;
}
.login-form input::placeholder { color: #71778c; }
.login-form .button { min-height: 44px; width: 100%; margin-top: 18px; }
.login-hint { margin-top: 17px; color: var(--muted); font-size: .875rem; line-height: 1.65; }
.login-error { margin-top: 10px; color: #a4233c; font-size: .875rem; }
.connection-panel { width: min(100%, 480px); padding: 28px; }
.connection-panel h1 { margin-top: 20px; font-size: 1.5rem; }
.connection-panel p { margin-top: 9px; color: var(--muted); line-height: 1.65; }
.connection-panel .button { margin-top: 18px; }
.status-message {
  margin-bottom: 16px;
  padding: 12px 15px;
  border: 1px solid #f0c8d1;
  border-radius: 9px;
  color: #a4233c;
  background: #fff5f7;
}
.empty-state { padding: 28px 22px; border-top: 1px solid var(--line); color: var(--muted); }

@media (max-width: 780px) {
  .container { width: calc(100% - 40px); }
  .overview { gap: 10px; }
  .metric { padding: 14px 11px; gap: 9px; }
  .metric-icon { width: 32px; height: 32px; font-size: .98rem; border-radius: 9px; }
  .login-cover, .login-form-panel { padding: 30px; }
}
@media (max-width: 540px) {
  .container { width: calc(100% - 28px); }
  .account-text, .account-avatar { display: none; }
  .hero-inner { align-items: flex-start; flex-direction: column; padding-block: 23px; gap: 10px; min-height: auto; }
  .hero p { font-size: .875rem; }
  .project-tabs { gap: 22px; }
  .project-tab { min-height: 50px; font-size: .875rem; }
  .main { padding-block: 16px 32px; }
  .metric { min-height: 80px; padding: 11px 8px; }
  .metric-icon { display: none; }
  .metric-label { font-size: .875rem; }
  .metric-unit { margin-inline-start: 3px; }
  .overview { margin-bottom: 15px; }
  .panel-heading { min-height: 70px; padding: 14px; flex-wrap: wrap; }
  th, td { padding-inline: 14px; }
  .login-card { display: block; }
  .login-cover { gap: 18px; }
  .login-cover, .login-form-panel { padding: 24px; }
  .login-cover h1 { max-width: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .button, .detail-link { transition: background-color 150ms, border-color 150ms; }
}
