:root {
  color-scheme: dark;
  --page: oklch(0.15 0.013 255);
  --panel: oklch(0.185 0.014 255);
  --raised: oklch(0.225 0.017 255);
  --hover: oklch(0.29 0.019 255);
  --line: oklch(0.29 0.019 255 / 0.76);
  --border: oklch(0.34 0.018 252);
  --text: oklch(0.94 0.008 220);
  --secondary: oklch(0.79 0.014 230);
  --muted: oklch(0.72 0.016 235);
  --accent: oklch(0.83 0.135 164);
  --accent-soft: oklch(0.83 0.135 164 / 0.1);
  --warn: oklch(0.79 0.12 82);
  --error: #f29b96;
  font-family: Manrope, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--page);
  color: var(--text);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 23px;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.025em;
}
h2 {
  font-size: 14px;
  font-weight: 600;
}
h3 {
  font-size: 12px;
  font-weight: 500;
}
a {
  color: var(--accent);
}
.muted,
.info,
.empty,
.loading,
.notice,
.metric small {
  color: var(--muted);
  font-size: 12px;
}
.icon {
  width: 17px;
  height: 17px;
  flex: none;
}
.shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100dvh;
}
aside {
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100dvh;
  padding: 24px 14px 14px;
  background: var(--panel);
  border-right: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -0.04em;
}
.brand svg {
  width: 36px;
  height: 36px;
  padding: 5px;
  background: #23202c;
  border: 1px solid #35303f;
  border-radius: 9px;
  color: #c5b1ed;
}
aside .brand {
  padding: 0 9px;
}
nav {
  margin-top: 27px;
  overflow: auto;
}
.nav-group {
  display: grid;
  gap: 4px;
  margin-bottom: 17px;
}
.nav-label {
  padding: 4px 12px;
  font-size: 11px;
  color: var(--muted);
}
nav button,
.logoff {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  background: transparent;
  color: var(--secondary);
  border-radius: 6px;
}
nav button {
  min-height: 39px;
  padding: 8px 12px;
  text-align: left;
  font-size: 13px;
}
nav button:hover,
.logoff:hover {
  background: var(--hover);
  color: var(--text);
}
nav button[aria-current] {
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px oklch(0.83 0.135 164 / 0.12);
}
.profile {
  margin-top: auto;
  padding: 15px 2px 0;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 9px;
}
.avatar {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  background: var(--raised);
  border-radius: 8px;
  font-size: 12px;
}
.identity {
  min-width: 0;
  flex: 1;
}
.identity b {
  font-size: 12px;
  font-weight: 550;
  display: block;
  overflow-wrap: anywhere;
}
.identity small {
  color: var(--muted);
  font-size: 11px;
}
.logoff {
  padding: 8px;
}
.workspace,
.content,
.panel,
.grid > * {
  min-width: 0;
}
.topbar {
  height: 55px;
  padding: 0 clamp(18px, 2.4vw, 36px);
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  background: var(--panel);
  font-size: 12px;
}
.topbar strong {
  font-weight: 500;
  color: var(--secondary);
}
.content {
  width: 100%;
  max-width: 1740px;
  margin: 0 auto;
  padding: 24px clamp(18px, 2.4vw, 36px) 42px;
}
.heading,
.panel-head,
.lineitem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.heading {
  margin-bottom: 18px;
}
.heading p,
.panel-head p {
  margin-top: 5px;
}
input,
select,
.secondary,
.period,
.button {
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--raised);
  padding: 6px 11px;
  font-size: 12px;
}
input,
select {
  min-width: 0;
  background: var(--page);
  max-width: 100%;
}
.primary,
.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.primary {
  background: var(--accent);
  color: var(--page);
  border-color: var(--accent);
  font-weight: 650;
}
.primary:hover {
  filter: brightness(1.08);
}
.secondary:hover,
.period:hover {
  background: var(--hover);
}
.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 16px;
}
.controls label,
.form label {
  display: grid;
  gap: 5px;
  color: var(--secondary);
  font-size: 12px;
}
.controls input,
.controls select {
  width: 147px;
  background: var(--panel);
}
.controls select {
  width: 175px;
}
.periods {
  display: flex;
  margin-left: auto;
  gap: 2px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 7px;
  padding: 2px;
}
.period {
  background: none;
  color: var(--secondary);
  min-height: 28px;
  padding: 3px 10px;
  border: 0;
  border-radius: 4px;
}
.period[aria-pressed="true"] {
  background: var(--accent-soft);
  color: var(--accent);
}
.error-text {
  color: var(--error);
  font-size: 12px;
}
.controls .error-text {
  flex-basis: 100%;
}
.error-text:empty {
  display: none;
}
#result,
.grid {
  display: grid;
  gap: 16px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-block: 1px solid var(--line);
  background: var(--panel);
}
.metric {
  min-width: 0;
  padding: 15px 18px;
}
.metric + .metric {
  border-left: 1px solid var(--line);
}
.metric h3,
.metric small {
  color: var(--muted);
}
.metric strong {
  display: block;
  font:
    600 25px/1.35 "IBM Plex Mono",
    ui-monospace,
    monospace;
  letter-spacing: -0.045em;
  margin: 6px 0 2px;
  overflow-wrap: anywhere;
}
.metric small {
  font-size: 11px;
}
.panel,
dialog,
.notice,
.loading {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.panel-head {
  padding: 14px 18px 12px;
}
.panel-head p {
  overflow-wrap: anywhere;
}
.grid {
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
}
.lineitem {
  margin: 0 18px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.lineitem span {
  color: var(--secondary);
}
.lineitem strong {
  font-weight: 550;
}
.chart {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  column-gap: 8px;
  row-gap: 6px;
  margin: 4px 18px 15px;
  font:
    10px/1.3 "IBM Plex Mono",
    ui-monospace,
    monospace;
  color: var(--muted);
}
.scale,
.axis {
  display: flex;
  justify-content: space-between;
}
.scale {
  flex-direction: column;
  text-align: right;
}
.axis {
  grid-column: 2;
}
.plot {
  height: 118px;
  display: flex;
  align-items: stretch;
  border-block: 1px solid var(--line);
  background: linear-gradient(
    to bottom,
    transparent calc(50% - 0.5px),
    var(--line) 50%,
    transparent calc(50% + 0.5px)
  );
}
.slot {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.bar {
  width: 65%;
  max-width: 37px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(to bottom, var(--accent), #369684);
}
.slot:hover .bar {
  filter: brightness(1.18);
}
.tablewrap {
  overflow: auto;
  border-radius: 0 0 8px 8px;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  white-space: nowrap;
  font-size: 12px;
}
th,
td {
  padding: 9px 18px;
  border-top: 1px solid var(--line);
}
th {
  height: 38px;
  background: var(--page);
  color: var(--muted);
  font-size: 11px;
  font-weight: 550;
}
td {
  height: 46px;
  color: var(--secondary);
}
tbody tr:hover {
  background: var(--raised);
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.status:before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.enabled {
  color: var(--accent);
}
.pending {
  color: var(--warn);
}
.empty,
.loading,
.notice {
  padding: 20px 18px;
}
.notice.error {
  color: var(--error);
  border-color: #563736;
}
.form {
  display: grid;
  gap: 16px;
}
.form input,
.form select {
  width: 100%;
  min-height: 40px;
}
.form .check {
  display: flex;
  align-items: center;
  gap: 8px;
}
.check input {
  min-height: 0;
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
}
dialog {
  width: min(420px, calc(100vw - 32px));
  color: var(--text);
  padding: 24px;
  border-color: var(--border);
}
dialog::backdrop {
  background: #040509bc;
}
.buttons {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.login {
  min-height: 100dvh;
  background:
    radial-gradient(ellipse at 29% 55%, #7961bd0c, transparent 50%), #0a0b10;
  color: #eeeef3;
  --accent: #b7a0ed;
}
.login header {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 26px clamp(24px, 4.5vw, 80px);
}
.login header > span {
  padding-left: 18px;
  border-left: 1px solid #35313d;
  color: #aaa4b9;
  font-size: 12px;
}
.login-layout {
  min-height: calc(100dvh - 100px);
  max-width: 1230px;
  margin: auto;
  padding: 30px clamp(24px, 6vw, 84px) 70px;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
  gap: clamp(42px, 7vw, 110px);
}
.login-art {
  color: #a58acb;
  min-width: 0;
}
.login-art p {
  font:
    normal clamp(48px, 5.7vw, 82px)/0.98 Georgia,
    serif;
  letter-spacing: -0.045em;
  color: #efecf4;
}
.login-art em {
  color: #baa1e6;
}
.login-mark {
  width: min(100%, 420px);
  display: block;
  margin: 0 auto;
}
.login-body {
  width: 100%;
  max-width: 430px;
  padding: 36px;
  border: 1px solid #302d39;
  border-radius: 16px;
  background: linear-gradient(145deg, #17151f, #101117);
}
.login-body input {
  background: #0c0d13;
  border-color: #36313f;
  min-height: 46px;
}
.login-body .primary {
  justify-content: space-between;
  min-height: 46px;
  margin-top: 6px;
  padding-inline: 15px;
}
.login-body .muted {
  margin: -6px 0 8px;
  color: #aaa4b9;
}
@media (max-width: 1080px) {
  .shell {
    grid-template-columns: 194px minmax(0, 1fr);
  }
  .controls select {
    width: 140px;
  }
}
@media (max-width: 850px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .metric:nth-child(odd) {
    border-left: 0;
  }
  .metric:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
}
@media (max-width: 740px) {
  .shell {
    display: block;
  }
  aside {
    position: static;
    display: grid;
    height: auto;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    padding: 12px 16px 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    gap: 12px;
  }
  aside .brand {
    padding: 0;
  }
  .profile {
    grid-row: 1;
    grid-column: 2;
    margin: 0;
    padding: 0;
    border: 0;
    justify-self: end;
  }
  .identity {
    text-align: right;
  }
  .avatar {
    display: none;
  }
  nav {
    grid-column: 1/-1;
    display: flex;
    gap: 4px;
    margin: 0;
    padding-bottom: 6px;
  }
  .nav-group {
    display: contents;
  }
  .nav-label {
    display: none;
  }
  nav button {
    flex: none;
    font-size: 12px;
    min-height: 34px;
    padding: 5px 8px;
    gap: 6px;
  }
  nav .icon {
    width: 14px;
    height: 14px;
  }
  .topbar {
    display: none;
  }
  .content {
    padding: 20px 14px 32px;
  }
  .login-layout {
    display: flex;
    justify-content: center;
    min-height: auto;
    padding: clamp(32px, 9vh, 100px) 20px;
  }
  .login-art {
    display: none;
  }
}
@media (max-width: 520px) {
  .controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
  }
  .controls input,
  .controls select {
    width: 100%;
  }
  .periods {
    margin: 0;
    justify-self: start;
    grid-column: 1/-1;
  }
  .controls .error-text {
    grid-column: 1/-1;
  }
  .metric,
  .panel-head {
    padding: 12px 14px;
  }
  th,
  td {
    padding-inline: 13px;
  }
  .login-body {
    padding: 27px 22px;
  }
  .login-body input {
    font-size: 16px;
  }
  .heading .secondary {
    flex: none;
  }
}
