* {
  box-sizing: border-box;
}

:root {
  --ink: #202b26;
  --pine: #152c29;
  --nav: #122620;
  --green: #266747;
  --paper: #f6f5ee;
  --line: #dadcd0;
  --muted: #5c6860;
  --red: #a33d29;
  --white: #fffefa;
  font-family: "Source Sans 3","Microsoft YaHei","PingFang SC",sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 15px;
}

[hidden] {
  display: none!important;
}

body {
  margin: 0;
}

button,input,select,textarea {
  font: inherit;
}

button {
  color: var(--ink);
  cursor: pointer;
  background: var(--white);
  border: 1px solid #bfc7bb;
  padding: .55rem .9rem;
  border-radius: 5px;
  font-weight: 600;
}

button:hover {
  border-color: #597261;
  background: #f0f3ea;
}

button:disabled {
  opacity: .6;
  cursor: wait;
}

button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible {
  outline: 3px solid #b48736;
  outline-offset: 2px;
}

button.primary {
  background: var(--red);
  border-color: var(--red);
  color: white;
}

button.primary:hover {
  background: #803322;
}

body,h1,h2,h3,p {
  margin: 0;
}

h1,h2,.brand {
  font-family: Georgia,"Noto Serif SC","Songti SC","SimSun",serif;
}

h1 {
  font-size: clamp(31px,3vw,45px);
  letter-spacing: .055em;
  line-height: 1.24;
}

h2 {
  font-size: 22px;
}

h3 {
  font-size: 16px;
}

.shell {
  display: grid;
  grid-template-columns: 215px minmax(0,1fr);
  min-height: 100vh;
}

aside,.login-art {
  background: var(--nav);
  color: #f7f3df;
}

aside {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 30px 16px 17px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 26px;
  font-weight: bold;
  letter-spacing: .08em;
}

.brand small,.identity small {
  display: block;
  font: 12px/1.8 "Microsoft YaHei",sans-serif;
  color: #b8c4b7;
  letter-spacing: .08em;
}

.seal {
  font-size: 27px;
  line-height: 40px;
  width: 40px;
  text-align: center;
  background: #aa4532;
  color: #fff4d8;
  border: 1px solid #d88160;
  box-shadow: inset 0 0 0 3px #a33d29,inset 0 0 0 4px #dc9d76;
  transform: rotate(-4deg);
  flex: none;
}

.brand {
  padding: 0 8px;
}

nav {
  overflow: auto;
  margin: 32px 0 16px;
}

nav small {
  display: block;
  font-size: 11px;
  letter-spacing: .15em;
  color: #afbeae;
  margin: 20px 13px 7px;
}

nav small:first-child {
  margin-top: 0;
}

nav button {
  width: 100%;
  border: none;
  background: transparent;
  color: #d7e0d4;
  text-align: left;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
}

nav button:before {
  content: "";
  width: 6px;
  height: 6px;
  border: 1px solid #8b9f8a;
  transform: rotate(45deg);
}

nav button[aria-current=page] {
  color: #fff5d9;
  background: #304b3c;
  font-weight: 700;
}

nav button[aria-current=page]:before {
  background: #d9ba78;
  border-color: #d9ba78;
}

aside button:hover {
  background: #284234;
  color: white;
}

.identity {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #394a3e;
  padding: 14px 5px 0;
  gap: 4px;
  overflow-wrap: anywhere;
}

.identity button,#menu-btn {
  background: transparent;
  border-color: #4c5e50;
  color: #e1e6d8;
  font-size: 13px;
  flex: none;
}

#menu-btn {
  display: none;
}

.work,.workspace {
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 12px clamp(18px,4vw,60px);
  background: var(--white);
  font-size: 13px;
  color: var(--muted);
  min-height: 61px;
}

.topbar label,.actions,.tools {
  display: flex;
  gap: 9px;
  align-items: center;
}

.topbar select {
  width: auto;
  min-width: 100px;
}

.workspace {
  max-width: 1600px;
  margin: 0 auto;
  padding: 30px clamp(18px,4vw,60px) 46px;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 25px;
}

.eyebrow {
  display: block;
  color: #7e5931;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .19em;
  margin-bottom: 8px;
}

.panel,.stat,.zone-card {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 8px;
}

