:root {
  --ink: #183d3d;
  --muted: #798782;
  --line: #e3e9e5;
  --paper: #f5f7f4;
  --green: #235f52;
  --amber: #a46a24;
  --red: #b44236;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: Inter, "Microsoft YaHei", "PingFang SC", sans-serif;
  color: #263934;
  background: var(--paper);
  font-size: 14px;
}
button,
input,
textarea {
  font: inherit;
}
button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--green);
  border-radius: 7px;
  background: var(--green);
  padding: 10px 16px;
  color: white;
  text-decoration: none;
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
}
button:hover,
.button:hover {
  filter: brightness(0.94);
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.secondary {
  background: #fff;
  color: var(--ink);
  border-color: #d4ded7;
}
.hidden {
  display: none !important;
}
.muted {
  color: var(--muted);
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 30px;
  font-weight: 650;
  letter-spacing: -1px;
  margin-bottom: 12px;
}
h3 {
  font-size: 15px;
  margin-bottom: 8px;
}
small,
.footnote {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.eyebrow {
  display: block;
  letter-spacing: 2px;
  font-size: 10px;
  font-weight: 700;
  color: #698277;
  margin-bottom: 12px;
}
.login-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}
.login-story {
  background: #163d36;
  color: #f4f3e6;
  padding: 58px 60px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.login-story:after {
  content: "";
  position: absolute;
  right: -180px;
  bottom: -250px;
  width: 600px;
  height: 600px;
  border: 1px solid #45665b;
  border-radius: 50%;
  box-shadow:
    0 0 0 75px #24483e,
    0 0 0 76px #45665b;
  opacity: 0.35;
  pointer-events: none;
}
.wordmark {
  font-weight: 600;
  letter-spacing: 1px;
}
.login-story h1 {
  margin-top: 120px;
  font-size: 48px;
  line-height: 1.45;
  letter-spacing: 0;
}
.login-story p {
  color: #b4c6bc;
  line-height: 1.8;
}
.story-bottom {
  margin-top: auto;
  font-size: 10px;
  letter-spacing: 2px;
  z-index: 1;
}
.story-bottom span {
  display: block;
  margin-top: 10px;
  font-size: 11px;
  letter-spacing: 0;
}
.login-form {
  align-self: center;
  width: 360px;
  max-width: 85%;
  margin: 60px auto;
}
.login-form h2 {
  font-size: 28px;
  margin-bottom: 12px;
}
.login-form .muted {
  margin-bottom: 35px;
}
.login-form label {
  display: block;
  font-size: 13px;
  margin: 20px 0 8px;
  font-weight: 500;
}
input,
textarea {
  display: block;
  width: 100%;
  background: #fff;
  border: 1px solid #ccd7ce;
  border-radius: 6px;
  padding: 12px;
  margin-top: 10px;
  outline: none;
}
input:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px #235f5215;
}
.login-form button {
  width: 100%;
  margin-top: 20px;
}
.error-text {
  color: var(--red);
  margin-top: 16px;
  line-height: 1.6;
}
.workspace {
  display: grid;
  grid-template-columns: 218px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 28px 18px;
  display: flex;
  flex-direction: column;
  position: fixed;
  width: 218px;
  height: 100vh;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  margin: 4px 10px 52px;
  font-size: 17px;
  font-weight: 700;
}
.brand b {
  display: grid;
  place-items: center;
  width: 35px;
  height: 40px;
  background: var(--ink);
  color: white;
  border-radius: 8px;
  font-size: 24px;
  font-family: Georgia, serif;
}
.brand small {
  display: block;
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 2px;
}
.nav-label {
  font-size: 10px;
  color: #95a29a;
  margin: 0 15px 16px;
  letter-spacing: 2px;
}
.nav-button {
  width: 100%;
  justify-content: flex-start;
  background: none;
  color: #74827a;
  border: none;
  padding: 13px 16px;
  margin-bottom: 7px;
  font-size: 15px;
  gap: 13px;
  font-weight: 400;
}
.nav-button.active {
  color: #1e5d4f;
  background: #eaf0e9;
  font-weight: 600;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 20px 12px 0;
  font-size: 11px;
  color: #6d8076;
  border-top: 1px solid var(--line);
}
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #458366;
  margin-right: 6px;
}
.sidebar-bottom p {
  margin-top: 9px;
  font-size: 10px;
}
.text-button {
  color: #668174;
  border: 0;
  background: none;
  padding: 0;
  font-size: 12px;
}
.badge {
  font-size: 10px;
  border-radius: 4px;
  background: #e6e5d5;
  padding: 2px 5px;
  margin-left: auto;
}
.workspace main {
  grid-column: 2;
  min-width: 0;
}
.topbar {
  height: 66px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 36px;
  background: #fff;
  font-size: 12px;
  color: #87958c;
}
.main-content {
  padding: 34px 36px;
  max-width: 1600px;
  margin: auto;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 28px;
}
.page-heading p {
  font-size: 13px;
  margin-bottom: 0;
}
.mode-control {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}
.mode-control span {
  background: #e8eee6;
  padding: 7px 10px;
  border-radius: 5px;
  color: #496553;
}
.mode-control button {
  font-size: 12px;
  padding: 8px 10px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.metrics article {
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 19px 22px;
}
.metrics span {
  display: block;
  color: #65776b;
  font-size: 12px;
}
.metrics strong {
  display: block;
  font-size: 32px;
  font-weight: 600;
  margin: 13px 0 8px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.metrics small {
  font-size: 10px;
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
  margin-bottom: 22px;
  overflow: hidden;
}
.upload-panel {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px;
  background: #fdfefd;
  border-style: dashed;
  border-color: #bbcdbf;
}
.upload-symbol {
  background: #eaf0e7;
  border-radius: 9px;
  width: 46px;
  height: 48px;
  display: grid;
  place-items: center;
  font-size: 27px;
  color: #6b8b74;
  flex-shrink: 0;
}
.upload-panel div:nth-child(2) {
  flex: 1;
}
.upload-panel p {
  font-size: 12px;
  color: #7b897e;
  margin-bottom: 4px;
}
.upload-panel small {
  font-size: 10px;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  padding: 0;
  border: 0;
}
.panel-heading {
  padding: 21px 22px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.panel-heading h3 {
  margin-bottom: 7px;
}
.panel-heading span {
  font-size: 11px;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.actions button,
.actions .button {
  font-size: 11px;
  padding: 9px 11px;
}
.table-scroll {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
th {
  padding: 13px 20px;
  background: #f8faf7;
  color: #7b8a7e;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}
td {
  padding: 21px 20px;
  vertical-align: top;
  border-top: 1px solid #edf0eb;
  font-size: 12px;
  min-width: 140px;
  line-height: 1.8;
}
td pre {
  font: inherit;
  white-space: pre-wrap;
  margin: 0;
  color: #57695d;
  line-height: 1.85;
  min-width: 205px;
}
td strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  margin-bottom: 8px;
}
td small {
  display: block;
  font-size: 10px;
  overflow-wrap: anywhere;
  max-width: 300px;
}
.tag {
  display: inline-block;
  font-size: 10px;
  color: #42755a;
  background: #edf3e9;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
}
.tag.warn {
  color: var(--amber);
  background: #faf1df;
}
.tag.error {
  color: var(--red);
  background: #fbece7;
}
.tag.muted {
  color: #879387;
  background: #f1f3ef;
}
.empty {
  text-align: center;
  padding: 60px 25px;
  color: #88968a;
  font-size: 13px;
}
.notice {
  padding: 13px 16px;
  border: 1px solid #d4dfcf;
  border-radius: 7px;
  background: #edf4e6;
  margin-bottom: 22px;
  color: #487046;
  line-height: 1.6;
}
.notice.error {
  border-color: #e9cec3;
  background: #fff0eb;
  color: var(--red);
}
.footnote {
  margin-top: 10px;
}
.command-help {
  padding: 25px;
}
.command-help p,
.command-help li {
  color: #617968;
  font-size: 12px;
  line-height: 1.8;
}
.command-help li {
  margin-bottom: 8px;
}
td button {
  padding: 5px 9px;
  font-size: 11px;
}
td a {
  color: var(--green);
}
@media (min-width: 1500px) {
  .main-content {
    padding-top: 45px;
  }
}
@media (max-width: 1050px) {
  .workspace {
    grid-template-columns: 180px 1fr;
  }
  .sidebar {
    width: 180px;
  }
  .main-content {
    padding: 26px 20px;
  }
  .metrics {
    gap: 10px;
  }
  .metrics article {
    padding: 16px;
  }
  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .page-heading {
    align-items: flex-start;
  }
  .mode-control {
    flex-direction: column;
    align-items: flex-end;
  }
  .login-story {
    padding: 40px;
  }
  .login-story h1 {
    font-size: 38px;
  }
}
@media (max-width: 700px) {
  .workspace {
    display: block;
  }
  .sidebar {
    position: static;
    width: auto;
    height: auto;
    padding: 14px;
  }
  .brand {
    margin: 0 0 16px;
  }
  .sidebar nav {
    display: flex;
    overflow: auto;
  }
  .nav-button {
    white-space: nowrap;
    width: auto;
    font-size: 12px;
    padding: 10px;
    gap: 6px;
  }
  .nav-label,
  .sidebar-bottom {
    display: none;
  }
  .workspace main {
    width: 100%;
  }
  .topbar {
    padding: 0 20px;
    height: 48px;
  }
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .page-heading {
    gap: 10px;
  }
  h1 {
    font-size: 25px;
  }
  .upload-panel {
    flex-wrap: wrap;
    padding: 16px;
  }
  .upload-panel div:nth-child(2) {
    min-width: 180px;
  }
  .actions {
    gap: 6px;
  }
  .login-wrap {
    grid-template-columns: 1fr;
  }
  .login-story {
    min-height: 250px;
    padding: 28px;
  }
  .login-story h1 {
    font-size: 30px;
    margin-top: 30px;
  }
  .story-bottom {
    display: none;
  }
  .login-form {
    margin: 45px auto;
  }
  .main-content {
    padding: 24px 14px;
  }
}
.group-search {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 20px 24px;
  margin: 0;
  background: #fafcf9;
  border-bottom: 1px solid #edf1eb;
}
.group-search label { margin: 0; font-weight: 600; }
.group-search input { flex: 1; min-width: 230px; max-width: 540px; margin: 0; }
.group-search .muted { font-size: 13px; }

.help-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin: 0 0 24px;
}
.help-link {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--primary, #256355);
  font: inherit;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}
.help-link:hover { background: transparent; color: #183f37; }
.help-dialog {
  box-sizing: border-box;
  width: min(800px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  padding: 32px;
  border: 1px solid #dce5e1;
  border-radius: 16px;
  color: inherit;
  background: #fff;
  box-shadow: 0 24px 80px #183f3733;
  overflow-y: auto;
}
.help-dialog::backdrop { background: #142e2966; }
.help-dialog h2 { margin: 0 36px 24px 0; font-size: 22px; }
.help-dialog code { white-space: normal; overflow-wrap: anywhere; }
.help-close {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 4px 10px;
  background: transparent;
  color: inherit;
  border: 0;
  font-size: 26px;
  line-height: 1;
}
