:root {
  --ink: #182b49;
  --muted: #68778e;
  --nav: #132641;
  --blue: #285de5;
  --pale: #edf2fc;
  --line: #e2e8f1;
  --bg: #f4f6fa;
  --green: #18775d;
  --amber: #a56c15;
  --red: #b54046;
  --white: #fff;
  font-family:
    -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
a {
  color: var(--blue);
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #80a5ff;
  outline-offset: 2px;
}
button {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 7px;
  padding: 9px 14px;
  color: var(--ink);
  font-weight: 550;
}
button:hover {
  background: var(--pale);
}
button.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
}
button.primary:hover {
  background: #1e4fc9;
}
button.text {
  background: transparent;
  border-color: transparent;
  color: var(--blue);
  padding: 5px 7px;
}
button.danger {
  color: var(--red);
}
.app-shell {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: var(--nav);
  color: #c1cce0;
  padding: 30px 18px;
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  width: 224px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 23px;
  font-weight: 750;
  letter-spacing: -0.7px;
  color: white;
  padding: 0 14px 30px;
}
.brand-icon {
  width: 31px;
  height: 31px;
  border: 2px solid #a8bbeb;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 15px;
  letter-spacing: -2px;
  padding-right: 2px;
}
.sidebar small {
  font-size: 11px;
  color: #8194b3;
  padding: 10px 14px;
}
.nav {
  display: grid;
  gap: 6px;
}
.nav button {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #bac9df;
  font-size: 14px;
  padding: 12px 15px;
  font-weight: 450;
}
.nav button.active {
  background: #294264;
  color: white;
  box-shadow: inset 3px 0 #7da5ff;
}
.nav button:hover {
  background: #223958;
}
.nav svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.6;
  fill: none;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 20px 12px 0;
  border-top: 1px solid #30415c;
  font-size: 12px;
  line-height: 1.9;
}
.sidebar-bottom strong {
  display: block;
  color: white;
  font-size: 13px;
}
.sidebar-bottom button {
  color: #bac9df;
  font-size: 12px;
  background: transparent;
  border: 0;
  padding: 0;
}
.main {
  grid-column: 2;
  min-width: 0;
}
.topbar {
  height: 72px;
  background: white;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 38px;
  font-size: 13px;
}
.crumb {
  color: var(--muted);
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 17px;
}
.local {
  font-size: 11px;
  padding: 5px 9px;
  background: var(--pale);
  border-radius: 5px;
  color: #536b96;
}
.avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  background: #e4ebf8;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 650;
}
.workspace {
  max-width: 1600px;
  margin: auto;
  padding: 35px 38px 44px;
}
.heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 27px;
}
.heading h1 {
  font-size: 27px;
  font-weight: 650;
  letter-spacing: -0.6px;
  margin: 0 0 9px;
}
.heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.date {
  color: var(--muted);
  font-size: 12px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.metric {
  padding: 21px 22px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.metric label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 13px;
}
.metric .num {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: -1px;
}
.metric .hint {
  margin-top: 11px;
  font-size: 11px;
  color: var(--muted);
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
  margin-bottom: 22px;
  overflow: hidden;
}
.panel-head {
  padding: 20px 22px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.panel-head h2 {
  font-size: 15px;
  margin: 0;
  font-weight: 650;
}
.panel-head p {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.pipeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 25px 12px 28px;
}
.step {
  position: relative;
  padding: 0 20px;
  border-right: 1px solid var(--line);
}
.step:last-child {
  border: 0;
}
.step b {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 25px;
  font-weight: 450;
}
.step span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 10px;
}
.step i {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8ea4c8;
  margin-right: 7px;
}
.step:first-child i {
  background: #e0a546;
}
.step:nth-child(4) i {
  background: var(--blue);
}
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr);
  gap: 20px;
}
.task-row {
  padding: 16px 22px;
  display: flex;
  gap: 14px;
  align-items: center;
  border-bottom: 1px solid #edf0f5;
  font-size: 13px;
}
.task-row:last-child {
  border: 0;
}
.task-row .task-count {
  margin-left: auto;
  font-family: monospace;
  background: var(--pale);
  padding: 4px 9px;
  border-radius: 5px;
}
.task-icon {
  width: 31px;
  height: 31px;
  border-radius: 7px;
  background: var(--pale);
  color: var(--blue);
  display: grid;
  place-items: center;
}
.task-row small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 5px;
}
.note {
  padding: 14px 18px;
  font-size: 12px;
  color: #657593;
  background: #f8faff;
  line-height: 1.8;
  border: 1px solid var(--line);
  border-radius: 7px;
  margin-bottom: 20px;
}
.note.amber {
  background: #fffbf3;
  color: #886323;
  border-color: #efdfbb;
}
.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.toolbar input {
  width: 245px;
}
.toolbar .count {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
}
.report-filters {
  align-items: flex-end;
}
.report-filters .field {
  margin: 0;
  min-width: 160px;
}
.report-filters input {
  width: 180px;
}
.money-line {
  display: block;
  white-space: nowrap;
}
.feedback-label {
  color: #886323;
}
.feedback-record {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.feedback-record p {
  white-space: normal;
  overflow-wrap: anywhere;
}
.feedback-record small {
  display: block;
  color: var(--muted);
  margin-top: 6px;
}
.check-list {
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}
.checkbox-choice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 0;
}
.checkbox-choice input {
  width: auto;
  margin-top: 4px;
}
.checkbox-choice small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}
.statement-accounts {
  padding-left: 20px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
input,
select,
textarea {
  border: 1px solid #d9e1ee;
  background: white;
  border-radius: 6px;
  padding: 10px 11px;
  color: var(--ink);
  min-width: 0;
}
input::placeholder,
textarea::placeholder {
  color: #95a1b4;
}
textarea {
  resize: vertical;
  min-height: 90px;
}
.table-wrap {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  font-size: 12px;
  white-space: nowrap;
}
th {
  background: #f9fafd;
  color: var(--muted);
  font-weight: 500;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 17px 18px;
  border-bottom: 1px solid #edf0f5;
  vertical-align: middle;
}
tbody tr:last-child td {
  border: 0;
}
tbody tr:hover {
  background: #fbfcff;
}
td strong {
  font-weight: 550;
}
td small {
  display: block;
  color: var(--muted);
  margin-top: 6px;
  font-size: 11px;
}
.mono {
  font-family: "SFMono-Regular", Consolas, monospace;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  border-radius: 5px;
  padding: 4px 8px;
  background: #eff2f7;
  color: #60718c;
}
.badge.green {
  color: var(--green);
  background: #eaf6f0;
}
.badge.blue {
  color: #285ec4;
  background: #edf2ff;
}
.badge.amber {
  color: var(--amber);
  background: #fff5e4;
}
.badge.red {
  color: var(--red);
  background: #fceff0;
}
.empty {
  text-align: center;
  padding: 55px 24px;
  color: var(--muted);
  font-size: 13px;
  white-space: normal;
}
.empty b {
  display: block;
  font-size: 15px;
  font-weight: 550;
  color: var(--ink);
  margin-bottom: 10px;
}
.empty p {
  line-height: 1.8;
  max-width: 440px;
  margin: 0 auto 18px;
}
.footer {
  font-size: 11px;
  color: #8d99ad;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 25px;
}
.login-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.login-info {
  background: var(--nav);
  color: white;
  padding: 65px 12%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-info .brand {
  padding: 0;
  margin-bottom: 55px;
}
.login-info h1 {
  font-size: 40px;
  line-height: 1.5;
  letter-spacing: -1px;
  font-weight: 550;
  margin: 0 0 22px;
}
.login-info p {
  color: #aebfd7;
  font-size: 14px;
  line-height: 2.1;
  max-width: 390px;
}
.login-form-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.login-form {
  width: 360px;
}
.login-form h2 {
  font-size: 25px;
  font-weight: 600;
}
.login-form > p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
  margin-bottom: 30px;
}
.field {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
  font-size: 13px;
}
.field small {
  color: var(--muted);
  line-height: 1.6;
  font-size: 11px;
}
.field.checkbox {
  display: flex;
  align-items: flex-start;
}
.field.checkbox input {
  margin-top: 3px;
}
.field label {
  font-weight: 500;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.wide {
  width: 100%;
}
.form-error {
  color: var(--red);
  font-size: 12px;
  line-height: 1.8;
  min-height: 22px;
  margin: 10px 0;
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.dialog-heading h2 {
  font-size: 20px;
  margin: 0;
  font-weight: 600;
}
.dialog-sub {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 24px;
}
.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
dialog {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 27px;
  width: min(580px, calc(100% - 32px));
  max-height: 90vh;
  box-shadow: 0 20px 100px #10223c33;
  color: var(--ink);
}
dialog::backdrop {
  background: #10223c66;
  backdrop-filter: blur(2px);
}
dialog pre {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
  font-size: 11px;
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 360px;
  overflow: auto;
}
#toast {
  position: fixed;
  bottom: 27px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: white;
  font-size: 13px;
  padding: 13px 20px;
  border-radius: 8px;
  z-index: 1000;
  max-width: 90vw;
  display: none;
}
.boot {
  padding: 60px;
  color: var(--muted);
}
.code-result {
  width: 100%;
  min-height: 130px;
  font-family: monospace;
  overflow-wrap: anywhere;
}
.mobile-brand {
  display: none;
}
.subtext {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
}
.inline-info {
  padding: 18px 22px;
  font-size: 12px;
  line-height: 1.9;
  color: var(--muted);
}
@media (max-width: 1100px) {
  .workspace {
    padding: 26px 24px;
  }
  .topbar {
    padding: 0 24px;
  }
  .split {
    grid-template-columns: 1fr;
  }
  .metrics {
    gap: 10px;
  }
  .metric {
    padding: 18px 16px;
  }
  .sidebar {
    width: 190px;
  }
  .app-shell {
    grid-template-columns: 190px minmax(0, 1fr);
  }
}
@media (max-width: 760px) {
  .app-shell {
    display: block;
  }
  .sidebar {
    position: static;
    width: 100%;
    padding: 15px 16px;
    display: block;
  }
  .sidebar .brand {
    padding: 0 2px 14px;
    font-size: 20px;
  }
  .sidebar small,
  .sidebar-bottom {
    display: none;
  }
  .nav {
    display: flex;
    overflow: auto;
    gap: 3px;
  }
  .nav button {
    white-space: nowrap;
    padding: 9px 12px;
    font-size: 12px;
  }
  .nav svg {
    display: none;
  }
  .topbar {
    height: 52px;
    padding: 0 18px;
  }
  .workspace {
    padding: 24px 16px;
  }
  .heading {
    gap: 14px;
    flex-direction: column;
  }
  .heading h1 {
    font-size: 24px;
  }
  .metrics {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .metric .num {
    font-size: 27px;
  }
  .pipeline {
    padding: 20px 4px;
    overflow: auto;
  }
  .step {
    padding: 0 10px;
    min-width: 65px;
  }
  .step span {
    font-size: 10px;
  }
  .step b {
    font-size: 21px;
  }
  .panel-head {
    padding: 17px;
  }
  .toolbar {
    padding: 14px;
  }
  .toolbar input {
    width: 100%;
    flex: 1;
    min-width: 120px;
  }
  .toolbar select {
    max-width: 150px;
  }
  .footer {
    flex-direction: column;
  }
  .login-wrap {
    display: block;
  }
  .login-info {
    padding: 24px;
  }
  .login-info .brand {
    margin: 0;
  }
  .login-info h1,
  .login-info p {
    display: none;
  }
  .login-form-wrap {
    padding: 30px 24px;
  }
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}
@media (prefers-reduced-motion: no-preference) {
  button {
    transition: background 0.12s;
  }
  .workspace {
    animation: appear 0.2s ease-out;
  }
  @keyframes appear {
    from {
      opacity: 0.5;
      transform: translateY(4px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}