.panel {
  margin-bottom: 18px;
  overflow: hidden;
}

.panel-head {
  padding: 18px 20px 12px;
}

.panel-body {
  padding: 7px 20px 20px;
}

.stats,.zone-grid,.columns,.form-grid {
  display: grid;
  gap: 14px;
}

.stats {
  grid-template-columns: repeat(3,minmax(0,1fr));
  margin-bottom: 20px;
}

.stat {
  padding: 17px 19px;
}

.stat strong {
  display: block;
  font: 600 clamp(27px,3.5vw,44px)/1.28 Georgia,serif;
  font-variant-numeric: tabular-nums;
}

.stat span,.muted,.hint {
  color: var(--muted);
  font-size: 13px;
}

.section-head {
  margin: 24px 0 12px;
}

.zone-grid,.columns {
  grid-template-columns: repeat(auto-fit,minmax(min(100%,300px),1fr));
}

.zone-card {
  overflow: hidden;
  position: relative;
  padding: 19px 20px 16px;
  border-top: 3px solid #70846c;
}

.zone-card header,.rowline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 9px;
}

.zone-card dl,.summary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 7px 14px;
  margin: 14px 0;
}

.zone-card dt,.summary dt {
  color: var(--muted);
}

dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.zone-card dd {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.trend {
  display: flex;
  align-items: end;
  gap: 3px;
  height: 38px;
  margin: 9px 0 5px;
  border-bottom: 1px solid var(--line);
}

.trend i {
  display: block;
  flex: 1;
  max-width: 28px;
  background: #849b7d;
  min-height: 2px;
}

.trend i.down {
  background: #c87455;
}

.badge {
  display: inline-block;
  white-space: nowrap;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 20px;
  background: #e8eae3;
  color: #535e55;
}

.ok {
  background: #e2eedf;
  color: #275d34;
}

.warn {
  background: #f6ebd2;
  color: #795510;
}

.bad {
  background: #f6e0da;
  color: #923b2c;
}

.table-scroll {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
  font-size: 14px;
}

th,td {
  text-align: left;
  padding: 11px 16px;
  border-bottom: 1px solid #e5e7dd;
}

th {
  font-size: 12px;
  color: var(--muted);
  background: #f2f3eb;
}

tbody tr:last-child td {
  border: 0;
}

td button {
  font-size: 12px;
  padding: 4px 8px;
}

td.wrap {
  white-space: normal;
  overflow-wrap: anywhere;
  min-width: 145px;
  max-width: 360px;
}

.empty,.busy {
  padding: 22px;
  color: var(--muted);
  font-size: 14px;
}

#feedback>div,.notice {
  border: 1px solid #b9c9b7;
  background: #edf3e8;
  padding: 13px 16px;
  border-radius: 5px;
  margin-bottom: 15px;
  overflow-wrap: anywhere;
}

.error {
  color: #923b2c;
}

.error:not(:empty) {
  background: #fae7df;
  padding: 10px;
  border-radius: 4px;
}

.notice button,#feedback button {
  margin-left: 8px;
  font-size: 13px;
}

.summary dt {
  font-size: 13px;
}

pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 13px/1.6 Consolas,monospace;
  margin: 8px 0 0;
}

.tools,.actions {
  flex-wrap: wrap;
}

.tools {
  margin-bottom: 16px;
}

.tools input {
  width: min(100%,320px);
}

label.field,.login-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}

input:not([type=checkbox]),select,textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #bfc6b9;
  border-radius: 4px;
  background: #fffefa;
  color: var(--ink);
  padding: 8px 10px;
}

textarea {
  min-height: 80px;
  resize: vertical;
}

.form-grid {
  grid-template-columns: repeat(2,minmax(0,1fr));
  margin: 13px 0 17px;
}

.wide {
  grid-column: 1/-1;
}

.check {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-size: 14px;
  margin: 5px 12px 4px 0;
}

.check input {
  accent-color: var(--green);
}

fieldset {
  border: 1px solid var(--line);
  border-radius: 5px;
  margin: 13px 0;
  padding: 9px 12px;
}

legend {
  font-size: 13px;
  color: var(--muted);
}

details {
  margin: 8px 0;
}

summary {
  cursor: pointer;
}

.split {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.hint {
  line-height: 1.7;
  margin: 5px 0;
}

dialog {
  border: 1px solid #bbc5b8;
  border-radius: 9px;
  width: min(460px,92vw);
  padding: 24px;
  background: var(--white);
  color: var(--ink);
}

dialog::backdrop {
  background: #12262088;
}

dialog .actions {
  justify-content: flex-end;
  margin-top: 22px;
}

.login {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

.login-art {
  position: relative;
  overflow: hidden;
  padding: 7vw;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.login-art .brand {
  position: relative;
  z-index: 1;
  padding: 0;
}

.login-title {
  position: relative;
  z-index: 1;
  margin: 80px 0 35px;
}

.login-title small {
  color: #c3c9ac;
  letter-spacing: .2em;
}

.login-title h1 {
  font-size: clamp(42px,6vw,84px);
  margin-top: 15px;
  line-height: 1.25;
}

.contours {
  position: absolute;
  inset: 0;
  background: repeating-radial-gradient(ellipse at 117% 98%,transparent 0 27px,#81937635 28px 29px,transparent 30px 39px);
  pointer-events: none;
}

.login-main {
  display: grid;
  place-items: center;
  padding: 32px;
}

.login-form {
  width: min(100%,360px);
}

.login-form h2 {
  font-size: 32px;
  margin: 0 0 25px;
}

.login-form label {
  margin: 17px 0;
}

.login-form input {
  padding: 12px;
}

.login-form button {
  width: 100%;
  margin-top: 10px;
}

#startup {
  padding: 15vh 8vw;
}

@media(max-width:800px) {
  .shell {
    grid-template-columns: 166px minmax(0,1fr);
  }
  aside {
    padding: 20px 10px;
  }
  .workspace {
    padding: 23px 16px 32px;
  }
  .stats {
    gap: 8px;
  }
  .stat {
    padding: 13px;
  }
  .topbar {
    padding: 10px 16px;
  }
}

@media(max-width:620px) {
  .shell,.login {
    display: block;
  }
  aside {
    position: relative;
    height: auto;
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
  }
  .brand {
    font-size: 20px;
    padding: 0;
  }
  .brand small {
    font-size: 10px;
  }
  .seal {
    width: 34px;
    line-height: 34px;
    font-size: 23px;
  }
  #menu-btn {
    display: block;
  }
  .identity {
    margin: 0;
    padding: 0;
    border: 0;
  }
  .identity div {
    display: none;
  }
  nav {
    display: none;
    grid-column: 1/-1;
    grid-row: 2;
    margin: 0;
    max-height: 65vh;
  }
  aside.open nav {
    display: block;
  }
  .topbar {
    min-height: 50px;
  }
  .page-head {
    margin-bottom: 17px;
  }
  .stat {
    padding: 11px 8px;
  }
  .stats {
    gap: 6px;
  }
  .stat span {
    font-size: 12px;
  }
  .login-art {
    padding: 20px 28px;
  }
  .login-title {
    margin: 28px 0 3px;
  }
  .login-title h1 {
    font-size: 35px;
  }
  .login-title h1 br {
    display: none;
  }
  .login-main {
    padding: 38px 25px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .panel-head {
    padding: 15px 14px 9px;
  }
  .panel-body {
    padding: 6px 14px 16px;
  }
}

.trend .level-1 {
  height: 10%;
}

.trend .level-2 {
  height: 20%;
}

.trend .level-3 {
  height: 30%;
}

.trend .level-4 {
  height: 40%;
}

.trend .level-5 {
  height: 50%;
}

.trend .level-6 {
  height: 60%;
}

.trend .level-7 {
  height: 70%;
}

.trend .level-8 {
  height: 80%;
}

.trend .level-9 {
  height: 90%;
}

.trend .level-10 {
  height: 100%;
}

.invite-result {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.invite-result label {
  flex: 1 1 220px;
  max-width: 480px;
  min-width: 0;
}
#invite-code {
  font-family: Consolas,monospace;
  font-size: 17px;
}
#issue .hint, #issue .error {
  margin: 8px 0 14px;
}
#search label {
  flex: 1 1 150px;
}
#search {
  align-items: flex-end;
  flex-wrap: wrap;
}
